mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-28 11:44:30 -05:00
use DUNGEON_MAX_NUM_TILES name
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
#define DUNGEON_MAX_SIZE_X 56
|
||||
#define DUNGEON_MAX_SIZE_Y 32
|
||||
#define DUNGEON_MAX_SIZE_X_MUL_Y (DUNGEON_MAX_SIZE_X * DUNGEON_MAX_SIZE_Y)
|
||||
#define DUNGEON_MAX_NUM_TILES (DUNGEON_MAX_SIZE_X * DUNGEON_MAX_SIZE_Y)
|
||||
#define DUNGEON_MAX_WILD_POKEMON 16
|
||||
#define DUNGEON_MAX_WILD_POKEMON_BODY_SIZE 16
|
||||
#define DUNGEON_MAX_POKEMON (MAX_TEAM_MEMBERS + DUNGEON_MAX_WILD_POKEMON)
|
||||
|
||||
@@ -4077,7 +4077,7 @@ static void ShuffleSpawnPositions(struct PositionU8 *spawns, s32 count)
|
||||
*/
|
||||
static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse)
|
||||
{
|
||||
struct PositionU8 validSpawns[DUNGEON_MAX_SIZE_X_MUL_Y];
|
||||
struct PositionU8 validSpawns[DUNGEON_MAX_NUM_TILES];
|
||||
s32 count;
|
||||
s32 randIndex;
|
||||
s32 i;
|
||||
@@ -4413,7 +4413,7 @@ static void SpawnNonEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHou
|
||||
*/
|
||||
static void SpawnEnemies(FloorProperties *floorProps, bool8 isEmptyMonsterHouse)
|
||||
{
|
||||
struct PositionU8 validSpawns[DUNGEON_MAX_SIZE_X_MUL_Y];
|
||||
struct PositionU8 validSpawns[DUNGEON_MAX_NUM_TILES];
|
||||
s32 count;
|
||||
s32 randIndex;
|
||||
s32 i;
|
||||
|
||||
@@ -266,7 +266,7 @@ EntityInfo* GetLeaderInfo(void)
|
||||
|
||||
bool8 sub_8083660(DungeonPos *posDst)
|
||||
{
|
||||
struct PositionU8 positions[DUNGEON_MAX_SIZE_X_MUL_Y];
|
||||
struct PositionU8 positions[DUNGEON_MAX_NUM_TILES];
|
||||
s32 yLoop, xLoop;
|
||||
Entity *leader = GetLeader();
|
||||
s32 randX, randY;
|
||||
@@ -284,13 +284,13 @@ bool8 sub_8083660(DungeonPos *posDst)
|
||||
|
||||
for (xLoop = 0; xLoop < DUNGEON_MAX_SIZE_X; xLoop++) {
|
||||
y = randY;
|
||||
if (count >= DUNGEON_MAX_SIZE_X_MUL_Y)
|
||||
if (count >= DUNGEON_MAX_NUM_TILES)
|
||||
break;
|
||||
|
||||
for (yLoop = 0; yLoop < DUNGEON_MAX_SIZE_Y; yLoop++) {
|
||||
bool8 setPosition = FALSE;
|
||||
const Tile *tile = GetTile(x, y);
|
||||
if (count >= DUNGEON_MAX_SIZE_X_MUL_Y)
|
||||
if (count >= DUNGEON_MAX_NUM_TILES)
|
||||
break;
|
||||
if (i == 0) {
|
||||
if (GetTerrainType(tile) == TERRAIN_TYPE_NORMAL
|
||||
|
||||
Reference in New Issue
Block a user