1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-04 15:04:31 +00:00

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
This commit is contained in:
petrie911 2020-12-11 16:38:23 -06:00 committed by GitHub
parent bc8e3745c7
commit f05a584dea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
67 changed files with 1464 additions and 4117 deletions

View file

@ -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)) {

View file

@ -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) {

View file

@ -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;
}