SubS Skelanime functions (#572)

* Bring code over

* Change ActorDraw typedefs from actor to thisx

* Rename functions

* Format

* Rename and clean up limb draws

* Some more limb draw cleanup

* Some more cleanup

* Function comments

* Last bit of cleanup

* update tutorial

* More tutorial and format

* Remove extra newlines form actorfixer

* Missed one

* Remove some unnecessary casts

* Fix SkelAnime transform functions in functions.h

* Remove bug comments, and add note

* Remove some more unneeded casts and rename one variable

* format

* Fix merge

* Format
This commit is contained in:
Derek Hensley
2022-01-16 12:14:34 -08:00
committed by GitHub
parent a9c2449c11
commit aa90d1ee2b
53 changed files with 411 additions and 271 deletions
+39 -31
View File
@@ -35,7 +35,7 @@ void SkelAnime_DrawLimbLod(GlobalContext* globalCtx, s32 limbIndex, void** skele
OPEN_DISPS(globalCtx->state.gfxCtx);
Matrix_StatePush();
limb = (LodLimb*)Lib_SegmentedToVirtual(skeleton[limbIndex]);
limb = Lib_SegmentedToVirtual(skeleton[limbIndex]);
limbIndex++;
rot = jointTable[limbIndex];
@@ -94,7 +94,7 @@ void SkelAnime_DrawLod(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTa
Matrix_StatePush();
rootLimb = (LodLimb*)Lib_SegmentedToVirtual(skeleton[0]);
rootLimb = Lib_SegmentedToVirtual(skeleton[0]);
pos.x = jointTable[0].x;
pos.y = jointTable[0].y;
pos.z = jointTable[0].z;
@@ -146,7 +146,7 @@ void SkelAnime_DrawFlexLimbLod(GlobalContext* globalCtx, s32 limbIndex, void** s
Matrix_StatePush();
limb = (LodLimb*)Lib_SegmentedToVirtual(skeleton[limbIndex]);
limb = Lib_SegmentedToVirtual(skeleton[limbIndex]);
limbIndex++;
rot = jointTable[limbIndex];
@@ -203,7 +203,7 @@ void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
Gfx* limbDList;
Vec3f pos;
Vec3s rot;
Mtx* mtx = (Mtx*)GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
Mtx* mtx = GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
if (skeleton == NULL) {
return;
@@ -214,7 +214,7 @@ void SkelAnime_DrawFlexLod(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
gSPSegment(POLY_OPA_DISP++, 0x0D, mtx);
Matrix_StatePush();
rootLimb = (LodLimb*)Lib_SegmentedToVirtual(skeleton[0]);
rootLimb = Lib_SegmentedToVirtual(skeleton[0]);
pos.x = jointTable[0].x;
pos.y = jointTable[0].y;
pos.z = jointTable[0].z;
@@ -266,7 +266,7 @@ void SkelAnime_DrawLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skele
Matrix_StatePush();
limb = (StandardLimb*)Lib_SegmentedToVirtual(skeleton[limbIndex]);
limb = Lib_SegmentedToVirtual(skeleton[limbIndex]);
limbIndex++;
rot = jointTable[limbIndex];
pos.x = limb->jointPos.x;
@@ -421,7 +421,7 @@ void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
Gfx* limbDList;
Vec3f pos;
Vec3s rot;
Mtx* mtx = (Mtx*)GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
Mtx* mtx = GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
if (skeleton == NULL) {
return;
@@ -473,9 +473,9 @@ void SkelAnime_DrawFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* joi
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw,
Actor* actor, Mtx** mtx) {
void SkelAnime_DrawTransformFlexLimbOpa(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
TransformLimbDrawOpa transformLimbDraw, Actor* actor, Mtx** mtx) {
StandardLimb* limb;
Gfx* newDList;
Gfx* limbDList;
@@ -486,7 +486,7 @@ void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec
Matrix_StatePush();
limb = (StandardLimb*)Lib_SegmentedToVirtual(skeleton[limbIndex]);
limb = Lib_SegmentedToVirtual(skeleton[limbIndex]);
limbIndex++;
rot = jointTable[limbIndex];
@@ -500,8 +500,8 @@ void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec
Matrix_JointPosition(&pos, &rot);
Matrix_StatePush();
//! @bug Does not check unkDraw is not NULL before calling it.
unkDraw(globalCtx, limbIndex, actor);
transformLimbDraw(globalCtx, limbIndex, actor);
if (newDList != NULL) {
Gfx* polyTemp = POLY_OPA_DISP;
@@ -523,23 +523,32 @@ void func_80134148(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec
}
if (limb->child != LIMB_DONE) {
func_80134148(globalCtx, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, unkDraw, actor,
mtx);
SkelAnime_DrawTransformFlexLimbOpa(globalCtx, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw,
transformLimbDraw, actor, mtx);
}
Matrix_StatePop();
if (limb->sibling != LIMB_DONE) {
func_80134148(globalCtx, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw, unkDraw, actor,
mtx);
SkelAnime_DrawTransformFlexLimbOpa(globalCtx, limb->sibling, skeleton, jointTable, overrideLimbDraw,
postLimbDraw, transformLimbDraw, actor, mtx);
}
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw, UnkActorDrawOpa unkDraw,
Actor* actor) {
/**
* Draw all limbs of type `StandardLimb` in a given flexible skeleton to the polyOpa buffer
* Limbs in a flexible skeleton have meshes that can stretch to line up with other limbs.
* An array of matrices is dynamically allocated so each limb can access any transform to ensure its meshes line up.
*
* Also makes use of a `TransformLimbDraw`, which transforms limbs based on world coordinates, as opposed to local limb
* coordinates.
* Note that the `TransformLimbDraw` does not have a NULL check, so must be provided even if empty.
*/
void SkelAnime_DrawTransformFlexOpa(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDrawOpa overrideLimbDraw, PostLimbDrawOpa postLimbDraw,
TransformLimbDrawOpa transformLimbDraw, Actor* actor) {
StandardLimb* rootLimb;
s32 pad;
Gfx* newDList;
@@ -554,13 +563,13 @@ void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
OPEN_DISPS(globalCtx->state.gfxCtx);
mtx = (Mtx*)GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
mtx = GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
gSPSegment(POLY_OPA_DISP++, 0x0D, mtx);
Matrix_StatePush();
rootLimb = (StandardLimb*)Lib_SegmentedToVirtual(skeleton[0]);
rootLimb = Lib_SegmentedToVirtual(skeleton[0]);
pos.x = jointTable[0].x;
pos.y = jointTable[0].y;
@@ -573,8 +582,7 @@ void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
Matrix_JointPosition(&pos, &rot);
Matrix_StatePush();
//! @bug Does not check unkDraw is not NULL before calling it.
unkDraw(globalCtx, 1, actor);
transformLimbDraw(globalCtx, 1, actor);
if (newDList != NULL) {
Gfx* polyTemp = POLY_OPA_DISP;
@@ -596,8 +604,8 @@ void func_801343C0(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
}
if (rootLimb->child != LIMB_DONE) {
func_80134148(globalCtx, rootLimb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw, unkDraw, actor,
&mtx);
SkelAnime_DrawTransformFlexLimbOpa(globalCtx, rootLimb->child, skeleton, jointTable, overrideLimbDraw,
postLimbDraw, transformLimbDraw, actor, &mtx);
}
Matrix_StatePop();
@@ -655,7 +663,7 @@ Gfx* SkelAnime_DrawLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton
Matrix_StatePush();
limb = (StandardLimb*)Lib_SegmentedToVirtual(skeleton[limbIndex]);
limb = Lib_SegmentedToVirtual(skeleton[limbIndex]);
limbIndex++;
rot = jointTable[limbIndex];
@@ -711,7 +719,7 @@ Gfx* SkelAnime_Draw(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable
Matrix_StatePush();
rootLimb = (StandardLimb*)Lib_SegmentedToVirtual(skeleton[0]);
rootLimb = Lib_SegmentedToVirtual(skeleton[0]);
pos.x = jointTable[0].x;
pos.y = jointTable[0].y;
@@ -758,7 +766,7 @@ Gfx* SkelAnime_DrawFlexLimb(GlobalContext* globalCtx, s32 limbIndex, void** skel
Matrix_StatePush();
limb = (StandardLimb*)Lib_SegmentedToVirtual(skeleton[limbIndex]);
limb = Lib_SegmentedToVirtual(skeleton[limbIndex]);
limbIndex++;
rot = jointTable[limbIndex];
@@ -821,7 +829,7 @@ Gfx* SkelAnime_DrawFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointT
return NULL;
}
mtx = (Mtx*)GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
mtx = GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(sizeof(Mtx) * dListCount));
gSPSegment(gfx++, 0x0D, mtx);
@@ -994,7 +1002,7 @@ void AnimationContext_SetLoadFrame(GlobalContext* globalCtx, LinkAnimationHeader
AnimationEntry* entry = AnimationContext_AddEntry(&globalCtx->animationCtx, ANIMATION_LINKANIMETION);
if (entry != NULL) {
LinkAnimationHeader* linkAnimHeader = (LinkAnimationHeader*)Lib_SegmentedToVirtual(animation);
LinkAnimationHeader* linkAnimHeader = Lib_SegmentedToVirtual(animation);
u32 ram = frameTable;
osCreateMesgQueue(&entry->data.load.msgQueue, &entry->data.load.msg, 1);
+112 -2
View File
@@ -36,9 +36,119 @@ EnDoor* SubS_FindDoor(GlobalContext* globalCtx, s32 unk_1A5) {
return door;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013A860.s")
Gfx* SubS_DrawTransformFlexLimb(GlobalContext* globalCtx, s32 limbIndex, void** skeleton, Vec3s* jointTable,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw,
TransformLimbDraw transformLimbDraw, Actor* actor, Mtx** mtx, Gfx* gfx) {
StandardLimb* limb;
Gfx* newDList;
Gfx* limbDList;
Vec3f pos;
Vec3s rot;
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013AB00.s")
Matrix_StatePush();
limb = Lib_SegmentedToVirtual(skeleton[limbIndex]);
limbIndex++;
rot = jointTable[limbIndex];
pos.x = limb->jointPos.x;
pos.y = limb->jointPos.y;
pos.z = limb->jointPos.z;
newDList = limbDList = limb->dList;
if ((overrideLimbDraw == NULL) || !overrideLimbDraw(globalCtx, limbIndex, &newDList, &pos, &rot, actor, &gfx)) {
Matrix_JointPosition(&pos, &rot);
Matrix_StatePush();
transformLimbDraw(globalCtx, limbIndex, actor, &gfx);
if (newDList != NULL) {
Matrix_ToMtx(*mtx);
gSPMatrix(gfx++, *mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfx++, newDList);
(*mtx)++;
} else if (limbDList != NULL) {
Matrix_ToMtx(*mtx);
(*mtx)++;
}
Matrix_StatePop();
}
if (postLimbDraw != NULL) {
postLimbDraw(globalCtx, limbIndex, &limbDList, &rot, actor, &gfx);
}
if (limb->child != LIMB_DONE) {
gfx = SubS_DrawTransformFlexLimb(globalCtx, limb->child, skeleton, jointTable, overrideLimbDraw, postLimbDraw,
transformLimbDraw, actor, mtx, gfx);
}
Matrix_StatePop();
if (limb->sibling != LIMB_DONE) {
gfx = SubS_DrawTransformFlexLimb(globalCtx, limb->sibling, skeleton, jointTable, overrideLimbDraw, postLimbDraw,
transformLimbDraw, actor, mtx, gfx);
}
return gfx;
}
/**
* Draw all limbs of type `StandardLimb` in a given flexible skeleton
* Limbs in a flexible skeleton have meshes that can stretch to line up with other limbs.
* An array of matrices is dynamically allocated so each limb can access any transform to ensure its meshes line up.
*
* Also makes use of a `TransformLimbDraw`, which transforms limbs based on world coordinates, as opposed to local limb
* coordinates.
* Note that the `TransformLimbDraw` does not have a NULL check, so must be provided even if empty.
*/
Gfx* SubS_DrawTransformFlex(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable, s32 dListCount,
OverrideLimbDraw overrideLimbDraw, PostLimbDraw postLimbDraw,
TransformLimbDraw transformLimbDraw, Actor* actor, Gfx* gfx) {
StandardLimb* rootLimb;
s32 pad;
Gfx* newDlist;
Gfx* limbDList;
Vec3f pos;
Vec3s rot;
Mtx* mtx = GRAPH_ALLOC(globalCtx->state.gfxCtx, ALIGN16(dListCount * sizeof(Mtx)));
if (skeleton == NULL) {
return NULL;
}
gSPSegment(gfx++, 0x0D, mtx);
Matrix_StatePush();
rootLimb = Lib_SegmentedToVirtual(skeleton[0]);
pos.x = jointTable->x;
pos.y = jointTable->y;
pos.z = jointTable->z;
rot = jointTable[1];
newDlist = rootLimb->dList;
limbDList = rootLimb->dList;
if (overrideLimbDraw == NULL || !overrideLimbDraw(globalCtx, 1, &newDlist, &pos, &rot, actor, &gfx)) {
Matrix_JointPosition(&pos, &rot);
Matrix_StatePush();
transformLimbDraw(globalCtx, 1, actor, &gfx);
if (newDlist != NULL) {
Matrix_ToMtx(mtx);
gSPMatrix(gfx++, mtx, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(gfx++, newDlist);
mtx++;
} else if (limbDList != NULL) {
Matrix_ToMtx(mtx);
mtx++;
}
Matrix_StatePop();
}
if (postLimbDraw != NULL) {
postLimbDraw(globalCtx, 1, &limbDList, &rot, actor, &gfx);
}
if (rootLimb->child != LIMB_DONE) {
gfx = SubS_DrawTransformFlexLimb(globalCtx, rootLimb->child, skeleton, jointTable, overrideLimbDraw,
postLimbDraw, transformLimbDraw, actor, &mtx, gfx);
}
Matrix_StatePop();
return gfx;
}
#pragma GLOBAL_ASM("asm/non_matchings/code/z_sub_s/func_8013AD6C.s")
+3 -3
View File
@@ -91,13 +91,13 @@ void DmNb_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 30.0f, 12.0f, 0.0f, 4);
}
void DmNb_UnkActorDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void DmNb_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
}
void DmNb_Draw(Actor* thisx, GlobalContext* globalCtx) {
DmNb* this = THIS;
func_8012C5B0(globalCtx->state.gfxCtx);
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
NULL, DmNb_UnkActorDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, NULL, NULL, DmNb_TransformLimbDraw, &this->actor);
}
+7 -6
View File
@@ -74,14 +74,14 @@ void DmSa_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
s32 func_80A2EB10(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor) {
return 0;
s32 DmSa_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
return false;
}
void func_80A2EB2C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) {
void DmSa_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
}
void func_80A2EB44(GlobalContext* globalCtx, s32 limbIndex, Actor* actor) {
void DmSa_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
}
Gfx* func_80A2EB58(GraphicsContext* gfxCtx, u32 alpha) {
@@ -120,8 +120,9 @@ void DmSa_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x0C, func_80A2EBB0(globalCtx->state.gfxCtx, this->alpha));
}
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_80A2EB10, func_80A2EB2C, func_80A2EB44, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, DmSa_OverrideLimbDraw, DmSa_PostLimbDraw,
DmSa_TransformLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
@@ -1670,13 +1670,13 @@ s32 EnAkindonuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
*dList = object_dnt_DL_008290;
}
}
return 0;
return false;
}
void EnAkindonuts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
}
void EnAkindonuts_UnkActorDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnAkindonuts_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnAkindonuts* this = THIS;
if (((this->unk_33E == 1) || (this->unk_33E == 2)) && ((limbIndex == 23) || (limbIndex == 24))) {
@@ -1696,6 +1696,7 @@ void EnAkindonuts_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnAkindonuts* this = THIS;
func_8012C28C(globalCtx->state.gfxCtx);
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnAkindonuts_OverrideLimbDraw, EnAkindonuts_PostLimbDraw, EnAkindonuts_UnkActorDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnAkindonuts_OverrideLimbDraw, EnAkindonuts_PostLimbDraw,
EnAkindonuts_TransformLimbDraw, &this->actor);
}
@@ -979,7 +979,7 @@ void EnAob01_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 EnAob01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* thisx) {
EnAob01* this = THIS;
UNK_TYPE sp38[] = {
TexturePtr sp38[] = {
&object_aob_Tex_000658,
&object_aob_Tex_000E58,
&object_aob_Tex_001658,
@@ -1023,7 +1023,7 @@ void EnAob01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
}
}
void EnAob01_UnkDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnAob01_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
}
void EnAob01_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -1040,8 +1040,9 @@ void EnAob01_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_EnvColor(globalCtx->state.gfxCtx, 50, 80, 0, 0));
gDPPipeSync(POLY_OPA_DISP++);
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnAob01_OverrideLimbDraw, EnAob01_PostLimbDraw, EnAob01_UnkDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnAob01_OverrideLimbDraw, EnAob01_PostLimbDraw,
EnAob01_TransformLimbDraw, &this->actor);
if (this->actor.draw != NULL) {
func_8012C2DC(globalCtx->state.gfxCtx);
@@ -1223,19 +1223,19 @@ void EnBigpo_UpdateFire(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
s32 EnBigpo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* actor,
s32 EnBigpo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
Gfx** gfx) {
EnBigpo* this = (EnBigpo*)actor;
EnBigpo* this = THIS;
// not fully invisible
if (!(this->mainColor.a != 0 && limbIndex != 7) ||
(this->actionFunc == EnBigpo_BurnAwayDeath && this->idleTimer >= 2)) {
*dList = NULL;
}
return 0;
return false;
}
void EnBigpo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor, Gfx** gfx) {
EnBigpo* this = (EnBigpo*)actor;
void EnBigpo_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
EnBigpo* this = THIS;
s8 limbByte;
Vec3f* v1ptr; // todo: figure out better names
Vec3f* v2ptr;
@@ -26,8 +26,9 @@ void func_809CD6C0(EnBji01* this, GlobalContext* globalCtx);
void func_809CD70C(EnBji01* this, GlobalContext* globalCtx);
void func_809CD77C(EnBji01* this, GlobalContext* globalCtx);
s32 EnBji01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* arg);
void EnBji01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg);
s32 EnBji01_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* thisx);
void EnBji01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx);
extern AnimationHeader D_06000FDC;
extern AnimationHeader D_06005B58;
@@ -441,7 +442,7 @@ void EnBji01_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
}
void EnBji01_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* sEyeTextures[] = { D_060049F0, D_06004E70, D_06005270 };
static TexturePtr sEyeTextures[] = { D_060049F0, D_06004E70, D_06005270 };
EnBji01* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx);
+15 -15
View File
@@ -582,8 +582,8 @@ void EnDai_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 func_80B3F598(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
Gfx** gfx) {
s32 EnDai_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
Gfx** gfx) {
EnDai* this = THIS;
if (!(this->unk_1CE & 0x40)) {
@@ -598,10 +598,10 @@ s32 func_80B3F598(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
*dList = NULL;
}
return 0;
return false;
}
void func_80B3F614(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
void EnDai_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
static Vec3f D_80B3FE4C = { 0.0f, 0.0f, 0.0f };
EnDai* this = THIS;
@@ -626,10 +626,10 @@ void func_80B3F614(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
}
}
void func_80B3F6EC(GlobalContext* globalCtx, s32 arg1, Actor* thisx, Gfx** gfx) {
void EnDai_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx, Gfx** gfx) {
EnDai* this = THIS;
switch (arg1) {
switch (limbIndex) {
case 9:
if (this->unk_1CE & 0x100) {
func_80B3EC84(this);
@@ -669,9 +669,9 @@ void func_80B3F78C(EnDai* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, 255);
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(D_80B3FE58[this->unk_1D6]));
POLY_XLU_DISP =
func_8013AB00(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_80B3F598, func_80B3F614, func_80B3F6EC, &this->actor, POLY_XLU_DISP);
POLY_XLU_DISP = SubS_DrawTransformFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnDai_OverrideLimbDraw, EnDai_PostLimbDraw,
EnDai_TransformLimbDraw, &this->actor, POLY_XLU_DISP);
if (this->unk_1CE & 0x40) {
Matrix_SetCurrentState(&this->unk_18C);
@@ -701,9 +701,9 @@ void func_80B3F920(EnDai* this, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80B3FE70[this->unk_1D6]));
POLY_OPA_DISP =
func_8013AB00(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_80B3F598, func_80B3F614, func_80B3F6EC, &this->actor, POLY_OPA_DISP);
POLY_OPA_DISP = SubS_DrawTransformFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnDai_OverrideLimbDraw, EnDai_PostLimbDraw,
EnDai_TransformLimbDraw, &this->actor, POLY_OPA_DISP);
Matrix_SetCurrentState(&this->unk_18C);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -720,9 +720,9 @@ void func_80B3F920(EnDai* this, GlobalContext* globalCtx) {
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_1CD);
gSPSegment(POLY_XLU_DISP++, 0x08, Lib_SegmentedToVirtual(D_80B3FE70[this->unk_1D6]));
POLY_XLU_DISP =
func_8013AB00(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_80B3F598, func_80B3F614, func_80B3F6EC, &this->actor, POLY_XLU_DISP);
POLY_XLU_DISP = SubS_DrawTransformFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnDai_OverrideLimbDraw, EnDai_PostLimbDraw,
EnDai_TransformLimbDraw, &this->actor, POLY_XLU_DISP);
Matrix_SetCurrentState(&this->unk_18C);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
@@ -296,7 +296,8 @@ void EnDaiku_Update(Actor* thisx, GlobalContext* globalCtx) {
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->collider.base);
}
s32 func_80943E18(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnDaiku_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* thisx) {
EnDaiku* this = THIS;
if (limbIndex == 15) {
@@ -304,10 +305,10 @@ s32 func_80943E18(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
rot->z += this->unk_25E;
}
return 0;
return false;
}
void func_80943E60(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnDaiku_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static Gfx* D_809440D4[] = { D_060070C0, D_06006FB0, D_06006E80, D_06006D70 };
EnDaiku* this = THIS;
@@ -354,7 +355,7 @@ void EnDaiku_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_80943E18, func_80943E60, &this->actor);
EnDaiku_OverrideLimbDraw, EnDaiku_PostLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
@@ -671,7 +671,8 @@ void EnDekunuts_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 func_808BEBD0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnDekunuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* thisx) {
EnDekunuts* this = THIS;
f32 arg1, arg2, arg3;
f32 currentFrame;
@@ -700,10 +701,10 @@ s32 func_808BEBD0(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
rot->z = this->actor.world.rot.x;
}
}
return 0;
return false;
}
void func_808BED30(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnDekunuts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static s8 D_808BEF98[] = {
-1, -1, -1, 3, -1, 0, -1, 1, -1, 2, 0, 0,
};
@@ -739,8 +740,8 @@ void func_808BED30(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
void EnDekunuts_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnDekunuts* this = THIS;
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, func_808BEBD0, func_808BED30,
&this->actor);
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDekunuts_OverrideLimbDraw,
EnDekunuts_PostLimbDraw, &this->actor);
Matrix_SetStateRotationAndTranslation(this->actor.home.pos.x, this->actor.home.pos.y, this->actor.home.pos.z,
&this->actor.home.rot);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
+4 -4
View File
@@ -1174,11 +1174,11 @@ void EnDg_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 func_8098BFB8(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
return 0;
s32 EnDg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
return false;
}
void func_8098BFD4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnDg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnDg* this = THIS;
Vec3f sp20 = { 0.0f, 20.0f, 0.0f };
@@ -1231,7 +1231,7 @@ void EnDg_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_RotateY(this->actor.shape.rot.y, MTXMODE_APPLY);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_8098BFB8, func_8098BFD4, &this->actor);
EnDg_OverrideLimbDraw, EnDg_PostLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+5 -4
View File
@@ -456,10 +456,10 @@ s32 func_80B3D974(s16 arg0, s16 arg1, Vec3f* arg2, Vec3s* arg3, s32 arg4, s32 ar
return 1;
}
void func_80B3DA88(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnDnp_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
}
void func_80B3DAA0(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnDnp_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnDnp* this = THIS;
s32 phi_v1 = 1;
s32 phi_v0;
@@ -504,8 +504,9 @@ void EnDnp_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80B3DEAC[this->unk_336]));
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
func_80B3DA88, func_80B3DAA0, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, NULL, EnDnp_PostLimbDraw, EnDnp_TransformLimbDraw,
&this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
@@ -99,7 +99,7 @@ void EnEndingHero_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(D_80C1E984[index]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
0, 0, &this->actor);
NULL, NULL, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
@@ -71,5 +71,5 @@ void EnEndingHero2_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8012C28C(globalCtx->state.gfxCtx);
func_8012C2DC(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
0, 0, &this->actor);
NULL, NULL, &this->actor);
}
@@ -71,5 +71,5 @@ void EnEndingHero3_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8012C28C(globalCtx->state.gfxCtx);
func_8012C2DC(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
0, 0, &this->actor);
NULL, NULL, &this->actor);
}
@@ -71,5 +71,5 @@ void EnEndingHero4_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8012C28C(globalCtx->state.gfxCtx);
func_8012C2DC(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
0, 0, &this->actor);
NULL, NULL, &this->actor);
}
@@ -74,7 +74,7 @@ void EnEndingHero5_Update(Actor* thisx, GlobalContext* globalCtx) {
Gfx* D_80C23BF0[] = { D_060070C0, D_06006FB0, D_06006E80, D_06006D70, D_0600A390 };
void func_80C23A30(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnEndingHero5_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnEndingHero5* this = THIS;
OPEN_DISPS(globalCtx->state.gfxCtx);
@@ -112,7 +112,7 @@ void EnEndingHero5_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
NULL, func_80C23A30, &this->actor);
NULL, EnEndingHero5_PostLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+5 -5
View File
@@ -360,8 +360,8 @@ void EnFg_Update(Actor* thisx, GlobalContext* globalCtx) {
func_80A2D348(this, globalCtx);
}
s32 EnFg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* arg) {
EnFg* this = (EnFg*)arg;
s32 EnFg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnFg* this = THIS;
if ((limbIndex == 7) || (limbIndex == 8)) {
*dList = NULL;
@@ -372,11 +372,11 @@ s32 EnFg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
*dList = NULL;
}
}
return 0;
return false;
}
void EnFg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
EnFg* this = (EnFg*)arg;
void EnFg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnFg* this = THIS;
s16 pad;
Vec3f vec1 = { 0.0f, 0.0f, 0.0f };
@@ -4228,7 +4228,7 @@ s32 EnFishing_LoachOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx
rot->y += this->unk_1C4[2];
}
return 0;
return false;
}
void EnFishing_LoachPostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
+2 -2
View File
@@ -1585,7 +1585,7 @@ s32 EnFsn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
if (limbIndex == 17) {
*dList = NULL;
}
return 0;
return false;
}
void EnFsn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
@@ -1604,7 +1604,7 @@ void EnFsn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
void EnFsn_Draw(Actor* thisx, GlobalContext* globalCtx) {
static void* sEyeTextures[] = { &D_06005BC0, &D_06006D40, &D_06007140 };
static TexturePtr sEyeTextures[] = { &D_06005BC0, &D_06006D40, &D_06007140 };
EnFsn* this = THIS;
s32 pad;
s16 i;
+4 -3
View File
@@ -966,7 +966,7 @@ void EnGeg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
}
void EnGeg_UnkDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnGeg_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnGeg* this = THIS;
s32 phi_v0;
s32 phi_v1;
@@ -1039,8 +1039,9 @@ void func_80BB3BE0(EnGeg* this, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80BB4088[this->unk_23E]));
gDPPipeSync(POLY_OPA_DISP++);
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnGeg_OverrideLimbDraw, EnGeg_PostLimbDraw, EnGeg_UnkDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnGeg_OverrideLimbDraw, EnGeg_PostLimbDraw,
EnGeg_TransformLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
@@ -633,8 +633,8 @@ void EnGinkoMan_Update(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnGinkoMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* arg) {
EnGinkoMan* this = (EnGinkoMan*)arg;
Actor* thisx) {
EnGinkoMan* this = THIS;
if (limbIndex == 15) {
*dList = D_0600B1D8;
@@ -650,10 +650,10 @@ s32 EnGinkoMan_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
Matrix_InsertZRotation_s(-this->limb8Rot.x, MTXMODE_APPLY);
}
return 0;
return false;
}
void EnGinkoMan_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
void EnGinkoMan_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
}
void EnGinkoMan_Draw(Actor* thisx, GlobalContext* globalCtx) {
+6 -5
View File
@@ -1649,7 +1649,7 @@ void EnGm_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 func_809513AC(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnGm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 pad;
EnGm* this = THIS;
s32 phi_v0;
@@ -1684,7 +1684,7 @@ s32 func_809513AC(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
return false;
}
void func_809514BC(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnGm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static Vec3f D_80951E24 = { 1400.0f, 0.0f, 0.0f };
EnGm* this = THIS;
s32 pad[4];
@@ -1710,7 +1710,7 @@ void func_809514BC(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
}
}
void func_80951594(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnGm_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnGm* this = THIS;
s32 phi_v0 = 1;
s32 phi_v1 = 0;
@@ -1762,8 +1762,9 @@ void EnGm_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80951E30[this->unk_3CE]));
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_809513AC, func_809514BC, func_80951594, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnGm_OverrideLimbDraw, EnGm_PostLimbDraw,
EnGm_TransformLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+5 -4
View File
@@ -1993,7 +1993,7 @@ s32 EnGo_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
return false;
}
void EnGo_UnkDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnGo_TransfromLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnGo* this = THIS;
u16 temp_v0;
s32 phi_v1;
@@ -2044,7 +2044,7 @@ void EnGo_UnkDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
}
void func_80A15FEC(Actor* thisx, GlobalContext* globalCtx) {
static UNK_TYPE D_80A1670C[] = {
static TexturePtr D_80A1670C[] = {
&object_oF1d_map_Tex_010438, &object_oF1d_map_Tex_010C38, &object_oF1d_map_Tex_011038,
&object_oF1d_map_Tex_010C38, &object_oF1d_map_Tex_010838,
};
@@ -2060,8 +2060,9 @@ void func_80A15FEC(Actor* thisx, GlobalContext* globalCtx) {
if (this->unk_3DC == 14) {
Matrix_InsertTranslation(0.0f, 0.0f, -4000.0f, MTXMODE_APPLY);
}
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnGo_OverrideLimbDraw, NULL, EnGo_UnkDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnGo_OverrideLimbDraw, NULL, EnGo_TransfromLimbDraw,
&this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
} else {
+3 -3
View File
@@ -27,8 +27,8 @@ void func_80BCF6D0(EnHg* this, GlobalContext* globalCtx);
void func_80BCF8A0(EnHg* this, GlobalContext* globalCtx);
void func_80BCF93C(EnHg* this);
void func_80BCF95C(EnHg* this, GlobalContext* globalCtx);
s32 EnHg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* arg);
void EnHg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg);
s32 EnHg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx);
void EnHg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx);
extern AnimationHeader D_06000370;
extern AnimationHeader D_06001138;
@@ -401,7 +401,7 @@ void EnHg_Update(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnHg_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
return 0;
return false;
}
void EnHg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
+5 -5
View File
@@ -165,7 +165,7 @@ EnDoor* func_80BF1200(GlobalContext* globalCtx, s32 arg1) {
phi_a1 = -1;
break;
}
return (EnDoor*)SubS_FindDoor(globalCtx, phi_a1);
return SubS_FindDoor(globalCtx, phi_a1);
}
void func_80BF1258(EnIg* this) {
@@ -960,7 +960,7 @@ void EnIg_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec
}
}
void EnIg_UnkDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx, Gfx** gfx) {
void EnIg_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx, Gfx** gfx) {
EnIg* this = THIS;
s32 phi_v0;
s32 phi_v1;
@@ -1007,9 +1007,9 @@ void EnIg_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80BF3534[this->unk_3F2]));
POLY_OPA_DISP =
func_8013AB00(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnIg_OverrideLimbDraw, EnIg_PostLimbDraw, EnIg_UnkDraw, &this->actor, POLY_OPA_DISP);
POLY_OPA_DISP = SubS_DrawTransformFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnIg_OverrideLimbDraw, EnIg_PostLimbDraw,
EnIg_TransformLimbDraw, &this->actor, POLY_OPA_DISP);
Matrix_SetCurrentState(&this->unk_190);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
+5 -5
View File
@@ -1525,7 +1525,7 @@ void func_808F6334(EnIn* this, GlobalContext* globalCtx) {
this->unk4C4 = CLAMP(this->unk4C4, 0.0f, 80.0f);
Matrix_InsertTranslation(this->unk4C4, 0.0f, 0.0f, MTXMODE_APPLY);
if (this == (EnIn*)player->targetActor &&
if (&this->actor == player->targetActor &&
!(globalCtx->msgCtx.unk11F04 >= 0xFF && globalCtx->msgCtx.unk11F04 <= 0x200) && newUnk4C8 == 3 &&
this->unk4C8 == 3) {
if (!(globalCtx->state.frames & 1)) {
@@ -1537,8 +1537,8 @@ void func_808F6334(EnIn* this, GlobalContext* globalCtx) {
this->unk4C8 = newUnk4C8;
}
s32 EnIn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* arg) {
EnIn* this = (EnIn*)arg;
s32 EnIn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnIn* this = THIS;
s32 pad;
Gfx* sp50[] = {
NULL, NULL, D_060149A8, D_06014AE0, D_06014C30, D_060145D8, D_06014710,
@@ -1598,8 +1598,8 @@ s32 EnIn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
return 0;
}
void EnIn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
EnIn* this = (EnIn*)arg;
void EnIn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnIn* this = THIS;
Vec3f sp50 = { 1600.0f, 0.0f, 0.0f };
Vec3f sp44 = { 0.0f, 0.0f, 0.0f };
@@ -45,7 +45,8 @@ void EnKakasi_SetupSongTeach(EnKakasi* this, GlobalContext* globalCtx);
void EnKakasi_SetupDialogue(EnKakasi* this);
void EnKakasi_LimbDraw(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, struct Actor* actor);
void EnKakasi_PostLimbDraw(struct GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot,
struct Actor* thisx);
static ColliderCylinderInit D_80971D80 = {
{
@@ -1153,8 +1154,8 @@ void EnKakasi_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
void EnKakasi_LimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* actor) {
EnKakasi* this = (EnKakasi*)actor;
void EnKakasi_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnKakasi* this = THIS;
if (limbIndex == 4) {
Matrix_MultiplyVector3fByState(&gZeroVec3f, &this->unk1BC);
@@ -1165,5 +1166,5 @@ void EnKakasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnKakasi* this = THIS;
func_8012C28C(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,
NULL, EnKakasi_LimbDraw, &this->actor);
NULL, EnKakasi_PostLimbDraw, &this->actor);
}
@@ -523,8 +523,9 @@ void EnMaYts_Update(Actor* thisx, GlobalContext* globalCtx) {
func_80B8D12C(this, globalCtx);
}
s32 EnMaYts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* arg) {
EnMaYts* this = (EnMaYts*)arg;
s32 EnMaYts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* thisx) {
EnMaYts* this = THIS;
Vec3s sp4;
if (limbIndex == MA1_LIMB_HEAD) {
@@ -539,11 +540,11 @@ s32 EnMaYts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLis
rot->z += sp4.x;
}
return 0;
return false;
}
void EnMaYts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
EnMaYts* this = (EnMaYts*)arg;
void EnMaYts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnMaYts* this = THIS;
if (limbIndex == MA1_LIMB_HEAD) {
Matrix_GetStateTranslation(&this->actor.focus.pos);
@@ -604,7 +604,7 @@ void EnMinifrog_UpdateMissingFrog(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnMinifrog_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* arg) {
Actor* thisx) {
if (limbIndex == 1) {
pos->z -= 500.0f;
}
@@ -613,11 +613,11 @@ s32 EnMinifrog_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
*dList = NULL;
}
return 0;
return false;
}
void EnMinifrog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
EnMinifrog* this = (EnMinifrog*)arg;
void EnMinifrog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnMinifrog* this = THIS;
if ((limbIndex == 7) || (limbIndex == 8)) {
OPEN_DISPS(globalCtx->state.gfxCtx);
+3 -3
View File
@@ -906,7 +906,7 @@ void EnNiw_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 EnNiw_LimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnNiw_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnNiw* this = THIS;
if (limbIndex == 13) {
@@ -925,7 +925,7 @@ s32 EnNiw_LimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f*
rot->y += (s16)this->limb7Roty;
rot->z += (s16)this->limb7Rotz;
}
return 0;
return false;
}
void EnNiw_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -933,7 +933,7 @@ void EnNiw_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8012C28C(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelanime.skeleton, this->skelanime.jointTable, this->skelanime.dListCount,
EnNiw_LimbDraw, NULL, &this->actor);
EnNiw_OverrideLimbDraw, NULL, &this->actor);
EnNiw_DrawFeathers(this, globalCtx);
}
@@ -553,7 +553,7 @@ s32 EnPamera_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi
rot->x += this->limb9Rot.y;
rot->z += this->limb9Rot.x;
}
return 0;
return false;
}
void EnPamera_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
@@ -1387,8 +1387,8 @@ static s8 limbPosIndex[] = {
-1, -1, 0, -1, 1, -1, 2, -1, 3, -1, 4, -1, 5, 6, -1, 7, 8, 9, -1, 10, -1, 11, -1, -1,
};
void EnPametfrog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
EnPametfrog* this = (EnPametfrog*)arg;
void EnPametfrog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnPametfrog* this = THIS;
Vec3f vec;
Vec3s* center;
s8 index;
+7 -7
View File
@@ -1809,8 +1809,8 @@ void EnPm_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 func_80AFAA04(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
Gfx** gfx) {
s32 EnPm_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx,
Gfx** gfx) {
EnPm* this = THIS;
if (limbIndex == 15) {
@@ -1819,7 +1819,7 @@ s32 func_80AFAA04(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
return false;
}
void func_80AFAA44(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
void EnPm_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx, Gfx** gfx) {
EnPm* this = THIS;
s32 pad;
Vec3f sp2C;
@@ -1854,7 +1854,7 @@ void func_80AFAA44(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
}
}
void func_80AFABAC(GlobalContext* globalCtx, s32 arg1, Actor* thisx, Gfx** gfx) {
void EnPm_TransformLimbDraw(GlobalContext* globalCtx, s32 arg1, Actor* thisx, Gfx** gfx) {
EnPm* this = THIS;
s32 phi_v0;
s32 phi_v1;
@@ -1901,9 +1901,9 @@ void EnPm_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80AFB914[0]));
POLY_OPA_DISP =
func_8013AB00(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_80AFAA04, func_80AFAA44, func_80AFABAC, &this->actor, POLY_OPA_DISP);
POLY_OPA_DISP = SubS_DrawTransformFlex(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnPm_OverrideLimbDraw, EnPm_PostLimbDraw,
EnPm_TransformLimbDraw, &this->actor, POLY_OPA_DISP);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
@@ -26,7 +26,7 @@ void EnPoFusen_Pop(EnPoFusen* this, GlobalContext* globalCtx);
void EnPoFusen_Idle(EnPoFusen* this, GlobalContext* globalCtx);
void EnPoFusen_IdleFuse(EnPoFusen* this, GlobalContext* globalCtx);
s32 EnPoFusen_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* arg);
Actor* thisx);
extern AnimationHeader D_06000040;
extern FlexSkeletonHeader D_060024F0;
@@ -271,8 +271,8 @@ void EnPoFusen_Update(Actor* thisx, GlobalContext* globalCtx) {
}
s32 EnPoFusen_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot,
Actor* arg) {
EnPoFusen* this = (EnPoFusen*)arg;
Actor* thisx) {
EnPoFusen* this = THIS;
f32 zScale;
f32 yScale;
f32 xScale;
@@ -307,18 +307,19 @@ s32 EnPoFusen_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL
rot->y += (s16)(this->limb9Rot * Math_SinS(this->randBaseRotChange));
rot->z += (s16)(this->limb9Rot * Math_CosS(this->randBaseRotChange));
}
return 0;
return false;
}
void EnPoFusen_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
void EnPoFusen_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
}
void EnPoFusen_UnkActorDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnPoFusen_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
}
void EnPoFusen_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnPoFusen* this = THIS;
func_8012C28C(globalCtx->state.gfxCtx);
func_801343C0(globalCtx, this->anime.skeleton, this->anime.jointTable, this->anime.dListCount,
EnPoFusen_OverrideLimbDraw, EnPoFusen_PostLimbDraw, EnPoFusen_UnkActorDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->anime.skeleton, this->anime.jointTable, this->anime.dListCount,
EnPoFusen_OverrideLimbDraw, EnPoFusen_PostLimbDraw, EnPoFusen_TransformLimbDraw,
&this->actor);
}
@@ -200,7 +200,7 @@ s32 EnRecepgirl_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx**
return false;
}
void EnRecepgirl_UnkLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnRecepgirl_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnRecepgirl* this = THIS;
if (limbIndex == 5) {
@@ -217,8 +217,9 @@ void EnRecepgirl_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8012C28C(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, sEyeTextures[this->eyeTexIndex]);
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnRecepgirl_OverrideLimbDraw, NULL, EnRecepgirl_UnkLimbDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnRecepgirl_OverrideLimbDraw, NULL,
EnRecepgirl_TransformLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+5 -5
View File
@@ -68,19 +68,19 @@ void EnRsn_Update(Actor* thisx, GlobalContext* globalCtx) {
func_800E9250(globalCtx, &this->actor, &this->unk1D8, &this->unk1DE, this->actor.focus.pos);
}
s32 EnRsn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* arg) {
EnRsn* this = (EnRsn*)arg;
s32 EnRsn_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnRsn* this = THIS;
if (limbIndex == 14) {
Matrix_InsertXRotation_s(this->unk1D8.y, MTXMODE_APPLY);
}
return 0;
return false;
}
static Vec3f D_80C26028 = { 0.0f, 0.0f, 0.0f };
void EnRsn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* arg) {
EnRsn* this = (EnRsn*)arg;
void EnRsn_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
EnRsn* this = THIS;
Vec3f sp18 = D_80C26028;
if (limbIndex == 14) {
@@ -1127,7 +1127,7 @@ s32 EnSellnuts_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** d
void EnSellnuts_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
}
void func_80ADD7CC(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnSellnuts_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnSellnuts* this = THIS;
if (((this->unk_350 == 1) || (this->unk_350 == 3)) && ((limbIndex == 23) || (limbIndex == 24))) {
@@ -1148,6 +1148,7 @@ void EnSellnuts_Draw(Actor* thisx, GlobalContext* globalCtx) {
EnSellnuts* this = THIS;
func_8012C28C(globalCtx->state.gfxCtx);
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnSellnuts_OverrideLimbDraw, EnSellnuts_PostLimbDraw, func_80ADD7CC, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnSellnuts_OverrideLimbDraw, EnSellnuts_PostLimbDraw,
EnSellnuts_TransformLimbDraw, &this->actor);
}
@@ -1525,7 +1525,7 @@ void EnSuttari_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
}
}
void EnSuttari_UnkDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnSuttari_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
}
void EnSuttari_Draw(Actor* thisx, GlobalContext* globalCtx) {
@@ -1540,8 +1540,9 @@ void EnSuttari_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Gfx_EnvColor(globalCtx->state.gfxCtx, 255, 255, 255, 0));
gSPSegment(POLY_OPA_DISP++, 0x09, Gfx_EnvColor(globalCtx->state.gfxCtx, 55, 55, 255, 0));
gDPPipeSync(POLY_OPA_DISP++);
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnSuttari_OverrideLimbDraw, EnSuttari_PostLimbDraw, EnSuttari_UnkDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnSuttari_OverrideLimbDraw, EnSuttari_PostLimbDraw,
EnSuttari_TransformLimbDraw, &this->actor);
if (this->flags1 & 0x80) {
func_8012C2DC(globalCtx->state.gfxCtx);
sp5C = this->actor.world.pos;
+3 -3
View File
@@ -1344,7 +1344,7 @@ void func_80AEF5F4(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
s32 func_80AEF65C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnTk_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnTk* this = THIS;
if (limbIndex == 16) {
@@ -1354,7 +1354,7 @@ s32 func_80AEF65C(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
return false;
}
void func_80AEF6A4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnTk_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static Vec3f D_80AEFA84 = { 0.0f, 0.0f, 4600.0f };
EnTk* this = THIS;
@@ -1394,7 +1394,7 @@ void EnTk_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_RotateY(this->unk_318, MTXMODE_APPLY);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
func_80AEF65C, func_80AEF6A4, &this->actor);
EnTk_OverrideLimbDraw, EnTk_PostLimbDraw, &this->actor);
CLOSE_DISPS(globalCtx->state.gfxCtx);
}
+5 -4
View File
@@ -1746,7 +1746,7 @@ s32 EnTrt_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
if (limbIndex == 14) {
*dList = NULL;
}
return 0;
return false;
}
void EnTrt_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
@@ -1767,7 +1767,7 @@ void EnTrt_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
}
void EnTrt_UnkActorDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnTrt_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnTrt* this = THIS;
if (limbIndex == 21) {
@@ -1789,8 +1789,9 @@ void EnTrt_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_8012C28C(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->eyeTextureIdx]));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(sEyeTextures[this->eyeTextureIdx]));
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnTrt_OverrideLimbDraw, EnTrt_PostLimbDraw, EnTrt_UnkActorDraw, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnTrt_OverrideLimbDraw, EnTrt_PostLimbDraw,
EnTrt_TransformLimbDraw, &this->actor);
EnTrt_DrawCursor(globalCtx, this, this->cursorPos.x, this->cursorPos.y, this->cursorPos.z, this->drawCursor);
EnTrt_DrawStickDirectionPrompt(globalCtx, this);
+4 -3
View File
@@ -1192,7 +1192,7 @@ void EnTru_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
}
}
void func_80A886D4(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
void EnTru_TransformLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Actor* thisx) {
EnTru* this = THIS;
s32 pad[3];
s32 sp2C;
@@ -1250,8 +1250,9 @@ void EnTru_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A8B408[this->unk_36E]));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(D_80A8B408[this->unk_36E]));
func_801343C0(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnTru_OverrideLimbDraw, EnTru_PostLimbDraw, func_80A886D4, &this->actor);
SkelAnime_DrawTransformFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, EnTru_OverrideLimbDraw, EnTru_PostLimbDraw,
EnTru_TransformLimbDraw, &this->actor);
func_80A85788(this->unk_394, globalCtx);
func_80A85BCC(this->unk_394, globalCtx);
func_80A85F84(this->unk_394, globalCtx);
+3 -3
View File
@@ -1546,7 +1546,7 @@ void EnWf_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
s32 func_80993E50(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
s32 EnWf_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
EnWf* this = THIS;
if ((limbIndex == 17) || (limbIndex == 18)) {
@@ -1555,7 +1555,7 @@ s32 func_80993E50(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3f* p
return false;
}
void func_80993E94(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnWf_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static s8 D_809942FC[] = {
-1, -1, -1, -1, -1, 0, 1, -1, -1, -1, -1, 2, -1, 3, 4, 5, 6, -1, -1, 7, 8, 9,
};
@@ -1593,7 +1593,7 @@ void EnWf_Draw(Actor* thisx, GlobalContext* globalCtx) {
CLOSE_DISPS(globalCtx->state.gfxCtx);
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, func_80993E50, func_80993E94, &this->actor);
this->skelAnime.dListCount, EnWf_OverrideLimbDraw, EnWf_PostLimbDraw, &this->actor);
func_800BE680(globalCtx, &this->actor, this->unk_2B8, 10, this->unk_2B0, this->unk_2B4, this->unk_2AC,
this->unk_296);
}
+2 -2
View File
@@ -997,7 +997,7 @@ void EnZog_Update(Actor* thisx, GlobalContext* globalCtx) {
}
}
void func_80B954C4(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void EnZog_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
static Vec3f D_80B959B8 = { 0.0f, 0.0f, 0.0f };
EnZog* this = THIS;
@@ -1078,7 +1078,7 @@ void EnZog_Draw(Actor* thisx, GlobalContext* globalCtx) {
POLY_OPA_DISP = &gfx[3];
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, NULL, func_80B954C4, &this->actor);
this->skelAnime.dListCount, NULL, EnZog_PostLimbDraw, &this->actor);
}
CLOSE_DISPS(globalCtx->state.gfxCtx);