mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-30 18:55:54 +00:00
Document Goron's limbs
This commit is contained in:
parent
d3eedf6293
commit
f24906855f
5 changed files with 61 additions and 18 deletions
|
@ -1,4 +1,5 @@
|
|||
<Root>
|
||||
<!-- Goron -->
|
||||
<File Name="object_oF1d_map" Segment="6">
|
||||
<!-- animations -->
|
||||
<Animation Name="gGoronAnim_000750" Offset="0x750"/>
|
||||
|
@ -13,14 +14,35 @@
|
|||
<Animation Name="gGoronAnim_004930" Offset="0x4930"/>
|
||||
<Animation Name="gGoronAnim_010590" Offset="0x10590"/>
|
||||
|
||||
<!-- display lists -->
|
||||
<DList Name="gGoronDL_00BD80" Offset="0xBD80"/>
|
||||
<DList Name="gGoronDL_00C140" Offset="0xC140"/>
|
||||
|
||||
<DList Name="gGoronDL_00FD40" Offset="0xFD40"/>
|
||||
<DList Name="gGoronDL_00FD50" Offset="0xFD50"/>
|
||||
|
||||
<!-- skeleton -->
|
||||
<Skeleton Name="gGoronSkel" Type="Flex" LimbType="Standard" Offset="0xFEF0"/>
|
||||
|
||||
<Limb Name="gGoronRootLimb" LimbType="Standard" Offset="0xFDE0"/>
|
||||
<Limb Name="gGoronWaistLimb" LimbType="Standard" Offset="0xFDEC"/>
|
||||
<Limb Name="gGoronLegsLimb" LimbType="Standard" Offset="0xFDF8"/>
|
||||
<Limb Name="gGoronLeftThighLimb" LimbType="Standard" Offset="0xFE04"/>
|
||||
<Limb Name="gGoronLeftShinLimb" LimbType="Standard" Offset="0xFE10"/>
|
||||
<Limb Name="gGoronLeftFootLimb" LimbType="Standard" Offset="0xFE1C"/>
|
||||
<Limb Name="gGoronRightThighLimb" LimbType="Standard" Offset="0xFE28"/>
|
||||
<Limb Name="gGoronRightShinLimb" LimbType="Standard" Offset="0xFE34"/>
|
||||
<Limb Name="gGoronRightFootLimb" LimbType="Standard" Offset="0xFE40"/>
|
||||
<Limb Name="gGoronTorsoLimb" LimbType="Standard" Offset="0xFE4C"/>
|
||||
<Limb Name="gGoronLeftArmLimb" LimbType="Standard" Offset="0xFE58"/>
|
||||
<Limb Name="gGoronLeftForearmLimb" LimbType="Standard" Offset="0xFE64"/>
|
||||
<Limb Name="gGoronLeftHandLimb" LimbType="Standard" Offset="0xFE70"/>
|
||||
<Limb Name="gGoronRightArmLimb" LimbType="Standard" Offset="0xFE7C"/>
|
||||
<Limb Name="gGoronRightForearmLimb" LimbType="Standard" Offset="0xFE88"/>
|
||||
<Limb Name="gGoronRightHandLimb" LimbType="Standard" Offset="0xFE94"/>
|
||||
<Limb Name="gGoronHeadLimb" LimbType="Standard" Offset="0xFEA0"/>
|
||||
|
||||
<!-- palettes -->
|
||||
<Texture Name="object_oF1d_map_TLUT_00C640" OutName="tlut_0000C640" Format="rgba16" Width="16" Height="16" Offset="0xC640"/>
|
||||
|
||||
<!-- Eye textures -->
|
||||
|
|
|
@ -1033,7 +1033,7 @@ void EnGo_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
if (this->actionFunc == EnGo_BiggoronActionFunc || this->actionFunc == EnGo_FireGenericActionFunc ||
|
||||
this->actionFunc == func_80A40B1C) {
|
||||
func_80034F54(play, this->jointTable, this->morphTable, 18);
|
||||
func_80034F54(play, this->jointTable, this->morphTable, GORON_LIMB_MAX);
|
||||
}
|
||||
|
||||
EnGo_UpdateShadow(this);
|
||||
|
@ -1088,7 +1088,7 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Ve
|
|||
EnGo* this = (EnGo*)thisx;
|
||||
Vec3s limbRot;
|
||||
|
||||
if (limb == 17) {
|
||||
if (limb == GORON_LIMB_HEAD) {
|
||||
Matrix_Translate(2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
limbRot = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
|
||||
|
@ -1096,13 +1096,13 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Ve
|
|||
Matrix_Translate(-2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limb == 10) {
|
||||
if (limb == GORON_LIMB_TORSO) {
|
||||
limbRot = this->interactInfo.torsoRot;
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if ((limb == 10) || (limb == 11) || (limb == 14)) {
|
||||
if ((limb == GORON_LIMB_TORSO) || (limb == GORON_LIMB_LEFT_ARM) || (limb == GORON_LIMB_RIGHT_ARM)) {
|
||||
rot->y += Math_SinS(this->jointTable[limb]) * 200.0f;
|
||||
rot->z += Math_CosS(this->morphTable[limb]) * 200.0f;
|
||||
}
|
||||
|
@ -1114,7 +1114,7 @@ void EnGo_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
|||
EnGo* this = (EnGo*)thisx;
|
||||
Vec3f D_80A41BCC = { 600.0f, 0.0f, 0.0f };
|
||||
|
||||
if (limbIndex == 17) {
|
||||
if (limbIndex == GORON_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&D_80A41BCC, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,6 +10,28 @@ typedef void (*EnGoActionFunc)(struct EnGo*, PlayState*);
|
|||
typedef u16 (*callback1_80A3ED24)(PlayState*, struct EnGo*);
|
||||
typedef s16 (*callback2_80A3ED24)(PlayState*, struct EnGo*);
|
||||
|
||||
typedef enum GoronLimb {
|
||||
/* 0 */ GORON_LIMB_NONE, // skeleton itself
|
||||
/* 1 */ GORON_LIMB_ROOT,
|
||||
/* 2 */ GORON_LIMB_WAIST, // drives bottom submesh
|
||||
/* 3 */ GORON_LIMB_LEGS,
|
||||
/* 4 */ GORON_LIMB_LEFT_THIGH,
|
||||
/* 5 */ GORON_LIMB_LEFT_SHIN,
|
||||
/* 6 */ GORON_LIMB_LEFT_FOOT,
|
||||
/* 7 */ GORON_LIMB_RIGHT_THIGH,
|
||||
/* 8 */ GORON_LIMB_RIGHT_SHIN,
|
||||
/* 9 */ GORON_LIMB_RIGHT_FOOT,
|
||||
/* 10 */ GORON_LIMB_TORSO, // drives top submesh
|
||||
/* 11 */ GORON_LIMB_LEFT_ARM,
|
||||
/* 12 */ GORON_LIMB_LEFT_FOREARM,
|
||||
/* 13 */ GORON_LIMB_LEFT_HAND,
|
||||
/* 14 */ GORON_LIMB_RIGHT_ARM,
|
||||
/* 15 */ GORON_LIMB_RIGHT_FOREARM,
|
||||
/* 16 */ GORON_LIMB_RIGHT_HAND,
|
||||
/* 17 */ GORON_LIMB_HEAD,
|
||||
/* 18 */ GORON_LIMB_MAX
|
||||
} GoronLimb;
|
||||
|
||||
// WIP type docs
|
||||
// /* 0x00 */ GORON1_CITY_LINK,
|
||||
// /* 0x10 */ GORON1_FIRE_GENERIC,
|
||||
|
@ -22,7 +44,6 @@ typedef s16 (*callback2_80A3ED24)(PlayState*, struct EnGo*);
|
|||
// /* 0x80 */ // Not Used
|
||||
// /* 0x90 */ GORON1_DMT_BIGGORON,
|
||||
|
||||
|
||||
#define EN_GO_EFFECT_COUNT 20
|
||||
|
||||
typedef struct EnGoEffect {
|
||||
|
@ -55,8 +76,8 @@ typedef struct EnGo {
|
|||
/* 0x021A */ s16 unk_21A;
|
||||
/* 0x021C */ s16 unk_21C;
|
||||
/* 0x021E */ s16 unk_21E;
|
||||
/* 0x0220 */ s16 jointTable[18];
|
||||
/* 0x0244 */ s16 morphTable[18];
|
||||
/* 0x0220 */ s16 jointTable[GORON_LIMB_MAX];
|
||||
/* 0x0244 */ s16 morphTable[GORON_LIMB_MAX];
|
||||
/* 0x0268 */ EnGoEffect effects[EN_GO_EFFECT_COUNT];
|
||||
} EnGo; // size = 0x06C8
|
||||
|
||||
|
|
|
@ -1518,7 +1518,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
|||
s32 pad;
|
||||
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 28.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, 18);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gGoronSkel, NULL, this->jointTable, this->morphTable, GORON_LIMB_MAX);
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
|
@ -1995,7 +1995,7 @@ void EnGo2_Update(Actor* thisx, PlayState* play) {
|
|||
#endif
|
||||
this->actionFunc(this, play);
|
||||
if (this->unk_211 == true) {
|
||||
func_80034F54(play, this->unk_226, this->unk_24A, 18);
|
||||
func_80034F54(play, this->unk_226, this->unk_24A, GORON_LIMB_MAX);
|
||||
}
|
||||
func_80A45288(this, play);
|
||||
EnGo2_EyeMouthTexState(this);
|
||||
|
@ -2035,19 +2035,19 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
|
|||
EnGo2* this = (EnGo2*)thisx;
|
||||
Vec3s limbRot;
|
||||
|
||||
if (limb == 17) {
|
||||
if (limb == GORON_LIMB_HEAD) {
|
||||
Matrix_Translate(2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
limbRot = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limb == 10) {
|
||||
if (limb == GORON_LIMB_TORSO) {
|
||||
limbRot = this->interactInfo.torsoRot;
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(limbRot.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(limbRot.x), MTXMODE_APPLY);
|
||||
}
|
||||
if ((limb == 10) || (limb == 11) || (limb == 14)) {
|
||||
if ((limb == GORON_LIMB_TORSO) || (limb == GORON_LIMB_LEFT_ARM) || (limb == GORON_LIMB_RIGHT_ARM)) {
|
||||
rot->y += Math_SinS(this->unk_226[limb]) * 200.0f;
|
||||
rot->z += Math_CosS(this->unk_24A[limb]) * 200.0f;
|
||||
}
|
||||
|
@ -2058,7 +2058,7 @@ void EnGo2_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot,
|
|||
EnGo2* this = (EnGo2*)thisx;
|
||||
Vec3f D_80A4856C = { 600.0f, 0.0f, 0.0f };
|
||||
|
||||
if (limbIndex == 17) {
|
||||
if (limbIndex == GORON_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&D_80A4856C, &this->actor.focus.pos);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -92,14 +92,14 @@ typedef struct EnGo2 {
|
|||
/* 0x021C */ char unk_21C[0x04];
|
||||
/* 0x0220 */ f32 alpha; // Set to 0, used by func_80A45360, smoothed to this->actor.shape.shadowAlpha from either 0 or 255.0f
|
||||
/* 0x0224 */ s16 blinkTimer;
|
||||
/* 0x0226 */ s16 unk_226[18]; // Remains unknown
|
||||
/* 0x024A */ s16 unk_24A[18]; // Remains unknown
|
||||
/* 0x0226 */ s16 unk_226[GORON_LIMB_MAX]; // Remains unknown
|
||||
/* 0x024A */ s16 unk_24A[GORON_LIMB_MAX]; // Remains unknown
|
||||
/* 0x026E */ u16 trackingMode;
|
||||
/* 0x0270 */ EnGoEffect effects[EN_GO2_EFFECT_COUNT];
|
||||
/* 0x04A0 */ Vec3f subCamEye;
|
||||
/* 0x04AC */ Vec3f subCamAt;
|
||||
/* 0x04B8 */ Vec3s jointTable[18];
|
||||
/* 0x0524 */ Vec3s morphTable[18];
|
||||
/* 0x04B8 */ Vec3s jointTable[GORON_LIMB_MAX];
|
||||
/* 0x0524 */ Vec3s morphTable[GORON_LIMB_MAX];
|
||||
/* 0x0590 */ s16 unk_590; // timer
|
||||
/* 0x0592 */ s16 animTimer; // animTimer. Plays NA_SE_EN_MORIBLIN_WALK, NA_SE_EV_IRON_DOOR_OPEN, NA_SE_EV_IRON_DOOR_CLOSE
|
||||
/* 0x0594 */ s32 getItemId;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue