mirror of
https://github.com/zeldaret/mm.git
synced 2025-02-22 06:20:44 +00:00
ovl_En_Zod OK with some Docs (#1115)
* func_80BAF1EC matching * progress * Draw * progress * Co-authored-by: darkeye darkeye@users.noreply.github.com * progress * Co-authored-by: petrie911 petrie911@users.noreply.github.com * header fix * data imported OK, textures extracted * reloc ok * cleanup * fogNear * cleanup * animations * textIds * some docs * Co-authored-by: EllipticEllipsis <EllipticEllipsis@users.noreply.github.com> * EnZodAnimations * more docs * docs * default * pr review * singular * pr review * Actor_Kill * revert text comments * 0xFFFF * pr review * pr review * enum in order * ForeArm <-> Arm * . * . * default in switch
This commit is contained in:
parent
9c37452bf7
commit
c52414ff79
@ -1,50 +1,72 @@
|
||||
<Root>
|
||||
<!-- Assets for Tijo, the drummer of The Indigo-Go's. -->
|
||||
<File Name="object_zod" Segment="6">
|
||||
<Animation Name="object_zod_Anim_0002E8" Offset="0x2E8" />
|
||||
<Animation Name="object_zod_Anim_000894" Offset="0x894" />
|
||||
<Animation Name="object_zod_Anim_000A9C" Offset="0xA9C" />
|
||||
<Animation Name="object_zod_Anim_000D94" Offset="0xD94" />
|
||||
<DList Name="object_zod_DL_0039A0" Offset="0x39A0" />
|
||||
<DList Name="object_zod_DL_003DA0" Offset="0x3DA0" />
|
||||
<DList Name="object_zod_DL_004018" Offset="0x4018" />
|
||||
<DList Name="object_zod_DL_004130" Offset="0x4130" />
|
||||
<DList Name="object_zod_DL_004258" Offset="0x4258" />
|
||||
<DList Name="object_zod_DL_0043E8" Offset="0x43E8" />
|
||||
<DList Name="object_zod_DL_004500" Offset="0x4500" />
|
||||
<DList Name="object_zod_DL_004628" Offset="0x4628" />
|
||||
<DList Name="object_zod_DL_0047B8" Offset="0x47B8" />
|
||||
<Texture Name="object_zod_Tex_004B50" OutName="tex_004B50" Format="rgba16" Width="8" Height="8" Offset="0x4B50" />
|
||||
<Texture Name="object_zod_Tex_004BD0" OutName="tex_004BD0" Format="rgba16" Width="32" Height="32" Offset="0x4BD0" />
|
||||
<Texture Name="object_zod_Tex_0053D0" OutName="tex_0053D0" Format="rgba16" Width="16" Height="16" Offset="0x53D0" />
|
||||
<Texture Name="object_zod_Tex_0055D0" OutName="tex_0055D0" Format="rgba16" Width="8" Height="8" Offset="0x55D0" />
|
||||
<Texture Name="object_zod_Tex_005650" OutName="tex_005650" Format="rgba16" Width="32" Height="32" Offset="0x5650" />
|
||||
<!-- <Blob Name="object_zod_Blob_005E50" Size="0x2800" Offset="0x5E50" /> -->
|
||||
<DList Name="object_zod_DL_00A460" Offset="0xA460" />
|
||||
<DList Name="object_zod_DL_00A550" Offset="0xA550" />
|
||||
<DList Name="object_zod_DL_00A5E0" Offset="0xA5E0" />
|
||||
<DList Name="object_zod_DL_00A670" Offset="0xA670" />
|
||||
<DList Name="object_zod_DL_00A700" Offset="0xA700" />
|
||||
<DList Name="object_zod_DL_00A8F8" Offset="0xA8F8" />
|
||||
<DList Name="object_zod_DL_00AAF0" Offset="0xAAF0" />
|
||||
<DList Name="object_zod_DL_00ACE8" Offset="0xACE8" />
|
||||
<DList Name="object_zod_DL_00AEE0" Offset="0xAEE0" />
|
||||
<DList Name="object_zod_DL_00B0D8" Offset="0xB0D8" />
|
||||
<Texture Name="object_zod_Tex_00B348" OutName="tex_00B348" Format="rgba16" Width="32" Height="32" Offset="0xB348" />
|
||||
<Texture Name="object_zod_Tex_00BB48" OutName="tex_00BB48" Format="rgba16" Width="32" Height="32" Offset="0xBB48" />
|
||||
<Texture Name="object_zod_Tex_00C348" OutName="tex_00C348" Format="rgba16" Width="8" Height="8" Offset="0xC348" />
|
||||
<Texture Name="object_zod_Tex_00C3C8" OutName="tex_00C3C8" Format="rgba16" Width="32" Height="32" Offset="0xC3C8" />
|
||||
<Texture Name="object_zod_Tex_00CBC8" OutName="tex_00CBC8" Format="rgba16" Width="16" Height="16" Offset="0xCBC8" />
|
||||
<Texture Name="object_zod_Tex_00CDC8" OutName="tex_00CDC8" Format="rgba16" Width="32" Height="32" Offset="0xCDC8" />
|
||||
<Limb Name="object_zod_Standardlimb_00D5C8" Type="Standard" EnumName="OBJECT_ZOD_LIMB_01" Offset="0xD5C8" />
|
||||
<Limb Name="object_zod_Standardlimb_00D5D4" Type="Standard" EnumName="OBJECT_ZOD_LIMB_02" Offset="0xD5D4" />
|
||||
<Limb Name="object_zod_Standardlimb_00D5E0" Type="Standard" EnumName="OBJECT_ZOD_LIMB_03" Offset="0xD5E0" />
|
||||
<Limb Name="object_zod_Standardlimb_00D5EC" Type="Standard" EnumName="OBJECT_ZOD_LIMB_04" Offset="0xD5EC" />
|
||||
<Limb Name="object_zod_Standardlimb_00D5F8" Type="Standard" EnumName="OBJECT_ZOD_LIMB_05" Offset="0xD5F8" />
|
||||
<Limb Name="object_zod_Standardlimb_00D604" Type="Standard" EnumName="OBJECT_ZOD_LIMB_06" Offset="0xD604" />
|
||||
<Limb Name="object_zod_Standardlimb_00D610" Type="Standard" EnumName="OBJECT_ZOD_LIMB_07" Offset="0xD610" />
|
||||
<Limb Name="object_zod_Standardlimb_00D61C" Type="Standard" EnumName="OBJECT_ZOD_LIMB_08" Offset="0xD61C" />
|
||||
<Limb Name="object_zod_Standardlimb_00D628" Type="Standard" EnumName="OBJECT_ZOD_LIMB_09" Offset="0xD628" />
|
||||
<Skeleton Name="object_zod_Skel_00D658" Type="Flex" LimbType="Standard" LimbNone="OBJECT_ZOD_LIMB_NONE" LimbMax="OBJECT_ZOD_LIMB_MAX" EnumName="ObjectZodLimb" Offset="0xD658" />
|
||||
<Animation Name="object_zod_Anim_00D9B0" Offset="0xD9B0" />
|
||||
<!-- Tijo Animations -->
|
||||
<Animation Name="gTijoPlayingVivaceAnim" Offset="0x2E8" />
|
||||
<Animation Name="gTijoReadyToPlayAnim" Offset="0x894" />
|
||||
<Animation Name="gTijoArmsFoldedAnim" Offset="0xA9C" />
|
||||
<Animation Name="gTijoPlayingLentoAnim" Offset="0xD94" />
|
||||
|
||||
<!-- Tijo DisplayLists -->
|
||||
<DList Name="gTijoLowerBodyChairDL" Offset="0x39A0" />
|
||||
<DList Name="gTijoUpperBodyDL" Offset="0x3DA0" />
|
||||
<DList Name="gTijoRightArmDL" Offset="0x4018" />
|
||||
<DList Name="gTijoRightForearmDL" Offset="0x4130" />
|
||||
<DList Name="gTijoRightHandDL" Offset="0x4258" />
|
||||
<DList Name="gTijoLeftArmDL" Offset="0x43E8" />
|
||||
<DList Name="gTijoLeftForearmDL" Offset="0x4500" />
|
||||
<DList Name="gTijoLeftHandDL" Offset="0x4628" />
|
||||
<DList Name="gTijoHeadDL" Offset="0x47B8" />
|
||||
|
||||
<!-- Tijo Textures /> -->
|
||||
<Texture Name="gTijoSkinTex" OutName="tijo_skin" Format="rgba16" Width="8" Height="8" Offset="0x4B50" />
|
||||
<Texture Name="gTijoChairTex" OutName="tijo_chair" Format="rgba16" Width="32" Height="32" Offset="0x4BD0" />
|
||||
<Texture Name="gTijoHandTex" OutName="tijo_hand" Format="rgba16" Width="16" Height="16" Offset="0x53D0" />
|
||||
<Texture Name="gTijoNoseTex" OutName="tijo_nose" Format="rgba16" Width="8" Height="8" Offset="0x55D0" />
|
||||
<Texture Name="gTijoSkinSpotsTex" OutName="tijo_skin_spots" Format="rgba16" Width="32" Height="32" Offset="0x5650" />
|
||||
<Texture Name="gTijoEyesOpen" OutName="tijo_eyes_open" Format="rgba16" Width="32" Height="32" Offset="0x5E50" />
|
||||
<Texture Name="gTijoEyesHalfOpen" OutName="tijo_eyes_half_open" Format="rgba16" Width="32" Height="32" Offset="0x6650" />
|
||||
<Texture Name="gTijoEyesClosed" OutName="tijo_eyes_closed" Format="rgba16" Width="32" Height="32" Offset="0x6E50" />
|
||||
<Texture Name="gTijoMouthClosedTex" OutName="tijo_mouth_closed" Format="rgba16" Width="32" Height="32" Offset="0x7650" />
|
||||
<Texture Name="gTijoMouthOpenTex" OutName="tijo_mouth_open" Format="rgba16" Width="32" Height="32" Offset="0x7E50" />
|
||||
|
||||
<!-- <Blob Name="object_zod_Blob_008650" Size="0x1E10" Offset="0x8650" /> -->
|
||||
|
||||
<!-- Tijo Drums DisplayLists /> -->
|
||||
<DList Name="gTijoDrumFrameDL" Offset="0xA460" />
|
||||
<DList Name="gTijoRideCymbalDL" Offset="0xA550" />
|
||||
<DList Name="gTijoCrashCymbalDL" Offset="0xA5E0" />
|
||||
<DList Name="gTijoHiHatDL" Offset="0xA670" />
|
||||
<DList Name="gTijoDrum1DL" Offset="0xA700" />
|
||||
<DList Name="gTijoDrum2DL" Offset="0xA8F8" />
|
||||
<DList Name="gTijoDrum3DL" Offset="0xAAF0" />
|
||||
<DList Name="gTijoDrum4DL" Offset="0xACE8" />
|
||||
<DList Name="gTijoDrum5DL" Offset="0xAEE0" />
|
||||
<DList Name="gTijoBassDrumDL" Offset="0xB0D8" />
|
||||
|
||||
<!-- Tijo Drums Textures -->
|
||||
<Texture Name="gTijoDrumFrameTex" OutName="tijo_drum_stands" Format="rgba16" Width="32" Height="32" Offset="0xB348" />
|
||||
<Texture Name="gTijoCymbalHiHatTex" OutName="tijo_cymbal_hihat" Format="rgba16" Width="32" Height="32" Offset="0xBB48" />
|
||||
<Texture Name="gTijoDrumsSkinTex" OutName="tijo_drums_skin" Format="rgba16" Width="8" Height="8" Offset="0xC348" />
|
||||
<Texture Name="gTijoDrumsEyesTex" OutName="tijo_eyes" Format="rgba16" Width="32" Height="32" Offset="0xC3C8" />
|
||||
<Texture Name="gTijoDrumsMouthTex" OutName="tijo_drums_mouth" Format="rgba16" Width="16" Height="16" Offset="0xCBC8" />
|
||||
<Texture Name="gTijoDrumsHairTex" OutName="tijo_drums_hair" Format="rgba16" Width="32" Height="32" Offset="0xCDC8" />
|
||||
|
||||
<!-- Tijo Limbs -->
|
||||
<Limb Name="gTijoLowerBodyChairLimb" Type="Standard" EnumName="TIJO_LIMB_BODY_CHAIR" Offset="0xD5C8" />
|
||||
<Limb Name="gTijoUpperBodyLimb" Type="Standard" EnumName="TIJO_LIMB_UPPER_BODY" Offset="0xD5D4" />
|
||||
<Limb Name="gTijoHeadLimb" Type="Standard" EnumName="TIJO_LIMB_HEAD" Offset="0xD5E0" />
|
||||
<Limb Name="gTijoLeftArmLimb" Type="Standard" EnumName="TIJO_LIMB_LEFT_ARM" Offset="0xD5EC" />
|
||||
<Limb Name="gTijoLeftForearmLimb" Type="Standard" EnumName="TIJO_LIMB_LEFT_FOREARM" Offset="0xD5F8" />
|
||||
<Limb Name="gTijoLeftHandLimb" Type="Standard" EnumName="TIJO_LIMB_LEFT_HAND" Offset="0xD604" />
|
||||
<Limb Name="gTijoRightArmLimb" Type="Standard" EnumName="TIJO_LIMB_RIGHT_ARM" Offset="0xD610" />
|
||||
<Limb Name="gTijoRightForearmLimb" Type="Standard" EnumName="TIJO_LIMB_RIGHT_FOREARM" Offset="0xD61C" />
|
||||
<Limb Name="gTijoRightHandLimb" Type="Standard" EnumName="TIJO_LIMB_RIGHT_HAND" Offset="0xD628" />
|
||||
|
||||
<!-- Tijo Skeleton -->
|
||||
<Skeleton Name="gTijoSkel" Type="Flex" LimbType="Standard" LimbNone="TIJO_LIMB_NONE" LimbMax="TIJO_LIMB_MAX" EnumName="TijoLimb" Offset="0xD658" />
|
||||
|
||||
<!-- Tijo Andantino Animation -->
|
||||
<Animation Name="gTijoPlayingAndantinoAnim" Offset="0xD9B0" />
|
||||
</File>
|
||||
</Root>
|
||||
|
3
spec
3
spec
@ -4210,8 +4210,7 @@ beginseg
|
||||
name "ovl_En_Zod"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Zod/z_en_zod.o"
|
||||
include "build/data/ovl_En_Zod/ovl_En_Zod.data.o"
|
||||
include "build/data/ovl_En_Zod/ovl_En_Zod.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Zod/ovl_En_Zod_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
@ -15,8 +15,37 @@ void EnZod_Destroy(Actor* thisx, PlayState* play);
|
||||
void EnZod_Update(Actor* thisx, PlayState* play);
|
||||
void EnZod_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
#if 0
|
||||
ActorInit En_Zod_InitVars = {
|
||||
void EnZod_ChangeAnim(EnZod* this, s16 nextAnimIndex, u8 mode);
|
||||
void EnZod_PlayDrumsSequence(EnZod* this, PlayState* play);
|
||||
void func_80BAFB84(EnZod* this, PlayState* play);
|
||||
void func_80BAFDB4(EnZod* this, PlayState* play);
|
||||
void func_80BAFF14(EnZod* this, PlayState* play);
|
||||
|
||||
#define TIJO_STATE_1 (1 << 0)
|
||||
#define TIJO_STATE_2 (1 << 1)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ENZOD_ANIM_PLAYING_VIVACE,
|
||||
/* 1 */ ENZOD_ANIM_READY_TO_PLAY,
|
||||
/* 2 */ ENZOD_ANIM_ARMS_FOLDED,
|
||||
/* 3 */ ENZOD_ANIM_PLAYING_LENTO,
|
||||
/* 4 */ ENZOD_ANIM_PLAYING_ANDANTINO,
|
||||
/* 5 */ ENZOD_ANIM_MAX,
|
||||
} EnZodAnimation;
|
||||
|
||||
typedef enum {
|
||||
/* 1 */ ENZOD_INSTRUMENT_CYMBAL_1 = 1,
|
||||
/* 2 */ ENZOD_INSTRUMENT_CYMBAL_2,
|
||||
/* 3 */ ENZOD_INSTRUMENT_CYMBAL_3,
|
||||
/* 4 */ ENZOD_INSTRUMENT_DRUM_1,
|
||||
/* 5 */ ENZOD_INSTRUMENT_DRUM_2,
|
||||
/* 6 */ ENZOD_INSTRUMENT_DRUM_3,
|
||||
/* 7 */ ENZOD_INSTRUMENT_DRUM_4,
|
||||
/* 8 */ ENZOD_INSTRUMENT_DRUM_5,
|
||||
/* 9 */ ENZOD_INSTRUMENT_BASS_DRUM,
|
||||
} EnZodInstrument;
|
||||
|
||||
const ActorInit En_Zod_InitVars = {
|
||||
ACTOR_EN_ZOD,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
@ -28,62 +57,596 @@ ActorInit En_Zod_InitVars = {
|
||||
(ActorFunc)EnZod_Draw,
|
||||
};
|
||||
|
||||
// static ColliderCylinderInit sCylinderInit = {
|
||||
static ColliderCylinderInit D_80BB0540 = {
|
||||
{ COLTYPE_NONE, AT_NONE, AC_ON | AC_TYPE_ENEMY, OC1_ON | OC1_TYPE_ALL, OC2_TYPE_1, COLSHAPE_CYLINDER, },
|
||||
{ ELEMTYPE_UNK0, { 0x00000000, 0x00, 0x00 }, { 0xF7CFFFFF, 0x00, 0x00 }, TOUCH_NONE | TOUCH_SFX_NORMAL, BUMP_ON, OCELEM_ON, },
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_NONE,
|
||||
AC_ON | AC_TYPE_ENEMY,
|
||||
OC1_ON | OC1_TYPE_ALL,
|
||||
OC2_TYPE_1,
|
||||
COLSHAPE_CYLINDER,
|
||||
},
|
||||
{
|
||||
ELEMTYPE_UNK0,
|
||||
{ 0x00000000, 0x00, 0x00 },
|
||||
{ 0xF7CFFFFF, 0x00, 0x00 },
|
||||
TOUCH_NONE | TOUCH_SFX_NORMAL,
|
||||
BUMP_ON,
|
||||
OCELEM_ON,
|
||||
},
|
||||
{ 60, 40, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
#endif
|
||||
static AnimationHeader* sAnimations[] = {
|
||||
&gTijoPlayingVivaceAnim, &gTijoReadyToPlayAnim, &gTijoArmsFoldedAnim,
|
||||
&gTijoPlayingLentoAnim, &gTijoPlayingAndantinoAnim,
|
||||
};
|
||||
|
||||
extern ColliderCylinderInit D_80BB0540;
|
||||
static Vec3f D_80BB0580 = { 1300.0f, 1100.0f, 0.0f };
|
||||
|
||||
extern UNK_TYPE D_06000D94;
|
||||
extern UNK_TYPE D_06007650;
|
||||
void EnZod_Init(Actor* thisx, PlayState* play) {
|
||||
s32 i;
|
||||
EnZod* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/EnZod_Init.s")
|
||||
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 60.0f);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gTijoSkel, &gTijoPlayingLentoAnim, this->morphTable, this->jointTable,
|
||||
TIJO_LIMB_MAX);
|
||||
Animation_PlayLoop(&this->skelAnime, &gTijoPlayingLentoAnim);
|
||||
Collider_InitAndSetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/EnZod_Destroy.s")
|
||||
this->cymbalRots[0] = this->cymbalRots[1] = this->cymbalRots[2] = 0;
|
||||
this->actor.gravity = this->actor.terminalVelocity = -4.0f;
|
||||
this->cymbalRotVels[0] = this->cymbalRotVels[1] = this->cymbalRotVels[2] = 300;
|
||||
this->stateFlags = 0;
|
||||
this->nextAnimIndex = -1;
|
||||
this->curAnimIndex = -1;
|
||||
this->actor.textId = 0;
|
||||
this->unk_298 = 0;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAF1EC.s")
|
||||
for (i = 0; i < ARRAY_COUNT(this->drumScales); i++) {
|
||||
this->drumScales[i] = 0.0f;
|
||||
this->drumScaleVels[i] = 0.01;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAF2B4.s")
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_LENTO, ANIMMODE_ONCE);
|
||||
this->actionFunc = EnZod_PlayDrumsSequence;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAF338.s")
|
||||
switch (ENZOD_GET_TYPE(thisx)) {
|
||||
case ENZOD_TYPE_1:
|
||||
if (gSaveContext.save.weekEventReg[78] & 1) {
|
||||
this->actionFunc = func_80BAFDB4;
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_VIVACE, ANIMMODE_ONCE);
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAF3E0.s")
|
||||
this->actionFunc = func_80BAFB84;
|
||||
if (!(gSaveContext.save.weekEventReg[55] & 0x80)) {
|
||||
Actor_Kill(&this->actor);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAF4D8.s")
|
||||
case ENZOD_TYPE_2:
|
||||
this->actionFunc = func_80BAFF14;
|
||||
this->fogNear = -1;
|
||||
this->stateFlags |= TIJO_STATE_2;
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAF7CC.s")
|
||||
default:
|
||||
if (gSaveContext.save.weekEventReg[55] & 0x80) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
this->actor.flags |= ACTOR_FLAG_10;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAF99C.s")
|
||||
void EnZod_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnZod* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFA44.s")
|
||||
Collider_DestroyCylinder(play, &this->collider);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFADC.s")
|
||||
void EnZod_HandleRoomConversation(EnZod* this, PlayState* play) {
|
||||
u16 textId;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFB84.s")
|
||||
if (gSaveContext.save.playerForm != PLAYER_FORM_ZORA) {
|
||||
textId = 0x1227;
|
||||
if (gSaveContext.save.weekEventReg[32] & 8) {
|
||||
textId = 0x1229;
|
||||
} else {
|
||||
gSaveContext.save.weekEventReg[32] |= 8;
|
||||
}
|
||||
} else if (this->stateFlags & TIJO_STATE_1) {
|
||||
textId = 0x1225;
|
||||
} else {
|
||||
textId = 0x1219;
|
||||
if (gSaveContext.save.weekEventReg[32] & 0x10) {
|
||||
textId = 0x1226;
|
||||
} else {
|
||||
gSaveContext.save.weekEventReg[32] |= 0x10;
|
||||
}
|
||||
this->stateFlags |= TIJO_STATE_1;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFC00.s")
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_VIVACE, ANIMMODE_ONCE);
|
||||
Message_StartTextbox(play, textId, &this->actor);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFC10.s")
|
||||
s32 EnZod_PlayerIsFacingTijo(EnZod* this, PlayState* play) {
|
||||
if ((this->actor.playerHeightRel < 30.0f) && (this->actor.xzDistToPlayer < 200.0f) &&
|
||||
Player_IsFacingActor(&this->actor, 0x3000, play) && Actor_IsFacingPlayer(&this->actor, 0x3000)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFD00.s")
|
||||
void EnZod_ChangeAnim(EnZod* this, s16 nextAnimIndex, u8 mode) {
|
||||
if ((nextAnimIndex < ENZOD_ANIM_PLAYING_VIVACE) || (nextAnimIndex >= ENZOD_ANIM_MAX)) {
|
||||
nextAnimIndex = ENZOD_ANIM_PLAYING_LENTO;
|
||||
}
|
||||
Animation_Change(&this->skelAnime, sAnimations[nextAnimIndex], 1.0f, 0.0f,
|
||||
Animation_GetLastFrame(sAnimations[nextAnimIndex]), mode, -5.0f);
|
||||
this->curAnimIndex = nextAnimIndex;
|
||||
this->nextAnimIndex = nextAnimIndex;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFDB4.s")
|
||||
void EnZod_UpdateAnimation(EnZod* this) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->nextAnimIndex == this->curAnimIndex) {
|
||||
EnZod_ChangeAnim(this, this->curAnimIndex, ANIMMODE_ONCE);
|
||||
switch (this->curAnimIndex) {
|
||||
case ENZOD_ANIM_PLAYING_LENTO:
|
||||
if (Rand_ZeroFloat(1.0f) < 0.2f) {
|
||||
this->nextAnimIndex = ENZOD_ANIM_PLAYING_ANDANTINO;
|
||||
}
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFE34.s")
|
||||
case ENZOD_ANIM_PLAYING_ANDANTINO:
|
||||
if (Rand_ZeroFloat(1.0f) < 0.8f) {
|
||||
this->nextAnimIndex = ENZOD_ANIM_PLAYING_LENTO;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BAFF14.s")
|
||||
} else {
|
||||
EnZod_ChangeAnim(this, this->nextAnimIndex, ANIMMODE_ONCE);
|
||||
}
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/EnZod_Update.s")
|
||||
void EnZod_UpdateInstruments(EnZod* this) {
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BB0128.s")
|
||||
for (i = 0; i < ARRAY_COUNT(this->cymbalRots); i++) {
|
||||
this->cymbalRots[i] += this->cymbalRotVels[i];
|
||||
this->cymbalRotVels[i] -= (s16)(this->cymbalRots[i] * 0.1f);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BB0170.s")
|
||||
if (ABS_ALT(this->cymbalRotVels[i]) > 100) {
|
||||
this->cymbalRotVels[i] *= 0.9f;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/func_80BB01B0.s")
|
||||
switch (i) {
|
||||
case 0:
|
||||
if ((this->curAnimIndex == ENZOD_ANIM_PLAYING_ANDANTINO) && ((s32)this->skelAnime.curFrame == 7)) {
|
||||
this->cymbalRotVels[i] = -1000;
|
||||
}
|
||||
break;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Zod/EnZod_Draw.s")
|
||||
case 1:
|
||||
if ((this->curAnimIndex == ENZOD_ANIM_PLAYING_ANDANTINO) && ((s32)this->skelAnime.curFrame == 19)) {
|
||||
this->cymbalRotVels[i] = -1000;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(this->drumScales); i++) {
|
||||
this->drumScales[i] += this->drumScaleVels[i];
|
||||
this->drumScaleVels[i] -= (this->drumScales[i] * 0.8f);
|
||||
|
||||
if (fabsf(this->drumScaleVels[i]) > 0.01f) {
|
||||
this->drumScaleVels[i] *= 0.5f;
|
||||
}
|
||||
|
||||
switch (i) {
|
||||
case 0:
|
||||
if (((this->curAnimIndex == ENZOD_ANIM_PLAYING_LENTO) ||
|
||||
(this->curAnimIndex == ENZOD_ANIM_PLAYING_ANDANTINO)) &&
|
||||
((s32)this->skelAnime.curFrame == 1)) {
|
||||
this->drumScaleVels[i] = 0.1f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 2:
|
||||
if (((this->curAnimIndex == ENZOD_ANIM_PLAYING_LENTO) && ((s32)this->skelAnime.curFrame == 19)) ||
|
||||
((this->curAnimIndex == ENZOD_ANIM_PLAYING_ANDANTINO) && ((s32)this->skelAnime.curFrame == 8))) {
|
||||
this->drumScaleVels[i] = 0.1f;
|
||||
}
|
||||
break;
|
||||
|
||||
case 3:
|
||||
switch (this->curAnimIndex) {
|
||||
case 3:
|
||||
switch ((s32)this->skelAnime.curFrame) {
|
||||
case 1:
|
||||
case 7:
|
||||
case 12:
|
||||
case 19:
|
||||
this->drumScaleVels[i] = 0.03f;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ((s32)this->skelAnime.curFrame == 1) {
|
||||
this->drumScaleVels[i] = 0.1f;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ((this->curAnimIndex == ENZOD_ANIM_PLAYING_ANDANTINO) && ((s32)this->skelAnime.curFrame == 19)) {
|
||||
this->drumScaleVels[i] = 0.15f;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BAF7CC(EnZod* this, PlayState* play) {
|
||||
EnZod_UpdateAnimation(this);
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(play) && (play->msgCtx.currentTextId == 0x121F)) {
|
||||
switch (play->msgCtx.choiceIndex) {
|
||||
case 0:
|
||||
func_8019F208();
|
||||
func_80151938(play, 0x1220);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
func_8019F230();
|
||||
func_80151938(play, 0x1223);
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case TEXT_STATE_5:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
switch (play->msgCtx.currentTextId) {
|
||||
case 0x121A:
|
||||
case 0x121B:
|
||||
case 0x121C:
|
||||
case 0x1220:
|
||||
case 0x1221:
|
||||
case 0x1227:
|
||||
func_80151938(play, play->msgCtx.currentTextId + 1);
|
||||
break;
|
||||
|
||||
case 0x1219:
|
||||
func_80151938(play, play->msgCtx.currentTextId + 1);
|
||||
this->nextAnimIndex = ENZOD_ANIM_ARMS_FOLDED;
|
||||
break;
|
||||
|
||||
case 0x121D:
|
||||
func_80151938(play, play->msgCtx.currentTextId + 1);
|
||||
this->nextAnimIndex = ENZOD_ANIM_READY_TO_PLAY;
|
||||
break;
|
||||
|
||||
case 0x1223:
|
||||
func_80151938(play, play->msgCtx.currentTextId + 1);
|
||||
this->nextAnimIndex = ENZOD_ANIM_PLAYING_VIVACE;
|
||||
break;
|
||||
|
||||
case 0x121E:
|
||||
case 0x1226:
|
||||
func_80151938(play, 0x121F);
|
||||
this->nextAnimIndex = ENZOD_ANIM_READY_TO_PLAY;
|
||||
break;
|
||||
|
||||
default:
|
||||
func_801477B4(play);
|
||||
this->actionFunc = EnZod_PlayDrumsSequence;
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_LENTO, ANIMMODE_ONCE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnZod_PlayDrumsSequence(EnZod* this, PlayState* play) {
|
||||
s32 pad;
|
||||
Vec3f seqPos;
|
||||
|
||||
EnZod_UpdateAnimation(this);
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
EnZod_HandleRoomConversation(this, play);
|
||||
this->actionFunc = func_80BAF7CC;
|
||||
} else if (EnZod_PlayerIsFacingTijo(this, play)) {
|
||||
func_800B8614(&this->actor, play, 210.0f);
|
||||
}
|
||||
|
||||
seqPos.x = this->actor.projectedPos.x;
|
||||
seqPos.y = this->actor.projectedPos.y;
|
||||
seqPos.z = this->actor.projectedPos.z;
|
||||
|
||||
func_801A1FB4(3, &seqPos, NA_BGM_DRUMS_PLAY, 700.0f);
|
||||
}
|
||||
|
||||
void func_80BAFA44(EnZod* this, PlayState* play) {
|
||||
u16 textId;
|
||||
|
||||
if (gSaveContext.save.playerForm == PLAYER_FORM_ZORA) {
|
||||
if (gSaveContext.save.weekEventReg[79] & 1) {
|
||||
textId = 0x1253;
|
||||
} else {
|
||||
textId = 0x1251;
|
||||
if (gSaveContext.save.weekEventReg[78] & 0x20) {
|
||||
textId = 0x1252;
|
||||
} else {
|
||||
gSaveContext.save.weekEventReg[78] |= 0x20;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
textId = 0x1250;
|
||||
}
|
||||
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_VIVACE, ANIMMODE_ONCE);
|
||||
Message_StartTextbox(play, textId, &this->actor);
|
||||
}
|
||||
|
||||
void func_80BAFADC(EnZod* this, PlayState* play) {
|
||||
u8 talkState;
|
||||
|
||||
EnZod_UpdateAnimation(this);
|
||||
talkState = Message_GetState(&play->msgCtx);
|
||||
if (talkState != TEXT_STATE_CLOSING) {
|
||||
if ((talkState == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
func_801477B4(play);
|
||||
this->actionFunc = func_80BAFB84;
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_LENTO, ANIMMODE_ONCE);
|
||||
}
|
||||
} else {
|
||||
this->actionFunc = func_80BAFB84;
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_LENTO, ANIMMODE_ONCE);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BAFB84(EnZod* this, PlayState* play) {
|
||||
EnZod_UpdateAnimation(this);
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
func_80BAFA44(this, play);
|
||||
this->actionFunc = func_80BAFADC;
|
||||
} else if (EnZod_PlayerIsFacingTijo(this, play)) {
|
||||
func_800B8614(&this->actor, play, 210.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void EnZod_DoNothing(EnZod* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnZod_Rehearse(EnZod* this, PlayState* play) {
|
||||
EnZod_UpdateAnimation(this);
|
||||
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
|
||||
ActorCutscene_Start(this->actor.cutscene, &this->actor);
|
||||
this->actor.cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
|
||||
if (this->actor.cutscene == -1) {
|
||||
this->actionFunc = EnZod_DoNothing;
|
||||
play->nextEntrance = play->setupExitList[ENZOD_GET_ENTRANCE_INDEX(&this->actor)];
|
||||
play->transitionType = TRANS_TYPE_05;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
gSaveContext.save.weekEventReg[78] &= (u8)~1;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
|
||||
}
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
|
||||
}
|
||||
}
|
||||
|
||||
void EnZod_SetupRehearse(EnZod* this, PlayState* play) {
|
||||
EnZod_UpdateAnimation(this);
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
func_801477B4(play);
|
||||
EnZod_ChangeAnim(this, ENZOD_ANIM_PLAYING_LENTO, ANIMMODE_ONCE);
|
||||
this->actionFunc = EnZod_Rehearse;
|
||||
ActorCutscene_Stop(this->actor.cutscene);
|
||||
this->actor.cutscene = ActorCutscene_GetAdditionalCutscene(this->actor.cutscene);
|
||||
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
|
||||
gSaveContext.save.weekEventReg[79] |= 1;
|
||||
Audio_QueueSeqCmd(NA_BGM_INDIGO_GO_SESSION | 0x8000);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BAFDB4(EnZod* this, PlayState* play) {
|
||||
EnZod_UpdateAnimation(this);
|
||||
if (ActorCutscene_GetCanPlayNext(this->actor.cutscene)) {
|
||||
ActorCutscene_Start(this->actor.cutscene, &this->actor);
|
||||
func_800B7298(play, NULL, 0x44);
|
||||
Message_StartTextbox(play, 0x103A, &this->actor);
|
||||
this->actionFunc = EnZod_SetupRehearse;
|
||||
} else {
|
||||
ActorCutscene_SetIntentToPlay(this->actor.cutscene);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BAFE34(EnZod* this, PlayState* play) {
|
||||
EnZod_UpdateAnimation(this);
|
||||
if (this->fogNear < 799) {
|
||||
this->fogNear += 200;
|
||||
} else {
|
||||
this->fogNear += 30;
|
||||
}
|
||||
|
||||
if (this->fogNear > 999) {
|
||||
this->fogNear = 999;
|
||||
}
|
||||
|
||||
if (Cutscene_CheckActorAction(play, 0x203)) {
|
||||
if (play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 0x203)]->action == 1) {
|
||||
this->actionFunc = func_80BAFF14;
|
||||
this->fogNear = -1;
|
||||
}
|
||||
} else {
|
||||
this->actionFunc = func_80BAFF14;
|
||||
this->fogNear = -1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80BAFF14(EnZod* this, PlayState* play) {
|
||||
EnZod_UpdateAnimation(this);
|
||||
if (Cutscene_CheckActorAction(play, 0x203) &&
|
||||
(play->csCtx.actorActions[Cutscene_GetActorActionIndex(play, 0x203)]->action == 4)) {
|
||||
this->actionFunc = func_80BAFE34;
|
||||
}
|
||||
}
|
||||
|
||||
void EnZod_Update(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnZod* this = THIS;
|
||||
Vec3s torsoRot;
|
||||
|
||||
Actor_MoveWithGravity(&this->actor);
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 10.0f, 4);
|
||||
this->actionFunc(this, play);
|
||||
EnZod_UpdateInstruments(this);
|
||||
|
||||
if (DECR(this->blinkTimer) == 0) {
|
||||
this->blinkTimer = Rand_S16Offset(60, 60);
|
||||
}
|
||||
|
||||
this->eyeIndex = this->blinkTimer;
|
||||
|
||||
if (this->eyeIndex >= 3) {
|
||||
this->eyeIndex = 0;
|
||||
}
|
||||
|
||||
torsoRot.z = 0;
|
||||
torsoRot.y = 0;
|
||||
torsoRot.x = 0;
|
||||
|
||||
if (EnZod_PlayerIsFacingTijo(this, play)) {
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &torsoRot, this->actor.focus.pos);
|
||||
if (this->headRot.x > 0xBB8) {
|
||||
this->headRot.x = 0xBB8;
|
||||
} else if (this->headRot.x < -0xBB8) {
|
||||
this->headRot.x = -0xBB8;
|
||||
}
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->headRot.x, 0, 6, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&this->headRot.y, 0, 6, 0x1838, 0x64);
|
||||
}
|
||||
}
|
||||
|
||||
s32 EnZod_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnZod* this = THIS;
|
||||
|
||||
if (limbIndex == TIJO_LIMB_HEAD) {
|
||||
rot->x += this->headRot.y;
|
||||
rot->z += this->headRot.x;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnZod_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
|
||||
if (limbIndex == TIJO_LIMB_HEAD) {
|
||||
Matrix_MultVec3f(&D_80BB0580, &thisx->focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
void EnZod_DrawDrums(EnZod* this, PlayState* play) {
|
||||
static Gfx* sTijoDrumsDLs[] = {
|
||||
gTijoDrumFrameDL, gTijoRideCymbalDL, gTijoCrashCymbalDL, gTijoHiHatDL, gTijoDrum1DL,
|
||||
gTijoDrum2DL, gTijoDrum3DL, gTijoDrum4DL, gTijoDrum5DL, gTijoBassDrumDL,
|
||||
};
|
||||
s32 i;
|
||||
f32 instrumentPosXs[] = { 0.0f, -2690.0f, 2310.0f, 3888.0f, -4160.0f, -2200.0f, -463.0f, 1397.0f, 3413.0f, 389.0f };
|
||||
f32 instrumentPosYs[] = { 0.0f, 6335.0f, 6703.0f, 5735.0f, 3098.0f, 3349.0f, 3748.0f, 3718.0f, 2980.0f, 1530.0f };
|
||||
f32 instrumentPosZs[] = { 0.0f, 4350.0f, 3200.0f, 1555.0f, 2874.0f, 3901.0f, 4722.0f, 4344.0f, 3200.0f, 3373.0f };
|
||||
f32 scale;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sTijoDrumsDLs); i++) {
|
||||
Matrix_Push();
|
||||
Matrix_Translate(instrumentPosXs[i], instrumentPosYs[i], instrumentPosZs[i], MTXMODE_APPLY);
|
||||
|
||||
switch (i) {
|
||||
case ENZOD_INSTRUMENT_CYMBAL_1:
|
||||
case ENZOD_INSTRUMENT_CYMBAL_2:
|
||||
case ENZOD_INSTRUMENT_CYMBAL_3:
|
||||
Matrix_RotateXS(this->cymbalRots[i - 1], MTXMODE_APPLY);
|
||||
break;
|
||||
|
||||
case ENZOD_INSTRUMENT_DRUM_1:
|
||||
case ENZOD_INSTRUMENT_DRUM_2:
|
||||
case ENZOD_INSTRUMENT_DRUM_3:
|
||||
case ENZOD_INSTRUMENT_DRUM_4:
|
||||
case ENZOD_INSTRUMENT_DRUM_5:
|
||||
case ENZOD_INSTRUMENT_BASS_DRUM:
|
||||
scale = this->drumScales[9 - i] + 1.0f;
|
||||
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, sTijoDrumsDLs[i]);
|
||||
Matrix_Pop();
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void EnZod_Draw(Actor* thisx, PlayState* play) {
|
||||
static TexturePtr sTijoEyesTextures[] = { &gTijoEyesOpen, &gTijoEyesHalfOpen, &gTijoEyesClosed };
|
||||
EnZod* this = THIS;
|
||||
Gfx* gfx;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
|
||||
if (this->stateFlags & TIJO_STATE_2) {
|
||||
POLY_OPA_DISP = Gfx_SetFog(POLY_OPA_DISP, 0, 0, 0, 0, this->fogNear, 1000);
|
||||
}
|
||||
|
||||
gfx = POLY_OPA_DISP;
|
||||
|
||||
gSPSegment(&gfx[0], 0x08, Lib_SegmentedToVirtual(sTijoEyesTextures[this->eyeIndex]));
|
||||
gSPSegment(&gfx[1], 0x09, Lib_SegmentedToVirtual(&gTijoMouthClosedTex));
|
||||
|
||||
POLY_OPA_DISP = &gfx[2];
|
||||
|
||||
EnZod_DrawDrums(this, play);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
|
||||
EnZod_OverrideLimbDraw, EnZod_PostLimbDraw, &this->actor);
|
||||
if (this->stateFlags & TIJO_STATE_2) {
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
@ -2,6 +2,10 @@
|
||||
#define Z_EN_ZOD_H
|
||||
|
||||
#include "global.h"
|
||||
#include "assets/objects/object_zod/object_zod.h"
|
||||
|
||||
#define ENZOD_GET_ENTRANCE_INDEX(thisx) (((thisx)->params & 0xFE00) >> 9)
|
||||
#define ENZOD_GET_TYPE(thisx) ((thisx)->params & 0xF)
|
||||
|
||||
struct EnZod;
|
||||
|
||||
@ -9,8 +13,29 @@ typedef void (*EnZodActionFunc)(struct EnZod*, PlayState*);
|
||||
|
||||
typedef struct EnZod {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x158];
|
||||
/* 0x144 */ Vec3s morphTable[TIJO_LIMB_MAX];
|
||||
/* 0x180 */ Vec3s jointTable[TIJO_LIMB_MAX];
|
||||
/* 0x1BC */ SkelAnime skelAnime;
|
||||
/* 0x200 */ ColliderCylinder collider;
|
||||
/* 0x24C */ s16 eyeIndex;
|
||||
/* 0x24E */ s16 blinkTimer;
|
||||
/* 0x250 */ Vec3s headRot;
|
||||
/* 0x256 */ u16 stateFlags;
|
||||
/* 0x258 */ s16 curAnimIndex;
|
||||
/* 0x25A */ s16 nextAnimIndex;
|
||||
/* 0x25C */ s16 cymbalRots[3];
|
||||
/* 0x262 */ s16 cymbalRotVels[3];
|
||||
/* 0x268 */ f32 drumScales[6];
|
||||
/* 0x280 */ f32 drumScaleVels[6];
|
||||
/* 0x298 */ s16 unk_298; // Set but not used.
|
||||
/* 0x29A */ s16 fogNear;
|
||||
/* 0x29C */ EnZodActionFunc actionFunc;
|
||||
} EnZod; // size = 0x2A0
|
||||
|
||||
typedef enum {
|
||||
/* 1 */ ENZOD_TYPE_1 = 1,
|
||||
/* 2 */ ENZOD_TYPE_2,
|
||||
/* 0xF */ ENZOD_TYPE_0xF = 0xF,
|
||||
} EnZodTypes;
|
||||
|
||||
#endif // Z_EN_ZOD_H
|
||||
|
@ -15251,26 +15251,26 @@
|
||||
0x80BAE538:("EnSuttari_Draw",),
|
||||
0x80BAEF70:("EnZod_Init",),
|
||||
0x80BAF1C0:("EnZod_Destroy",),
|
||||
0x80BAF1EC:("func_80BAF1EC",),
|
||||
0x80BAF2B4:("func_80BAF2B4",),
|
||||
0x80BAF338:("func_80BAF338",),
|
||||
0x80BAF3E0:("func_80BAF3E0",),
|
||||
0x80BAF4D8:("func_80BAF4D8",),
|
||||
0x80BAF1EC:("EnZod_HandleRoomConversation",),
|
||||
0x80BAF2B4:("EnZod_PlayerIsFacingTijo",),
|
||||
0x80BAF338:("EnZod_ChangeAnim",),
|
||||
0x80BAF3E0:("EnZod_UpdateAnimation",),
|
||||
0x80BAF4D8:("EnZod_UpdateInstruments",),
|
||||
0x80BAF7CC:("func_80BAF7CC",),
|
||||
0x80BAF99C:("func_80BAF99C",),
|
||||
0x80BAF99C:("EnZod_PlayDrumsSequence",),
|
||||
0x80BAFA44:("func_80BAFA44",),
|
||||
0x80BAFADC:("func_80BAFADC",),
|
||||
0x80BAFB84:("func_80BAFB84",),
|
||||
0x80BAFC00:("func_80BAFC00",),
|
||||
0x80BAFC10:("func_80BAFC10",),
|
||||
0x80BAFD00:("func_80BAFD00",),
|
||||
0x80BAFC00:("EnZod_DoNothing",),
|
||||
0x80BAFC10:("EnZod_Rehearse",),
|
||||
0x80BAFD00:("EnZod_SetupRehearse",),
|
||||
0x80BAFDB4:("func_80BAFDB4",),
|
||||
0x80BAFE34:("func_80BAFE34",),
|
||||
0x80BAFF14:("func_80BAFF14",),
|
||||
0x80BAFF84:("EnZod_Update",),
|
||||
0x80BB0128:("func_80BB0128",),
|
||||
0x80BB0170:("func_80BB0170",),
|
||||
0x80BB01B0:("func_80BB01B0",),
|
||||
0x80BB0128:("EnZod_OverrideLimbDraw",),
|
||||
0x80BB0170:("EnZod_PostLimbDraw",),
|
||||
0x80BB01B0:("EnZod_DrawDrums",),
|
||||
0x80BB03E8:("EnZod_Draw",),
|
||||
0x80BB08E0:("EnKujiya_Init",),
|
||||
0x80BB0998:("EnKujiya_Destroy",),
|
||||
|
Loading…
x
Reference in New Issue
Block a user