mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-29 03:34:07 +00:00
Decompile object_gol (gohma actor) (#871)
* Decompile object_gol * Update src/overlays/actors/ovl_En_Goma/z_en_goma.h Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: fig02 <fig02srl@gmail.com> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
d95639b993
commit
1b1487a504
4 changed files with 111 additions and 100 deletions
|
@ -1,54 +1,59 @@
|
||||||
<Root>
|
<Root>
|
||||||
<File Name="object_gol" Segment="6">
|
<File Name="object_gol" Segment="6">
|
||||||
<Animation Name="object_gol_Anim_00017C" Offset="0x17C"/>
|
<Skeleton Name="gObjectGolSkel" Type="Normal" LimbType="Standard" Offset="0x3B40"/>
|
||||||
<Animation Name="object_gol_Anim_000334" Offset="0x334"/>
|
|
||||||
<Animation Name="object_gol_Anim_000544" Offset="0x544"/>
|
<Animation Name="gObjectGolLandFromJumpAnim" Offset="0x17C"/>
|
||||||
<Animation Name="object_gol_Anim_000838" Offset="0x838"/>
|
<Animation Name="gObjectGolDeadTwitchingAnim" Offset="0x334"/>
|
||||||
<Animation Name="object_gol_Anim_000B78" Offset="0xB78"/>
|
<Animation Name="gObjectGolJumpHeadbuttAnim" Offset="0x544"/>
|
||||||
<Animation Name="object_gol_Anim_000E4C" Offset="0xE4C"/>
|
<Animation Name="gObjectGolDamagedAnim" Offset="0x838"/>
|
||||||
<Animation Name="object_gol_Anim_0011B4" Offset="0x11B4"/>
|
<Animation Name="gObjectGolDeathAnim" Offset="0xB78"/>
|
||||||
<Animation Name="object_gol_Anim_001548" Offset="0x1548"/>
|
<Animation Name="gObjectGolPrepareJumpAnim" Offset="0xE4C"/>
|
||||||
<DList Name="object_gol_DL_001600" Offset="0x1600"/>
|
<Animation Name="gObjectGolWalkAnim" Offset="0x11B4"/> <!-- unused -->
|
||||||
<DList Name="object_gol_DL_001860" Offset="0x1860"/>
|
<Animation Name="gObjectGolStandAnim" Offset="0x1548"/>
|
||||||
<DList Name="object_gol_DL_0019F8" Offset="0x19F8"/>
|
<Animation Name="gObjectGolRunningAnim" Offset="0x3D78"/>
|
||||||
<DList Name="object_gol_DL_001B28" Offset="0x1B28"/>
|
<Animation Name="gObjectGolStopRunningAnim" Offset="0x3FF0"/>
|
||||||
<DList Name="object_gol_DL_001D78" Offset="0x1D78"/>
|
<Animation Name="gObjectGolStartRunningAnim" Offset="0x4204"/>
|
||||||
<DList Name="object_gol_DL_001F10" Offset="0x1F10"/>
|
|
||||||
<DList Name="object_gol_DL_0024E0" Offset="0x24E0"/>
|
<DList Name="gObjectGolLeftFootDL" Offset="0x1600"/>
|
||||||
<DList Name="object_gol_DL_002A70" Offset="0x2A70"/>
|
<DList Name="gObjectGolLeftThighDL" Offset="0x1860"/>
|
||||||
<DList Name="object_gol_DL_002C10" Offset="0x2C10"/>
|
<DList Name="gObjectGolLeftShinDL" Offset="0x19F8"/>
|
||||||
<DList Name="object_gol_DL_002EB8" Offset="0x2EB8"/>
|
<DList Name="gObjectGolRightFootDL" Offset="0x1B28"/>
|
||||||
<Texture Name="object_gol_Tex_002FD0" OutName="tex_00002FD0" Format="rgba16" Width="16" Height="16" Offset="0x2FD0"/>
|
<DList Name="gObjectGolRightThighDL" Offset="0x1D78"/>
|
||||||
<Texture Name="object_gol_Tex_0031D0" OutName="tex_000031D0" Format="rgba16" Width="16" Height="16" Offset="0x31D0"/>
|
<DList Name="gObjectGolRightShinDL" Offset="0x1F10"/>
|
||||||
<Texture Name="object_gol_Tex_0033D0" OutName="tex_000033D0" Format="rgba16" Width="16" Height="16" Offset="0x33D0"/>
|
<DList Name="gObjectGolBodyDL" Offset="0x24E0"/>
|
||||||
<Texture Name="object_gol_Tex_0035D0" OutName="tex_000035D0" Format="rgba16" Width="16" Height="16" Offset="0x35D0"/>
|
<DList Name="gObjectGolEggDL" Offset="0x2A70"/>
|
||||||
<Texture Name="object_gol_Tex_0037D0" OutName="tex_000037D0" Format="rgba16" Width="16" Height="16" Offset="0x37D0"/>
|
<DList Name="gObjectGolEyeIrisDL" Offset="0x2C10"/>
|
||||||
<Limb Name="object_gol_Limb_0039D0" LimbType="Standard" Offset="0x39D0"/>
|
<DList Name="gObjectGolAntennaDL" Offset="0x2EB8"/>
|
||||||
<Limb Name="object_gol_Limb_0039DC" LimbType="Standard" Offset="0x39DC"/>
|
|
||||||
<Limb Name="object_gol_Limb_0039E8" LimbType="Standard" Offset="0x39E8"/>
|
<Texture Name="gObjectGolShellTex" OutName="object_gol_shell" Format="rgba16" Width="16" Height="16" Offset="0x2FD0"/>
|
||||||
<Limb Name="object_gol_Limb_0039F4" LimbType="Standard" Offset="0x39F4"/>
|
<Texture Name="gObjectGolSkinTex" OutName="object_gol_skin" Format="rgba16" Width="16" Height="16" Offset="0x31D0"/>
|
||||||
<Limb Name="object_gol_Limb_003A00" LimbType="Standard" Offset="0x3A00"/>
|
<!-- the white of the eye texture is also used for the antenna -->
|
||||||
<Limb Name="object_gol_Limb_003A0C" LimbType="Standard" Offset="0x3A0C"/>
|
<Texture Name="gObjectGolEyeWhiteTex" OutName="object_gol_eye_white" Format="rgba16" Width="16" Height="16" Offset="0x33D0"/>
|
||||||
<Limb Name="object_gol_Limb_003A18" LimbType="Standard" Offset="0x3A18"/>
|
<Texture Name="gObjectGolEyeIrisTex" OutName="object_gol_eye_iris" Format="rgba16" Width="16" Height="16" Offset="0x35D0"/>
|
||||||
<Limb Name="object_gol_Limb_003A24" LimbType="Standard" Offset="0x3A24"/>
|
<Texture Name="gObjectGolEggTex" OutName="object_gol_egg" Format="rgba16" Width="16" Height="16" Offset="0x37D0"/>
|
||||||
<Limb Name="object_gol_Limb_003A30" LimbType="Standard" Offset="0x3A30"/>
|
|
||||||
<Limb Name="object_gol_Limb_003A3C" LimbType="Standard" Offset="0x3A3C"/>
|
<Limb Name="gObjectGolRoot1Limb" LimbType="Standard" Offset="0x39D0"/>
|
||||||
<Limb Name="object_gol_Limb_003A48" LimbType="Standard" Offset="0x3A48"/>
|
<Limb Name="gObjectGolRoot2Limb" LimbType="Standard" Offset="0x39DC"/>
|
||||||
<Limb Name="object_gol_Limb_003A54" LimbType="Standard" Offset="0x3A54"/>
|
<Limb Name="gObjectGolBodyLimb" LimbType="Standard" Offset="0x39E8"/>
|
||||||
<Limb Name="object_gol_Limb_003A60" LimbType="Standard" Offset="0x3A60"/>
|
<Limb Name="gObjectGolAntennaRoot1Limb" LimbType="Standard" Offset="0x39F4"/>
|
||||||
<Limb Name="object_gol_Limb_003A6C" LimbType="Standard" Offset="0x3A6C"/>
|
<Limb Name="gObjectGolAntennaRoot2Limb" LimbType="Standard" Offset="0x3A00"/>
|
||||||
<Limb Name="object_gol_Limb_003A78" LimbType="Standard" Offset="0x3A78"/>
|
<Limb Name="gObjectGolAntennaLimb" LimbType="Standard" Offset="0x3A0C"/>
|
||||||
<Limb Name="object_gol_Limb_003A84" LimbType="Standard" Offset="0x3A84"/>
|
<Limb Name="gObjectGolEyeIrisRoot1Limb" LimbType="Standard" Offset="0x3A18"/>
|
||||||
<Limb Name="object_gol_Limb_003A90" LimbType="Standard" Offset="0x3A90"/>
|
<Limb Name="gObjectGolEyeIrisRoot2Limb" LimbType="Standard" Offset="0x3A24"/>
|
||||||
<Limb Name="object_gol_Limb_003A9C" LimbType="Standard" Offset="0x3A9C"/>
|
<Limb Name="gObjectGolEyeIrisLimb" LimbType="Standard" Offset="0x3A30"/>
|
||||||
<Limb Name="object_gol_Limb_003AA8" LimbType="Standard" Offset="0x3AA8"/>
|
<Limb Name="gObjectGolLeftLegRoot1Limb" LimbType="Standard" Offset="0x3A3C"/>
|
||||||
<Limb Name="object_gol_Limb_003AB4" LimbType="Standard" Offset="0x3AB4"/>
|
<Limb Name="gObjectGolLeftLegRoot2Limb" LimbType="Standard" Offset="0x3A48"/>
|
||||||
<Limb Name="object_gol_Limb_003AC0" LimbType="Standard" Offset="0x3AC0"/>
|
<Limb Name="gObjectGolLeftShinRootLimb" LimbType="Standard" Offset="0x3A54"/>
|
||||||
<Limb Name="object_gol_Limb_003ACC" LimbType="Standard" Offset="0x3ACC"/>
|
<Limb Name="gObjectGolLeftFootRootLimb" LimbType="Standard" Offset="0x3A60"/>
|
||||||
<Limb Name="object_gol_Limb_003AD8" LimbType="Standard" Offset="0x3AD8"/>
|
<Limb Name="gObjectGolLeftFootLimb" LimbType="Standard" Offset="0x3A6C"/>
|
||||||
<Skeleton Name="object_gol_Skel_003B40" Type="Normal" LimbType="Standard" Offset="0x3B40"/>
|
<Limb Name="gObjectGolLeftShinLimb" LimbType="Standard" Offset="0x3A78"/>
|
||||||
<Animation Name="object_gol_Anim_003D78" Offset="0x3D78"/>
|
<Limb Name="gObjectGolLeftThighLimb" LimbType="Standard" Offset="0x3A84"/>
|
||||||
<Animation Name="object_gol_Anim_003FF0" Offset="0x3FF0"/>
|
<Limb Name="gObjectGolRightLegRoot1Limb" LimbType="Standard" Offset="0x3A90"/>
|
||||||
<Animation Name="object_gol_Anim_004204" Offset="0x4204"/>
|
<Limb Name="gObjectGolRightLegRoot2Limb" LimbType="Standard" Offset="0x3A9C"/>
|
||||||
|
<Limb Name="gObjectGolRightShinRootLimb" LimbType="Standard" Offset="0x3AA8"/>
|
||||||
|
<Limb Name="gObjectGolRightFootRootLimb" LimbType="Standard" Offset="0x3AB4"/>
|
||||||
|
<Limb Name="gObjectGolRightFootLimb" LimbType="Standard" Offset="0x3AC0"/>
|
||||||
|
<Limb Name="gObjectGolRightShinLimb" LimbType="Standard" Offset="0x3ACC"/>
|
||||||
|
<Limb Name="gObjectGolRightThighLimb" LimbType="Standard" Offset="0x3AD8"/>
|
||||||
</File>
|
</File>
|
||||||
</Root>
|
</Root>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include "z_en_goma.h"
|
#include "z_en_goma.h"
|
||||||
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
|
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
|
||||||
|
#include "objects/object_gol/object_gol.h"
|
||||||
#include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h"
|
#include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h"
|
||||||
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
|
#include "overlays/effects/ovl_Effect_Ss_Hahen/z_eff_ss_hahen.h"
|
||||||
|
|
||||||
|
@ -43,17 +44,6 @@ void EnGoma_SetupLand(EnGoma* this);
|
||||||
void EnGoma_SetupJump(EnGoma* this);
|
void EnGoma_SetupJump(EnGoma* this);
|
||||||
void EnGoma_SetupStunned(EnGoma* this, GlobalContext* globalCtx);
|
void EnGoma_SetupStunned(EnGoma* this, GlobalContext* globalCtx);
|
||||||
|
|
||||||
extern AnimationHeader D_0600017C;
|
|
||||||
extern AnimationHeader D_06000334;
|
|
||||||
extern AnimationHeader D_06000544;
|
|
||||||
extern AnimationHeader D_06000838;
|
|
||||||
extern AnimationHeader D_06000B78;
|
|
||||||
extern AnimationHeader D_06000E4C;
|
|
||||||
extern AnimationHeader D_06001548;
|
|
||||||
extern Gfx D_06002A70[]; // Egg DL
|
|
||||||
extern SkeletonHeader D_06003B40;
|
|
||||||
extern AnimationHeader D_06003D78;
|
|
||||||
|
|
||||||
const ActorInit En_Goma_InitVars = {
|
const ActorInit En_Goma_InitVars = {
|
||||||
ACTOR_BOSS_GOMA,
|
ACTOR_BOSS_GOMA,
|
||||||
ACTORCAT_ENEMY,
|
ACTORCAT_ENEMY,
|
||||||
|
@ -148,8 +138,9 @@ void EnGoma_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
|
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 0.0f);
|
||||||
} else { // Egg
|
} else { // Egg
|
||||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
|
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 40.0f);
|
||||||
SkelAnime_Init(globalCtx, &this->skelanime, &D_06003B40, &D_06001548, this->jointTable, this->morphTable, 24);
|
SkelAnime_Init(globalCtx, &this->skelanime, &gObjectGolSkel, &gObjectGolStandAnim, this->jointTable,
|
||||||
Animation_PlayLoop(&this->skelanime, &D_06001548);
|
this->morphTable, GOMA_LIMB_MAX);
|
||||||
|
Animation_PlayLoop(&this->skelanime, &gObjectGolStandAnim);
|
||||||
this->actor.colChkInfo.health = 2;
|
this->actor.colChkInfo.health = 2;
|
||||||
|
|
||||||
if (this->actor.params < 3) { // Spawned by boss
|
if (this->actor.params < 3) { // Spawned by boss
|
||||||
|
@ -190,8 +181,8 @@ void EnGoma_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupFlee(EnGoma* this) {
|
void EnGoma_SetupFlee(EnGoma* this) {
|
||||||
Animation_Change(&this->skelanime, &D_06003D78, 2.0f, 0.0f, Animation_GetLastFrame(&D_06003D78), ANIMMODE_LOOP,
|
Animation_Change(&this->skelanime, &gObjectGolRunningAnim, 2.0f, 0.0f,
|
||||||
-2.0f);
|
Animation_GetLastFrame(&gObjectGolRunningAnim), ANIMMODE_LOOP, -2.0f);
|
||||||
this->actionFunc = EnGoma_Flee;
|
this->actionFunc = EnGoma_Flee;
|
||||||
this->actionTimer = 20;
|
this->actionTimer = 20;
|
||||||
|
|
||||||
|
@ -306,8 +297,8 @@ void EnGoma_Egg(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupHatch(EnGoma* this, GlobalContext* globalCtx) {
|
void EnGoma_SetupHatch(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
Animation_Change(&this->skelanime, &D_06000544, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000544), ANIMMODE_ONCE,
|
Animation_Change(&this->skelanime, &gObjectGolJumpHeadbuttAnim, 1.0f, 0.0f,
|
||||||
0.0f);
|
Animation_GetLastFrame(&gObjectGolJumpHeadbuttAnim), ANIMMODE_ONCE, 0.0f);
|
||||||
this->actionFunc = EnGoma_Hatch;
|
this->actionFunc = EnGoma_Hatch;
|
||||||
Actor_SetScale(&this->actor, 0.005f);
|
Actor_SetScale(&this->actor, 0.005f);
|
||||||
this->gomaType = ENGOMA_NORMAL;
|
this->gomaType = ENGOMA_NORMAL;
|
||||||
|
@ -327,8 +318,8 @@ void EnGoma_Hatch(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupHurt(EnGoma* this, GlobalContext* globalCtx) {
|
void EnGoma_SetupHurt(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
Animation_Change(&this->skelanime, &D_06000838, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000838), ANIMMODE_ONCE,
|
Animation_Change(&this->skelanime, &gObjectGolDamagedAnim, 1.0f, 0.0f,
|
||||||
-2.0f);
|
Animation_GetLastFrame(&gObjectGolDamagedAnim), ANIMMODE_ONCE, -2.0f);
|
||||||
this->actionFunc = EnGoma_Hurt;
|
this->actionFunc = EnGoma_Hurt;
|
||||||
|
|
||||||
if ((s8)this->actor.colChkInfo.health <= 0) {
|
if ((s8)this->actor.colChkInfo.health <= 0) {
|
||||||
|
@ -364,8 +355,8 @@ void EnGoma_Hurt(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupDie(EnGoma* this) {
|
void EnGoma_SetupDie(EnGoma* this) {
|
||||||
Animation_Change(&this->skelanime, &D_06000B78, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000B78), ANIMMODE_ONCE,
|
Animation_Change(&this->skelanime, &gObjectGolDeathAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gObjectGolDeathAnim),
|
||||||
-2.0f);
|
ANIMMODE_ONCE, -2.0f);
|
||||||
this->actionFunc = EnGoma_Die;
|
this->actionFunc = EnGoma_Die;
|
||||||
this->actionTimer = 30;
|
this->actionTimer = 30;
|
||||||
|
|
||||||
|
@ -400,8 +391,8 @@ void EnGoma_Die(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupDead(EnGoma* this) {
|
void EnGoma_SetupDead(EnGoma* this) {
|
||||||
Animation_Change(&this->skelanime, &D_06000334, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000334), ANIMMODE_LOOP,
|
Animation_Change(&this->skelanime, &gObjectGolDeadTwitchingAnim, 1.0f, 0.0f,
|
||||||
-2.0f);
|
Animation_GetLastFrame(&gObjectGolDeadTwitchingAnim), ANIMMODE_LOOP, -2.0f);
|
||||||
this->actionFunc = EnGoma_Dead;
|
this->actionFunc = EnGoma_Dead;
|
||||||
this->actionTimer = 3;
|
this->actionTimer = 3;
|
||||||
}
|
}
|
||||||
|
@ -437,23 +428,23 @@ void EnGoma_Dead(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
void EnGoma_SetupStand(EnGoma* this) {
|
void EnGoma_SetupStand(EnGoma* this) {
|
||||||
f32 lastFrame;
|
f32 lastFrame;
|
||||||
|
|
||||||
lastFrame = Animation_GetLastFrame(&D_06001548);
|
lastFrame = Animation_GetLastFrame(&gObjectGolStandAnim);
|
||||||
this->actionTimer = Rand_S16Offset(10, 30);
|
this->actionTimer = Rand_S16Offset(10, 30);
|
||||||
Animation_Change(&this->skelanime, &D_06001548, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP, -5.0f);
|
Animation_Change(&this->skelanime, &gObjectGolStandAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP, -5.0f);
|
||||||
this->actionFunc = EnGoma_Stand;
|
this->actionFunc = EnGoma_Stand;
|
||||||
this->gomaType = ENGOMA_NORMAL;
|
this->gomaType = ENGOMA_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupChasePlayer(EnGoma* this) {
|
void EnGoma_SetupChasePlayer(EnGoma* this) {
|
||||||
Animation_Change(&this->skelanime, &D_06003D78, 1.0f, 0.0f, Animation_GetLastFrame(&D_06003D78), ANIMMODE_LOOP,
|
Animation_Change(&this->skelanime, &gObjectGolRunningAnim, 1.0f, 0.0f,
|
||||||
-5.0f);
|
Animation_GetLastFrame(&gObjectGolRunningAnim), ANIMMODE_LOOP, -5.0f);
|
||||||
this->actionFunc = EnGoma_ChasePlayer;
|
this->actionFunc = EnGoma_ChasePlayer;
|
||||||
this->actionTimer = Rand_S16Offset(70, 110);
|
this->actionTimer = Rand_S16Offset(70, 110);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupPrepareJump(EnGoma* this) {
|
void EnGoma_SetupPrepareJump(EnGoma* this) {
|
||||||
Animation_Change(&this->skelanime, &D_06000E4C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000E4C), ANIMMODE_ONCE,
|
Animation_Change(&this->skelanime, &gObjectGolPrepareJumpAnim, 1.0f, 0.0f,
|
||||||
-5.0f);
|
Animation_GetLastFrame(&gObjectGolPrepareJumpAnim), ANIMMODE_ONCE, -5.0f);
|
||||||
this->actionFunc = EnGoma_PrepareJump;
|
this->actionFunc = EnGoma_PrepareJump;
|
||||||
this->actionTimer = 30;
|
this->actionTimer = 30;
|
||||||
}
|
}
|
||||||
|
@ -475,8 +466,8 @@ void EnGoma_PrepareJump(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupLand(EnGoma* this) {
|
void EnGoma_SetupLand(EnGoma* this) {
|
||||||
Animation_Change(&this->skelanime, &D_0600017C, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600017C), ANIMMODE_ONCE,
|
Animation_Change(&this->skelanime, &gObjectGolLandFromJumpAnim, 1.0f, 0.0f,
|
||||||
0.0f);
|
Animation_GetLastFrame(&gObjectGolLandFromJumpAnim), ANIMMODE_ONCE, 0.0f);
|
||||||
this->actionFunc = EnGoma_Land;
|
this->actionFunc = EnGoma_Land;
|
||||||
this->actionTimer = 10;
|
this->actionTimer = 10;
|
||||||
}
|
}
|
||||||
|
@ -493,8 +484,8 @@ void EnGoma_Land(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnGoma_SetupJump(EnGoma* this) {
|
void EnGoma_SetupJump(EnGoma* this) {
|
||||||
Animation_Change(&this->skelanime, &D_06000544, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000544), ANIMMODE_ONCE,
|
Animation_Change(&this->skelanime, &gObjectGolJumpHeadbuttAnim, 1.0f, 0.0f,
|
||||||
0.0f);
|
Animation_GetLastFrame(&gObjectGolJumpHeadbuttAnim), ANIMMODE_ONCE, 0.0f);
|
||||||
this->actionFunc = EnGoma_Jump;
|
this->actionFunc = EnGoma_Jump;
|
||||||
this->actor.velocity.y = 8.0f;
|
this->actor.velocity.y = 8.0f;
|
||||||
|
|
||||||
|
@ -557,7 +548,7 @@ void EnGoma_ChasePlayer(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
void EnGoma_SetupStunned(EnGoma* this, GlobalContext* globalCtx) {
|
void EnGoma_SetupStunned(EnGoma* this, GlobalContext* globalCtx) {
|
||||||
this->actionFunc = EnGoma_Stunned;
|
this->actionFunc = EnGoma_Stunned;
|
||||||
this->stunTimer = 100;
|
this->stunTimer = 100;
|
||||||
Animation_MorphToLoop(&this->skelanime, &D_06001548, -5.0f);
|
Animation_MorphToLoop(&this->skelanime, &gObjectGolStandAnim, -5.0f);
|
||||||
this->actionTimer = (s16)Rand_ZeroFloat(15.0f) + 3;
|
this->actionTimer = (s16)Rand_ZeroFloat(15.0f) + 3;
|
||||||
|
|
||||||
if (this->actor.params < 6) {
|
if (this->actor.params < 6) {
|
||||||
|
@ -759,10 +750,10 @@ s32 EnGoma_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
|
||||||
gDPSetEnvColor(POLY_OPA_DISP++, (s16)this->eyeEnvColor[0], (s16)this->eyeEnvColor[1], (s16)this->eyeEnvColor[2],
|
gDPSetEnvColor(POLY_OPA_DISP++, (s16)this->eyeEnvColor[0], (s16)this->eyeEnvColor[1], (s16)this->eyeEnvColor[2],
|
||||||
255);
|
255);
|
||||||
|
|
||||||
if (limbIndex == 7) {
|
if (limbIndex == GOMA_LIMB_EYE_IRIS_ROOT1) {
|
||||||
rot->x += this->eyePitch;
|
rot->x += this->eyePitch;
|
||||||
rot->y += this->eyeYaw;
|
rot->y += this->eyeYaw;
|
||||||
} else if (limbIndex == 3 && this->hurtTimer != 0) {
|
} else if (limbIndex == GOMA_LIMB_BODY && this->hurtTimer != 0) {
|
||||||
gDPSetEnvColor(POLY_OPA_DISP++, (s16)(Rand_ZeroOne() * 255.0f), (s16)(Rand_ZeroOne() * 255.0f),
|
gDPSetEnvColor(POLY_OPA_DISP++, (s16)(Rand_ZeroOne() * 255.0f), (s16)(Rand_ZeroOne() * 255.0f),
|
||||||
(s16)(Rand_ZeroOne() * 255.0f), 255);
|
(s16)(Rand_ZeroOne() * 255.0f), 255);
|
||||||
}
|
}
|
||||||
|
@ -825,7 +816,7 @@ void EnGoma_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||||
Matrix_RotateX(this->eggPitch, MTXMODE_APPLY);
|
Matrix_RotateX(this->eggPitch, MTXMODE_APPLY);
|
||||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_goma.c", 2101),
|
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_goma.c", 2101),
|
||||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||||
gSPDisplayList(POLY_OPA_DISP++, D_06002A70);
|
gSPDisplayList(POLY_OPA_DISP++, gObjectGolEggDL);
|
||||||
Matrix_Pop();
|
Matrix_Pop();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -15,6 +15,34 @@ struct EnGoma;
|
||||||
|
|
||||||
typedef void (*EnGomaActionFunc)(struct EnGoma*, GlobalContext*);
|
typedef void (*EnGomaActionFunc)(struct EnGoma*, GlobalContext*);
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
/* 0 */ GOMA_LIMB_NONE,
|
||||||
|
/* 1 */ GOMA_LIMB_ROOT1,
|
||||||
|
/* 2 */ GOMA_LIMB_ROOT2,
|
||||||
|
/* 3 */ GOMA_LIMB_BODY,
|
||||||
|
/* 4 */ GOMA_LIMB_ANTENNA_ROOT1,
|
||||||
|
/* 5 */ GOMA_LIMB_ANTENNA_ROOT2,
|
||||||
|
/* 6 */ GOMA_LIMB_ANTENNA,
|
||||||
|
/* 7 */ GOMA_LIMB_EYE_IRIS_ROOT1,
|
||||||
|
/* 8 */ GOMA_LIMB_EYE_IRIS_ROOT2,
|
||||||
|
/* 9 */ GOMA_LIMB_EYE_IRIS,
|
||||||
|
/* 10 */ GOMA_LIMB_L_LEG_ROOT1,
|
||||||
|
/* 11 */ GOMA_LIMB_L_LEG_ROOT2,
|
||||||
|
/* 12 */ GOMA_LIMB_L_SHIN_ROOT,
|
||||||
|
/* 13 */ GOMA_LIMB_L_FOOT_ROOT,
|
||||||
|
/* 14 */ GOMA_LIMB_L_FOOT,
|
||||||
|
/* 15 */ GOMA_LIMB_L_SHIN,
|
||||||
|
/* 16 */ GOMA_LIMB_L_THIGH,
|
||||||
|
/* 17 */ GOMA_LIMB_R_LEG_ROOT1,
|
||||||
|
/* 18 */ GOMA_LIMB_R_LEG_ROOT2,
|
||||||
|
/* 19 */ GOMA_LIMB_R_SHIN_ROOT,
|
||||||
|
/* 20 */ GOMA_LIMB_R_FOOT_ROOT,
|
||||||
|
/* 21 */ GOMA_LIMB_R_FOOT,
|
||||||
|
/* 22 */ GOMA_LIMB_R_SHIN,
|
||||||
|
/* 23 */ GOMA_LIMB_R_THIGH,
|
||||||
|
/* 24 */ GOMA_LIMB_MAX
|
||||||
|
} EnGomaLimb;
|
||||||
|
|
||||||
typedef struct EnGoma {
|
typedef struct EnGoma {
|
||||||
/* 0x000 */ Actor actor;
|
/* 0x000 */ Actor actor;
|
||||||
/* 0x14C */ SkelAnime skelanime;
|
/* 0x14C */ SkelAnime skelanime;
|
||||||
|
|
|
@ -1415,19 +1415,6 @@ D_0600FD50 = 0x0600FD50;
|
||||||
D_0600FEF0 = 0x0600FEF0;
|
D_0600FEF0 = 0x0600FEF0;
|
||||||
D_06010590 = 0x06010590;
|
D_06010590 = 0x06010590;
|
||||||
|
|
||||||
|
|
||||||
// z_en_goma
|
|
||||||
D_0600017C = 0x0600017C;
|
|
||||||
D_06000334 = 0x06000334;
|
|
||||||
D_06000544 = 0x06000544;
|
|
||||||
D_06000838 = 0x06000838;
|
|
||||||
D_06000B78 = 0x06000B78;
|
|
||||||
D_06000E4C = 0x06000E4C;
|
|
||||||
D_06001548 = 0x06001548;
|
|
||||||
D_06002A70 = 0x06002A70;
|
|
||||||
D_06003B40 = 0x06003B40;
|
|
||||||
D_06003D78 = 0x06003D78;
|
|
||||||
|
|
||||||
// z_en_g_switch
|
// z_en_g_switch
|
||||||
D_060017C0 = 0x060017C0;
|
D_060017C0 = 0x060017C0;
|
||||||
D_06001960 = 0x06001960;
|
D_06001960 = 0x06001960;
|
||||||
|
|
Loading…
Reference in a new issue