mirror of
https://github.com/pret/pmd-red.git
synced 2026-10-01 13:28:04 -05:00
Part 1
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
#ifndef GUARD_CODE_80A26CC_H
|
||||
#define GUARD_CODE_80A26CC_H
|
||||
|
||||
#include "constants/script_dungeon_id.h"
|
||||
|
||||
// size: 0x14
|
||||
typedef struct DungeonInfo
|
||||
{
|
||||
/* 0x0 */ s16 unk0;
|
||||
/* 0x2 */ s16 unk2;
|
||||
/* 0x4 */ s16 unk4;
|
||||
/* 0x2 */ s16 unk2; // See enum "GroundMapID"
|
||||
/* 0x4 */ s16 unk4; // See enum "GroundMapID"
|
||||
/* 0x6 */ s16 unk6;
|
||||
/* 0x8 */ s16 unk8;
|
||||
/* 0xA */ s16 unkA;
|
||||
@@ -17,7 +19,7 @@ typedef struct DungeonInfo
|
||||
/* 0x11 */ u8 unk11;
|
||||
} DungeonInfo;
|
||||
|
||||
const DungeonInfo *GetDungeonInfo_80A2608(s32 index);
|
||||
const DungeonInfo *GetDungeonInfo_80A2608(s32 scriptDungeon_);
|
||||
s16 sub_80A2654(s16 index);
|
||||
s16 sub_80A2668(s16);
|
||||
s16 sub_80A2688(u8);
|
||||
|
||||
@@ -105,6 +105,14 @@ enum DungeonID
|
||||
DUNGEON_INVALID, // 99
|
||||
};
|
||||
|
||||
enum PrefightKind
|
||||
{
|
||||
PREFIGHT_NONE,
|
||||
PREFIGHT_SKARMORY_ATTEMPT1,
|
||||
PREFIGHT_SKARMORY_ATTEMPT2,
|
||||
PREFIGHT_SKARMORY_GONE,
|
||||
};
|
||||
|
||||
#define DUNGEON_FIRST_MAZE DUNGEON_NORMAL_MAZE_2
|
||||
#define DUNGEON_LAST_MAZE DUNGEON_RESCUE_TEAM_MAZE
|
||||
#define DUNGEON_LAST_BASIC_MAZE DUNGEON_STEEL_MAZE
|
||||
|
||||
@@ -1,7 +1,68 @@
|
||||
#ifndef GUARD_CONSTANTS_EVENT_FLAG_H
|
||||
#define GUARD_CONSTANTS_EVENT_FLAG_H
|
||||
|
||||
enum FlagCalcOperation {
|
||||
enum MainQuest
|
||||
{
|
||||
// SCENARIO_MAIN:
|
||||
|
||||
QUEST_SET_TEAM_NAME,
|
||||
QUEST_UNK1, // Rescue dungeon related. For some reason it scans all rescue dungeons.
|
||||
QUEST_CAN_ACCESS_JOBS,
|
||||
QUEST_CAN_RECRUIT,
|
||||
QUEST_SQUARE_ASLEEP,
|
||||
QUEST_UNK5, // Run away related? It disallows "friend rescue" features.
|
||||
QUEST_REACHED_POSTGAME,
|
||||
QUEST_UNLOCKED_EVOLUTIONS,
|
||||
QUEST_CAN_CHANGE_LEADER,
|
||||
QUEST_CAN_DEPOSIT_PARTNER,
|
||||
QUEST_UNK10, // Dojo-related
|
||||
QUEST_UNK11,
|
||||
QUEST_UNK12, // Music-related
|
||||
QUEST_IN_WORLD_CALAMITY,
|
||||
QUEST_MAZE_14,
|
||||
QUEST_MAZE_15,
|
||||
QUEST_LEGEND_ZAPDOS,
|
||||
QUEST_LEGEND_MOLTRES,
|
||||
QUEST_LEGEND_ARTICUNO,
|
||||
QUEST_LEGEND_GROUDON,
|
||||
QUEST_LEGEND_RAYQUAZA,
|
||||
|
||||
// SCENARIO_SUB2:
|
||||
|
||||
QUEST_LEGEND_KYOGRE,
|
||||
QUEST_LEGEND_LUGIA,
|
||||
|
||||
// SCENARIO_SUB3:
|
||||
|
||||
QUEST_LEGEND_DEOXYS,
|
||||
|
||||
// SCENARIO_SUB4:
|
||||
|
||||
QUEST_LEGEND_HO_OH,
|
||||
|
||||
// SCENARIO_SUB5:
|
||||
|
||||
QUEST_LEGEND_MEWTWO,
|
||||
|
||||
// SCENARIO_SUB7:
|
||||
|
||||
QUEST_LEGEND_MEW,
|
||||
|
||||
// RESCUE_SCENARIO_CONQUEST_LIST:
|
||||
|
||||
QUEST_LEGEND_CELEBI,
|
||||
|
||||
// Special check:
|
||||
|
||||
QUEST_LUCARIO_RANK,
|
||||
|
||||
// TRAINING_CONQUEST_LIST:
|
||||
|
||||
QUEST_COMPLETED_ALL_MAZES,
|
||||
};
|
||||
|
||||
enum FlagCalcOperation
|
||||
{
|
||||
CALC_SET,
|
||||
CALC_SUB,
|
||||
CALC_ADD,
|
||||
@@ -16,7 +77,8 @@ enum FlagCalcOperation {
|
||||
CALC_RANDOM,
|
||||
};
|
||||
|
||||
enum FlagJudgeOperation {
|
||||
enum FlagJudgeOperation
|
||||
{
|
||||
JUDGE_TRUE,
|
||||
JUDGE_FALSE,
|
||||
JUDGE_EQ,
|
||||
@@ -30,7 +92,8 @@ enum FlagJudgeOperation {
|
||||
JUDGE_BIT_SET,
|
||||
};
|
||||
|
||||
enum ScriptVarId {
|
||||
enum ScriptVarId
|
||||
{
|
||||
/* 0x00 */ VERSION,
|
||||
/* 0x01 */ CONDITION,
|
||||
/* 0x02 */ SCENARIO_SELECT,
|
||||
|
||||
@@ -4,7 +4,8 @@
|
||||
enum FixedRoomID
|
||||
{
|
||||
// floorwide fixed rooms
|
||||
FIXED_ROOM_MT_STEEL_SKARMORY = 1,
|
||||
FIXED_ROOM_NONE,
|
||||
FIXED_ROOM_MT_STEEL_SKARMORY,
|
||||
FIXED_ROOM_SINISTER_WOODS_TEAM_MEANIES,
|
||||
FIXED_ROOM_MT_THUNDER_PEAK_ZAPDOS,
|
||||
FIXED_ROOM_MT_BLAZE_PEAK_MOLTRES,
|
||||
@@ -30,6 +31,7 @@ enum FixedRoomID
|
||||
FIXED_ROOM_HOWLING_FOREST_SMEARGLE,
|
||||
FIXED_ROOM_PURITY_FOREST_CELEBI,
|
||||
FIXED_ROOM_WISH_CAVE_MEDICHAM,
|
||||
// Mazes
|
||||
FIXED_ROOM_NORMAL_MAZE_BOSS,
|
||||
FIXED_ROOM_FIRE_MAZE_BOSS,
|
||||
FIXED_ROOM_WATER_MAZE_BOSS,
|
||||
@@ -53,7 +55,7 @@ enum FixedRoomID
|
||||
FIXED_ROOM_TEAM_RUMBLEROCK_BOSS,
|
||||
FIXED_ROOM_RESCUE_TEAM_2_BOSS,
|
||||
FIXED_ROOM_RESCUE_TEAM_MAZE_BOSS,
|
||||
// non-floorwide fixed rooms
|
||||
// Non-floorwide fixed rooms
|
||||
FIXED_ROOM_WYVERN_HILL_HM_FLY,
|
||||
FIXED_ROOM_SOLAR_CAVE_HM_DIVE,
|
||||
FIXED_ROOM_SOLAR_CAVE_HM_WATERFALL,
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#ifndef GUARD_CONSTANTS_GROUND_MAP_H
|
||||
#define GUARD_CONSTANTS_GROUND_MAP_H
|
||||
|
||||
enum {
|
||||
enum GroundMapID
|
||||
{
|
||||
MAP_SQUARE,
|
||||
MAP_POKEMON_SQUARE,
|
||||
MAP_WHISCASH_POND,
|
||||
|
||||
@@ -75,6 +75,6 @@ void sub_8086A3C(Entity *pokemon);
|
||||
void sub_8086A54(Entity *pokemon);
|
||||
void SetupBossFightHP(Entity *pokemon, s32 newHP, u16 songIndex);
|
||||
void sub_8086AC0(void);
|
||||
u8 sub_8086AE4(s16 _index);
|
||||
bool8 sub_8086AE4(s16 _index);
|
||||
|
||||
#endif
|
||||
#endif // GUARD_DUNGEON_CUTSCENE_H
|
||||
|
||||
@@ -6,6 +6,6 @@
|
||||
void SetUpDungeonExitData(s16 dungeonExitReason, Entity *target, Entity *entity);
|
||||
bool8 IsUnsuccessfulDungeonExit(void);
|
||||
bool8 sub_8083C50(void);
|
||||
bool8 sub_8083C88(u8 param_1);
|
||||
bool8 sub_8083C88(u8 dungeonMissionKind);
|
||||
|
||||
#endif // GUARD_DUNGEON_EXIT_H
|
||||
|
||||
@@ -34,7 +34,8 @@ void UpdateScriptVarWithVar(u8 *localVarBuf, s16 dstVarId, s16 srcVarId, enum Fl
|
||||
bool8 FlagJudge(s32 r0, s32 r1, enum FlagJudgeOperation operation);
|
||||
bool8 JudgeVarWithImmediate(u8 *localVarBuf, s16 varId, s32 val, enum FlagJudgeOperation operation);
|
||||
bool8 JudgeVarWithVar(u8 *localVarBuf, s16 varId1, s16 varId2, enum FlagJudgeOperation operation);
|
||||
bool8 sub_80023E4(u32 param_1); // some kind of helper for predefined scenario checks
|
||||
// See enum "MainQuest"
|
||||
bool8 CheckQuest(s32 questID);
|
||||
u8 MapIdToFriendAreaId(s16 mapId_); // map -> friend area lookup
|
||||
s16 FriendAreaIdToMapId(u8 friendAreaId); // friend area -> map lookup
|
||||
bool8 sub_80026CC(s16 r0);
|
||||
|
||||
@@ -14,6 +14,8 @@ enum
|
||||
SUB_WINDOW_INFO,
|
||||
};
|
||||
|
||||
#define MON_SUMMARY_UNK58_COUNT 12
|
||||
|
||||
struct MonSummaryInfo
|
||||
{
|
||||
// size: 0x64
|
||||
@@ -45,7 +47,7 @@ struct MonSummaryInfo
|
||||
u8 tactic;
|
||||
u8 fill55[1];
|
||||
s16 unk56;
|
||||
u8 unk58[12];
|
||||
u8 unk58[MON_SUMMARY_UNK58_COUNT];
|
||||
};
|
||||
|
||||
struct UnkInfoTabStruct
|
||||
@@ -55,6 +57,6 @@ struct UnkInfoTabStruct
|
||||
};
|
||||
|
||||
void ShowPokemonSummaryWindow(s32 which, s32 currSubWindowId, struct MonSummaryInfo *monInfo, struct UnkInfoTabStruct *param_4, u32 windowId);
|
||||
void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool8 param_3);
|
||||
void SetMonSummaryInfo(struct MonSummaryInfo *dst, struct Pokemon *pokemon, bool8 unlockedEvolutions);
|
||||
|
||||
#endif // GUARD_POKEMON_SUMMARY_WINDOW_H
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
typedef struct unkStruct_203B330
|
||||
{
|
||||
/* 0x0 */ TouchScreenMenuInput input;
|
||||
u8 unkC;
|
||||
u8 dungeonMissionKind; // See enum "DungeonMissionKind"
|
||||
/* 0xD */ u8 dungeonIndex;
|
||||
u32 unk10;
|
||||
WindowTemplate *unk14;
|
||||
WindowTemplates unk18;
|
||||
} unkStruct_203B330;
|
||||
|
||||
bool8 sub_80319A4(u8, u8 dungeon, s32);
|
||||
bool8 sub_80319A4(u8 dungeonMissionKind, u8 dungeon, s32);
|
||||
u32 sub_80319F8(void);
|
||||
void sub_8031A3C(void);
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef GUARD_RESCUE_SCENARIO_H
|
||||
#define GUARD_RESCUE_SCENARIO_H
|
||||
|
||||
#include "constants/rescue_dungeon_id.h"
|
||||
#include "structs/str_wonder_mail.h"
|
||||
|
||||
void sub_80972F4(void);
|
||||
@@ -9,7 +10,7 @@ bool8 sub_8097318(s16 param_1);
|
||||
void sub_809733C(s16 param_1, u32 param_2);
|
||||
bool8 sub_8097384(s32 param_1);
|
||||
void sub_80973A8(s32 param_1, u32 param_2);
|
||||
bool8 RescueScenarioConquered(s32 param_1);
|
||||
bool8 RescueScenarioConquered(s32 rescueDungeonID_);
|
||||
void sub_8097418(s32 index, bool32);
|
||||
const u8 *GetRescueDungeonName(s16 rescueDungeonId);
|
||||
const u8 *GetCurrentMissionText(s16 index);
|
||||
|
||||
@@ -17,7 +17,7 @@ struct UnkStruct_203B414
|
||||
extern struct UnkStruct_203B414 *gUnknown_203B414;
|
||||
extern Dungeon *gDungeon;
|
||||
|
||||
void RunDungeon_Async(DungeonSetupStruct *r8);
|
||||
void RunDungeon_Async(DungeonSetupStruct *setupPtr);
|
||||
bool8 sub_8043CE4(s32 dungeonId);
|
||||
u8 GetFloorType(void);
|
||||
void sub_8043D50(s32 *a0, s32 *a1);
|
||||
|
||||
@@ -238,6 +238,14 @@ struct MinMaxPosition
|
||||
s32 maxY;
|
||||
};
|
||||
|
||||
enum DungeonMissionKind
|
||||
{
|
||||
DUNGEON_MISSION_UNK0,
|
||||
DUNGEON_MISSION_OUTONRESCUE,
|
||||
DUNGEON_MISSION_ACCEPTEDJOB_RELATED,
|
||||
DUNGEON_MISSION_UNK3,
|
||||
};
|
||||
|
||||
// size: 0x58
|
||||
typedef struct unkDungeon644
|
||||
{
|
||||
@@ -247,10 +255,10 @@ typedef struct unkDungeon644
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x11 */ u8 fill11[3];
|
||||
/* 0x14 */ bool8 canRecruit;
|
||||
/* 0x15 */ u8 unk15;
|
||||
/* 0x16 */ u8 unk16;
|
||||
/* 0x15 */ bool8 canRecruitRescueTeamMazeBosses;
|
||||
/* 0x16 */ bool8 unlockedEvolutions;
|
||||
/* 0x17 */ bool8 hasInventory;
|
||||
/* 0x18 */ u8 unk18;
|
||||
/* 0x18 */ bool8 canChangeLeader;
|
||||
/* 0x19 */ u8 unk19;
|
||||
/* 0x1A */ u8 fill1A[2];
|
||||
/* 0x1C */ s16 fractionalTurn; // Handles turn order when Pokémon have different movement speeds.
|
||||
@@ -271,7 +279,7 @@ typedef struct unkDungeon644
|
||||
/* 0x31 */ u8 unk31;
|
||||
/* 0x32 */ bool8 itemHoldersIdentified;
|
||||
/* 0x33 */ u8 unk33;
|
||||
/* 0x34 */ u8 unk34;
|
||||
/* 0x34 */ u8 missionKind; // See enum "DungeonMissionKind"
|
||||
/* 0x35 */ u8 emptyBellyAlert; // which alert message to show when belly gets empty.
|
||||
/* 0x36 */ u8 windPhase;
|
||||
/* 0x37 */ s8 unk37;
|
||||
@@ -422,7 +430,7 @@ typedef struct Dungeon
|
||||
/* 0x3A0A */ bool8 unk3A0A;
|
||||
/* 0x3A0B */ bool8 unk3A0B;
|
||||
/* 0x3A0C */ u8 monsterHouseRoom; // room index of monster house
|
||||
/* 0x3A0D */ u8 unk3A0D;
|
||||
/* 0x3A0D */ u8 prefight; // See enum "PrefightKind"
|
||||
/* 0x3A0E */ s16 tileset;
|
||||
/* 0x3A10 */ s16 unk3A10;
|
||||
/* 0x3A12 */ s16 unk3A12;
|
||||
|
||||
@@ -12,13 +12,13 @@ typedef struct DungeonSetupSubstruct
|
||||
{
|
||||
DungeonLocation unk0;
|
||||
u8 unk4;
|
||||
u8 unk5;
|
||||
u8 unk6;
|
||||
u8 unk7;
|
||||
u8 unk8;
|
||||
u8 unk9;
|
||||
/* 0x5 */ bool8 canChangeLeader;
|
||||
/* 0x6 */ bool8 canRecruit;
|
||||
/* 0x7 */ bool8 canRecruitRescueTeamMazeBosses;
|
||||
/* 0x8 */ bool8 unlockedEvolutions;
|
||||
/* 0x9 */ bool8 hasInventory;
|
||||
u8 unkA;
|
||||
u8 unkB;
|
||||
/* 0xB */ u8 missionKind; // See enum "DungeonMissionKind"
|
||||
u8 unkC;
|
||||
u8 unkD;
|
||||
} DungeonSetupSubstruct;
|
||||
@@ -30,7 +30,7 @@ typedef struct DungeonSetupInfo
|
||||
Pokemon mon;
|
||||
u8 *unk74;
|
||||
Dungeon *dungeon;
|
||||
s16 unk7C; // Set to 5 if the dungeon was skipped (quicksave read failed)
|
||||
s16 unk7C; // 4 = OutOnRescue related ... 5 = dungeon was skipped (quicksave read failed)
|
||||
u8 unk7E;
|
||||
DungeonLocation unk80;
|
||||
DungeonMailSeed unk84;
|
||||
|
||||
@@ -40,10 +40,10 @@ struct WorldMap
|
||||
|
||||
struct WorldMapInfo
|
||||
{
|
||||
DungeonLocation startLocation;
|
||||
/* 0x0 */ DungeonLocation startLocation;
|
||||
DungeonSetupSubstruct unk4;
|
||||
Pokemon mon;
|
||||
u8 unk6C;
|
||||
/* 0x14 */ Pokemon mon;
|
||||
/* 0x6C */ bool8 canChangeLeader;
|
||||
u8 unk6D[WORLD_MAP_UNK_6D_COUNT];
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user