mirror of https://github.com/zeldaret/mm.git
Fidget Tables Docs (#1316)
* Docs for SubS_FillLimbRotTables and Actor_FillLimbRotTables * Fidget * Format * /// * UpdateFidgetTables * Clarify comment * Adjust comments slightly * Update src/code/z_actor.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> * Update src/code/z_sub_s.c Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com> --------- Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
parent
3bb9b365fc
commit
a506e8620a
|
@ -137,7 +137,7 @@ s8 SubS_GetObjectIndex(s16 id, struct PlayState* play);
|
|||
|
||||
Actor* SubS_FindActor(struct PlayState* play, Actor* actorListStart, u8 actorCategory, s16 actorId);
|
||||
|
||||
s32 SubS_FillLimbRotTables(struct PlayState* play, s16* limbRotTableY, s16* limbRotTableZ, s32 numLimbs);
|
||||
s32 SubS_UpdateFidgetTables(struct PlayState* play, s16* fidgetTableY, s16* fidgetTableZ, s32 tableLen);
|
||||
|
||||
s32 SubS_IsFloorAbove(struct PlayState* play, Vec3f* pos, f32 distAbove);
|
||||
|
||||
|
|
|
@ -63,8 +63,8 @@ typedef struct EnHy {
|
|||
/* 0x2D8 */ Vec3s prevTrackTarget;
|
||||
/* 0x2DE */ Vec3s prevHeadRot;
|
||||
/* 0x2E4 */ Vec3s prevTorsoRot;
|
||||
/* 0x2EA */ s16 limbRotTableY[16];
|
||||
/* 0x30A */ s16 limbRotTableZ[16];
|
||||
/* 0x2EA */ s16 fidgetTableY[ENHY_LIMB_MAX];
|
||||
/* 0x30A */ s16 fidgetTableZ[ENHY_LIMB_MAX];
|
||||
/* 0x32C */ Vec3f bodyPartsPos[15];
|
||||
/* 0x3E0 */ UNK_TYPE1 unk_3E0[0x6];
|
||||
/* 0x3E6 */ s16 eyeTexIndex;
|
||||
|
|
|
@ -4464,14 +4464,26 @@ void Actor_ChangeAnimationByInfo(SkelAnime* skelAnime, AnimationInfo* animationI
|
|||
frameCount, animationInfo->mode, animationInfo->morphFrames);
|
||||
}
|
||||
|
||||
// Unused
|
||||
void func_800BDCF4(PlayState* play, s16* arg1, s16* arg2, s32 size) {
|
||||
/**
|
||||
* Fills two tables with rotation angles that can be used to simulate idle animations.
|
||||
*
|
||||
* The rotation angles are dependent on the current frame, so should be updated regularly, generally every frame.
|
||||
*
|
||||
* This is done for the desired limb by taking either the `sin` of the yTable value or the `cos` of the zTable value,
|
||||
* multiplying by some scale factor (generally 200), and adding that to the already existing rotation.
|
||||
*
|
||||
* Note: With the common scale factor of 200, this effect is practically unnoticeable if the current animation already
|
||||
* has motion involved.
|
||||
*
|
||||
* Note: This function goes unused in favor of `SubS_UpdateFidgetTables`.
|
||||
*/
|
||||
void Actor_UpdateFidgetTables(PlayState* play, s16* fidgetTableY, s16* fidgetTableZ, s32 tableLen) {
|
||||
s32 frames = play->gameplayFrames;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < size; i++) {
|
||||
arg1[i] = (0x814 + 50 * i) * frames;
|
||||
arg2[i] = (0x940 + 50 * i) * frames;
|
||||
for (i = 0; i < tableLen; i++) {
|
||||
fidgetTableY[i] = (i * 50 + 0x814) * frames;
|
||||
fidgetTableZ[i] = (i * 50 + 0x940) * frames;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1186,13 +1186,24 @@ Actor* SubS_FindActor(PlayState* play, Actor* actorListStart, u8 actorCategory,
|
|||
return actor;
|
||||
}
|
||||
|
||||
s32 SubS_FillLimbRotTables(PlayState* play, s16* limbRotTableY, s16* limbRotTableZ, s32 numLimbs) {
|
||||
s32 i;
|
||||
/**
|
||||
* Fills two tables with rotation angles that can be used to simulate idle animations.
|
||||
*
|
||||
* The rotation angles are dependent on the current frame, so should be updated regularly, generally every frame.
|
||||
*
|
||||
* This is done for the desired limb by taking either the `sin` of the yTable value or the `cos` of the zTable value,
|
||||
* multiplying by some scale factor (generally 200), and adding that to the already existing rotation.
|
||||
*
|
||||
* Note: With the common scale factor of 200, this effect is practically unnoticeable if the current animation already
|
||||
* has motion involved.
|
||||
*/
|
||||
s32 SubS_UpdateFidgetTables(PlayState* play, s16* fidgetTableY, s16* fidgetTableZ, s32 tableLen) {
|
||||
u32 frames = play->gameplayFrames;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < numLimbs; i++) {
|
||||
limbRotTableY[i] = (i * 50 + 0x814) * frames;
|
||||
limbRotTableZ[i] = (i * 50 + 0x940) * frames;
|
||||
for (i = 0; i < tableLen; i++) {
|
||||
fidgetTableY[i] = (i * 50 + 0x814) * frames;
|
||||
fidgetTableZ[i] = (i * 50 + 0x940) * frames;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -556,7 +556,7 @@ void EnAob01_UpdateCommon(EnAob01* this, PlayState* play) {
|
|||
}
|
||||
|
||||
EnAob01_Blink(this, EN_AOB01_EYE_MAX);
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, ARRAY_COUNT(this->limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, MAMAMU_YAN_LIMB_MAX);
|
||||
EnAob01_UpdateCollision(this, play);
|
||||
|
||||
// This specific code ensures that in-game time passes during the race.
|
||||
|
@ -1188,8 +1188,8 @@ s32 EnAob01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
|
||||
if ((limbIndex == MAMAMU_YAN_LIMB_TORSO) || (limbIndex == MAMAMU_YAN_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == MAMAMU_YAN_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)Math_SinS(this->limbRotTableY[limbIndex]) * 200;
|
||||
rot->z += (s16)Math_CosS(this->limbRotTableZ[limbIndex]) * 200;
|
||||
rot->y += (s16)Math_SinS(this->fidgetTableY[limbIndex]) * 200;
|
||||
rot->z += (s16)Math_CosS(this->fidgetTableZ[limbIndex]) * 200;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -47,8 +47,8 @@ typedef struct EnAob01 {
|
|||
/* 0x2E6 */ Vec3s prevTrackTarget;
|
||||
/* 0x2EC */ Vec3s prevHeadRot;
|
||||
/* 0x2F2 */ Vec3s prevTorsoRot;
|
||||
/* 0x2F8 */ s16 limbRotTableY[MAMAMU_YAN_LIMB_MAX];
|
||||
/* 0x318 */ s16 limbRotTableZ[MAMAMU_YAN_LIMB_MAX];
|
||||
/* 0x2F8 */ s16 fidgetTableY[MAMAMU_YAN_LIMB_MAX];
|
||||
/* 0x318 */ s16 fidgetTableZ[MAMAMU_YAN_LIMB_MAX];
|
||||
/* 0x338 */ UNK_TYPE1 unk338[0xB6];
|
||||
/* 0x3EE */ s16 eyeIndex;
|
||||
/* 0x3F0 */ s16 blinkTimer;
|
||||
|
|
|
@ -355,7 +355,7 @@ void EnBaba_UpdateModel(EnBaba* this, PlayState* play) {
|
|||
Math_SmoothStepToS(&this->torsoRot.y, 0, 4, 0x3E8, 1);
|
||||
}
|
||||
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, ARRAY_COUNT(this->limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, BBA_LIMB_MAX);
|
||||
|
||||
if (this->stateFlags & BOMB_SHOP_LADY_STATE_VISIBLE) {
|
||||
EnBaba_UpdateCollider(this, play);
|
||||
|
@ -773,8 +773,8 @@ s32 EnBaba_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
|
||||
if ((limbIndex == BBA_LIMB_UPPER_ROOT) || (limbIndex == BBA_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == BBA_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)(Math_SinS(this->limbRotTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->limbRotTableZ[limbIndex]) * 200.0f);
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
|
||||
if (((this->animIndex == BOMB_SHOP_LADY_ANIM_IDLE) || (this->animIndex == BOMB_SHOP_LADY_ANIM_KNOCKED_OVER) ||
|
||||
|
|
|
@ -40,8 +40,8 @@ typedef struct EnBaba {
|
|||
/* 0x2E4 */ Vec3s headRot;
|
||||
/* 0x2EA */ Vec3s torsoRot;
|
||||
/* 0x2F0 */ UNK_TYPE1 unk2F0[0x12];
|
||||
/* 0x302 */ s16 limbRotTableY[18];
|
||||
/* 0x326 */ s16 limbRotTableZ[18];
|
||||
/* 0x302 */ s16 fidgetTableY[BBA_LIMB_MAX];
|
||||
/* 0x326 */ s16 fidgetTableZ[BBA_LIMB_MAX];
|
||||
/* 0x34A */ UNK_TYPE1 unk34A[0xBA];
|
||||
/* 0x404 */ s16 sakonDeadTimer;
|
||||
/* 0x406 */ UNK_TYPE1 unk406[4];
|
||||
|
|
|
@ -123,8 +123,7 @@ void EnBba01_UpdateModel(EnBba01* this, PlayState* play) {
|
|||
Math_SmoothStepToS(&this->enHy.torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.torsoRot.y, 0, 4, 0x3E8, 1);
|
||||
}
|
||||
SubS_FillLimbRotTables(play, this->enHy.limbRotTableY, this->enHy.limbRotTableZ,
|
||||
ARRAY_COUNT(this->enHy.limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->enHy.fidgetTableY, this->enHy.fidgetTableZ, ENHY_LIMB_MAX);
|
||||
EnHy_UpdateCollider(&this->enHy, play);
|
||||
}
|
||||
|
||||
|
@ -286,8 +285,8 @@ s32 EnBba01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
}
|
||||
|
||||
if ((limbIndex == BBA_LIMB_BAG) || (limbIndex == BBA_LIMB_TORSO) || (limbIndex == BBA_LIMB_LEFT_FOREARM)) {
|
||||
rot->y += (s16)(Math_SinS(this->enHy.limbRotTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->enHy.limbRotTableZ[limbIndex]) * 200.0f);
|
||||
rot->y += (s16)(Math_SinS(this->enHy.fidgetTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->enHy.fidgetTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -115,8 +115,7 @@ void EnCne01_UpdateModel(EnCne01* this, PlayState* play) {
|
|||
Math_SmoothStepToS(&this->enHy.torsoRot.x, 0, 4, 0x3E8, 1);
|
||||
Math_SmoothStepToS(&this->enHy.torsoRot.y, 0, 4, 0x3E8, 1);
|
||||
}
|
||||
SubS_FillLimbRotTables(play, this->enHy.limbRotTableY, this->enHy.limbRotTableZ,
|
||||
ARRAY_COUNT(this->enHy.limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->enHy.fidgetTableY, this->enHy.fidgetTableZ, ENHY_LIMB_MAX);
|
||||
EnHy_UpdateCollider(&this->enHy, play);
|
||||
}
|
||||
|
||||
|
@ -277,8 +276,8 @@ s32 EnCne01_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
|
||||
if ((limbIndex == CNE_LIMB_TORSO) || (limbIndex == CNE_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == CNE_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)(Math_SinS(this->enHy.limbRotTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->enHy.limbRotTableZ[limbIndex]) * 200.0f);
|
||||
rot->y += (s16)(Math_SinS(this->enHy.fidgetTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->enHy.fidgetTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -36,10 +36,6 @@ static AnimationInfo sAnimationInfo[] = {
|
|||
{ &gDs2nIdleAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP, 0.0f },
|
||||
};
|
||||
|
||||
static Vec3f sZeroVec = { 0, 0, 0 };
|
||||
|
||||
static TexturePtr sEyeTextures[] = { gDs2nEyeOpenTex, gDs2nEyeHalfTex, gDs2nEyeClosedTex };
|
||||
|
||||
void EnDs2n_SetupIdle(EnDs2n* this) {
|
||||
this->blinkTimer = 20;
|
||||
this->blinkState = 0;
|
||||
|
@ -48,7 +44,7 @@ void EnDs2n_SetupIdle(EnDs2n* this) {
|
|||
}
|
||||
|
||||
void EnDs2n_Idle(EnDs2n* this, PlayState* play) {
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, DS2N_LIMB_MAX);
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, DS2N_LIMB_MAX);
|
||||
}
|
||||
|
||||
void EnDs2n_UpdateEyes(EnDs2n* this) {
|
||||
|
@ -103,12 +99,12 @@ s32 EnDs2n_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
|
||||
void EnDs2n_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
EnDs2n* this = THIS;
|
||||
Vec3f focusOffset = sZeroVec;
|
||||
Vec3f focusOffset = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
if ((limbIndex == DS2N_LIMB_HIPS) || (limbIndex == DS2N_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == DS2N_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)Math_SinS(this->limbRotTableY[limbIndex]) * 0xC8;
|
||||
rot->z += (s16)Math_CosS(this->limbRotTableZ[limbIndex]) * 0xC8;
|
||||
rot->y += (s16)Math_SinS(this->fidgetTableY[limbIndex]) * 200;
|
||||
rot->z += (s16)Math_CosS(this->fidgetTableZ[limbIndex]) * 200;
|
||||
}
|
||||
|
||||
if (limbIndex == DS2N_LIMB_HEAD) {
|
||||
|
@ -116,6 +112,8 @@ void EnDs2n_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot
|
|||
}
|
||||
}
|
||||
|
||||
static TexturePtr sEyeTextures[] = { gDs2nEyeOpenTex, gDs2nEyeHalfTex, gDs2nEyeClosedTex };
|
||||
|
||||
void EnDs2n_Draw(Actor* thisx, PlayState* play) {
|
||||
EnDs2n* this = THIS;
|
||||
|
||||
|
|
|
@ -13,8 +13,8 @@ typedef struct EnDs2n {
|
|||
/* 0x144 */ ColliderCylinder collider; // unused
|
||||
/* 0x190 */ SkelAnime skelAnime;
|
||||
/* 0x1D4 */ EnDs2nActionFunc actionFunc;
|
||||
/* 0x1D8 */ s16 limbRotTableY[DS2N_LIMB_MAX];
|
||||
/* 0x1FE */ s16 limbRotTableZ[DS2N_LIMB_MAX];
|
||||
/* 0x1D8 */ s16 fidgetTableY[DS2N_LIMB_MAX];
|
||||
/* 0x1FE */ s16 fidgetTableZ[DS2N_LIMB_MAX];
|
||||
/* 0x224 */ Vec3s headRot;
|
||||
/* 0x22A */ Vec3s chestRot; // set by function, but not applied in limbdraw
|
||||
/* 0x230 */ s16 blinkState;
|
||||
|
|
|
@ -1470,10 +1470,9 @@ void EnFsn_Init(Actor* thisx, PlayState* play) {
|
|||
EnFsn* this = THIS;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 20.0f);
|
||||
|
||||
// Note: adding 1 to FSN_LIMB_MAX due to bug in object_fsn, see bug in object_fsn.xml
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gFsnSkel, &gFsnIdleAnim, this->jointTable, this->morphTable,
|
||||
FSN_LIMB_MAX + 1);
|
||||
ENFSN_LIMB_MAX);
|
||||
|
||||
if (ENFSN_IS_SHOP(&this->actor)) {
|
||||
this->actor.shape.rot.y = BINANG_ROT180(this->actor.shape.rot.y);
|
||||
this->actor.flags &= ~ACTOR_FLAG_1;
|
||||
|
@ -1508,7 +1507,7 @@ void EnFsn_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc(this, play);
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &this->unk27A, this->actor.focus.pos);
|
||||
SubS_FillLimbRotTables(play, this->limbRotYTable, this->limbRotZTable, ARRAY_COUNT(this->limbRotYTable));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENFSN_LIMB_MAX);
|
||||
EnFsn_Blink(this);
|
||||
if (ENFSN_IS_SHOP(&this->actor) && EnFsn_HasItemsToSell()) {
|
||||
EnFsn_UpdateJoystickInputState(this, play);
|
||||
|
@ -1630,7 +1629,7 @@ void EnFsn_DrawStickDirectionPrompts(EnFsn* this, PlayState* play) {
|
|||
|
||||
s32 EnFsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnFsn* this = THIS;
|
||||
s32 limbRotTableIdx;
|
||||
s32 fidgetIndex;
|
||||
|
||||
if (limbIndex == FSN_LIMB_HEAD) {
|
||||
Matrix_RotateXS(this->headRot.y, MTXMODE_APPLY);
|
||||
|
@ -1638,24 +1637,24 @@ s32 EnFsn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
if (ENFSN_IS_BACKROOM(&this->actor)) {
|
||||
switch (limbIndex) {
|
||||
case FSN_LIMB_TORSO:
|
||||
limbRotTableIdx = 0;
|
||||
fidgetIndex = 0;
|
||||
break;
|
||||
|
||||
case FSN_LIMB_LEFT_HAND:
|
||||
limbRotTableIdx = 1;
|
||||
fidgetIndex = 1;
|
||||
break;
|
||||
|
||||
case FSN_LIMB_HEAD:
|
||||
limbRotTableIdx = 2;
|
||||
fidgetIndex = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
limbRotTableIdx = 9;
|
||||
fidgetIndex = 9;
|
||||
break;
|
||||
}
|
||||
if (limbRotTableIdx < 9) {
|
||||
rot->y += (s16)(Math_SinS(this->limbRotYTable[limbRotTableIdx]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->limbRotZTable[limbRotTableIdx]) * 200.0f);
|
||||
if (fidgetIndex < 9) {
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[fidgetIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[fidgetIndex]) * 200.0f);
|
||||
}
|
||||
}
|
||||
if (limbIndex == FSN_LIMB_TOUPEE) {
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
#define ENFSN_ANGRY (1 << 8)
|
||||
#define ENFSN_CALM_DOWN (1 << 9)
|
||||
|
||||
#define ENFSN_LIMB_MAX FSN_LIMB_MAX + 1 // Note: adding 1 to FSN_LIMB_MAX due to bug in the skeleton, see bug in object_fsn.xml
|
||||
|
||||
struct EnFsn;
|
||||
|
||||
typedef void (*EnFsnActionFunc)(struct EnFsn*, PlayState*);
|
||||
|
@ -24,12 +26,12 @@ typedef struct EnFsn {
|
|||
/* 0x1D4 */ EnFsnActionFunc actionFunc;
|
||||
/* 0x1D8 */ EnFsnActionFunc prevActionFunc; // Used to return to correct browsing function
|
||||
/* 0x1DC */ ColliderCylinder collider;
|
||||
/* 0x228 */ s16 limbRotYTable[19];
|
||||
/* 0x24E */ s16 limbRotZTable[19];
|
||||
/* 0x228 */ s16 fidgetTableY[ENFSN_LIMB_MAX];
|
||||
/* 0x24E */ s16 fidgetTableZ[ENFSN_LIMB_MAX];
|
||||
/* 0x274 */ Vec3s headRot;
|
||||
/* 0x27A */ Vec3s unk27A; // Set but never used
|
||||
/* 0x280 */ Vec3s jointTable[FSN_LIMB_MAX + 1]; // Note: adding 1 to FSN_LIMB_MAX due to bug in object_fsn, see bug in object_fsn.xml
|
||||
/* 0x2F2 */ Vec3s morphTable[FSN_LIMB_MAX + 1];
|
||||
/* 0x280 */ Vec3s jointTable[ENFSN_LIMB_MAX];
|
||||
/* 0x2F2 */ Vec3s morphTable[ENFSN_LIMB_MAX];
|
||||
/* 0x364 */ s16 eyeTexIndex;
|
||||
/* 0x366 */ s16 blinkTimer;
|
||||
/* 0x368 */ s16 cutsceneState;
|
||||
|
|
|
@ -905,7 +905,7 @@ void EnGeg_Update(Actor* thisx, PlayState* play) {
|
|||
func_80BB1FCC(this, play);
|
||||
func_80BB2088(this, play);
|
||||
func_80BB1C8C(this);
|
||||
SubS_FillLimbRotTables(play, this->unk_238, this->unk_232, ARRAY_COUNT(this->unk_238));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENGEG_FIDGET_TABLE_LEN);
|
||||
func_80BB1D04(this);
|
||||
func_80BB178C(this, play);
|
||||
}
|
||||
|
|
|
@ -7,6 +7,8 @@ struct EnGeg;
|
|||
|
||||
typedef void (*EnGegActionFunc)(struct EnGeg*, PlayState*);
|
||||
|
||||
#define ENGEG_FIDGET_TABLE_LEN 3
|
||||
|
||||
typedef struct EnGeg {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
|
@ -14,8 +16,8 @@ typedef struct EnGeg {
|
|||
/* 0x18C */ ColliderCylinder colliderCylinder;
|
||||
/* 0x1D8 */ ColliderSphere colliderSphere;
|
||||
/* 0x230 */ u16 unk_230;
|
||||
/* 0x232 */ s16 unk_232[3];
|
||||
/* 0x238 */ s16 unk_238[3];
|
||||
/* 0x232 */ s16 fidgetTableZ[ENGEG_FIDGET_TABLE_LEN];
|
||||
/* 0x238 */ s16 fidgetTableY[ENGEG_FIDGET_TABLE_LEN];
|
||||
/* 0x23E */ s16 unk_23E;
|
||||
/* 0x240 */ s16 unk_240;
|
||||
/* 0x242 */ s16 unk_242;
|
||||
|
|
|
@ -1437,7 +1437,7 @@ s32 func_80950690(EnGm* this, PlayState* play) {
|
|||
break;
|
||||
}
|
||||
|
||||
SubS_FillLimbRotTables(play, this->unk_3D8, this->unk_3D2, ARRAY_COUNT(this->unk_3D8));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENGM_FIDGET_TABLE_LEN);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1626,7 +1626,7 @@ void func_80950DB8(EnGm* this, PlayState* play) {
|
|||
Math_ApproachS(&this->actor.shape.rot.y, Math_Vec3f_Yaw(&sp34, &sp40), 4, 0x2AA8);
|
||||
}
|
||||
}
|
||||
SubS_FillLimbRotTables(play, this->unk_3D8, this->unk_3D2, ARRAY_COUNT(this->unk_3D8));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENGM_FIDGET_TABLE_LEN);
|
||||
}
|
||||
|
||||
void func_80950F2C(EnGm* this, PlayState* play) {
|
||||
|
@ -1725,7 +1725,7 @@ void EnGm_Update(Actor* thisx, PlayState* play) {
|
|||
s32 EnGm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
s32 pad;
|
||||
EnGm* this = THIS;
|
||||
s32 phi_v0;
|
||||
s32 fidgetIndex;
|
||||
|
||||
if (limbIndex == 16) {
|
||||
func_8094F3D0(this, play);
|
||||
|
@ -1733,25 +1733,25 @@ s32 EnGm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
switch (limbIndex) {
|
||||
case 9:
|
||||
phi_v0 = 0;
|
||||
fidgetIndex = 0;
|
||||
break;
|
||||
|
||||
case 10:
|
||||
phi_v0 = 1;
|
||||
fidgetIndex = 1;
|
||||
break;
|
||||
|
||||
case 13:
|
||||
phi_v0 = 2;
|
||||
fidgetIndex = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
phi_v0 = 9;
|
||||
fidgetIndex = 9;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((this->unk_3A4 & 0x2000) && (phi_v0 < 9)) {
|
||||
rot->y += (s16)(Math_SinS(this->unk_3D8[phi_v0]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->unk_3D2[phi_v0]) * 200.0f);
|
||||
if ((this->unk_3A4 & 0x2000) && (fidgetIndex < 9)) {
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[fidgetIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[fidgetIndex]) * 200.0f);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -11,6 +11,8 @@ typedef void (*EnGmUnkFunc2)(struct EnGm*, PlayState*);
|
|||
|
||||
#define ENGM_GET_PATH_INDEX(thisx) ((thisx)->params & 0xFF)
|
||||
|
||||
#define ENGM_FIDGET_TABLE_LEN 3
|
||||
|
||||
typedef struct EnGm {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
|
@ -61,8 +63,8 @@ typedef struct EnGm {
|
|||
/* 0x3CC */ s16 unk_3CC;
|
||||
/* 0x3CE */ s16 unk_3CE;
|
||||
/* 0x3D0 */ s16 unk_3D0;
|
||||
/* 0x3D2 */ s16 unk_3D2[3];
|
||||
/* 0x3D8 */ s16 unk_3D8[3];
|
||||
/* 0x3D2 */ s16 fidgetTableZ[ENGM_FIDGET_TABLE_LEN];
|
||||
/* 0x3D8 */ s16 fidgetTableY[ENGM_FIDGET_TABLE_LEN];
|
||||
/* 0x3DE */ s16 unk_3DE;
|
||||
/* 0x3E0 */ s16 unk_3E0;
|
||||
/* 0x3E2 */ s16 unk_3E2;
|
||||
|
|
|
@ -2048,7 +2048,7 @@ void EnGo_Sleep(EnGo* this, PlayState* play) {
|
|||
this->actor.shape.yOffset = ENGO_STANDING_Y_OFFSET;
|
||||
}
|
||||
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, ARRAY_COUNT(this->limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENGO_FIDGET_TABLE_LEN);
|
||||
Math_ApproachS(&this->actor.shape.rot.y, targetRot, 4, 0x2AA8);
|
||||
}
|
||||
|
||||
|
@ -2243,7 +2243,7 @@ void EnGo_HandleSpringArrivalCutscene(EnGo* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, ARRAY_COUNT(this->limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENGO_FIDGET_TABLE_LEN);
|
||||
Cutscene_ActorTranslateAndYaw(&this->actor, play, cueChannel);
|
||||
}
|
||||
}
|
||||
|
@ -2388,7 +2388,7 @@ void EnGo_Talk(EnGo* this, PlayState* play) {
|
|||
Math_Vec3f_Copy(&thisPos, &this->actor.world.pos);
|
||||
Math_ApproachS(&this->actor.shape.rot.y, Math_Vec3f_Yaw(&thisPos, &targetPos), 4, 0x2AA8);
|
||||
}
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, ARRAY_COUNT(this->limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENGO_FIDGET_TABLE_LEN);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2498,7 +2498,7 @@ void EnGo_Draw_NoSkeleton(EnGo* this, PlayState* play) {
|
|||
s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnGo* this = THIS;
|
||||
Vec3f worldPos;
|
||||
s32 rotTableIndex;
|
||||
s32 fidgetIndex;
|
||||
|
||||
if ((ENGO_GET_TYPE(&this->actor) == ENGO_MEDIGORON) && (limbIndex == GORON_LIMB_BODY)) {
|
||||
Matrix_MultZero(&worldPos);
|
||||
|
@ -2508,25 +2508,25 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
switch (limbIndex) {
|
||||
case GORON_LIMB_BODY:
|
||||
rotTableIndex = 0;
|
||||
fidgetIndex = 0;
|
||||
break;
|
||||
|
||||
case GORON_LIMB_LEFT_UPPER_ARM:
|
||||
rotTableIndex = 1;
|
||||
fidgetIndex = 1;
|
||||
break;
|
||||
|
||||
case GORON_LIMB_RIGHT_UPPER_ARM:
|
||||
rotTableIndex = 2;
|
||||
fidgetIndex = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
rotTableIndex = 9;
|
||||
fidgetIndex = 9;
|
||||
break;
|
||||
}
|
||||
|
||||
if ((this->actionFlags & ENGO_FLAG_STANDING) && (rotTableIndex < 9)) {
|
||||
rot->y += (s16)(Math_SinS(this->limbRotTableY[rotTableIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->limbRotTableZ[rotTableIndex]) * 200.0f);
|
||||
if ((this->actionFlags & ENGO_FLAG_STANDING) && (fidgetIndex < 9)) {
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[fidgetIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[fidgetIndex]) * 200.0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ typedef s32 (*MsgEventFunc)(Actor*, PlayState*);
|
|||
|
||||
#define ENGO_PATH_INDEX_NONE 0xFF
|
||||
|
||||
#define ENGO_FIDGET_TABLE_LEN 3
|
||||
|
||||
#define ENGO_SNOW_EFFECT_COUNT 16
|
||||
#define ENGO_OTHER_EFFECT_COUNT 16
|
||||
#define ENGO_EFFECT_COUNT (ENGO_SNOW_EFFECT_COUNT + ENGO_OTHER_EFFECT_COUNT)
|
||||
|
@ -126,8 +128,8 @@ typedef struct EnGo {
|
|||
/* 0x3C2 */ s16 cutsceneDelayTimer;
|
||||
/* 0x3C4 */ s16 gatekeeperAnimState;
|
||||
/* 0x3C6 */ s16 harmlessTimer;
|
||||
/* 0x3C8 */ s16 limbRotTableZ[3];
|
||||
/* 0x3CE */ s16 limbRotTableY[3];
|
||||
/* 0x3C8 */ s16 fidgetTableZ[ENGO_FIDGET_TABLE_LEN];
|
||||
/* 0x3CE */ s16 fidgetTableY[ENGO_FIDGET_TABLE_LEN];
|
||||
/* 0x3D4 */ s16 surprisePhase;
|
||||
/* 0x3D8 */ MsgEventFunc msgEventFunc;
|
||||
/* 0x3DC */ s32 curAnimIndex;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
|
||||
#include "z_en_in.h"
|
||||
#include "z64horse.h"
|
||||
#include "objects/object_in/object_in.h"
|
||||
#include "overlays/actors/ovl_En_Horse_Game_Check/z_en_horse_game_check.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10)
|
||||
|
@ -253,7 +252,7 @@ void func_808F3414(EnIn* this, PlayState* play) {
|
|||
}
|
||||
func_808F322C(this, 3);
|
||||
func_808F3178(this, play);
|
||||
SubS_FillLimbRotTables(play, this->unk376, this->unk39E, ARRAY_COUNT(this->unk376));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, OBJECT_IN_LIMB_MAX);
|
||||
}
|
||||
|
||||
void func_808F35AC(EnIn* this, PlayState* play) {
|
||||
|
@ -1681,8 +1680,8 @@ s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
Matrix_RotateXS(this->torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
if ((limbIndex == 9) || (limbIndex == 10) || (limbIndex == 13)) {
|
||||
rot->y += (s16)(Math_SinS(this->unk376[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->unk39E[limbIndex]) * 200.0f);
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
if (this->unk4AC & 0x40) {
|
||||
if (limbIndex == 18) {
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define Z_EN_IN_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_in/object_in.h"
|
||||
|
||||
struct EnIn;
|
||||
|
||||
|
@ -57,14 +58,14 @@ typedef struct EnIn {
|
|||
/* 0x254 */ Vec3f unk254;
|
||||
/* 0x260 */ u8 unk260;
|
||||
/* 0x261 */ u8 unk261;
|
||||
/* 0x262 */ Vec3s jointTable[20];
|
||||
/* 0x2DA */ Vec3s morphTable[20];
|
||||
/* 0x262 */ Vec3s jointTable[OBJECT_IN_LIMB_MAX];
|
||||
/* 0x2DA */ Vec3s morphTable[OBJECT_IN_LIMB_MAX];
|
||||
/* 0x352 */ Vec3s trackTarget;
|
||||
/* 0x358 */ Vec3s headRot;
|
||||
/* 0x35E */ Vec3s torsoRot;
|
||||
/* 0x364 */ UNK_TYPE1 unk364[0x12];
|
||||
/* 0x376 */ s16 unk376[20];
|
||||
/* 0x39E */ s16 unk39E[20];
|
||||
/* 0x376 */ s16 fidgetTableY[OBJECT_IN_LIMB_MAX];
|
||||
/* 0x39E */ s16 fidgetTableZ[OBJECT_IN_LIMB_MAX];
|
||||
/* 0x3C6 */ UNK_TYPE1 unk3C6[0xBC];
|
||||
/* 0x482 */ s16 unk482;
|
||||
/* 0x484 */ s16 unk484;
|
||||
|
|
|
@ -368,7 +368,7 @@ void EnOssan_SetupLookToShopkeeperFromShelf(PlayState* play, EnOssan* this) {
|
|||
void EnOssan_Idle(EnOssan* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, ARRAY_COUNT(this->limbRotTableY));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENOSSAN_LIMB_MAX);
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_20000000;
|
||||
EnOssan_SetupAction(this, EnOssan_BeginInteraction);
|
||||
|
@ -1744,8 +1744,8 @@ void EnOssan_CuriosityShopMan_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx**
|
|||
|
||||
if ((limbIndex == FSN_LIMB_PELVIS) || (limbIndex == FSN_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == FSN_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)Math_SinS(this->limbRotTableY[limbIndex]) * 200;
|
||||
rot->z += (s16)Math_CosS(this->limbRotTableZ[limbIndex]) * 200;
|
||||
rot->y += (s16)Math_SinS(this->fidgetTableY[limbIndex]) * 200;
|
||||
rot->z += (s16)Math_CosS(this->fidgetTableZ[limbIndex]) * 200;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "objects/object_ani/object_ani.h"
|
||||
#include "objects/object_fsn/object_fsn.h"
|
||||
|
||||
// Note: adding 1 to FSN_LIMB_MAX due to bug in object_fsn, see bug in object_fsn.xml
|
||||
// Note: adding 1 to FSN_LIMB_MAX due to bug in the skeleton, see bug in object_fsn.xml
|
||||
#define ENOSSAN_LIMB_MAX MAX((s32)FSN_LIMB_MAX + 1, (s32)ANI_LIMB_MAX)
|
||||
|
||||
struct EnOssan;
|
||||
|
@ -52,8 +52,8 @@ typedef struct EnOssan {
|
|||
/* 0x2C4 */ u16 textId;
|
||||
/* 0x2C6 */ Vec3s headRot;
|
||||
/* 0x2CC */ Vec3s unk2CC; // Set but never used
|
||||
/* 0x2D2 */ s16 limbRotTableY[19];
|
||||
/* 0x2F8 */ s16 limbRotTableZ[19];
|
||||
/* 0x2D2 */ s16 fidgetTableY[ENOSSAN_LIMB_MAX];
|
||||
/* 0x2F8 */ s16 fidgetTableZ[ENOSSAN_LIMB_MAX];
|
||||
/* 0x31E */ Vec3s jointTable[ENOSSAN_LIMB_MAX];
|
||||
/* 0x390 */ Vec3s morphTable[ENOSSAN_LIMB_MAX];
|
||||
/* 0x402 */ s16 animIndex;
|
||||
|
|
|
@ -669,7 +669,7 @@ void func_80BF4EBC(EnRg* this, PlayState* play) {
|
|||
this->unk_318 = Rand_S16Offset(0, 20);
|
||||
}
|
||||
}
|
||||
SubS_FillLimbRotTables(play, this->unk_32E, this->unk_328, ARRAY_COUNT(this->unk_328));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ENRG_FIDGET_TABLE_LEN);
|
||||
}
|
||||
|
||||
void func_80BF4FC4(EnRg* this, PlayState* play) {
|
||||
|
@ -823,29 +823,29 @@ void func_80BF547C(EnRg* this, PlayState* play) {
|
|||
|
||||
s32 func_80BF5588(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnRg* this = THIS;
|
||||
s32 phi_v0;
|
||||
s32 fidgetIndex;
|
||||
|
||||
switch (limbIndex) {
|
||||
case 10:
|
||||
phi_v0 = 0;
|
||||
fidgetIndex = 0;
|
||||
break;
|
||||
|
||||
case 11:
|
||||
phi_v0 = 1;
|
||||
fidgetIndex = 1;
|
||||
break;
|
||||
|
||||
case 14:
|
||||
phi_v0 = 2;
|
||||
fidgetIndex = 2;
|
||||
break;
|
||||
|
||||
default:
|
||||
phi_v0 = 9;
|
||||
fidgetIndex = 9;
|
||||
break;
|
||||
}
|
||||
|
||||
if (((this->unk_310 & 8) != 0) && (phi_v0 < 9)) {
|
||||
rot->y += (s16)(Math_SinS(this->unk_32E[phi_v0]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->unk_328[phi_v0]) * 200.0f);
|
||||
if (((this->unk_310 & 8) != 0) && (fidgetIndex < 9)) {
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[fidgetIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[fidgetIndex]) * 200.0f);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -11,6 +11,8 @@ typedef void (*EnRgActionFunc)(struct EnRg*, PlayState*);
|
|||
|
||||
#define ENRG_PATH_INDEX_NONE 0xFF
|
||||
|
||||
#define ENRG_FIDGET_TABLE_LEN 3
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u8 unk_00;
|
||||
/* 0x01 */ u8 unk_01;
|
||||
|
@ -43,8 +45,8 @@ typedef struct EnRg {
|
|||
/* 0x322 */ s16 unk_322;
|
||||
/* 0x324 */ s16 unk_324;
|
||||
/* 0x326 */ s16 unk_326;
|
||||
/* 0x328 */ s16 unk_328[3];
|
||||
/* 0x32E */ s16 unk_32E[3];
|
||||
/* 0x328 */ s16 fidgetTableZ[ENRG_FIDGET_TABLE_LEN];
|
||||
/* 0x32E */ s16 fidgetTableY[ENRG_FIDGET_TABLE_LEN];
|
||||
/* 0x334 */ s32 unk_334;
|
||||
/* 0x338 */ UNK_TYPE1 unk338[4];
|
||||
/* 0x33C */ s32 unk_33C;
|
||||
|
|
|
@ -218,7 +218,7 @@ void EnRu_UpdateModel(EnRu* this, PlayState* play) {
|
|||
|
||||
EnRu_UpdateEyes(this, 3);
|
||||
EnRu_PlayWalkingSound(this, play);
|
||||
SubS_FillLimbRotTables(play, this->limbRotTableY, this->limbRotTableZ, RU2_LIMB_MAX);
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, RU2_LIMB_MAX);
|
||||
}
|
||||
|
||||
void EnRu_DoNothing(EnRu* this, PlayState* play) {
|
||||
|
@ -274,8 +274,8 @@ s32 EnRu_OverrideLimbdraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if ((limbIndex == RU2_LIMB_TORSO) || (limbIndex == RU2_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == RU2_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)(Math_SinS(this->limbRotTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->limbRotTableZ[limbIndex]) * 200.0f);
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -32,8 +32,8 @@ typedef struct EnRu {
|
|||
/* 0x318 */ Vec3s headRot;
|
||||
/* 0x31E */ Vec3s torsoRot;
|
||||
/* 0x324 */ UNK_TYPE1 pad324[0x12];
|
||||
/* 0x336 */ s16 limbRotTableY[RU2_LIMB_MAX];
|
||||
/* 0x364 */ s16 limbRotTableZ[RU2_LIMB_MAX];
|
||||
/* 0x336 */ s16 fidgetTableY[RU2_LIMB_MAX];
|
||||
/* 0x364 */ s16 fidgetTableZ[RU2_LIMB_MAX];
|
||||
/* 0x394 */ Vec3f bodyPartsPos[RU_BODYPARTSPOS_COUNT];
|
||||
/* 0x348 */ UNK_TYPE1 padUNK[6];
|
||||
/* 0x44E */ s16 eyeState;
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
|
||||
#include "overlays/actors/ovl_En_Door/z_en_door.h"
|
||||
#include "overlays/effects/ovl_Effect_Ss_Solder_Srch_Ball/z_eff_ss_solder_srch_ball.h"
|
||||
#include "objects/object_boj/object_boj.h"
|
||||
|
||||
#define FLAGS (ACTOR_FLAG_1 | ACTOR_FLAG_8 | ACTOR_FLAG_10)
|
||||
|
||||
|
@ -578,7 +577,7 @@ void func_80BAB4F0(EnSuttari* this, PlayState* play) {
|
|||
Math_SmoothStepToS(&this->torsoRot.y, 0, 4, 0x3E8, 1);
|
||||
}
|
||||
}
|
||||
SubS_FillLimbRotTables(play, this->unk2FA, this->unk31A, ARRAY_COUNT(this->unk2FA));
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, OBJECT_BOJ_LIMB_MAX);
|
||||
}
|
||||
|
||||
s16 EnSuttari_GetDistSqAndOrient(Path* path, s32 index, Vec3f* pos, f32* distSq) {
|
||||
|
@ -1568,8 +1567,8 @@ s32 EnSuttari_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3
|
|||
Matrix_RotateZS(-this->torsoRot.x, MTXMODE_APPLY);
|
||||
}
|
||||
if ((limbIndex == 8) || (limbIndex == 9) || (limbIndex == 0xC)) {
|
||||
rot->y += (s16)(Math_SinS(this->unk2FA[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->unk31A[limbIndex]) * 200.0f);
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#define Z_EN_SUTTARI_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_boj/object_boj.h"
|
||||
#include "overlays/actors/ovl_En_Fsn/z_en_fsn.h"
|
||||
|
||||
struct EnSuttari;
|
||||
|
@ -27,14 +28,14 @@ typedef struct EnSuttari {
|
|||
/* 0x1EC */ Path* paths[2];
|
||||
/* 0x1F4 */ s32 unk1F4[2];
|
||||
/* 0x1FC */ UNK_TYPE1 unk_1FC[0x1A];
|
||||
/* 0x216 */ Vec3s jointTable[16];
|
||||
/* 0x276 */ Vec3s morphTable[16];
|
||||
/* 0x216 */ Vec3s jointTable[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x276 */ Vec3s morphTable[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x2D6 */ Vec3s trackTarget;
|
||||
/* 0x2DC */ Vec3s headRot;
|
||||
/* 0x2E2 */ Vec3s torsoRot;
|
||||
/* 0x2E8 */ UNK_TYPE1 unk_2E8[0x12];
|
||||
/* 0x2FA */ s16 unk2FA[16];
|
||||
/* 0x31A */ s16 unk31A[16];
|
||||
/* 0x2FA */ s16 fidgetTableY[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x31A */ s16 fidgetTableZ[OBJECT_BOJ_LIMB_MAX];
|
||||
/* 0x33A */ UNK_TYPE1 unk_33A[0xB6];
|
||||
/* 0x3F0 */ s16 playerDetected;
|
||||
/* 0x3F2 */ s16 unk3F2;
|
||||
|
|
|
@ -202,7 +202,7 @@ void EnZo_LookAtPlayer(EnZo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
EnZo_Blink(this, 3);
|
||||
SubS_FillLimbRotTables(play, this->limbRotY, this->limbRotZ, 20);
|
||||
SubS_UpdateFidgetTables(play, this->fidgetTableY, this->fidgetTableZ, ZORA_LIMB_MAX);
|
||||
}
|
||||
|
||||
void EnZo_Walk(EnZo* this, PlayState* play) {
|
||||
|
@ -305,8 +305,8 @@ s32 EnZo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if ((limbIndex == ZORA_LIMB_TORSO) || (limbIndex == ZORA_LIMB_LEFT_UPPER_ARM) ||
|
||||
(limbIndex == ZORA_LIMB_RIGHT_UPPER_ARM)) {
|
||||
rot->y += (s16)(Math_SinS(this->limbRotY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->limbRotZ[limbIndex]) * 200.0f);
|
||||
rot->y += (s16)(Math_SinS(this->fidgetTableY[limbIndex]) * 200.0f);
|
||||
rot->z += (s16)(Math_CosS(this->fidgetTableZ[limbIndex]) * 200.0f);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -30,8 +30,8 @@ typedef struct EnZo {
|
|||
/* 0x2F4 */ Vec3s headRot;
|
||||
/* 0x2FA */ Vec3s upperBodyRot;
|
||||
/* 0x300 */ UNK_TYPE1 unk_300[0x12];
|
||||
/* 0x312 */ s16 limbRotY[20];
|
||||
/* 0x33A */ s16 limbRotZ[20];
|
||||
/* 0x312 */ s16 fidgetTableY[ZORA_LIMB_MAX];
|
||||
/* 0x33A */ s16 fidgetTableZ[ZORA_LIMB_MAX];
|
||||
/* 0x364 */ Vec3f bodyPartsPos[15];
|
||||
/* 0x41A */ UNK_TYPE1 unk_41A[0x6];
|
||||
/* 0x41E */ s16 eyeIndex;
|
||||
|
|
|
@ -878,7 +878,7 @@
|
|||
0x800BDAA0:("func_800BDAA0",),
|
||||
0x800BDB6C:("func_800BDB6C",),
|
||||
0x800BDC5C:("Actor_ChangeAnimationByInfo",),
|
||||
0x800BDCF4:("func_800BDCF4",),
|
||||
0x800BDCF4:("Actor_UpdateFidgetTables",),
|
||||
0x800BDFB0:("Actor_Noop",),
|
||||
0x800BDFC0:("Gfx_DrawDListOpa",),
|
||||
0x800BE03C:("Gfx_DrawDListXlu",),
|
||||
|
@ -2690,7 +2690,7 @@
|
|||
0x8013D8DC:("SubS_IsObjectLoaded",),
|
||||
0x8013D924:("SubS_GetObjectIndex",),
|
||||
0x8013D960:("SubS_FindActor",),
|
||||
0x8013D9C8:("SubS_FillLimbRotTables",),
|
||||
0x8013D9C8:("SubS_UpdateFidgetTables",),
|
||||
0x8013DB90:("SubS_IsFloorAbove",),
|
||||
0x8013DC40:("SubS_CopyPointFromPathList",),
|
||||
0x8013DCCC:("SubS_GetPathCountFromPathList",),
|
||||
|
|
|
@ -709,7 +709,8 @@ wordReplace = {
|
|||
"func_8013A860": "SubS_DrawTransformFlexLimb",
|
||||
"func_8013BC6C": "SubS_ChangeAnimationByInfoS",
|
||||
"func_8013E1C8": "SubS_ChangeAnimationBySpeedInfo",
|
||||
"func_8013D9C8": "SubS_FillLimbRotTables",
|
||||
"func_8013D9C8": "SubS_UpdateFidgetTables",
|
||||
"SubS_FillLimbRotTables": "SubS_UpdateFidgetTables",
|
||||
"func_8013A7C0": "SubS_FindDoor",
|
||||
"func_8013E640": "SubS_FindActorCustom",
|
||||
"func_ActorCategoryIterateById": "SubS_FindActor",
|
||||
|
|
|
@ -392,7 +392,7 @@ asm/non_matchings/code/z_actor/func_800BD9E0.s,func_800BD9E0,0x800BD9E0,0x30
|
|||
asm/non_matchings/code/z_actor/func_800BDAA0.s,func_800BDAA0,0x800BDAA0,0x33
|
||||
asm/non_matchings/code/z_actor/func_800BDB6C.s,func_800BDB6C,0x800BDB6C,0x3C
|
||||
asm/non_matchings/code/z_actor/Actor_ChangeAnimationByInfo.s,Actor_ChangeAnimationByInfo,0x800BDC5C,0x26
|
||||
asm/non_matchings/code/z_actor/func_800BDCF4.s,func_800BDCF4,0x800BDCF4,0xAF
|
||||
asm/non_matchings/code/z_actor/Actor_UpdateFidgetTables.s,Actor_UpdateFidgetTables,0x800BDCF4,0xAF
|
||||
asm/non_matchings/code/z_actor/Actor_Noop.s,Actor_Noop,0x800BDFB0,0x4
|
||||
asm/non_matchings/code/z_actor/Gfx_DrawDListOpa.s,Gfx_DrawDListOpa,0x800BDFC0,0x1F
|
||||
asm/non_matchings/code/z_actor/Gfx_DrawDListXlu.s,Gfx_DrawDListXlu,0x800BE03C,0x1F
|
||||
|
@ -2204,7 +2204,7 @@ asm/non_matchings/code/z_sub_s/SubS_GetDistSqAndOrientPath.s,SubS_GetDistSqAndOr
|
|||
asm/non_matchings/code/z_sub_s/SubS_IsObjectLoaded.s,SubS_IsObjectLoaded,0x8013D8DC,0x12
|
||||
asm/non_matchings/code/z_sub_s/SubS_GetObjectIndex.s,SubS_GetObjectIndex,0x8013D924,0xF
|
||||
asm/non_matchings/code/z_sub_s/SubS_FindActor.s,SubS_FindActor,0x8013D960,0x1A
|
||||
asm/non_matchings/code/z_sub_s/SubS_FillLimbRotTables.s,SubS_FillLimbRotTables,0x8013D9C8,0x72
|
||||
asm/non_matchings/code/z_sub_s/SubS_UpdateFidgetTables.s,SubS_UpdateFidgetTables,0x8013D9C8,0x72
|
||||
asm/non_matchings/code/z_sub_s/SubS_IsFloorAbove.s,SubS_IsFloorAbove,0x8013DB90,0x2C
|
||||
asm/non_matchings/code/z_sub_s/SubS_CopyPointFromPathList.s,SubS_CopyPointFromPathList,0x8013DC40,0x23
|
||||
asm/non_matchings/code/z_sub_s/SubS_GetPathCountFromPathList.s,SubS_GetPathCountFromPathList,0x8013DCCC,0x5
|
||||
|
|
|
Loading…
Reference in New Issue