mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-19 21:41:59 +00:00
z_demo documentation (#1327)
* commit old stuff * progress * progress * progress * progress * more progress, renaming cues next * small changes * enum values added for all actions * hardcoded values removed when possible * commands renamed * first pass of action -> cue * fix some matches * some more cleanup * scriptPtr * forgot one * remove cue rot union * more changes * some more stuff * more stuff * fix matching issues * some more things * progress, starting to rename destinations * small changes * name some destinations * more names * need to switch branch * progress * first pass of destination names * usages fixed * use destination enum * fix csdis * format * command descriptions * revert accidental zap changes * forgot some things * use a single macro for CutsceneCameraPoint (idk why i didnt think of this sooner) * typo * review1 * clarify ruby/sapphire comment * remove endframe for commands that dont use it * some more review * most review, but not all * scriptPtr -> script, and another small change * ocarina action * remove +1 from light settings command, change comment * actionIndex -> cueIdTemp (i guess) * _SetCueX -> _SetXFromCue * format * tweak fade out seq arg names * use spline terminology * more dragorn and engineer review * misc start/end frame note * cleanup StartPosRotFromCue vs PosRotFromCue * cleanup spline terminology * sPrevCamId -> sReturnToCamId * comment on debug cs data address * Cutscene_Init -> Cutscene_InitContext * single point types are not a list * remove todo comment * some more review * rumble struct names * some review * more review * missed one * reword pointer comment * even more review * match transition terminology with z_play * change condition and format * frame count * command specific structs with alignment * anon review * remove unneeded arg from time macro * yeet `CsCmdGeneric` * remove unused from single point types * typo * compromise attempt -- name endFrame everywhere * fixes * fix again * copied the wrong note * cutscene data note * review, format * compat defines * idk whats going on man Co-authored-by: Dragorn421 <Dragorn421@users.noreply.github.com>
This commit is contained in:
parent
92e03cf747
commit
7927e7b330
130 changed files with 6392 additions and 5954 deletions
|
@ -35,7 +35,7 @@ void func_8096865C(Actor* thisx, PlayState* play);
|
|||
void func_809688C4(Actor* thisx, PlayState* play2);
|
||||
void func_80968B70(Actor* thisx, PlayState* play);
|
||||
void func_80968FB0(Actor* thisx, PlayState* play);
|
||||
void func_809691BC(Demo6K* this, PlayState* play, s32 params);
|
||||
void func_809691BC(Demo6K* this, PlayState* play, s32 cueChannel);
|
||||
|
||||
ActorInit Demo_6K_InitVars = {
|
||||
ACTOR_DEMO_6K,
|
||||
|
@ -206,27 +206,27 @@ void func_80966DB0(Demo6K* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80966E04(Demo6K* this, PlayState* play) {
|
||||
if (play->csCtx.frames > 214) {
|
||||
if (play->csCtx.curFrame > 214) {
|
||||
func_8002F948(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG);
|
||||
}
|
||||
|
||||
if (play->csCtx.frames > 264) {
|
||||
if (play->csCtx.curFrame > 264) {
|
||||
func_8002F948(&this->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG);
|
||||
}
|
||||
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[6] != NULL) &&
|
||||
(play->csCtx.npcActions[6]->action == 2)) {
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[6] != NULL) &&
|
||||
(play->csCtx.actorCues[6]->id == 2)) {
|
||||
Demo6K_SetupAction(this, func_80966E98);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80966E98(Demo6K* this, PlayState* play) {
|
||||
if (play->csCtx.frames < 353) {
|
||||
if (play->csCtx.curFrame < 353) {
|
||||
func_8002F948(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG);
|
||||
func_8002F948(&this->actor, NA_SE_EV_GOD_LIGHTBALL_2 - SFX_FLAG);
|
||||
}
|
||||
|
||||
if (play->csCtx.frames == 342) {
|
||||
if (play->csCtx.curFrame == 342) {
|
||||
Audio_PlayCutsceneEffectsSequence(SEQ_CS_EFFECTS_SAGE_SEAL);
|
||||
}
|
||||
|
||||
|
@ -288,8 +288,8 @@ void func_8096712C(Demo6K* this, PlayState* play) {
|
|||
this->actor.scale.x = 0.1f;
|
||||
}
|
||||
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[6] != NULL) &&
|
||||
(play->csCtx.npcActions[6]->action == 2)) {
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[6] != NULL) &&
|
||||
(play->csCtx.actorCues[6]->id == 2)) {
|
||||
Demo6K_SetupAction(this, func_809670AC);
|
||||
this->timer1 = 0;
|
||||
this->actor.scale.x = 0.1f;
|
||||
|
@ -299,7 +299,7 @@ void func_8096712C(Demo6K* this, PlayState* play) {
|
|||
|
||||
this->timer2++;
|
||||
|
||||
if ((play->sceneId == SCENE_INSIDE_GANONS_CASTLE) && (play->csCtx.frames < D_8096932C[this->actor.params - 3])) {
|
||||
if ((play->sceneId == SCENE_INSIDE_GANONS_CASTLE) && (play->csCtx.curFrame < D_8096932C[this->actor.params - 3])) {
|
||||
func_8002F974(&this->actor, NA_SE_EV_LIGHT_GATHER - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ void func_80967244(Demo6K* this, PlayState* play) {
|
|||
|
||||
if (play->sceneId == SCENE_TEMPLE_OF_TIME) {
|
||||
scale = 6000;
|
||||
} else if (play->csCtx.frames < 419) {
|
||||
} else if (play->csCtx.curFrame < 419) {
|
||||
scale = 6000;
|
||||
} else {
|
||||
scale = 18000;
|
||||
|
@ -343,16 +343,16 @@ void func_80967244(Demo6K* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80967410(Demo6K* this, PlayState* play) {
|
||||
s32 params = this->actor.params - 14;
|
||||
s32 cueChannel = this->actor.params - 14;
|
||||
|
||||
this->timer2++;
|
||||
|
||||
Actor_SetScale(&this->actor, 0.2f);
|
||||
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[params] != NULL)) {
|
||||
func_809691BC(this, play, params);
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[cueChannel] != NULL)) {
|
||||
func_809691BC(this, play, cueChannel);
|
||||
|
||||
if (play->csCtx.npcActions[params]->action == 3) {
|
||||
if (play->csCtx.actorCues[cueChannel]->id == 3) {
|
||||
this->flags &= ~1;
|
||||
func_80967244(this, play);
|
||||
} else {
|
||||
|
@ -462,8 +462,8 @@ void func_80967A04(Demo6K* this, s32 i) {
|
|||
void func_80967AD0(Demo6K* this, PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[1] != NULL)) {
|
||||
if (play->csCtx.npcActions[1]->action == 2) {
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[1] != NULL)) {
|
||||
if (play->csCtx.actorCues[1]->id == 2) {
|
||||
this->unk_170++;
|
||||
func_8002F948(&this->actor, NA_SE_EV_RAINBOW_SHOWER - SFX_FLAG);
|
||||
}
|
||||
|
@ -688,8 +688,8 @@ void func_809688C4(Actor* thisx, PlayState* play2) {
|
|||
u32 frames = play->state.frames;
|
||||
s32 i;
|
||||
|
||||
if ((i = (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.npcActions[1] != NULL)) &&
|
||||
(play->csCtx.npcActions[1]->action != 1)) {
|
||||
if ((i = (play->csCtx.state != CS_STATE_IDLE) && (play->csCtx.actorCues[1] != NULL)) &&
|
||||
(play->csCtx.actorCues[1]->id != 1)) {
|
||||
OPEN_DISPS(play->state.gfxCtx, "../z_demo_6k.c", 1277);
|
||||
|
||||
Gfx_SetupDL_25Xlu(play->state.gfxCtx);
|
||||
|
@ -796,21 +796,21 @@ void func_80968FB0(Actor* thisx, PlayState* play) {
|
|||
CLOSE_DISPS(play->state.gfxCtx, "../z_demo_6k.c", 1411);
|
||||
}
|
||||
|
||||
void func_809691BC(Demo6K* this, PlayState* play, s32 params) {
|
||||
void func_809691BC(Demo6K* this, PlayState* play, s32 cueChannel) {
|
||||
Vec3f startPos;
|
||||
Vec3f endPos;
|
||||
f32 temp;
|
||||
CsCmdActorAction* csAction = play->csCtx.npcActions[params];
|
||||
CsCmdActorCue* cue = play->csCtx.actorCues[cueChannel];
|
||||
|
||||
startPos.x = csAction->startPos.x;
|
||||
startPos.y = csAction->startPos.y;
|
||||
startPos.z = csAction->startPos.z;
|
||||
startPos.x = cue->startPos.x;
|
||||
startPos.y = cue->startPos.y;
|
||||
startPos.z = cue->startPos.z;
|
||||
|
||||
endPos.x = csAction->endPos.x;
|
||||
endPos.y = csAction->endPos.y;
|
||||
endPos.z = csAction->endPos.z;
|
||||
endPos.x = cue->endPos.x;
|
||||
endPos.y = cue->endPos.y;
|
||||
endPos.z = cue->endPos.z;
|
||||
|
||||
temp = Environment_LerpWeight(csAction->endFrame, csAction->startFrame, play->csCtx.frames);
|
||||
temp = Environment_LerpWeight(cue->endFrame, cue->startFrame, play->csCtx.curFrame);
|
||||
|
||||
this->actor.world.pos.x = LERP(startPos.x, endPos.x, temp);
|
||||
this->actor.world.pos.y = LERP(startPos.y, endPos.y, temp);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue