simple level loading

This commit is contained in:
Noel Berry
2021-01-03 13:04:11 -08:00
parent eefc0547eb
commit a8b78214f9
13 changed files with 135 additions and 33 deletions

View File

@ -0,0 +1,9 @@
#include "tileset.h"
using namespace TL;
const Subtexture& Tileset::random_tile() const
{
int i = Calc::rand_int(columns * rows);
return tiles[i];
}

View File

@ -14,5 +14,7 @@ namespace TL
int columns = 0;
int rows = 0;
Subtexture tiles[max_columns * max_rows];
const Subtexture& random_tile() const;
};
}