mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 06:40:15 +00:00
SkelAnime Updates (#78)
* update naming, minor updates * rename postLimbUpdate to postLimbDraw * recently decompiled actor naming update
This commit is contained in:
parent
cb5a604ea7
commit
4961eb0a90
19 changed files with 259 additions and 275 deletions
|
@ -342,7 +342,7 @@ void func_8097D29C(DemoGo* this, GlobalContext* globalCtx) {
|
|||
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(srcSegment8));
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x09, SEGMENTED_TO_VIRTUAL(srcSegment9));
|
||||
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
&this->actor);
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_demo_go.c", 746);
|
||||
|
|
|
@ -23,8 +23,8 @@ void func_809B0994(EnAni* this, GlobalContext* globalCtx);
|
|||
void func_809B0A28(EnAni* this, GlobalContext* globalCtx);
|
||||
void func_809B0A6C(EnAni* this, GlobalContext* globalCtx);
|
||||
void EnAni_Update(EnAni* this, GlobalContext* globalCtx);
|
||||
s32 EnAni_UpdateMtxFunc(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni);
|
||||
void EnAni_LimbAppendDList(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni);
|
||||
s32 EnAni_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni);
|
||||
void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni);
|
||||
void EnAni_Draw(EnAni* this, GlobalContext* globalCtx);
|
||||
|
||||
extern SkeletonHeader D_060000F0;
|
||||
|
@ -73,7 +73,7 @@ void EnAni_Init(EnAni* this, GlobalContext* globalCtx) {
|
|||
anim = &D_060076EC;
|
||||
Actor_ProcessInitChain(&this->actor, initChain);
|
||||
ActorShape_Init(&this->actor.shape, -2800.0f, ActorShadow_DrawFunc_Circle, 36.0f);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060000F0, anim, this->actorDrawTable, this->transitionDrawTable,
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_060000F0, anim, this->limbDrawTable, this->transitionDrawTable,
|
||||
0x10);
|
||||
SkelAnime_ChangeAnimDefaultStop(&this->skelAnime, anim);
|
||||
ActorCollider_AllocCylinder(globalCtx, &this->collider);
|
||||
|
@ -297,7 +297,7 @@ void EnAni_Update(EnAni* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
s32 EnAni_UpdateMtxFunc(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni) {
|
||||
s32 EnAni_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, EnAni* enAni) {
|
||||
EnAni* temp;
|
||||
|
||||
temp = enAni;
|
||||
|
@ -308,7 +308,7 @@ s32 EnAni_UpdateMtxFunc(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
|
|||
return 0;
|
||||
}
|
||||
|
||||
void EnAni_LimbAppendDList(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni) {
|
||||
void EnAni_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, EnAni* enAni) {
|
||||
if (limbIndex == 15) {
|
||||
Matrix_MultVec3f(&EnAniVec, &enAni->actor.posRot2.pos);
|
||||
}
|
||||
|
@ -328,7 +328,7 @@ void EnAni_Draw(EnAni* this, GlobalContext* globalCtx) {
|
|||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(temp[this->unk_2AC]));
|
||||
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
EnAni_UpdateMtxFunc, EnAni_LimbAppendDList, &this->actor);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
EnAni_OverrideLimbDraw, EnAni_PostLimbDraw, &this->actor);
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ani.c", 736);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ typedef struct {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ColliderCylinderMain collider;
|
||||
/* 0x0198 */ SkelAnime skelAnime;
|
||||
/* 0x01DC */ Vec3s actorDrawTable[16];
|
||||
/* 0x01DC */ Vec3s limbDrawTable[16];
|
||||
/* 0x023C */ Vec3s transitionDrawTable[16];
|
||||
/* 0x029C */ Vec3s unk_29C;
|
||||
/* 0x02A2 */ Vec3s unk_2A2;
|
||||
|
|
|
@ -144,5 +144,5 @@ void EnBird_Update(EnBird* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnBird_Draw(EnBird* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, 0, NULL, NULL);
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, 0, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -462,7 +462,7 @@ void EnDog_Draw(EnDog* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyOpa.p++, colors[this->actor.params & 0xF].r, colors[this->actor.params & 0xF].g,
|
||||
colors[this->actor.params & 0xF].b, colors[this->actor.params & 0xF].a);
|
||||
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
EnDog_Callback1, EnDog_Callback2, &this->actor);
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_dog.c", 994);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ void EnDs_Init(EnDs* this, GlobalContext* globalCtx) {
|
|||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 36.0f);
|
||||
SkelAnime_InitSV(globalCtx, skelAnime, &D_06004768, &D_0600039C, &this->actorDrawTable, &this->unk_1B4, 6);
|
||||
SkelAnime_InitSV(globalCtx, skelAnime, &D_06004768, &D_0600039C, &this->limbDrawTable, &this->unk_1B4, 6);
|
||||
SkelAnime_ChangeAnimDefaultStop(&this->skelAnime, &D_0600039C);
|
||||
|
||||
this->actor.sub_98.mass = 0xFF;
|
||||
|
@ -286,6 +286,6 @@ void func_809FDA7C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
|
|||
|
||||
void EnDs_Draw(EnDs* this, GlobalContext* globalCtx) {
|
||||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
&func_809FDA38, &func_809FDA7C, this);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ Vec3s actorDrawTable;
|
||||
/* 0x0190 */ Vec3s limbDrawTable;
|
||||
/* 0x0196 */ char unk_194[0x1E];
|
||||
/* 0x01B4 */ Vec3s unk_1B4;
|
||||
/* 0x01BA */ char unk_1B8[0x1E];
|
||||
|
|
|
@ -176,6 +176,6 @@ void EnMs_Update(EnMs* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
NULL, NULL, &this->actor);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount, NULL,
|
||||
NULL, &this->actor);
|
||||
}
|
||||
|
|
|
@ -477,7 +477,7 @@ void func_80AEB680(EnRu1* this, GlobalContext* globalCtx) {
|
|||
void func_80AEB6E0(EnRu1* this, GlobalContext* globalCtx) {
|
||||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
if (skelAnime->unk_3E.y < skelAnime->actorDrawTbl->y) {
|
||||
if (skelAnime->unk_3E.y < skelAnime->limbDrawTbl[0].y) {
|
||||
skelAnime->flags |= 3;
|
||||
SkelAnime_LoadAnimationType5(globalCtx, &this->actor, skelAnime, 1.0f);
|
||||
}
|
||||
|
@ -486,9 +486,9 @@ void func_80AEB6E0(EnRu1* this, GlobalContext* globalCtx) {
|
|||
void func_80AEB738(EnRu1* this, GlobalContext* globalCtx) {
|
||||
SkelAnime* skelAnime = &this->skelAnime;
|
||||
|
||||
skelAnime->unk_3E = *skelAnime->actorDrawTbl;
|
||||
skelAnime->prevFramePos = *skelAnime->actorDrawTbl;
|
||||
if (skelAnime->unk_3E.y < skelAnime->actorDrawTbl->y) {
|
||||
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);
|
||||
}
|
||||
|
@ -2252,7 +2252,7 @@ void EnRu1_Init(EnRu1* this, GlobalContext* globalCtx) {
|
|||
u32 temp_ret;
|
||||
|
||||
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06012700, NULL, &this->actorDrawTable, &this->transitionDrawTable,
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06012700, NULL, &this->limbDrawTable, &this->transitionDrawTable,
|
||||
17);
|
||||
func_80AEAD20(this, globalCtx);
|
||||
switch (func_80AEADF0(this)) {
|
||||
|
@ -2352,9 +2352,8 @@ void func_80AF0400(EnRu1* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]);
|
||||
|
||||
gfxCtx->polyOpa.p =
|
||||
SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, func_80AF02E8,
|
||||
func_80AF0368, &this->actor, gfxCtx->polyOpa.p);
|
||||
gfxCtx->polyOpa.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
|
||||
func_80AF02E8, func_80AF0368, &this->actor, gfxCtx->polyOpa.p);
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1309);
|
||||
}
|
||||
|
@ -2378,8 +2377,8 @@ void func_80AF05D4(EnRu1* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2A8);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]);
|
||||
|
||||
gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl,
|
||||
skelAnime->dListCount, func_80AF02E8, NULL, &this->actor, gfxCtx->polyXlu.p);
|
||||
gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
|
||||
func_80AF02E8, NULL, &this->actor, gfxCtx->polyXlu.p);
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru1.c", 1353);
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ Vec3s actorDrawTable[17];
|
||||
/* 0x0190 */ Vec3s limbDrawTable[17];
|
||||
/* 0x01F6 */ Vec3s transitionDrawTable[17];
|
||||
/* 0x025C */ s16 unk_25C;
|
||||
/* 0x025E */ char unk_25E[0x2];
|
||||
|
|
|
@ -479,8 +479,8 @@ void func_80AF321C(EnRu2* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x00, 0x00, 0x00, this->unk_2B4);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x0C, &D_80116280[0]);
|
||||
|
||||
gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl,
|
||||
skelAnime->dListCount, NULL, NULL, NULL, gfxCtx->polyXlu.p);
|
||||
gfxCtx->polyXlu.p = SkelAnime_DrawSV2(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount,
|
||||
NULL, NULL, NULL, gfxCtx->polyXlu.p);
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2_inKenjyanomaDemo02.c", 291);
|
||||
}
|
||||
|
@ -757,7 +757,8 @@ void EnRu2_Update(EnRu2* this, GlobalContext* globalCtx) {
|
|||
void EnRu2_Init(EnRu2* this, GlobalContext* globalCtx) {
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
func_80AF2550(this, globalCtx);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->actorDrawTable, &this->transitionDrawTable, 23);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600C700, NULL, &this->limbDrawTable, &this->transitionDrawTable,
|
||||
23);
|
||||
|
||||
switch (func_80AF26A0(this)) {
|
||||
case 2:
|
||||
|
@ -797,7 +798,7 @@ void func_80AF3F20(EnRu2* this, GlobalContext* globalCtx) {
|
|||
gDPSetEnvColor(gfxCtx->polyOpa.p++, 0x00, 0x00, 0x00, 0xFF);
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x0C, &D_80116280[2]);
|
||||
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->limbDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
&this->actor);
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_ru2.c", 663);
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
typedef struct {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ Vec3s actorDrawTable[23];
|
||||
/* 0x0190 */ Vec3s limbDrawTable[23];
|
||||
/* 0x021A */ Vec3s transitionDrawTable[23];
|
||||
/* 0x02A4 */ s16 unk_2A4;
|
||||
/* 0x02A6 */ s16 unk_2A6;
|
||||
|
|
|
@ -8,10 +8,10 @@ typedef struct {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ char unk_14C[0x03C];
|
||||
/* 0x0188 */ SkelAnime skelAnime_188;
|
||||
/* 0x01CC */ Vec3s actorDrawTbl_1CC[61];
|
||||
/* 0x01CC */ Vec3s limbDrawTable_1CC[61];
|
||||
/* 0x033A */ Vec3s transitionTbl_16E[61];
|
||||
/* 0x04A8 */ SkelAnime skelAnime_4A8;
|
||||
/* 0x04EC */ Vec3s actorDrawTbl_4EC[61];
|
||||
/* 0x04EC */ Vec3s limbDrawTable_4EC[61];
|
||||
/* 0x065A */ Vec3s transitionTbl_65A[61];
|
||||
/* 0x07C8 */ char unk_7C8[0x160];
|
||||
} EnTest; // size = 0x0928
|
||||
|
|
|
@ -759,7 +759,7 @@ void EnTk_Draw(EnTk* this, GlobalContext* globalCtx) {
|
|||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(eyeImages[thisAgain->eyeImageIdx]));
|
||||
|
||||
SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.skeleton, thisAgain->skelAnim.actorDrawTbl,
|
||||
SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.skeleton, thisAgain->skelAnim.limbDrawTbl,
|
||||
thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor);
|
||||
|
||||
Graph_CloseDisps(dispRefs, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312);
|
||||
|
|
|
@ -629,7 +629,7 @@ void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
|
|||
void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
if (this->actionFunc != (ActorFunc)&EnWallmas_WaitToDrop) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
|
||||
&EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue