mirror of
https://github.com/pret/pmd-red.git
synced 2026-08-28 03:34:22 -05:00
Merge pull request #124 from AnonymousRandomPerson/master
Fixed some labels on dungeon data struct
This commit is contained in:
@@ -870,7 +870,7 @@ _08000D36:
|
||||
cmp r4, 0x63
|
||||
beq _08000D70
|
||||
adds r0, r4, 0
|
||||
bl IsForceGameSave
|
||||
bl IsEnterWithoutGameSave
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _08000D70
|
||||
@@ -961,7 +961,7 @@ _08000E00:
|
||||
b _08000E1E
|
||||
_08000E0C:
|
||||
adds r0, r6, 0
|
||||
bl IsForceGameSave
|
||||
bl IsEnterWithoutGameSave
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
bne _08000E1E
|
||||
|
||||
@@ -2714,7 +2714,7 @@ _08044182:
|
||||
ldr r2, _080441B0
|
||||
adds r0, r2
|
||||
ldrb r0, [r0]
|
||||
bl IsMoneyResetTo0
|
||||
bl IsKeepMoney
|
||||
lsls r0, 24
|
||||
lsrs r1, r0, 24
|
||||
cmp r1, 0
|
||||
|
||||
@@ -7423,7 +7423,7 @@ _080614C8:
|
||||
ldr r3, _08061578
|
||||
adds r0, r1, r3
|
||||
ldrb r0, [r0]
|
||||
bl IsDungeonUnk8
|
||||
bl CanLeaderSwitch
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806154C
|
||||
|
||||
@@ -2030,7 +2030,7 @@ _0806E040:
|
||||
ldr r1, _0806E0C0
|
||||
adds r0, r1
|
||||
ldrb r0, [r0]
|
||||
bl CanLeaderSwitch
|
||||
bl DoEnemiesEvolveWhenKOed
|
||||
lsls r0, 24
|
||||
cmp r0, 0
|
||||
beq _0806E066
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -12,19 +12,23 @@ struct DungeonName
|
||||
struct DungeonDataEntry
|
||||
{
|
||||
/* 0x0 */ bool8 stairDirectionUp;
|
||||
/* 0x1 */ bool8 leaderCanSwitch;
|
||||
// If enabled, enemies will evolve when a team member is KOed (and doesn't revive) if their evolution spawns on the floor.
|
||||
// False for all dungeons, but the code still works if this flag is enabled.
|
||||
/* 0x1 */ bool8 enemiesEvolveWhenKOed;
|
||||
/* 0x2 */ bool8 recruitingEnabled;
|
||||
/* 0x3 */ s8 rescuesAllowed;
|
||||
/* 0x4 */ u8 maxItemsAllowed;
|
||||
/* 0x5 */ u8 maxPartyMembers;
|
||||
/* 0x6 */ bool8 levelResetTo1;
|
||||
/* 0x7 */ bool8 moneyResetTo0;
|
||||
/* 0x8 */ bool8 unk8;
|
||||
/* 0x7 */ bool8 keepMoney;
|
||||
/* 0x8 */ bool8 leaderCanSwitch;
|
||||
/* 0x9 */ bool8 hasCheckpoint;
|
||||
/* 0xA */ bool8 forceGameSave; // Whether to quicksave or not before entering.
|
||||
/* 0xA */ bool8 enterWithoutGameSave; // If false, the dungeon will force a quicksave 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.
|
||||
// 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.
|
||||
/* 0xE */ s16 randomMovementChance;
|
||||
};
|
||||
|
||||
extern struct DungeonDataEntry gDungeons[];
|
||||
|
||||
@@ -35,9 +35,9 @@ s16 GetTurnLimit(u8 dungeon)
|
||||
return gDungeons[dungeon].turnLimit;
|
||||
}
|
||||
|
||||
bool8 IsForceGameSave(u8 dungeon)
|
||||
bool8 IsEnterWithoutGameSave(u8 dungeon)
|
||||
{
|
||||
return gDungeons[dungeon].forceGameSave;
|
||||
return gDungeons[dungeon].enterWithoutGameSave;
|
||||
}
|
||||
|
||||
u8 HasCheckpoint(u8 dungeon)
|
||||
@@ -55,9 +55,9 @@ u8 GetMaxItemsAllowed(u8 dungeon)
|
||||
return gDungeons[dungeon].maxItemsAllowed;
|
||||
}
|
||||
|
||||
bool8 IsMoneyResetTo0(u8 dungeon)
|
||||
bool8 IsKeepMoney(u8 dungeon)
|
||||
{
|
||||
return gDungeons[dungeon].moneyResetTo0;
|
||||
return gDungeons[dungeon].keepMoney;
|
||||
}
|
||||
|
||||
s8 GetRescuesAllowed(u8 dungeon)
|
||||
@@ -70,9 +70,9 @@ bool8 IsRecruitingEnabled(u8 dungeon)
|
||||
return gDungeons[dungeon].recruitingEnabled;
|
||||
}
|
||||
|
||||
bool8 IsDungeonUnk8(u8 dungeon)
|
||||
bool8 CanLeaderSwitch(u8 dungeon)
|
||||
{
|
||||
return gDungeons[dungeon].unk8;
|
||||
return gDungeons[dungeon].leaderCanSwitch;
|
||||
}
|
||||
|
||||
s16 GetRandomMovementChance(u8 dungeon)
|
||||
@@ -159,7 +159,7 @@ void RestoreDungeonLocation(struct unkStruct_8094924* r0, struct DungeonLocation
|
||||
RestoreIntegerBits(r0, &r1->floor, 0x7);
|
||||
}
|
||||
|
||||
bool8 CanLeaderSwitch(u8 dungeon)
|
||||
bool8 DoEnemiesEvolveWhenKOed(u8 dungeon)
|
||||
{
|
||||
return gDungeons[dungeon].leaderCanSwitch;
|
||||
return gDungeons[dungeon].enemiesEvolveWhenKOed;
|
||||
}
|
||||
|
||||
@@ -765,17 +765,17 @@ string generate_dungeon_data_text(Json data) {
|
||||
text << "gDungeons:";
|
||||
for (Json data_entry : data.array_items()) {
|
||||
text << read_json_bool(data_entry["stairDirectionUp"])
|
||||
<< read_json_bool(data_entry["leaderCanSwitch"])
|
||||
<< read_json_bool(data_entry["enemiesEvolveWhenKOed"])
|
||||
<< read_json_bool(data_entry["recruitingEnabled"])
|
||||
<< read_json_int(data_entry["rescuesAllowed"], 1)
|
||||
<< read_json_int(data_entry["maxItemsAllowed"], 1)
|
||||
<< read_json_int(data_entry["maxPartyMembers"], 1)
|
||||
<< read_json_bool(data_entry["levelResetTo1"])
|
||||
<< read_json_bool(data_entry["moneyResetTo0"])
|
||||
<< read_json_bool(data_entry["unk8"])
|
||||
<< read_json_bool(data_entry["keepMoney"])
|
||||
<< read_json_bool(data_entry["leaderCanSwitch"])
|
||||
<< read_json_bool(data_entry["hasCheckpoint"])
|
||||
<< read_json_bool(data_entry["forceGameSave"])
|
||||
<< read_json_int(data_entry["HMMask"], 1)
|
||||
<< read_json_bool(data_entry["enterWithoutGameSave"])
|
||||
<< read_json_binary(data_entry["HMMask"], 1)
|
||||
<< read_json_int(data_entry["turnLimit"], 2)
|
||||
<< read_json_int(data_entry["randomMovementChance"], 2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user