1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 14:50:15 +00:00

SkelAnime "Skeleton" Documentation Pass (#497)

* 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

* spooky scary skeletons

* there's a skeleton inside of you

* formatting

* types

* a matched function even

* undo change

* lol anime

* ok how did I forget the .s

* array fix

* would you like to ride the bone train?

* stuff

* more renames

* renames and cleanup

* names suck

* idea

* using void** for now

* stuff

* look more type fixes

Co-authored-by: fig <fig02srl@gmail.com>
This commit is contained in:
petrie911 2020-12-01 21:19:56 -06:00 committed by GitHub
parent 629d1c8968
commit 4876610c75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
268 changed files with 1941 additions and 2045 deletions

View file

@ -73,7 +73,7 @@ static Vec3f D_80AE4940 = { 300.0f, 0.0f, 0.0f };
static Vec3f D_80AE494C = { 300.0f, 0.0f, 0.0f };
static Vec3f D_80AE4958 = { 0.25f, 0.25f, 0.25f };
extern SkeletonHeader D_06003DD8;
extern FlexSkeletonHeader D_06003DD8;
extern AnimationHeader D_06004268;
extern AnimationHeader D_060046F8;
extern AnimationHeader D_06004ADC;
@ -84,7 +84,7 @@ extern AnimationHeader D_06006E88;
extern AnimationHeader D_060074F0;
extern AnimationHeader D_06008040;
extern AnimationHeader D_060087D0;
extern SkeletonHeader D_0600E778;
extern FlexSkeletonHeader D_0600E778;
extern AnimationHeader D_0600EFDC;
void EnRd_SetupAction(EnRd* this, EnRdActionFunc actionFunc) {
@ -113,12 +113,12 @@ void EnRd_Init(Actor* thisx, GlobalContext* globalCtx) {
}
if (thisx->params >= -1) {
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_0600E778, &D_060087D0, this->limbDrawTable,
this->transitionDrawTable, 26);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600E778, &D_060087D0, this->limbDrawTable,
this->transitionDrawTable, 26);
thisx->naviEnemyId = 42;
} else {
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06003DD8, &D_060087D0, this->limbDrawTable,
this->transitionDrawTable, 26);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06003DD8, &D_060087D0, this->limbDrawTable,
this->transitionDrawTable, 26);
thisx->naviEnemyId = 45;
}
@ -231,8 +231,7 @@ void func_80AE2744(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE2970(EnRd* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_060087D0, 0, 0, SkelAnime_GetFrameCount(&D_060087D0.genericHeader), 0,
-6.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_060087D0, 0, 0, SkelAnime_GetFrameCount(&D_060087D0), 0, -6.0f);
this->unk_31B = 0xB;
this->unk_30C = 6;
this->actor.shape.rot.x = -0x4000;
@ -268,8 +267,7 @@ void func_80AE2A10(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE2B90(EnRd* this, GlobalContext* globalCtx) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600EFDC, 1.0f, 4.0f, SkelAnime_GetFrameCount(&D_0600EFDC.genericHeader),
1, -4.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600EFDC, 1.0f, 4.0f, SkelAnime_GetFrameCount(&D_0600EFDC), 1, -4.0f);
this->actor.speedXZ = 0.4f;
this->unk_31B = 4;
EnRd_SetupAction(this, func_80AE2C1C);
@ -336,8 +334,7 @@ void func_80AE2C1C(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE2F50(EnRd* this, GlobalContext* globalCtx) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600EFDC, 0.5f, 0, SkelAnime_GetFrameCount(&D_0600EFDC.genericHeader), 1,
-4.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600EFDC, 0.5f, 0, SkelAnime_GetFrameCount(&D_0600EFDC), 1, -4.0f);
this->unk_31B = 2;
EnRd_SetupAction(this, func_80AE2FD0);
}
@ -385,8 +382,7 @@ void func_80AE2FD0(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE31DC(EnRd* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600EFDC, 0.5f, 0, SkelAnime_GetFrameCount(&D_0600EFDC.genericHeader), 1,
-4.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_0600EFDC, 0.5f, 0, SkelAnime_GetFrameCount(&D_0600EFDC), 1, -4.0f);
this->unk_31B = 3;
this->unk_305 = 1;
EnRd_SetupAction(this, func_80AE3260);
@ -459,8 +455,8 @@ void func_80AE3454(EnRd* this, GlobalContext* globalCtx) {
Math_SmoothScaleMaxMinS(&this->unk_310, 0, 1, 0x5DC, 0);
case 2:
if (!(player->stateFlags2 & 0x80)) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_060046F8, 0.5f, 0.0f,
SkelAnime_GetFrameCount(&D_060046F8.genericHeader), 3, 0.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_060046F8, 0.5f, 0.0f, SkelAnime_GetFrameCount(&D_060046F8), 3,
0.0f);
this->unk_304++;
this->unk_31B = 4;
return;
@ -510,8 +506,7 @@ void func_80AE3454(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE37BC(EnRd* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004F94, 0.0f, 0.0f, SkelAnime_GetFrameCount(&D_06004F94.genericHeader),
2, 0.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06004F94, 0.0f, 0.0f, SkelAnime_GetFrameCount(&D_06004F94), 2, 0.0f);
this->unk_31B = 7;
EnRd_SetupAction(this, func_80AE3834);
}
@ -551,8 +546,7 @@ void func_80AE3978(EnRd* this, GlobalContext* globalCtx) {
}
void func_80AE39D4(EnRd* this) {
SkelAnime_ChangeAnim(&this->skelAnime, &D_06008040, -1.0f, SkelAnime_GetFrameCount(&D_06008040.genericHeader), 0.0f,
2, -4.0f);
SkelAnime_ChangeAnim(&this->skelAnime, &D_06008040, -1.0f, SkelAnime_GetFrameCount(&D_06008040), 0.0f, 2, -4.0f);
this->unk_31B = 6;
EnRd_SetupAction(this, func_80AE3A54);
}
@ -798,7 +792,7 @@ void EnRd_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 EnRd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
s32 EnRd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx,
Gfx** gfx) {
EnRd* this = THIS;
@ -810,7 +804,7 @@ s32 EnRd_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
return 0;
}
void EnRd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
void EnRd_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx, Gfx** gfx) {
Vec3f sp2C = D_80AE4940;
EnRd* this = THIS;
s32 idx = -1;
@ -870,9 +864,9 @@ void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D18(globalCtx->state.gfxCtx);
gDPSetEnvColor(POLY_OPA_DISP++, 0, 0, 0, this->unk_314);
gSPSegment(POLY_OPA_DISP++, 8, &D_80116280[2]);
POLY_OPA_DISP = SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, EnRd_PostLimbDraw,
&this->actor, POLY_OPA_DISP);
POLY_OPA_DISP = SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, EnRd_PostLimbDraw, this,
POLY_OPA_DISP);
func_80033C30(&thisPos, &D_80AE4958, 255, globalCtx);
if (this->unk_31A != 0) {
this->actor.dmgEffectTimer++;
@ -887,8 +881,8 @@ void EnRd_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_314);
gSPSegment(POLY_XLU_DISP++, 8, &D_80116280[0]);
POLY_XLU_DISP =
SkelAnime_DrawSV2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, NULL, &this->actor, POLY_XLU_DISP);
SkelAnime_DrawFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl,
this->skelAnime.dListCount, EnRd_OverrideLimbDraw, NULL, this, POLY_XLU_DISP);
func_80033C30(&thisPos, &D_80AE4958, this->unk_314, globalCtx);
}