mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-07 06:40:15 +00:00
name SkelAnime_InitLinkAnimetion, name load animation types and callbacks, rename several segement addresses in decompiled actors
This commit is contained in:
parent
a99840162b
commit
8970968cfc
67 changed files with 2727 additions and 3007 deletions
|
@ -51,10 +51,10 @@ const ActorInit Demo_Go_InitVars = {
|
|||
(ActorFunc)DemoGo_Draw,
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_060029A8;
|
||||
extern UNK_TYPE D_06004930;
|
||||
extern AnimationHeader D_060029A8;
|
||||
extern AnimationHeader D_06004930;
|
||||
extern UNK_TYPE D_0600E680;
|
||||
extern UNK_TYPE D_0600FEF0;
|
||||
extern SkeletonHeader D_0600FEF0;
|
||||
|
||||
UNK_TYPE func_8097C870(DemoGo* this) {
|
||||
s32 ret;
|
||||
|
@ -246,9 +246,9 @@ void func_8097CEEC(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void func_8097CF20(DemoGo* this, GlobalContext* globalCtx, UNK_TYPE arg2) {
|
||||
UNK_PTR animation = &D_060029A8;
|
||||
AnimationHeader* animation = &D_060029A8;
|
||||
if (arg2 != 0) {
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 0,
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animation->genericHeader), 0,
|
||||
-8.0f);
|
||||
this->action = 5;
|
||||
this->unk_19C = 0.0f;
|
||||
|
@ -316,12 +316,12 @@ void DemoGo_Update(DemoGo* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void DemoGo_Init(DemoGo* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR animation = &D_06004930;
|
||||
s16 pad;
|
||||
AnimationHeader* animation = &D_06004930;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
|
||||
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600FEF0, 0, 0, 0, 0);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(animation), 2, 0.0f);
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, animation, 1.0f, 0.0f, SkelAnime_GetFrameCount(&animation->genericHeader), 2, 0.0f);
|
||||
this->action = 0;
|
||||
}
|
||||
|
||||
|
@ -343,7 +343,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->limbIndex, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
SkelAnime_DrawSV(globalCtx, skelAnime->skeleton, skelAnime->actorDrawTbl, skelAnime->dListCount, NULL, NULL,
|
||||
&this->actor);
|
||||
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_demo_go.c", 746);
|
||||
|
|
|
@ -150,5 +150,5 @@ void EnBird_Update(EnBird* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnBird_Draw(EnBird* this, GlobalContext* globalCtx) {
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, 0, NULL, NULL);
|
||||
SkelAnime_Draw(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, 0, NULL, NULL);
|
||||
}
|
||||
|
|
|
@ -80,13 +80,13 @@ typedef enum {
|
|||
} DogBehavior;
|
||||
|
||||
extern UNK_PTR D_06007290;
|
||||
extern UNK_PTR D_06001368;
|
||||
extern UNK_PTR D_06000D78;
|
||||
extern UNK_PTR D_06000278;
|
||||
extern AnimationHeader D_06001368;
|
||||
extern AnimationHeader D_06000D78;
|
||||
extern AnimationHeader D_06000278;
|
||||
|
||||
static void EnDog_PlayWalkSFX(EnDog* this) {
|
||||
u32* walk = &D_06001368;
|
||||
if (this->skelAnime.animCurrent == walk) {
|
||||
AnimationHeader* walk = &D_06001368;
|
||||
if (this->skelAnime.animCurrentSeg == walk) {
|
||||
if ((this->skelAnime.animCurrentFrame == 1.0f) || (this->skelAnime.animCurrentFrame == 7.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK);
|
||||
}
|
||||
|
@ -94,8 +94,8 @@ static void EnDog_PlayWalkSFX(EnDog* this) {
|
|||
}
|
||||
|
||||
static void EnDog_PlayRunSFX(EnDog* this) {
|
||||
u32* run = &D_06000D78;
|
||||
if (this->skelAnime.animCurrent == run) {
|
||||
AnimationHeader* run = &D_06000D78;
|
||||
if (this->skelAnime.animCurrentSeg == run) {
|
||||
if ((this->skelAnime.animCurrentFrame == 2.0f) || (this->skelAnime.animCurrentFrame == 4.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_CHIBI_WALK);
|
||||
}
|
||||
|
@ -103,8 +103,8 @@ static void EnDog_PlayRunSFX(EnDog* this) {
|
|||
}
|
||||
|
||||
static void EnDog_PlayBarkSFX(EnDog* this) {
|
||||
u32* bark = &D_06000278;
|
||||
if (this->skelAnime.animCurrent == bark) {
|
||||
AnimationHeader* bark = &D_06000278;
|
||||
if (this->skelAnime.animCurrentSeg == bark) {
|
||||
if ((this->skelAnime.animCurrentFrame == 13.0f) || (this->skelAnime.animCurrentFrame == 19.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_SMALL_DOG_BARK);
|
||||
}
|
||||
|
@ -479,7 +479,7 @@ static 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.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
EnDog_Callback1, EnDog_Callback2, &this->actor);
|
||||
func_800C6B54(gfxArr, globalCtx->state.gfxCtx, "../z_en_dog.c", 994);
|
||||
}
|
||||
|
|
|
@ -191,6 +191,6 @@ static void EnMs_Update(EnMs* this, GlobalContext* globalCtx) {
|
|||
|
||||
void EnMs_Draw(EnMs* this, GlobalContext* globalCtx) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0,
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount, 0,
|
||||
0, &this->actor);
|
||||
}
|
||||
|
|
|
@ -31,16 +31,16 @@ extern UNK_TYPE D_04052DB0;
|
|||
extern UNK_TYPE D_040531B0;
|
||||
extern UNK_TYPE D_040535B0;
|
||||
extern UNK_TYPE D_040539B0;
|
||||
extern UNK_TYPE D_06001144;
|
||||
extern UNK_TYPE D_06001FA8;
|
||||
extern UNK_TYPE D_06002F84;
|
||||
extern AnimationHeader D_06001144;
|
||||
extern AnimationHeader D_06001FA8;
|
||||
extern AnimationHeader D_06002F84;
|
||||
extern UNK_TYPE D_06003B40;
|
||||
extern UNK_TYPE D_06004340;
|
||||
extern UNK_TYPE D_06004B40;
|
||||
extern UNK_TYPE D_0600ACE0;
|
||||
extern UNK_TYPE D_0600BC90;
|
||||
extern UNK_TYPE D_0600BCA0;
|
||||
extern UNK_TYPE D_0600BE40;
|
||||
extern Gfx D_0600ACE0[];
|
||||
extern Gfx D_0600BC90[];
|
||||
extern Gfx D_0600BCA0[];
|
||||
extern SkeletonHeader D_0600BE40;
|
||||
|
||||
const ActorInit En_Tk_InitVars = {
|
||||
ACTOR_EN_TK,
|
||||
|
@ -136,7 +136,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
|
|||
if (eff->active != 0) {
|
||||
if (gfxSetup == 0) {
|
||||
gfxCtx->polyXlu.p = func_80093774(gfxCtx->polyXlu.p, 0);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, &D_0600BC90);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BC90);
|
||||
gDPSetEnvColor(gfxCtx->polyXlu.p++, 0x64, 0x3C, 0x14, 0x00);
|
||||
gfxSetup = 1;
|
||||
}
|
||||
|
@ -154,7 +154,7 @@ void EnTkEff_Draw(EnTk* this, GlobalContext* globalCtx) {
|
|||
imageIdx = eff->timeLeft * ((f32)ARRAY_COUNT(images) / eff->timeTotal);
|
||||
gSPSegment(gfxCtx->polyXlu.p++, 0x08, SEGMENTED_TO_VIRTUAL(images[imageIdx]));
|
||||
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, &D_0600BCA0);
|
||||
gSPDisplayList(gfxCtx->polyXlu.p++, D_0600BCA0);
|
||||
}
|
||||
eff++;
|
||||
}
|
||||
|
@ -186,9 +186,9 @@ static EnTk_SubActorStruct98Init D_80B1D534 = {
|
|||
};
|
||||
|
||||
void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR anim = &D_06002F84;
|
||||
AnimationHeader* anim = &D_06002F84;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0,
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0,
|
||||
-10.f);
|
||||
|
||||
this->actionCountdown = Math_Rand_S16Offset(60, 60);
|
||||
|
@ -196,18 +196,18 @@ void EnTk_RestAnim(EnTk* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnTk_WalkAnim(EnTk* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR anim = &D_06001FA8;
|
||||
AnimationHeader* anim = &D_06001FA8;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0,
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0,
|
||||
-10.f);
|
||||
|
||||
this->actionCountdown = Math_Rand_S16Offset(240, 240);
|
||||
}
|
||||
|
||||
void EnTk_DigAnim(EnTk* this, GlobalContext* globalCtx) {
|
||||
UNK_PTR anim = &D_06001144;
|
||||
AnimationHeader* anim = &D_06001144;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06001144), 0,
|
||||
SkelAnime_ChangeAnimation(&this->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06001144.genericHeader), 0,
|
||||
-10.f);
|
||||
|
||||
if (EnTk_CheckNextSpot(this, globalCtx) >= 0) {
|
||||
|
@ -306,7 +306,7 @@ f32 EnTk_Step(EnTk* this, GlobalContext* globalCtx) {
|
|||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_WALK);
|
||||
}
|
||||
|
||||
if (this->skelAnim.animCurrent != (u32*)&D_06001FA8) {
|
||||
if (this->skelAnim.animCurrentSeg != &D_06001FA8) {
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
|
@ -504,12 +504,12 @@ void EnTk_DigEff(EnTk* this) {
|
|||
|
||||
void EnTk_Init(EnTk* this, GlobalContext* globalCtx) {
|
||||
EnTk* thisAgain = this;
|
||||
UNK_PTR anim = &D_06002F84;
|
||||
AnimationHeader* anim = &D_06002F84;
|
||||
|
||||
ActorShape_Init(&thisAgain->actor.shape, 0, ActorShadow_DrawFunc_Circle, 24.f);
|
||||
|
||||
SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, (u32)&D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18);
|
||||
SkelAnime_ChangeAnimation(&thisAgain->skelAnim, (u32)anim, 1.f, 0.f, SkelAnime_GetFrameCount((u32)&D_06002F84), 0,
|
||||
SkelAnime_InitSV(globalCtx, &thisAgain->skelAnim, &D_0600BE40, 0, thisAgain->hz_22A, thisAgain->hz_296, 18);
|
||||
SkelAnime_ChangeAnimation(&thisAgain->skelAnim, anim, 1.f, 0.f, SkelAnime_GetFrameCount(&D_06002F84.genericHeader), 0,
|
||||
0.f);
|
||||
|
||||
ActorCollider_AllocCylinder(globalCtx, &thisAgain->collider);
|
||||
|
@ -707,7 +707,7 @@ void func_80B1D200(GlobalContext* globalCtx) {
|
|||
gfxCtx = globalCtx->state.gfxCtx;
|
||||
func_800C6AC4(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1188);
|
||||
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, &D_0600ACE0);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_0600ACE0);
|
||||
|
||||
func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1190);
|
||||
}
|
||||
|
@ -769,7 +769,7 @@ void EnTk_Draw(EnTk* this, GlobalContext* globalCtx) {
|
|||
|
||||
gSPSegment(gfxCtx->polyOpa.p++, 0x08, SEGMENTED_TO_VIRTUAL(eyeImages[thisAgain->eyeImageIdx]));
|
||||
|
||||
SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.limbIndex, thisAgain->skelAnim.actorDrawTbl,
|
||||
SkelAnime_DrawSV(globalCtx, thisAgain->skelAnim.skeleton, thisAgain->skelAnim.actorDrawTbl,
|
||||
thisAgain->skelAnim.dListCount, func_80B1D278, func_80B1D2E4, &thisAgain->actor);
|
||||
|
||||
func_800C6B54(pgdl, globalCtx->state.gfxCtx, "../z_en_tk.c", 1312);
|
||||
|
|
|
@ -76,18 +76,17 @@ static InitChainEntry initChain[3] = {
|
|||
|
||||
static Vec3f D_80B30D70 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
extern u32 D_06000EA4;
|
||||
extern u32 D_06000590;
|
||||
extern u32 D_0600299C;
|
||||
extern u32 D_06008FB0;
|
||||
extern u32 D_06009DB0;
|
||||
extern u32 D_060019CC;
|
||||
extern u32 D_06009520;
|
||||
extern u32 D_06009244;
|
||||
extern u32 D_060041F4;
|
||||
extern u32 D_0600A054;
|
||||
extern u32 D_06008688;
|
||||
extern u32 D_04049210;
|
||||
extern AnimationHeader D_06000EA4;
|
||||
extern AnimationHeader D_06000590;
|
||||
extern AnimationHeader D_0600299C;
|
||||
extern SkeletonHeader D_06008FB0;
|
||||
extern AnimationHeader D_06009DB0;
|
||||
extern AnimationHeader D_060019CC;
|
||||
extern AnimationHeader D_06009520;
|
||||
extern AnimationHeader D_06009244;
|
||||
extern AnimationHeader D_060041F4;
|
||||
extern AnimationHeader D_0600A054;
|
||||
extern Gfx D_06008688[];
|
||||
|
||||
static void EnWallmas_Init(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
EnWallmas* this2 = this;
|
||||
|
@ -137,7 +136,7 @@ static void EnWallmas_TimerInit(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
|
||||
static void EnWallmas_DropStart(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
Player* player = PLAYER;
|
||||
u32* objSegChangeAnime = &D_0600299C;
|
||||
AnimationHeader* objSegChangeAnime = &D_0600299C;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, objSegChangeAnime, 0.0f, 20.0f,
|
||||
(f32)SkelAnime_GetFrameCount(&D_0600299C), 2, 0.0f);
|
||||
|
@ -152,8 +151,8 @@ static void EnWallmas_DropStart(EnWallmas* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
static void EnWallmas_LandStart(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
u32* objSegFrameCount = &D_060019CC;
|
||||
u32* objSegChangeAnime = &D_060019CC;
|
||||
AnimationHeader* objSegFrameCount = &D_060019CC;
|
||||
AnimationHeader* objSegChangeAnime = &D_060019CC;
|
||||
|
||||
SkelAnime_ChangeAnimation(&this->skelAnime, objSegChangeAnime, 1.0f, 41.0f,
|
||||
SkelAnime_GetFrameCount(objSegFrameCount), 2, -3.0f);
|
||||
|
@ -180,8 +179,8 @@ static void EnWallmas_JumpToCeilingStart(EnWallmas* this) {
|
|||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
static void EnWallmas_ReturnToCeilingStart(EnWallmas* this) {
|
||||
u32* objSegFrameCount = &D_060019CC;
|
||||
u32* objSegChangeAnime = &D_060019CC;
|
||||
AnimationHeader* objSegFrameCount = &D_060019CC;
|
||||
AnimationHeader* objSegChangeAnime = &D_060019CC;
|
||||
|
||||
this->timer = 0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
@ -620,7 +619,7 @@ static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32
|
|||
Matrix_Scale(2.0f, 2.0f, 2.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1489), G_MTX_LOAD);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, &D_06008688);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, D_06008688);
|
||||
|
||||
Matrix_Pull();
|
||||
func_800C6B54(&gfx, globalCtx->state.gfxCtx, "../z_en_wallmas.c", 1495);
|
||||
|
@ -630,7 +629,7 @@ static void EnWallmas_DrawOpa(GlobalContext* globalCtx, s32 arg1, s32 arg2, s32
|
|||
static void EnWallmas_Draw(EnWallmas* this, GlobalContext* globalCtx) {
|
||||
if (this->actionFunc != (ActorFunc)&EnWallmas_WaitToDrop) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.limbIndex, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.actorDrawTbl, this->skelAnime.dListCount,
|
||||
&EnWallMas_UpdatePos, &EnWallmas_DrawOpa, &this->actor);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue