Label more dungeon entry fields

This commit is contained in:
AnonymousRandomPerson 2023-02-12 00:49:57 -05:00
parent aa00d1e785
commit b783cb9f0e
12 changed files with 55 additions and 55 deletions

View File

@ -870,7 +870,7 @@ _08000D36:
cmp r4, 0x63
beq _08000D70
adds r0, r4, 0
bl GetSaveBeforeEntering
bl IsForceGameSave
lsls r0, 24
cmp r0, 0
beq _08000D70
@ -961,7 +961,7 @@ _08000E00:
b _08000E1E
_08000E0C:
adds r0, r6, 0
bl GetSaveBeforeEntering
bl IsForceGameSave
lsls r0, 24
cmp r0, 0
bne _08000E1E

View File

@ -636,7 +636,7 @@ _08042FB6:
str r0, [r2]
str r1, [r2, 0x4]
ldrb r0, [r5, 0x4]
bl GetUnkC
bl GetTurnLimit
ldr r1, [r4]
ldr r5, _08043124
adds r2, r1, r5
@ -646,7 +646,7 @@ _08042FB6:
strb r7, [r1]
mov r1, r8
ldrb r0, [r1, 0x4]
bl GetUnk3
bl GetRescuesAllowed
ldr r1, [r4]
ldr r2, _0804312C
adds r1, r2
@ -896,7 +896,7 @@ _08043230:
ldr r5, _080432BC
adds r0, r5
ldrb r0, [r0]
bl GetLevelCondition
bl IsLevelResetTo1
lsls r0, 24
mov r4, r8
adds r4, 0x1C
@ -1256,7 +1256,7 @@ _08043544:
ldr r1, _080435C4
adds r0, r1
ldrb r0, [r0]
bl GetUnkC
bl GetTurnLimit
ldr r2, [r5]
ldr r3, _080435C8
adds r1, r2, r3
@ -2665,7 +2665,7 @@ sub_8044124:
ldr r1, _080441B0
adds r0, r1
ldrb r0, [r0]
bl GetMaxItemCount
bl GetMaxItemsAllowed
cmp r0, 0
bne _08044182
movs r3, 0
@ -2714,7 +2714,7 @@ _08044182:
ldr r2, _080441B0
adds r0, r2
ldrb r0, [r0]
bl GetMoneyCondition
bl IsMoneyResetTo0
lsls r0, 24
lsrs r1, r0, 24
cmp r1, 0

View File

@ -16768,7 +16768,7 @@ sub_8065FB4:
ldr r1, _08065FE8
adds r0, r1
ldrb r0, [r0]
bl GetRecruitable
bl IsRecruitingEnabled
lsls r0, 24
cmp r0, 0
bne _08065FF0
@ -21916,7 +21916,7 @@ _08068922:
ldr r1, _08068A6C
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
bl IsLevelResetTo1
lsls r0, 24
cmp r0, 0
beq _08068A06
@ -22333,7 +22333,7 @@ _08068C96:
ldr r1, _08068CD8
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
bl IsLevelResetTo1
lsls r0, 24
cmp r0, 0
beq _08068CDC
@ -23050,7 +23050,7 @@ _08069228:
ldr r1, _080692D4
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
bl IsLevelResetTo1
lsls r0, 24
cmp r0, 0
bne _0806926E
@ -23249,7 +23249,7 @@ _080693CC:
ldr r1, _080694B0
adds r0, r1
ldrb r0, [r0]
bl GetLevelCondition
bl IsLevelResetTo1
lsls r0, 24
cmp r0, 0
bne _0806940E

View File

@ -2030,7 +2030,7 @@ _0806E040:
ldr r1, _0806E0C0
adds r0, r1
ldrb r0, [r0]
bl GetDungeonUnk1
bl CanLeaderSwitch
lsls r0, 24
cmp r0, 0
beq _0806E066

View File

@ -1510,7 +1510,7 @@ _0806F6F0:
ldr r2, _0806F834
adds r0, r3, r2
ldrb r0, [r0]
bl GetRecruitable
bl IsRecruitingEnabled
lsls r0, 24
cmp r0, 0
bne _0806F702

