mirror of
https://gitlab.com/ryandwyer/perfect-dark
synced 2026-06-09 04:29:29 -04:00
Decompile menuOpenDialog and discover data argument for menu handlers
This commit is contained in:
@@ -1086,7 +1086,7 @@
|
||||
#define MENUOP_GETSLIDER 9
|
||||
#define MENUOP_GETSLIDERLABEL 10
|
||||
#define MENUOP_CHECKDISABLED 12
|
||||
#define MENUOP_13 13
|
||||
#define MENUOP_FOCUS 13
|
||||
#define MENUOP_CHECKPREFOCUSED 15
|
||||
#define MENUOP_16 16
|
||||
#define MENUOP_GETTEXT 17
|
||||
|
||||
@@ -32,7 +32,7 @@ u32 func0f0f2928(void);
|
||||
u32 func0f0f29cc(void);
|
||||
u32 func0f0f2b2c(void);
|
||||
u32 func0f0f2c44(void);
|
||||
void func0f0f2cf4(struct menudialog *dialog, struct menuframe *arg1, struct menu *menu);
|
||||
void menuOpenDialog(struct menudialog *dialog, struct menuframe *arg1, struct menu *menu);
|
||||
void menuPushDialog(struct menudialog *dialog);
|
||||
u32 func0f0f3220(s32 arg0);
|
||||
u32 func0f0f33bc(void);
|
||||
|
||||
@@ -58,7 +58,7 @@ u8 mpGetBodyUnk06(u8 bodynum);
|
||||
s32 mpBodyGetMpHeadIndex(s32 bodynum);
|
||||
u32 mpChooseRandomLockPlayer(void);
|
||||
bool mpSetLock(s32 locktype, s32 playernum);
|
||||
u32 mpGetLockType(void);
|
||||
s32 mpGetLockType(void);
|
||||
u32 mpGetLockPlayerNum(void);
|
||||
bool mpIsPlayerLockedOut(u32 playernum);
|
||||
void mpCalculateLockIfLastWinnerOrLoser(void);
|
||||
|
||||
+53
-9
@@ -3245,10 +3245,59 @@ struct hoverprop {
|
||||
u16 size;
|
||||
};
|
||||
|
||||
struct handlerdata_carousel {
|
||||
s32 value;
|
||||
u32 unk04;
|
||||
};
|
||||
|
||||
struct handlerdata_checkbox {
|
||||
u32 value;
|
||||
};
|
||||
|
||||
struct handlerdata_custom {
|
||||
u32 value;
|
||||
u32 unk04;
|
||||
u32 groupstartindex;
|
||||
u32 padding; // just extra padding to make the union 16 bytes
|
||||
};
|
||||
|
||||
struct handlerdata_dropdown {
|
||||
u32 value;
|
||||
};
|
||||
|
||||
struct handlerdata_keyboard {
|
||||
char *string;
|
||||
};
|
||||
|
||||
struct handlerdata_label {
|
||||
u32 colour1;
|
||||
u32 colour2;
|
||||
};
|
||||
|
||||
struct handlerdata_slider {
|
||||
u32 value;
|
||||
char *label;
|
||||
};
|
||||
|
||||
struct handlerdata_dialog1 {
|
||||
u32 value;
|
||||
};
|
||||
|
||||
struct handlerdata_dialog2 {
|
||||
void *ptr;
|
||||
};
|
||||
|
||||
union handlerdata {
|
||||
s32 words[4];
|
||||
s32 word;
|
||||
void *ptrs[4];
|
||||
struct handlerdata_carousel carousel;
|
||||
struct handlerdata_checkbox checkbox;
|
||||
struct handlerdata_custom custom;
|
||||
struct handlerdata_dropdown dropdown;
|
||||
struct handlerdata_keyboard keyboard;
|
||||
struct handlerdata_label label;
|
||||
struct handlerdata_slider slider;
|
||||
|
||||
struct handlerdata_dialog1 dialog1;
|
||||
struct handlerdata_dialog2 dialog2;
|
||||
};
|
||||
|
||||
struct menuitem {
|
||||
@@ -3257,12 +3306,7 @@ struct menuitem {
|
||||
u32 param1;
|
||||
u32 param2;
|
||||
u32 param3;
|
||||
|
||||
union {
|
||||
void *handler;
|
||||
//struct menudialog *dialog;
|
||||
//s32 (*handler)(u32 operation, struct menuitem *item, union handlerdata *data);
|
||||
} ptr;
|
||||
void *handler;
|
||||
};
|
||||
|
||||
struct menudialog {
|
||||
|
||||
Reference in New Issue
Block a user