mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-15 12:24:39 +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:
parent
629d1c8968
commit
4876610c75
268 changed files with 1941 additions and 2045 deletions
|
@ -10,7 +10,7 @@ typedef struct {
|
|||
/* 0x04 */ Vec3f pos;
|
||||
} BowStringData; // size = 0x10
|
||||
|
||||
SkeletonHeader* gPlayerSkelHeaders[] = { 0x060377F4, 0x0602CF6C };
|
||||
FlexSkeletonHeader* gPlayerSkelHeaders[] = { 0x060377F4, 0x0602CF6C };
|
||||
|
||||
s16 sBootData[PLAYER_BOOTS_MAX][17] = {
|
||||
{ 200, 1000, 300, 700, 550, 270, 600, 350, 800, 600, -100, 600, 590, 750, 125, 200, 130 },
|
||||
|
@ -625,9 +625,9 @@ Gfx* sBootDListGroups[][2] = {
|
|||
{ 0x06025BA8, 0x06025DB0 },
|
||||
};
|
||||
|
||||
void func_8008F470(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDrawTable, s32 dListCount, s32 lod,
|
||||
s32 tunic, s32 boots, s32 face, OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw,
|
||||
void* arg) {
|
||||
void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* limbDrawTable, s32 dListCount, s32 lod, s32 tunic,
|
||||
s32 boots, s32 face, OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
|
||||
void* data) {
|
||||
Color_RGB8* color;
|
||||
s32 eyeIndex = (limbDrawTable[22].x & 0xF) - 1;
|
||||
s32 mouthIndex = (limbDrawTable[22].x >> 4) - 1;
|
||||
|
@ -651,7 +651,7 @@ void func_8008F470(GlobalContext* globalCtx, Skeleton* skeleton, Vec3s* limbDraw
|
|||
|
||||
sDListsLodOffset = lod * 2;
|
||||
|
||||
SkelAnime_LodDrawSV(globalCtx, skeleton, limbDrawTable, dListCount, overrideLimbDraw, postLimbDraw, arg, lod);
|
||||
SkelAnime_DrawFlexLod(globalCtx, skeleton, limbDrawTable, dListCount, overrideLimbDraw, postLimbDraw, data, lod);
|
||||
|
||||
if ((overrideLimbDraw != func_800902F0) && (overrideLimbDraw != func_80090440) && (gSaveContext.gameMode != 3)) {
|
||||
if (LINK_IS_ADULT) {
|
||||
|
@ -792,8 +792,8 @@ void func_8008F87C(GlobalContext* globalCtx, Player* this, SkelAnime* skelAnime,
|
|||
}
|
||||
}
|
||||
|
||||
s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor) {
|
||||
Player* this = (Player*)actor;
|
||||
s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (limbIndex == PLAYER_LIMB_ROOT) {
|
||||
D_80160014 = this->leftHandType;
|
||||
|
@ -858,10 +858,10 @@ s32 func_8008FCC8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
return 0;
|
||||
}
|
||||
|
||||
s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor) {
|
||||
Player* this = (Player*)actor;
|
||||
s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (func_8008FCC8(globalCtx, limbIndex, dList, pos, rot, actor) == 0) {
|
||||
if (!func_8008FCC8(globalCtx, limbIndex, dList, pos, rot, thisx)) {
|
||||
if (limbIndex == PLAYER_LIMB_L_HAND) {
|
||||
Gfx** dLists = this->leftHandDLists;
|
||||
|
||||
|
@ -910,10 +910,10 @@ s32 func_80090014(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
return 0;
|
||||
}
|
||||
|
||||
s32 func_800902F0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor) {
|
||||
Player* this = (Player*)actor;
|
||||
s32 func_800902F0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (func_8008FCC8(globalCtx, limbIndex, dList, pos, rot, actor) == 0) {
|
||||
if (!func_8008FCC8(globalCtx, limbIndex, dList, pos, rot, thisx)) {
|
||||
if (this->unk_6AD != 2) {
|
||||
*dList = NULL;
|
||||
} else if (limbIndex == PLAYER_LIMB_L_FOREARM) {
|
||||
|
@ -934,8 +934,8 @@ s32 func_800902F0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
return 0;
|
||||
}
|
||||
|
||||
s32 func_80090440(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor) {
|
||||
if (func_8008FCC8(globalCtx, limbIndex, dList, pos, rot, actor) == 0) {
|
||||
s32 func_80090440(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
if (!func_8008FCC8(globalCtx, limbIndex, dList, pos, rot, thisx)) {
|
||||
*dList = NULL;
|
||||
}
|
||||
|
||||
|
@ -1069,7 +1069,7 @@ void func_80090A28(Player* this, Vec3f* vecs) {
|
|||
|
||||
void func_80090AFC(GlobalContext* globalCtx, Player* this, f32 arg2) {
|
||||
static Vec3f D_801260C8 = { -500.0f, -100.0f, 0.0f };
|
||||
f32 sp9C;
|
||||
CollisionPoly* sp9C;
|
||||
f32 sp98;
|
||||
Vec3f sp8C;
|
||||
Vec3f sp80;
|
||||
|
@ -1085,7 +1085,7 @@ void func_80090AFC(GlobalContext* globalCtx, Player* this, f32 arg2) {
|
|||
|
||||
if (1) {}
|
||||
|
||||
if (func_8003E188(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &sp98) != 0) {
|
||||
if (func_8003E188(&globalCtx->colCtx, &sp8C, &sp80, &sp74, &sp9C, 1, 1, 1, 1, &sp98)) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2572);
|
||||
|
||||
OVERLAY_DISP = Gfx_CallSetupDL(OVERLAY_DISP, 0x07);
|
||||
|
@ -1152,8 +1152,8 @@ Vec3f D_801261E0[] = {
|
|||
{ 200.0f, 200.0f, 0.0f },
|
||||
};
|
||||
|
||||
void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) {
|
||||
Player* this = (Player*)actor;
|
||||
void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx) {
|
||||
Player* this = (Player*)thisx;
|
||||
|
||||
if (*dList != NULL) {
|
||||
Matrix_MultVec3f(&D_8012602C, D_80160000);
|
||||
|
@ -1367,7 +1367,7 @@ u32 func_80091738(GlobalContext* globalCtx, u8* segment, SkelAnime* skelAnime) {
|
|||
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
|
||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
|
||||
|
||||
SkelAnime_InitLinkAnimetion(globalCtx, skelAnime, gPlayerSkelHeaders[(void)0, gSaveContext.linkAge], &D_04003238, 9,
|
||||
SkelAnime_InitLinkAnimation(globalCtx, skelAnime, gPlayerSkelHeaders[(void)0, gSaveContext.linkAge], &D_04003238, 9,
|
||||
ptr, ptr, PLAYER_LIMB_MAX);
|
||||
|
||||
return size + 0x8890;
|
||||
|
@ -1415,9 +1415,9 @@ s32 func_80091880(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* p
|
|||
return 0;
|
||||
}
|
||||
|
||||
void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, struct_80091A24_arg3* arg3, Vec3f* pos,
|
||||
Vec3s* rot, f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots, s32 width, s32 height,
|
||||
Vec3f* eye, Vec3f* at, f32 fovy, void* img1, void* img2) {
|
||||
void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, SkelAnime* arg3, Vec3f* pos, Vec3s* rot,
|
||||
f32 scale, s32 sword, s32 tunic, s32 shield, s32 boots, s32 width, s32 height, Vec3f* eye, Vec3f* at,
|
||||
f32 fovy, void* img1, void* img2) {
|
||||
static Vp viewport = { 128, 224, 511, 0, 128, 224, 511, 0 };
|
||||
static Lights1 lights1 = gdSPDefLights1(80, 80, 80, 255, 255, 255, 84, 84, 172);
|
||||
static Vec3f lightDir = { 89.8f, 0.0f, 89.8f };
|
||||
|
@ -1509,7 +1509,7 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, struct_80
|
|||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x0C, gCullBackDList);
|
||||
|
||||
func_8008F470(globalCtx, arg3->skeleton, arg3->limbDrawTable, arg3->dListCount, 0, tunic, boots, 0, func_80091880,
|
||||
func_8008F470(globalCtx, arg3->skeleton, arg3->limbDrawTbl, arg3->dListCount, 0, tunic, boots, 0, func_80091880,
|
||||
NULL, &sp12C);
|
||||
|
||||
gSPEndDisplayList(POLY_OPA_DISP++);
|
||||
|
@ -1521,8 +1521,8 @@ void func_80091A24(GlobalContext* globalCtx, void* seg04, void* seg06, struct_80
|
|||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 3288);
|
||||
}
|
||||
|
||||
void func_8009214C(GlobalContext* globalCtx, u8* segment, struct_80091A24_arg3* arg2, Vec3f* pos, Vec3s* rot, f32 scale,
|
||||
s32 sword, s32 tunic, s32 shield, s32 boots) {
|
||||
void func_8009214C(GlobalContext* globalCtx, u8* segment, SkelAnime* arg2, Vec3f* pos, Vec3s* rot, f32 scale, s32 sword,
|
||||
s32 tunic, s32 shield, s32 boots) {
|
||||
static Vec3f eye = { 0.0f, 0.0f, -400.0f };
|
||||
static Vec3f at = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3s* destTable;
|
||||
|
@ -1549,7 +1549,7 @@ void func_8009214C(GlobalContext* globalCtx, u8* segment, struct_80091A24_arg3*
|
|||
}
|
||||
|
||||
srcTable = SEGMENTED_TO_VIRTUAL(srcTable);
|
||||
destTable = arg2->limbDrawTable;
|
||||
destTable = arg2->limbDrawTbl;
|
||||
for (i = 0; i < arg2->limbCount; i++) {
|
||||
*destTable++ = *srcTable++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue