mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-21 14:31:17 +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
|
@ -50,10 +50,11 @@ void DemoExt_PlayVortexSFX(DemoExt* this) {
|
|||
}
|
||||
}
|
||||
|
||||
CsCmdActorAction* DemoExt_GetNpcAction(PlayState* play, s32 npcActionIndex) {
|
||||
CsCmdActorCue* DemoExt_GetCue(PlayState* play, s32 cueChannel) {
|
||||
if (play->csCtx.state != CS_STATE_IDLE) {
|
||||
return play->csCtx.npcActions[npcActionIndex];
|
||||
return play->csCtx.actorCues[cueChannel];
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -63,13 +64,13 @@ void DemoExt_SetupWait(DemoExt* this) {
|
|||
}
|
||||
|
||||
void DemoExt_SetupMaintainVortex(DemoExt* this, PlayState* play) {
|
||||
CsCmdActorAction* npcAction = DemoExt_GetNpcAction(play, 5);
|
||||
CsCmdActorCue* cue = DemoExt_GetCue(play, 5);
|
||||
|
||||
if (npcAction != NULL) {
|
||||
this->actor.world.pos.x = npcAction->startPos.x;
|
||||
this->actor.world.pos.y = npcAction->startPos.y;
|
||||
this->actor.world.pos.z = npcAction->startPos.z;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = npcAction->rot.y;
|
||||
if (cue != NULL) {
|
||||
this->actor.world.pos.x = cue->startPos.x;
|
||||
this->actor.world.pos.y = cue->startPos.y;
|
||||
this->actor.world.pos.z = cue->startPos.z;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = cue->rot.y;
|
||||
}
|
||||
this->action = EXT_MAINTAIN;
|
||||
this->drawMode = EXT_DRAW_VORTEX;
|
||||
|
@ -87,17 +88,17 @@ void DemoExt_FinishClosing(DemoExt* this) {
|
|||
}
|
||||
}
|
||||
|
||||
void DemoExt_CheckCsMode(DemoExt* this, PlayState* play) {
|
||||
CsCmdActorAction* csCmdNPCAction = DemoExt_GetNpcAction(play, 5);
|
||||
s32 csAction;
|
||||
s32 previousCsAction;
|
||||
void DemoExt_HandleCues(DemoExt* this, PlayState* play) {
|
||||
CsCmdActorCue* cue = DemoExt_GetCue(play, 5);
|
||||
s32 nextCueId;
|
||||
s32 currentCueId;
|
||||
|
||||
if (csCmdNPCAction != NULL) {
|
||||
csAction = csCmdNPCAction->action;
|
||||
previousCsAction = this->previousCsAction;
|
||||
if (cue != NULL) {
|
||||
nextCueId = cue->id;
|
||||
currentCueId = this->cueId;
|
||||
|
||||
if (csAction != previousCsAction) {
|
||||
switch (csAction) {
|
||||
if (nextCueId != currentCueId) {
|
||||
switch (nextCueId) {
|
||||
case 1:
|
||||
DemoExt_SetupWait(this);
|
||||
break;
|
||||
|
@ -112,7 +113,7 @@ void DemoExt_CheckCsMode(DemoExt* this, PlayState* play) {
|
|||
osSyncPrintf("Demo_Ext_Check_DemoMode:そんな動作は無い!!!!!!!!\n");
|
||||
break;
|
||||
}
|
||||
this->previousCsAction = csAction;
|
||||
this->cueId = nextCueId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -145,13 +146,13 @@ void DemoExt_SetColorsAndScales(DemoExt* this) {
|
|||
}
|
||||
|
||||
void DemoExt_Wait(DemoExt* this, PlayState* play) {
|
||||
DemoExt_CheckCsMode(this, play);
|
||||
DemoExt_HandleCues(this, play);
|
||||
}
|
||||
|
||||
void DemoExt_MaintainVortex(DemoExt* this, PlayState* play) {
|
||||
DemoExt_PlayVortexSFX(this);
|
||||
DemoExt_SetScrollAndRotation(this);
|
||||
DemoExt_CheckCsMode(this, play);
|
||||
DemoExt_HandleCues(this, play);
|
||||
}
|
||||
|
||||
void DemoExt_DispellVortex(DemoExt* this, PlayState* play) {
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef struct DemoExt {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ s32 action;
|
||||
/* 0x014C */ s32 drawMode;
|
||||
/* 0x0154 */ s32 previousCsAction;
|
||||
/* 0x0154 */ s32 cueId;
|
||||
/* 0x015E */ s16 scrollIncr[4];
|
||||
/* 0x0160 */ s16 curScroll[4];
|
||||
/* 0x0168 */ s16 rotationPitch;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue