Decompile menuIsScrollableUnscrollable
This commit is contained in:
parent
1d412405f8
commit
a5e5e39180
|
|
@ -7689,7 +7689,7 @@ Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurenderthing *thing)
|
|||
|
||||
rawtext = menuItemScrollableGetText(thing->item->param);
|
||||
|
||||
if (func0f0f2534(thing->item)) {
|
||||
if (menuIsScrollableUnscrollable(thing->item)) {
|
||||
paddingright = 10;
|
||||
}
|
||||
|
||||
|
|
@ -7770,7 +7770,7 @@ Gfx *menuRenderItemScrollable(Gfx *gdl, struct menurenderthing *thing)
|
|||
0xff4444ff, thing->width - 4, thing->height - 4, -*unk14, 0);
|
||||
|
||||
// Body text
|
||||
x = func0f0f2534(thing->item) ? thing->x + 5 : thing->x + 12;
|
||||
x = menuIsScrollableUnscrollable(thing->item) ? thing->x + 5 : thing->x + 12;
|
||||
y = thing->y + 2;
|
||||
|
||||
gdl = textRenderWhite(gdl, &x, &y, bodytext, var8007fb10, var8007fb0c,
|
||||
|
|
@ -9846,7 +9846,7 @@ glabel func0f0ed264
|
|||
/* f0ed33c: 851904fc */ lh $t9,0x4fc($t0)
|
||||
/* f0ed340: 8fa41f98 */ lw $a0,0x1f98($sp)
|
||||
/* f0ed344: a7a5003e */ sh $a1,0x3e($sp)
|
||||
/* f0ed348: 0fc3c94d */ jal func0f0f2534
|
||||
/* f0ed348: 0fc3c94d */ jal menuIsScrollableUnscrollable
|
||||
/* f0ed34c: a7b9003c */ sh $t9,0x3c($sp)
|
||||
/* f0ed350: 10400004 */ beqz $v0,.L0f0ed364
|
||||
/* f0ed354: 87a5003e */ lh $a1,0x3e($sp)
|
||||
|
|
@ -9897,7 +9897,7 @@ glabel func0f0ed264
|
|||
/* f0ed3f8: 8d8d0020 */ lw $t5,0x20($t4)
|
||||
/* f0ed3fc: a60d0006 */ sh $t5,0x6($s0)
|
||||
.L0f0ed400:
|
||||
/* f0ed400: 0fc3c94d */ jal func0f0f2534
|
||||
/* f0ed400: 0fc3c94d */ jal menuIsScrollableUnscrollable
|
||||
/* f0ed404: 8fa41f98 */ lw $a0,0x1f98($sp)
|
||||
/* f0ed408: 10400003 */ beqz $v0,.L0f0ed418
|
||||
/* f0ed40c: 8faf1fa4 */ lw $t7,0x1fa4($sp)
|
||||
|
|
|
|||
|
|
@ -1996,32 +1996,24 @@ glabel func0f0f2354
|
|||
/* f0f2530: 27bd0010 */ addiu $sp,$sp,0x10
|
||||
);
|
||||
|
||||
GLOBAL_ASM(
|
||||
glabel func0f0f2534
|
||||
/* f0f2534: 908e0000 */ lbu $t6,0x0($a0)
|
||||
/* f0f2538: 24030005 */ addiu $v1,$zero,0x5
|
||||
/* f0f253c: 546e0010 */ bnel $v1,$t6,.L0f0f2580
|
||||
/* f0f2540: 00001025 */ or $v0,$zero,$zero
|
||||
/* f0f2544: 90820001 */ lbu $v0,0x1($a0)
|
||||
/* f0f2548: 24010001 */ addiu $at,$zero,0x1
|
||||
/* f0f254c: 10410009 */ beq $v0,$at,.L0f0f2574
|
||||
/* f0f2550: 24010002 */ addiu $at,$zero,0x2
|
||||
/* f0f2554: 10410007 */ beq $v0,$at,.L0f0f2574
|
||||
/* f0f2558: 00000000 */ nop
|
||||
/* f0f255c: 10620005 */ beq $v1,$v0,.L0f0f2574
|
||||
/* f0f2560: 24010006 */ addiu $at,$zero,0x6
|
||||
/* f0f2564: 10410003 */ beq $v0,$at,.L0f0f2574
|
||||
/* f0f2568: 24010008 */ addiu $at,$zero,0x8
|
||||
/* f0f256c: 54410004 */ bnel $v0,$at,.L0f0f2580
|
||||
/* f0f2570: 00001025 */ or $v0,$zero,$zero
|
||||
.L0f0f2574:
|
||||
/* f0f2574: 03e00008 */ jr $ra
|
||||
/* f0f2578: 24020001 */ addiu $v0,$zero,0x1
|
||||
/* f0f257c: 00001025 */ or $v0,$zero,$zero
|
||||
.L0f0f2580:
|
||||
/* f0f2580: 03e00008 */ jr $ra
|
||||
/* f0f2584: 00000000 */ nop
|
||||
);
|
||||
/**
|
||||
* If this returns true, the scrollable is rendered with less padding and
|
||||
* scrolling is disabled.
|
||||
*/
|
||||
bool menuIsScrollableUnscrollable(struct menuitem *item)
|
||||
{
|
||||
if (item->type == MENUITEMTYPE_SCROLLABLE) {
|
||||
if (item->param == DESCRIPTION_MPCONFIG
|
||||
|| item->param == DESCRIPTION_MPCHALLENGE
|
||||
|| item->param == DESCRIPTION_DEVICETRAINING
|
||||
|| item->param == DESCRIPTION_FRWEAPON
|
||||
|| item->param == DESCRIPTION_HOLOTRAINING) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool menuIsItemDisabled(struct menuitem *item, struct menurenderthing10 *thing10)
|
||||
{
|
||||
|
|
@ -2038,7 +2030,7 @@ bool menuIsItemDisabled(struct menuitem *item, struct menurenderthing10 *thing10
|
|||
return true;
|
||||
}
|
||||
|
||||
if (func0f0f2534(item)) {
|
||||
if (menuIsScrollableUnscrollable(item)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ void func0f0f1d6c(struct menudialog *dialog, struct menuframe *frame, struct men
|
|||
u32 func0f0f1ef4(void);
|
||||
void func0f0f2134(struct menudialog *dialog, struct menuframe *frame, struct menu *menu);
|
||||
void func0f0f2354(struct menurenderthing10 *thing10, struct menuitem *item, u32 *arg2, u32 *arg3);
|
||||
bool func0f0f2534(struct menuitem *item);
|
||||
bool menuIsScrollableUnscrollable(struct menuitem *item);
|
||||
bool menuIsItemDisabled(struct menuitem *item, struct menurenderthing10 *thing10);
|
||||
bool func0f0f2674(struct menuitem *item, struct menurenderthing10 *thing10, u32 arg2);
|
||||
u32 func0f0f26fc(void);
|
||||
|
|
|
|||
Loading…
Reference in New Issue