mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-29 18:31:19 +00:00
Document EnGo2 known data
This commit is contained in:
parent
9be708d6b9
commit
fc1009a0a6
2 changed files with 23 additions and 23 deletions
|
@ -98,13 +98,13 @@ ActorProfile En_Go2_Profile = {
|
||||||
/**/ EnGo2_Draw,
|
/**/ EnGo2_Draw,
|
||||||
};
|
};
|
||||||
|
|
||||||
static EnGo2DataStruct1 D_80A4816C[14] = {
|
static EnGo2ColliderData sColliderData[14] = {
|
||||||
{ 0, 0, 0, 68, 148 }, { 0, 0, 0, 24, 52 }, { 0, 320, 380, 400, 120 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 46, 90 },
|
{ 0, 0, 0, 68, 148 }, { 0, 0, 0, 24, 52 }, { 0, 320, 380, 400, 120 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 46, 90 },
|
||||||
{ 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 },
|
{ 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 },
|
||||||
{ 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 },
|
{ 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 }, { 0, 0, 0, 30, 68 },
|
||||||
};
|
};
|
||||||
|
|
||||||
static EnGo2DataStruct2 D_80A481F8[14] = {
|
static EnGo2ShapeData sShapeData[14] = {
|
||||||
{ 30.0f, 0.026f, 6, 60.0f }, { 24.0f, 0.008f, 6, 30.0f }, { 28.0f, 0.16f, 5, 380.0f }, { 28.0f, 0.01f, 7, 40.0f },
|
{ 30.0f, 0.026f, 6, 60.0f }, { 24.0f, 0.008f, 6, 30.0f }, { 28.0f, 0.16f, 5, 380.0f }, { 28.0f, 0.01f, 7, 40.0f },
|
||||||
{ 30.0f, 0.015f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f },
|
{ 30.0f, 0.015f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f },
|
||||||
{ 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f },
|
{ 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f }, { 28.0f, 0.01f, 6, 30.0f },
|
||||||
|
@ -862,17 +862,17 @@ s32 func_80A44790(EnGo2* this, PlayState* play) {
|
||||||
void EnGo2_SetColliderDim(EnGo2* this) {
|
void EnGo2_SetColliderDim(EnGo2* this) {
|
||||||
u8 index = ENGO2_GET_TYPE(this);
|
u8 index = ENGO2_GET_TYPE(this);
|
||||||
|
|
||||||
this->collider.dim.radius = D_80A4816C[index].radius;
|
this->collider.dim.radius = sColliderData[index].radius;
|
||||||
this->collider.dim.height = D_80A4816C[index].height;
|
this->collider.dim.height = sColliderData[index].height;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGo2_SetShape(EnGo2* this) {
|
void EnGo2_SetShape(EnGo2* this) {
|
||||||
u8 index = ENGO2_GET_TYPE(this);
|
u8 index = ENGO2_GET_TYPE(this);
|
||||||
|
|
||||||
this->actor.shape.shadowScale = D_80A481F8[index].shape_unk_10;
|
this->actor.shape.shadowScale = sShapeData[index].shadowScale;
|
||||||
Actor_SetScale(&this->actor, D_80A481F8[index].scale);
|
Actor_SetScale(&this->actor, sShapeData[index].scale);
|
||||||
this->actor.attentionRangeType = D_80A481F8[index].actor_unk_1F;
|
this->actor.attentionRangeType = sShapeData[index].attentionRangeType;
|
||||||
this->interactRange = D_80A481F8[index].interactRange;
|
this->interactRange = sShapeData[index].interactRange;
|
||||||
this->interactRange += this->collider.dim.radius;
|
this->interactRange += this->collider.dim.radius;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -883,10 +883,10 @@ void EnGo2_CheckCollision(EnGo2* this, PlayState* play) {
|
||||||
pos.x = this->actor.world.pos.x;
|
pos.x = this->actor.world.pos.x;
|
||||||
pos.y = this->actor.world.pos.y;
|
pos.y = this->actor.world.pos.y;
|
||||||
pos.z = this->actor.world.pos.z;
|
pos.z = this->actor.world.pos.z;
|
||||||
xzDist = D_80A4816C[ENGO2_GET_TYPE(this)].xzDist;
|
xzDist = sColliderData[ENGO2_GET_TYPE(this)].xzDist;
|
||||||
pos.x += (s16)(xzDist * Math_SinS(this->actor.shape.rot.y));
|
pos.x += (s16)(xzDist * Math_SinS(this->actor.shape.rot.y));
|
||||||
pos.z += (s16)(xzDist * Math_CosS(this->actor.shape.rot.y));
|
pos.z += (s16)(xzDist * Math_CosS(this->actor.shape.rot.y));
|
||||||
pos.y += D_80A4816C[ENGO2_GET_TYPE(this)].yDist;
|
pos.y += sColliderData[ENGO2_GET_TYPE(this)].yDist;
|
||||||
this->collider.dim.pos = pos;
|
this->collider.dim.pos = pos;
|
||||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||||
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
|
||||||
|
@ -1609,14 +1609,14 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
||||||
#if OOT_VERSION >= PAL_1_1
|
#if OOT_VERSION >= PAL_1_1
|
||||||
CLEAR_INFTABLE(INFTABLE_10C);
|
CLEAR_INFTABLE(INFTABLE_10C);
|
||||||
#endif
|
#endif
|
||||||
this->collider.dim.height = (D_80A4816C[ENGO2_GET_TYPE(this)].height * 0.6f);
|
this->collider.dim.height = (sColliderData[ENGO2_GET_TYPE(this)].height * 0.6f);
|
||||||
EnGo2_SetupRolling(this, play);
|
EnGo2_SetupRolling(this, play);
|
||||||
this->isAwake = true;
|
this->isAwake = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GORON_CITY_ROLLING_BIG:
|
case GORON_CITY_ROLLING_BIG:
|
||||||
case GORON_DMT_ROLLING_SMALL:
|
case GORON_DMT_ROLLING_SMALL:
|
||||||
this->collider.dim.height = (D_80A4816C[ENGO2_GET_TYPE(this)].height * 0.6f);
|
this->collider.dim.height = (sColliderData[ENGO2_GET_TYPE(this)].height * 0.6f);
|
||||||
EnGo2_SetupRolling(this, play);
|
EnGo2_SetupRolling(this, play);
|
||||||
break;
|
break;
|
||||||
case GORON_FIRE_GENERIC:
|
case GORON_FIRE_GENERIC:
|
||||||
|
@ -1673,11 +1673,11 @@ void EnGo2_ActionCurledUp(EnGo2* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((s32)this->skelAnime.curFrame == 0) {
|
if ((s32)this->skelAnime.curFrame == 0) {
|
||||||
this->collider.dim.height = (D_80A4816C[index].height * 0.6f);
|
this->collider.dim.height = (sColliderData[index].height * 0.6f);
|
||||||
} else {
|
} else {
|
||||||
height = D_80A4816C[index].height;
|
height = sColliderData[index].height;
|
||||||
this->collider.dim.height =
|
this->collider.dim.height =
|
||||||
((D_80A4816C[index].height * 0.4f * (this->skelAnime.curFrame / this->skelAnime.startFrame)) +
|
((sColliderData[index].height * 0.4f * (this->skelAnime.curFrame / this->skelAnime.startFrame)) +
|
||||||
(height * 0.6f));
|
(height * 0.6f));
|
||||||
}
|
}
|
||||||
if (EnGo2_IsFreeingGoronInFire(this, play)) {
|
if (EnGo2_IsFreeingGoronInFire(this, play)) {
|
||||||
|
@ -1712,9 +1712,9 @@ void func_80A46B40(EnGo2* this, PlayState* play) {
|
||||||
}
|
}
|
||||||
func_80A454CC(this);
|
func_80A454CC(this);
|
||||||
this->isUncurled = true;
|
this->isUncurled = true;
|
||||||
this->collider.dim.height = D_80A4816C[index].height;
|
this->collider.dim.height = sColliderData[index].height;
|
||||||
} else {
|
} else {
|
||||||
height = D_80A4816C[index].height;
|
height = sColliderData[index].height;
|
||||||
this->collider.dim.height =
|
this->collider.dim.height =
|
||||||
(s16)((height * 0.4f * (this->skelAnime.curFrame / this->skelAnime.endFrame)) + (height * 0.6f));
|
(s16)((height * 0.4f * (this->skelAnime.curFrame / this->skelAnime.endFrame)) + (height * 0.6f));
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,20 +23,20 @@ typedef void (*EnGo2ActionFunc)(struct EnGo2*, PlayState*);
|
||||||
// /* 0x0A */ GORON_FIRE_MAZE_UPPER,
|
// /* 0x0A */ GORON_FIRE_MAZE_UPPER,
|
||||||
// /* 0x0B */ GORON_FIRE_HIGHEST
|
// /* 0x0B */ GORON_FIRE_HIGHEST
|
||||||
|
|
||||||
typedef struct EnGo2DataStruct1 {
|
typedef struct EnGo2ColliderData {
|
||||||
s16 unused;
|
s16 unused;
|
||||||
s16 yDist;
|
s16 yDist;
|
||||||
s16 xzDist;
|
s16 xzDist;
|
||||||
s16 radius;
|
s16 radius;
|
||||||
s16 height;
|
s16 height;
|
||||||
} EnGo2DataStruct1; // size = 0xA
|
} EnGo2ColliderData; // size = 0xA
|
||||||
|
|
||||||
typedef struct EnGo2DataStruct2 {
|
typedef struct EnGo2ShapeData {
|
||||||
f32 shape_unk_10;
|
f32 shadowScale;
|
||||||
f32 scale;
|
f32 scale;
|
||||||
s8 actor_unk_1F;
|
s8 attentionRangeType;
|
||||||
f32 interactRange;
|
f32 interactRange;
|
||||||
} EnGo2DataStruct2; // size = 0x10
|
} EnGo2ShapeData; // size = 0x10
|
||||||
|
|
||||||
typedef struct EnGo2DustEffectData {
|
typedef struct EnGo2DustEffectData {
|
||||||
u8 initialTimer;
|
u8 initialTimer;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue