mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +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
|
@ -77,9 +77,8 @@ void EnFu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 36.0f);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelanime, &D_06006C90, &D_06000B04, this->limbDrawTable,
|
||||
this->transitionDrawTable, 16);
|
||||
SkelAnime_ChangeAnimDefaultRepeat(&this->skelanime, &D_06000B04);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelanime, &D_06006C90, &D_06000B04, this->jointTable, this->morphTable, 16);
|
||||
Animation_PlayLoop(&this->skelanime, &D_06000B04);
|
||||
Collider_InitCylinder(globalCtx, &this->collider);
|
||||
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = 0xFF;
|
||||
|
@ -90,7 +89,7 @@ void EnFu_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
} else {
|
||||
this->actionFunc = EnFu_WaitAdult;
|
||||
this->facialExpression = FU_FACE_MAD;
|
||||
this->skelanime.animPlaybackSpeed = 2.0f;
|
||||
this->skelanime.playSpeed = 2.0f;
|
||||
}
|
||||
this->behaviorFlags = 0;
|
||||
this->actor.unk_1F = 6;
|
||||
|
@ -126,8 +125,7 @@ void func_80A1DA04(EnFu* this, GlobalContext* globalCtx) {
|
|||
this->actionFunc = EnFu_WaitChild;
|
||||
|
||||
if (this->skelanime.animation == &D_0600057C) {
|
||||
SkelAnime_ChangeAnim(&this->skelanime, &D_06000B04, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_06000B04), 2,
|
||||
-4.0f);
|
||||
Animation_Change(&this->skelanime, &D_06000B04, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000B04), 2, -4.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,8 +144,7 @@ void EnFu_WaitChild(EnFu* this, GlobalContext* globalCtx) {
|
|||
// if func_80A1D94C returns 1, actionFunc is set to func_80A1DA04
|
||||
if (func_80A1D94C(this, globalCtx, textID, func_80A1DA04)) {
|
||||
if (textID == 0x5033) {
|
||||
SkelAnime_ChangeAnim(&this->skelanime, &D_0600057C, 1.0f, 0.0f, SkelAnime_GetFrameCount(&D_0600057C), 2,
|
||||
-4.0f);
|
||||
Animation_Change(&this->skelanime, &D_0600057C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600057C), 2, -4.0f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -244,9 +241,9 @@ void EnFu_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider);
|
||||
Actor_MoveForward(&this->actor);
|
||||
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
if ((!(this->behaviorFlags & FU_WAIT)) && (SkelAnime_FrameUpdateMatrix(&this->skelanime) != 0)) {
|
||||
SkelAnime_ChangeAnim(&this->skelanime, this->skelanime.animation, 1.0f, 0.0f,
|
||||
SkelAnime_GetFrameCount(this->skelanime.animation), 2, 0.0f);
|
||||
if ((!(this->behaviorFlags & FU_WAIT)) && (SkelAnime_Update(&this->skelanime) != 0)) {
|
||||
Animation_Change(&this->skelanime, this->skelanime.animation, 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(this->skelanime.animation), 2, 0.0f);
|
||||
}
|
||||
this->actionFunc(this, globalCtx);
|
||||
if ((this->behaviorFlags & FU_RESET_LOOK_ANGLE)) {
|
||||
|
@ -265,7 +262,7 @@ s32 EnFu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
s32 pad1;
|
||||
|
||||
if (limbIndex == 10) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
switch (limbIndex) {
|
||||
case 14:
|
||||
|
@ -277,14 +274,14 @@ s32 EnFu_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
}
|
||||
|
||||
if (!(this->behaviorFlags & FU_WAIT)) {
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (limbIndex == 8) {
|
||||
rot->y += (Math_SinS((globalCtx->state.frames * (limbIndex * 50 + 0x814))) * 200.0f);
|
||||
rot->z += (Math_CosS((globalCtx->state.frames * (limbIndex * 50 + 0x940))) * 200.0f);
|
||||
}
|
||||
return 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnFu_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
|
@ -304,7 +301,7 @@ void EnFu_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
func_800943C8(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sEyesSegments[this->facialExpression]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sMouthSegments[this->facialExpression]));
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelanime.skeleton, this->skelanime.limbDrawTbl, this->skelanime.dListCount,
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,
|
||||
EnFu_OverrideLimbDraw, EnFu_PostLimbDraw, this);
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_fu.c", 791);
|
||||
|
|
|
@ -12,8 +12,8 @@ typedef struct EnFu {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ ColliderCylinder collider;
|
||||
/* 0x0198 */ SkelAnime skelanime;
|
||||
/* 0x01DC */ Vec3s limbDrawTable[16];
|
||||
/* 0x023C */ Vec3s transitionDrawTable[16];
|
||||
/* 0x01DC */ Vec3s jointTable[16];
|
||||
/* 0x023C */ Vec3s morphTable[16];
|
||||
/* 0x029C */ Vec3s lookAngleOffset; // offset applied to neck rotation to look at link when he is close
|
||||
/* 0x02A2 */ Vec3s unk_2A2;
|
||||
/* 0x02A8 */ u16 behaviorFlags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue