diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/randtiles.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/randtiles.cpp b/src/randtiles.cpp index 4af3bf7..92e31ae 100644 --- a/src/randtiles.cpp +++ b/src/randtiles.cpp @@ -109,7 +109,7 @@ extern "C" void TryAndRandomise(RTilemapClass *self, BGRender *bgr) { // Found it!!
// Try to make one until we meet the conditions
u8 *tileNums = entry->getTileNums();
- u8 chosen = 0xFF;
+ u16 chosen = 0xFF;
u16 *top = 0, *left = 0, *right = 0, *bottom = 0;
if (entry->type == RandomTileData::CHECK_HORZ || entry->type == RandomTileData::CHECK_BOTH) {
@@ -123,7 +123,8 @@ extern "C" void TryAndRandomise(RTilemapClass *self, BGRender *bgr) { }
while (true) {
- chosen = tileNums[MakeRandomNumber(entry->count)];
+ // is there even a point to using that special random function?
+ chosen = (tileset << 8) | tileNums[MakeRandomNumberForTiles(entry->count)];
if (top != 0 && *top == chosen)
continue;
|