1
0
Fork 0
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:
petrie911 2020-12-29 16:46:46 -06:00 committed by GitHub
parent e4d88bf942
commit 2dfa188706
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1187 changed files with 5434 additions and 5367 deletions

View file

@ -202,11 +202,11 @@ f32 EnSsh_SetAnimation(EnSsh* this, s32 animIndex) {
};
f32 playbackSpeed[] = { 1.0f, 4.0f, 1.0f, 1.0f, 8.0f, 6.0f, 2.0f };
u8 mode[] = { 3, 3, 1, 3, 1, 1, 1 };
f32 frameCount = SkelAnime_GetFrameCount(animation[animIndex]);
f32 frameCount = Animation_GetLastFrame(animation[animIndex]);
s32 pad;
SkelAnime_ChangeAnim(&this->skelAnime, animation[animIndex], playbackSpeed[animIndex], 0.0f, frameCount,
mode[animIndex], -6.0f);
Animation_Change(&this->skelAnime, animation[animIndex], playbackSpeed[animIndex], 0.0f, frameCount,
mode[animIndex], -6.0f);
return frameCount;
}
@ -586,7 +586,7 @@ void EnSsh_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnSsh* this = THIS;
frameCount = SkelAnime_GetFrameCount(&D_06000304);
frameCount = Animation_GetLastFrame(&D_06000304);
if (this->actor.params == ENSSH_FATHER) {
if (gSaveContext.inventory.gsTokens >= 100) {
Actor_Kill(&this->actor);
@ -597,8 +597,8 @@ void EnSsh_Init(Actor* thisx, GlobalContext* globalCtx) {
return;
}
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 30.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060052E0, NULL, this->limbDrawTable, this->transDrawTable, 30);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06000304, 1.0f, 0.0f, frameCount, 1, 0.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_060052E0, NULL, this->jointTable, this->morphTable, 30);
Animation_Change(&this->skelAnime, &D_06000304, 1.0f, 0.0f, frameCount, 1, 0.0f);
this->blureIdx = EnSsh_CreateBlureEffect(globalCtx);
EnSsh_InitColliders(this, globalCtx);
this->stateFlags = 0;
@ -732,7 +732,7 @@ void EnSsh_Drop(EnSsh* this, GlobalContext* globalCtx) {
}
void EnSsh_Return(EnSsh* this, GlobalContext* globalCtx) {
f32 frameRatio = this->skelAnime.animCurrentFrame / (this->skelAnime.totalFrames - 1.0f);
f32 frameRatio = this->skelAnime.curFrame / (this->skelAnime.animLength - 1.0f);
if (frameRatio == 1.0f) {
EnSsh_SetReturnAnimation(this);
@ -793,7 +793,7 @@ void EnSsh_Update(Actor* thisx, GlobalContext* globalCtx) {
if (this->stunTimer != 0) {
EnSsh_Damaged(this);
} else {
SkelAnime_FrameUpdateMatrix(&this->skelAnime);
SkelAnime_Update(&this->skelAnime);
func_8002D7EC(&this->actor);
func_8002E4B4(globalCtx, &this->actor, 0.0f, 0.0f, 0.0f, 4);
this->actionFunc(this, globalCtx);
@ -839,7 +839,7 @@ s32 EnSsh_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
}
break;
}
return 0;
return false;
}
void EnSsh_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
@ -858,6 +858,6 @@ void EnSsh_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ssh.c", 2333);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(blinkTex[this->blinkState]));
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ssh.c", 2336);
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, EnSsh_OverrideLimbDraw,
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnSsh_OverrideLimbDraw,
EnSsh_PostLimbDraw, &this->actor);
}

View file

@ -11,8 +11,8 @@ typedef void (*EnSshActionFunc)(struct EnSsh*, GlobalContext*);
typedef struct EnSsh {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnime skelAnime;
/* 0x0190 */ Vec3s limbDrawTable[30];
/* 0x0244 */ Vec3s transDrawTable[30];
/* 0x0190 */ Vec3s jointTable[30];
/* 0x0244 */ Vec3s morphTable[30];
/* 0x02F8 */ EnSshActionFunc actionFunc;
/* 0x02FC */ ColliderCylinder colCylinder[6];
/* 0x04C4 */ ColliderJntSph colSph;