update member names of FloorProperties struct

This commit is contained in:
darsh
2025-09-29 23:39:07 -04:00
parent 9e9779d0c2
commit 72851fb047
7 changed files with 21 additions and 20 deletions

View File

@@ -121,9 +121,9 @@ typedef struct FloorProperties
{
u8 layout;
s8 roomDensity;
u8 unk2;
u8 unk3;
u8 unk4;
u8 tileset;
u8 bgMusic;
u8 weather; // See include/constants/weather.h
u8 floorConnectivity;
u8 enemyDensity;
u8 kecleonShopChance; // Percentage chance 0-100%
@@ -133,19 +133,20 @@ typedef struct FloorProperties
bool8 allowDeadEnds;
u8 secondaryStructuresBudget; // Maximum number of secondary structures that can be generated
u8 roomFlags; // See ROOM_FLAG_
u8 unkE;
bool8 unkE; // Unreferenced flag
u8 itemDensity;
u8 trapDensity;
u8 unk11;
u8 unk12;
u8 floorNumber; // Unreferenced
u8 fixedRoomNumber;
u8 numExtraHallways;
u8 buriedItemDensity; // Density of buried items (in walls)
u8 unk15;
u8 unk16;
u8 unk17;
u8 unk18;
u8 itemlessMonsterHouseChance; // Chance that a monster house will be itemless
u8 unk1A;
u8 unk15; // Unreferenced
u8 visibilityRange;
u8 moneyUpperBound; // Generated money stacks cannot exceed this amount (multiplied by 40)
u8 kecleonShopLayout;
u8 itemlessMonsterHouseChance; // Chance that a monster house will be itemless (always 0)
u8 unk1A; // Unreferenced (always 0)
u8 unk1B; // Unreferenced (always 0)
} FloorProperties;
enum {

View File

@@ -6097,7 +6097,7 @@ static void sub_8051654(FloorProperties *floorProps)
if ((tile->terrainFlags & TERRAIN_TYPE_NATURAL_JUNCTION))
continue;
if (sKecleonShopItemSpawnChances[floorProps->unk18][yIndex][xIndex] > DungeonRandInt(100)) {
if (sKecleonShopItemSpawnChances[floorProps->kecleonShopLayout][yIndex][xIndex] > DungeonRandInt(100)) {
tile->spawnOrVisibilityFlags.spawn |= SPAWN_FLAG_ITEM;
}
}

View File

@@ -83,7 +83,7 @@ void CreateItemWithStickyChance(Item *item, u8 itemID, u32 forceSticky)
}
if (GetItemCategory(itemID) == CATEGORY_POKE) {
sub_8046CE4(item, gDungeon->floorProperties.unk17 * 40);
sub_8046CE4(item, gDungeon->floorProperties.moneyUpperBound * 40);
}
}

View File

@@ -88,7 +88,7 @@ void sub_803F27C(bool8 a0)
gUnknown_202EDFC = 0xFFFF;
if (!a0) {
strPtr->visibilityRange = gDungeon->floorProperties.unk16 & 3;
strPtr->visibilityRange = gDungeon->floorProperties.visibilityRange & 3;
if (strPtr->visibilityRange == 0) {
strPtr->unk1820C = 1;
}

View File

@@ -309,9 +309,9 @@ void RunDungeon_Async(DungeonSetupStruct *setupPtr)
gDungeon->unk644.unk40 = 99;
gDungeon->unk644.unk42 = 99;
gDungeon->weather.weather = 0;
gDungeon->tileset = gDungeon->floorProperties.unk2;
gDungeon->unk3A10 = gDungeon->floorProperties.unk3;
gDungeon->fixedRoomNumber = gDungeon->floorProperties.unk12;
gDungeon->tileset = gDungeon->floorProperties.tileset;
gDungeon->unk3A10 = gDungeon->floorProperties.bgMusic;
gDungeon->fixedRoomNumber = gDungeon->floorProperties.fixedRoomNumber;
sub_807E5E4(0);
sub_80842F0();
}

View File

@@ -42,7 +42,7 @@ void sub_80ADD9C(OpenedFile **a0, OpenedFile **a1, u32 *a2, void *a3, u16 *a4, c
}
strPtr = &((struct DungeonMapParam2 *)(mapParamFile->data))->unk0[dungId][dungFloor];
r8 = ((struct DungeonMapParam2 *)(mapParamFile->data))->floorProperties[strPtr->unk0].unk2;
r8 = ((struct DungeonMapParam2 *)(mapParamFile->data))->floorProperties[strPtr->unk0].tileset;
CloseFile(mapParamFile);

View File

@@ -51,7 +51,7 @@ u8 GetApparentWeather(Entity *pokemon)
void sub_807E5AC(void)
{
u8 weather;
weather = gDungeon->floorProperties.unk4;
weather = gDungeon->floorProperties.weather;
if(weather == WEATHER_COUNT)
weather = DungeonRandInt(WEATHER_COUNT);
sub_807E5E4(weather);