Discover menuinputs struct
This commit is contained in:
parent
29408301a8
commit
9d708a1c91
|
|
@ -60,31 +60,31 @@ s32 menudialogRetryMission(u32 operation, struct menudialog *dialog, union handl
|
|||
if (dialog == g_Menus[g_MpPlayerNum].curframe->dialog
|
||||
|| (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) {
|
||||
#endif
|
||||
struct menuthing *thing = data->dialog2.ptr;
|
||||
bool pass = false;
|
||||
struct menuinputs *inputs = data->dialog2.inputs;
|
||||
bool accept = false;
|
||||
|
||||
if (thing->back) {
|
||||
if (inputs->back) {
|
||||
menuPopDialog();
|
||||
menuPopDialog();
|
||||
}
|
||||
|
||||
thing->back = false;
|
||||
inputs->back = false;
|
||||
|
||||
if (thing->start) {
|
||||
pass = true;
|
||||
if (inputs->start) {
|
||||
accept = true;
|
||||
}
|
||||
|
||||
thing->start = false;
|
||||
inputs->start = false;
|
||||
|
||||
if (thing->forward
|
||||
if (inputs->select
|
||||
&& g_Menus[g_MpPlayerNum].curframe
|
||||
&& dialog->nextsibling
|
||||
&& dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog) {
|
||||
pass = true;
|
||||
thing->forward = false;
|
||||
accept = true;
|
||||
inputs->select = false;
|
||||
}
|
||||
|
||||
if (pass) {
|
||||
if (accept) {
|
||||
union handlerdata data2;
|
||||
menuhandlerAcceptMission(MENUOP_SET, &dialog->items[1], &data2);
|
||||
}
|
||||
|
|
@ -574,9 +574,9 @@ s32 menudialogSolo2PEndscreenCompleted(u32 operation, struct menudialog *dialog,
|
|||
if (g_Menus[g_MpPlayerNum].curframe) {
|
||||
if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog
|
||||
|| (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) {
|
||||
struct menuthing *thing = data->dialog2.ptr;
|
||||
struct menuinputs *inputs = data->dialog2.inputs;
|
||||
|
||||
if (thing->forward || thing->back || thing->start) {
|
||||
if (inputs->select || inputs->back || inputs->start) {
|
||||
g_Menus[g_MpPlayerNum].data.endscreen.unke1c = 6;
|
||||
}
|
||||
|
||||
|
|
@ -590,7 +590,7 @@ s32 menudialogSolo2PEndscreenCompleted(u32 operation, struct menudialog *dialog,
|
|||
}
|
||||
}
|
||||
|
||||
thing->forward = thing->back = thing->start = 0;
|
||||
inputs->select = inputs->back = inputs->start = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -608,9 +608,9 @@ s32 menudialogSolo2PEndscreenFailed(u32 operation, struct menudialog *dialog, un
|
|||
if (g_Menus[g_MpPlayerNum].curframe) {
|
||||
if (g_Menus[g_MpPlayerNum].curframe->dialog == dialog
|
||||
|| (dialog->nextsibling && dialog->nextsibling == g_Menus[g_MpPlayerNum].curframe->dialog)) {
|
||||
struct menuthing *thing = data->dialog2.ptr;
|
||||
struct menuinputs *inputs = data->dialog2.inputs;
|
||||
|
||||
if (thing->forward || thing->back || thing->start) {
|
||||
if (inputs->select || inputs->back || inputs->start) {
|
||||
g_Menus[g_MpPlayerNum].data.endscreen.unke1c = 6;
|
||||
}
|
||||
|
||||
|
|
@ -632,7 +632,7 @@ s32 menudialogSolo2PEndscreenFailed(u32 operation, struct menudialog *dialog, un
|
|||
}
|
||||
}
|
||||
|
||||
thing->forward = thing->back = thing->start = 0;
|
||||
inputs->select = inputs->back = inputs->start = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2559,34 +2559,34 @@ glabel menuRenderItemDropdown
|
|||
/* f0e8134: 27bd0080 */ addiu $sp,$sp,0x80
|
||||
);
|
||||
|
||||
bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data)
|
||||
bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data)
|
||||
{
|
||||
u32 stack;
|
||||
|
||||
if ((arg3 & 2) && item->handler) {
|
||||
if (frame->unk0c && item == frame->focuseditem) {
|
||||
menuTickItemList(item, arg2, arg3, data);
|
||||
if (frame->dimmed && item == frame->focuseditem) {
|
||||
menuTickItemList(item, inputs, arg3, data);
|
||||
|
||||
if (mpIsPlayerLockedOut(g_MpPlayerNum)) {
|
||||
if ((item->param1 & 0x00040000) || (frame->dialog->unk10 & 0x10)) {
|
||||
frame->unk0c = 0;
|
||||
frame->dimmed = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (arg2->unk03 && frame->unk0c) {
|
||||
frame->unk0c = 0;
|
||||
arg2->unk03 = 0;
|
||||
if (inputs->back && frame->dimmed) {
|
||||
frame->dimmed = false;
|
||||
inputs->back = false;
|
||||
menuPlaySound(MENUSOUND_TOGGLEOFF);
|
||||
}
|
||||
|
||||
if (arg2->unk02) {
|
||||
if (frame->unk0c) {
|
||||
frame->unk0c = 0;
|
||||
if (inputs->select) {
|
||||
if (frame->dimmed) {
|
||||
frame->dimmed = false;
|
||||
} else {
|
||||
union handlerdata handlerdata;
|
||||
|
||||
frame->unk0c = 1;
|
||||
frame->dimmed = true;
|
||||
menuInitItemDropdown(item, data);
|
||||
|
||||
handlerdata.dropdown.value = 0;
|
||||
|
|
@ -4791,7 +4791,7 @@ Gfx *menuRenderItemModel(Gfx *gdl, struct menurenderthing *thing)
|
|||
thing->frame->colourweight);
|
||||
}
|
||||
|
||||
if (thing->frame->unk0c) {
|
||||
if (thing->frame->dimmed) {
|
||||
renderdata.colour = (colourBlend(renderdata.colour, 0, 127) & 0xffffff00) | (renderdata.colour & 0xff);
|
||||
}
|
||||
|
||||
|
|
@ -4856,7 +4856,7 @@ Gfx *menuRenderItemLabel(Gfx *gdl, struct menurenderthing *thing)
|
|||
thing->frame->colourweight);
|
||||
}
|
||||
|
||||
if (thing->frame->unk0c) {
|
||||
if (thing->frame->dimmed) {
|
||||
colour1 = (colourBlend(colour1, 0, 127) & 0xffffff00) | (colour1 & 0xff);
|
||||
}
|
||||
|
||||
|
|
@ -4873,7 +4873,7 @@ Gfx *menuRenderItemLabel(Gfx *gdl, struct menurenderthing *thing)
|
|||
thing->frame->colourweight);
|
||||
}
|
||||
|
||||
if (thing->frame->unk0c) {
|
||||
if (thing->frame->dimmed) {
|
||||
colour1 = (colourBlend(colour1, 0, 127) & 0xffffff00) | (colour1 & 0xff);
|
||||
}
|
||||
|
||||
|
|
@ -4892,7 +4892,7 @@ Gfx *menuRenderItemLabel(Gfx *gdl, struct menurenderthing *thing)
|
|||
thing->frame->colourweight);
|
||||
}
|
||||
|
||||
if (thing->frame->unk0c) {
|
||||
if (thing->frame->dimmed) {
|
||||
colour1 = (colourBlend(colour1, 0, 127) & 0xffffff00) | (colour1 & 0xff);
|
||||
}
|
||||
|
||||
|
|
@ -5020,7 +5020,7 @@ Gfx *menuRenderItemMeter(Gfx *gdl, struct menurenderthing *thing)
|
|||
thing->frame->colourweight);
|
||||
}
|
||||
|
||||
if (thing->frame->unk0c) {
|
||||
if (thing->frame->dimmed) {
|
||||
colour = (colourBlend(colour, 0, 127) & 0xffffff00) | (colour & 0xff);
|
||||
}
|
||||
|
||||
|
|
@ -5476,7 +5476,7 @@ const char var7f1adfb8[] = "";
|
|||
// thing->frame->colourweight);
|
||||
// }
|
||||
//
|
||||
// if (thing->frame->unk0c) {
|
||||
// if (thing->frame->dimmed) {
|
||||
// leftcolour = colourBlend(leftcolour, 0, 127) & 0xffffff00 | leftcolour & 0xff;
|
||||
// }
|
||||
//
|
||||
|
|
@ -5520,7 +5520,7 @@ const char var7f1adfb8[] = "";
|
|||
// thing->frame->colourweight);
|
||||
// }
|
||||
//
|
||||
// if (thing->frame->unk0c) {
|
||||
// if (thing->frame->dimmed) {
|
||||
// leftcolour = colourBlend(leftcolour, 0x00000000, 127) & 0xffffff00 | leftcolour & 0xff;
|
||||
// }
|
||||
//
|
||||
|
|
@ -5569,9 +5569,9 @@ const char var7f1adfb8[] = "";
|
|||
// return func0f153780(gdl);
|
||||
//}
|
||||
|
||||
bool menuTickItemSelectable(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2)
|
||||
bool menuTickItemSelectable(struct menuitem *item, struct menuinputs *inputs, u32 arg2)
|
||||
{
|
||||
if ((arg2 & 2) && arg1->unk02) {
|
||||
if ((arg2 & 2) && inputs->select) {
|
||||
menuPlaySound(MENUSOUND_SELECT);
|
||||
|
||||
if (item->param1 & 0x00000008) {
|
||||
|
|
@ -6260,7 +6260,7 @@ glabel menuRenderItemSlider
|
|||
/* f0ebec4: 27bd00b0 */ addiu $sp,$sp,0xb0
|
||||
);
|
||||
|
||||
bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data)
|
||||
bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data)
|
||||
{
|
||||
s32 index;
|
||||
union handlerdata handlerdata;
|
||||
|
|
@ -6279,11 +6279,11 @@ bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct s
|
|||
}
|
||||
|
||||
if ((item->param1 & 0x00000800) == 0 && !g_Menus[g_MpPlayerNum].unk82c) {
|
||||
index = index + arg2->unk00;
|
||||
index = index + inputs->leftright;
|
||||
} else {
|
||||
f0 = data->slider.unk00 / 1000.0f;
|
||||
f0 = (f0 * 100.0f) / item->param3;
|
||||
f0 = f0 + arg2->unk08 * g_Vars.diffframe60;
|
||||
f0 = f0 + inputs->unk08 * g_Vars.diffframe60;
|
||||
f0 = (item->param3 * f0) / 100.0f;
|
||||
|
||||
tmp = f0;
|
||||
|
|
@ -6293,23 +6293,23 @@ bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct s
|
|||
data->slider.unk00 = f0 * 1000.0f;
|
||||
}
|
||||
|
||||
if (arg2->unk04 < 0) {
|
||||
f14 = arg2->unk04;
|
||||
if (inputs->xaxis < 0) {
|
||||
f14 = inputs->xaxis;
|
||||
f2 = -f14;
|
||||
} else {
|
||||
f14 = arg2->unk04;
|
||||
f14 = inputs->xaxis;
|
||||
f2 = f14;
|
||||
}
|
||||
|
||||
if ((item->param1 & 0x00000800) == 0 && f2 < 40) {
|
||||
if (g_Menus[g_MpPlayerNum].unk82c) {
|
||||
index = index + arg2->unk00;
|
||||
index = index + inputs->leftright;
|
||||
}
|
||||
} else {
|
||||
f0 = data->slider.unk00 / 1000.0f;
|
||||
f0 = (f0 * 100.0f) / item->param3;
|
||||
|
||||
if (arg2->unk04 < 0) {
|
||||
if (inputs->xaxis < 0) {
|
||||
f2 = -f14;
|
||||
} else {
|
||||
f2 = f14;
|
||||
|
|
@ -6319,7 +6319,7 @@ bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct s
|
|||
f2 = (f2 - 20) * 0.0625f;
|
||||
f2 *= g_Vars.diffframe60f;
|
||||
|
||||
if (arg2->unk04 < 0) {
|
||||
if (inputs->xaxis < 0) {
|
||||
f0 -= f2;
|
||||
} else {
|
||||
f0 += f2;
|
||||
|
|
@ -6341,19 +6341,19 @@ bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct s
|
|||
index = item->param3;
|
||||
}
|
||||
|
||||
arg2->unk00 = 0;
|
||||
inputs->leftright = 0;
|
||||
handlerdata.slider.value = index;
|
||||
|
||||
if (item->handler) {
|
||||
item->handler(MENUOP_SET, item, &handlerdata);
|
||||
}
|
||||
|
||||
if (arg2->unk02) {
|
||||
frame->unk0c = false;
|
||||
if (inputs->select) {
|
||||
frame->dimmed = false;
|
||||
}
|
||||
} else {
|
||||
if (arg2->unk02) {
|
||||
frame->unk0c = true;
|
||||
if (inputs->select) {
|
||||
frame->dimmed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6414,7 +6414,7 @@ Gfx *menuRenderItemCarousel(Gfx *gdl, struct menurenderthing *thing)
|
|||
return gdl;
|
||||
}
|
||||
|
||||
bool menuTickItemCarousel(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2)
|
||||
bool menuTickItemCarousel(struct menuitem *item, struct menuinputs *inputs, u32 arg2)
|
||||
{
|
||||
union handlerdata data;
|
||||
s32 index;
|
||||
|
|
@ -6423,7 +6423,7 @@ bool menuTickItemCarousel(struct menuitem *item, struct somemenuitemtickarg *arg
|
|||
u32 stack;
|
||||
|
||||
if (((arg2 & 2) || (item->param1 & 0x04000000)) && item->handler) {
|
||||
if (arg1->unk00) {
|
||||
if (inputs->leftright != 0) {
|
||||
if (mpIsPlayerLockedOut(g_MpPlayerNum) == 0 || (item->param1 & 0x00020000) == 0) {
|
||||
done = false;
|
||||
|
||||
|
|
@ -6435,7 +6435,7 @@ bool menuTickItemCarousel(struct menuitem *item, struct somemenuitemtickarg *arg
|
|||
index = data.carousel.value;
|
||||
|
||||
while (!done) {
|
||||
index = index + arg1->unk00;
|
||||
index = index + inputs->leftright;
|
||||
|
||||
if (index >= numoptions) {
|
||||
index = 0;
|
||||
|
|
@ -6454,7 +6454,7 @@ bool menuTickItemCarousel(struct menuitem *item, struct somemenuitemtickarg *arg
|
|||
}
|
||||
|
||||
data.carousel.value = index;
|
||||
data.carousel.unk04 = arg1->unk06;
|
||||
data.carousel.unk04 = inputs->shoulder;
|
||||
|
||||
item->handler(MENUOP_SET, item, &data);
|
||||
}
|
||||
|
|
@ -6891,7 +6891,7 @@ glabel menuRenderItemCheckbox
|
|||
// thing->frame->colourweight);
|
||||
// }
|
||||
//
|
||||
// if (thing->frame->unk0c) {
|
||||
// if (thing->frame->dimmed) {
|
||||
// maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
// }
|
||||
//
|
||||
|
|
@ -6908,7 +6908,7 @@ glabel menuRenderItemCheckbox
|
|||
// thing->frame->colourweight);
|
||||
// }
|
||||
//
|
||||
// if (thing->frame->unk0c) {
|
||||
// if (thing->frame->dimmed) {
|
||||
// maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
// }
|
||||
//
|
||||
|
|
@ -6953,7 +6953,7 @@ glabel menuRenderItemCheckbox
|
|||
// thing->frame->colourweight);
|
||||
// }
|
||||
//
|
||||
// if (thing->frame->unk0c) {
|
||||
// if (thing->frame->dimmed) {
|
||||
// maincolour = colourBlend(maincolour, 0, 127) & 0xffffff00 | maincolour & 0xff;
|
||||
// }
|
||||
//
|
||||
|
|
@ -6975,11 +6975,11 @@ glabel menuRenderItemCheckbox
|
|||
// return func0f153780(gdl);
|
||||
//}
|
||||
|
||||
bool menuTickItemCheckbox(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2)
|
||||
bool menuTickItemCheckbox(struct menuitem *item, struct menuinputs *inputs, u32 arg2)
|
||||
{
|
||||
union handlerdata data;
|
||||
|
||||
if ((arg2 & 2) && arg1->unk02) {
|
||||
if ((arg2 & 2) && inputs->select) {
|
||||
if (item->handler && item->handler(MENUOP_GET, item, &data) == 1) {
|
||||
data.checkbox.value = 0;
|
||||
menuPlaySound(MENUSOUND_TOGGLEOFF);
|
||||
|
|
@ -7111,7 +7111,7 @@ Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurenderthing *thing)
|
|||
thing->frame->colourweight);
|
||||
}
|
||||
|
||||
if (thing->frame->unk0c) {
|
||||
if (thing->frame->dimmed) {
|
||||
colour = colourBlend(colour, 0, 0x7f) & 0xffffff00 | colour & 0xff;
|
||||
}
|
||||
|
||||
|
|
@ -7143,7 +7143,7 @@ Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurenderthing *thing)
|
|||
return func0f153780(gdl);
|
||||
}
|
||||
|
||||
bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data)
|
||||
bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data)
|
||||
{
|
||||
u32 stack;
|
||||
|
||||
|
|
@ -7191,24 +7191,24 @@ bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, stru
|
|||
f32 floatval;
|
||||
s32 intval = 0;
|
||||
|
||||
if (arg2->unk05 < 0) {
|
||||
floatval = -(f32)arg2->unk05;
|
||||
if (inputs->yaxis < 0) {
|
||||
floatval = -(f32)inputs->yaxis;
|
||||
} else {
|
||||
floatval = arg2->unk05;
|
||||
floatval = inputs->yaxis;
|
||||
}
|
||||
|
||||
if (floatval > 20) {
|
||||
floatval = (floatval - 20) / 5;
|
||||
floatval *= g_Vars.diffframe60f;
|
||||
|
||||
if (arg2->unk05 < 0) {
|
||||
if (inputs->yaxis < 0) {
|
||||
intval = floatval;
|
||||
} else {
|
||||
intval = -(s32)floatval;
|
||||
}
|
||||
}
|
||||
|
||||
intval += arg2->unk09 * 2 * g_Vars.diffframe60;
|
||||
intval += inputs->unk09 * 2 * g_Vars.diffframe60;
|
||||
data->scrollable.unk00 += intval;
|
||||
|
||||
if (data->scrollable.unk00 < -10) {
|
||||
|
|
@ -7616,7 +7616,7 @@ u32 var800711ec = 0x20000000;
|
|||
// }
|
||||
//
|
||||
// // 644
|
||||
// if (thing->frame->unk0c) {
|
||||
// if (thing->frame->dimmed) {
|
||||
// colour = colourBlend(colour, 0, 127) & 0xffffff00 | colour & 0xff;
|
||||
// }
|
||||
//
|
||||
|
|
@ -8553,27 +8553,27 @@ glabel menuRenderItemRanking
|
|||
/* f0ee570: 27bd01b0 */ addiu $sp,$sp,0x1b0
|
||||
);
|
||||
|
||||
bool menuTickItemRanking(struct somemenuitemtickarg *arg0, u32 arg1, union menuitemtickdata *data)
|
||||
bool menuTickItemRanking(struct menuinputs *inputs, u32 arg1, union menuitemtickdata *data)
|
||||
{
|
||||
f32 floatval;
|
||||
s32 intval;
|
||||
|
||||
if (arg1 & 2) {
|
||||
intval = 0;
|
||||
floatval = arg0->unk05 < 0 ? -(f32)arg0->unk05 : arg0->unk05;
|
||||
floatval = inputs->yaxis < 0 ? -(f32)inputs->yaxis : inputs->yaxis;
|
||||
|
||||
if (floatval > 20) {
|
||||
floatval = (floatval - 20) / 5;
|
||||
floatval *= g_Vars.diffframe60f;
|
||||
|
||||
intval = arg0->unk05 < 0 ? (s32)floatval : -(s32)floatval;
|
||||
intval = inputs->yaxis < 0 ? (s32)floatval : -(s32)floatval;
|
||||
}
|
||||
|
||||
intval += arg0->unk09 * 2 * g_Vars.diffframe60;
|
||||
data->ranking.unk00 += intval;
|
||||
intval += inputs->unk09 * 2 * g_Vars.diffframe60;
|
||||
data->ranking.scrolloffset += intval;
|
||||
|
||||
if (data->ranking.unk00 < 0) {
|
||||
data->ranking.unk00 = 0;
|
||||
if (data->ranking.scrolloffset < 0) {
|
||||
data->ranking.scrolloffset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -8582,7 +8582,7 @@ bool menuTickItemRanking(struct somemenuitemtickarg *arg0, u32 arg1, union menui
|
|||
|
||||
void menuInitItemRanking(union menuitemtickdata *data)
|
||||
{
|
||||
data->ranking.unk00 = 0;
|
||||
data->ranking.scrolloffset = 0;
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
|
|
@ -9369,31 +9369,31 @@ glabel menuRenderItemPlayerStats
|
|||
/* f0ef1fc: 27bd00c8 */ addiu $sp,$sp,0xc8
|
||||
);
|
||||
|
||||
bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data)
|
||||
bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data)
|
||||
{
|
||||
f32 floatval;
|
||||
s32 intval;
|
||||
|
||||
if ((arg3 & 2) && frame->unk0c == 0) {
|
||||
if ((arg3 & 2) && !frame->dimmed) {
|
||||
intval = 0;
|
||||
floatval = arg2->unk05 < 0 ? -(f32)arg2->unk05 : arg2->unk05;
|
||||
floatval = inputs->yaxis < 0 ? -(f32)inputs->yaxis : inputs->yaxis;
|
||||
|
||||
if (floatval > 20) {
|
||||
floatval = (floatval - 20) / 5;
|
||||
floatval *= g_Vars.diffframe60f;
|
||||
|
||||
intval = arg2->unk05 < 0 ? (s32)floatval : -(s32)floatval;
|
||||
intval = inputs->yaxis < 0 ? (s32)floatval : -(s32)floatval;
|
||||
}
|
||||
|
||||
intval += arg2->unk09 * 2 * g_Vars.diffframe60;
|
||||
data->dropdown.unk0c += intval;
|
||||
intval += inputs->unk09 * 2 * g_Vars.diffframe60;
|
||||
data->dropdown.scrolloffset += intval;
|
||||
|
||||
if (data->dropdown.unk0c < 0) {
|
||||
data->dropdown.unk0c = 0;
|
||||
if (data->dropdown.scrolloffset < 0) {
|
||||
data->dropdown.scrolloffset = 0;
|
||||
}
|
||||
}
|
||||
|
||||
menuTickItemDropdown(item, frame, arg2, arg3, data);
|
||||
menuTickItemDropdown(item, frame, inputs, arg3, data);
|
||||
}
|
||||
|
||||
GLOBAL_ASM(
|
||||
|
|
@ -9427,7 +9427,7 @@ glabel func0f0ef2fc
|
|||
|
||||
void menuInitItemPlayerStats(struct menuitem *item, union menuitemtickdata *data)
|
||||
{
|
||||
data->dropdown.unk0c = 0;
|
||||
data->dropdown.scrolloffset = 0;
|
||||
var8009deb0[g_MpPlayerNum] = g_MpPlayerNum;
|
||||
|
||||
menuInitItemDropdown(item, data);
|
||||
|
|
@ -10119,7 +10119,7 @@ Gfx *menuRenderItemController(Gfx *gdl, struct menurenderthing *thing)
|
|||
frame->colourweight);
|
||||
}
|
||||
|
||||
if (frame->unk0c) {
|
||||
if (frame->dimmed) {
|
||||
colour = colourBlend(colour, 0, 44) & 0xffffff00 | colour & 0xff;
|
||||
}
|
||||
|
||||
|
|
@ -10209,20 +10209,20 @@ Gfx *menuRenderItem(Gfx *gdl, struct menurenderthing *thing)
|
|||
/**
|
||||
* Return true if default up/down/left/right/back behaviour should be used.
|
||||
*/
|
||||
bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data)
|
||||
bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data)
|
||||
{
|
||||
switch (item->type) {
|
||||
case MENUITEMTYPE_LIST: return menuTickItemList(item, arg2, arg3, data);
|
||||
case MENUITEMTYPE_SELECTABLE: return menuTickItemSelectable(item, arg2, arg3);
|
||||
case MENUITEMTYPE_SLIDER: return menuTickItemSlider(item, frame, arg2, arg3, data);
|
||||
case MENUITEMTYPE_CHECKBOX: return menuTickItemCheckbox(item, arg2, arg3);
|
||||
case MENUITEMTYPE_SCROLLABLE: return menuTickItemScrollable(item, frame, arg2, arg3, data);
|
||||
case MENUITEMTYPE_LIST: return menuTickItemList(item, inputs, arg3, data);
|
||||
case MENUITEMTYPE_SELECTABLE: return menuTickItemSelectable(item, inputs, arg3);
|
||||
case MENUITEMTYPE_SLIDER: return menuTickItemSlider(item, frame, inputs, arg3, data);
|
||||
case MENUITEMTYPE_CHECKBOX: return menuTickItemCheckbox(item, inputs, arg3);
|
||||
case MENUITEMTYPE_SCROLLABLE: return menuTickItemScrollable(item, frame, inputs, arg3, data);
|
||||
case MENUITEMTYPE_MARQUEE: return menuTickItemMarquee(item, data);
|
||||
case MENUITEMTYPE_RANKING: return menuTickItemRanking(arg2, arg3, data);
|
||||
case MENUITEMTYPE_DROPDOWN: return menuTickItemDropdown(item, frame, arg2, arg3, data);
|
||||
case MENUITEMTYPE_KEYBOARD: return menuTickItemKeyboard(item, arg2, arg3, data);
|
||||
case MENUITEMTYPE_CAROUSEL: return menuTickItemCarousel(item, arg2, arg3);
|
||||
case MENUITEMTYPE_PLAYERSTATS: return menuTickItemPlayerStats(item, frame, arg2, arg3, data);
|
||||
case MENUITEMTYPE_RANKING: return menuTickItemRanking(inputs, arg3, data);
|
||||
case MENUITEMTYPE_DROPDOWN: return menuTickItemDropdown(item, frame, inputs, arg3, data);
|
||||
case MENUITEMTYPE_KEYBOARD: return menuTickItemKeyboard(item, inputs, arg3, data);
|
||||
case MENUITEMTYPE_CAROUSEL: return menuTickItemCarousel(item, inputs, arg3);
|
||||
case MENUITEMTYPE_PLAYERSTATS: return menuTickItemPlayerStats(item, frame, inputs, arg3, data);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -2492,7 +2492,7 @@ void menuOpenDialog(struct menudialog *dialog, struct menuframe *frame, struct m
|
|||
frame->focuseditem->handler(MENUOP_FOCUS, frame->focuseditem, &data2);
|
||||
}
|
||||
|
||||
frame->unk0c = 0;
|
||||
frame->dimmed = false;
|
||||
frame->unk64 = 0;
|
||||
frame->unk68 = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -616,13 +616,13 @@ s32 menudialogBriefing(u32 operation, struct menudialog *dialog, union handlerda
|
|||
if (operation == MENUOP_TICK) {
|
||||
if (g_Menus[g_MpPlayerNum].curframe
|
||||
&& g_Menus[g_MpPlayerNum].curframe->dialog == dialog) {
|
||||
struct menuthing *thing = data->dialog2.ptr;
|
||||
struct menuinputs *inputs = data->dialog2.inputs;
|
||||
|
||||
if (thing->start) {
|
||||
if (inputs->start) {
|
||||
menuhandlerAcceptMission(MENUOP_SET, NULL, data);
|
||||
}
|
||||
|
||||
thing->start = 0;
|
||||
inputs->start = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1265,13 +1265,13 @@ s32 menudialogCoopAntiOptions(u32 operation, struct menudialog *dialog, union ha
|
|||
if (operation == MENUOP_TICK) {
|
||||
if (g_Menus[g_MpPlayerNum].curframe &&
|
||||
g_Menus[g_MpPlayerNum].curframe->dialog == dialog) {
|
||||
struct menuthing *thing = data->dialog2.ptr;
|
||||
struct menuinputs *inputs = data->dialog2.inputs;
|
||||
|
||||
if (thing->start) {
|
||||
if (inputs->start) {
|
||||
menuhandlerBuddyOptionsContinue(MENUOP_SET, NULL, NULL);
|
||||
}
|
||||
|
||||
thing->start = 0;
|
||||
inputs->start = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,16 +8,16 @@ s32 func0f0e5ef8(s16 arg0, struct menuitem *item);
|
|||
u32 func0f0e6038(void);
|
||||
Gfx *func0f0e6298(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2);
|
||||
Gfx *menuRenderItemList(Gfx *gdl);
|
||||
bool menuTickItemList(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2, union menuitemtickdata *data);
|
||||
bool menuTickItemList(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemtickdata *data);
|
||||
|
||||
void menuInitItemDropdown(struct menuitem *item, union menuitemtickdata *data);
|
||||
Gfx *menuRenderItemDropdown(Gfx *gdl);
|
||||
bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
|
||||
bool menuTickItemDropdown(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data);
|
||||
|
||||
Gfx *func0f0e8290(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, u32 arg6, u32 arg7);
|
||||
u32 func0f0e855c(void);
|
||||
Gfx *menuRenderItemKeyboard(Gfx *gdl);
|
||||
bool menuTickItemKeyboard(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2, union menuitemtickdata *data);
|
||||
bool menuTickItemKeyboard(struct menuitem *item, struct menuinputs *inputs, u32 arg2, union menuitemtickdata *data);
|
||||
void menuInitItemKeyboard(struct menuitem *item, union menuitemtickdata *data);
|
||||
|
||||
Gfx *menuRenderItemSeparator(Gfx *gdl, struct menurenderthing *thing);
|
||||
|
|
@ -32,21 +32,21 @@ Gfx *menuRenderItemLabel(Gfx *gdl, struct menurenderthing *thing);
|
|||
Gfx *menuRenderItemMeter(Gfx *gdl, struct menurenderthing *thing);
|
||||
|
||||
Gfx *menuRenderItemSelectable(Gfx *gdl, struct menurenderthing *thing);
|
||||
bool menuTickItemSelectable(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2);
|
||||
bool menuTickItemSelectable(struct menuitem *item, struct menuinputs *inputs, u32 arg2);
|
||||
|
||||
Gfx *menuRenderItemSlider(Gfx *gdl);
|
||||
bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
|
||||
bool menuTickItemSlider(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data);
|
||||
void menuInitItemSlider(union menuitemtickdata *data);
|
||||
|
||||
Gfx *menuRenderItemCarousel(Gfx *gdl, struct menurenderthing *thing);
|
||||
bool menuTickItemCarousel(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2);
|
||||
bool menuTickItemCarousel(struct menuitem *item, struct menuinputs *inputs, u32 arg2);
|
||||
|
||||
Gfx *menuRenderItemCheckbox(Gfx *gdl, struct menurenderthing *thing);
|
||||
bool menuTickItemCheckbox(struct menuitem *item, struct somemenuitemtickarg *arg1, u32 arg2);
|
||||
bool menuTickItemCheckbox(struct menuitem *item, struct menuinputs *inputs, u32 arg2);
|
||||
|
||||
char *menuItemScrollableGetText(u32 type);
|
||||
Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurenderthing *thing);
|
||||
bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
|
||||
bool menuTickItemScrollable(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data);
|
||||
void menuInitItemScrollable(union menuitemtickdata *data);
|
||||
|
||||
Gfx *menuRenderItemMarquee(Gfx *gdl, struct menurenderthing *thing);
|
||||
|
|
@ -56,11 +56,11 @@ void menuInitItemMarquee(union menuitemtickdata *data);
|
|||
Gfx *menuRenderItem07(Gfx *gdl);
|
||||
|
||||
Gfx *menuRenderItemRanking(Gfx *gdl);
|
||||
bool menuTickItemRanking(struct somemenuitemtickarg *arg0, u32 arg1, union menuitemtickdata *data);
|
||||
bool menuTickItemRanking(struct menuinputs *inputs, u32 arg1, union menuitemtickdata *data);
|
||||
void menuInitItemRanking(union menuitemtickdata *data);
|
||||
|
||||
Gfx *menuRenderItemPlayerStats(Gfx *gdl);
|
||||
bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
|
||||
bool menuTickItemPlayerStats(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data);
|
||||
Gfx *func0f0ef2fc(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, u32 arg6, u32 arg7);
|
||||
void menuInitItemPlayerStats(struct menuitem *item, union menuitemtickdata *data);
|
||||
|
||||
|
|
@ -74,7 +74,7 @@ Gfx *menuRenderItemController(Gfx *gdl, struct menurenderthing *thing);
|
|||
void menuInitItemController(union menuitemtickdata *data);
|
||||
|
||||
Gfx *menuRenderItem(Gfx *gdl, struct menurenderthing *thing);
|
||||
bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct somemenuitemtickarg *arg2, u32 arg3, union menuitemtickdata *data);
|
||||
bool menuTickItem(struct menuitem *item, struct menuframe *frame, struct menuinputs *inputs, u32 arg3, union menuitemtickdata *data);
|
||||
void menuInitItem(struct menuitem *item, union menuitemtickdata *data);
|
||||
Gfx *func0f0f0918(Gfx *gdl, s16 x, s16 y, s16 x2, s16 y2, struct menuitem *item, u32 arg6, u32 arg7);
|
||||
|
||||
|
|
|
|||
|
|
@ -3265,7 +3265,7 @@ struct menuitemtickdata_dropdown {
|
|||
u16 unk06;
|
||||
u16 unk08;
|
||||
u16 unk0a;
|
||||
s16 unk0c;
|
||||
s16 scrolloffset;
|
||||
u16 unk0e;
|
||||
};
|
||||
|
||||
|
|
@ -3285,7 +3285,7 @@ struct menuitemtickdata_marquee {
|
|||
};
|
||||
|
||||
struct menuitemtickdata_ranking {
|
||||
s16 unk00;
|
||||
s16 scrolloffset;
|
||||
};
|
||||
|
||||
struct menuitemtickdata_scrollable {
|
||||
|
|
@ -3363,7 +3363,7 @@ struct handlerdata_dialog1 {
|
|||
};
|
||||
|
||||
struct handlerdata_dialog2 {
|
||||
struct menuthing *ptr;
|
||||
struct menuinputs *inputs;
|
||||
};
|
||||
|
||||
union handlerdata {
|
||||
|
|
@ -3595,7 +3595,7 @@ struct menuframe {
|
|||
u8 unk05;
|
||||
u16 unk06;
|
||||
struct menuitem *focuseditem;
|
||||
/*0x0c*/ bool unk0c;
|
||||
/*0x0c*/ bool dimmed; // when dropdown is open or slider is active
|
||||
/*0x10*/ u32 unk10;
|
||||
/*0x14*/ s32 unk14;
|
||||
/*0x18*/ u32 unk18;
|
||||
|
|
@ -6099,16 +6099,18 @@ struct var800a4cf0 {
|
|||
struct var800a4d00 unk10[250];
|
||||
};
|
||||
|
||||
// Suspected to be a representation of controller inputs
|
||||
struct menuthing {
|
||||
u8 unk00;
|
||||
u8 unk01;
|
||||
u8 forward;
|
||||
u8 back;
|
||||
u32 unk04;
|
||||
u8 unk08;
|
||||
u8 unk09;
|
||||
s8 start;
|
||||
struct menuinputs {
|
||||
/*0x00*/ s8 leftright; // Both control stick and C/D buttons - set on initial press and key repeat
|
||||
/*0x01*/ u8 unk01;
|
||||
/*0x02*/ u8 select; // A button
|
||||
/*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 unk07;
|
||||
/*0x08*/ s8 unk08;
|
||||
/*0x09*/ s8 unk09;
|
||||
/*0x0a*/ s8 start;
|
||||
};
|
||||
|
||||
struct mpconfigsim {
|
||||
|
|
@ -6915,17 +6917,4 @@ struct var800a45d0 {
|
|||
/*0x5c*/ u32 colour2;
|
||||
};
|
||||
|
||||
struct somemenuitemtickarg {
|
||||
/*0x00*/ s8 unk00;
|
||||
/*0x01*/ u8 unk01;
|
||||
/*0x02*/ u8 unk02;
|
||||
/*0x03*/ u8 unk03;
|
||||
/*0x04*/ s8 unk04;
|
||||
/*0x05*/ s8 unk05;
|
||||
/*0x06*/ u8 unk06;
|
||||
/*0x07*/ u8 unk07;
|
||||
/*0x08*/ s8 unk08;
|
||||
/*0x09*/ s8 unk09;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Reference in New Issue