Attempt to decompile menuProcessInput

This commit is contained in:
Ryan Dwyer
2022-01-27 18:05:11 +10:00
parent 8cacff28e1
commit 0bc007f2e8
11 changed files with 655 additions and 94 deletions
+16
View File
@@ -1445,6 +1445,18 @@
#define MENUBG_8 8
#define MENUBG_TUNNELOPAQUE 9 // 4MB combat simulator
#define MENUDIALOGFLAG_0001 0x0001
#define MENUDIALOGFLAG_0002 0x0002
#define MENUDIALOGFLAG_0004 0x0004
#define MENUDIALOGFLAG_0008 0x0008
#define MENUDIALOGFLAG_0010 0x0010
#define MENUDIALOGFLAG_0020 0x0020
#define MENUDIALOGFLAG_0040 0x0040
#define MENUDIALOGFLAG_0080 0x0080
#define MENUDIALOGFLAG_0200 0x0200
#define MENUDIALOGFLAG_0400 0x0400
#define MENUDIALOGFLAG_0800 0x0800
#define MENUDIALOGTYPE_DEFAULT 1
#define MENUDIALOGTYPE_DANGER 2
#define MENUDIALOGTYPE_SUCCESS 3
@@ -1524,6 +1536,10 @@
#define MENUOP_CLOSE 101
#define MENUOP_TICK 102
#define MENUREPEATMODE_RELEASED -1
#define MENUREPEATMODE_SLOW 0
#define MENUREPEATMODE_FAST 1
#define MENUROOT_ENDSCREEN 1
#define MENUROOT_MAINMENU 2
#define MENUROOT_MPSETUP 3
+3 -3
View File
@@ -62,7 +62,7 @@ Gfx *menuRenderHudPiece(Gfx *gdl, u8 *arg1, u32 arg2);
u32 func0f0f5004(void);
Gfx *menuApplyScissor(Gfx *gdl);
Gfx *dialogRender(Gfx *gdl, struct menudialog *dialog, struct menu *menu, s32 arg3);
u32 func0f0f74a8(void);
void func0f0f74a8(s8 *contpadnum1, s8 *contpadnum2);
void func0f0f7594(s32 arg0, s32 *vdir, s32 *hdir);
void menuFindAvailableSize(s32 *xmin, s32 *ymin, s32 *xmax, s32 *ymax);
void dialogCalculatePosition(struct menudialog *dialog);
@@ -78,10 +78,10 @@ Gfx *menuRenderDialogs(Gfx *gdl);
void func0f0f8bb4(u8 *arg0, u32 arg1, u32 arg2);
void menuInit(void);
u32 func0f0f9030(void);
u32 func0f0f935c(void);
void dialogProcessInput(struct menudialog *dialog, struct menuinputs *inputs, bool iscurrent);
void dialogInitItems(struct menudialog *dialog);
void func0f0fa6ac(void);
void menuDialogTick(void);
void menuProcessInput(void);
Gfx *menuRenderBackgroundLayer1(Gfx *gdl, u8 bg, f32 frac);
Gfx *menuRenderBackgroundLayer2(Gfx *gdl, u8 bg, f32 frac);
Gfx *menuRender(Gfx *gdl);
+23 -18
View File
@@ -3565,7 +3565,7 @@ struct menudialogdef {
u32 title;
struct menuitem *items;
s32 (*handler)(s32 operation, struct menudialogdef *dialogdef, union handlerdata *data);
u32 unk10;
u32 flags;
struct menudialogdef *nextsibling;
};
@@ -3954,15 +3954,17 @@ struct menu {
/*0x6dc*/ u32 blocks[80]; // for menuitemdata
/*0x81c*/ s32 blockend;
/*0x820*/ u8 unk820;
/*0x824*/ u32 unk824;
/*0x828*/ u32 unk828;
/*0x82c*/ s16 unk82c;
/*0x830*/ u32 unk830;
/*0x834*/ u32 unk834;
/*0x838*/ u16 unk838;
/*0x824*/ s32 xrepeattimer60;
/*0x828*/ s16 xrepeatcount;
/*0x82a*/ s16 xrepeatdir;
/*0x82c*/ s16 xrepeatmode;
/*0x830*/ s32 yrepeattimer60;
/*0x834*/ s16 yrepeatcount;
/*0x836*/ s16 yrepeatdir;
/*0x838*/ s16 yrepeatmode;
/*0x83a*/ u8 unk83a;
/*0x83b*/ u8 playernum;
/*0x83c*/ u8 unk83c;
/*0x83c*/ u8 openinhibit;
/*0x83d*/ u8 unk83d;
/*0x83e*/ u8 unk83e;
/*0x83f*/ u8 unk83f;
@@ -5693,17 +5695,20 @@ struct var800a4cf0 {
};
struct menuinputs {
/*0x00*/ s8 leftright; // Both control stick and C/D buttons - set on initial press and key repeat
/*0x01*/ s8 updown; // As above
/*0x02*/ u8 select; // A/Z buttons
/*0x03*/ u8 back; // B button
/*0x04*/ s8 xaxis; // Control stick's current left/right position
/*0x05*/ s8 yaxis; // Control stick's current up/down position
/*0x06*/ u8 shoulder; // L or R buttons
/*0x07*/ u8 back2; // Used in keyboard
/*0x08*/ s8 unk08;
/*0x09*/ s8 unk09;
/*0x00*/ s8 leftright; // Both control stick and C/D buttons - set on initial press and on key repeat intervals
/*0x01*/ s8 updown; // As above
/*0x02*/ u8 select; // A/Z buttons
/*0x03*/ u8 back; // B button
/*0x04*/ s8 xaxis; // Control stick's current left/right position
/*0x05*/ s8 yaxis; // Control stick's current up/down position
/*0x06*/ u8 shoulder; // L or R buttons
/*0x07*/ u8 back2; // Used in keyboard
/*0x08*/ s8 leftrightheld; // Same as leftright, but is also set between repeat intervals
/*0x09*/ s8 updownheld; // As above
/*0x0a*/ s8 start;
/*0x0c*/ s32 unk0c;
/*0x10*/ s32 unk10;
/*0x14*/ u8 unk14;
};
struct mpconfigsim {