View File

@ -224,7 +224,7 @@ _08071CDC:
ldr r2, _08071D28
adds r0, r2
ldrb r0, [r0]
bl sub_8090168
bl GetRandomMovementChance
lsls r0, 16
asrs r0, 16
cmp r4, r0

View File

@ -120,7 +120,7 @@ _08095BEE:
bl sub_803C37C
_08095C10:
ldrb r0, [r4, 0x4]
bl GetMaxItemCount
bl GetMaxItemsAllowed
adds r1, r0, 0
cmp r1, 0
bne _08095C28

View File

@ -11,20 +11,20 @@ struct DungeonName
struct DungeonDataEntry
{
u8 stairDirection;
u8 unk1;
bool8 isRecruitable;
s8 unk3;
u8 maxItemCount;
u8 maxPartySize;
u8 levelCondition;
u8 moneyCondition;
u8 unk8;
u8 unk9;
bool8 saveBeforeEntering; //whether to quicksave or not before entering
u8 unkB; // Apparently is a HM mask (Fly, Dive, Waterfall, Surf, Water)
s16 timer;
s16 unkE;
/* 0x0 */ u8 stairDirection;
/* 0x1 */ bool8 leaderCanSwitch;
/* 0x2 */ bool8 recruitingEnabled;
/* 0x3 */ s8 rescuesAllowed;
/* 0x4 */ u8 maxItemsAllowed;
/* 0x5 */ u8 maxPartyMembers;
/* 0x6 */ bool8 levelResetTo1;
/* 0x7 */ bool8 moneyResetTo0;
/* 0x8 */ u8 unk8;
/* 0x9 */ u8 unk9;
/* 0xA */ bool8 forceGameSave; // Whether to quicksave or not before entering.
/* 0xB */ u8 HMMask; // HM mask for dungeon entry requirements (Fly, Dive, Waterfall, Surf, Water).
/* 0xC */ s16 turnLimit;
/* 0xE */ s16 randomMovementChance; // The chance that a wild Pokémon's moveRandomly flag will be set when spawning, causing them to move randomly inside a room instead of exploring rooms.
};
extern struct DungeonDataEntry gDungeons[];
@ -33,7 +33,7 @@ const u8 *GetDungeonName1(u8 dungeon);
u32 sub_80908D8(struct DungeonLocation *dungeon);
u8 sub_8090910(struct DungeonLocation *dungeon, u32 param_2);
bool8 sub_809095C(u8 dungeon);
s8 GetUnk3(u8 dungeon);
s8 GetRescuesAllowed(u8 dungeon);
u8 GetUnk9(u8 dungeon);
#endif //GUARD_DUNGEON_H

View File

@ -185,8 +185,8 @@ struct EntityInfo
/* 0x10D */ u8 speedDownCounters[NUM_SPEED_COUNTERS];
/* 0x112 */ u8 stockpileStage;
u8 fill113;
// When non-zero, an AI Pokémon will move in a random direction every turn.
// Unclear where this is set in-game; it is not set by statuses (e.g., confusion) or mission clients.
// When non-zero, an AI Pokémon will move in a random direction every turn when it is a room.
// There is a chance of this flag being set when a wild Pokémon spawns. The chance depends on the dungeon's randomMovementChance.
/* 0x114 */ u32 moveRandomly;
/* 0x118 */ struct Move moves[MAX_MON_MOVES];
/* 0x138 */ u8 struggleMoveFlags;

View File

@ -205,7 +205,7 @@ void sub_809542C(struct unkStruct_809542C *param_1)
PrintPokeNameToBuffer(buffer, GetPlayerPokemonStruct());
CopyStringtoBuffer(gUnknown_203B480->playerName, buffer);
gUnknown_203B480->unk24 = sub_8011C34();
gUnknown_203B480->unk2C = GetUnk3(gUnknown_203B480->dungeon.id);
gUnknown_203B480->unk2C = GetRescuesAllowed(gUnknown_203B480->dungeon.id);
}
void sub_8095494(struct unkStruct_809542C *param_1, u8 index)

