mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 14:50: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
|
@ -377,7 +377,7 @@ void func_80AEB220(EnRu1* this, GlobalContext* globalCtx) {
|
|||
void func_80AEB264(EnRu1* this, AnimationHeader* animation, u8 arg2, f32 transitionRate, s32 arg4) {
|
||||
s32 pad[2];
|
||||
AnimationHeader* animHeader = SEGMENTED_TO_VIRTUAL(animation);
|
||||
f32 frameCount = SkelAnime_GetFrameCount(animHeader);
|
||||
f32 frameCount = Animation_GetLastFrame(animHeader);
|
||||
f32 playbackSpeed;
|
||||
f32 unk0;
|
||||
f32 fc;
|
||||
|
@ -392,30 +392,30 @@ void func_80AEB264(EnRu1* this, AnimationHeader* animation, u8 arg2, f32 transit
|
|||
playbackSpeed = -1.0f;
|
||||
}
|
||||
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, animHeader, playbackSpeed, unk0, fc, arg2, transitionRate);
|
||||
Animation_Change(&this->skelAnime, animHeader, playbackSpeed, unk0, fc, arg2, transitionRate);
|
||||
}
|
||||
|
||||
s32 EnRu1_FrameUpdateMatrix(EnRu1* this) {
|
||||
// why?
|
||||
if (this->action != 32) {
|
||||
return SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
return SkelAnime_Update(&this->skelAnime);
|
||||
} else {
|
||||
return SkelAnime_FrameUpdateMatrix(&this->skelAnime);
|
||||
return SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AEB364(EnRu1* 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_80AEB3A4(EnRu1* this, GlobalContext* globalCtx) {
|
||||
this->skelAnime.flags |= 1;
|
||||
this->skelAnime.moveFlags |= 1;
|
||||
func_80AEB364(this, globalCtx);
|
||||
}
|
||||
|
||||
void func_80AEB3CC(EnRu1* this) {
|
||||
this->skelAnime.flags &= ~0x1;
|
||||
this->skelAnime.moveFlags &= ~0x1;
|
||||
}
|
||||
|
||||
void func_80AEB3DC(EnRu1* this, GlobalContext* globalCtx) {
|
||||
|
@ -476,25 +476,25 @@ void func_80AEB680(EnRu1* this, GlobalContext* globalCtx) {
|
|||
void func_80AEB6E0(EnRu1* this, GlobalContext* globalCtx) {
|
||||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
if (skelAnime->unk_3E.y < skelAnime->limbDrawTbl[0].y) {
|
||||
skelAnime->flags |= 3;
|
||||
SkelAnime_LoadAnimationType5(globalCtx, &this->actor, skelAnime, 1.0f);
|
||||
if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) {
|
||||
skelAnime->moveFlags |= 3;
|
||||
AnimationContext_SetMoveActor(globalCtx, &this->actor, skelAnime, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AEB738(EnRu1* this, GlobalContext* globalCtx) {
|
||||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
skelAnime->unk_3E = *skelAnime->limbDrawTbl;
|
||||
skelAnime->prevFramePos = *skelAnime->limbDrawTbl;
|
||||
if (skelAnime->unk_3E.y < skelAnime->limbDrawTbl[0].y) {
|
||||
skelAnime->flags |= 3;
|
||||
SkelAnime_LoadAnimationType5(globalCtx, &this->actor, skelAnime, 1.0f);
|
||||
skelAnime->baseTransl = skelAnime->jointTable[0];
|
||||
skelAnime->prevTransl = skelAnime->jointTable[0];
|
||||
if (skelAnime->baseTransl.y < skelAnime->jointTable[0].y) {
|
||||
skelAnime->moveFlags |= 3;
|
||||
AnimationContext_SetMoveActor(globalCtx, &this->actor, skelAnime, 1.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AEB7D0(EnRu1* this) {
|
||||
this->skelAnime.flags &= ~0x3;
|
||||
this->skelAnime.moveFlags &= ~0x3;
|
||||
}
|
||||
|
||||
f32 func_80AEB7E0(CsCmdActorAction* csCmdNPCAction, GlobalContext* globalCtx) {
|
||||
|
@ -584,7 +584,7 @@ void func_80AEBAFC(EnRu1* this) {
|
|||
}
|
||||
|
||||
void func_80AEBB3C(EnRu1* this) {
|
||||
if (func_800A56C8(&this->skelAnime, 5.0f)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_FACE_UP);
|
||||
}
|
||||
}
|
||||
|
@ -592,15 +592,15 @@ void func_80AEBB3C(EnRu1* this) {
|
|||
void func_80AEBB78(EnRu1* this) {
|
||||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
if ((((func_800A56C8(skelAnime, 4.0f)) || (func_800A56C8(skelAnime, 13.0f))) ||
|
||||
(func_800A56C8(skelAnime, 22.0f))) ||
|
||||
(func_800A56C8(skelAnime, 31.0f))) {
|
||||
if ((((Animation_OnFrame(skelAnime, 4.0f)) || (Animation_OnFrame(skelAnime, 13.0f))) ||
|
||||
(Animation_OnFrame(skelAnime, 22.0f))) ||
|
||||
(Animation_OnFrame(skelAnime, 31.0f))) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_SWIM);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AEBBF4(EnRu1* this) {
|
||||
if (func_800A56C8(&this->skelAnime, 8.0f)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 8.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_SUBMERGE);
|
||||
}
|
||||
}
|
||||
|
@ -623,7 +623,7 @@ void func_80AEBC84(EnRu1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AEBCB8(EnRu1* this, UNK_TYPE arg1) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06012E94, 1.0f, 0, SkelAnime_GetFrameCount(&D_06012E94), 0, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06012E94, 1.0f, 0, Animation_GetLastFrame(&D_06012E94), 0, -8.0f);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -643,10 +643,10 @@ void func_80AEBD94(EnRu1* this, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
|
||||
if (func_80AEB480(globalCtx, 3)) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06009060);
|
||||
frameCount = Animation_GetLastFrame(&D_06009060);
|
||||
func_80AEB934(this, globalCtx);
|
||||
func_80AEB738(this, globalCtx);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06009060, 1.0f, 0.0f, frameCount, 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06009060, 1.0f, 0.0f, frameCount, 2, 0.0f);
|
||||
this->action = 2;
|
||||
this->drawConfig = 1;
|
||||
}
|
||||
|
@ -657,9 +657,9 @@ void func_80AEBE3C(EnRu1* this, GlobalContext* globalCtx, s32 arg2) {
|
|||
f32 frameCount;
|
||||
|
||||
if (arg2 != 0) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06013A64);
|
||||
frameCount = Animation_GetLastFrame(&D_06013A64);
|
||||
func_80AEB7D0(this);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06013A64, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06013A64, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
this->action = 3;
|
||||
} else {
|
||||
func_80AEB954(this, globalCtx);
|
||||
|
@ -671,9 +671,9 @@ void func_80AEBEC8(EnRu1* this, GlobalContext* globalCtx) {
|
|||
f32 frameCount;
|
||||
|
||||
if (func_80AEB458(globalCtx, 6)) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06008AA8);
|
||||
frameCount = Animation_GetLastFrame(&D_06008AA8);
|
||||
func_80AEB738(this, globalCtx);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06008AA8, 1.0f, 0, frameCount, 2, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06008AA8, 1.0f, 0, frameCount, 2, -8.0f);
|
||||
this->action = 4;
|
||||
}
|
||||
}
|
||||
|
@ -699,8 +699,8 @@ void func_80AEBFD8(EnRu1* this, GlobalContext* globalCtx) {
|
|||
csCtxFrames = globalCtx->csCtx.frames;
|
||||
endFrame = csCmdNPCAction->endFrame;
|
||||
if (csCtxFrames >= endFrame - 2) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06008100);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06008100, 1.0, 0, frameCount, 2, -8.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06008100);
|
||||
Animation_Change(&this->skelAnime, &D_06008100, 1.0, 0, frameCount, 2, -8.0f);
|
||||
this->action = 6;
|
||||
}
|
||||
}
|
||||
|
@ -855,7 +855,7 @@ s32 func_80AEC5FC(EnRu1* this, GlobalContext* globalCtx) {
|
|||
void func_80AEC650(EnRu1* this) {
|
||||
s32 pad[2];
|
||||
if (this->unk_280 == 0) {
|
||||
if ((func_800A56C8(&this->skelAnime, 2.0f)) || (func_800A56C8(&this->skelAnime, 7.0f))) {
|
||||
if ((Animation_OnFrame(&this->skelAnime, 2.0f)) || (Animation_OnFrame(&this->skelAnime, 7.0f))) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_DIRT);
|
||||
}
|
||||
}
|
||||
|
@ -868,7 +868,7 @@ void func_80AEC6B0(EnRu1* this) {
|
|||
|
||||
void func_80AEC6E4(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if ((func_80AEAFA0(globalCtx, 4, 3)) && (this->unk_280 == 0)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06003784, 1.0f, 0, SkelAnime_GetFrameCount(&D_06003784), 2, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06003784, 1.0f, 0, Animation_GetLastFrame(&D_06003784), 2, -8.0f);
|
||||
this->unk_280 = 1;
|
||||
func_80AEC6B0(this);
|
||||
}
|
||||
|
@ -908,14 +908,14 @@ void func_80AEC81C(EnRu1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AEC8B8(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if (func_80AEAFA0(globalCtx, 3, 3)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004074, 1.0f, 0, SkelAnime_GetFrameCount(&D_06004074), 2, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06004074, 1.0f, 0, Animation_GetLastFrame(&D_06004074), 2, -8.0f);
|
||||
this->action = 10;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AEC93C(EnRu1* this, UNK_TYPE arg1) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060078E4, 1.0f, 0, SkelAnime_GetFrameCount(&D_060078E4), 0, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060078E4, 1.0f, 0, Animation_GetLastFrame(&D_060078E4), 0, -8.0f);
|
||||
this->actor.posRot.rot.y += 0x8000;
|
||||
this->action = 0xB;
|
||||
this->unk_26C = 0.0f;
|
||||
|
@ -1134,7 +1134,7 @@ void func_80AED154(EnRu1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AED19C(EnRu1* this, s32 cond) {
|
||||
if (cond) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06001488, 1.0f, 0, SkelAnime_GetFrameCount(&D_06001488), 2, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06001488, 1.0f, 0, Animation_GetLastFrame(&D_06001488), 2, -8.0f);
|
||||
this->action = 20;
|
||||
func_80AED0B0(this, 3);
|
||||
}
|
||||
|
@ -1143,11 +1143,10 @@ void func_80AED19C(EnRu1* this, s32 cond) {
|
|||
void func_80AED218(EnRu1* this, UNK_TYPE arg1) {
|
||||
if (func_80AED084(this, 4)) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002058, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002058), 0,
|
||||
-8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06002058, 1.0f, 0, Animation_GetLastFrame(&D_06002058), 0, -8.0f);
|
||||
}
|
||||
} else if (func_80AED084(this, 5)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002990, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002990), 2, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06002990, 1.0f, 0, Animation_GetLastFrame(&D_06002990), 2, -8.0f);
|
||||
this->action = 21;
|
||||
this->unk_27C = this->actor.xzDistFromLink;
|
||||
}
|
||||
|
@ -1285,7 +1284,7 @@ void func_80AED738(EnRu1* this, GlobalContext* globalCtx) {
|
|||
this->unk_2A8 = temp_v0;
|
||||
this->actor.shape.unk_14 = temp_v0;
|
||||
} else {
|
||||
Actor_Kill(this);
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1618,7 +1617,7 @@ void func_80AEE628(EnRu1* this, GlobalContext* globalCtx) {
|
|||
s8 curRoomNum = globalCtx->roomCtx.curRoom.num;
|
||||
|
||||
if (func_80AEAF38(globalCtx)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, SkelAnime_GetFrameCount(&D_06006B9C), 0, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, Animation_GetLastFrame(&D_06006B9C), 0, -8.0f);
|
||||
gSaveContext.infTable[20] |= 0x10;
|
||||
this->action = 31;
|
||||
}
|
||||
|
@ -1631,8 +1630,7 @@ s32 func_80AEE6D0(EnRu1* this, GlobalContext* globalCtx) {
|
|||
|
||||
if ((!(gSaveContext.infTable[20] & 0x10)) && (func_80AEB124(globalCtx) != 0)) {
|
||||
if (!Player_InCsMode(globalCtx)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004648, 1.0f, 0, SkelAnime_GetFrameCount(&D_06004350), 0,
|
||||
-8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06004648, 1.0f, 0, Animation_GetLastFrame(&D_06004350), 0, -8.0f);
|
||||
func_80AED600(this);
|
||||
this->action = 34;
|
||||
this->unk_26C = 0.0f;
|
||||
|
@ -1653,8 +1651,8 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
|
|||
f32* unk_370 = &this->unk_370;
|
||||
|
||||
if (Actor_HasNoParent(this, globalCtx)) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06006B9C);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06006B9C);
|
||||
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
func_80AED6DC(this, globalCtx);
|
||||
this->actor.speedXZ *= (kREG(25) * 0.01f) + 1.0f;
|
||||
this->actor.velocity.y *= (kREG(26) * 0.01f) + 1.0f;
|
||||
|
@ -1677,8 +1675,8 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
|
|||
if (this->action != 32) {
|
||||
if (*unk_370 > 30.0f) {
|
||||
if (Rand_S16Offset(0, 3) == 0) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06004350);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004350, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06004350);
|
||||
Animation_Change(&this->skelAnime, &D_06004350, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
func_80AED5DC(this);
|
||||
this->action = 32;
|
||||
}
|
||||
|
@ -1686,15 +1684,15 @@ void func_80AEE7C4(EnRu1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
} else {
|
||||
if (*unk_370 > 50.0f) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06006B9C);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06006B9C);
|
||||
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
this->action = 31;
|
||||
*unk_370 = 0.0f;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06006B9C);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06006B9C);
|
||||
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0, frameCount, 0, -8.0f);
|
||||
*unk_370 = 0.0f;
|
||||
}
|
||||
}
|
||||
|
@ -1834,7 +1832,7 @@ void func_80AEEFEC(EnRu1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AEF080(EnRu1* this) {
|
||||
if (func_800A56C8(&this->skelAnime, 11.0f)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 11.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_EV_LAND_DIRT);
|
||||
}
|
||||
}
|
||||
|
@ -1843,8 +1841,8 @@ s32 func_80AEF0BC(EnRu1* this, GlobalContext* globalCtx) {
|
|||
s32 frameCount;
|
||||
|
||||
if (gSaveContext.infTable[20] & 4) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_06007534);
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06007534, 1.0f, 0, frameCount, 2, -8.0f);
|
||||
frameCount = Animation_GetLastFrame(&D_06007534);
|
||||
Animation_Change(&this->skelAnime, &D_06007534, 1.0f, 0, frameCount, 2, -8.0f);
|
||||
globalCtx->msgCtx.msgMode = 0x37;
|
||||
this->action = 26;
|
||||
this->actor.flags &= ~0x9;
|
||||
|
@ -1869,7 +1867,7 @@ void func_80AEF188(EnRu1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AEF1F0(EnRu1* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
|
||||
if (arg2 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06006B9C, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06006B9C), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06006B9C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06006B9C), 0, 0.0f);
|
||||
func_80106CCC(globalCtx);
|
||||
gSaveContext.infTable[20] |= 8;
|
||||
func_80AED6DC(this, globalCtx);
|
||||
|
@ -1924,8 +1922,9 @@ void func_80AEF3A8(EnRu1* this, GlobalContext* globalCtx) {
|
|||
void func_80AEF40C(EnRu1* this) {
|
||||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
if ((func_800A56C8(skelAnime, 2.0f)) || (func_800A56C8(skelAnime, 7.0f)) || (func_800A56C8(skelAnime, 12.0f)) ||
|
||||
(func_800A56C8(skelAnime, 18.0f)) || (func_800A56C8(skelAnime, 25.0f)) || (func_800A56C8(skelAnime, 33.0f))) {
|
||||
if ((Animation_OnFrame(skelAnime, 2.0f)) || (Animation_OnFrame(skelAnime, 7.0f)) ||
|
||||
(Animation_OnFrame(skelAnime, 12.0f)) || (Animation_OnFrame(skelAnime, 18.0f)) ||
|
||||
(Animation_OnFrame(skelAnime, 25.0f)) || (Animation_OnFrame(skelAnime, 33.0f))) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_PL_WALK_DIRT);
|
||||
}
|
||||
}
|
||||
|
@ -1935,7 +1934,7 @@ void func_80AEF4A8(EnRu1* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_80AEF4E0(EnRu1* this) {
|
||||
if (func_800A56C8(&this->skelAnime, 5.0f)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 5.0f)) {
|
||||
func_80078914(&this->actor.projectedPos, NA_SE_VO_RT_LAUGH_0);
|
||||
}
|
||||
}
|
||||
|
@ -1956,11 +1955,11 @@ void func_80AEF540(EnRu1* this) {
|
|||
}
|
||||
|
||||
void func_80AEF5B8(EnRu1* this) {
|
||||
f32 animCurrentFrame;
|
||||
f32 curFrame;
|
||||
|
||||
if (D_80AF1938 == 0) {
|
||||
animCurrentFrame = this->skelAnime.animCurrentFrame;
|
||||
if (animCurrentFrame >= 60.0f) {
|
||||
curFrame = this->skelAnime.curFrame;
|
||||
if (curFrame >= 60.0f) {
|
||||
func_80AEAEA4(this, 3);
|
||||
func_80AEAEB8(this, 0);
|
||||
func_80AED57C(this);
|
||||
|
@ -1977,7 +1976,7 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
|
|||
s16 newRotTmp;
|
||||
|
||||
if (func_80AEAFE0(globalCtx, 1, 3)) {
|
||||
frameCount = SkelAnime_GetFrameCount(&D_060063F4);
|
||||
frameCount = Animation_GetLastFrame(&D_060063F4);
|
||||
// this weird part with the redundant variable is necessary to match for some reason
|
||||
csCmdNPCAction2 = globalCtx->csCtx.npcActions[3];
|
||||
csCmdNPCAction = csCmdNPCAction2;
|
||||
|
@ -1993,7 +1992,7 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
|
|||
newRotTmp = csCmdNPCAction->rot.z;
|
||||
thisx->shape.rot.z = newRotTmp;
|
||||
thisx->posRot.rot.z = newRotTmp;
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060063F4, 1.0f, 0.0f, frameCount, 2, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060063F4, 1.0f, 0.0f, frameCount, 2, 0.0f);
|
||||
func_80AEB3A4(this, globalCtx);
|
||||
this->action = 37;
|
||||
this->drawConfig = 1;
|
||||
|
@ -2003,7 +2002,7 @@ void func_80AEF624(EnRu1* this, GlobalContext* globalCtx) {
|
|||
|
||||
void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06003608, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06003608), 0, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06003608, 1.0f, 0.0f, Animation_GetLastFrame(&D_06003608), 0, 0.0f);
|
||||
func_80AEB3CC(this);
|
||||
this->action = 38;
|
||||
}
|
||||
|
@ -2011,14 +2010,14 @@ void func_80AEF728(EnRu1* this, UNK_TYPE arg1) {
|
|||
|
||||
void func_80AEF79C(EnRu1* this, GlobalContext* globalCtx) {
|
||||
if (func_80AEAFE0(globalCtx, 2, 3)) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_06002EC0, 1.0f, 0, SkelAnime_GetFrameCount(&D_06002EC0), 2, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_06002EC0, 1.0f, 0, Animation_GetLastFrame(&D_06002EC0), 2, -8.0f);
|
||||
this->action = 39;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AEF820(EnRu1* this, UNK_TYPE arg1) {
|
||||
if (arg1 != 0) {
|
||||
SkelAnime_ChangeAnim(&this->skelAnime, &D_060097B8, 1.0f, 0, SkelAnime_GetFrameCount(&D_060097B8), 0, -8.0f);
|
||||
Animation_Change(&this->skelAnime, &D_060097B8, 1.0f, 0, Animation_GetLastFrame(&D_060097B8), 0, -8.0f);
|
||||
this->action = 40;
|
||||
}
|
||||
}
|
||||
|
@ -2253,8 +2252,7 @@ void EnRu1_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06012700, NULL, this->limbDrawTable, this->transitionDrawTable,
|
||||
17);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06012700, NULL, this->jointTable, this->morphTable, 17);
|
||||
func_80AEAD20(this, globalCtx);
|
||||
switch (func_80AEADF0(this)) {
|
||||
case 0:
|
||||
|
@ -2313,7 +2311,7 @@ s32 EnRu1_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
} else {
|
||||
sPreLimbDrawFuncs[this->unk_290](this, globalCtx, limbIndex, rot);
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnRu1_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) {
|
||||
|
@ -2355,7 +2353,7 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, 255);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, &D_80116280[2]);
|
||||
|
||||
POLY_OPA_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
|
||||
POLY_OPA_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
|
||||
EnRu1_OverrideLimbDraw, EnRu1_PostLimbDraw, this, POLY_OPA_DISP);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309);
|
||||
|
@ -2380,7 +2378,7 @@ void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_2A8);
|
||||
gSPSegment(POLY_XLU_DISP++, 0x0C, &D_80116280[0]);
|
||||
|
||||
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
|
||||
POLY_XLU_DISP = SkelAnime_DrawFlex(globalCtx, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount,
|
||||
EnRu1_OverrideLimbDraw, NULL, this, POLY_XLU_DISP);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353);
|
||||
|
|
|
@ -16,8 +16,8 @@ typedef void (*EnRu1PreLimbDrawFunc)(struct EnRu1*, GlobalContext*, s32, Vec3s*)
|
|||
typedef struct EnRu1 {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ Vec3s limbDrawTable[17];
|
||||
/* 0x01F6 */ Vec3s transitionDrawTable[17];
|
||||
/* 0x0190 */ Vec3s jointTable[17];
|
||||
/* 0x01F6 */ Vec3s morphTable[17];
|
||||
/* 0x025C */ s16 unk_25C;
|
||||
/* 0x025E */ char unk_25E[0x2];
|
||||
/* 0x0260 */ s16 unk_260;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue