z_en_test7.c Documentation Pass (#1497)

* copy over docs

* more docs

* some docs

* more docs

* small cleanup

* more small cleanup

* more small cleanup

* lerp time

* small reordering

* feather type

* general owl warp docs

* more cleanup

* rm redundant info

* PR Review

* PR Review
This commit is contained in:
engineer124
2023-11-27 21:21:52 +11:00
committed by GitHub
parent 702f3cf44e
commit 5284302c8f
28 changed files with 765 additions and 740 deletions
+16 -16
View File
@@ -119,52 +119,52 @@ ReverbSettings* gReverbSettingsTable[] = {
};
AudioSpec gAudioSpecs[21] = {
/* 0x0 */
/* 0x0 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x1 */
/* 0x1 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x2 */
/* 0x2 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x3 */
/* 0x3 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x4 */
/* 0x4 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x5 */
/* 0x5 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x6 */
/* 0x6 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x7 */
/* 0x7 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x8 */
/* 0x8 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0x9 */
/* 0x9 */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0xA */
/* 0xA */
{ 32000, 1, 28, 3, 0, 0, 2, reverbSettingsA, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x2800, 0x2D00, 0, 0,
0xDC800 },
/* 0xB */
/* 0xB */
{ 32000, 1, 28, 3, 0, 0, 2, reverbSettingsA, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0xC */
/* 0xC */
{ 32000, 1, 28, 5, 0, 0, 2, reverbSettingsA, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xCC800 },
/* 0xD */
/* 0xD */
{ 32000, 1, 24, 5, 0, 0, 3, reverbSettingsD, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0xE */
/* 0xE */
{ 32000, 1, 24, 5, 0, 0, 3, reverbSettingsE, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4100, 0x2D00, 0, 0,
0xDC800 },
/* 0xF */
/* 0xF */
{ 32000, 1, 24, 5, 0, 0, 2, reverbSettingsF, 0x500, 0x200, 0x7FFF, 0xAF0, 0x2D80, 0, 0x4000, 0x2D00, 0, 0,
0xDC800 },
/* 0x10 */
+1 -1
View File
@@ -24,7 +24,7 @@ void Setup_SetRegs(void) {
XREG(77) = 0x3C;
XREG(78) = 0x2F;
XREG(79) = 0x62;
R_PAUSE_OWLWARP_ALPHA = 0;
R_PAUSE_OWL_WARP_ALPHA = 0;
XREG(88) = 0x56;
XREG(89) = 0x258;
XREG(90) = 0x1C2;
+2 -2
View File
@@ -35,7 +35,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
KaleidoMgrOverlay* kaleidoScopeOvl = &gKaleidoMgrOverlayTable[KALEIDO_OVL_KALEIDO_SCOPE];
if ((play->pauseCtx.state != PAUSE_STATE_OFF) || (play->pauseCtx.debugEditor != DEBUG_EDITOR_NONE)) {
if ((pauseCtx->state == PAUSE_STATE_OPENING_0) || (pauseCtx->state == PAUSE_STATE_OWLWARP_0)) {
if ((pauseCtx->state == PAUSE_STATE_OPENING_0) || (pauseCtx->state == PAUSE_STATE_OWL_WARP_0)) {
if (ShrinkWindow_Letterbox_GetSize() == 0) {
R_PAUSE_BG_PRERENDER_STATE = PAUSE_BG_PRERENDER_SETUP;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
@@ -48,7 +48,7 @@ void KaleidoScopeCall_Update(PlayState* play) {
pauseCtx->savePromptState = PAUSE_SAVEPROMPT_STATE_APPEARING;
pauseCtx->state = (pauseCtx->state & 0xFFFF) + 1;
} else if ((pauseCtx->state == PAUSE_STATE_OPENING_1) || (pauseCtx->state == PAUSE_STATE_GAMEOVER_1) ||
(pauseCtx->state == PAUSE_STATE_OWLWARP_1)) {
(pauseCtx->state == PAUSE_STATE_OWL_WARP_1)) {
if (R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) {
pauseCtx->state++;
}
+2 -2
View File
@@ -5604,7 +5604,7 @@ void Message_Update(PlayState* play) {
Message_CloseTextbox(play);
}
} else if ((msgCtx->textboxEndType != TEXTBOX_ENDTYPE_10) ||
(pauseCtx->state != PAUSE_STATE_OWLWARP_CONFIRM)) {
(pauseCtx->state != PAUSE_STATE_OWL_WARP_CONFIRM)) {
if ((msgCtx->textboxEndType == TEXTBOX_ENDTYPE_10) &&
(play->msgCtx.ocarinaMode == OCARINA_MODE_1B)) {
if (Message_ShouldAdvance(play)) {
@@ -5676,7 +5676,7 @@ void Message_Update(PlayState* play) {
pauseCtx->unk_2C8 = pauseCtx->pageIndex;
pauseCtx->unk_2CA = pauseCtx->cursorPoint[4];
pauseCtx->pageIndex = PAUSE_ITEM;
pauseCtx->state = PAUSE_STATE_OWLWARP_0;
pauseCtx->state = PAUSE_STATE_OWL_WARP_0;
func_800F4A10(play);
pauseCtx->pageIndex = PAUSE_MAP;
sLastPlayedSong = 0xFF;
+1
View File
@@ -18,6 +18,7 @@ s32 Object_SpawnPersistent(ObjectContext* objectCtx, s16 id) {
objectCtx->slots[objectCtx->numEntries].id = id;
size = gObjectTable[id].vromEnd - gObjectTable[id].vromStart;
//! FAKE:
if (1) {}
if (size != 0) {
+19 -15
View File
@@ -388,12 +388,11 @@ u8 sBitFlags8[] = {
u16 D_801F6AF0;
u8 D_801F6AF2;
void Sram_ActivateOwl(u8 owlId) {
gSaveContext.save.saveInfo.playerData.owlActivationFlags =
((void)0, gSaveContext.save.saveInfo.playerData.owlActivationFlags) | (u16)gBitFlags[owlId];
void Sram_ActivateOwl(u8 owlWarpId) {
SET_OWL_STATUE_ACTIVATED(owlWarpId);
if (gSaveContext.save.saveInfo.playerData.unk_20 == 0xFF) {
gSaveContext.save.saveInfo.playerData.unk_20 = owlId;
if (gSaveContext.save.saveInfo.playerData.owlWarpId == OWL_WARP_NONE) {
gSaveContext.save.saveInfo.playerData.owlWarpId = owlWarpId;
}
}
@@ -780,8 +779,8 @@ SavePlayerData sSaveDefaultPlayerData = {
false, // isDoubleMagicAcquired
0, // doubleDefense
0, // unk_1F
0xFF, // unk_20
0x0000, // owlActivationFlags
OWL_WARP_NONE, // owlWarpId
0, // owlActivationFlags
0xFF, // unk_24
SCENE_SPOT00, // savedSceneId
};
@@ -956,7 +955,7 @@ SavePlayerData sSaveDebugPlayerData = {
false, // isDoubleMagicAcquired
0, // doubleDefense
0, // unk_1F
0xFF, // unk_20
OWL_WARP_NONE, // owlWarpId
0, // owlActivationFlags
0xFF, // unk_24
SCENE_SPOT00, // savedSceneId
@@ -1208,12 +1207,17 @@ void Sram_ResetSaveFromMoonCrash(SramContext* sramCtx) {
gSaveContext.jinxTimer = 0;
}
u16 D_801C6A58[] = {
ENTRANCE(GREAT_BAY_COAST, 11), ENTRANCE(ZORA_CAPE, 6),
ENTRANCE(SNOWHEAD, 3), ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8),
ENTRANCE(SOUTH_CLOCK_TOWN, 9), ENTRANCE(MILK_ROAD, 4),
ENTRANCE(WOODFALL, 4), ENTRANCE(SOUTHERN_SWAMP_POISONED, 10),
ENTRANCE(IKANA_CANYON, 4), ENTRANCE(STONE_TOWER, 3),
static u16 sOwlWarpEntrances[OWL_WARP_MAX - 1] = {
ENTRANCE(GREAT_BAY_COAST, 11), // OWL_WARP_GREAT_BAY_COAST
ENTRANCE(ZORA_CAPE, 6), // OWL_WARP_ZORA_CAPE
ENTRANCE(SNOWHEAD, 3), // OWL_WARP_SNOWHEAD
ENTRANCE(MOUNTAIN_VILLAGE_WINTER, 8), // OWL_WARP_MOUNTAIN_VILLAGE
ENTRANCE(SOUTH_CLOCK_TOWN, 9), // OWL_WARP_CLOCK_TOWN
ENTRANCE(MILK_ROAD, 4), // OWL_WARP_MILK_ROAD
ENTRANCE(WOODFALL, 4), // OWL_WARP_WOODFALL
ENTRANCE(SOUTHERN_SWAMP_POISONED, 10), // OWL_WARP_SOUTHERN_SWAMP
ENTRANCE(IKANA_CANYON, 4), // OWL_WARP_IKANA_CANYON
ENTRANCE(STONE_TOWER, 3), // OWL_WARP_STONE_TOWER
};
void Sram_OpenSave(FileSelectState* fileSelect, SramContext* sramCtx) {
@@ -1288,7 +1292,7 @@ void Sram_OpenSave(FileSelectState* fileSelect, SramContext* sramCtx) {
gSaveContext.save.playerForm = PLAYER_FORM_HUMAN;
}
} else {
gSaveContext.save.entrance = D_801C6A58[(void)0, gSaveContext.save.owlSaveLocation];
gSaveContext.save.entrance = sOwlWarpEntrances[(void)0, gSaveContext.save.owlWarpId];
if ((gSaveContext.save.entrance == ENTRANCE(SOUTHERN_SWAMP_POISONED, 10)) &&
CHECK_WEEKEVENTREG(WEEKEVENTREG_CLEARED_WOODFALL_TEMPLE)) {
gSaveContext.save.entrance = ENTRANCE(SOUTHERN_SWAMP_CLEARED, 10);
+16 -16
View File
@@ -265,7 +265,7 @@ void EnBigpo_RotateSpawnCutsceneFires(EnBigpo* this) {
void EnBigpo_UpdateSpin(EnBigpo* this) {
s16 oldYaw = this->actor.shape.rot.y;
this->actor.shape.rot.y += this->rotVelocity;
this->actor.shape.rot.y += this->angularVelocity;
if ((oldYaw < 0) && (this->actor.shape.rot.y > 0)) {
Actor_PlaySfx(&this->actor, NA_SE_EN_PO_ROLL); // spinning sfx during spin attack
}
@@ -364,7 +364,7 @@ void EnBigpo_SpawnCutsceneStage2(EnBigpo* this, PlayState* play) {
* stage 3: switch to fires rotating
*/
void EnBigpo_SpawnCutsceneStage3(EnBigpo* this) {
this->rotVelocity = 0x1000;
this->angularVelocity = 0x1000;
this->actionFunc = EnBigpo_SpawnCutsceneStage4;
this->fireRadius = 200.0f;
this->actor.velocity.y = 0.0f;
@@ -377,10 +377,10 @@ void EnBigpo_SpawnCutsceneStage4(EnBigpo* this, PlayState* play) {
s32 i;
if (Math_StepToF(&this->fireRadius, 30.0f, 5.0f)) {
this->rotVelocity += 0x80;
this->angularVelocity += 0x80;
this->actor.velocity.y += 0.25f;
}
this->actor.shape.rot.y += this->rotVelocity;
this->actor.shape.rot.y += this->angularVelocity;
EnBigpo_RotateSpawnCutsceneFires(this);
for (i = 0; i < ARRAY_COUNT(this->fires); i++) {
@@ -415,11 +415,11 @@ void EnBigpo_SpawnCutsceneStage6(EnBigpo* this, PlayState* play) {
s32 alphaPlus; // color alpha + 10
SkelAnime_Update(&this->skelAnime);
this->actor.shape.rot.y += this->rotVelocity;
this->actor.shape.rot.y += this->angularVelocity;
alphaPlus = this->mainColor.a + 10; // decrease transparency
EnBigpo_RotateSpawnCutsceneFires(this);
if (alphaPlus >= 90) {
this->rotVelocity -= 0x80;
this->angularVelocity -= 0x80;
this->actor.velocity.y -= 0.25f;
if (alphaPlus >= 180) {
Math_ScaledStepToS(&this->actor.world.rot.y, 0, 0x180);
@@ -486,7 +486,7 @@ void EnBigpo_SpawnCutsceneStage8(EnBigpo* this, PlayState* play) {
void EnBigpo_SetupWarpOut(EnBigpo* this) {
this->collider.base.acFlags &= ~AC_ON;
this->collider.base.ocFlags1 &= ~OC1_ON;
this->rotVelocity = 0x2000;
this->angularVelocity = 0x2000;
this->idleTimer = 32;
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
this->actor.speed = 0.0f;
@@ -496,9 +496,9 @@ void EnBigpo_SetupWarpOut(EnBigpo* this) {
void EnBigpo_WarpingOut(EnBigpo* this, PlayState* play) {
DECR(this->idleTimer);
this->actor.shape.rot.y += this->rotVelocity;
this->actor.shape.rot.y += this->angularVelocity;
if (this->idleTimer < 16) {
Math_ScaledStepToS(&this->rotVelocity, 0, 0x200);
Math_ScaledStepToS(&this->angularVelocity, 0, 0x200);
}
this->mainColor.a = this->idleTimer * (255.0f / 32.0f);
if (this->idleTimer == 0) {
@@ -514,7 +514,7 @@ void EnBigpo_SetupWarpIn(EnBigpo* this, PlayState* play) {
Actor_PlaySfx(&this->actor, NA_SE_EN_STALKIDS_APPEAR);
Animation_PlayLoop(&this->skelAnime, &gBigPoeAwakenStretchAnim);
this->rotVelocity = 0x2000;
this->angularVelocity = 0x2000;
this->actor.world.pos.x = (Math_SinS(randomYaw) * distance) + player->actor.world.pos.x;
this->actor.world.pos.z = (Math_CosS(randomYaw) * distance) + player->actor.world.pos.z;
this->actionFunc = EnBigpo_WarpingIn;
@@ -522,10 +522,10 @@ void EnBigpo_SetupWarpIn(EnBigpo* this, PlayState* play) {
void EnBigpo_WarpingIn(EnBigpo* this, PlayState* play) {
this->idleTimer++;
this->actor.shape.rot.y -= this->rotVelocity;
this->actor.shape.rot.y -= this->angularVelocity;
if (this->idleTimer >= 16) {
// after 16th frame, start slowing rotation
Math_ScaledStepToS(&this->rotVelocity, 0, 0x200);
Math_ScaledStepToS(&this->angularVelocity, 0, 0x200);
}
this->mainColor.a = this->idleTimer * (255.0f / 32.0f);
@@ -585,16 +585,16 @@ void EnBigpo_SetupSpinUp(EnBigpo* this) {
this->collider.base.acFlags |= AC_HARD;
this->collider.info.bumper.dmgFlags &= ~0x8000;
this->collider.base.atFlags |= AT_ON;
this->rotVelocity = 0x800;
this->angularVelocity = 0x800;
this->actionFunc = EnBigpo_SpinningUp;
this->actor.speed = 0.0f;
}
void EnBigpo_SpinningUp(EnBigpo* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
this->rotVelocity += 0x200;
this->angularVelocity += 0x200;
EnBigpo_UpdateSpin(this);
if (this->rotVelocity >= 0x3C00) {
if (this->angularVelocity >= 0x3C00) {
EnBigpo_SetupSpinAttack(this);
}
}
@@ -636,7 +636,7 @@ void EnBigpo_SpinningDown(EnBigpo* this, PlayState* play) {
SkelAnime_Update(&this->skelAnime);
Math_SmoothStepToF(&this->actor.world.pos.y, player->actor.world.pos.y + 100.0f, 0.3f, 5.0f, 1.0f);
Math_StepToF(&this->actor.speed, 0.0f, 0.2f);
if (Math_ScaledStepToS(&this->rotVelocity, 0, 0x200)) {
if (Math_ScaledStepToS(&this->angularVelocity, 0, 0x200)) {
// spin down complete, re-allow hittable
this->collider.base.colType = COLTYPE_HIT3;
this->collider.base.acFlags &= ~AC_HARD;
@@ -48,7 +48,7 @@ typedef struct EnBigpo {
/* 0x204 */ u8 storePrevBgm;
/* 0x206 */ s16 idleTimer; // frame counter
/* 0x208 */ s16 unk208; // facing rotY?
/* 0x20A */ s16 rotVelocity;
/* 0x20A */ s16 angularVelocity;
/* 0x20C */ s16 unk20C; // is this counting the number of frames the player is ztargeting them?
/* 0x20E */ s16 subCamId;
/* 0x210 */ s16 switchFlag;
+4 -4
View File
@@ -308,7 +308,7 @@ s32 func_8092CCEC(EnDns* this, PlayState* play) {
s32 func_8092CE38(EnDns* this) {
static s32 D_8092DE00[] = { EN_DNS_ANIM_DANCE, EN_DNS_ANIM_DANCE, EN_DNS_ANIM_FLIP };
s16 rotVelocity;
s16 angularVelocity;
s32 pad;
Vec3f sp2C;
s32 ret = false;
@@ -333,10 +333,10 @@ s32 func_8092CE38(EnDns* this) {
this->actor.shape.rot.y = this->actor.world.rot.y;
Actor_PlaySfx(&this->actor, NA_SE_EN_NUTS_JUMP);
} else if (this->skelAnime.curFrame < 13.0f) {
rotVelocity = this->skelAnime.curFrame;
angularVelocity = this->skelAnime.curFrame;
this->actor.shape.rot.y = this->actor.world.rot.y;
rotVelocity *= 0x9D8;
this->actor.shape.rot.y += rotVelocity;
angularVelocity *= 0x9D8;
this->actor.shape.rot.y += angularVelocity;
this->unk_2E4 -= -(40.0f / 13.0f);
}
} else {
+9 -9
View File
@@ -552,9 +552,9 @@ void EnGo_InitSnow(EnGoEffect effect[ENGO_SNOW_EFFECT_COUNT], Vec3f pos) {
effect->pos.y += 56.0f;
// Generate a +-15 degree rotational velocity
effect->rotVelocity.x = (Rand_ZeroOne() - 0.5f) * (f32)0x1554;
effect->rotVelocity.y = (Rand_ZeroOne() - 0.5f) * (f32)0x1554;
effect->rotVelocity.z = (Rand_ZeroOne() - 0.5f) * (f32)0x1554;
effect->angularVelocity.x = (Rand_ZeroOne() - 0.5f) * 0x1554;
effect->angularVelocity.y = (Rand_ZeroOne() - 0.5f) * 0x1554;
effect->angularVelocity.z = (Rand_ZeroOne() - 0.5f) * 0x1554;
// Generate a radially outward velocity for each of the effects
velMagnitude = (Rand_ZeroOne() * 4.0f) + 6.0f;
@@ -632,9 +632,9 @@ void EnGo_UpdateSnow(EnGoEffect* effect, f32 dustConversionHeight) {
Math_StepToF(&effect->velocity.z, z, (sREG(14) + 40) * 0.01f);
}
effect->rotAngle.x += effect->rotVelocity.x;
effect->rotAngle.y += effect->rotVelocity.y;
effect->rotAngle.z += effect->rotVelocity.z;
effect->rot.x += effect->angularVelocity.x;
effect->rot.y += effect->angularVelocity.y;
effect->rot.z += effect->angularVelocity.z;
}
/**
@@ -667,9 +667,9 @@ void EnGo_DrawSnow(EnGoEffect effect[ENGO_SNOW_EFFECT_COUNT], PlayState* play, G
Matrix_Push();
Matrix_Translate(effect->pos.x, effect->pos.y, effect->pos.z, MTXMODE_NEW);
Matrix_Scale(0.08f, 0.08f, 0.08f, MTXMODE_APPLY);
Matrix_RotateZS(effect->rotAngle.z, MTXMODE_APPLY);
Matrix_RotateXS(effect->rotAngle.x, MTXMODE_APPLY);
Matrix_RotateYS(effect->rotAngle.y, MTXMODE_APPLY);
Matrix_RotateZS(effect->rot.z, MTXMODE_APPLY);
Matrix_RotateXS(effect->rot.x, MTXMODE_APPLY);
Matrix_RotateYS(effect->rot.y, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, model);
+2 -2
View File
@@ -33,8 +33,8 @@ typedef struct EnGoEffect {
/* 0x00 */ u8 type;
/* 0x01 */ u8 alphaDenom;
/* 0x02 */ u8 alphaNumer;
/* 0x04 */ Vec3s rotVelocity;
/* 0x0A */ Vec3s rotAngle;
/* 0x04 */ Vec3s angularVelocity;
/* 0x0A */ Vec3s rot;
/* 0x10 */ Vec3f pos;
/* 0x1C */ Vec3f accel;
/* 0x28 */ Vec3f velocity;
File diff suppressed because it is too large Load Diff
+44 -36
View File
@@ -5,61 +5,69 @@
struct EnTest7;
typedef void (*EnTest7PlayerCamFunc)(struct EnTest7*, PlayState*);
typedef void (*EnTest7ActionFunc)(struct EnTest7*, PlayState*);
typedef void (*EnTest7UnkFunc)(struct EnTest7*, PlayState*);
typedef void (*EnTest7UnkDrawFunc)(Actor*, PlayState*);
#define ENTEST7_GET(thisx) ((thisx)->params)
#define OWL_WARP_CS_GET_OCARINA_MODE(thisx) ((thisx)->params)
#define ENTEST7_MINUS1 -1
#define ENTEST7_26 0x26
#define ENTEST7_1C 0x1C
#define ENTEST7_ARRIVE -1
typedef struct {
/* 0x00 */ f32 unk_00;
/* 0x04 */ f32 unk_04;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ s16 unk_10;
} EnTest7Struct; // size >= 0x14
/* 0x08 */ f32 xzScale;
/* 0x0C */ f32 yScale;
/* 0x10 */ s16 yaw;
} OwlWarpWindCapsule; // size = 0x14
typedef enum OwlWarpFeatherType {
/* 0 */ OWL_WARP_FEATHER_TYPE_DISABLED,
/* 1 */ OWL_WARP_FEATHER_TYPE_1,
/* 2 */ OWL_WARP_FEATHER_TYPE_2
} OwlWarpFeatherType;
typedef struct {
/* 0x00 */ s32 unk_00;
/* 0x00 */ OwlWarpFeatherType type;
/* 0x04 */ s32 unk_04;
/* 0x08 */ Vec3f unk_08;
/* 0x14 */ f32 unk_14;
/* 0x18 */ f32 unk_18;
/* 0x1C */ f32 unk_1C;
/* 0x20 */ f32 unk_20;
/* 0x24 */ f32 unk_24;
/* 0x28 */ f32 unk_28;
/* 0x2C */ f32 unk_2C;
/* 0x30 */ Vec3s unk_30;
/* 0x36 */ s16 unk_36;
/* 0x38 */ s16 unk_38;
/* 0x3A */ s16 unk_3A;
} EnTest7Struct2; // size = 0x3C
/* 0x08 */ Vec3f pos;
/* 0x14 */ Vec3f velocity;
/* 0x20 */ Vec3f accel;
/* 0x2C */ f32 scale;
/* 0x30 */ Vec3s rot;
/* 0x36 */ Vec3s angularVelocity;
} OwlWarpFeather; // size = 0x3C
#define OWL_WARP_NUM_FEATHERS 100
#define OWL_WARP_FLAGS_DRAW_WINGS (1 << 0)
#define OWL_WARP_FLAGS_DRAW_WIND_CAPSULE (1 << 1)
#define OWL_WARP_FLAGS_DRAW_LENS_FLARE (1 << 2)
#define OWL_WARP_FLAGS_8 (1 << 3)
#define OWL_WARP_FLAGS_10 (1 << 4)
#define OWL_WARP_FLAGS_20 (1 << 5)
#define OWL_WARP_FLAGS_40 (1 << 6)
#define OWL_WARP_FLAGS_80 (1 << 7)
typedef struct EnTest7 {
/* 0x0000 */ Actor actor;
/* 0x0144 */ s32 unk_144;
/* 0x0148 */ EnTest7Struct unk_148;
/* 0x015C */ EnTest7Struct2 unk_15C[100];
/* 0x18CC */ SkeletonInfo unk_18CC;
/* 0x18FC */ Vec3s unk_18FC[114];
/* 0x0144 */ s32 flags;
/* 0x0148 */ OwlWarpWindCapsule windCapsule;
/* 0x015C */ OwlWarpFeather feathers[OWL_WARP_NUM_FEATHERS];
/* 0x18CC */ SkeletonInfo skeletonInfo; // wingsSkeletonInfo
/* 0x18FC */ Vec3s unk_18FC[114]; // wingsFrameData
/* 0x1BA8 */ Vec3s unk_1BA8[114];
/* 0x1E54 */ s32 unk_1E54;
/* 0x1E58 */ EnTest7UnkFunc unk_1E58;
/* 0x1E5C */ EnTest7ActionFunc actionFunc;
/* 0x1E54 */ s32 timer;
/* 0x1E58 */ EnTest7ActionFunc actionFunc;
/* 0x1E5C */ EnTest7PlayerCamFunc playerCamFunc;
/* 0x1E60 */ Vec3f subCamEye;
/* 0x1E6C */ Vec3f subCamAt;
/* 0x1E78 */ f32 subCamFov;
/* 0x1E7C */ LightNode* lightNode;
/* 0x1E80 */ LightInfo lightInfo;
/* 0x1E8E */ s16 unk_1E8E;
/* 0x1E90 */ f32 unk_1E90;
/* 0x1E94 */ f32 unk_1E94;
/* 0x1E98 */ EnTest7UnkDrawFunc unk_1E98;
/* 0x1E8E */ s16 playerYaw;
/* 0x1E90 */ f32 playerScaleX;
/* 0x1E94 */ f32 playerScaleZ;
/* 0x1E98 */ ActorFunc playerDrawFunc;
} EnTest7; // size = 0x1E9C
#endif // Z_EN_TEST7_H
@@ -220,7 +220,7 @@ void ObjKendoKanban_Init(Actor* thisx, PlayState* play) {
this->rootCornerPos = sZeroVec;
this->rotAxis = sUnitVecX;
this->rotAngle = 0;
this->rotVelocity = 0;
this->angularVelocity = 0;
this->indexLastRootCornerPos = -1;
this->hasNewRootCornerPos = false;
this->numBounces = 0;
@@ -261,7 +261,7 @@ void ObjKendoKanban_SetupTumble(ObjKendoKanban* this, PlayState* play) {
// Vertical cuts initialize the right half, spawn the left half.
this->boardFragments = OBJKENDOKANBAN_RIGHT_HALF;
this->rotVelocity = 0x71C; // 10 degrees
this->angularVelocity = 0x71C; // 10 degrees
this->actor.velocity = sVelocityRightHalf;
this->centerPoint = sCenterPointRightHalf;
@@ -276,7 +276,7 @@ void ObjKendoKanban_SetupTumble(ObjKendoKanban* this, PlayState* play) {
} else {
// Horizontal cuts initialize the bottom half, spawn the top half.
this->boardFragments = OBJKENDOKANBAN_BOTTOM_HALF;
this->rotVelocity = -0x71C; // -10 degrees
this->angularVelocity = -0x71C; // -10 degrees
this->actor.velocity = sVelocityBottomHalf;
this->centerPoint = sCenterPointBottomHalf;
@@ -290,7 +290,7 @@ void ObjKendoKanban_SetupTumble(ObjKendoKanban* this, PlayState* play) {
}
} else if (this->boardFragments == OBJKENDOKANBAN_LEFT_HALF) {
// Initialize the newly spawned left half
this->rotVelocity = 0x71C; // 10 degrees
this->angularVelocity = 0x71C; // 10 degrees
this->actor.velocity = sVelocityLeftHalf;
this->centerPoint = sCenterPointLeftHalf;
@@ -300,7 +300,7 @@ void ObjKendoKanban_SetupTumble(ObjKendoKanban* this, PlayState* play) {
this->cornerPoints[3] = sPointBL;
} else if (this->boardFragments == OBJKENDOKANBAN_TOP_HALF) {
// Initialize the newly spawned top half
this->rotVelocity = 0x71C; // 10 degrees
this->angularVelocity = 0x71C; // 10 degrees
this->actor.velocity = sVelocityTopHalf;
this->centerPoint = sCenterPointTopHalf;
@@ -317,7 +317,7 @@ void ObjKendoKanban_SetupTumble(ObjKendoKanban* this, PlayState* play) {
void ObjKendoKanban_Tumble(ObjKendoKanban* this, PlayState* play) {
this->actor.velocity.y += this->actor.gravity;
Actor_UpdatePos(&this->actor);
this->rotAngle += this->rotVelocity;
this->rotAngle += this->angularVelocity;
ObjKendoKanban_HandlePhysics(this, play);
if (this->actor.world.pos.y < -200.0f) {
this->actor.world.pos.y = -200.0f;
@@ -351,9 +351,9 @@ void ObjKendoKanban_HandlePhysics(ObjKendoKanban* this, PlayState* play) {
vecCenterOut.z -= this->centerPos.z;
verticalScalar = (this->rotAxis.x * vecCenterOut.z) + (this->rotAxis.z * -vecCenterOut.x);
if (verticalScalar < 0.0f) {
this->rotVelocity += 0x64;
this->angularVelocity += 0x64;
} else {
this->rotVelocity -= 0x64;
this->angularVelocity -= 0x64;
}
// Find the lowest point
@@ -396,7 +396,7 @@ void ObjKendoKanban_HandlePhysics(ObjKendoKanban* this, PlayState* play) {
deltaRotAngle -= 0x4000; // 90 degrees
}
this->rotAngle -= deltaRotAngle;
this->rotVelocity = 0;
this->angularVelocity = 0;
ObjKendoKanban_SetupSettled(this);
return;
}
@@ -417,16 +417,16 @@ void ObjKendoKanban_HandlePhysics(ObjKendoKanban* this, PlayState* play) {
// Adjust and (potentially) reverse rotation depending on the current
// facing of the board and the direction in which it is rotating.
if (verticalScalar > 0.0f) {
if (this->rotVelocity > 0) {
this->rotVelocity *= 1.2f;
if (this->angularVelocity > 0) {
this->angularVelocity *= 1.2f;
} else {
this->rotVelocity *= -0.6f;
this->angularVelocity *= -0.6f;
}
} else {
if (this->rotVelocity < 0) {
this->rotVelocity *= 1.2f;
if (this->angularVelocity < 0) {
this->angularVelocity *= 1.2f;
} else {
this->rotVelocity *= -0.6f;
this->angularVelocity *= -0.6f;
}
}
}
@@ -24,7 +24,7 @@ typedef struct ObjKendoKanban {
/* 0x2FC */ s32 indexLastRootCornerPos;
/* 0x300 */ s16 hasNewRootCornerPos;
/* 0x302 */ s16 rotAngle;
/* 0x304 */ s16 rotVelocity;
/* 0x304 */ s16 angularVelocity;
/* 0x306 */ UNK_TYPE1 pad306[2];
/* 0x308 */ s16 numBounces;
/* 0x30A */ s16 unk_30A;
@@ -71,7 +71,7 @@ void ObjWarpstone_Init(Actor* thisx, PlayState* play) {
Collider_InitAndSetCylinder(play, &this->collider, &this->dyna.actor, &sCylinderInit);
Actor_SetFocus(&this->dyna.actor, 40.0f);
if (!OBJ_WARPSTONE_IS_ACTIVATED(OBJ_WARPSTONE_GET_ID(&this->dyna.actor))) {
if (!GET_OWL_STATUE_ACTIVATED(OBJ_WARPSTONE_GET_OWL_WARP_ID(&this->dyna.actor))) {
ObjWarpstone_SetupAction(this, ObjWarpstone_ClosedIdle);
} else {
ObjWarpstone_SetupAction(this, ObjWarpstone_OpenedIdle);
@@ -110,7 +110,7 @@ s32 ObjWarpstone_BeginOpeningCutscene(ObjWarpstone* this, PlayState* play) {
s32 ObjWarpstone_PlayOpeningCutscene(ObjWarpstone* this, PlayState* play) {
if (this->openingCSTimer++ >= OBJ_WARPSTONE_TIMER_ACTIVATE_THRESHOLD) {
CutsceneManager_Stop(this->dyna.actor.csId);
Sram_ActivateOwl(OBJ_WARPSTONE_GET_ID(&this->dyna.actor));
Sram_ActivateOwl(OBJ_WARPSTONE_GET_OWL_WARP_ID(&this->dyna.actor));
ObjWarpstone_SetupAction(this, ObjWarpstone_OpenedIdle);
} else if (this->openingCSTimer < OBJ_WARPSTONE_TIMER_OPEN_THRESHOLD) {
Math_StepToF(&this->dyna.actor.velocity.x, 0.01f, 0.001f);
@@ -144,7 +144,7 @@ void ObjWarpstone_Update(Actor* thisx, PlayState* play) {
play->msgCtx.msgMode = MSGMODE_OWL_SAVE_0;
play->msgCtx.unk120D6 = 0;
play->msgCtx.unk120D4 = 0;
gSaveContext.save.owlSaveLocation = OBJ_WARPSTONE_GET_ID(&this->dyna.actor);
gSaveContext.save.owlWarpId = OBJ_WARPSTONE_GET_OWL_WARP_ID(&this->dyna.actor);
} else {
Message_CloseTextbox(play);
}
@@ -26,7 +26,6 @@ typedef struct ObjWarpstone {
/* 0x1AC */ ObjWarpstoneActionFunc actionFunc;
} ObjWarpstone; // size = 0x1B0
#define OBJ_WARPSTONE_GET_ID(thisx) ((u16)((thisx)->params & 0xF))
#define OBJ_WARPSTONE_IS_ACTIVATED(owlId) (((void)0, gSaveContext.save.saveInfo.playerData.owlActivationFlags) & (u16)gBitFlags[(owlId)])
#define OBJ_WARPSTONE_GET_OWL_WARP_ID(thisx) ((u16)((thisx)->params & 0xF))
#endif // Z_OBJ_WARPSTONE_H
+21 -22
View File
@@ -10541,7 +10541,7 @@ void Player_InitMode_6(PlayState* play, Player* this) {
this->stateFlags1 |= PLAYER_STATE1_20000000;
this->stateFlags2 |= PLAYER_STATE2_20000000;
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_TEST7, this->actor.world.pos.x, this->actor.world.pos.y,
this->actor.world.pos.z, 0, 0, 0, ENTEST7_MINUS1);
this->actor.world.pos.z, 0, 0, 0, ENTEST7_ARRIVE);
}
}
@@ -10610,26 +10610,25 @@ void func_80841A50(PlayState* play, Player* this) {
typedef void (*PlayerInitModeFunc)(PlayState*, Player*);
// Initialisation functions for various gameplay modes depending on spawn params. There may be at most 0x10 due to it
// using a single nybble.
// sInitModeFuncs
PlayerInitModeFunc D_8085D2CC[0x10] = {
/* 0x0 */ Player_InitMode_0,
/* 0x1 */ Player_InitMode_1,
/* 0x2 */ Player_InitMode_2,
/* 0x3 */ Player_InitMode_3,
/* 0x4 */ Player_InitMode_4,
/* 0x5 */ Player_InitMode_5,
/* 0x6 */ Player_InitMode_6,
/* 0x7 */ Player_InitMode_7,
/* 0x8 */ func_80841744,
/* 0x9 */ func_80841744,
/* 0xA */ func_8083ADF0,
/* 0xB */ Player_InitMode_B,
/* 0xC */ Player_InitMode_Telescope,
/* 0xD */ Player_InitMode_D,
/* 0xE */ func_8083ADF0,
/* 0xF */ Player_InitMode_F,
// Initialisation functions for various gameplay modes depending on spawn params.
// There may be at most 0x10 due to it using a single nybble.
PlayerInitModeFunc sPlayerInitModeFuncs[PLAYER_INITMODE_MAX] = {
Player_InitMode_0, // PLAYER_INITMODE_0
Player_InitMode_1, // PLAYER_INITMODE_1
Player_InitMode_2, // PLAYER_INITMODE_2
Player_InitMode_3, // PLAYER_INITMODE_3
Player_InitMode_4, // PLAYER_INITMODE_4
Player_InitMode_5, // PLAYER_INITMODE_5
Player_InitMode_6, // PLAYER_INITMODE_6
Player_InitMode_7, // PLAYER_INITMODE_7
func_80841744, // PLAYER_INITMODE_8
func_80841744, // PLAYER_INITMODE_9
func_8083ADF0, // PLAYER_INITMODE_A
Player_InitMode_B, // PLAYER_INITMODE_B
Player_InitMode_Telescope, // PLAYER_INITMODE_TELESCOPE
Player_InitMode_D, // PLAYER_INITMODE_D
func_8083ADF0, // PLAYER_INITMODE_E
Player_InitMode_F, // PLAYER_INITMODE_F
};
// sBlureInit
@@ -10867,7 +10866,7 @@ void Player_Init(Actor* thisx, PlayState* play) {
initMode = PLAYER_INITMODE_D;
}
D_8085D2CC[initMode](play, this);
sPlayerInitModeFuncs[initMode](play, this);
if ((this->actor.draw != NULL) && gSaveContext.save.hasTatl &&
((gSaveContext.gameMode == GAMEMODE_NORMAL) || (gSaveContext.gameMode == GAMEMODE_END_CREDITS)) &&
@@ -661,17 +661,17 @@ void KaleidoScope_DrawWorldMap(PlayState* play) {
}
}
if (IS_PAUSE_STATE_OWLWARP) {
if (IS_PAUSE_STATE_OWL_WARP) {
gDPPipeSync(POLY_OPA_DISP++);
gDPSetRenderMode(POLY_OPA_DISP++, G_RM_XLU_SURF, G_RM_XLU_SURF2);
gDPSetCombineMode(POLY_OPA_DISP++, G_CC_PRIMITIVE, G_CC_PRIMITIVE);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, R_PAUSE_OWLWARP_ALPHA);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 0, 0, 0, R_PAUSE_OWL_WARP_ALPHA);
gDPFillRectangle(POLY_OPA_DISP++, 50, 62, 270, 190);
}
Gfx_SetupDL42_Opa(play->state.gfxCtx);
if (!IS_PAUSE_STATE_OWLWARP) {
if (!IS_PAUSE_STATE_OWL_WARP) {
// Browsing the world map regions on the pause menu
gDPLoadTextureBlock(POLY_OPA_DISP++, gWorldMapDotTex, G_IM_FMT_IA, G_IM_SIZ_8b, 8, 8, 0,
G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD,
@@ -953,7 +953,7 @@ void KaleidoScope_UpdateWorldMapCursor(PlayState* play) {
if (oldCursorPoint != pauseCtx->cursorPoint[PAUSE_WORLD_MAP]) {
Audio_PlaySfx(NA_SE_SY_CURSOR);
}
} else if (pauseCtx->state == PAUSE_STATE_OWLWARP_SELECT) {
} else if (pauseCtx->state == PAUSE_STATE_OWL_WARP_SELECT) {
pauseCtx->cursorColorSet = PAUSE_CURSOR_COLOR_SET_BLUE;
oldCursorPoint = pauseCtx->cursorPoint[PAUSE_WORLD_MAP];
@@ -48,13 +48,13 @@ typedef enum {
/* 0x10 */ PAUSE_STATE_GAMEOVER_8,
/* 0x11 */ PAUSE_STATE_GAMEOVER_CONTINUE_PROMPT,
/* 0x12 */ PAUSE_STATE_GAMEOVER_10,
/* 0x13 */ PAUSE_STATE_OWLWARP_0,
/* 0x14 */ PAUSE_STATE_OWLWARP_1,
/* 0x15 */ PAUSE_STATE_OWLWARP_2,
/* 0x16 */ PAUSE_STATE_OWLWARP_3,
/* 0x17 */ PAUSE_STATE_OWLWARP_SELECT, // Selecting the destination
/* 0x18 */ PAUSE_STATE_OWLWARP_CONFIRM, // Confirming the choice given
/* 0x19 */ PAUSE_STATE_OWLWARP_6,
/* 0x13 */ PAUSE_STATE_OWL_WARP_0,
/* 0x14 */ PAUSE_STATE_OWL_WARP_1,
/* 0x15 */ PAUSE_STATE_OWL_WARP_2,
/* 0x16 */ PAUSE_STATE_OWL_WARP_3,
/* 0x17 */ PAUSE_STATE_OWL_WARP_SELECT, // Selecting the destination
/* 0x18 */ PAUSE_STATE_OWL_WARP_CONFIRM, // Confirming the choice given
/* 0x19 */ PAUSE_STATE_OWL_WARP_6,
/* 0x1A */ PAUSE_STATE_UNPAUSE_SETUP, // Unpause
/* 0x1B */ PAUSE_STATE_UNPAUSE_CLOSE
} PauseState;
@@ -89,8 +89,8 @@ typedef enum {
#define IS_PAUSE_STATE_GAMEOVER \
((pauseCtx->state >= PAUSE_STATE_GAMEOVER_0) && (pauseCtx->state <= PAUSE_STATE_GAMEOVER_10))
#define IS_PAUSE_STATE_OWLWARP \
((pauseCtx->state >= PAUSE_STATE_OWLWARP_2) && (pauseCtx->state <= PAUSE_STATE_OWLWARP_6))
#define IS_PAUSE_STATE_OWL_WARP \
((pauseCtx->state >= PAUSE_STATE_OWL_WARP_2) && (pauseCtx->state <= PAUSE_STATE_OWL_WARP_6))
#define IS_PAUSE_MAIN_STATE_SONG_PROMPT \
((pauseCtx->mainState >= PAUSE_MAIN_STATE_SONG_PROMPT_INIT) && \
@@ -662,8 +662,8 @@ void KaleidoScope_DrawPages(PlayState* play, GraphicsContext* gfxCtx) {
} else {
Matrix_RotateYF(R_PAUSE_WORLD_MAP_YAW / 1000.0f, MTXMODE_NEW);
if ((pauseCtx->state == PAUSE_STATE_OPENING_3) || (pauseCtx->state == PAUSE_STATE_OWLWARP_3) ||
(pauseCtx->state >= PAUSE_STATE_OWLWARP_6) ||
if ((pauseCtx->state == PAUSE_STATE_OPENING_3) || (pauseCtx->state == PAUSE_STATE_OWL_WARP_3) ||
(pauseCtx->state >= PAUSE_STATE_OWL_WARP_6) ||
((pauseCtx->state == PAUSE_STATE_SAVEPROMPT) &&
((pauseCtx->savePromptState == PAUSE_SAVEPROMPT_STATE_3) ||
(pauseCtx->savePromptState == PAUSE_SAVEPROMPT_STATE_7)))) {
@@ -1175,8 +1175,8 @@ void KaleidoScope_DrawOwlWarpMapPage(PlayState* play) {
Matrix_RotateYF(R_PAUSE_WORLD_MAP_YAW / 1000.0f, MTXMODE_NEW);
if ((pauseCtx->state == PAUSE_STATE_OPENING_3) || (pauseCtx->state == PAUSE_STATE_OWLWARP_3) ||
(pauseCtx->state >= PAUSE_STATE_OWLWARP_6) ||
if ((pauseCtx->state == PAUSE_STATE_OPENING_3) || (pauseCtx->state == PAUSE_STATE_OWL_WARP_3) ||
(pauseCtx->state >= PAUSE_STATE_OWL_WARP_6) ||
((pauseCtx->state == PAUSE_STATE_SAVEPROMPT) && ((pauseCtx->savePromptState == PAUSE_SAVEPROMPT_STATE_3) ||
(pauseCtx->savePromptState == PAUSE_SAVEPROMPT_STATE_7)))) {
Matrix_Translate(0.0f, (R_PAUSE_WORLD_MAP_Y_OFFSET - 8000) / 100.0f, R_PAUSE_WORLD_MAP_DEPTH / 100.0f,
@@ -1376,7 +1376,7 @@ void KaleidoScope_DrawOwlWarpInfoPanel(PlayState* play) {
ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
gDPSetEnvColor(POLY_OPA_DISP++, 20, 30, 40, 0);
if ((pauseCtx->state == PAUSE_STATE_OWLWARP_SELECT) && (pauseCtx->namedItem != PAUSE_ITEM_NONE) &&
if ((pauseCtx->state == PAUSE_STATE_OWL_WARP_SELECT) && (pauseCtx->namedItem != PAUSE_ITEM_NONE) &&
(pauseCtx->nameDisplayTimer < 40)) {
pauseCtx->infoPanelVtx[16].v.ob[0] = pauseCtx->infoPanelVtx[18].v.ob[0] = -63;
@@ -1950,8 +1950,8 @@ void KaleidoScope_SetVertices(PlayState* play, GraphicsContext* gfxCtx) {
pauseCtx->offsetY = 0;
if ((pauseCtx->state == PAUSE_STATE_OPENING_3) || (pauseCtx->state == PAUSE_STATE_OWLWARP_3) ||
(pauseCtx->state >= PAUSE_STATE_OWLWARP_6) ||
if ((pauseCtx->state == PAUSE_STATE_OPENING_3) || (pauseCtx->state == PAUSE_STATE_OWL_WARP_3) ||
(pauseCtx->state >= PAUSE_STATE_OWL_WARP_6) ||
((pauseCtx->state == PAUSE_STATE_SAVEPROMPT) && ((pauseCtx->savePromptState == PAUSE_SAVEPROMPT_STATE_3) ||
(pauseCtx->savePromptState == PAUSE_SAVEPROMPT_STATE_7)))) {
pauseCtx->offsetY = 80;
@@ -2473,14 +2473,14 @@ void KaleidoScope_UpdateCursorSize(PlayState* play) {
case PAUSE_MAP:
if (!sInDungeonScene) {
if (IS_PAUSE_STATE_OWLWARP) {
if (IS_PAUSE_STATE_OWL_WARP) {
pauseCtx->cursorX = sOwlWarpWorldMapCursorsX[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]];
pauseCtx->cursorY = sOwlWarpWorldMapCursorsY[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]];
} else {
pauseCtx->cursorX = sWorldMapCursorsX[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]];
pauseCtx->cursorY = sWorldMapCursorsY[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]];
}
if (!IS_PAUSE_STATE_OWLWARP) {
if (!IS_PAUSE_STATE_OWL_WARP) {
pauseCtx->cursorHeight = 10.0f;
pauseCtx->cursorWidth = 10.0f;
} else {
@@ -2684,7 +2684,7 @@ void KaleidoScope_Draw(PlayState* play) {
KaleidoScope_SetView(pauseCtx, pauseCtx->eye.x, pauseCtx->eye.y, pauseCtx->eye.z);
Gfx_SetupDL42_Opa(play->state.gfxCtx);
if (!IS_PAUSE_STATE_OWLWARP) {
if (!IS_PAUSE_STATE_OWL_WARP) {
// Draw Default or Game Over Menus
KaleidoScope_SetVertices(play, play->state.gfxCtx);
KaleidoScope_DrawPages(play, play->state.gfxCtx);
@@ -2723,7 +2723,7 @@ void KaleidoScope_Draw(PlayState* play) {
KaleidoScope_DrawOwlWarpInfoPanel(play);
KaleidoScope_UpdateCursorSize(play);
if (pauseCtx->state == PAUSE_STATE_OWLWARP_SELECT) {
if (pauseCtx->state == PAUSE_STATE_OWL_WARP_SELECT) {
KaleidoScope_DrawCursor(play);
}
}
@@ -3417,7 +3417,7 @@ void KaleidoScope_Update(PlayState* play) {
}
break;
case PAUSE_STATE_OWLWARP_2:
case PAUSE_STATE_OWL_WARP_2:
sPauseMenuVerticalOffset = -6240.0f;
sUnpausedButtonStatus[EQUIP_SLOT_B] = gSaveContext.buttonStatus[EQUIP_SLOT_B];
@@ -3455,13 +3455,13 @@ void KaleidoScope_Update(PlayState* play) {
DmaMgr_SendRequest0(pauseCtx->iconItemVtxSegment, SEGMENT_ROM_START(icon_item_vtx_static),
SEGMENT_ROM_SIZE(icon_item_vtx_static));
pauseCtx->state = PAUSE_STATE_OWLWARP_3;
pauseCtx->state = PAUSE_STATE_OWL_WARP_3;
sGameOverRectPosY = 98;
pauseCtx->promptChoice = PAUSE_PROMPT_YES;
break;
case PAUSE_STATE_OWLWARP_3:
R_PAUSE_OWLWARP_ALPHA += 20;
case PAUSE_STATE_OWL_WARP_3:
R_PAUSE_OWL_WARP_ALPHA += 20;
pauseCtx->infoPanelOffsetY += 10;
pauseCtx->mapPageRoll -= 40.0f;
interfaceCtx->startAlpha += 63;
@@ -3476,15 +3476,15 @@ void KaleidoScope_Update(PlayState* play) {
pauseCtx->alpha = 255;
pauseCtx->mainState = PAUSE_MAIN_STATE_IDLE;
pauseCtx->cursorSpecialPos = 0;
pauseCtx->state = PAUSE_STATE_OWLWARP_SELECT;
R_PAUSE_OWLWARP_ALPHA = 120;
pauseCtx->state = PAUSE_STATE_OWL_WARP_SELECT;
R_PAUSE_OWL_WARP_ALPHA = 120;
}
break;
case PAUSE_STATE_OWLWARP_SELECT:
case PAUSE_STATE_OWL_WARP_SELECT:
if (CHECK_BTN_ALL(input->press.button, BTN_START) || CHECK_BTN_ALL(input->press.button, BTN_B)) {
func_8011552C(play, DO_ACTION_NONE);
pauseCtx->state = PAUSE_STATE_OWLWARP_6;
pauseCtx->state = PAUSE_STATE_OWL_WARP_6;
sPauseMenuVerticalOffset = -6240.0f;
Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE);
play->msgCtx.ocarinaMode = OCARINA_MODE_END;
@@ -3492,38 +3492,38 @@ void KaleidoScope_Update(PlayState* play) {
} else if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
Audio_PlaySfx(NA_SE_SY_DECIDE);
Message_StartTextbox(play, 0x1B93, NULL);
pauseCtx->state = PAUSE_STATE_OWLWARP_CONFIRM;
pauseCtx->state = PAUSE_STATE_OWL_WARP_CONFIRM;
} else {
KaleidoScope_UpdateOwlWarpNamePanel(play);
}
break;
case PAUSE_STATE_OWLWARP_CONFIRM:
case PAUSE_STATE_OWL_WARP_CONFIRM:
if (CHECK_BTN_ALL(input->press.button, BTN_A)) {
msgCtx->msgLength = 0;
msgCtx->msgMode = MSGMODE_NONE;
if (msgCtx->choiceIndex == 0) {
func_8011552C(play, DO_ACTION_NONE);
pauseCtx->state = PAUSE_STATE_OWLWARP_6;
pauseCtx->state = PAUSE_STATE_OWL_WARP_6;
sPauseMenuVerticalOffset = -6240.0f;
Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE);
play->msgCtx.ocarinaMode = sCursorPointsToOcarinaModes[pauseCtx->cursorPoint[PAUSE_WORLD_MAP]];
Audio_PlaySfx(NA_SE_SY_DECIDE);
} else {
pauseCtx->state = PAUSE_STATE_OWLWARP_SELECT;
pauseCtx->state = PAUSE_STATE_OWL_WARP_SELECT;
func_8011552C(play, DO_ACTION_WARP);
Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS);
}
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
msgCtx->msgLength = 0;
msgCtx->msgMode = MSGMODE_NONE;
pauseCtx->state = PAUSE_STATE_OWLWARP_SELECT;
pauseCtx->state = PAUSE_STATE_OWL_WARP_SELECT;
Audio_PlaySfx(NA_SE_SY_MESSAGE_PASS);
} else if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
msgCtx->msgLength = 0;
msgCtx->msgMode = MSGMODE_NONE;
func_8011552C(play, DO_ACTION_NONE);
pauseCtx->state = PAUSE_STATE_OWLWARP_6;
pauseCtx->state = PAUSE_STATE_OWL_WARP_6;
sPauseMenuVerticalOffset = -6240.0f;
Audio_PlaySfx_PauseMenuOpenOrClose(SFX_PAUSE_MENU_CLOSE);
play->msgCtx.ocarinaMode = OCARINA_MODE_END;
@@ -3531,11 +3531,11 @@ void KaleidoScope_Update(PlayState* play) {
}
break;
case PAUSE_STATE_OWLWARP_6:
case PAUSE_STATE_OWL_WARP_6:
if (pauseCtx->mapPageRoll != 160.0f) {
R_PAUSE_OWLWARP_ALPHA -= 60;
if (R_PAUSE_OWLWARP_ALPHA <= 0) {
R_PAUSE_OWLWARP_ALPHA = 0;
R_PAUSE_OWL_WARP_ALPHA -= 60;
if (R_PAUSE_OWL_WARP_ALPHA <= 0) {
R_PAUSE_OWL_WARP_ALPHA = 0;
}
pauseCtx->infoPanelOffsetY -= 10;
pauseCtx->mapPageRoll += 40.0f;
@@ -3691,7 +3691,7 @@ void KaleidoScope_Update(PlayState* play) {
// Process the Cursor input
if ((R_PAUSE_BG_PRERENDER_STATE == PAUSE_BG_PRERENDER_READY) && (pauseCtx->debugEditor == DEBUG_EDITOR_NONE) &&
!IS_PAUSE_STATE_OWLWARP &&
!IS_PAUSE_STATE_OWL_WARP &&
(((pauseCtx->state >= PAUSE_STATE_OPENING_3) && (pauseCtx->state <= PAUSE_STATE_SAVEPROMPT)) ||
((pauseCtx->state >= PAUSE_STATE_GAMEOVER_2) && (pauseCtx->state <= PAUSE_STATE_UNPAUSE_SETUP)))) {
if (!IS_PAUSE_STATE_GAMEOVER) {
@@ -3726,7 +3726,7 @@ void KaleidoScope_Update(PlayState* play) {
if (pauseCtx->state == PAUSE_STATE_MAIN) {
KaleidoScope_UpdateNamePanel(play);
}
} else if (pauseCtx->state == PAUSE_STATE_OWLWARP_SELECT) {
} else if (pauseCtx->state == PAUSE_STATE_OWL_WARP_SELECT) {
KaleidoScope_UpdateWorldMapCursor(play);
KaleidoScope_UpdateNamePanel(play);
}