diff options
| author | engineer124 <engineer124engineer124@gmail.com> | 2022-04-17 14:36:31 +1000 |
|---|---|---|
| committer | engineer124 <engineer124engineer124@gmail.com> | 2022-04-17 14:36:31 +1000 |
| commit | ea6746ff5e14b780fd071da237f7c0256eabd38b (patch) | |
| tree | 0d6f00cbf4586eee863d41da8411da2e85d32c84 /src/code | |
| parent | a9103d926b3f1199cf28b8c8bb15c683e912efbc (diff) | |
Improvement on func_80111CB4
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/graph.c | 2 | ||||
| -rw-r--r-- | src/code/z_parameter.c | 18 |
2 files changed, 11 insertions, 9 deletions
diff --git a/src/code/graph.c b/src/code/graph.c index 8059d1f63..ca18a9049 100644 --- a/src/code/graph.c +++ b/src/code/graph.c @@ -349,7 +349,7 @@ void Graph_ThreadEntry(void* arg) { gGfxSPTaskOutputBufferEnd2 = (u8*)gGfxSPTaskOutputBuffer2 + sizeof(*gGfxSPTaskOutputBuffer2); func_80178978(); - Fault_SetFB(D_801FBB90, SCREEN_WIDTH, SCREEN_HEIGHT); + Fault_SetFB((void*)D_801FBB90, SCREEN_WIDTH, SCREEN_HEIGHT); Graph_Init(&gfxCtx); while (nextOvl) { diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index e98072782..08c2a9628 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -1990,11 +1990,12 @@ void func_80110038(GlobalContext* globalCtx) { } } +// a0/a1 swap. Likely related to globalCtx->unk_18E5C #ifdef NON_MATCHING void func_80111CB4(GlobalContext* globalCtx) { InterfaceContext* interfaceCtx = &globalCtx->interfaceCtx; Player* player = GET_PLAYER(globalCtx); - void* phi_a1; + s32 pad; s32 sp28; sp28 = false; @@ -2049,6 +2050,7 @@ void func_80111CB4(GlobalContext* globalCtx) { gSaveContext.buttonStatus[3] = BTN_DISABLED; } else { BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) = ITEM_BOW; + if (globalCtx->unk_1887C >= 2) { Interface_LoadItemIconImpl(globalCtx, 0); } else if (gSaveContext.save.inventory.items[SLOT_BOW] == ITEM_NONE) { @@ -2056,6 +2058,7 @@ void func_80111CB4(GlobalContext* globalCtx) { } else { Interface_LoadItemIconImpl(globalCtx, 0); } + gSaveContext.buttonStatus[1] = BTN_DISABLED; gSaveContext.buttonStatus[2] = BTN_DISABLED; gSaveContext.buttonStatus[3] = BTN_DISABLED; @@ -2142,8 +2145,8 @@ void func_80111CB4(GlobalContext* globalCtx) { } else if (D_801BF884 != 0) { if (D_801BF884 == 1) { if (!(globalCtx->actorCtx.unk5 & 4)) { - func_801663C4((u8*)((globalCtx->unk_18E5C != NULL) ? globalCtx->unk_18E5C : D_801FBB90), - gSaveContext.pictoPhoto, 0x4600); + func_801663C4((globalCtx->unk_18E5C != NULL) ? globalCtx->unk_18E5C : D_801FBB90, + (u8*)gSaveContext.pictoPhoto, 0x4600); interfaceCtx->unk_224 = 0; interfaceCtx->unk_222 = interfaceCtx->unk_224; sp28 = true; @@ -2182,8 +2185,8 @@ void func_80111CB4(GlobalContext* globalCtx) { Interface_ChangeAlpha(50); D_801BF884 = 0; if (D_801BF888) { - func_801663C4((u8*)((globalCtx->unk_18E5C != NULL) ? globalCtx->unk_18E5C : D_801FBB90), - gSaveContext.pictoPhoto, 0x4600); + func_801663C4((globalCtx->unk_18E5C != NULL) ? globalCtx->unk_18E5C : D_801FBB90, + (u8*)gSaveContext.pictoPhoto, 0x4600); func_8013A240(globalCtx); } globalCtx->actorCtx.unk5 &= ~0x4; @@ -2209,8 +2212,7 @@ void func_80111CB4(GlobalContext* globalCtx) { Interface_ChangeAlpha(21); D_801BF884 = 1; } else { - phi_a1 = (globalCtx->unk_18E5C != NULL) ? globalCtx->unk_18E5C : D_801FBB90; - func_80166644(gSaveContext.pictoPhoto, phi_a1, 0x4600); + func_80166644((u8*)gSaveContext.pictoPhoto, ((void)0, (globalCtx->unk_18E5C != NULL) ? globalCtx->unk_18E5C : D_801FBB90), 0x4600); globalCtx->unk_18845 = 1; D_801BF884 = 2; } @@ -5728,7 +5730,7 @@ void Interface_Draw(GlobalContext* globalCtx) { if (D_801BF884 >= 2) { if ((globalCtx->actorCtx.unk5 & 4) == 0) { func_801663C4((u8*)((globalCtx->unk_18E5C != NULL) ? globalCtx->unk_18E5C : D_801FBB90), - gSaveContext.pictoPhoto, 0x4600); + (u8*)gSaveContext.pictoPhoto, 0x4600); interfaceCtx->unk_224 = 0; interfaceCtx->unk_222 = interfaceCtx->unk_224; |