View File

@ -17,7 +17,7 @@ extern bool8 IsInvalidItemReward(u8);
extern u8 sub_803C1D0(struct DungeonLocation *, u8);
extern bool8 IsNotMoneyOrUsedTMItem(u8);
extern u8 xxx_bit_lut_lookup_8091E50(u8 ,u8 );
extern u32 GetMaxItemCount(u8);
extern u32 GetMaxItemsAllowed(u8);
extern bool8 sub_803C0DC(s16);
extern void ResetMailboxSlot(u8);
extern void ResetPelipperBoardSlot(u8);
@ -90,7 +90,7 @@ bool8 ValidateWonderMail(struct WonderMail *data)
return FALSE;
else
{
if(data->missionType == WONDER_MAIL_MISSION_TYPE_DELIVER_ITEM && GetMaxItemCount(data->dungeon.id) == 0)
if(data->missionType == WONDER_MAIL_MISSION_TYPE_DELIVER_ITEM && GetMaxItemsAllowed(data->dungeon.id) == 0)
return FALSE;
if(data->unk2 > 9)

View File

@ -30,14 +30,14 @@ u8 GetStairDirection(u8 dungeon)
return gDungeons[dungeon].stairDirection;
}
s16 GetUnkC(u8 dungeon)
s16 GetTurnLimit(u8 dungeon)
{
return gDungeons[dungeon].timer;
return gDungeons[dungeon].turnLimit;
}
bool8 GetSaveBeforeEntering(u8 dungeon)
bool8 IsForceGameSave(u8 dungeon)
{
return gDungeons[dungeon].saveBeforeEntering;
return gDungeons[dungeon].forceGameSave;
}
u8 GetUnk9(u8 dungeon)
@ -45,29 +45,29 @@ u8 GetUnk9(u8 dungeon)
return gDungeons[dungeon].unk9;
}
u8 GetLevelCondition(u8 dungeon)
bool8 IsLevelResetTo1(u8 dungeon)
{
return gDungeons[dungeon].levelCondition;
return gDungeons[dungeon].levelResetTo1;
}
u8 GetMaxItemCount(u8 dungeon)
u8 GetMaxItemsAllowed(u8 dungeon)
{
return gDungeons[dungeon].maxItemCount;
return gDungeons[dungeon].maxItemsAllowed;
}
u8 GetMoneyCondition(u8 dungeon)
bool8 IsMoneyResetTo0(u8 dungeon)
{
return gDungeons[dungeon].moneyCondition;
return gDungeons[dungeon].moneyResetTo0;
}
s8 GetUnk3(u8 dungeon)
s8 GetRescuesAllowed(u8 dungeon)
{
return gDungeons[dungeon].unk3;
return gDungeons[dungeon].rescuesAllowed;
}
bool8 GetRecruitable(u8 dungeon)
bool8 IsRecruitingEnabled(u8 dungeon)
{
return gDungeons[dungeon].isRecruitable;
return gDungeons[dungeon].recruitingEnabled;
}
u8 sub_8090158(u8 dungeon)
@ -75,9 +75,9 @@ u8 sub_8090158(u8 dungeon)
return gDungeons[dungeon].unk8;
}
s16 sub_8090168(u8 dungeon)
s16 GetRandomMovementChance(u8 dungeon)
{
return gDungeons[dungeon].unkE;
return gDungeons[dungeon].randomMovementChance;
}
bool8 sub_809017C(struct DungeonLocation* a1) {
@ -159,7 +159,7 @@ void RestoreDungeonLocation(struct unkStruct_8094924* r0, struct DungeonLocation
RestoreIntegerBits(r0, &r1->floor, 0x7);
}
u8 GetDungeonUnk1(u8 dungeon)
bool8 CanLeaderSwitch(u8 dungeon)
{
return gDungeons[dungeon].unk1;
return gDungeons[dungeon].leaderCanSwitch;
}