mirror of
https://github.com/pret/pmd-red.git
synced 2026-09-09 09:35:45 -05:00
Merge branch 'master' into stuff
This commit is contained in:
@@ -17,7 +17,7 @@ typedef struct unkStruct_203B230
|
||||
u8 fill18[0x20 - 0x18];
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
Windows unk28;
|
||||
WindowTemplates unk28;
|
||||
MenuInputStructSub unk88;
|
||||
} unkStruct_203B230;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ typedef struct unkStruct_203B234
|
||||
MenuStruct unk78;
|
||||
/* 0xC8 */ u32 menuAction;
|
||||
MenuItem unkCC[5];
|
||||
Windows windows;
|
||||
WindowTemplates windows;
|
||||
} unkStruct_203B234;
|
||||
|
||||
bool8 sub_801B60C(u32, u8 id, u8 quantity);
|
||||
|
||||
@@ -21,7 +21,7 @@ struct unk_203B250
|
||||
MenuStruct unk18;
|
||||
MenuItem unk68[8];
|
||||
u16 unkA8[8];
|
||||
Windows windows;
|
||||
WindowTemplates windows;
|
||||
};
|
||||
|
||||
// size: 0x8
|
||||
|
||||
@@ -21,7 +21,7 @@ typedef struct unkStruct_203B270
|
||||
/* 0x1C */ MenuInputStruct input;
|
||||
u32 unk50;
|
||||
u32 unk54;
|
||||
Windows windows;
|
||||
WindowTemplates windows;
|
||||
const u8 *text;
|
||||
} unkStruct_203B270;
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct unkStruct_203B294
|
||||
/* 0xF4 */ u32 menuAction;
|
||||
MenuItem unkF8[8];
|
||||
u16 unk138[8];
|
||||
Windows windows;
|
||||
WindowTemplates windows;
|
||||
} unkStruct_203B294;
|
||||
|
||||
bool8 sub_80227B8(PokemonStruct1 *pkmn);
|
||||
|
||||
@@ -15,8 +15,8 @@ struct unkStruct_203B2AC
|
||||
struct unkStruct_808FF20 unk4C;
|
||||
struct UnkInfoTabStruct unkB0;
|
||||
u32 unkE0;
|
||||
Window *unkE4;
|
||||
Windows unkE8;
|
||||
WindowTemplate *unkE4;
|
||||
WindowTemplates unkE8;
|
||||
WindowHeader unk148;
|
||||
};
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ struct unkStruct_203B2FC
|
||||
/* 0x30 */ u8 jobSlotIndex;
|
||||
/* 0x34 */ WonderMail *jobInfo;
|
||||
/* 0x38 */ struct MonPortraitMsg monPortrait;
|
||||
Windows unk48;
|
||||
WindowTemplates unk48;
|
||||
};
|
||||
|
||||
bool8 sub_802DB28(u8 jobSlotIndex, u8 dungeon);
|
||||
|
||||
@@ -11,8 +11,8 @@ struct unkStruct_203B300
|
||||
MenuInputStructSub unk0;
|
||||
/* 0xC */ unkStruct_802C39C *mail;
|
||||
u32 unk10;
|
||||
Window *unk14;
|
||||
Windows unk18;
|
||||
WindowTemplate *unk14;
|
||||
WindowTemplates unk18;
|
||||
u8 unk78[4];
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#ifndef GUARD_CODE_803E46C_H
|
||||
#define GUARD_CODE_803E46C_H
|
||||
|
||||
void sub_803E46C(u32);
|
||||
void DungeonRunFrameActions(u32);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
// size: 0x4
|
||||
typedef struct unkStruct_202EE44
|
||||
{
|
||||
u16 unk0;
|
||||
u16 actionId;
|
||||
u8 unk2;
|
||||
bool8 unk3;
|
||||
bool8 canBeChosen;
|
||||
} unkStruct_202EE44;
|
||||
|
||||
extern unkStruct_202EE44 gUnknown_202EE44[10];
|
||||
extern unkStruct_202EE44 gDungeonSubMenu[10];
|
||||
|
||||
#endif // GUARD_CODE_8044CC8_H
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
|
||||
#include "structs/subStruct_203B240.h"
|
||||
|
||||
extern u32 sub_8097DF0(u8 *, struct subStruct_203B240 **);
|
||||
extern u32 sub_8097DF0(const u8 *, struct subStruct_203B240 **);
|
||||
|
||||
#endif // GUARD_CODE_8097DD0_H
|
||||
#endif // GUARD_CODE_8097DD0_H
|
||||
|
||||
@@ -8,12 +8,13 @@ enum DungeonAction
|
||||
ACTION_WALK = 0x2,
|
||||
ACTION_UNK5 = 0x5,
|
||||
// Switching between Pokémon in the moves menu.
|
||||
ACTION_NEXT = 0x6,
|
||||
ACTION_PREVIOUS = 0x7,
|
||||
ACTION_MOVES_MENU_NEXT_MON = 0x6,
|
||||
ACTION_MOVES_MENU_PREV_MON = 0x7,
|
||||
ACTION_PLACE_ITEM = 0x8,
|
||||
// Some actions are different between the leader and AI-controlled Pokémon.
|
||||
ACTION_PICK_UP_PLAYER = 0x9, // Picking up an item underfoot.
|
||||
ACTION_THROW_ITEM_PLAYER = 0xB,
|
||||
ACTION_SHOW_INFO = 0xC,
|
||||
ACTION_EAT_BERRY_SEED_DRINK = 0xD,
|
||||
ACTION_USE_TM = 0x12,
|
||||
ACTION_TALK_FIELD = 0x13, // Talking to another Pokémon by facing them and interacting.
|
||||
@@ -24,16 +25,18 @@ enum DungeonAction
|
||||
ACTION_CHANGE_TACTICS = 0x1A,
|
||||
ACTION_CHECK_SUMMARY = 0x1B,
|
||||
ACTION_TALK_MENU = 0x1C, // Talking to another Pokémon via the menu.
|
||||
ACTION_UNK1D = 0x1D,
|
||||
ACTION_MOVE_INFO = 0x1D,
|
||||
ACTION_SET_MOVE = 0x1E, // Registering a move.
|
||||
ACTION_UNK1F = 0x1F,
|
||||
ACTION_UNK20 = 0x20,
|
||||
ACTION_UNK21 = 0x21,
|
||||
ACTION_SWITCH_AI_MOVE = 0x1F,
|
||||
ACTION_LINK_MOVES = 0x20,
|
||||
ACTION_DELINK_MOVES = 0x21,
|
||||
ACTION_UNK22 = 0x22,
|
||||
ACTION_EAT_AI = 0x23,
|
||||
ACTION_THROW_ITEM_AI = 0x24,
|
||||
ACTION_STEPPED_ON_TRAP = 0x25,
|
||||
ACTION_STAIRS = 0x26,
|
||||
ACTION_THROW_STRAIGHT_PLAYER = 0x27,
|
||||
ACTION_QUICK_SAVE = 0x2B,
|
||||
ACTION_USE_LINK_BOX = 0x2C,
|
||||
ACTION_GIVE_UP = 0x2E,
|
||||
ACTION_VIEW_IQ = 0x30,
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
// size: 0x6C
|
||||
typedef struct Credits1Work
|
||||
{
|
||||
Windows unk0;
|
||||
WindowTemplates unk0;
|
||||
s32 unk60;
|
||||
s32 unk64;
|
||||
/* 0x68 */ s32 creditsCategoryIndex;
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
struct DebugMenu
|
||||
{
|
||||
MenuStruct unk0[4];
|
||||
Windows unk140;
|
||||
WindowTemplates unk140;
|
||||
u32 fill1A0;
|
||||
};
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ typedef struct unkStruct_203B3F0
|
||||
MenuStruct unk4C;
|
||||
unkStructFor8013AA0 unk9C;
|
||||
u8 fillCC[0xD8 - 0xCC];
|
||||
Windows unkD8;
|
||||
WindowTemplates unkD8;
|
||||
} unkStruct_203B3F0;
|
||||
|
||||
#endif // GUARD_DEBUG_MENU2_H
|
||||
|
||||
@@ -12,7 +12,7 @@ typedef struct unkStruct_203B3F4
|
||||
/* 0x8 */ u32 menuAction;
|
||||
/* 0xC */ MenuItem menuItems[8];
|
||||
MenuStruct unk4C;
|
||||
Windows unk9C;
|
||||
WindowTemplates unk9C;
|
||||
} unkStruct_203B3F4;
|
||||
|
||||
#endif // GUARD_DEBUG_MENU3_H
|
||||
|
||||
@@ -17,7 +17,7 @@ typedef struct unkStruct_203B3F8
|
||||
unkStructFor8013AA0 unk60;
|
||||
MenuItem unk90[8];
|
||||
u16 unkD0[8];
|
||||
Windows unkE0;
|
||||
WindowTemplates unkE0;
|
||||
} unkStruct_203B3F8;
|
||||
|
||||
#endif // GUARD_DEBUG_MENU4_H
|
||||
|
||||
22
include/dungeon_main.h
Normal file
22
include/dungeon_main.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef GUARD_DUNGEON_MAIN_H
|
||||
#define GUARD_DUNGEON_MAIN_H
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
struct UnkMenuBitsStruct {
|
||||
u8 a0_8;
|
||||
u8 a0_16;
|
||||
u8 a0_24;
|
||||
u8 a0_32;
|
||||
};
|
||||
|
||||
void DungeonHandlePlayerInput(void);
|
||||
void sub_805E804(void);
|
||||
void sub_805EE30(void);
|
||||
void sub_805EFB4(Entity *a0, bool8 a1);
|
||||
void sub_805F02C(void);
|
||||
ActionContainer *GetLeaderActionContainer(void);
|
||||
u16 GetLeaderActionId(void);
|
||||
bool8 DungeonGiveNameToRecruitedMon(u8 *a0);
|
||||
|
||||
#endif
|
||||
@@ -19,7 +19,7 @@ void sub_8049B8C(void);
|
||||
void sub_8049BB0(s32 x, s32 y);
|
||||
void sub_804A1F0(s32 a0, s32 a1);
|
||||
void sub_804A49C(s32 a0, s32 a1);
|
||||
void sub_804A728(DungeonPos *pos, s32 a1, u8 a2, u8 a3);
|
||||
void ChangeDungeonCameraPos(DungeonPos *pos, s32 a1, u8 a2, u8 a3);
|
||||
void sub_804AA60(void);
|
||||
void sub_804AAAC(void);
|
||||
void sub_804AAD4(void);
|
||||
|
||||
11
include/dungeon_menu_items.h
Normal file
11
include/dungeon_menu_items.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef GUARD_DUNGEON_MENU_ITEMS_H
|
||||
#define GUARD_DUNGEON_MENU_ITEMS_H
|
||||
|
||||
#include "dungeon_main.h"
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
bool8 sub_805FD3C(struct UnkMenuBitsStruct *a0);
|
||||
bool8 ShowDungeonItemsMenu(Entity * a0, struct UnkMenuBitsStruct *a1);
|
||||
void sub_8060D24(UNUSED ActionContainer *a0);
|
||||
|
||||
#endif
|
||||
18
include/dungeon_menu_moves.h
Normal file
18
include/dungeon_menu_moves.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#ifndef GUARD_DUNGEON_MENU_MOVES_H
|
||||
#define GUARD_DUNGEON_MENU_MOVES_H
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/menu.h"
|
||||
#include "structs/subStruct_203B240.h"
|
||||
|
||||
void ShowMovesFromTeamMenu(ActionContainer *a0);
|
||||
bool8 ShowDungeonMovesMenu(Entity * entity, bool8 addLinkOptions, bool8 addUseMove, s32 a3, s32 a4);
|
||||
void ActionShowMoveInfo(ActionContainer *a0);
|
||||
void ShowStatusDescriptionMenu(struct subStruct_203B240 *status, MenuInputStructSub *menuSub);
|
||||
void ActionSetOrUnsetMove(ActionContainer *a0, bool8 flagToSet);
|
||||
void ActionToggleMoveUsableForAi(ActionContainer *a0);
|
||||
void ActionLinkMoves(ActionContainer *a0);
|
||||
void ActionDelinkMoves(ActionContainer *a0, bool8 showMsg);
|
||||
bool8 sub_8063E70(Entity *entity, Move *moves, bool8 showYesNoBox, bool8 allowBPress);
|
||||
|
||||
#endif
|
||||
6
include/dungeon_menu_others.h
Normal file
6
include/dungeon_menu_others.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_DUNGEON_MENU_OTHERS_H
|
||||
#define GUARD_DUNGEON_MENU_OTHERS_H
|
||||
|
||||
void ShowDungeonOthersMenu(void);
|
||||
|
||||
#endif
|
||||
6
include/dungeon_menu_recruitment.h
Normal file
6
include/dungeon_menu_recruitment.h
Normal file
@@ -0,0 +1,6 @@
|
||||
#ifndef GUARD_DUNGEON_MENU_RECRUITMENT_H
|
||||
#define GUARD_DUNGEON_MENU_RECRUITMENT_H
|
||||
|
||||
void ShowRecruitmentSearchMenu(void);
|
||||
|
||||
#endif
|
||||
8
include/dungeon_menu_stairs.h
Normal file
8
include/dungeon_menu_stairs.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_DUNGEON_MENU_STAIRS_H
|
||||
#define GUARD_DUNGEON_MENU_STAIRS_H
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void ShowDungeonStairsMenu(Entity *mon);
|
||||
|
||||
#endif
|
||||
16
include/dungeon_menu_team.h
Normal file
16
include/dungeon_menu_team.h
Normal file
@@ -0,0 +1,16 @@
|
||||
#ifndef GUARD_DUNGEON_MENU_TEAM_H
|
||||
#define GUARD_DUNGEON_MENU_TEAM_H
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "structs/subStruct_203B240.h"
|
||||
|
||||
bool8 ShowDungeonTeamMenu(Entity *a0);
|
||||
void ShowDungeonTacticsMenu(ActionContainer *a0);
|
||||
void ShowDungeonSummaryOrIQMenu(ActionContainer *a0, bool8 a1);
|
||||
void ShowStatusDescriptionMenuArrow(void);
|
||||
void ShowStatusesDescriptionMenu(s32 count, struct subStruct_203B240 **strings);
|
||||
#define WHICH_MENU_MOVES 1
|
||||
#define WHICH_MENU_ITEMS 2
|
||||
Entity *ShowDungeonToWhichMonMenu(s32 *teamId, s32 caseId);
|
||||
|
||||
#endif
|
||||
8
include/dungeon_menu_tile.h
Normal file
8
include/dungeon_menu_tile.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_DUNGEON_MENU_TRAP_H
|
||||
#define GUARD_DUNGEON_MENU_TRAP_H
|
||||
|
||||
#include "structs/dungeon_entity.h"
|
||||
|
||||
void ShowDungeonTileMenu(Entity *mon);
|
||||
|
||||
#endif
|
||||
@@ -4,6 +4,10 @@
|
||||
#include "structs/dungeon_entity.h"
|
||||
#include "string_format.h"
|
||||
|
||||
// These flags are used in dungeon message and dungeon menu recruitment file. It's possible these are general scroll flags and should be put elsewhere, like text.h, assuming more files actually use it.
|
||||
#define FLAG_CAN_SCROLL_UP 0x1
|
||||
#define FLAG_CAN_SCROLL_DOWN 0x2
|
||||
|
||||
struct MonDialogueSpriteInfo
|
||||
{
|
||||
s16 species;
|
||||
|
||||
8
include/dungeon_submenu.h
Normal file
8
include/dungeon_submenu.h
Normal file
@@ -0,0 +1,8 @@
|
||||
#ifndef GUARD_DUNGEON_SUBMENU_H
|
||||
#define GUARD_DUNGEON_SUBMENU_H
|
||||
|
||||
#include "structs/str_text.h"
|
||||
|
||||
void CreateDungeonMenuSubWindow(WindowTemplate *mainWindow, s32 subWindowX);
|
||||
|
||||
#endif
|
||||
@@ -55,7 +55,7 @@ bool8 sub_8098100(u8 param_1);
|
||||
bool8 sub_8098134(s16 pokeID);
|
||||
void SetTutorialFlag(s32 param_1);
|
||||
bool32 GetTutorialFlag(s32 param_1);
|
||||
bool8 IsExclusivePokemonUnlocked(s16 pokeID);
|
||||
bool8 IsExclusivePokemonUnlocked(s32 pokeID);
|
||||
void UnlockExclusivePokemon(s16 pokeID);
|
||||
void WriteExclusivePokemon(DataSerializer *r0);
|
||||
void ReadExclusivePokemon(DataSerializer *r0);
|
||||
|
||||
@@ -22,7 +22,7 @@ typedef struct FelicityBankWork
|
||||
unkStructFor8013AA0 unk64;
|
||||
/* 0x94 */ struct MonPortraitMsg monPortrait;
|
||||
struct MonPortraitMsg *monPortraitPtr;
|
||||
Windows unkA8;
|
||||
WindowTemplates unkA8;
|
||||
} FelicityBankWork;
|
||||
|
||||
bool8 CreateFelicityBank(s32 mode);
|
||||
|
||||
@@ -65,7 +65,7 @@ struct unkStruct_203B2BC
|
||||
MenuItem menuItems[4];
|
||||
u8 fill120[0x16C - 0x13C];
|
||||
u16 unk16C[10];
|
||||
Windows unk180;
|
||||
WindowTemplates unk180;
|
||||
};
|
||||
|
||||
u32 sub_8027074(void);
|
||||
|
||||
@@ -31,7 +31,7 @@ typedef struct unkStruct_203B2B4
|
||||
MenuStruct unk78;
|
||||
MenuItem unkC8[8];
|
||||
u16 unk108[8];
|
||||
Windows unk118;
|
||||
WindowTemplates unk118;
|
||||
} unkStruct_203B2B4;
|
||||
|
||||
bool8 CreateFriendListMenu(s32 param_1);
|
||||
|
||||
@@ -23,8 +23,8 @@ typedef struct WonderMailStruct_203B33C
|
||||
unkStruct_203B480 unk1E8;
|
||||
u8 unk218;
|
||||
MenuStruct unk21C[4];
|
||||
Windows unk35C;
|
||||
Windows unk3BC;
|
||||
WindowTemplates unk35C;
|
||||
WindowTemplates unk3BC;
|
||||
/* 0x41C */ Item item;
|
||||
u32 unk420; // Is this supposed to be a File like 203B2C4?
|
||||
u8 unk424[0x100];
|
||||
|
||||
@@ -46,6 +46,11 @@ static inline void InlineStrncpy(u8 *dst, const u8 *src, s32 n)
|
||||
strncpy(dst, src, n);
|
||||
}
|
||||
|
||||
static inline bool8 AreStringsDifferent(const u8 *str1, const u8 *str2)
|
||||
{
|
||||
return strcmp(str1, str2) != 0;
|
||||
}
|
||||
|
||||
// Sometimes incrementing and decrementing a variable changes how registers are allocated, which helps with matching functions. Functionality-wise this doesn't do anything.
|
||||
#ifdef NONMATCHING
|
||||
#define ASM_MATCH_TRICK(a) {;}
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct GulpinShopWork
|
||||
u8 fillC8[0x118 - 0xC8];
|
||||
/* 0x118 */ struct MonPortraitMsg monPortrait;
|
||||
struct MonPortraitMsg *monPortraitPtr;
|
||||
Windows unk12C;
|
||||
WindowTemplates unk12C;
|
||||
} GulpinShopWork;
|
||||
|
||||
bool8 CreateGulpinShop(u32 mode, s16 pokeSpecies, Move *moves);
|
||||
|
||||
@@ -35,7 +35,7 @@ typedef struct unkStruct_203B27C
|
||||
u8 fill11C[0x16C - 0x11C];
|
||||
/* 0x16C */ struct MonPortraitMsg monPortrait;
|
||||
struct MonPortraitMsg *monPortraitPtr;
|
||||
Windows unk180;
|
||||
WindowTemplates unk180;
|
||||
} unkStruct_203B27C;
|
||||
|
||||
bool8 sub_801FB50(u32 mode);
|
||||
|
||||
@@ -59,4 +59,4 @@ void UpdateInput(void);
|
||||
bool8 sub_80048BC(void);
|
||||
bool8 sub_80048C8(void);
|
||||
|
||||
#endif // GUARD_INPUT_H
|
||||
#endif // GUARD_INPUT_H
|
||||
|
||||
@@ -16,7 +16,7 @@ struct IQSkillInfoMenu
|
||||
u8 fill14[0x20 - 0x18];
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
Windows unk28;
|
||||
WindowTemplates unk28;
|
||||
MenuInputStructSub unk88;
|
||||
};
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ struct IQSkillMenu
|
||||
/* 0x30 */ s32 menuAction;
|
||||
MenuItem unk34[8];
|
||||
MenuStruct unk74;
|
||||
Windows unkC4;
|
||||
WindowTemplates unkC4;
|
||||
};
|
||||
|
||||
bool8 CreateIQSkillMenu(s16 species);
|
||||
|
||||
@@ -47,7 +47,7 @@ struct KangaskhanStorageWork
|
||||
unkStructFor8013AA0 unkA8;
|
||||
/* 0xD8 */ struct MonPortraitMsg monPortrait;
|
||||
struct MonPortraitMsg *monPortraitPtr;
|
||||
Windows unkEC;
|
||||
WindowTemplates unkEC;
|
||||
};
|
||||
|
||||
bool8 CreateKangaskhanStorage(u32 mode);
|
||||
|
||||
@@ -27,7 +27,7 @@ typedef struct unkStruct_203B20C
|
||||
u16 unk60[8];
|
||||
MenuStruct unk70;
|
||||
unkStructFor8013AA0 unkC0;
|
||||
Windows unkF0;
|
||||
WindowTemplates unkF0;
|
||||
} unkStruct_203B20C;
|
||||
|
||||
bool8 sub_8017E1C(void);
|
||||
|
||||
@@ -65,7 +65,7 @@ typedef struct KecleonBrosWork1
|
||||
/* 0x84 */ MenuStruct menu;
|
||||
/* 0xD4 */ struct MonPortraitMsg monPortrait;
|
||||
struct MonPortraitMsg *monPortraitPtr;
|
||||
Windows unkE8;
|
||||
WindowTemplates unkE8;
|
||||
} KecleonBrosWork1;
|
||||
|
||||
// mode corresponds to the enum: KecleonBrosMode
|
||||
|
||||
@@ -33,7 +33,7 @@ typedef struct LuminousCaveWork
|
||||
u8 unk110;
|
||||
u8 unk111;
|
||||
u8 unk112;
|
||||
Windows unk114;
|
||||
WindowTemplates unk114;
|
||||
} LuminousCaveWork;
|
||||
|
||||
void CleanLuminousCave(void);
|
||||
|
||||
@@ -19,7 +19,7 @@ struct unkStruct_203B304
|
||||
MenuStruct unk6C;
|
||||
MenuItem menuItems[8];
|
||||
u16 unkFC[8];
|
||||
Windows unk10C;
|
||||
WindowTemplates unk10C;
|
||||
};
|
||||
|
||||
extern void SetMailboxState(u32);
|
||||
|
||||
@@ -38,12 +38,12 @@ void CleanUpMenu(void);
|
||||
void DeleteMainMenu(void);
|
||||
MainMenu1Work *GetMainMenu(void);
|
||||
void InitMainMenu(void);
|
||||
void SetMenuItems(MenuStruct *, Windows *, s32 index, const Window *, const MenuItem *menuItems, bool8, u32 menuAction, bool8 unused);
|
||||
void SetMenuItems(MenuStruct *, WindowTemplates *, s32 index, const WindowTemplate *, const MenuItem *menuItems, bool8, u32 menuAction, bool8 unused);
|
||||
void SetUpMenu(void);
|
||||
s32 UpdateMenu(void);
|
||||
|
||||
void sub_8035C1C(void);
|
||||
void sub_8035CC0(Windows *dataArray, u32 index);
|
||||
void sub_8035CC0(WindowTemplates *dataArray, u32 index);
|
||||
void sub_8035CF4(MenuStruct *menu, u32 index, bool8);
|
||||
void sub_8035D1C(void);
|
||||
s16 sub_8035D3C(void);
|
||||
|
||||
@@ -9,7 +9,7 @@ typedef struct MainMenu2Work
|
||||
{
|
||||
u32 unk0;
|
||||
MenuStruct unk4[4];
|
||||
Windows unk144;
|
||||
WindowTemplates unk144;
|
||||
/* 0x1A4 */ u32 currMenuChoice;
|
||||
} MainMenu2Work;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ typedef struct MakuhitaDojoWork1
|
||||
u8 fill38[0x58 - 0x38];
|
||||
/* 0x58 */ struct MonPortraitMsg monPortrait;
|
||||
struct MonPortraitMsg *monPortraitPtr;
|
||||
Windows unk6C;
|
||||
WindowTemplates unk6C;
|
||||
} MakuhitaDojoWork1;
|
||||
|
||||
void MakuhitaDojo_Delete(void);
|
||||
|
||||
@@ -9,9 +9,9 @@ s32 GetKeyPress(MenuInputStruct *r0);
|
||||
s32 sub_8012AE8(void);
|
||||
void sub_8012BC4(u32 x, u32 y, s32 n, s32 len, u32 color, u32 param_6);
|
||||
void sub_8012C60(u32 x, u32 y, u32 param_3, u32 color, u32 param_5);
|
||||
void sub_8012CAC(Window *param_1, const MenuItem *param_2);
|
||||
void sub_8012D08(Window *param_1, s32 param_2);
|
||||
void sub_8012D34(Window *param_1, s32 param_2);
|
||||
void sub_8012CAC(WindowTemplate *param_1, const MenuItem *param_2);
|
||||
void sub_8012D08(WindowTemplate *param_1, s32 param_2);
|
||||
void sub_8012D34(WindowTemplate *param_1, s32 param_2);
|
||||
void sub_8012D60(MenuStruct *param_1, const MenuItem *menuItems, const u32 *colorArray, u16 *param_4, s32 menuAction, s32 index);
|
||||
void sub_8012E04(MenuStruct *param_1, const MenuItem *menuItems, const u32 *colorArray, u16 *param_4, s32 menuAction, s32 index);
|
||||
void sub_8012EA4(MenuStruct *param_1, bool8 r1);
|
||||
@@ -24,9 +24,9 @@ void AddMenuCursorSprite(MenuInputStruct *param_1);
|
||||
void sub_8013660(MenuInputStruct *param_1);
|
||||
void UpdateMenuCursorSpriteCoords(MenuInputStruct *param_1);
|
||||
void MoveMenuCursorDown(MenuInputStruct *param_1);
|
||||
void sub_80136E0(MenuInputStruct *param_1, u8 param_2);
|
||||
void MoveMenuCursorDownWrapAround(MenuInputStruct *param_1, u8 param_2);
|
||||
void MoveMenuCursorUp(MenuInputStruct *param_1);
|
||||
void sub_8013744(MenuInputStruct *param_1, u8 param_2);
|
||||
void MoveMenuCursorUpWrapAround(MenuInputStruct *param_1, u8 param_2);
|
||||
void sub_8013780(MenuInputStruct *param_1, s32 param_2);
|
||||
s32 sub_80137A8(MenuInputStruct *param_1);
|
||||
void sub_80137B0(MenuInputStruct *param_1, s32 param_2);
|
||||
@@ -49,7 +49,7 @@ void sub_8013C68(unkStructFor8013AA0 *);
|
||||
void sub_8013D10(unkStructFor8013AA0 *);
|
||||
void sub_8013E54(void);
|
||||
void sub_8013F84(void);
|
||||
void sub_80140B4(Windows *);
|
||||
void sub_80140B4(WindowTemplates *);
|
||||
|
||||
|
||||
#endif // GUARD_MENU_INPUT_H
|
||||
|
||||
@@ -14,7 +14,7 @@ struct unkStruct_203B25C
|
||||
/* 0x1C */ MenuStruct menu;
|
||||
/* 0x6C */ MenuItem menuItems[8];
|
||||
u16 unkAC[8];
|
||||
Windows unkBC;
|
||||
WindowTemplates unkBC;
|
||||
};
|
||||
|
||||
bool8 sub_801DCC4(void);
|
||||
|
||||
@@ -11,8 +11,8 @@ struct unkStruct_203B260
|
||||
/* 0x4 */ MenuInputStructSub unk4;
|
||||
/* 0x10 */ MenuInputStruct input;
|
||||
u32 unk44;
|
||||
Window *unk48;
|
||||
Windows unk4C;
|
||||
WindowTemplate *unk48;
|
||||
WindowTemplates unk4C;
|
||||
};
|
||||
|
||||
bool8 sub_801E198(GameOptions *optionsMenu);
|
||||
|
||||
@@ -18,7 +18,7 @@ typedef struct unkStruct_203B35C
|
||||
u32 unk14;
|
||||
u8 fill18[0x1C - 0x18];
|
||||
MenuStruct unk1C[4];
|
||||
Windows unk15C;
|
||||
WindowTemplates unk15C;
|
||||
unkStruct_8035D94 unk1BC[2];
|
||||
unkStruct_203B480 unk1CC;
|
||||
unkStruct_203B480 unk1FC;
|
||||
|
||||
@@ -32,7 +32,7 @@ typedef struct unkStruct_203B2B8
|
||||
MenuItem unk16C[10];
|
||||
MenuItem unk1BC[10];
|
||||
u16 unk20C[10];
|
||||
Windows unk220;
|
||||
WindowTemplates unk220;
|
||||
} unkStruct_203B2B8;
|
||||
|
||||
bool8 CreatePartyListMenu(PokemonStruct1 *pokeStruct);
|
||||
|
||||
@@ -17,7 +17,7 @@ struct unkStruct_203B308
|
||||
MenuStruct unk6C;
|
||||
MenuItem menuItems[8];
|
||||
u16 unkFC[8];
|
||||
Windows unk10C;
|
||||
WindowTemplates unk10C;
|
||||
};
|
||||
extern struct unkStruct_203B308 *gPelipperBoard;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ struct unkStruct_203B2D4
|
||||
const u8 *unk10[4];
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
Windows unk28;
|
||||
WindowTemplates unk28;
|
||||
MenuInputStructSub unk88;
|
||||
};
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@ typedef struct unkStruct_203B330
|
||||
u8 unkC;
|
||||
/* 0xD */ u8 dungeonIndex;
|
||||
u32 unk10;
|
||||
Window *unk14;
|
||||
Windows unk18;
|
||||
WindowTemplate *unk14;
|
||||
WindowTemplates unk18;
|
||||
} unkStruct_203B330;
|
||||
|
||||
bool8 sub_80319A4(u8, u8 dungeon, s32);
|
||||
|
||||
@@ -12,8 +12,8 @@ struct RescuePasswordMenu
|
||||
u32 currMenu;
|
||||
u32 state;
|
||||
MenuStruct unk8[4];
|
||||
Windows unk148;
|
||||
Windows unk1A8;
|
||||
WindowTemplates unk148;
|
||||
WindowTemplates unk1A8;
|
||||
SpriteOAM unk208;
|
||||
u32 unk210;
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ typedef struct SaveMenuWork
|
||||
/* 0x0 */ u32 currMenu;
|
||||
u32 unk4;
|
||||
MenuStruct unk8[4];
|
||||
Windows unk148;
|
||||
WindowTemplates unk148;
|
||||
SpriteOAM unk1A8;
|
||||
u32 unk1B0; // Sprite count?
|
||||
} SaveMenuWork;
|
||||
|
||||
@@ -72,7 +72,7 @@ typedef struct unkStructFor8013AA0
|
||||
s32 unkC; // maxInclusive?
|
||||
s32 unk10;
|
||||
s32 unk14; // index of unk18? But read as chosenValue..?
|
||||
Window *unk18;
|
||||
WindowTemplate *unk18;
|
||||
s32 unk1C; // width of prompt?
|
||||
s32 unk20; // height of prompt?
|
||||
u8 unk24; // related to unk10
|
||||
|
||||
@@ -259,16 +259,6 @@ typedef struct SpriteOAM
|
||||
(spritePtr)->attrib2 |= _xSpriteVal; \
|
||||
}
|
||||
|
||||
// Hacky way of matching functions in menu_input.c AddMenuCursorSprite_, sub_801332C sub_8013470
|
||||
#define SpriteSetX_MatrixNumSize0(spritePtr, _x) \
|
||||
{ \
|
||||
u32 _xSpriteVal = _x; \
|
||||
_xSpriteVal &= SPRITEOAM_MAX_X; \
|
||||
_xSpriteVal <<= SPRITEOAM_SHIFT_X; \
|
||||
(spritePtr)->attrib2 &= ~SPRITEOAM_MASK_X; \
|
||||
(spritePtr)->attrib2 = _xSpriteVal; \
|
||||
}
|
||||
|
||||
#define SpriteGetY(spritePtr)(((spritePtr)->unk6 >> SPRITEOAM_SHIFT_WORKING_Y) & SPRITEOAM_MAX_WORKING_Y)
|
||||
|
||||
#define SpriteGetY_LocalVar(spritePtr, _y) \
|
||||
|
||||
@@ -98,8 +98,8 @@ typedef struct UnkDungeonGlobal_unk181E8_sub
|
||||
u8 unk18218; // x30
|
||||
u8 unk18219; // x31
|
||||
u8 unk1821A; // x32
|
||||
u8 unk1821B; // x33
|
||||
u8 unk1821C; // x34
|
||||
u8 rotateModeDirection; // x33
|
||||
u8 prevRotateModeDirection; // x34
|
||||
u8 fill1821D; // x35
|
||||
s16 unk36; // x36
|
||||
s16 unk38; // x38
|
||||
@@ -249,7 +249,7 @@ typedef struct unkDungeon644
|
||||
/* 0x8 */ unkStruct_Dungeon64C unk8;
|
||||
/* 0x10 */ u8 unk10;
|
||||
/* 0x11 */ u8 fill11[3];
|
||||
/* 0x14 */ u8 unk14;
|
||||
/* 0x14 */ bool8 canRecruit;
|
||||
/* 0x15 */ u8 unk15;
|
||||
/* 0x16 */ u8 unk16;
|
||||
/* 0x17 */ u8 unk17;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
#define GUARD_STR_TEXT_H
|
||||
|
||||
// size: 0x48
|
||||
typedef struct UnkTextStruct1
|
||||
typedef struct Window
|
||||
{
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
s16 x;
|
||||
s16 y;
|
||||
s16 width;
|
||||
s16 height;
|
||||
s16 unk8;
|
||||
u32 unkC;
|
||||
s32 type;
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 *unk18;
|
||||
@@ -26,21 +26,21 @@ typedef struct UnkTextStruct1
|
||||
u8 unk44;
|
||||
bool8 unk45;
|
||||
u8 unk46;
|
||||
} UnkTextStruct1;
|
||||
} Window;
|
||||
|
||||
// size: 0x4
|
||||
typedef struct WindowHeader
|
||||
{
|
||||
/* 0x0 */ u8 f0;
|
||||
/* 0x1 */ u8 f1;
|
||||
/* 0x2 */ u8 f2;
|
||||
/* 0x0 */ u8 count; // How many headers there are, it's used for windows which can be scrolled left/right
|
||||
/* 0x1 */ u8 currId; // Id of the current header
|
||||
/* 0x2 */ u8 width;
|
||||
/* 0x3 */ u8 f3;
|
||||
} WindowHeader;
|
||||
|
||||
#include "structs/str_position.h"
|
||||
|
||||
// size: 0x18
|
||||
typedef struct Window
|
||||
typedef struct WindowTemplate
|
||||
{
|
||||
u8 unk0;
|
||||
/* 0x4 */ s32 type;
|
||||
@@ -49,30 +49,27 @@ typedef struct Window
|
||||
/* 0xE */ s16 height;
|
||||
s16 unk10; // In most cases it's the same as height. If it's smaller than height, the window may look glitchy. Maybe something with tile allocation/how the window is filled?
|
||||
s16 unk12;
|
||||
const WindowHeader *unk14;
|
||||
} Window;
|
||||
|
||||
#define WINDOW_DUMMY (Window) { .unk0 = 0, .type = WINDOW_TYPE_NORMAL, .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, .unk10 = 0, .unk12 = 0, .unk14 = NULL }
|
||||
const WindowHeader *header;
|
||||
} WindowTemplate;
|
||||
|
||||
#define WINDOW_TYPE_0 0
|
||||
#define WINDOW_TYPE_WITHOUT_BORDER 1
|
||||
//#define WINDOW_TYPE_2 2
|
||||
#define WINDOW_TYPE_2 2
|
||||
#define WINDOW_TYPE_NORMAL 3
|
||||
//#define WINDOW_TYPE_4 4
|
||||
#define WINDOW_TYPE_4 4
|
||||
#define WINDOW_TYPE_FILL_TRANSPARENT 5
|
||||
#define WINDOW_TYPE_WITH_HEADER 6
|
||||
#define WINDOW_TYPE_7 7
|
||||
|
||||
#define MAX_WINDOWS 4
|
||||
|
||||
// All fields are zeroed out except for type which is set to WINDOW_TYPE_NORMAL.
|
||||
#define WINDOW_DUMMY (Window) { .unk0 = 0, .type = WINDOW_TYPE_NORMAL, .pos = { .x = 0, .y = 0 }, .width = 0, .height = 0, .unk10 = 0, .unk12 = 0, .header = NULL }
|
||||
|
||||
// size: 0x60
|
||||
typedef struct Windows
|
||||
typedef struct WindowTemplates
|
||||
{
|
||||
/* 0x0 */ Window id[MAX_WINDOWS];
|
||||
// Something ugly, so that sub_805FD74 could match weird compiler memcpy/stack initialization
|
||||
#ifndef NONMATCHING
|
||||
u8 fakeMatch[0];
|
||||
#endif // NONMATCHING
|
||||
} Windows;
|
||||
/* 0x0 */ sWindowTemplate id[MAX_WINDOWS];
|
||||
} WindowTemplates;
|
||||
|
||||
#endif // GUARD_STR_TEXT_H
|
||||
@@ -12,8 +12,8 @@ typedef struct struct_Sub80095E4
|
||||
{
|
||||
/* 0x0 */ MenuInputStruct input;
|
||||
u32 unk34;
|
||||
Window *unk38;
|
||||
Windows windows;
|
||||
WindowTemplate *unk38;
|
||||
WindowTemplates windows;
|
||||
// size: 0x9C
|
||||
} struct_Sub80095E4;
|
||||
|
||||
|
||||
@@ -49,9 +49,10 @@ struct UnkDrawStringStruct
|
||||
s32 unk30;
|
||||
};
|
||||
|
||||
extern UnkTextStruct1 gUnknown_2027370[4];
|
||||
extern Window gWindows[MAX_WINDOWS];
|
||||
extern u8 gUnknown_202749A[11];
|
||||
extern bool8 gUnknown_20274A5;
|
||||
|
||||
// These should probably go to code_8009804.h
|
||||
#define TILEMAP_TILE_NUM(num)(num & 0x3FF) // bits 0-9
|
||||
#define TILEMAP_FLIP_HORIZONTAL(f)((f & 1) << 10) // bit 10
|
||||
@@ -59,8 +60,8 @@ extern bool8 gUnknown_20274A5;
|
||||
#define TILEMAP_PAL(pal)((pal & 0xF) << 12) // bits 12-15
|
||||
extern u16 gBgTilemaps[4][32][32]; // 4 bgs, 32x32 tiles, y dimension goes before x [bgId][y][x]
|
||||
|
||||
extern void (*gIwramTextFunc1)(s32 a0);
|
||||
extern void (*gIwramTextFunc2)(s32 a0);
|
||||
extern void (*ScrollDownWindowFunc)(s32 windowId);
|
||||
extern void (*ScrollUpWindowFunc)(s32 windowId);
|
||||
extern void (*gIwramTextFunc3)(s32 a0);
|
||||
extern void (*gIwramTextFunc4)(s32 a0);
|
||||
|
||||
@@ -69,15 +70,15 @@ u32 UpdateFadeInTile(u32 a0);
|
||||
u32 sub_80063B0(void);
|
||||
void SelectCharmap(u32 a0);
|
||||
void SetCharacterMask(int a0);
|
||||
void ShowWindows(const Windows *windows, bool8 a1, bool8 a2);
|
||||
void RestoreUnkTextStruct_8006518(Windows *unkData);
|
||||
void ShowWindows(const WindowTemplates *windows, bool8 a1, bool8 a2);
|
||||
void RestoreUnkTextStruct_8006518(WindowTemplates *unkData);
|
||||
u32 sub_8006544(u32 index);
|
||||
void sub_8007334(s32 a0);
|
||||
void sub_8007334(s32 windowId);
|
||||
void sub_80073B8(s32 a0);
|
||||
void sub_80073E0(s32 a0);
|
||||
u32 xxx_call_draw_char(s32 x, s32 y, u32 a2, u32 color, u32 a4);
|
||||
void sub_80078A4(u32 a0, s32 x, s32 y, s32 a3, u32 color);
|
||||
void sub_800792C(u32 a0, s32 x, s32 y, s32 a3, u32 color);
|
||||
void AddDoubleUnderScoreHighlight(u32 windowId, s32 x, s32 y, s32 width, u32 color);
|
||||
void AddUnderScoreHighlight(u32 windowId, s32 x, s32 y, s32 width, u32 color);
|
||||
void sub_8007A78(u32 a0, s32 x, s32 y, s32 a3, u32 color);
|
||||
void sub_8007B7C(u32 a0, s32 x, s32 y, s32 a3, u32 color);
|
||||
void sub_8007E20(u32 a0, u32 a1, u32 a2, u32 a3, u32 a4, u32 *a5, u32 a6);
|
||||
|
||||
@@ -22,8 +22,8 @@ typedef struct WonderMailStruct_203B2C4
|
||||
unkStruct_203B480 unk1E8;
|
||||
/* 0x218 */ s8 mailIndex;
|
||||
MenuStruct unk21C[4];
|
||||
Windows unk35C;
|
||||
Windows unk3BC;
|
||||
WindowTemplates unk35C;
|
||||
WindowTemplates unk3BC;
|
||||
Item unk41C;
|
||||
/* 0x420 */ struct MonPortraitMsg monPortrait;
|
||||
u32 unk430;
|
||||
|
||||
@@ -47,8 +47,8 @@ struct TradeItemsMenu
|
||||
u32 unk10;
|
||||
unkStructFor8013AA0 unk14;
|
||||
MenuStruct unk44[4];
|
||||
Windows unk184;
|
||||
Windows unk1E4;
|
||||
WindowTemplates unk184;
|
||||
WindowTemplates unk1E4;
|
||||
|
||||
// TODO These might be structs...
|
||||
struct TradeItem unk244;
|
||||
|
||||
@@ -13,8 +13,8 @@ typedef struct WigglytuffShop2Work
|
||||
u32 pokemonStatus[0x10];
|
||||
/* 0x70 */ s32 numPokemoninFriendArea;
|
||||
s32 unk74;
|
||||
Window *unk78;
|
||||
Windows unk7C;
|
||||
WindowTemplate *unk78;
|
||||
WindowTemplates unk7C;
|
||||
u8 unkDC[4];
|
||||
} WigglytuffShop2Work;
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ typedef struct WigglytuffShop3Work
|
||||
MenuStruct unk6C;
|
||||
/* 0xBC */ struct MonPortraitMsg monPortrait;
|
||||
struct MonPortraitMsg *monPortraitPtr;
|
||||
Windows unkD0;
|
||||
WindowTemplates unkD0;
|
||||
u32 unk130;
|
||||
u32 unk134;
|
||||
} WigglytuffShop3Work;
|
||||
|
||||
@@ -22,8 +22,8 @@ typedef struct WonderMailStruct_203B2C0
|
||||
u8 fill16A[0x218 - 0x1B8];
|
||||
/* 0x218 */ u8 mailIndex;
|
||||
MenuStruct unk21C[4];
|
||||
Windows unk35C;
|
||||
Windows unk3BC;
|
||||
WindowTemplates unk35C;
|
||||
WindowTemplates unk3BC;
|
||||
/* 0x41C */ u32 unkfill; // ItemSlot?
|
||||
/* 0x420 */ struct MonPortraitMsg monPortrait;
|
||||
/* 0x430 */ u8 padding3[0x534 - 0x430];
|
||||
|
||||
@@ -19,7 +19,7 @@ struct unkStruct_203B2F0
|
||||
MenuItem unk10C[8];
|
||||
MenuItem unk14C[8];
|
||||
u8 fill18C[0x19C - 0x18C];
|
||||
Windows unk19C;
|
||||
WindowTemplates unk19C;
|
||||
};
|
||||
|
||||
bool8 InitializeJobListMenu(u32);
|
||||
|
||||
@@ -34,7 +34,7 @@ typedef struct unkStruct_203B2F8
|
||||
MenuItem unk118[8];
|
||||
MenuItem unk158[8];
|
||||
u16 unk198[8];
|
||||
Windows unk1A8;
|
||||
WindowTemplates unk1A8;
|
||||
} unkStruct_203B2F8;
|
||||
|
||||
bool8 GetWonderMailAccepted(void);
|
||||
|
||||
Reference in New Issue
Block a user