Document DemoSa (Saria's cutscene actions) (#2669)

* Document DemoSa (Saria's cutscene actions)

* Add missing include

* Add another missing include

* Change struct to enum

* add action enum comments to action funcs array

* comment on `DemoSa_InitChamberOfSages` not setting action and relying on the struct being zerod

* fixup demosa action enum numbering formatting

* Rename Unknown -> Unused

* Rename init function

* Missed rename

* Use `ANIMMODE` enum

Co-authored-by: Copilot <copilot@github.com>

* Remove redundant includes

* Rename Ganon actions to SageAction

* Rename sage-related actions

* More renames

* SageAction -> SageMagic

* Restore duplicate eye/mouth enums

* Minor style fixes

* Better action function name matching

---------

Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
Jordan Longstaff
2026-05-25 00:25:11 -04:00
committed by GitHub
parent 2b29808f8d
commit 3af589ba3b
3 changed files with 331 additions and 282 deletions
+291 -272
View File
@@ -31,47 +31,47 @@ void DemoSa_Destroy(Actor* thisx, PlayState* play);
void DemoSa_Update(Actor* thisx, PlayState* play);
void DemoSa_Draw(Actor* thisx, PlayState* play);
void func_8098EBB8(DemoSa* this, PlayState* play);
void func_8098EBD8(DemoSa* this, PlayState* play);
void func_8098EBF8(DemoSa* this, PlayState* play);
void func_8098EC28(DemoSa* this, PlayState* play);
void func_8098EC60(DemoSa* this, PlayState* play);
void func_8098EC94(DemoSa* this, PlayState* play);
void func_8098ECCC(DemoSa* this, PlayState* play);
void func_8098F0E8(DemoSa* this, PlayState* play);
void func_8098F118(DemoSa* this, PlayState* play);
void func_8098F16C(DemoSa* this, PlayState* play);
void func_8098F3F0(DemoSa* this, PlayState* play);
void func_8098F714(DemoSa* this, PlayState* play);
void func_8098F734(DemoSa* this, PlayState* play);
void func_8098F77C(DemoSa* this, PlayState* play);
void func_8098F7BC(DemoSa* this, PlayState* play);
void func_8098F7FC(DemoSa* this, PlayState* play);
void func_8098FC44(DemoSa* this, PlayState* play);
void func_8098FC64(DemoSa* this, PlayState* play);
void func_8098FC9C(DemoSa* this, PlayState* play);
void func_8098FCD4(DemoSa* this, PlayState* play);
void func_8098FD0C(DemoSa* this, PlayState* play);
void DemoSa_Action_SetupForestMedallionCs(DemoSa* this, PlayState* play);
void DemoSa_Action_AwaitBlueWarp(DemoSa* this, PlayState* play);
void DemoSa_Action_RiseThroughBlueWarp(DemoSa* this, PlayState* play);
void DemoSa_Action_ChamberOfSagesDialog(DemoSa* this, PlayState* play);
void DemoSa_Action_RaiseArmsForMedallion(DemoSa* this, PlayState* play);
void DemoSa_Action_AwaitMedallion(DemoSa* this, PlayState* play);
void DemoSa_Action_EndMedallionCs(DemoSa* this, PlayState* play);
void DemoSa_Action_SageInvisible(DemoSa* this, PlayState* play);
void DemoSa_Action_SageFade(DemoSa* this, PlayState* play);
void DemoSa_Action_AwaitLightBall(DemoSa* this, PlayState* play);
void DemoSa_Action_Unused(DemoSa* this, PlayState* play);
void DemoSa_Action_CreditsInvisible(DemoSa* this, PlayState* play);
void DemoSa_Action_CreditsFadeIn(DemoSa* this, PlayState* play);
void DemoSa_Action_CreditsFacingForward(DemoSa* this, PlayState* play);
void DemoSa_Action_CreditsLookDownAtDarunia(DemoSa* this, PlayState* play);
void DemoSa_Action_CreditsLookBackUp(DemoSa* this, PlayState* play);
void DemoSa_Action_BridgeInvisible(DemoSa* this, PlayState* play);
void DemoSa_Action_BridgeFadeIn(DemoSa* this, PlayState* play);
void DemoSa_Action_BridgeLookingSad(DemoSa* this, PlayState* play);
void DemoSa_Action_BridgeClutchOcarina(DemoSa* this, PlayState* play);
void DemoSa_Action_BridgeGiveOcarina(DemoSa* this, PlayState* play);
void DemoSa_DrawNothing(DemoSa* this, PlayState* play);
void DemoSa_DrawOpa(DemoSa* this, PlayState* play);
void DemoSa_DrawXlu(DemoSa* this, PlayState* play);
typedef enum SariaEyeState {
typedef enum SariaEyes {
/* 0 */ SARIA_EYE_OPEN,
/* 1 */ SARIA_EYE_HALF,
/* 2 */ SARIA_EYE_CLOSED,
/* 3 */ SARIA_EYE_SUPRISED,
/* 3 */ SARIA_EYE_SURPRISED,
/* 4 */ SARIA_EYE_SAD
} SariaEyeState;
} SariaEyes;
typedef enum SariaMouthState {
typedef enum SariaMouth {
/* 0 */ SARIA_MOUTH_CLOSED2,
/* 1 */ SARIA_MOUTH_SUPRISED,
/* 1 */ SARIA_MOUTH_SURPRISED,
/* 2 */ SARIA_MOUTH_CLOSED,
/* 3 */ SARIA_MOUTH_SMILING_OPEN,
/* 4 */ SARIA_MOUTH_FROWNING
} SariaMouthState;
} SariaMouth;
static void* sEyeTextures[] = {
gSariaEyeOpenTex, gSariaEyeHalfTex, gSariaEyeClosedTex, gSariaEyeSuprisedTex, gSariaEyeSadTex,
@@ -89,9 +89,27 @@ static u32 D_80990108 = 0;
#include "z_demo_sa_cutscene_data.inc.c"
static DemoSaActionFunc sActionFuncs[] = {
func_8098EBB8, func_8098EBD8, func_8098EBF8, func_8098EC28, func_8098EC60, func_8098EC94, func_8098ECCC,
func_8098F0E8, func_8098F118, func_8098F16C, func_8098F3F0, func_8098F714, func_8098F734, func_8098F77C,
func_8098F7BC, func_8098F7FC, func_8098FC44, func_8098FC64, func_8098FC9C, func_8098FCD4, func_8098FD0C,
DemoSa_Action_SetupForestMedallionCs, // DEMOSA_ACTION_SETUP_FOREST_MEDALLION_CS
DemoSa_Action_AwaitBlueWarp, // DEMOSA_ACTION_AWAIT_BLUE_WARP
DemoSa_Action_RiseThroughBlueWarp, // DEMOSA_ACTION_RISE_THROUGH_BLUE_WARP
DemoSa_Action_ChamberOfSagesDialog, // DEMOSA_ACTION_CHAMBER_OF_SAGES_DIALOG
DemoSa_Action_RaiseArmsForMedallion, // DEMOSA_ACTION_RAISE_ARMS_FOR_MEDALLION
DemoSa_Action_AwaitMedallion, // DEMOSA_ACTION_AWAIT_FOREST_MEDALLION
DemoSa_Action_EndMedallionCs, // DEMOSA_ACTION_END_MEDALLION_CS
DemoSa_Action_SageInvisible, // DEMOSA_ACTION_SAGE_INVISIBLE
DemoSa_Action_SageFade, // DEMOSA_ACTION_SAGE_FADE
DemoSa_Action_AwaitLightBall, // DEMOSA_ACTION_AWAIT_LIGHT_BALL
DemoSa_Action_Unused, // DEMOSA_ACTION_UNUSED
DemoSa_Action_CreditsInvisible, // DEMOSA_ACTION_CREDITS_INVISIBLE
DemoSa_Action_CreditsFadeIn, // DEMOSA_ACTION_CREDITS_FADE_IN
DemoSa_Action_CreditsFacingForward, // DEMOSA_ACTION_CREDITS_FACING_FORWARD
DemoSa_Action_CreditsLookDownAtDarunia, // DEMOSA_ACTION_CREDITS_LOOK_DOWN_AT_DARUNIA
DemoSa_Action_CreditsLookBackUp, // DEMOSA_ACTION_CREDITS_LOOK_BACK_UP
DemoSa_Action_BridgeInvisible, // DEMOSA_ACTION_BRIDGE_INVISIBLE
DemoSa_Action_BridgeFadeIn, // DEMOSA_ACTION_BRIDGE_FADE_IN
DemoSa_Action_BridgeLookingSad, // DEMOSA_ACTION_BRIDGE_LOOKING_SAD
DemoSa_Action_BridgeClutchOcarina, // DEMOSA_ACTION_BRIDGE_CLUTCH_OCARINA
DemoSa_Action_BridgeGiveOcarina, // DEMOSA_ACTION_BRIDGE_GIVE_OCARINA
};
static DemoSaDrawFunc sDrawFuncs[] = {
@@ -118,7 +136,7 @@ void DemoSa_Destroy(Actor* thisx, PlayState* play) {
SkelAnime_Free(&this->skelAnime, play);
}
void func_8098E480(DemoSa* this) {
void DemoSa_Blink(DemoSa* this) {
s32 pad[2];
s16* eyeIndex = &this->eyeIndex;
s16* blinkTimer = &this->blinkTimer;
@@ -128,27 +146,27 @@ void func_8098E480(DemoSa* this) {
}
*eyeIndex = *blinkTimer;
if (*eyeIndex >= 3) {
*eyeIndex = 0;
if (*eyeIndex >= SARIA_EYE_SURPRISED) {
*eyeIndex = SARIA_EYE_OPEN;
}
}
void DemoSa_SetEyeIndex(DemoSa* this, s16 eyeIndex) {
void DemoSa_SetEyes(DemoSa* this, s16 eyeIndex) {
this->eyeIndex = eyeIndex;
}
void DemoSa_SetMouthIndex(DemoSa* this, s16 mouthIndex) {
void DemoSa_SetMouth(DemoSa* this, s16 mouthIndex) {
this->mouthIndex = mouthIndex;
}
#if DEBUG_FEATURES
void func_8098E530(DemoSa* this) {
this->action = 7;
this->drawConfig = 0;
this->action = DEMOSA_ACTION_SAGE_INVISIBLE;
this->drawConfig = DEMOSA_DRAW_NOTHING;
this->alpha = 0;
this->unk_1A8 = 0;
this->isLightBall = false;
this->actor.shape.shadowAlpha = 0;
this->unk_1A0 = 0.0f;
this->fadeTimer = 0.0f;
}
void func_8098E554(DemoSa* this, PlayState* play) {
@@ -167,7 +185,7 @@ void func_8098E554(DemoSa* this, PlayState* play) {
}
#endif
void func_8098E5C8(DemoSa* this, PlayState* play) {
void DemoSa_UpdateBgCheckInfo(DemoSa* this, PlayState* play) {
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 30.0f, 30.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
}
@@ -185,7 +203,7 @@ CsCmdActorCue* DemoSa_GetCue(PlayState* play, s32 cueChannel) {
return NULL;
}
s32 func_8098E654(DemoSa* this, PlayState* play, u16 cueId, s32 cueChannel) {
s32 DemoSa_CheckForCue(DemoSa* this, PlayState* play, u16 cueId, s32 cueChannel) {
CsCmdActorCue* cue = DemoSa_GetCue(play, cueChannel);
if ((cue != NULL) && (cue->id == cueId)) {
@@ -195,7 +213,7 @@ s32 func_8098E654(DemoSa* this, PlayState* play, u16 cueId, s32 cueChannel) {
return false;
}
s32 func_8098E6A0(DemoSa* this, PlayState* play, u16 cueId, s32 cueChannel) {
s32 DemoSa_CheckForNoCue(DemoSa* this, PlayState* play, u16 cueId, s32 cueChannel) {
CsCmdActorCue* cue = DemoSa_GetCue(play, cueChannel);
if ((cue != NULL) && (cue->id != cueId)) {
@@ -205,7 +223,7 @@ s32 func_8098E6A0(DemoSa* this, PlayState* play, u16 cueId, s32 cueChannel) {
return false;
}
void func_8098E6EC(DemoSa* this, PlayState* play, s32 cueChannel) {
void DemoSa_SetStartPosRotFromCue(DemoSa* this, PlayState* play, s32 cueChannel) {
CsCmdActorCue* cue = DemoSa_GetCue(play, cueChannel);
if (cue != NULL) {
@@ -217,34 +235,35 @@ void func_8098E6EC(DemoSa* this, PlayState* play, s32 cueChannel) {
}
}
void func_8098E76C(DemoSa* this, AnimationHeader* animHeaderSeg, u8 arg2, f32 morphFrames, s32 arg4) {
void DemoSa_AnimationChange(DemoSa* this, AnimationHeader* animHeaderSeg, u8 mode, f32 morphFrames, s32 playReversed) {
s32 pad[2];
f32 frameCount = Animation_GetLastFrame(animHeaderSeg);
f32 playbackSpeed;
f32 unk0;
f32 fc;
f32 startFrame;
f32 endFrame;
if (arg4 == 0) {
unk0 = 0.0f;
fc = frameCount;
if (!playReversed) {
startFrame = 0.0f;
endFrame = frameCount;
playbackSpeed = 1.0f;
} else {
fc = 0.0f;
unk0 = frameCount;
endFrame = 0.0f;
startFrame = frameCount;
playbackSpeed = -1.0f;
}
Animation_Change(&this->skelAnime, animHeaderSeg, playbackSpeed, unk0, fc, arg2, morphFrames);
Animation_Change(&this->skelAnime, animHeaderSeg, playbackSpeed, startFrame, endFrame, mode, morphFrames);
}
void func_8098E7FC(DemoSa* this, PlayState* play) {
void DemoSa_InitChamberOfSages(DemoSa* this, PlayState* play) {
// action is DEMOSA_ACTION_SETUP_FOREST_MEDALLION_CS from the Actor struct being zero'd
SkelAnime_InitFlex(play, &this->skelAnime, &gSariaSkel, &gSariaWaitArmsToSideAnim, NULL, NULL, 0);
this->actor.shape.yOffset = -10000.0f;
DemoSa_SetEyeIndex(this, SARIA_EYE_HALF);
DemoSa_SetMouthIndex(this, SARIA_MOUTH_CLOSED2);
DemoSa_SetEyes(this, SARIA_EYE_HALF);
DemoSa_SetMouth(this, SARIA_MOUTH_CLOSED2);
}
void func_8098E86C(DemoSa* this, PlayState* play) {
void DemoSa_CsForestMedallion_SpawnDoorWarp(DemoSa* this, PlayState* play) {
Vec3f* world = &this->actor.world.pos;
f32 posX = world->x;
f32 posY = world->y;
@@ -253,7 +272,7 @@ void func_8098E86C(DemoSa* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DOOR_WARP1, posX, posY, posZ, 0, 0, 0, WARP_SAGES);
}
void func_8098E8C8(DemoSa* this, PlayState* play) {
void DemoSa_CsForestMedallion_SpawnMedallion(DemoSa* this, PlayState* play) {
Player* player = GET_PLAYER(play);
f32 posX = player->actor.world.pos.x;
f32 posY = player->actor.world.pos.y + 80.0f;
@@ -263,17 +282,17 @@ void func_8098E8C8(DemoSa* this, PlayState* play) {
Item_Give(play, ITEM_MEDALLION_FOREST);
}
void func_8098E944(DemoSa* this, PlayState* play) {
void DemoSa_CsForestMedallion_Rise(DemoSa* this, PlayState* play) {
this->actor.shape.yOffset += (250.0f / 3.0f);
}
void func_8098E960(DemoSa* this, PlayState* play) {
void DemoSa_CsForestMedallion_CheckCutscene(DemoSa* this, PlayState* play) {
s32 pad[2];
Player* player;
if ((gSaveContext.chamberCutsceneNum == CHAMBER_CS_FOREST) && !IS_CUTSCENE_LAYER) {
player = GET_PLAYER(play);
this->action = 1;
this->action = DEMOSA_ACTION_AWAIT_BLUE_WARP;
play->csCtx.script = gForestMedallionCs;
gSaveContext.cutsceneTrigger = 2;
Item_Give(play, ITEM_MEDALLION_FOREST);
@@ -281,27 +300,27 @@ void func_8098E960(DemoSa* this, PlayState* play) {
}
}
void func_8098E9EC(DemoSa* this, PlayState* play) {
void DemoSa_CsForestMedallion_CheckBlueWarp(DemoSa* this, PlayState* play) {
CsCmdActorCue* cue;
if (play->csCtx.state != CS_STATE_IDLE) {
cue = play->csCtx.actorCues[4];
if ((cue != NULL) && (cue->id == 2)) {
this->action = 2;
this->drawConfig = 1;
func_8098E86C(this, play);
this->action = DEMOSA_ACTION_RISE_THROUGH_BLUE_WARP;
this->drawConfig = DEMOSA_DRAW_OPA;
DemoSa_CsForestMedallion_SpawnDoorWarp(this, play);
}
}
}
void func_8098EA3C(DemoSa* this) {
void DemoSa_CsForestMedallion_EndRise(DemoSa* this) {
if (this->actor.shape.yOffset >= 0.0f) {
this->action = 3;
this->action = DEMOSA_ACTION_CHAMBER_OF_SAGES_DIALOG;
this->actor.shape.yOffset = 0.0f;
}
}
void func_8098EA68(DemoSa* this, PlayState* play) {
void DemoSa_CsForestMedallion_CheckStartRaisingArms(DemoSa* this, PlayState* play) {
CsCmdActorCue* cue;
if (play->csCtx.state != CS_STATE_IDLE) {
@@ -309,174 +328,174 @@ void func_8098EA68(DemoSa* this, PlayState* play) {
if ((cue != NULL) && (cue->id == 3)) {
Animation_Change(&this->skelAnime, &gSariaGiveForestMedallionAnim, 1.0f, 0.0f,
Animation_GetLastFrame(&gSariaGiveForestMedallionAnim), ANIMMODE_ONCE, -4.0f);
this->action = 4;
this->action = DEMOSA_ACTION_RAISE_ARMS_FOR_MEDALLION;
}
}
}
void func_8098EB00(DemoSa* this, s32 arg1) {
if (arg1 != 0) {
void DemoSa_CsForestMedallion_HoldArmsUp(DemoSa* this, s32 doneRaising) {
if (doneRaising) {
Animation_Change(&this->skelAnime, &gSariaGiveForestMedallionStandAnim, 1.0f, 0.0f,
Animation_GetLastFrame(&gSariaGiveForestMedallionStandAnim), ANIMMODE_LOOP, 0.0f);
this->action = 5;
this->action = DEMOSA_ACTION_AWAIT_FOREST_MEDALLION;
}
}
void func_8098EB6C(DemoSa* this, PlayState* play) {
void DemoSa_CsForestMedallion_CheckMedallionShouldSpawn(DemoSa* this, PlayState* play) {
CsCmdActorCue* cue;
if (play->csCtx.state != CS_STATE_IDLE) {
cue = play->csCtx.actorCues[6];
if ((cue != NULL) && (cue->id == 2)) {
this->action = 6;
func_8098E8C8(this, play);
this->action = DEMOSA_ACTION_END_MEDALLION_CS;
DemoSa_CsForestMedallion_SpawnMedallion(this, play);
}
}
}
void func_8098EBB8(DemoSa* this, PlayState* play) {
func_8098E960(this, play);
void DemoSa_Action_SetupForestMedallionCs(DemoSa* this, PlayState* play) {
DemoSa_CsForestMedallion_CheckCutscene(this, play);
}
void func_8098EBD8(DemoSa* this, PlayState* play) {
func_8098E9EC(this, play);
void DemoSa_Action_AwaitBlueWarp(DemoSa* this, PlayState* play) {
DemoSa_CsForestMedallion_CheckBlueWarp(this, play);
}
void func_8098EBF8(DemoSa* this, PlayState* play) {
func_8098E944(this, play);
void DemoSa_Action_RiseThroughBlueWarp(DemoSa* this, PlayState* play) {
DemoSa_CsForestMedallion_Rise(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098EA3C(this);
DemoSa_CsForestMedallion_EndRise(this);
}
void func_8098EC28(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_ChamberOfSagesDialog(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098EA68(this, play);
DemoSa_CsForestMedallion_CheckStartRaisingArms(this, play);
}
void func_8098EC60(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
func_8098EB00(this, DemoSa_UpdateSkelAnime(this));
void DemoSa_Action_RaiseArmsForMedallion(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_CsForestMedallion_HoldArmsUp(this, DemoSa_UpdateSkelAnime(this));
}
void func_8098EC94(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_AwaitMedallion(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098EB6C(this, play);
DemoSa_CsForestMedallion_CheckMedallionShouldSpawn(this, play);
}
void func_8098ECCC(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_EndMedallionCs(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
}
void func_8098ECF4(DemoSa* this, PlayState* play) {
void DemoSa_InitTrialOrSealingGanon(DemoSa* this, PlayState* play) {
s32 pad[2];
SkelAnime* skelAnime = &this->skelAnime;
f32 frameCount = Animation_GetLastFrame(&gSariaSealGanonAnim);
SkelAnime_InitFlex(play, skelAnime, &gSariaSkel, NULL, NULL, NULL, 0);
Animation_Change(skelAnime, &gSariaSealGanonAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, 0.0f);
this->action = 7;
this->action = DEMOSA_ACTION_SAGE_INVISIBLE;
this->actor.shape.shadowAlpha = 0;
DemoSa_SetEyeIndex(this, SARIA_EYE_CLOSED);
DemoSa_SetMouthIndex(this, SARIA_MOUTH_CLOSED);
DemoSa_SetEyes(this, SARIA_EYE_CLOSED);
DemoSa_SetMouth(this, SARIA_MOUTH_CLOSED);
}
void func_8098EDB0(DemoSa* this) {
void DemoSa_SageMagic_LowerEyes(DemoSa* this) {
f32 curFrame = this->skelAnime.curFrame;
if ((this->skelAnime.mode == 2) && (curFrame >= 32.0f)) {
DemoSa_SetEyeIndex(this, SARIA_EYE_HALF);
DemoSa_SetMouthIndex(this, SARIA_MOUTH_CLOSED2);
DemoSa_SetEyes(this, SARIA_EYE_HALF);
DemoSa_SetMouth(this, SARIA_MOUTH_CLOSED2);
}
}
void func_8098EE08(void) {
void DemoSa_Sfx_WhiteOut(void) {
Sfx_PlaySfxCentered2(NA_SE_SY_WHITE_OUT_T);
}
void func_8098EE28(DemoSa* this, PlayState* play) {
void DemoSa_SageMagic_SpawnLightBall(DemoSa* this, PlayState* play) {
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_DEMO_6K, this->actor.world.pos.x,
(kREG(23) + 25.0f) + this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 4);
}
void func_8098EEA8(DemoSa* this, PlayState* play) {
if (func_8098E654(this, play, 4, 4)) {
this->action = 8;
this->drawConfig = 2;
void DemoSa_SageMagic_CheckFadeIn(DemoSa* this, PlayState* play) {
if (DemoSa_CheckForCue(this, play, 4, 4)) {
this->action = DEMOSA_ACTION_SAGE_FADE;
this->drawConfig = DEMOSA_DRAW_XLU;
this->alpha = 0;
this->actor.shape.shadowAlpha = 0;
this->unk_1A0 = 0.0f;
func_8098EE08();
this->fadeTimer = 0.0f;
DemoSa_Sfx_WhiteOut();
}
}
void func_8098EEFC(DemoSa* this, PlayState* play) {
void DemoSa_SageMagic_Fade(DemoSa* this, PlayState* play) {
s32 alpha = 255;
f32* unk_1A0 = &this->unk_1A0;
f32* fadeTimer = &this->fadeTimer;
if (func_8098E654(this, play, 4, 4)) {
*unk_1A0 += 1.0f;
if ((kREG(5) + 10.0f) <= *unk_1A0) {
this->action = 9;
this->drawConfig = 1;
*unk_1A0 = kREG(5) + 10.0f;
if (DemoSa_CheckForCue(this, play, 4, 4)) {
*fadeTimer += 1.0f;
if ((kREG(5) + 10.0f) <= *fadeTimer) {
this->action = DEMOSA_ACTION_AWAIT_LIGHT_BALL;
this->drawConfig = DEMOSA_DRAW_OPA;
*fadeTimer = kREG(5) + 10.0f;
this->alpha = alpha;
this->actor.shape.shadowAlpha = alpha;
return;
}
} else {
*unk_1A0 -= 1.0f;
if (*unk_1A0 <= 0.0f) {
this->action = 7;
this->drawConfig = 0;
*unk_1A0 = 0.0f;
*fadeTimer -= 1.0f;
if (*fadeTimer <= 0.0f) {
this->action = DEMOSA_ACTION_SAGE_INVISIBLE;
this->drawConfig = DEMOSA_DRAW_NOTHING;
*fadeTimer = 0.0f;
this->alpha = 0;
this->actor.shape.shadowAlpha = 0;
return;
}
}
this->actor.shape.shadowAlpha = this->alpha = (*unk_1A0 / (kREG(5) + 10.0f)) * 255.0f;
this->actor.shape.shadowAlpha = this->alpha = (*fadeTimer / (kREG(5) + 10.0f)) * 255.0f;
}
void func_8098F050(DemoSa* this, PlayState* play) {
if (func_8098E6A0(this, play, 4, 4)) {
this->action = 8;
this->drawConfig = 2;
this->unk_1A0 = kREG(5) + 10.0f;
void DemoSa_SageMagic_CheckFadeOut(DemoSa* this, PlayState* play) {
if (DemoSa_CheckForNoCue(this, play, 4, 4)) {
this->action = DEMOSA_ACTION_SAGE_FADE;
this->drawConfig = DEMOSA_DRAW_XLU;
this->fadeTimer = kREG(5) + 10.0f;
this->alpha = 255;
if (this->unk_1A8 == 0) {
func_8098EE28(this, play);
this->unk_1A8 = 1;
if (!this->isLightBall) {
DemoSa_SageMagic_SpawnLightBall(this, play);
this->isLightBall = true;
}
this->actor.shape.shadowAlpha = 0xFF;
}
}
void func_8098F0E8(DemoSa* this, PlayState* play) {
func_8098EEA8(this, play);
void DemoSa_Action_SageInvisible(DemoSa* this, PlayState* play) {
DemoSa_SageMagic_CheckFadeIn(this, play);
#if DEBUG_FEATURES
func_8098E554(this, play);
#endif
}
void func_8098F118(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_SageFade(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098E480(this);
func_8098EEFC(this, play);
DemoSa_Blink(this);
DemoSa_SageMagic_Fade(this, play);
#if DEBUG_FEATURES
func_8098E554(this, play);
#endif
}
void func_8098F16C(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_AwaitLightBall(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098EDB0(this);
func_8098F050(this, play);
DemoSa_SageMagic_LowerEyes(this);
DemoSa_SageMagic_CheckFadeOut(this, play);
#if DEBUG_FEATURES
func_8098E554(this, play);
#endif
@@ -485,19 +504,19 @@ void func_8098F16C(DemoSa* this, PlayState* play) {
void DemoSa_DrawXlu(DemoSa* this, PlayState* play) {
s32 pad[2];
s16 eyeIndex = this->eyeIndex;
void* sp78 = sEyeTextures[eyeIndex];
void* eyeTexture = sEyeTextures[eyeIndex];
s16 mouthIndex = this->mouthIndex;
s32 pad2;
void* sp6C = sMouthTextures[mouthIndex];
void* mouthTexture = sMouthTextures[mouthIndex];
SkelAnime* skelAnime = &this->skelAnime;
OPEN_DISPS(play->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 296);
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sp78));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sp78));
gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(sp6C));
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTexture));
gSPSegment(POLY_XLU_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(eyeTexture));
gSPSegment(POLY_XLU_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(mouthTexture));
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->alpha);
gSPSegment(POLY_XLU_DISP++, 0x0C, D_80116280);
@@ -507,71 +526,71 @@ void DemoSa_DrawXlu(DemoSa* this, PlayState* play) {
CLOSE_DISPS(play->state.gfxCtx, "../z_demo_sa_inKenjyanomaDemo02.c", 325);
}
void func_8098F390(DemoSa* this, PlayState* play) {
void DemoSa_InitUnused(DemoSa* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gSariaSkel, &gSariaWaitArmsToSideAnim, NULL, NULL, 0);
this->action = 10;
this->drawConfig = 1;
this->action = DEMOSA_ACTION_UNUSED;
this->drawConfig = DEMOSA_DRAW_OPA;
}
void func_8098F3F0(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_Unused(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098E480(this);
DemoSa_Blink(this);
}
void func_8098F420(DemoSa* this, PlayState* play) {
void DemoSa_InitCredits(DemoSa* this, PlayState* play) {
SkelAnime_InitFlex(play, &this->skelAnime, &gSariaSkel, &gSariaSitting3Anim, NULL, NULL, 0);
this->action = 11;
this->drawConfig = 0;
this->action = DEMOSA_ACTION_CREDITS_INVISIBLE;
this->drawConfig = DEMOSA_DRAW_NOTHING;
this->actor.shape.shadowAlpha = 0;
}
void func_8098F480(DemoSa* this) {
void DemoSa_Credits_FadeIn(DemoSa* this) {
s32 alpha = 255;
f32* unk_1A0 = &this->unk_1A0;
f32 temp_f0;
f32* fadeTimer = &this->fadeTimer;
f32 fadeDuration;
*unk_1A0 += 1.0f;
temp_f0 = kREG(17) + 10.0f;
*fadeTimer += 1.0f;
fadeDuration = kREG(17) + 10.0f;
if (temp_f0 <= *unk_1A0) {
if (fadeDuration <= *fadeTimer) {
this->actor.shape.shadowAlpha = this->alpha = alpha;
} else {
this->actor.shape.shadowAlpha = this->alpha = (*unk_1A0 / temp_f0) * 255.0f;
this->actor.shape.shadowAlpha = this->alpha = (*fadeTimer / fadeDuration) * 255.0f;
}
}
void func_8098F50C(DemoSa* this, PlayState* play) {
func_8098E6EC(this, play, 4);
this->action = 12;
this->drawConfig = 2;
void DemoSa_Credits_InitPosition(DemoSa* this, PlayState* play) {
DemoSa_SetStartPosRotFromCue(this, play, 4);
this->action = DEMOSA_ACTION_CREDITS_FADE_IN;
this->drawConfig = DEMOSA_DRAW_XLU;
}
void func_8098F544(DemoSa* this) {
if (this->unk_1A0 >= kREG(17) + 10.0f) {
this->action = 13;
this->drawConfig = 1;
void DemoSa_Credits_CheckVisibility(DemoSa* this) {
if (this->fadeTimer >= kREG(17) + 10.0f) {
this->action = DEMOSA_ACTION_CREDITS_FACING_FORWARD;
this->drawConfig = DEMOSA_DRAW_OPA;
}
}
void func_8098F590(DemoSa* this) {
func_8098E76C(this, &gSariaSitting1Anim, 2, -8.0f, 0);
this->action = 14;
void DemoSa_Credits_LookDown(DemoSa* this) {
DemoSa_AnimationChange(this, &gSariaSitting1Anim, ANIMMODE_ONCE, -8.0f, 0);
this->action = DEMOSA_ACTION_CREDITS_LOOK_DOWN_AT_DARUNIA;
}
void func_8098F5D0(DemoSa* this) {
func_8098E76C(this, &gSariaSitting2Anim, 2, 0.0f, 0);
this->action = 15;
void DemoSa_Credits_LookUp(DemoSa* this) {
DemoSa_AnimationChange(this, &gSariaSitting2Anim, ANIMMODE_ONCE, 0.0f, 0);
this->action = DEMOSA_ACTION_CREDITS_LOOK_BACK_UP;
}
void func_8098F610(DemoSa* this, s32 arg1) {
if (arg1 != 0) {
func_8098E76C(this, &gSariaSitting3Anim, 0, 0.0f, 0);
this->action = 13;
void DemoSa_Credits_LookForward(DemoSa* this, s32 isHeadUp) {
if (isHeadUp) {
DemoSa_AnimationChange(this, &gSariaSitting3Anim, ANIMMODE_LOOP, 0.0f, 0);
this->action = DEMOSA_ACTION_CREDITS_FACING_FORWARD;
}
}
void func_8098F654(DemoSa* this, PlayState* play) {
void DemoSa_Credits_NextAction(DemoSa* this, PlayState* play) {
s32 currentCueId;
s32 nextCueId;
CsCmdActorCue* cue = DemoSa_GetCue(play, 4);
@@ -583,13 +602,13 @@ void func_8098F654(DemoSa* this, PlayState* play) {
if (nextCueId != currentCueId) {
switch (nextCueId) {
case 7:
func_8098F50C(this, play);
DemoSa_Credits_InitPosition(this, play);
break;
case 8:
func_8098F590(this);
DemoSa_Credits_LookDown(this);
break;
case 9:
func_8098F5D0(this);
DemoSa_Credits_LookUp(this);
break;
default:
PRINTF(T("Demo_Sa_inEnding_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
@@ -600,125 +619,125 @@ void func_8098F654(DemoSa* this, PlayState* play) {
}
}
void func_8098F714(DemoSa* this, PlayState* play) {
func_8098F654(this, play);
void DemoSa_Action_CreditsInvisible(DemoSa* this, PlayState* play) {
DemoSa_Credits_NextAction(this, play);
}
void func_8098F734(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_CreditsFadeIn(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098E480(this);
func_8098F480(this);
func_8098F544(this);
DemoSa_Blink(this);
DemoSa_Credits_FadeIn(this);
DemoSa_Credits_CheckVisibility(this);
}
void func_8098F77C(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_CreditsFacingForward(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098E480(this);
func_8098F654(this, play);
DemoSa_Blink(this);
DemoSa_Credits_NextAction(this, play);
}
void func_8098F7BC(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_CreditsLookDownAtDarunia(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098E480(this);
func_8098F654(this, play);
DemoSa_Blink(this);
DemoSa_Credits_NextAction(this, play);
}
void func_8098F7FC(DemoSa* this, PlayState* play) {
void DemoSa_Action_CreditsLookBackUp(DemoSa* this, PlayState* play) {
s32 animFinished;
func_8098E5C8(this, play);
DemoSa_UpdateBgCheckInfo(this, play);
animFinished = DemoSa_UpdateSkelAnime(this);
func_8098E480(this);
func_8098F610(this, animFinished);
DemoSa_Blink(this);
DemoSa_Credits_LookForward(this, animFinished);
}
void func_8098F83C(DemoSa* this, PlayState* play) {
void DemoSa_InitBridge(DemoSa* this, PlayState* play) {
Vec3f* thisPos = &this->actor.world.pos;
SkelAnime_InitFlex(play, &this->skelAnime, &gSariaSkel, &gSariaWaitOnBridgeAnim, NULL, NULL, 0);
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EN_ELF, thisPos->x, thisPos->y, thisPos->z, 0, 0, 0,
FAIRY_KOKIRI);
this->action = 16;
this->drawConfig = 0;
this->action = DEMOSA_ACTION_BRIDGE_INVISIBLE;
this->drawConfig = DEMOSA_DRAW_NOTHING;
this->actor.shape.shadowAlpha = 0;
DemoSa_SetEyeIndex(this, SARIA_EYE_SAD);
DemoSa_SetMouthIndex(this, SARIA_MOUTH_CLOSED);
DemoSa_SetEyes(this, SARIA_EYE_SAD);
DemoSa_SetMouth(this, SARIA_MOUTH_CLOSED);
}
void func_8098F8F8(DemoSa* this) {
void DemoSa_CsBridge_Fade(DemoSa* this) {
s32 alpha = 255;
f32* unk_1A0 = &this->unk_1A0;
f32 temp_f0;
f32* fadeTimer = &this->fadeTimer;
f32 fadeDuration;
*unk_1A0 += 1.0f;
temp_f0 = kREG(17) + 10.0f;
*fadeTimer += 1.0f;
fadeDuration = kREG(17) + 10.0f;
if (temp_f0 <= *unk_1A0) {
if (fadeDuration <= *fadeTimer) {
this->actor.shape.shadowAlpha = this->alpha = alpha;
} else {
this->actor.shape.shadowAlpha = this->alpha = (*unk_1A0 / temp_f0) * 255.0f;
this->actor.shape.shadowAlpha = this->alpha = (*fadeTimer / fadeDuration) * 255.0f;
}
}
void func_8098F984(DemoSa* this) {
this->action = 16;
this->drawConfig = 0;
void DemoSa_CsBridge_StillHidden(DemoSa* this) {
this->action = DEMOSA_ACTION_BRIDGE_INVISIBLE;
this->drawConfig = DEMOSA_DRAW_NOTHING;
this->actor.shape.shadowAlpha = 0;
}
void func_8098F998(DemoSa* this, PlayState* play) {
void DemoSa_CsBridge_LookAtLink(DemoSa* this, PlayState* play) {
if (this->cueId == 4) {
func_8098E6EC(this, play, 1);
this->action = 17;
this->drawConfig = 2;
this->unk_1B0 = 0;
DemoSa_SetStartPosRotFromCue(this, play, 1);
this->action = DEMOSA_ACTION_BRIDGE_FADE_IN;
this->drawConfig = DEMOSA_DRAW_XLU;
this->isHoldingOcarina = false;
this->actor.shape.shadowAlpha = 0;
} else {
func_8098E76C(this, &gSariaWaitOnBridgeAnim, 0, 0.0f, 0);
this->action = 18;
this->drawConfig = 1;
this->unk_1B0 = 0;
DemoSa_AnimationChange(this, &gSariaWaitOnBridgeAnim, ANIMMODE_LOOP, 0.0f, 0);
this->action = DEMOSA_ACTION_BRIDGE_LOOKING_SAD;
this->drawConfig = DEMOSA_DRAW_OPA;
this->isHoldingOcarina = false;
this->actor.shape.shadowAlpha = 0xFF;
}
DemoSa_SetEyeIndex(this, SARIA_EYE_SAD);
DemoSa_SetEyes(this, SARIA_EYE_SAD);
}
void func_8098FA2C(DemoSa* this) {
if (this->unk_1A0 >= kREG(17) + 10.0f) {
this->action = 18;
this->drawConfig = 1;
this->unk_1B0 = 0;
void DemoSa_CsBridge_CheckFadeFinished(DemoSa* this) {
if (this->fadeTimer >= kREG(17) + 10.0f) {
this->action = DEMOSA_ACTION_BRIDGE_LOOKING_SAD;
this->drawConfig = DEMOSA_DRAW_OPA;
this->isHoldingOcarina = false;
this->actor.shape.shadowAlpha = 0xFF;
}
}
void func_8098FA84(DemoSa* this) {
func_8098E76C(this, &gSariaHoldOcarinaAnim, 0, 0.0f, 0);
this->action = 19;
this->drawConfig = 1;
this->unk_1B0 = 1;
void DemoSa_CsBridge_ClutchOcarina(DemoSa* this) {
DemoSa_AnimationChange(this, &gSariaHoldOcarinaAnim, ANIMMODE_LOOP, 0.0f, 0);
this->action = DEMOSA_ACTION_BRIDGE_CLUTCH_OCARINA;
this->drawConfig = DEMOSA_DRAW_OPA;
this->isHoldingOcarina = true;
this->actor.shape.shadowAlpha = 0xFF;
DemoSa_SetEyeIndex(this, SARIA_EYE_CLOSED);
DemoSa_SetEyes(this, SARIA_EYE_CLOSED);
}
void func_8098FAE0(DemoSa* this) {
func_8098E76C(this, &gSariaGiveLinkOcarinaAnim, 2, -8.0f, 0);
this->action = 20;
this->drawConfig = 1;
this->unk_1B0 = 1;
void DemoSa_CsBridge_GiveOcarina(DemoSa* this) {
DemoSa_AnimationChange(this, &gSariaGiveLinkOcarinaAnim, ANIMMODE_ONCE, -8.0f, 0);
this->action = DEMOSA_ACTION_BRIDGE_GIVE_OCARINA;
this->drawConfig = DEMOSA_DRAW_OPA;
this->isHoldingOcarina = true;
this->actor.shape.shadowAlpha = 0xFF;
}
void func_8098FB34(DemoSa* this, s32 arg1) {
if (arg1 != 0) {
func_8098E76C(this, &gSariaHoldOutOcarinaAnim, 0, 0, 0);
void DemoSa_CsBridge_HoldOutOcarina(DemoSa* this, s32 animFinished) {
if (animFinished) {
DemoSa_AnimationChange(this, &gSariaHoldOutOcarinaAnim, ANIMMODE_LOOP, 0, 0);
}
}
void func_8098FB68(DemoSa* this, PlayState* play) {
void DemoSa_CsBridge_CheckNextAction(DemoSa* this, PlayState* play) {
s32 currentCueId;
s32 nextCueId;
CsCmdActorCue* cue = DemoSa_GetCue(play, 1);
@@ -730,16 +749,16 @@ void func_8098FB68(DemoSa* this, PlayState* play) {
if (nextCueId != currentCueId) {
switch (nextCueId) {
case 4:
func_8098F984(this);
DemoSa_CsBridge_StillHidden(this);
break;
case 12:
func_8098F998(this, play);
DemoSa_CsBridge_LookAtLink(this, play);
break;
case 13:
func_8098FA84(this);
DemoSa_CsBridge_ClutchOcarina(this);
break;
case 14:
func_8098FAE0(this);
DemoSa_CsBridge_GiveOcarina(this);
break;
default:
PRINTF(T("Demo_Sa_inPresent_Check_DemoMode:そんな動作は無い!!!!!!!!\n",
@@ -750,33 +769,33 @@ void func_8098FB68(DemoSa* this, PlayState* play) {
}
}
void func_8098FC44(DemoSa* this, PlayState* play) {
func_8098FB68(this, play);
void DemoSa_Action_BridgeInvisible(DemoSa* this, PlayState* play) {
DemoSa_CsBridge_CheckNextAction(this, play);
}
void func_8098FC64(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_BridgeFadeIn(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098F8F8(this);
func_8098FA2C(this);
DemoSa_CsBridge_Fade(this);
DemoSa_CsBridge_CheckFadeFinished(this);
}
void func_8098FC9C(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_BridgeLookingSad(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098FB68(this, play);
DemoSa_CsBridge_CheckNextAction(this, play);
}
void func_8098FCD4(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
void DemoSa_Action_BridgeClutchOcarina(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_UpdateSkelAnime(this);
func_8098FB68(this, play);
DemoSa_CsBridge_CheckNextAction(this, play);
}
void func_8098FD0C(DemoSa* this, PlayState* play) {
func_8098E5C8(this, play);
func_8098FB34(this, DemoSa_UpdateSkelAnime(this));
func_8098FB68(this, play);
void DemoSa_Action_BridgeGiveOcarina(DemoSa* this, PlayState* play) {
DemoSa_UpdateBgCheckInfo(this, play);
DemoSa_CsBridge_HoldOutOcarina(this, DemoSa_UpdateSkelAnime(this));
DemoSa_CsBridge_CheckNextAction(this, play);
}
void DemoSa_Update(Actor* thisx, PlayState* play) {
@@ -797,26 +816,26 @@ void DemoSa_Init(Actor* thisx, PlayState* play) {
switch (this->actor.params) {
case 2:
func_8098ECF4(this, play);
DemoSa_InitTrialOrSealingGanon(this, play);
break;
case 3:
func_8098F390(this, play);
DemoSa_InitUnused(this, play);
break;
case 4:
func_8098F420(this, play);
DemoSa_InitCredits(this, play);
break;
case 5:
func_8098F83C(this, play);
DemoSa_InitBridge(this, play);
break;
default:
func_8098E7FC(this, play);
DemoSa_InitChamberOfSages(this, play);
}
}
s32 DemoSa_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
DemoSa* this = (DemoSa*)thisx;
if ((limbIndex == 15) && (this->unk_1B0 != 0)) {
if ((limbIndex == 15) && this->isHoldingOcarina) {
*dList = gSariaRightHandAndOcarinaDL;
}
return false;
+33 -3
View File
@@ -17,11 +17,41 @@ typedef struct DemoSa {
/* 0x0194 */ s16 mouthIndex;
/* 0x0198 */ s32 action;
/* 0x019C */ s32 drawConfig;
/* 0x01A0 */ f32 unk_1A0;
/* 0x01A0 */ f32 fadeTimer;
/* 0x01A4 */ s32 alpha;
/* 0x01A8 */ s32 unk_1A8;
/* 0x01A8 */ s32 isLightBall;
/* 0x01AC */ s32 cueId;
/* 0x01B0 */ s32 unk_1B0;
/* 0x01B0 */ s32 isHoldingOcarina;
} DemoSa; // size = 0x01B4
typedef enum DemoSaAction {
/* 0 */ DEMOSA_ACTION_SETUP_FOREST_MEDALLION_CS,
/* 1 */ DEMOSA_ACTION_AWAIT_BLUE_WARP,
/* 2 */ DEMOSA_ACTION_RISE_THROUGH_BLUE_WARP,
/* 3 */ DEMOSA_ACTION_CHAMBER_OF_SAGES_DIALOG,
/* 4 */ DEMOSA_ACTION_RAISE_ARMS_FOR_MEDALLION,
/* 5 */ DEMOSA_ACTION_AWAIT_FOREST_MEDALLION,
/* 6 */ DEMOSA_ACTION_END_MEDALLION_CS,
/* 7 */ DEMOSA_ACTION_SAGE_INVISIBLE,
/* 8 */ DEMOSA_ACTION_SAGE_FADE,
/* 9 */ DEMOSA_ACTION_AWAIT_LIGHT_BALL,
/* 10 */ DEMOSA_ACTION_UNUSED,
/* 11 */ DEMOSA_ACTION_CREDITS_INVISIBLE,
/* 12 */ DEMOSA_ACTION_CREDITS_FADE_IN,
/* 13 */ DEMOSA_ACTION_CREDITS_FACING_FORWARD,
/* 14 */ DEMOSA_ACTION_CREDITS_LOOK_DOWN_AT_DARUNIA,
/* 15 */ DEMOSA_ACTION_CREDITS_LOOK_BACK_UP,
/* 16 */ DEMOSA_ACTION_BRIDGE_INVISIBLE,
/* 17 */ DEMOSA_ACTION_BRIDGE_FADE_IN,
/* 18 */ DEMOSA_ACTION_BRIDGE_LOOKING_SAD,
/* 19 */ DEMOSA_ACTION_BRIDGE_CLUTCH_OCARINA,
/* 20 */ DEMOSA_ACTION_BRIDGE_GIVE_OCARINA
} DemoSaAction;
typedef enum DemoSaDrawConfig {
/* 0 */ DEMOSA_DRAW_NOTHING,
/* 1 */ DEMOSA_DRAW_OPA,
/* 2 */ DEMOSA_DRAW_XLU
} DemoSaDrawConfig;
#endif
+7 -7
View File
@@ -31,21 +31,21 @@ void func_80AF683C(EnSa* this, PlayState* play);
void func_80AF68E4(EnSa* this, PlayState* play);
void func_80AF6B20(EnSa* this, PlayState* play);
typedef enum SariaEyeState {
typedef enum SariaEyes {
/* 0 */ SARIA_EYE_OPEN,
/* 1 */ SARIA_EYE_HALF,
/* 2 */ SARIA_EYE_CLOSED,
/* 3 */ SARIA_EYE_SUPRISED,
/* 3 */ SARIA_EYE_SURPRISED,
/* 4 */ SARIA_EYE_SAD
} SariaEyeState;
} SariaEyes;
typedef enum SariaMouthState {
typedef enum SariaMouth {
/* 0 */ SARIA_MOUTH_CLOSED2,
/* 1 */ SARIA_MOUTH_SUPRISED,
/* 1 */ SARIA_MOUTH_SURPRISED,
/* 2 */ SARIA_MOUTH_CLOSED,
/* 3 */ SARIA_MOUTH_SMILING_OPEN,
/* 4 */ SARIA_MOUTH_FROWNING
} SariaMouthState;
} SariaMouth;
ActorProfile En_Sa_Profile = {
/**/ ACTOR_EN_SA,
@@ -467,7 +467,7 @@ void func_80AF609C(EnSa* this) {
}
if (phi_v1 == 0) {
this->rightEyeIndex++;
if (this->rightEyeIndex < SARIA_EYE_SUPRISED) {
if (this->rightEyeIndex < SARIA_EYE_SURPRISED) {
this->leftEyeIndex = this->rightEyeIndex;
} else {
this->unk_20E = Rand_S16Offset(30, 30);