mirror of
https://github.com/zeldaret/oot.git
synced 2024-11-14 05:19:36 +00:00
object_torch2, object_blkobj, and object_geldb (#592)
* objects are fun * more objects * again * fixes to geldb * one more thing * forgot s * type fix * some formatting * change Gerudo name * git subrepo pull --force tools/ZAPD subrepo: subdir: "tools/ZAPD" merged: "0305ec2c2" upstream: origin: "https://github.com/zeldaret/ZAPD.git" branch: "master" commit: "0305ec2c2" git-subrepo: version: "0.4.3" origin: "https://github.com/ingydotnet/git-subrepo.git" commit: "2f68596" * organize xmls * outname Co-authored-by: petrie911 <pmontag@DESKTOP-LG8A167.localdomain> Co-authored-by: Fig02 <fig02srl@gmail.com>
This commit is contained in:
parent
3db87244b4
commit
9607ce34fd
15 changed files with 153 additions and 105 deletions
|
@ -956,4 +956,4 @@
|
|||
<Texture Name="gEffSpark3Tex" OutName="eff_spark_3" Format="i4" Width="32" Height="32" Offset="0x563B0"/>
|
||||
<Texture Name="gEffSpark4Tex" OutName="eff_spark_4" Format="i4" Width="32" Height="32" Offset="0x565B0"/>
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
15
assets/xml/objects/object_blkobj.xml
Normal file
15
assets/xml/objects/object_blkobj.xml
Normal file
|
@ -0,0 +1,15 @@
|
|||
<Root>
|
||||
<File Name="object_blkobj" Segment="6">
|
||||
<!-- Illusion Room Collision -->
|
||||
<Collision Name="gIllusionRoomCol" Offset="0x7564"/>
|
||||
|
||||
<!-- Illusion Room DLists -->
|
||||
<DList Name="gIllusionRoomNormalDL" Offset="0x14E0"/>
|
||||
<DList Name="gIllusionRoomIllusionDL" Offset="0x53D0"/>
|
||||
|
||||
<!-- Unused Content -->
|
||||
|
||||
<!-- Illusion room DLists -->
|
||||
<DList Name="gIllusionRoomTreeDL" Offset="0x7EB0"/>
|
||||
</File>
|
||||
</Root>
|
28
assets/xml/objects/object_geldb.xml
Normal file
28
assets/xml/objects/object_geldb.xml
Normal file
|
@ -0,0 +1,28 @@
|
|||
<Root>
|
||||
<File Name="object_geldb" Segment="6">
|
||||
<!-- Red-clothed Gerudo skeleton -->
|
||||
<Skeleton Name="gGerudoRedSkel" Type="Flex" LimbType="Standard" Offset="0xA458"/>
|
||||
|
||||
<!-- Red-clothed Gerudo animations -->
|
||||
<Animation Name="gGerudoRedJumpAnim" Offset="0xADF8"/>
|
||||
<Animation Name="gGerudoRedNeutralAnim" Offset="0xB6D4"/>
|
||||
<Animation Name="gGerudoRedSidestepAnim" Offset="0xA814"/>
|
||||
<Animation Name="gGerudoRedFlipAnim" Offset="0x1390"/>
|
||||
<Animation Name="gGerudoRedWalkAnim" Offset="0x24E8"/>
|
||||
<Animation Name="gGerudoRedSlashAnim" Offset="0x03CC"/>
|
||||
<Animation Name="gGerudoRedSpinAttackAnim" Offset="0x0F5C"/>
|
||||
<Animation Name="gGerudoRedDamageAnim" Offset="0x2280"/>
|
||||
<Animation Name="gGerudoRedDefeatAnim" Offset="0x1E10"/>
|
||||
<Animation Name="gGerudoRedBlockAnim" Offset="0x1578"/>
|
||||
<Animation Name="gGerudoRedStandAnim" Offset="0xB07C"/>
|
||||
|
||||
<!-- Red-clothed Gerudo eye textures -->
|
||||
<Texture Name="gGerudoRedEyeOpenTex" OutName="gerudo_red_eye_open" Format="ci8" Width="32" Height="32" Offset="0x5FE8"/>
|
||||
<Texture Name="gGerudoRedEyeHalfTex" OutName="gerudo_red_eye_half" Format="ci8" Width="32" Height="32" Offset="0x65A8"/>
|
||||
<Texture Name="gGerudoRedEyeShutTex" OutName="gerudo_red_eye_shut" Format="ci8" Width="32" Height="32" Offset="0x6D28"/>
|
||||
|
||||
<!-- These hints are currently needed for ZAPD to extract the textures properly. -->
|
||||
<Texture Name="sGerudoRedTexHint1" Format="rgb5a1" Width="18" Height="14" Offset="0x5D30"/>
|
||||
<Texture Name="sGerudoRedTexHint2" Format="ci8" Width="8" Height="8" Offset="0x5F28"/>
|
||||
</File>
|
||||
</Root>
|
|
@ -10,4 +10,4 @@
|
|||
<Collision Name="gUnknownUnusedBox4Col" Offset="0x15D0"/>
|
||||
<Texture Name="gUnknownUnusedBoxTex" OutName="unknown_unused_box" Format="rgb5a1" Width="32" Height="32" Offset="0xCC8"/>
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
|
@ -52,4 +52,4 @@
|
|||
<Animation Name="gStalfosSideWalkAnim" Offset="0xE2B0"/>
|
||||
<Animation Name="gStalfosStanding2FightingAnim" Offset="0xE7E4"/>
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
<Collision Name="gValleyObjects3Col" Offset="0x8458" Size="0x30"/>
|
||||
<Collision Name="gValleyObjects4Col" Offset="0x7580" Size="0x30"/>
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
|
@ -6,4 +6,4 @@
|
|||
<DList Name="gDesertColossusBombableWallDL" Offset="0x1980"/>
|
||||
<Collision Name="gDesertColossusBombableWallCol" Offset="0x1A58"/>
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
|
@ -9,4 +9,4 @@
|
|||
<Texture Name="gCraterSmokeConeTex" OutName="crater_smoke_cone" Format="ia8" Width="32" Height="32" Offset="0xC30"/>
|
||||
<Texture Name="gCraterBombableWallCracksTex" OutName="crater_bombable_wall_cracks" Format="ia8" Width="32" Height="64" Offset="0x1030"/>
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
11
assets/xml/objects/object_torch2.xml
Normal file
11
assets/xml/objects/object_torch2.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<Root>
|
||||
<File Name="object_torch2" Segment="6">
|
||||
<!-- Dark Link's skeleton -->
|
||||
<Skeleton Name="gDarkLinkSkel" Type="Flex" LimbType="LOD" Offset="0x4764"/>
|
||||
|
||||
<!-- Unused Content -->
|
||||
|
||||
<!-- Dark Link DLists -->
|
||||
<DList Name="sDarkLinkSheathDL" Offset="0x3748"/>
|
||||
</File>
|
||||
</Root>
|
|
@ -4,4 +4,4 @@
|
|||
<Texture Name="gUnusedVaseTopTex" OutName="unused_vase_top" Format="rgb5a1" Width="32" Height="32" Offset="0xD90"/>
|
||||
<Texture Name="gUnusedVaseBodyTex" OutName="unused_vase_body" Format="rgb5a1" Width="32" Height="32" Offset="0x590"/>
|
||||
</File>
|
||||
</Root>
|
||||
</Root>
|
||||
|
|
9
spec
9
spec
|
@ -3684,7 +3684,8 @@ endseg
|
|||
beginseg
|
||||
name "object_torch2"
|
||||
romalign 0x1000
|
||||
include "build/baserom/object_torch2.o"
|
||||
include "build/assets/objects/object_torch2/object_torch2.o"
|
||||
number 6
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -5147,7 +5148,8 @@ endseg
|
|||
beginseg
|
||||
name "object_blkobj"
|
||||
romalign 0x1000
|
||||
include "build/baserom/object_blkobj.o"
|
||||
include "build/assets/objects/object_blkobj/object_blkobj.o"
|
||||
number 6
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -5555,7 +5557,8 @@ endseg
|
|||
beginseg
|
||||
name "object_geldb"
|
||||
romalign 0x1000
|
||||
include "build/baserom/object_geldb.o"
|
||||
include "build/assets/objects/object_geldb/object_geldb.o"
|
||||
number 6
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_en_blkobj.h"
|
||||
#include "objects/object_blkobj/object_blkobj.h"
|
||||
|
||||
#define FLAGS 0x00000030
|
||||
|
||||
|
@ -49,10 +50,6 @@ static Gfx sSetupXluDL[] = {
|
|||
gsSPEndDisplayList(),
|
||||
};
|
||||
|
||||
extern Gfx D_060014E0[];
|
||||
extern Gfx D_060053D0[];
|
||||
extern CollisionHeader D_06007564;
|
||||
|
||||
void EnBlkobj_SetupAction(EnBlkobj* this, EnBlkobjActionFunc actionFunc) {
|
||||
this->actionFunc = actionFunc;
|
||||
this->timer = 0;
|
||||
|
@ -69,7 +66,7 @@ void EnBlkobj_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
this->alpha = 255;
|
||||
EnBlkobj_SetupAction(this, EnBlkobj_DoNothing);
|
||||
} else {
|
||||
CollisionHeader_GetVirtual(&D_06007564, &colHeader);
|
||||
CollisionHeader_GetVirtual(&gIllusionRoomCol, &colHeader);
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
EnBlkobj_SetupAction(this, EnBlkobj_Wait);
|
||||
}
|
||||
|
@ -168,11 +165,11 @@ void EnBlkobj_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (this->alpha != 0) {
|
||||
EnBlkobj_DrawAlpha(globalCtx, D_060014E0, this->alpha);
|
||||
EnBlkobj_DrawAlpha(globalCtx, gIllusionRoomNormalDL, this->alpha);
|
||||
}
|
||||
illusionAlpha = 255 - this->alpha;
|
||||
if (illusionAlpha != 0) {
|
||||
EnBlkobj_DrawAlpha(globalCtx, D_060053D0, illusionAlpha);
|
||||
EnBlkobj_DrawAlpha(globalCtx, gIllusionRoomIllusionDL, illusionAlpha);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_blkobj.c", 375);
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include "z_en_geldb.h"
|
||||
#include "objects/object_geldb/object_geldb.h"
|
||||
|
||||
#define FLAGS 0x00000015
|
||||
|
||||
|
@ -22,7 +23,7 @@ typedef enum {
|
|||
/* 14 */ GELDB_ROLL_FORWARD,
|
||||
/* 15 */ GELDB_STUNNED,
|
||||
/* 16 */ GELDB_SPIN_DODGE
|
||||
} EnGeldBActionState;
|
||||
} EnGeldBAction;
|
||||
|
||||
void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnGeldB_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
@ -64,19 +65,6 @@ void EnGeldB_Block(EnGeldB* this, GlobalContext* globalCtx);
|
|||
void EnGeldB_Sidestep(EnGeldB* this, GlobalContext* globalCtx);
|
||||
void EnGeldB_Defeated(EnGeldB* this, GlobalContext* globalCtx);
|
||||
|
||||
extern FlexSkeletonHeader D_0600A458;
|
||||
extern AnimationHeader D_0600ADF8;
|
||||
extern AnimationHeader D_0600B6D4;
|
||||
extern AnimationHeader D_0600A814;
|
||||
extern AnimationHeader D_06001390;
|
||||
extern AnimationHeader D_060024E8;
|
||||
extern AnimationHeader D_060003CC;
|
||||
extern AnimationHeader D_06000F5C;
|
||||
extern AnimationHeader D_06002280;
|
||||
extern AnimationHeader D_06001E10;
|
||||
extern AnimationHeader D_0600ADF8;
|
||||
extern AnimationHeader D_06001578;
|
||||
|
||||
const ActorInit En_GeldB_InitVars = {
|
||||
ACTOR_EN_GELDB,
|
||||
ACTORCAT_ENEMY,
|
||||
|
@ -240,7 +228,8 @@ void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
thisx->params &= 0xFF;
|
||||
this->blinkState = 0;
|
||||
this->unkFloat = 10.0f;
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600A458, &D_0600B6D4, this->jointTable, this->morphTable, 24);
|
||||
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gGerudoRedSkel, &gGerudoRedNeutralAnim, this->jointTable,
|
||||
this->morphTable, 24);
|
||||
Collider_InitCylinder(globalCtx, &this->bodyCollider);
|
||||
Collider_SetCylinder(globalCtx, &this->bodyCollider, thisx, &sBodyCylInit);
|
||||
Collider_InitTris(globalCtx, &this->blockCollider);
|
||||
|
@ -257,7 +246,7 @@ void EnGeldB_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
blureInit.unkFlag = 0;
|
||||
blureInit.calcMode = 2;
|
||||
|
||||
Effect_Add(globalCtx, &this->blureIdx, EFFECT_BLURE1, 0, 0, &blureInit);
|
||||
Effect_Add(globalCtx, &this->blureIndex, EFFECT_BLURE1, 0, 0, &blureInit);
|
||||
Actor_SetScale(thisx, 0.012499999f);
|
||||
EnGeldB_SetupWait(this);
|
||||
if ((this->keyFlag != 0) && Flags_GetCollectible(globalCtx, this->keyFlag >> 8)) {
|
||||
|
@ -270,7 +259,7 @@ void EnGeldB_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
|||
EnGeldB* this = THIS;
|
||||
|
||||
func_800F5B58();
|
||||
Effect_Delete(globalCtx, this->blureIdx);
|
||||
Effect_Delete(globalCtx, this->blureIndex);
|
||||
Collider_DestroyTris(globalCtx, &this->blockCollider);
|
||||
Collider_DestroyCylinder(globalCtx, &this->bodyCollider);
|
||||
Collider_DestroyQuad(globalCtx, &this->swordCollider);
|
||||
|
@ -348,11 +337,11 @@ s32 EnGeldB_ReactToPlayer(GlobalContext* globalCtx, EnGeldB* this, s16 arg2) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupWait(EnGeldB* this) {
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_0600ADF8, 0.0f);
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, &gGerudoRedJumpAnim, 0.0f);
|
||||
this->actor.world.pos.y = this->actor.home.pos.y + 120.0f;
|
||||
this->timer = 10;
|
||||
this->invisible = true;
|
||||
this->actionState = GELDB_WAIT;
|
||||
this->action = GELDB_WAIT;
|
||||
this->actor.bgCheckFlags &= ~3;
|
||||
this->actor.gravity = -2.0f;
|
||||
this->actor.flags &= ~1;
|
||||
|
@ -386,11 +375,12 @@ void EnGeldB_Wait(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupFlee(EnGeldB* this) {
|
||||
Animation_Change(&this->skelAnime, &D_0600ADF8, -2.0f, Animation_GetLastFrame(&D_0600ADF8), 0.0f,
|
||||
ANIMMODE_ONCE_INTERP, -4.0f);
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedJumpAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedJumpAnim, -2.0f, lastFrame, 0.0f, ANIMMODE_ONCE_INTERP, -4.0f);
|
||||
this->timer = 20;
|
||||
this->invisible = false;
|
||||
this->actionState = GELDB_WAIT;
|
||||
this->action = GELDB_WAIT;
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
EnGeldB_SetupAction(this, EnGeldB_Flee);
|
||||
}
|
||||
|
@ -414,8 +404,8 @@ void EnGeldB_Flee(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupReady(EnGeldB* this) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &D_0600B6D4, -4.0f);
|
||||
this->actionState = GELDB_READY;
|
||||
Animation_MorphToLoop(&this->skelAnime, &gGerudoRedNeutralAnim, -4.0f);
|
||||
this->action = GELDB_READY;
|
||||
this->timer = Rand_ZeroOne() * 10.0f + 5.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
|
@ -478,9 +468,10 @@ void EnGeldB_Ready(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupAdvance(EnGeldB* this, GlobalContext* globalCtx) {
|
||||
Animation_Change(&this->skelAnime, &D_060024E8, 1.0f, 0.0f, Animation_GetLastFrame(&D_060024E8),
|
||||
ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
this->actionState = GELDB_ADVANCE;
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedWalkAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedWalkAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, -4.0f);
|
||||
this->action = GELDB_ADVANCE;
|
||||
EnGeldB_SetupAction(this, EnGeldB_Advance);
|
||||
}
|
||||
|
||||
|
@ -562,11 +553,12 @@ void EnGeldB_Advance(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupRollForward(EnGeldB* this) {
|
||||
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
|
||||
-3.0f);
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedFlipAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedFlipAnim, -1.0f, lastFrame, 0.0f, ANIMMODE_ONCE, -3.0f);
|
||||
this->timer = 0;
|
||||
this->invisible = true;
|
||||
this->actionState = GELDB_ROLL_FORWARD;
|
||||
this->action = GELDB_ROLL_FORWARD;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.speedXZ = 10.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
||||
|
@ -599,8 +591,8 @@ void EnGeldB_RollForward(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupPivot(EnGeldB* this) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &D_0600A814, -4.0f);
|
||||
this->actionState = GELDB_PIVOT;
|
||||
Animation_MorphToLoop(&this->skelAnime, &gGerudoRedSidestepAnim, -4.0f);
|
||||
this->action = GELDB_PIVOT;
|
||||
EnGeldB_SetupAction(this, EnGeldB_Pivot);
|
||||
}
|
||||
|
||||
|
@ -636,13 +628,14 @@ void EnGeldB_Pivot(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupCircle(EnGeldB* this) {
|
||||
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
|
||||
ANIMMODE_LOOP_INTERP, 0.0f);
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSidestepAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedSidestepAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f);
|
||||
this->actor.speedXZ = Rand_CenteredFloat(12.0f);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
this->skelAnime.playSpeed = -this->actor.speedXZ * 0.5f;
|
||||
this->timer = Rand_ZeroOne() * 30.0f + 30.0f;
|
||||
this->actionState = GELDB_CIRCLE;
|
||||
this->action = GELDB_CIRCLE;
|
||||
this->approachRate = 0.0f;
|
||||
EnGeldB_SetupAction(this, EnGeldB_Circle);
|
||||
}
|
||||
|
@ -739,9 +732,9 @@ void EnGeldB_Circle(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
void EnGeldB_SetupSpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
|
||||
s16 sp3E;
|
||||
Player* player = PLAYER;
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSidestepAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
|
||||
ANIMMODE_LOOP_INTERP, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedSidestepAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f);
|
||||
sp3E = player->actor.shape.rot.y;
|
||||
if (Math_SinS(sp3E - this->actor.shape.rot.y) > 0.0f) {
|
||||
this->actor.speedXZ = -10.0f;
|
||||
|
@ -757,7 +750,7 @@ void EnGeldB_SetupSpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
this->timer = 6;
|
||||
this->approachRate = 0.0f;
|
||||
this->unkFloat = 0.0f;
|
||||
this->actionState = GELDB_SPIN_DODGE;
|
||||
this->action = GELDB_SPIN_DODGE;
|
||||
|
||||
EnGeldB_SetupAction(this, EnGeldB_SpinDodge);
|
||||
}
|
||||
|
@ -836,9 +829,9 @@ void EnGeldB_SpinDodge(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupSlash(EnGeldB* this) {
|
||||
Animation_PlayOnce(&this->skelAnime, &D_060003CC);
|
||||
Animation_PlayOnce(&this->skelAnime, &gGerudoRedSlashAnim);
|
||||
this->swordCollider.base.atFlags &= ~AT_BOUNCED;
|
||||
this->actionState = GELDB_SLASH;
|
||||
this->action = GELDB_SLASH;
|
||||
this->spinAttackState = 0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
func_800F8A44(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
|
||||
|
@ -893,10 +886,11 @@ void EnGeldB_Slash(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupSpinAttack(EnGeldB* this) {
|
||||
Animation_Change(&this->skelAnime, &D_06000F5C, 1.0f, 0.0f, Animation_GetLastFrame(&D_06000F5C),
|
||||
ANIMMODE_ONCE_INTERP, 0.0f);
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSpinAttackAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedSpinAttackAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_ONCE_INTERP, 0.0f);
|
||||
this->swordCollider.base.atFlags &= ~(AT_HIT | AT_BOUNCED);
|
||||
this->actionState = GELDB_SPIN_ATTACK;
|
||||
this->action = GELDB_SPIN_ATTACK;
|
||||
this->spinAttackState = 0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
EnGeldB_SetupAction(this, EnGeldB_SpinAttack);
|
||||
|
@ -974,10 +968,10 @@ void EnGeldB_SpinAttack(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupRollBack(EnGeldB* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001390, -3.0f);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedFlipAnim, -3.0f);
|
||||
this->timer = 0;
|
||||
this->invisible = true;
|
||||
this->actionState = GELDB_ROLL_BACK;
|
||||
this->action = GELDB_ROLL_BACK;
|
||||
this->actor.speedXZ = -8.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
|
@ -1004,14 +998,14 @@ void EnGeldB_SetupStunned(EnGeldB* this) {
|
|||
if (this->actor.bgCheckFlags & 1) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if ((this->damageEffect != GELDB_DMG_FREEZE) || (this->actionState == GELDB_SPIN_ATTACK)) {
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_06002280, 0.0f);
|
||||
if ((this->damageEffect != GELDB_DMG_FREEZE) || (this->action == GELDB_SPIN_ATTACK)) {
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, &gGerudoRedDamageAnim, 0.0f);
|
||||
}
|
||||
if (this->damageEffect == GELDB_DMG_FREEZE) {
|
||||
this->iceTimer = 36;
|
||||
}
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
|
||||
this->actionState = GELDB_STUNNED;
|
||||
this->action = GELDB_STUNNED;
|
||||
EnGeldB_SetupAction(this, EnGeldB_Stunned);
|
||||
}
|
||||
|
||||
|
@ -1035,7 +1029,7 @@ void EnGeldB_Stunned(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupDamaged(EnGeldB* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002280, -4.0f);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDamageAnim, -4.0f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
this->invisible = false;
|
||||
this->actor.speedXZ = -4.0f;
|
||||
|
@ -1045,7 +1039,7 @@ void EnGeldB_SetupDamaged(EnGeldB* this) {
|
|||
this->lookTimer = 0;
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DAMAGE);
|
||||
this->actionState = GELDB_DAMAGED;
|
||||
this->action = GELDB_DAMAGED;
|
||||
EnGeldB_SetupAction(this, EnGeldB_Damaged);
|
||||
}
|
||||
|
||||
|
@ -1079,11 +1073,12 @@ void EnGeldB_Damaged(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupJump(EnGeldB* this) {
|
||||
Animation_Change(&this->skelAnime, &D_06001390, -1.0f, Animation_GetLastFrame(&D_06001390), 0.0f, ANIMMODE_ONCE,
|
||||
-3.0f);
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedFlipAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedFlipAnim, -1.0f, lastFrame, 0.0f, ANIMMODE_ONCE, -3.0f);
|
||||
this->timer = 0;
|
||||
this->invisible = false;
|
||||
this->actionState = GELDB_JUMP;
|
||||
this->action = GELDB_JUMP;
|
||||
this->actor.speedXZ = 6.5f;
|
||||
this->actor.velocity.y = 15.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_STAL_JUMP);
|
||||
|
@ -1112,16 +1107,15 @@ void EnGeldB_Jump(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupBlock(EnGeldB* this) {
|
||||
f32 lastFrame;
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedBlockAnim);
|
||||
|
||||
lastFrame = Animation_GetLastFrame(&D_06001578);
|
||||
if (this->swordState != 0) {
|
||||
this->swordState = -1;
|
||||
}
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actionState = GELDB_BLOCK;
|
||||
this->action = GELDB_BLOCK;
|
||||
this->timer = (s32)Rand_CenteredFloat(10.0f) + 10;
|
||||
Animation_Change(&this->skelAnime, &D_06001578, 0.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedBlockAnim, 0.0f, 0.0f, lastFrame, ANIMMODE_ONCE, 0.0f);
|
||||
EnGeldB_SetupAction(this, EnGeldB_Block);
|
||||
}
|
||||
|
||||
|
@ -1181,9 +1175,9 @@ void EnGeldB_Block(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
void EnGeldB_SetupSidestep(EnGeldB* this, GlobalContext* globalCtx) {
|
||||
s16 linkAngle;
|
||||
Player* player;
|
||||
f32 lastFrame = Animation_GetLastFrame(&gGerudoRedSidestepAnim);
|
||||
|
||||
Animation_Change(&this->skelAnime, &D_0600A814, 1.0f, 0.0f, Animation_GetLastFrame(&D_0600A814),
|
||||
ANIMMODE_LOOP_INTERP, 0.0f);
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedSidestepAnim, 1.0f, 0.0f, lastFrame, ANIMMODE_LOOP_INTERP, 0.0f);
|
||||
player = PLAYER;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0xFA0, 1);
|
||||
linkAngle = player->actor.shape.rot.y;
|
||||
|
@ -1198,7 +1192,7 @@ void EnGeldB_SetupSidestep(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
this->approachRate = 0.0f;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y + 0x3FFF;
|
||||
this->timer = Rand_ZeroOne() * 10.0f + 5.0f;
|
||||
this->actionState = GELDB_SIDESTEP;
|
||||
this->action = GELDB_SIDESTEP;
|
||||
EnGeldB_SetupAction(this, EnGeldB_Sidestep);
|
||||
}
|
||||
|
||||
|
@ -1309,7 +1303,7 @@ void EnGeldB_Sidestep(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
|
||||
void EnGeldB_SetupDefeated(EnGeldB* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001E10, -4.0f);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDefeatAnim, -4.0f);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
this->invisible = false;
|
||||
|
@ -1317,7 +1311,7 @@ void EnGeldB_SetupDefeated(EnGeldB* this) {
|
|||
} else {
|
||||
this->invisible = true;
|
||||
}
|
||||
this->actionState = GELDB_DEFEAT;
|
||||
this->action = GELDB_DEFEAT;
|
||||
this->actor.flags &= ~1;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GERUDOFT_DEAD);
|
||||
EnGeldB_SetupAction(this, EnGeldB_Defeated);
|
||||
|
@ -1339,11 +1333,11 @@ void EnGeldB_Defeated(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80A391D8(EnGeldB* this, GlobalContext* globalCtx) {
|
||||
if ((this->actionState == GELDB_READY) && (this->lookTimer != 0)) {
|
||||
void EnGeldB_TurnHead(EnGeldB* this, GlobalContext* globalCtx) {
|
||||
if ((this->action == GELDB_READY) && (this->lookTimer != 0)) {
|
||||
this->headRot.y = Math_SinS(this->lookTimer * 0x1068) * 8920.0f;
|
||||
} else if (this->actionState != GELDB_STUNNED) {
|
||||
if ((this->actionState != GELDB_SLASH) && (this->actionState != GELDB_SPIN_ATTACK)) {
|
||||
} else if (this->action != GELDB_STUNNED) {
|
||||
if ((this->action != GELDB_SLASH) && (this->action != GELDB_SPIN_ATTACK)) {
|
||||
Math_SmoothStepToS(&this->headRot.y, this->actor.yawTowardsPlayer - this->actor.shape.rot.y, 1, 0x1F4, 0);
|
||||
this->headRot.y = CLAMP(this->headRot.y, -0x256F, 0x256F);
|
||||
} else {
|
||||
|
@ -1352,14 +1346,14 @@ void func_80A391D8(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80A392D8(EnGeldB* this, GlobalContext* globalCtx) {
|
||||
void EnGeldB_CollisionCheck(EnGeldB* this, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
EnItem00* key;
|
||||
|
||||
if (this->blockCollider.base.acFlags & AC_BOUNCED) {
|
||||
this->blockCollider.base.acFlags &= ~AC_BOUNCED;
|
||||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->actionState >= GELDB_READY) &&
|
||||
} else if ((this->bodyCollider.base.acFlags & AC_HIT) && (this->action >= GELDB_READY) &&
|
||||
(this->spinAttackState < 2)) {
|
||||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
|
||||
|
@ -1368,7 +1362,7 @@ void func_80A392D8(EnGeldB* this, GlobalContext* globalCtx) {
|
|||
func_800F8A44(&this->actor.projectedPos, NA_SE_EN_GERUDOFT_BREATH);
|
||||
if ((this->actor.colChkInfo.damageEffect == GELDB_DMG_STUN) ||
|
||||
(this->actor.colChkInfo.damageEffect == GELDB_DMG_FREEZE)) {
|
||||
if (this->actionState != GELDB_STUNNED) {
|
||||
if (this->action != GELDB_STUNNED) {
|
||||
func_8003426C(&this->actor, 0, 0x78, 0, 0x50);
|
||||
Actor_ApplyDamage(&this->actor);
|
||||
EnGeldB_SetupStunned(this);
|
||||
|
@ -1399,22 +1393,22 @@ void EnGeldB_Update(Actor* thisx, GlobalContext* globalCtx) {
|
|||
s32 pad;
|
||||
EnGeldB* this = THIS;
|
||||
|
||||
func_80A392D8(this, globalCtx);
|
||||
EnGeldB_CollisionCheck(this, globalCtx);
|
||||
if (this->actor.colChkInfo.damageEffect != GELDB_DMG_UNK_6) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(globalCtx, &this->actor, 15.0f, 30.0f, 60.0f, 0x1D);
|
||||
this->actionFunc(this, globalCtx);
|
||||
this->actor.focus.pos = this->actor.world.pos;
|
||||
this->actor.focus.pos.y += 40.0f;
|
||||
func_80A391D8(this, globalCtx);
|
||||
EnGeldB_TurnHead(this, globalCtx);
|
||||
}
|
||||
Collider_UpdateCylinder(&this->actor, &this->bodyCollider);
|
||||
CollisionCheck_SetOC(globalCtx, &globalCtx->colChkCtx, &this->bodyCollider.base);
|
||||
if ((this->actionState >= GELDB_READY) && (this->spinAttackState < 2) &&
|
||||
if ((this->action >= GELDB_READY) && (this->spinAttackState < 2) &&
|
||||
((this->actor.colorFilterTimer == 0) || !(this->actor.colorFilterParams & 0x4000))) {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->bodyCollider.base);
|
||||
}
|
||||
if ((this->actionState == GELDB_BLOCK) && (this->skelAnime.curFrame == 0.0f)) {
|
||||
if ((this->action == GELDB_BLOCK) && (this->skelAnime.curFrame == 0.0f)) {
|
||||
CollisionCheck_SetAC(globalCtx, &globalCtx->colChkCtx, &this->blockCollider.base);
|
||||
}
|
||||
if (this->swordState > 0) {
|
||||
|
@ -1478,12 +1472,11 @@ void EnGeldB_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
|
|||
Matrix_MultVec3f(&swordTipOffset, &swordTip);
|
||||
Matrix_MultVec3f(&swordHiltOffset, &swordHilt);
|
||||
|
||||
if ((this->swordState < 0) ||
|
||||
((this->actionState != GELDB_SLASH) && (this->actionState != GELDB_SPIN_ATTACK))) {
|
||||
EffectBlure_AddSpace(Effect_GetByIndex(this->blureIdx));
|
||||
if ((this->swordState < 0) || ((this->action != GELDB_SLASH) && (this->action != GELDB_SPIN_ATTACK))) {
|
||||
EffectBlure_AddSpace(Effect_GetByIndex(this->blureIndex));
|
||||
this->swordState = 0;
|
||||
} else if (this->swordState > 0) {
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(this->blureIdx), &swordTip, &swordHilt);
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(this->blureIndex), &swordTip, &swordHilt);
|
||||
}
|
||||
} else {
|
||||
Actor_SetFeetPos(&this->actor, limbIndex, 19, &footOffset, 22, &footOffset);
|
||||
|
@ -1547,7 +1540,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
{ 3000.0f, 0.0f, 1600.0f },
|
||||
{ 3000.0f, 6000.0f, 1600.0f },
|
||||
};
|
||||
static Gfx* eyeDLists[4] = { 0x06005FE8, 0x060065A8, 0x06006D28, 0x060065A8 };
|
||||
static u64* eyeDLists[4] = { gGerudoRedEyeOpenTex, gGerudoRedEyeHalfTex, gGerudoRedEyeShutTex,
|
||||
gGerudoRedEyeHalfTex };
|
||||
s32 pad;
|
||||
EnGeldB* this = THIS;
|
||||
|
||||
|
@ -1556,7 +1550,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
|
||||
if ((this->spinAttackState >= 2) && SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->spinAttackState == 2) {
|
||||
Animation_Change(&this->skelAnime, &D_06000F5C, 0.5f, 0.0f, 12.0f, ANIMMODE_ONCE_INTERP, 4.0f);
|
||||
Animation_Change(&this->skelAnime, &gGerudoRedSpinAttackAnim, 0.5f, 0.0f, 12.0f, ANIMMODE_ONCE_INTERP,
|
||||
4.0f);
|
||||
this->spinAttackState++;
|
||||
thisx->world.rot.y = thisx->shape.rot.y = thisx->yawTowardsPlayer;
|
||||
} else {
|
||||
|
@ -1575,12 +1570,12 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((this->actionState != GELDB_WAIT) || !this->invisible) {
|
||||
if ((this->action != GELDB_WAIT) || !this->invisible) {
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeDLists[this->blinkState]));
|
||||
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnGeldB_OverrideLimbDraw, EnGeldB_PostLimbDraw, this);
|
||||
if (this->actionState == GELDB_BLOCK) {
|
||||
if (this->action == GELDB_BLOCK) {
|
||||
s32 i;
|
||||
Vec3f blockTrisVtx0[3];
|
||||
Vec3f blockTrisVtx1[3];
|
||||
|
@ -1599,8 +1594,8 @@ void EnGeldB_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
|||
if ((this->iceTimer % 4) == 0) {
|
||||
s32 iceIndex = this->iceTimer >> 2;
|
||||
|
||||
EffectSsEnIce_SpawnFlyingVec3s(globalCtx, thisx, &this->bodyPartsPos[iceIndex], 0x96, 0x96, 0x96, 0xFA,
|
||||
0xEB, 0xF5, 0xFF, 1.5f);
|
||||
EffectSsEnIce_SpawnFlyingVec3s(globalCtx, thisx, &this->bodyPartsPos[iceIndex], 150, 150, 150, 250, 235,
|
||||
245, 255, 1.5f);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct EnGeldB {
|
|||
/* 0x0188 */ SkelAnime skelAnime;
|
||||
/* 0x01CC */ Vec3s jointTable[24];
|
||||
/* 0x025C */ Vec3s morphTable[24];
|
||||
/* 0x02EC */ s32 actionState;
|
||||
/* 0x02EC */ s32 action;
|
||||
/* 0x02F0 */ char unk_2F0[4];
|
||||
/* 0x02F4 */ EnGeldBActionFunc actionFunc;
|
||||
/* 0x02F8 */ s16 unkTimer;
|
||||
|
@ -31,7 +31,7 @@ typedef struct EnGeldB {
|
|||
/* 0x0316 */ char unk_316[2];
|
||||
/* 0x0318 */ s16 invisible;
|
||||
/* 0x031A */ u8 blinkState;
|
||||
/* 0x031C */ s32 blureIdx;
|
||||
/* 0x031C */ s32 blureIndex;
|
||||
/* 0x0320 */ ColliderCylinder bodyCollider;
|
||||
/* 0x036C */ ColliderQuad swordCollider;
|
||||
/* 0x03EC */ ColliderTris blockCollider;
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_en_torch2.h"
|
||||
#include "objects/object_torch2/object_torch2.h"
|
||||
|
||||
#define FLAGS 0x00000035
|
||||
|
||||
|
@ -53,8 +54,6 @@ void EnTorch2_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void EnTorch2_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnTorch2_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
extern FlexSkeletonHeader D_06004764;
|
||||
|
||||
const ActorInit En_Torch2_InitVars = {
|
||||
ACTOR_EN_TORCH2,
|
||||
ACTORCAT_BOSS,
|
||||
|
@ -132,7 +131,7 @@ void EnTorch2_Init(Actor* thisx, GlobalContext* globalCtx2) {
|
|||
this->currentShield = PLAYER_SHIELD_HYLIAN;
|
||||
this->heldItemActionParam = this->heldItemId = PLAYER_AP_SWORD_MASTER;
|
||||
Player_SetModelGroup(this, 2);
|
||||
globalCtx->playerInit(this, globalCtx, &D_06004764);
|
||||
globalCtx->playerInit(this, globalCtx, &gDarkLinkSkel);
|
||||
this->actor.naviEnemyId = 0x26;
|
||||
this->cylinder.base.acFlags = AC_ON | AC_TYPE_PLAYER;
|
||||
this->swordQuads[0].base.atFlags = this->swordQuads[1].base.atFlags = AT_ON | AT_TYPE_ENEMY;
|
||||
|
|
Loading…
Reference in a new issue