1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-11-25 09:45:02 +00:00

restore limbIndex naming for this PR

43afb7b7cb (r1842644602)
This commit is contained in:
feacur 2024-11-14 19:31:24 +01:00
parent 35c635781d
commit 41b6509fec
4 changed files with 25 additions and 23 deletions

View file

@ -547,22 +547,22 @@ Gfx* EnDivingGame_EmptyDList(GraphicsContext* gfxCtx) {
return displayList; return displayList;
} }
s32 EnDivingGame_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { s32 EnDivingGame_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnDivingGame* this = (EnDivingGame*)thisx; EnDivingGame* this = (EnDivingGame*)thisx;
s32 pad; s32 pad;
if (limb == 6) { if (limbIndex == 6) {
rot->x += this->torsoRot.y; rot->x += this->torsoRot.y;
} }
if (limb == 15) { if (limbIndex == 15) {
rot->x += this->headRot.y; rot->x += this->headRot.y;
rot->z += this->headRot.z; rot->z += this->headRot.z;
} }
if (this->notPlayingMinigame && (limb == 8 || limb == 9 || limb == 12)) { if (this->notPlayingMinigame && (limbIndex == 8 || limbIndex == 9 || limbIndex == 12)) {
rot->y += Math_SinS((play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE; rot->y += Math_SinS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE;
rot->z += Math_CosS((play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE; rot->z += Math_CosS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE;
} }
return 0; return 0;

View file

@ -257,14 +257,14 @@ void EnFu_Update(Actor* thisx, PlayState* play) {
} }
} }
s32 EnFu_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { s32 EnFu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnFu* this = (EnFu*)thisx; EnFu* this = (EnFu*)thisx;
s32 pad; s32 pad;
if (limb == FU_LIMB_UNK) { if (limbIndex == FU_LIMB_UNK) {
return false; return false;
} }
switch (limb) { switch (limbIndex) {
case FU_LIMB_HEAD: case FU_LIMB_HEAD:
rot->x += this->lookAngleOffset.y; rot->x += this->lookAngleOffset.y;
rot->z += this->lookAngleOffset.x; rot->z += this->lookAngleOffset.x;
@ -277,9 +277,9 @@ s32 EnFu_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Ve
return false; return false;
} }
if (limb == FU_LIMB_CHEST_MUSIC_BOX) { if (limbIndex == FU_LIMB_CHEST_MUSIC_BOX) {
rot->y += Math_SinS((play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE; rot->y += Math_SinS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE;
rot->z += Math_CosS((play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE; rot->z += Math_CosS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE;
} }
return false; return false;
} }

View file

@ -760,11 +760,11 @@ void EnGe1_StopFidget(EnGe1* this) {
} }
} }
s32 EnGe1_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { s32 EnGe1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
s32 pad; s32 pad;
EnGe1* this = (EnGe1*)thisx; EnGe1* this = (EnGe1*)thisx;
if (limb == GE1_LIMB_HEAD) { if (limbIndex == GE1_LIMB_HEAD) {
rot->x += this->headRot.y; rot->x += this->headRot.y;
rot->z += this->headRot.x; rot->z += this->headRot.x;
} }
@ -776,9 +776,9 @@ s32 EnGe1_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
// The purpose of the state flag GE1_STATE_STOP_FIDGET is to skip this code, which this actor has in lieu of an idle // The purpose of the state flag GE1_STATE_STOP_FIDGET is to skip this code, which this actor has in lieu of an idle
// animation. // animation.
if ((limb == GE1_LIMB_TORSO) || (limb == GE1_LIMB_L_FOREARM) || (limb == GE1_LIMB_R_FOREARM)) { if ((limbIndex == GE1_LIMB_TORSO) || (limbIndex == GE1_LIMB_L_FOREARM) || (limbIndex == GE1_LIMB_R_FOREARM)) {
rot->y += Math_SinS(play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y)) * FIDGET_AMPLITUDE; rot->y += Math_SinS(play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y)) * FIDGET_AMPLITUDE;
rot->z += Math_CosS(play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z)) * FIDGET_AMPLITUDE; rot->z += Math_CosS(play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z)) * FIDGET_AMPLITUDE;
} }
return 0; return 0;
} }

View file

@ -565,21 +565,23 @@ Gfx* EnNiwLady_EmptyDList(GraphicsContext* gfxCtx) {
return dList; return dList;
} }
s32 EnNiwLady_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) { s32 EnNiwLady_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
EnNiwLady* this = (EnNiwLady*)thisx; EnNiwLady* this = (EnNiwLady*)thisx;
s32 pad; s32 pad;
if (limb == 15) { if (limbIndex == 15) {
rot->x += this->headRot.y; rot->x += this->headRot.y;
rot->z += this->headRot.x; rot->z += this->headRot.x;
} }
if (limb == 8) { if (limbIndex == 8) {
rot->x += this->torsoRot.y; rot->x += this->torsoRot.y;
} }
if (this->unk_275 != 0) { if (this->unk_275 != 0) {
if ((limb == 8) || (limb == 10) || (limb == 13)) { if ((limbIndex == 8) || (limbIndex == 10) || (limbIndex == 13)) {
rot->y += Math_SinS((play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE; // clang-format off
rot->z += Math_CosS((play->state.frames * (limb * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE; rot->y += Math_SinS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Y))) * FIDGET_AMPLITUDE;
rot->z += Math_CosS((play->state.frames * (limbIndex * FIDGET_FREQ_LIMB + FIDGET_FREQ_Z))) * FIDGET_AMPLITUDE;
// clang-format on
} }
} }
return false; return false;