2020-06-02 18:56:12 +00:00
|
|
|
#ifndef GUARD_DUNGEON_H
|
|
|
|
#define GUARD_DUNGEON_H
|
|
|
|
|
2023-09-21 02:26:35 +00:00
|
|
|
#include "structs/str_dungeon.h"
|
2023-01-08 09:23:00 +00:00
|
|
|
|
2023-07-25 05:41:05 +00:00
|
|
|
// size: 0x8
|
2023-09-02 05:46:26 +00:00
|
|
|
typedef struct DungeonName
|
2020-06-02 18:56:12 +00:00
|
|
|
{
|
|
|
|
const u8 *name1;
|
|
|
|
const u8 *name2;
|
2023-09-02 05:46:26 +00:00
|
|
|
} DungeonName;
|
2020-06-02 18:56:12 +00:00
|
|
|
|
2023-07-25 05:41:05 +00:00
|
|
|
// size: 0x10
|
2023-09-02 05:46:26 +00:00
|
|
|
typedef struct DungeonDataEntry
|
2020-06-02 18:56:12 +00:00
|
|
|
{
|
2023-02-14 05:02:52 +00:00
|
|
|
/* 0x0 */ bool8 stairDirectionUp;
|
2023-02-14 21:17:59 +00:00
|
|
|
// 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;
|
2023-02-12 05:49:57 +00:00
|
|
|
/* 0x2 */ bool8 recruitingEnabled;
|
|
|
|
/* 0x3 */ s8 rescuesAllowed;
|
|
|
|
/* 0x4 */ u8 maxItemsAllowed;
|
|
|
|
/* 0x5 */ u8 maxPartyMembers;
|
|
|
|
/* 0x6 */ bool8 levelResetTo1;
|
2023-02-14 20:09:39 +00:00
|
|
|
/* 0x7 */ bool8 keepMoney;
|
|
|
|
/* 0x8 */ bool8 leaderCanSwitch;
|
2023-02-14 05:02:52 +00:00
|
|
|
/* 0x9 */ bool8 hasCheckpoint;
|
2023-02-14 20:09:39 +00:00
|
|
|
/* 0xA */ bool8 enterWithoutGameSave; // If false, the dungeon will force a quicksave before entering.
|
2023-02-12 05:49:57 +00:00
|
|
|
/* 0xB */ u8 HMMask; // HM mask for dungeon entry requirements (Fly, Dive, Waterfall, Surf, Water).
|
|
|
|
/* 0xC */ s16 turnLimit;
|
2023-02-14 21:17:59 +00:00
|
|
|
// 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;
|
2023-09-02 05:46:26 +00:00
|
|
|
} DungeonDataEntry;
|
2020-06-02 18:56:12 +00:00
|
|
|
|
2023-09-02 05:46:26 +00:00
|
|
|
extern DungeonDataEntry gDungeons[];
|
|
|
|
extern DungeonName gDungeonNames[];
|
2023-09-09 23:53:10 +00:00
|
|
|
|
|
|
|
s32 GetDungeonFloorCount(u8 dungeon);
|
2020-11-23 21:22:16 +00:00
|
|
|
const u8 *GetDungeonName1(u8 dungeon);
|
2024-07-20 00:38:08 +00:00
|
|
|
bool8 IsStairDirectionUp(u8 dungeon);
|
2023-07-22 23:51:16 +00:00
|
|
|
u32 GetMaxItemsAllowed(u8 dungeon);
|
2023-02-12 05:49:57 +00:00
|
|
|
s8 GetRescuesAllowed(u8 dungeon);
|
2023-02-14 05:02:52 +00:00
|
|
|
bool8 HasCheckpoint(u8 dungeon);
|
2023-11-17 23:48:21 +00:00
|
|
|
s16 GetRandomMovementChance(u8 dungeon);
|
2023-09-09 23:53:10 +00:00
|
|
|
void PrintYellowDungeonNametoBuffer(u8 *buffer, DungeonLocation *dungeonLocation);
|
2023-10-20 05:35:32 +00:00
|
|
|
void PrintDungeonLocationtoBuffer(u8 *buffer, DungeonLocation *dungeonLocation);
|
2023-09-09 23:53:10 +00:00
|
|
|
|
|
|
|
u32 sub_80908D8(DungeonLocation *dungeon);
|
|
|
|
u8 sub_8090910(DungeonLocation *dungeon, u32 param_2);
|
2024-03-11 00:37:59 +00:00
|
|
|
bool8 IsNotValidDungeon(u8 dungeon);
|
2024-09-20 17:23:42 +00:00
|
|
|
u8 IsRecruitingEnabled(u8 dungeon);
|
2020-06-02 18:56:12 +00:00
|
|
|
|
2023-11-17 23:48:21 +00:00
|
|
|
#endif // GUARD_DUNGEON_H
|