mirror of
https://github.com/zeldaret/mm.git
synced 2026-07-27 06:44:55 -04:00
z_parameter: Minigames (#1131)
* minigame docs * cleanup * vertices and cleanup * fix bss * change to perfectLetters * fix parameter static * more PR, namefixer * PR Suggestions
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
//#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "z64quake.h"
|
||||
#include "z64shrink_window.h"
|
||||
|
||||
+988
-55
File diff suppressed because it is too large
Load Diff
@@ -342,7 +342,7 @@ void BgIngate_Init(Actor* thisx, PlayState* play2) {
|
||||
if (play->curSpawn == 6) {
|
||||
func_80953F14(this, play);
|
||||
if (CHECK_EVENTINF(EVENTINF_35)) {
|
||||
func_80112AFC(play);
|
||||
Interface_InitMinigame(play);
|
||||
} else {
|
||||
SET_EVENTINF(EVENTINF_41);
|
||||
}
|
||||
|
||||
@@ -1482,9 +1482,9 @@ void func_80A97D5C(EnAz* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
func_80112AFC(play);
|
||||
Interface_InitMinigame(play);
|
||||
gSaveContext.minigameScore = (this->unk_374 & 2) ? 25 : 20;
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
play->interfaceCtx.minigameState = MINIGAME_STATE_COUNTDOWN_SETUP_3;
|
||||
if ((this->unk_2FA == 1) || (this->unk_2FA == 3)) {
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 120);
|
||||
} else if (CHECK_WEEKEVENTREG(WEEKEVENTREG_25_01)) {
|
||||
@@ -1498,7 +1498,7 @@ void func_80A97D5C(EnAz* this, PlayState* play) {
|
||||
void func_80A97E48(EnAz* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (play->interfaceCtx.unk_280 >= 8) {
|
||||
if (play->interfaceCtx.minigameState >= MINIGAME_STATE_COUNTDOWN_GO) {
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
func_80A97EAC(this, play);
|
||||
}
|
||||
|
||||
@@ -800,7 +800,7 @@ void func_80962F4C(EnFu* this, PlayState* play) {
|
||||
gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
Audio_PlayFanfare(NA_BGM_GET_ITEM | 0x900);
|
||||
func_8011B4E0(play, 1);
|
||||
Interface_SetPerfectLetters(play, PERFECT_LETTERS_TYPE_1);
|
||||
this->unk_54A = 3;
|
||||
func_809632D0(this);
|
||||
}
|
||||
@@ -848,7 +848,7 @@ void func_80963350(EnFu* this, PlayState* play) {
|
||||
D_80964C24 = 1;
|
||||
}
|
||||
|
||||
if ((this->unk_54A == 3) && (play->interfaceCtx.unk_286 == 0)) {
|
||||
if ((this->unk_54A == 3) && !play->interfaceCtx.perfectLettersOn) {
|
||||
this->unk_54A = 2;
|
||||
D_80964C24 = 1;
|
||||
}
|
||||
|
||||
@@ -875,7 +875,7 @@ void EnHorse_Init(Actor* thisx, PlayState* play2) {
|
||||
EnHorse_InitCutscene(this, play);
|
||||
} else if (thisx->params == ENHORSE_10) {
|
||||
EnHorse_InitHorsebackArchery(this);
|
||||
func_80112AFC(play);
|
||||
Interface_InitMinigame(play);
|
||||
} else if (thisx->params == ENHORSE_14) {
|
||||
func_808846F0(this, play);
|
||||
if ((play->sceneId == SCENE_LOST_WOODS) && !Cutscene_IsPlaying(play)) {
|
||||
@@ -2917,22 +2917,23 @@ void EnHorse_UpdateHorsebackArchery(EnHorse* this, PlayState* play) {
|
||||
EnHorse_PlayWalkingSound(this);
|
||||
}
|
||||
|
||||
if (play->interfaceCtx.hbaAmmo == 0) {
|
||||
if (play->interfaceCtx.minigameAmmo == 0) {
|
||||
this->hbaTimer++;
|
||||
}
|
||||
|
||||
sp28 = Audio_IsSequencePlaying(NA_BGM_HORSE_GOAL);
|
||||
EnHorse_UpdateHbaRaceInfo(this, play, &sHbaInfo);
|
||||
|
||||
if (((this->hbaFlags & 1) || (this->hbaTimer > 45)) && (sp28 != 1) && (gSaveContext.minigameState != 3)) {
|
||||
if (((this->hbaFlags & 1) || (this->hbaTimer > 45)) && (sp28 != 1) &&
|
||||
(gSaveContext.minigameStatus != MINIGAME_STATUS_END)) {
|
||||
gSaveContext.save.cutscene = 0;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_64;
|
||||
}
|
||||
|
||||
if (play->interfaceCtx.hbaAmmo) {}
|
||||
if (play->interfaceCtx.minigameAmmo) {}
|
||||
|
||||
if (((play->interfaceCtx.hbaAmmo == 0) || (this->hbaFlags & 2)) && (this->hbaFlags & 4)) {
|
||||
if (((play->interfaceCtx.minigameAmmo == 0) || (this->hbaFlags & 2)) && (this->hbaFlags & 4)) {
|
||||
this->hbaFlags &= ~4;
|
||||
Audio_QueueSeqCmd(0x8041);
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ s32 func_808F8CCC(EnHorseGameCheck* this, PlayState* play2) {
|
||||
}
|
||||
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
play->interfaceCtx.minigameState = MINIGAME_STATE_COUNTDOWN_SETUP_3;
|
||||
|
||||
this->horse1 = (EnHorse*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_HORSE, -1149.0f, -106.0f, 470.0f, 0, 0x7FFF, 0,
|
||||
ENHORSE_PARAMS(ENHORSE_PARAM_BANDIT, ENHORSE_4));
|
||||
@@ -212,10 +212,10 @@ s32 func_808F8FAC(EnHorseGameCheck* this, PlayState* play) {
|
||||
|
||||
if ((this->unk_168 > 50) && !(this->unk_164 & 2)) {
|
||||
this->unk_164 |= 2;
|
||||
} else if ((play->interfaceCtx.unk_280 >= 8) && !(this->unk_164 & 1)) {
|
||||
} else if ((play->interfaceCtx.minigameState >= MINIGAME_STATE_COUNTDOWN_GO) && !(this->unk_164 & 1)) {
|
||||
this->unk_164 |= 1;
|
||||
horse->inRace = true;
|
||||
} else if ((play->interfaceCtx.unk_280 >= 8) && !(this->unk_164 & 8)) {
|
||||
} else if ((play->interfaceCtx.minigameState >= MINIGAME_STATE_COUNTDOWN_GO) && !(this->unk_164 & 8)) {
|
||||
EnHorse* horse = this->horse1;
|
||||
|
||||
horse->inRace = true;
|
||||
|
||||
@@ -94,7 +94,7 @@ s32 EnJcMato_CheckForHit(EnJcMato* this, PlayState* play) {
|
||||
if ((this->collider.base.acFlags & AC_HIT) && !this->hitFlag && (this->actor.colChkInfo.damageEffect == 0xF)) {
|
||||
this->collider.base.acFlags &= ~AC_HIT;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
play->interfaceCtx.unk_25C = 1;
|
||||
play->interfaceCtx.minigamePoints = 1;
|
||||
this->hitFlag = true;
|
||||
return 1;
|
||||
} else {
|
||||
|
||||
@@ -284,8 +284,8 @@ void func_80C1410C(EnJgameTsn* this, PlayState* play) {
|
||||
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
func_801A2BB8(0x25);
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
func_80112AFC(play);
|
||||
play->interfaceCtx.minigameState = MINIGAME_STATE_COUNTDOWN_SETUP_3;
|
||||
Interface_InitMinigame(play);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_90_20);
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 120);
|
||||
this->actionFunc = func_80C1418C;
|
||||
@@ -294,7 +294,7 @@ void func_80C1410C(EnJgameTsn* this, PlayState* play) {
|
||||
void func_80C1418C(EnJgameTsn* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (play->interfaceCtx.unk_280 == 8) {
|
||||
if (play->interfaceCtx.minigameState == MINIGAME_STATE_COUNTDOWN_GO) {
|
||||
func_80C141DC(this);
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
}
|
||||
@@ -478,7 +478,7 @@ void func_80C147B4(EnJgameTsn* this, PlayState* play) {
|
||||
case 0x10A0:
|
||||
case 0x10A1:
|
||||
func_801477B4(play);
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_90_20);
|
||||
func_80C144E4(this);
|
||||
@@ -563,14 +563,14 @@ s32 func_80C14BCC(EnJgameTsn* this, PlayState* play) {
|
||||
if (phi_s3 == this->unk_218) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
*this->unk_208[phi_s3] |= OBJLUPYGAMELIFT_DISPLAY_CORRECT;
|
||||
play->interfaceCtx.unk_25C = 1;
|
||||
play->interfaceCtx.minigamePoints = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*this->unk_208[phi_s3] & OBJLUPYGAMELIFT_IGNITE_FIRE) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
*this->unk_208[phi_s3] |= OBJLUPYGAMELIFT_DISPLAY_CORRECT;
|
||||
play->interfaceCtx.unk_25C = 1;
|
||||
play->interfaceCtx.minigamePoints = 1;
|
||||
} else {
|
||||
*this->unk_208[phi_s3] |= OBJLUPYGAMELIFT_DISPLAY_INCORRECT;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_ERROR);
|
||||
|
||||
@@ -297,14 +297,14 @@ void func_80B269A4(EnKendoJs* this, PlayState* play) {
|
||||
|
||||
case 0x273B:
|
||||
func_801477B4(play);
|
||||
func_80112AFC(play);
|
||||
Interface_InitMinigame(play);
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
func_80B273D0(this);
|
||||
break;
|
||||
|
||||
case 0x272D:
|
||||
func_801477B4(play);
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
func_80B276C4(this);
|
||||
func_80B276D8(this, play);
|
||||
break;
|
||||
@@ -334,7 +334,7 @@ void func_80B26AFC(EnKendoJs* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if ((this->unk_288 == 0x272E) || (this->unk_288 == 0x272F) || (this->unk_288 == 0x2730)) {
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
}
|
||||
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
@@ -625,14 +625,14 @@ void func_80B274BC(EnKendoJs* this, PlayState* play) {
|
||||
if (this->unk_28E == 1) {
|
||||
if ((player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_START) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_JUMPSLASH_FINISH)) {
|
||||
play->interfaceCtx.unk_25C = 3;
|
||||
play->interfaceCtx.minigamePoints = 3;
|
||||
if (gSaveContext.minigameScore >= 27) {
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
}
|
||||
} else if (player->meleeWeaponAnimation == PLAYER_MWA_STAB_1H) {
|
||||
play->interfaceCtx.unk_25C = 2;
|
||||
play->interfaceCtx.minigamePoints = 2;
|
||||
} else {
|
||||
play->interfaceCtx.unk_25C = 1;
|
||||
play->interfaceCtx.minigamePoints = 1;
|
||||
}
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
this->unk_28E = 0;
|
||||
|
||||
@@ -688,10 +688,10 @@ void EnMa4_HorsebackGameTalking(EnMa4* this, PlayState* play) {
|
||||
void EnMa4_InitHorsebackGame(EnMa4* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
play->interfaceCtx.minigameState = MINIGAME_STATE_COUNTDOWN_SETUP_3;
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_08_01);
|
||||
func_80112AFC(play);
|
||||
Interface_InitMinigame(play);
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
this->actionFunc = EnMa4_SetupHorsebackGameWait;
|
||||
}
|
||||
@@ -699,7 +699,7 @@ void EnMa4_InitHorsebackGame(EnMa4* this, PlayState* play) {
|
||||
void EnMa4_SetupHorsebackGameWait(EnMa4* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (play->interfaceCtx.unk_280 == 8) {
|
||||
if (play->interfaceCtx.minigameState == MINIGAME_STATE_COUNTDOWN_GO) {
|
||||
this->actionFunc = EnMa4_HorsebackGameWait;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
}
|
||||
@@ -714,7 +714,7 @@ void EnMa4_HorsebackGameWait(EnMa4* this, PlayState* play) {
|
||||
|
||||
if (this->poppedBalloonCounter != D_80AC0258) {
|
||||
D_80AC0258 = this->poppedBalloonCounter;
|
||||
play->interfaceCtx.unk_25C = 1;
|
||||
play->interfaceCtx.minigamePoints = 1;
|
||||
}
|
||||
|
||||
if ((gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] >= SECONDS_TO_TIMER(120)) ||
|
||||
|
||||
@@ -315,11 +315,11 @@ void EnMttag_RaceStart(EnMttag* this, PlayState* play) {
|
||||
} else {
|
||||
if (DECR(this->timer) == 60) {
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 0);
|
||||
play->interfaceCtx.unk_280 = 1;
|
||||
play->interfaceCtx.minigameState = MINIGAME_STATE_COUNTDOWN_SETUP_3;
|
||||
Audio_QueueSeqCmd(NA_BGM_GORON_RACE | 0x8000);
|
||||
play->envCtx.unk_E4 = 0xFE;
|
||||
player->stateFlags1 &= ~PLAYER_STATE1_20;
|
||||
} else if ((this->timer < 60) && (play->interfaceCtx.unk_280 == 8)) {
|
||||
} else if ((this->timer < 60) && (play->interfaceCtx.minigameState == MINIGAME_STATE_COUNTDOWN_GO)) {
|
||||
this->timer = 0;
|
||||
SET_EVENTINF(EVENTINF_10);
|
||||
this->actionFunc = EnMttag_Race;
|
||||
|
||||
@@ -59,9 +59,9 @@ EnOtUnkStruct* func_80B5DF58(EnOtUnkStruct* arg0, u8 arg1, Vec3f* arg2, Vec3s* a
|
||||
void func_80B5E078(PlayState* play, EnOtUnkStruct* arg1, s32 arg2);
|
||||
void func_80B5E1D8(PlayState* play, EnOtUnkStruct* arg1, s32 arg2);
|
||||
|
||||
static EnOt* D_80B5E880;
|
||||
static EnOt* D_80B5E884;
|
||||
static EnOt* D_80B5E888;
|
||||
EnOt* D_80B5E880;
|
||||
EnOt* D_80B5E884;
|
||||
EnOt* D_80B5E888;
|
||||
|
||||
ActorInit En_Ot_InitVars = {
|
||||
ACTOR_EN_OT,
|
||||
|
||||
@@ -334,7 +334,7 @@ void EnSyatekiMan_Swamp_HandleChoice(EnSyatekiMan* this, PlayState* play) {
|
||||
Message_StartTextbox(play, 0xA31, &this->actor);
|
||||
this->prevTextId = 0xA31;
|
||||
if (this->shootingGameState == SG_GAME_STATE_ONE_MORE_GAME) {
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
}
|
||||
|
||||
this->shootingGameState = SG_GAME_STATE_NOT_PLAYING;
|
||||
@@ -373,7 +373,7 @@ void EnSyatekiMan_Swamp_HandleChoice(EnSyatekiMan* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->shootingGameState == SG_GAME_STATE_ONE_MORE_GAME) {
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
}
|
||||
|
||||
this->shootingGameState = SG_GAME_STATE_NOT_PLAYING;
|
||||
@@ -399,8 +399,8 @@ void EnSyatekiMan_Swamp_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->actor.freezeTimer = 0;
|
||||
func_80112AFC(play);
|
||||
play->interfaceCtx.hbaAmmo = 80;
|
||||
Interface_InitMinigame(play);
|
||||
play->interfaceCtx.minigameAmmo = 80;
|
||||
func_80123F2C(play, 80);
|
||||
this->shootingGameState = SG_GAME_STATE_RUNNING;
|
||||
this->actionFunc = EnSyatekiMan_Swamp_StartGame;
|
||||
@@ -414,7 +414,7 @@ void EnSyatekiMan_Swamp_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_63_01);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_63_02);
|
||||
this->actionFunc = EnSyatekiMan_Swamp_Idle;
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
this->shootingGameState = SG_GAME_STATE_NONE;
|
||||
} else {
|
||||
// Wanna play again?
|
||||
@@ -434,7 +434,7 @@ void EnSyatekiMan_Swamp_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->actor.freezeTimer = 0;
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
this->actionFunc = EnSyatekiMan_Swamp_SetupGiveReward;
|
||||
EnSyatekiMan_Swamp_SetupGiveReward(this, play);
|
||||
@@ -641,7 +641,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) {
|
||||
|
||||
if (this->shootingGameState == SG_GAME_STATE_ONE_MORE_GAME) {
|
||||
player->stateFlags3 &= ~PLAYER_STATE3_400;
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
}
|
||||
|
||||
this->shootingGameState = SG_GAME_STATE_NOT_PLAYING;
|
||||
@@ -677,7 +677,7 @@ void EnSyatekiMan_Town_HandleChoice(EnSyatekiMan* this, PlayState* play) {
|
||||
|
||||
if (this->shootingGameState == SG_GAME_STATE_ONE_MORE_GAME) {
|
||||
player->stateFlags3 &= ~PLAYER_STATE3_400;
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
}
|
||||
|
||||
this->shootingGameState = SG_GAME_STATE_NOT_PLAYING;
|
||||
@@ -759,7 +759,7 @@ void EnSyatekiMan_Town_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->actor.freezeTimer = 0;
|
||||
this->flagsIndex = 0;
|
||||
func_80112AFC(play);
|
||||
Interface_InitMinigame(play);
|
||||
func_80123F2C(play, 0x63);
|
||||
this->shootingGameState = SG_GAME_STATE_RUNNING;
|
||||
func_801A2BB8(NA_BGM_TIMED_MINI_GAME);
|
||||
@@ -808,7 +808,7 @@ void EnSyatekiMan_Town_HandleNormalMessage(EnSyatekiMan* this, PlayState* play)
|
||||
play->msgCtx.msgMode = 0x43;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
player->actor.freezeTimer = 0;
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
this->actionFunc = EnSyatekiMan_Town_SetupGiveReward;
|
||||
EnSyatekiMan_Town_SetupGiveReward(this, play);
|
||||
break;
|
||||
@@ -1090,7 +1090,7 @@ void EnSyatekiMan_Swamp_RunGame(EnSyatekiMan* this, PlayState* play) {
|
||||
func_801A2C20();
|
||||
this->shootingGameState = SG_GAME_STATE_GIVING_BONUS;
|
||||
if (this->score == 2120) {
|
||||
func_8011B4E0(play, 2);
|
||||
Interface_SetPerfectLetters(play, PERFECT_LETTERS_TYPE_2);
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_6;
|
||||
this->actionFunc = EnSyatekiMan_Swamp_AddBonusPoints;
|
||||
} else {
|
||||
@@ -1122,7 +1122,7 @@ void EnSyatekiMan_Swamp_EndGame(EnSyatekiMan* this, PlayState* play) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_63_01);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_63_02);
|
||||
this->shootingGameState = SG_GAME_STATE_NONE;
|
||||
gSaveContext.minigameState = 3;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_END;
|
||||
this->actionFunc = EnSyatekiMan_Swamp_Idle;
|
||||
return;
|
||||
}
|
||||
@@ -1156,7 +1156,7 @@ void EnSyatekiMan_Swamp_AddBonusPoints(EnSyatekiMan* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->stateFlags1 |= PLAYER_STATE1_20;
|
||||
if (play->interfaceCtx.unk_286 == 0) {
|
||||
if (!play->interfaceCtx.perfectLettersOn) {
|
||||
if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_1] == SECONDS_TO_TIMER(0)) {
|
||||
gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_1] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_1] = TIMER_STATE_STOP;
|
||||
@@ -1166,7 +1166,7 @@ void EnSyatekiMan_Swamp_AddBonusPoints(EnSyatekiMan* this, PlayState* play) {
|
||||
sBonusTimer = 0;
|
||||
} else if (sBonusTimer > 10) {
|
||||
gSaveContext.timerStopTimes[TIMER_ID_MINIGAME_1] += SECONDS_TO_TIMER(1);
|
||||
play->interfaceCtx.unk_25C += 10;
|
||||
play->interfaceCtx.minigamePoints += 10;
|
||||
this->score += 10;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
sBonusTimer = 0;
|
||||
@@ -1359,7 +1359,7 @@ void EnSyatekiMan_Town_RunGame(EnSyatekiMan* this, PlayState* play) {
|
||||
this->actionFunc = EnSyatekiMan_Town_EndGame;
|
||||
if (this->score == 50) {
|
||||
Audio_PlayFanfare(NA_BGM_GET_ITEM | 0x900);
|
||||
func_8011B4E0(play, 1);
|
||||
Interface_SetPerfectLetters(play, PERFECT_LETTERS_TYPE_1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1368,7 +1368,7 @@ void EnSyatekiMan_Town_RunGame(EnSyatekiMan* this, PlayState* play) {
|
||||
void EnSyatekiMan_Town_EndGame(EnSyatekiMan* this, PlayState* play) {
|
||||
if (this->shootingGameState == SG_GAME_STATE_RUNNING) {
|
||||
this->octorokFlags = 0;
|
||||
if ((this->talkWaitTimer <= 0) && (play->interfaceCtx.unk_286 == 0)) {
|
||||
if ((this->talkWaitTimer <= 0) && !play->interfaceCtx.perfectLettersOn) {
|
||||
Flags_SetAllTreasure(play, this->score);
|
||||
this->talkWaitTimer = 15;
|
||||
if ((GET_TOWN_SHOOTING_GALLERY_HIGH_SCORE() < this->score) || (this->score == 50)) {
|
||||
|
||||
@@ -370,7 +370,7 @@ void EnSyatekiOkuta_Update(Actor* thisx, PlayState* play) {
|
||||
syatekiMan = (EnSyatekiMan*)this->actor.parent;
|
||||
if (this->unk_2A6 == 1) {
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_SY_TRE_BOX_APPEAR);
|
||||
play->interfaceCtx.unk_25C++;
|
||||
play->interfaceCtx.minigamePoints++;
|
||||
syatekiMan->score++;
|
||||
syatekiMan->perGameVar2.octorokHitType = SG_OCTO_HIT_TYPE_RED;
|
||||
} else {
|
||||
|
||||
@@ -185,7 +185,7 @@ s32 func_80B761FC(EnTruMt* this, PlayState* play) {
|
||||
this->unk_3A4 = 0;
|
||||
Actor_PlaySfxAtPos(&this->actor, NA_SE_EN_KOUME_DAMAGE2);
|
||||
}
|
||||
play->interfaceCtx.unk_25E = 1;
|
||||
play->interfaceCtx.minigameHiddenPoints = 1;
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 255, 0, 25);
|
||||
return true;
|
||||
}
|
||||
@@ -342,7 +342,7 @@ void func_80B76924(EnTruMt* this) {
|
||||
void func_80B76980(EnTruMt* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (gSaveContext.unk_3F3C >= 10) {
|
||||
if (gSaveContext.minigameHiddenScore >= 10) {
|
||||
Message_StartTextbox(play, 0x87F, &this->actor);
|
||||
SET_EVENTINF(EVENTINF_36);
|
||||
SET_EVENTINF(EVENTINF_40);
|
||||
|
||||
@@ -198,7 +198,7 @@ void func_80AC0D2C(EnTwig* this, PlayState* play) {
|
||||
(s32)(Rand_ZeroOne() * 10.0f) + 20);
|
||||
}
|
||||
play_sound(NA_SE_SY_GET_ITEM);
|
||||
play->interfaceCtx.unk_25C--;
|
||||
play->interfaceCtx.minigamePoints--;
|
||||
sRingNotCollected[RACERING_GET_PARAM_FE0(&this->dyna.actor)] = true;
|
||||
if (sCurrentRing == RACERING_GET_PARAM_FE0(&this->dyna.actor)) {
|
||||
s32 i;
|
||||
|
||||
@@ -92,6 +92,6 @@ void EffectSsExtra_Update(PlayState* play, u32 index, EffectSs* this) {
|
||||
}
|
||||
|
||||
if (this->rTimer == 1) {
|
||||
play->interfaceCtx.unk_25C = sScores[this->rScoreIndex];
|
||||
play->interfaceCtx.minigamePoints = sScores[this->rScoreIndex];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ void MapSelect_UpdateMenu(MapSelectState* this) {
|
||||
gSaveContext.timerStopTimes[i] = SECONDS_TO_TIMER(0);
|
||||
gSaveContext.timerPausedOsTimes[i] = 0;
|
||||
}
|
||||
gSaveContext.minigameState = 0;
|
||||
gSaveContext.minigameStatus = MINIGAME_STATUS_INACTIVE;
|
||||
|
||||
if (this->scenes[this->currentScene].loadFunc != NULL) {
|
||||
this->scenes[this->currentScene].loadFunc(this, this->scenes[this->currentScene].entrance, this->opt);
|
||||
|
||||
Reference in New Issue
Block a user