use DUNGEON_MAX_NUM_TILES name

This commit is contained in:
DizzyEggg
2025-04-08 11:58:15 +02:00
parent c1b3d1d6bc
commit c2ed0dcd2f
3 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -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;

View File

@@ -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