mirror of
https://github.com/NoelFB/tiny_link.git
synced 2025-07-04 20:25:28 +08:00
simple level loading
This commit is contained in:
@ -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];
|
||||
}
|
||||
|
@ -14,5 +14,7 @@ namespace TL
|
||||
int columns = 0;
|
||||
int rows = 0;
|
||||
Subtexture tiles[max_columns * max_rows];
|
||||
|
||||
const Subtexture& random_tile() const;
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user