mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 22:30:15 +00:00
Docs for the Anime part of SkelAnime (#517)
* Darkmeiro decompilation Bg_Gnd_Darkmeiro decompiled, matched, and documented. * give this a shot * fix conflict * one more try * could be useful * whoops * ZAP2 stuff * ZAP why * ZAP again * more names * so many names * we got subsystems now * slight cleanup * merge part 2 * new naming scheme * slight adjustment * no limit * syms maybe * step one * OK, it's fixed * table * some names and such * comments** * update zap * gitkeep to please jenkins * ZAP * fixer * fixer2 * fixer3 * zap Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
parent
e4d88bf942
commit
2dfa188706
1187 changed files with 5434 additions and 5367 deletions
|
@ -71,9 +71,9 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
EnZl1* this = THIS;
|
||||
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06012118);
|
||||
frameCount = Animation_GetLastFrame(&D_06012118);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600F5D8, NULL, NULL, NULL, 0);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06012118, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06012118, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
@ -82,21 +82,21 @@ void EnZl1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->actor.unk_1F = 0;
|
||||
|
||||
if (gSaveContext.sceneSetupIndex >= 4) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06000438);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06000438);
|
||||
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
this->unk_1E6 = 0;
|
||||
this->actionFunc = func_80B4BC78;
|
||||
} else if ((Flags_GetEventChkInf(9)) && (Flags_GetEventChkInf(0x25)) && (Flags_GetEventChkInf(0x37))) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (((Flags_GetEventChkInf(9)) && (Flags_GetEventChkInf(0x25))) ||
|
||||
((Flags_GetEventChkInf(9)) && (Flags_GetEventChkInf(0x37)))) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06000438);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06000438);
|
||||
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
this->actor.textId = 0x703D;
|
||||
this->actionFunc = func_80B4AF18;
|
||||
} else if (Flags_GetEventChkInf(0x40)) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06000438);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06000438);
|
||||
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
this->actor.textId = 0x703C;
|
||||
this->actionFunc = func_80B4AF18;
|
||||
} else {
|
||||
|
@ -113,7 +113,7 @@ void EnZl1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80B4AE18(EnZl1* this) {
|
||||
if ((this->skelAnime.animation == &D_06010B38) && (this->skelAnime.animCurrentFrame < 26.0f)) {
|
||||
if ((this->skelAnime.animation == &D_06010B38) && (this->skelAnime.curFrame < 26.0f)) {
|
||||
this->unk_1F4 = &D_06008C48;
|
||||
this->unk_1F8 = &D_06008848;
|
||||
this->unk_1FC = 2;
|
||||
|
@ -160,8 +160,7 @@ void func_80B4B010(EnZl1* this, GlobalContext* globalCtx) {
|
|||
s16 rotDiff;
|
||||
|
||||
if (func_8002F194(&this->actor, globalCtx)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06010B38, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06010B38), 3,
|
||||
-10.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06010B38, 1.0f, 0.0f, Animation_GetLastFrame(&D_06010B38), 3, -10.0f);
|
||||
this->unk_1E8 = Gameplay_CreateSubCamera(globalCtx);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, 0, CAM_STAT_WAIT);
|
||||
Gameplay_ChangeCameraStatus(globalCtx, this->unk_1E8, CAM_STAT_ACTIVE);
|
||||
|
@ -204,13 +203,13 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
|
|||
|
||||
switch (this->unk_1E2) {
|
||||
case 0:
|
||||
switch ((s16)this->skelAnime.animCurrentFrame) {
|
||||
switch ((s16)this->skelAnime.curFrame) {
|
||||
case 14:
|
||||
this->unk_1E4 = 0;
|
||||
break;
|
||||
case 15:
|
||||
if (DECR(this->unk_1E4) != 0) {
|
||||
this->skelAnime.animCurrentFrame = 15.0f;
|
||||
this->skelAnime.curFrame = 15.0f;
|
||||
}
|
||||
break;
|
||||
case 64:
|
||||
|
@ -247,8 +246,8 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 3:
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06013F10);
|
||||
if (this->skelAnime.animCurrentFrame == frameCount) {
|
||||
frameCount = Animation_GetLastFrame(&D_06013F10);
|
||||
if (this->skelAnime.curFrame == frameCount) {
|
||||
animHeaderSeg = &D_060143A8;
|
||||
sp3C = 1;
|
||||
this->actor.textId = 0x7032;
|
||||
|
@ -277,8 +276,8 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 6:
|
||||
frameCount = SkelAnime_GetFrameCount(&D_060116E4);
|
||||
if (this->skelAnime.animCurrentFrame == frameCount) {
|
||||
frameCount = Animation_GetLastFrame(&D_060116E4);
|
||||
if (this->skelAnime.curFrame == frameCount) {
|
||||
animHeaderSeg = &D_06011B88;
|
||||
sp3C = 1;
|
||||
this->actor.textId = 0x7031;
|
||||
|
@ -307,8 +306,8 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
break;
|
||||
case 9:
|
||||
frameCount = SkelAnime_GetFrameCount(&D_060132D8);
|
||||
if (this->skelAnime.animCurrentFrame == frameCount) {
|
||||
frameCount = Animation_GetLastFrame(&D_060132D8);
|
||||
if (this->skelAnime.curFrame == frameCount) {
|
||||
animHeaderSeg = &D_06000438;
|
||||
sp3C = 1;
|
||||
globalCtx->csCtx.segment = D_80B4C5D0;
|
||||
|
@ -319,8 +318,8 @@ void func_80B4B240(EnZl1* this, GlobalContext* globalCtx) {
|
|||
break;
|
||||
}
|
||||
if (sp3C != 0) {
|
||||
frameCount = SkelAnime_GetFrameCount(animHeaderSeg);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, animHeaderSeg, 1.0f, 0.0f, frameCount, sp54[sp3C], -10.0f);
|
||||
frameCount = Animation_GetLastFrame(animHeaderSeg);
|
||||
Animation_Change(&this->skelAnime, animHeaderSeg, 1.0f, 0.0f, frameCount, sp54[sp3C], -10.0f);
|
||||
}
|
||||
func_80038290(globalCtx, &this->actor, &this->unk_200, &this->unk_206, this->actor.posRot2.pos);
|
||||
}
|
||||
|
@ -338,8 +337,8 @@ void func_80B4B834(CsCmdActorAction* npcAction, Vec3f* pos) {
|
|||
}
|
||||
|
||||
void func_80B4B874(EnZl1* this, GlobalContext* globalCtx) {
|
||||
this->skelAnime.flags |= 1;
|
||||
SkelAnime_LoadAnimationType5(globalCtx, &this->actor, &this->skelAnime, 1.0f);
|
||||
this->skelAnime.moveFlags |= 1;
|
||||
AnimationContext_SetMoveActor(globalCtx, &this->actor, &this->skelAnime, 1.0f);
|
||||
}
|
||||
|
||||
void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
|
||||
|
@ -362,7 +361,7 @@ void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
Vec3f sp48;
|
||||
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
func_80B4B874(this, globalCtx);
|
||||
if (globalCtx->csCtx.state == 0) {
|
||||
this->actionFunc = func_80B4BBC4;
|
||||
|
@ -379,9 +378,9 @@ void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
|
|||
this->actor.posRot.pos = sp48;
|
||||
}
|
||||
if (this->unk_1E6 != npcAction->action) {
|
||||
frameCount = SkelAnime_GetFrameCount(spB0[npcAction->action]);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, spB0[npcAction->action], 1.0f, 0.0f, frameCount,
|
||||
spA4[npcAction->action], -10.0f);
|
||||
frameCount = Animation_GetLastFrame(spB0[npcAction->action]);
|
||||
Animation_Change(&this->skelAnime, spB0[npcAction->action], 1.0f, 0.0f, frameCount, spA4[npcAction->action],
|
||||
-10.0f);
|
||||
this->unk_1E6 = npcAction->action;
|
||||
}
|
||||
this->actor.velocity = velocity;
|
||||
|
@ -403,10 +402,10 @@ void func_80B4B8B4(EnZl1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80B4BBC4(EnZl1* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
f32 frameCount = SkelAnime_GetFrameCount(&D_06000438);
|
||||
f32 frameCount = Animation_GetLastFrame(&D_06000438);
|
||||
Player* player = PLAYER;
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06000438, 1.0f, 0.0f, frameCount, 0, 0.0f);
|
||||
func_8002DF54(globalCtx, &this->actor, 1);
|
||||
func_8002F7DC(&player->actor, NA_SE_VO_LI_SURPRISE_KID);
|
||||
this->actor.textId = 0x7039;
|
||||
|
@ -432,9 +431,9 @@ void func_80B4BC78(EnZl1* this, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
f32 frameCount;
|
||||
|
||||
if (SkelAnime_FrameUpdateMatrix(&this->skelAnime) && (this->skelAnime.animation == &D_06010B38)) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06011348);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06011348, 1.0f, 0.0f, frameCount, 0, -10.0f);
|
||||
if (SkelAnime_Update(&this->skelAnime) && (this->skelAnime.animation == &D_06010B38)) {
|
||||
frameCount = Animation_GetLastFrame(&D_06011348);
|
||||
Animation_Change(&this->skelAnime, &D_06011348, 1.0f, 0.0f, frameCount, 0, -10.0f);
|
||||
}
|
||||
func_80B4B874(this, globalCtx);
|
||||
npcAction = globalCtx->csCtx.npcActions[0];
|
||||
|
@ -446,9 +445,9 @@ void func_80B4BC78(EnZl1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
if (this->unk_1E6 != npcAction->action) {
|
||||
frameCount = SkelAnime_GetFrameCount(sp90[npcAction->action]);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, sp90[npcAction->action], 1.0f, 0.0f, frameCount,
|
||||
sp84[npcAction->action], -10.0f);
|
||||
frameCount = Animation_GetLastFrame(sp90[npcAction->action]);
|
||||
Animation_Change(&this->skelAnime, sp90[npcAction->action], 1.0f, 0.0f, frameCount, sp84[npcAction->action],
|
||||
-10.0f);
|
||||
this->unk_1E6 = npcAction->action;
|
||||
}
|
||||
this->actor.velocity = velocity;
|
||||
|
@ -547,7 +546,7 @@ void EnZl1_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnZl1* this = THIS;
|
||||
|
||||
if ((this->actionFunc != func_80B4B8B4) && (this->actionFunc != func_80B4BC78)) {
|
||||
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 5);
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
@ -601,7 +600,7 @@ void EnZl1_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
gSPSegment(POLY_OPA_DISP++, 0x0A, SEGMENTED_TO_VIRTUAL(this->unk_1EC));
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
func_80B4C340, func_80B4C400, this);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_girlB.c", 2046);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue