diff options
| author | petrie911 <69443847+petrie911@users.noreply.github.com> | 2020-12-11 16:38:23 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-11 17:38:23 -0500 |
| commit | f05a584dea4f1683e1bf163b37e9a40cd72422b6 (patch) | |
| tree | 8932d4a8ce83332af7b085bc3822b4d6db352f8b /src/code | |
| parent | bc8e3745c70784e0c425fbbf9a10a11720fce1de (diff) | |
G_Switch, Syateki_Itm, and Syateki_Man (Shooting gallery and related actors) (#523)
* Darkmeiro decompilation
Bg_Gnd_Darkmeiro decompiled, matched, and documented.
* give this a shot
* fix conflict
* one more try
* could be useful
* whoops
* ZAP2 stuff
* ZAP why
* ZAP again
* rupees and, for some reason, pots
* and now an even larger man
* now for the gallery
* more progress
* naming continues
* even more docs
* another match
* match, fix, a new enum
* Update src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c
* fixes except globalctx
* well one more
* and now globalCtx
Diffstat (limited to 'src/code')
| -rw-r--r-- | src/code/z_kaleido_setup.c | 4 | ||||
| -rw-r--r-- | src/code/z_parameter.c | 16 | ||||
| -rw-r--r-- | src/code/z_player_lib.c | 2 |
3 files changed, 11 insertions, 11 deletions
diff --git a/src/code/z_kaleido_setup.c b/src/code/z_kaleido_setup.c index e28811921..779aa71ec 100644 --- a/src/code/z_kaleido_setup.c +++ b/src/code/z_kaleido_setup.c @@ -44,8 +44,8 @@ void KaleidoSetup_Update(GlobalContext* globalCtx) { if (pauseCtx->state == 0 && pauseCtx->flag == 0 && globalCtx->unk_10A20 == 0 && globalCtx->sceneLoadFlag == 0 && globalCtx->transitionMode == 0 && gSaveContext.cutsceneIndex < 0xFFF0 && - gSaveContext.nextCutsceneIndex < 0xFFF0 && !Gameplay_InCsMode(globalCtx) && globalCtx->unk_11E5C < 2 && - gSaveContext.unk_13F0 != 8 && gSaveContext.unk_13F0 != 9 && + gSaveContext.nextCutsceneIndex < 0xFFF0 && !Gameplay_InCsMode(globalCtx) && + globalCtx->shootingGalleryStatus <= 1 && gSaveContext.unk_13F0 != 8 && gSaveContext.unk_13F0 != 9 && (globalCtx->sceneNum != SCENE_BOWLING || !Flags_GetSwitch(globalCtx, 0x38))) { if (CHECK_BTN_ALL(input->cur.button, BTN_L) && CHECK_BTN_ALL(input->press.button, BTN_CUP)) { diff --git a/src/code/z_parameter.c b/src/code/z_parameter.c index 6f5d96c10..4f64280d2 100644 --- a/src/code/z_parameter.c +++ b/src/code/z_parameter.c @@ -608,7 +608,7 @@ void func_80083108(GlobalContext* globalCtx) { ((globalCtx->sceneNum == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF0))) { gSaveContext.unk_13E7 = 0; - if ((player->stateFlags1 & 0x00800000) || (globalCtx->unk_11E5C >= 2) || + if ((player->stateFlags1 & 0x00800000) || (globalCtx->shootingGalleryStatus > 1) || ((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) { if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) { gSaveContext.unk_13E7 = 1; @@ -629,7 +629,7 @@ void func_80083108(GlobalContext* globalCtx) { Interface_LoadItemIcon1(globalCtx, 0); } else { gSaveContext.equips.buttonItems[0] = ITEM_BOW; - if (globalCtx->unk_11E5C >= 2) { + if (globalCtx->shootingGalleryStatus > 1) { if (LINK_AGE_IN_YEARS == YEARS_CHILD) { gSaveContext.equips.buttonItems[0] = ITEM_SLINGSHOT; } @@ -653,7 +653,7 @@ void func_80083108(GlobalContext* globalCtx) { Interface_ChangeAlpha(1); } else if (gSaveContext.minigameState == 1) { Interface_ChangeAlpha(8); - } else if (globalCtx->unk_11E5C >= 2) { + } else if (globalCtx->shootingGalleryStatus > 1) { Interface_ChangeAlpha(8); } else if ((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38)) { Interface_ChangeAlpha(8); @@ -2867,10 +2867,10 @@ void Interface_DrawAmmoCount(GlobalContext* globalCtx, s16 button, s16 alpha) { if ((button == 0) && (gSaveContext.minigameState == 1)) { ammo = globalCtx->interfaceCtx.hbaAmmo; - } else if ((button == 0) && (globalCtx->unk_11E5C >= 2)) { - ammo = globalCtx->unk_11E5C - 1; + } else if ((button == 0) && (globalCtx->shootingGalleryStatus > 1)) { + ammo = globalCtx->shootingGalleryStatus - 1; } else if ((button == 0) && (globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38)) { - ammo = globalCtx->bombchuBowlingAmmo; + ammo = globalCtx->bombchuBowlingStatus; if (ammo < 0) { ammo = 0; } @@ -3208,7 +3208,7 @@ void Interface_Draw(GlobalContext* globalCtx) { if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) { Interface_DrawItemIconTexture(globalCtx, (void*)(u32)interfaceCtx->icon_itemSegment, 0); - if ((player->stateFlags1 & 0x00800000) || (globalCtx->unk_11E5C >= 2) || + if ((player->stateFlags1 & 0x00800000) || (globalCtx->shootingGalleryStatus > 1) || ((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) { gDPPipeSync(OVERLAY_DISP++); gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, @@ -3495,7 +3495,7 @@ void Interface_Draw(GlobalContext* globalCtx) { if ((globalCtx->pauseCtx.state == 0) && (globalCtx->pauseCtx.flag == 0) && (globalCtx->unk_10A20 == 0) && (msgCtx->msgMode == 0) && !(player->stateFlags2 & 0x01000000) && (globalCtx->sceneLoadFlag == 0) && (globalCtx->transitionMode == 0) && !Gameplay_InCsMode(globalCtx) && (gSaveContext.minigameState != 1) && - (globalCtx->unk_11E5C < 2) && + (globalCtx->shootingGalleryStatus <= 1) && !((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) { sp274 = 0; switch (gSaveContext.timer1State) { diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index fd77f9057..0e3291372 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -416,7 +416,7 @@ s32 func_8008EF30(GlobalContext* globalCtx) { } s32 func_8008EF44(GlobalContext* globalCtx, s32 ammo) { - globalCtx->unk_11E5C = ammo + 1; + globalCtx->shootingGalleryStatus = ammo + 1; return 1; } |
