1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-07 06:40: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

@ -65,7 +65,7 @@ static UNK_PTR D_80AA38B0[] = {
};
extern u32 D_06005420;
extern SkeletonHeader D_06008D90;
extern FlexSkeletonHeader D_06008D90;
extern AnimationHeader D_060093BC;
extern AnimationHeader D_06009EE0;
@ -180,7 +180,7 @@ void func_80AA2E54(EnMa3* this, GlobalContext* globalCtx) {
Player* player = PLAYER;
s16 phi_a3;
if ((this->unk_1E0.unk_00 == 0) && (this->skelAnime.animCurrentSeg == &D_06009EE0)) {
if ((this->unk_1E0.unk_00 == 0) && (this->skelAnime.animation == &D_06009EE0)) {
phi_a3 = 1;
} else {
phi_a3 = 0;
@ -205,7 +205,7 @@ s32 func_80AA2EC8(EnMa3* this, GlobalContext* globalCtx) {
}
s32 func_80AA2F28(EnMa3* this) {
if (this->skelAnime.animCurrentSeg != &D_06009EE0) {
if (this->skelAnime.animation != &D_06009EE0) {
return 0;
}
if (this->unk_1E0.unk_00 != 0) {
@ -230,7 +230,7 @@ void func_80AA2F80(EnMa3* this) {
}
void func_80AA3004(EnMa3* this, s32 idx) {
f32 frameCount = SkelAnime_GetFrameCount(&D_80AA3848[idx].animation->genericHeader);
f32 frameCount = SkelAnime_GetFrameCount(D_80AA3848[idx].animation);
SkelAnime_ChangeAnim(&this->skelAnime, D_80AA3848[idx].animation, 1.0f, 0.0f, frameCount, D_80AA3848[idx].unk_08,
D_80AA3848[idx].transitionRate);
@ -241,7 +241,7 @@ void EnMa3_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawFunc_Circle, 18.0f);
SkelAnime_InitSV(globalCtx, &this->skelAnime, &D_06008D90, NULL, 0, 0, 0);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06008D90, NULL, 0, 0, 0);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
func_80061EFC(&this->actor.colChkInfo, DamageTable_Get(0x16), &sColChkInfoInit);
@ -302,7 +302,7 @@ void EnMa3_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnMa3* this = THIS;
Vec3s vec;
@ -328,16 +328,16 @@ s32 EnMa3_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
return 0;
}
void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnMa3_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
EnMa3* this = THIS;
Vec3f vec = D_80AA3898;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 927);
if (limbIndex == 18) {
Matrix_MultVec3f(&vec, &thisx->posRot2.pos);
Matrix_MultVec3f(&vec, &this->actor.posRot2.pos);
}
if ((limbIndex == 14) && (this->skelAnime.animCurrentSeg == &D_060093BC)) {
if ((limbIndex == 14) && (this->skelAnime.animation == &D_060093BC)) {
gSPDisplayList(POLY_OPA_DISP++, &D_06005420);
}
@ -360,8 +360,8 @@ void EnMa3_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(D_80AA38A4[this->unk_210]));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AA38B0[this->unk_20E]));
SkelAnime_DrawSV(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
EnMa3_OverrideLimbDraw, EnMa3_PostLimbDraw, &this->actor);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, this->skelAnime.dListCount,
EnMa3_OverrideLimbDraw, EnMa3_PostLimbDraw, this);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ma3.c", 1013);
}