diff --git a/include/functions.h b/include/functions.h index a0274cff9..d1ebbdb33 100644 --- a/include/functions.h +++ b/include/functions.h @@ -1807,7 +1807,7 @@ s32 func_8010A0A4(GlobalContext* globalCtx); // void func_8010A2AC(void); void func_8010A2DC(GlobalContext* globalCtx); void func_8010A33C(GlobalContext* globalCtx, s16 param_2); -// void func_8010A410(void); +void func_8010A410(void); void func_8010A430(GlobalContext* globalCtx); void func_8010A54C(GlobalContext* globalCtx); // void Map_Update(void); @@ -2911,7 +2911,7 @@ u32 Padmgr_GetControllerBitmask(void); // void func_80174F24(void); // void func_80174F44(void); void func_80174F7C(void (*arg0)(void*), void* arg1); -void func_80174F9C(void (*arg0)(void*), void* arg1); +void func_80174F9C(void (*arg0)(s32), void* arg1); // OSMesgQueue* Padmgr_GetEventCallback(void); // void func_80175008(void); void Padmgr_SetEventCallback(OSMesg pvParm1); diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index aab7c74d0..5dbb9cc40 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -12,30 +12,6 @@ extern Gfx D_0E0002E0[]; // Display List extern u8 D_801ABAB0[]; extern u8 D_801E3BB0[]; -/** - * Steps `var` towards `target` linearly, so that it will arrive in `timeRemaining` seconds. Can be used from either - * direction. `timeRemaining` must be decremented separately for this to work properly, and obviously timeRemaining = 0 - * must be handled separately. - * - * @param var Variable to step. - * @param target Target to step towards. - * @param timeRemaining Number of times this function should be run for `var` to reach `target` - * @param stepVar Variable to use for the step (required to match). - * - * The progression is not quite linear because of truncation in the division, but the variable will always reach - * `target` at the appropriate time since the last step is always the full difference. - */ -#define TIMED_STEP_TO(var, target, timeRemaining, stepVar) \ - { \ - stepVar = ABS_ALT(var - target) / timeRemaining; \ - if (var >= target) { \ - var -= stepVar; \ - } else { \ - var += stepVar; \ - } \ - } \ - (void)0 - typedef struct { /* 0x00 */ u8 scene; /* 0x01 */ u8 flags1; @@ -3902,11 +3878,11 @@ void func_80118084(GlobalContext* globalCtx) { Interface_DrawAmmoCount(globalCtx, 0, interfaceCtx->bAlpha); } } else if (((interfaceCtx->unk_21C == 0) && (interfaceCtx->unk_222 == 0)) || - ((interfaceCtx->unk_21C != 0) && - ((BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) < ITEM_SWORD_KOKIRI) || - (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) > ITEM_SWORD_GILDED)) && - BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) != ITEM_NONE) && - (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) != ITEM_NUT)) { + (((interfaceCtx->unk_21C != 0) && + ((BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) < ITEM_SWORD_KOKIRI) || + (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) > ITEM_SWORD_GILDED)) && + BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) != ITEM_NONE) && + (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) != ITEM_NUT))) { if ((player->transformation == PLAYER_FORM_FIERCE_DEITY) || (player->transformation == PLAYER_FORM_HUMAN)) { if (BUTTON_ITEM_EQUIP(CUR_FORM, EQUIP_SLOT_B) != ITEM_NONE) { Interface_DrawItemIconTexture(globalCtx, interfaceCtx->iconItemSegment, 0); @@ -6214,7 +6190,7 @@ void Interface_Draw(GlobalContext* globalCtx) { if (D_801BF884 == 2) { D_801BF884 = 3; - func_801518B0(globalCtx, 0xF8, NULL); + Message_StartTextbox(globalCtx, 0xF8, NULL); Interface_ChangeAlpha(1); player->stateFlags1 |= 0x200; }