mirror of https://github.com/zeldaret/mm.git
ovl_En_Takaraya decompiled (#1409)
* EnTakaraya_Destroy * some matching * some matching * some matching * matched func_80ADF7CC * func_80ADEF74 wrong arg * data * clean up * improvements * actionFunc pointer * fake * improvements * improvements * naming for the bool * function naming * improvements * improvements * GET_PLAYER_FORM macro * macro
This commit is contained in:
parent
16bc54b63b
commit
a980067bd8
|
@ -1,62 +1,79 @@
|
|||
<Root>
|
||||
<File Name="object_bg" Segment="6">
|
||||
<!-- Animations -->
|
||||
<Animation Name="object_bg_Anim_000968" Offset="0x968" /> <!-- Original name is "bg_asking" -->
|
||||
<Animation Name="object_bg_Anim_000A00" Offset="0xA00" /> <!-- Original name is "bg_getup" -->
|
||||
<Animation Name="object_bg_Anim_001384" Offset="0x1384" /> <!-- Original name is "bg_kunekune" ("wiggling; waving; swaying; twisting and turning") -->
|
||||
<DList Name="object_bg_DL_003F50" Offset="0x3F50" />
|
||||
<DList Name="object_bg_DL_004558" Offset="0x4558" />
|
||||
<DList Name="object_bg_DL_004768" Offset="0x4768" />
|
||||
<DList Name="object_bg_DL_004A38" Offset="0x4A38" />
|
||||
<DList Name="object_bg_DL_004BC0" Offset="0x4BC0" />
|
||||
<DList Name="object_bg_DL_004EE0" Offset="0x4EE0" />
|
||||
<DList Name="object_bg_DL_0051B0" Offset="0x51B0" />
|
||||
<DList Name="object_bg_DL_005338" Offset="0x5338" />
|
||||
<DList Name="object_bg_DL_005658" Offset="0x5658" />
|
||||
<DList Name="object_bg_DL_005978" Offset="0x5978" />
|
||||
<DList Name="object_bg_DL_005B80" Offset="0x5B80" />
|
||||
<DList Name="object_bg_DL_005F20" Offset="0x5F20" />
|
||||
<DList Name="object_bg_DL_006090" Offset="0x6090" />
|
||||
<DList Name="object_bg_DL_006298" Offset="0x6298" />
|
||||
<DList Name="object_bg_DL_006638" Offset="0x6638" />
|
||||
<DList Name="object_bg_DL_0067A8" Offset="0x67A8" />
|
||||
<Texture Name="object_bg_TLUT_0068D8" OutName="tlut_0068D8" Format="rgba16" Width="16" Height="16" Offset="0x68D8" />
|
||||
<Texture Name="object_bg_Tex_006AD8" OutName="tex_006AD8" Format="ci8" Width="32" Height="32" Offset="0x6AD8" />
|
||||
<Texture Name="object_bg_Tex_006ED8" OutName="tex_006ED8" Format="ci8" Width="8" Height="16" Offset="0x6ED8" />
|
||||
<!-- <Blob Name="object_bg_Blob_006F58" Size="0x1400" Offset="0x6F58" /> -->
|
||||
<Texture Name="object_bg_Tex_008358" OutName="tex_008358" Format="ci8" Width="32" Height="32" Offset="0x8358" />
|
||||
<Texture Name="object_bg_Tex_008758" OutName="tex_008758" Format="ci8" Width="16" Height="16" Offset="0x8758" />
|
||||
<Texture Name="object_bg_Tex_008858" OutName="tex_008858" Format="ci8" Width="16" Height="16" Offset="0x8858" />
|
||||
<Texture Name="object_bg_Tex_008958" OutName="tex_008958" Format="ci8" Width="32" Height="32" Offset="0x8958" />
|
||||
<Texture Name="object_bg_Tex_008D58" OutName="tex_008D58" Format="ci8" Width="16" Height="16" Offset="0x8D58" />
|
||||
<Limb Name="object_bg_Standardlimb_008E58" Type="Standard" EnumName="OBJECT_BG_1_LIMB_01" Offset="0x8E58" />
|
||||
<Limb Name="object_bg_Standardlimb_008E64" Type="Standard" EnumName="OBJECT_BG_1_LIMB_02" Offset="0x8E64" />
|
||||
<Limb Name="object_bg_Standardlimb_008E70" Type="Standard" EnumName="OBJECT_BG_1_LIMB_03" Offset="0x8E70" />
|
||||
<Limb Name="object_bg_Standardlimb_008E7C" Type="Standard" EnumName="OBJECT_BG_1_LIMB_04" Offset="0x8E7C" />
|
||||
<Limb Name="object_bg_Standardlimb_008E88" Type="Standard" EnumName="OBJECT_BG_1_LIMB_05" Offset="0x8E88" />
|
||||
<Limb Name="object_bg_Standardlimb_008E94" Type="Standard" EnumName="OBJECT_BG_1_LIMB_06" Offset="0x8E94" />
|
||||
<Limb Name="object_bg_Standardlimb_008EA0" Type="Standard" EnumName="OBJECT_BG_1_LIMB_07" Offset="0x8EA0" />
|
||||
<Limb Name="object_bg_Standardlimb_008EAC" Type="Standard" EnumName="OBJECT_BG_1_LIMB_08" Offset="0x8EAC" />
|
||||
<Limb Name="object_bg_Standardlimb_008EB8" Type="Standard" EnumName="OBJECT_BG_1_LIMB_09" Offset="0x8EB8" />
|
||||
<Limb Name="object_bg_Standardlimb_008EC4" Type="Standard" EnumName="OBJECT_BG_1_LIMB_0A" Offset="0x8EC4" />
|
||||
<Limb Name="object_bg_Standardlimb_008ED0" Type="Standard" EnumName="OBJECT_BG_1_LIMB_0B" Offset="0x8ED0" />
|
||||
<Limb Name="object_bg_Standardlimb_008EDC" Type="Standard" EnumName="OBJECT_BG_1_LIMB_0C" Offset="0x8EDC" />
|
||||
<Limb Name="object_bg_Standardlimb_008EE8" Type="Standard" EnumName="OBJECT_BG_1_LIMB_0D" Offset="0x8EE8" />
|
||||
<Limb Name="object_bg_Standardlimb_008EF4" Type="Standard" EnumName="OBJECT_BG_1_LIMB_0E" Offset="0x8EF4" />
|
||||
<Limb Name="object_bg_Standardlimb_008F00" Type="Standard" EnumName="OBJECT_BG_1_LIMB_0F" Offset="0x8F00" />
|
||||
<Limb Name="object_bg_Standardlimb_008F0C" Type="Standard" EnumName="OBJECT_BG_1_LIMB_10" Offset="0x8F0C" />
|
||||
<Limb Name="object_bg_Standardlimb_008F18" Type="Standard" EnumName="OBJECT_BG_1_LIMB_11" Offset="0x8F18" />
|
||||
<Limb Name="object_bg_Standardlimb_008F24" Type="Standard" EnumName="OBJECT_BG_1_LIMB_12" Offset="0x8F24" />
|
||||
<Limb Name="object_bg_Standardlimb_008F30" Type="Standard" EnumName="OBJECT_BG_1_LIMB_13" Offset="0x8F30" />
|
||||
<Limb Name="object_bg_Standardlimb_008F3C" Type="Standard" EnumName="OBJECT_BG_1_LIMB_14" Offset="0x8F3C" />
|
||||
<Limb Name="object_bg_Standardlimb_008F48" Type="Standard" EnumName="OBJECT_BG_1_LIMB_15" Offset="0x8F48" />
|
||||
<Limb Name="object_bg_Standardlimb_008F54" Type="Standard" EnumName="OBJECT_BG_1_LIMB_16" Offset="0x8F54" />
|
||||
<Limb Name="object_bg_Standardlimb_008F60" Type="Standard" EnumName="OBJECT_BG_1_LIMB_17" Offset="0x8F60" />
|
||||
<Skeleton Name="object_bg_Skel_008FC8" Type="Flex" LimbType="Standard" LimbNone="OBJECT_BG_1_LIMB_NONE" LimbMax="OBJECT_BG_1_LIMB_MAX" EnumName="ObjectBg1Limb" Offset="0x8FC8" />
|
||||
|
||||
<!-- Treasure Chest Shop Gal Limb DisplayLists -->
|
||||
<DList Name="gTreasureChestShopGalHeadDL" Offset="0x3F50" />
|
||||
<DList Name="gTreasureChestShopGalNeckDL" Offset="0x4558" />
|
||||
<DList Name="gTreasureChestShopGalLeftHandDL" Offset="0x4768" />
|
||||
<DList Name="gTreasureChestShopGalLeftForearmDL" Offset="0x4A38" />
|
||||
<DList Name="gTreasureChestShopGalLeftUpperArmDL" Offset="0x4BC0" />
|
||||
<DList Name="gTreasureChestShopGalRightHandDL" Offset="0x4EE0" />
|
||||
<DList Name="gTreasureChestShopGalRightForearmDL" Offset="0x51B0" />
|
||||
<DList Name="gTreasureChestShopGalRightUpperArmDL" Offset="0x5338" />
|
||||
<DList Name="gTreasureChestShopGalTorsoDL" Offset="0x5658" />
|
||||
<DList Name="gTreasureChestShopGalLeftFootDL" Offset="0x5978" />
|
||||
<DList Name="gTreasureChestShopGalLeftShinDL" Offset="0x5B80" />
|
||||
<DList Name="gTreasureChestShopGalLeftThighDL" Offset="0x5F20" />
|
||||
<DList Name="gTreasureChestShopGalRightFootDL" Offset="0x6090" />
|
||||
<DList Name="gTreasureChestShopGalRightShinDL" Offset="0x6298" />
|
||||
<DList Name="gTreasureChestShopGalRightThighDL" Offset="0x6638" />
|
||||
<DList Name="gTreasureChestShopGalHipsDL" Offset="0x67A8" />
|
||||
|
||||
<!-- Treasure Chest Shop Gal Textures -->
|
||||
<Texture Name="gTreasureChestShopGalTLUT" OutName="treasure_cheat_shop_gal_tlut" Format="rgba16" Width="16" Height="16" Offset="0x68D8" />
|
||||
<Texture Name="gTreasureChestShopGalHairTex" OutName="treasure_cheat_shop_gal_hair" Format="ci8" Width="32" Height="32" Offset="0x6AD8" />
|
||||
<Texture Name="gTreasureChestShopGalHair2Tex" OutName="treasure_cheat_shop_gal_hair2" Format="ci8" Width="8" Height="16" Offset="0x6ED8" />
|
||||
<Texture Name="gTreasureChestShopGalEyeOpenUpTex" OutName="treasure_cheat_shop_gal_eye_open_up" Format="ci8" Width="32" Height="32" Offset="0x6F58" />
|
||||
<Texture Name="gTreasureChestShopGalEyeHalfUpTex" OutName="treasure_cheat_shop_gal_eye_half_up" Format="ci8" Width="32" Height="32" Offset="0x7358" />
|
||||
<Texture Name="gTreasureChestShopGalEyeClosedTex" OutName="treasure_cheat_shop_gal_eye_closed" Format="ci8" Width="32" Height="32" Offset="0x7758" />
|
||||
<Texture Name="gTreasureChestShopGalEyeOpenDownTex" OutName="treasure_cheat_shop_gal_eye_open_down" Format="ci8" Width="32" Height="32" Offset="0x7B58" />
|
||||
<Texture Name="gTreasureChestShopGalEyeHalfDownTex" OutName="treasure_cheat_shop_gal_eye_half_down" Format="ci8" Width="32" Height="32" Offset="0x7F58" />
|
||||
<Texture Name="gTreasureChestShopGalMouthTex" OutName="treasure_cheat_shop_gal_mouth" Format="ci8" Width="32" Height="32" Offset="0x8358" />
|
||||
<Texture Name="gTreasureChestShopGalEarAndBellyButtonTex" OutName="treasure_cheat_shop_gal_ear_and_belly_button" Format="ci8" Width="16" Height="16" Offset="0x8758" />
|
||||
<Texture Name="gTreasureChestShopGalSkinTex" OutName="treasure_cheat_shop_gal_skin" Format="ci8" Width="16" Height="16" Offset="0x8858" />
|
||||
<Texture Name="gTreasureChestShopGalClothesTex" OutName="treasure_cheat_shop_gal_clothes" Format="ci8" Width="32" Height="32" Offset="0x8958" />
|
||||
<Texture Name="gTreasureChestShopGalFingersTex" OutName="treasure_cheat_shop_gal_fingers" Format="ci8" Width="16" Height="16" Offset="0x8D58" />
|
||||
|
||||
<!-- Treasure Chest Shop Gal Limbs -->
|
||||
<Limb Name="gTreasureChestShopGalRootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_ROOT" Offset="0x8E58" />
|
||||
<Limb Name="gTreasureChestShopGalHipsLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_HIPS" Offset="0x8E64" />
|
||||
<Limb Name="gTreasureChestShopGalTorsoLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_TORSO" Offset="0x8E70" />
|
||||
<Limb Name="gTreasureChestShopGalNeckLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_NECK" Offset="0x8E7C" />
|
||||
<Limb Name="gTreasureChestShopGalHeadLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_HEAD" Offset="0x8E88" />
|
||||
<Limb Name="gTreasureChestShopGalLeftArmRootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_ARM_ROOT" Offset="0x8E94" />
|
||||
<Limb Name="gTreasureChestShopGalLeftUpperArmLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_UPPER_ARM" Offset="0x8EA0" />
|
||||
<Limb Name="gTreasureChestShopGalLeftForearmLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_FOREARM" Offset="0x8EAC" />
|
||||
<Limb Name="gTreasureChestShopGalLeftHandLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_HAND" Offset="0x8EB8" />
|
||||
<Limb Name="gTreasureChestShopGalRightArmRootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_ARM_ROOT" Offset="0x8EC4" />
|
||||
<Limb Name="gTreasureChestShopGalRightUpperArmLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_UPPER_ARM" Offset="0x8ED0" />
|
||||
<Limb Name="gTreasureChestShopGalRightForearmLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_FOREARM" Offset="0x8EDC" />
|
||||
<Limb Name="gTreasureChestShopGalRightHandLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_HAND" Offset="0x8EE8" />
|
||||
<Limb Name="gTreasureChestShopGalRightLegRootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_LEG_ROOT" Offset="0x8EF4" />
|
||||
<Limb Name="gTreasureChestShopGalRightThighLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_THIGH" Offset="0x8F00" />
|
||||
<Limb Name="gTreasureChestShopGalRightShinLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_SHIN" Offset="0x8F0C" />
|
||||
<Limb Name="gTreasureChestShopGalRightFootRootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_FOOT_ROOT" Offset="0x8F18" />
|
||||
<Limb Name="gTreasureChestShopGalRightFootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_RIGHT_FOOT" Offset="0x8F24" />
|
||||
<Limb Name="gTreasureChestShopGalLeftLegRootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_LEG_ROOT" Offset="0x8F30" />
|
||||
<Limb Name="gTreasureChestShopGalLeftThighLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_THIGH" Offset="0x8F3C" />
|
||||
<Limb Name="gTreasureChestShopGalLeftShinLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_SHIN" Offset="0x8F48" />
|
||||
<Limb Name="gTreasureChestShopGalLeftFootRootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_FOOT_ROOT" Offset="0x8F54" />
|
||||
<Limb Name="gTreasureChestShopGalLeftFootLimb" Type="Standard" EnumName="TREASURE_CHEST_SHOP_GAL_LIMB_LEFT_FOOT" Offset="0x8F60" />
|
||||
|
||||
<!-- Treasure Chest Shop Gal Skeleton -->
|
||||
<Skeleton Name="gTreasureChestShopGalSkel" Type="Flex" LimbType="Standard" LimbNone="TREASURE_CHEST_SHOP_GAL_LIMB_NONE" LimbMax="TREASURE_CHEST_SHOP_GAL_LIMB_MAX" EnumName="TreasureChestShopGalLimb" Offset="0x8FC8" />
|
||||
|
||||
<!-- Animations -->
|
||||
<Animation Name="object_bg_Anim_009890" Offset="0x9890" /> <!-- Original name is "bg_newwait" -->
|
||||
<Animation Name="object_bg_Anim_009F20" Offset="0x9F20" /> <!-- Original name is "bg_sleeping" -->
|
||||
<Animation Name="object_bg_Anim_00A280" Offset="0xA280" /> <!-- Original name is "bg_tokune" (probably the English word "to" and "kunekune") -->
|
||||
<Animation Name="object_bg_Anim_00AD98" Offset="0xAD98" /> <!-- Original name is "bg_up" -->
|
||||
<Animation Name="object_bg_Anim_00B19C" Offset="0xB19C" /> <!-- Original name is "bg_wait" -->
|
||||
|
||||
<!-- Mayor's receptionist DisplayLists -->
|
||||
<DList Name="object_bg_DL_00D5E0" Offset="0xD5E0" />
|
||||
<DList Name="object_bg_DL_00D780" Offset="0xD780" />
|
||||
<DList Name="object_bg_DL_00DB38" Offset="0xDB38" />
|
||||
|
@ -73,6 +90,8 @@
|
|||
<DList Name="object_bg_DL_00F1F0" Offset="0xF1F0" />
|
||||
<DList Name="object_bg_DL_00F350" Offset="0xF350" />
|
||||
<DList Name="object_bg_DL_00F4E8" Offset="0xF4E8" />
|
||||
|
||||
<!-- Mayor's receptionist Textures -->
|
||||
<Texture Name="object_bg_TLUT_00F6F0" OutName="tlut_00F6F0" Format="rgba16" Width="16" Height="16" Offset="0xF6F0" />
|
||||
<Texture Name="object_bg_Tex_00F8F0" OutName="tex_00F8F0" Format="ci8" Width="32" Height="32" Offset="0xF8F0" />
|
||||
<Texture Name="object_bg_Tex_00FCF0" OutName="tex_00FCF0" Format="ci8" Width="32" Height="32" Offset="0xFCF0" />
|
||||
|
@ -84,6 +103,8 @@
|
|||
<Texture Name="object_bg_Tex_0110F0" OutName="tex_0110F0" Format="ci8" Width="32" Height="32" Offset="0x110F0" />
|
||||
<Texture Name="object_bg_Tex_0114F0" OutName="tex_0114F0" Format="ci8" Width="16" Height="16" Offset="0x114F0" />
|
||||
<Texture Name="object_bg_Tex_0115F0" OutName="tex_0115F0" Format="ci8" Width="32" Height="32" Offset="0x115F0" />
|
||||
|
||||
<!-- Mayor's receptionist Limbs -->
|
||||
<Limb Name="object_bg_Standardlimb_0119F0" Type="Standard" EnumName="OBJECT_BG_2_LIMB_01" Offset="0x119F0" />
|
||||
<Limb Name="object_bg_Standardlimb_0119FC" Type="Standard" EnumName="OBJECT_BG_2_LIMB_02" Offset="0x119FC" />
|
||||
<Limb Name="object_bg_Standardlimb_011A08" Type="Standard" EnumName="OBJECT_BG_2_LIMB_03" Offset="0x11A08" />
|
||||
|
@ -107,6 +128,8 @@
|
|||
<Limb Name="object_bg_Standardlimb_011AE0" Type="Standard" EnumName="OBJECT_BG_2_LIMB_15" Offset="0x11AE0" />
|
||||
<Limb Name="object_bg_Standardlimb_011AEC" Type="Standard" EnumName="OBJECT_BG_2_LIMB_16" Offset="0x11AEC" />
|
||||
<Limb Name="object_bg_Standardlimb_011AF8" Type="Standard" EnumName="OBJECT_BG_2_LIMB_17" Offset="0x11AF8" />
|
||||
|
||||
<!--Mayor's receptionist Skeleton -->
|
||||
<Skeleton Name="object_bg_Skel_011B60" Type="Flex" LimbType="Standard" LimbNone="OBJECT_BG_2_LIMB_NONE" LimbMax="OBJECT_BG_2_LIMB_MAX" EnumName="ObjectBg2Limb" Offset="0x11B60" />
|
||||
</File>
|
||||
</Root>
|
||||
|
|
3
spec
3
spec
|
@ -3334,8 +3334,7 @@ beginseg
|
|||
name "ovl_En_Takaraya"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_En_Takaraya/z_en_takaraya.o"
|
||||
include "build/data/ovl_En_Takaraya/ovl_En_Takaraya.data.o"
|
||||
include "build/data/ovl_En_Takaraya/ovl_En_Takaraya.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_En_Takaraya/ovl_En_Takaraya_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
@ -15,7 +15,25 @@ void EnTakaraya_Destroy(Actor* thisx, PlayState* play);
|
|||
void EnTakaraya_Update(Actor* thisx, PlayState* play);
|
||||
void EnTakaraya_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
#if 0
|
||||
void EnTakaraya_Blink(EnTakaraya* this);
|
||||
void EnTakaraya_SetupWait(EnTakaraya* this);
|
||||
void EnTakaraya_Wait(EnTakaraya* this, PlayState* play);
|
||||
void EnTakaraya_SpawnWalls(EnTakaraya* this, PlayState* play);
|
||||
void EnTakaraya_SetupTalk(EnTakaraya* this);
|
||||
void EnTakaraya_Talk(EnTakaraya* this, PlayState* play);
|
||||
void func_80ADF2D4(EnTakaraya* this);
|
||||
void func_80ADF338(EnTakaraya* this, PlayState* play);
|
||||
void func_80ADF4E0(EnTakaraya* this);
|
||||
void func_80ADF520(EnTakaraya* this, PlayState* play);
|
||||
void func_80ADF608(EnTakaraya* this, PlayState* play);
|
||||
void func_80ADF654(EnTakaraya* this, PlayState* play);
|
||||
void func_80ADF6DC(EnTakaraya* this);
|
||||
void func_80ADF730(EnTakaraya* this, PlayState* play);
|
||||
void func_80ADF7B8(EnTakaraya* this);
|
||||
void func_80ADF7CC(EnTakaraya* this, PlayState* play);
|
||||
s32 EnTakaraya_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx);
|
||||
void EnTakaraya_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx);
|
||||
|
||||
ActorInit En_Takaraya_InitVars = {
|
||||
ACTOR_EN_TAKARAYA,
|
||||
ACTORCAT_NPC,
|
||||
|
@ -28,61 +46,391 @@ ActorInit En_Takaraya_InitVars = {
|
|||
(ActorFunc)EnTakaraya_Draw,
|
||||
};
|
||||
|
||||
// static InitChainEntry sInitChain[] = {
|
||||
static InitChainEntry D_80ADFB20[] = {
|
||||
TexturePtr sEyesUpTextures[] = {
|
||||
gTreasureChestShopGalEyeOpenUpTex,
|
||||
gTreasureChestShopGalEyeHalfUpTex,
|
||||
gTreasureChestShopGalEyeClosedTex,
|
||||
gTreasureChestShopGalEyeHalfUpTex,
|
||||
};
|
||||
|
||||
TexturePtr sEyesDownTextures[] = {
|
||||
gTreasureChestShopGalEyeOpenDownTex,
|
||||
gTreasureChestShopGalEyeHalfDownTex,
|
||||
gTreasureChestShopGalEyeClosedTex,
|
||||
gTreasureChestShopGalEyeHalfDownTex,
|
||||
};
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_U8(targetMode, TARGET_MODE_6, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(targetArrowOffset, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#endif
|
||||
u32 sTexturesDesegmented = false;
|
||||
|
||||
extern InitChainEntry D_80ADFB20[];
|
||||
u16 D_80ADFB2C[PLAYER_FORM_MAX] = {
|
||||
0x76D, // PLAYER_FORM_FIERCE_DEITY
|
||||
0x76E, // PLAYER_FORM_GORON
|
||||
0x76F, // PLAYER_FORM_ZORA
|
||||
0x76C, // PLAYER_FORM_DEKU
|
||||
0x76D, // PLAYER_FORM_HUMAN
|
||||
};
|
||||
|
||||
extern UNK_TYPE D_06001384;
|
||||
extern UNK_TYPE D_06009890;
|
||||
extern UNK_TYPE D_0600A280;
|
||||
extern UNK_TYPE D_0600AD98;
|
||||
u8 D_80ADFB38[PLAYER_FORM_MAX][2] = {
|
||||
{ 5, 5 }, // PLAYER_FORM_FIERCE_DEITY
|
||||
{ 12, 5 }, // PLAYER_FORM_GORON
|
||||
{ 4, 4 }, // PLAYER_FORM_ZORA
|
||||
{ 42, 41 }, // PLAYER_FORM_DEKU
|
||||
{ 5, 5 }, // PLAYER_FORM_HUMAN
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/EnTakaraya_Init.s")
|
||||
u16 D_80ADFB44[PLAYER_FORM_MAX] = {
|
||||
0x775, // PLAYER_FORM_FIERCE_DEITY
|
||||
0x776, // PLAYER_FORM_GORON
|
||||
0x777, // PLAYER_FORM_ZORA
|
||||
0x774, // PLAYER_FORM_DEKU
|
||||
0x775, // PLAYER_FORM_HUMAN
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/EnTakaraya_Destroy.s")
|
||||
u16 D_80ADFB50[PLAYER_FORM_MAX] = {
|
||||
0x771, // PLAYER_FORM_FIERCE_DEITY
|
||||
0x772, // PLAYER_FORM_GORON
|
||||
0x773, // PLAYER_FORM_ZORA
|
||||
0x770, // PLAYER_FORM_DEKU
|
||||
0x771, // PLAYER_FORM_HUMAN
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADED8C.s")
|
||||
void EnTakaraya_Init(Actor* thisx, PlayState* play) {
|
||||
EnTakaraya* this = THIS;
|
||||
s32 i;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADEDF8.s")
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
ActorShape_Init(&this->actor.shape, -60.0f, NULL, 0.0f);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gTreasureChestShopGalSkel, &object_bg_Anim_009890, this->jointTable,
|
||||
this->morphTable, TREASURE_CHEST_SHOP_GAL_LIMB_MAX);
|
||||
this->switchFlag = EN_TAKARAYA_GET_SWITCH_FLAG(thisx);
|
||||
thisx->params &= 0xFF;
|
||||
if (!sTexturesDesegmented) {
|
||||
for (i = 0; i < ARRAY_COUNT(sEyesDownTextures); i++) {
|
||||
sEyesUpTextures[i] = Lib_SegmentedToVirtual(sEyesUpTextures[i]);
|
||||
sEyesDownTextures[i] = Lib_SegmentedToVirtual(sEyesDownTextures[i]);
|
||||
}
|
||||
sTexturesDesegmented = true;
|
||||
}
|
||||
this->eyeTexIndex = 2;
|
||||
if (gSaveContext.save.entrance == ENTRANCE(TREASURE_CHEST_SHOP, 1)) {
|
||||
Audio_StopSubBgm();
|
||||
if (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] == TIMER_STATE_6) {
|
||||
this->actor.textId = 0x77A;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
func_80ADF6DC(this);
|
||||
} else {
|
||||
this->actor.textId = 0x77C;
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED)) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED);
|
||||
EnTakaraya_SetupWait(this);
|
||||
} else {
|
||||
func_80ADF6DC(this);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
EnTakaraya_SetupWait(this);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADEE4C.s")
|
||||
void EnTakaraya_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnTakaraya* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADEF74.s")
|
||||
Flags_UnsetSwitch(play, 5);
|
||||
if (!this->unk2AD) {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT);
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF03C.s")
|
||||
void EnTakaraya_Blink(EnTakaraya* this) {
|
||||
if (this->eyeTexIndex != 0) {
|
||||
this->eyeTexIndex++;
|
||||
if (this->eyeTexIndex == 4) {
|
||||
this->eyeTexIndex = 0;
|
||||
}
|
||||
} else if (Rand_ZeroOne() < 0.02f) {
|
||||
this->eyeTexIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF050.s")
|
||||
void EnTakaraya_SetupWait(EnTakaraya* this) {
|
||||
if (this->skelAnime.animation == &object_bg_Anim_001384) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 5.0f);
|
||||
}
|
||||
this->actionFunc = EnTakaraya_Wait;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF2D4.s")
|
||||
void EnTakaraya_Wait(EnTakaraya* this, PlayState* play) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->skelAnime.animation == &object_bg_Anim_00A280) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 5.0f);
|
||||
} else {
|
||||
Animation_MorphToLoop(&this->skelAnime, &object_bg_Anim_009890, -4.0f);
|
||||
}
|
||||
}
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
if (Text_GetFaceReaction(play, FACE_REACTION_SET_TREASURE_CHEST_SHOP_GAL) == 0) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00A280, -4.0f);
|
||||
}
|
||||
EnTakaraya_SetupTalk(this);
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x2000)) {
|
||||
this->actor.textId = Text_GetFaceReaction(play, FACE_REACTION_SET_TREASURE_CHEST_SHOP_GAL);
|
||||
if (this->actor.textId == 0) {
|
||||
this->actor.textId = D_80ADFB2C[GET_PLAYER_FORM];
|
||||
}
|
||||
this->formSwitchFlag = GET_PLAYER_FORM + this->switchFlag;
|
||||
Actor_OfferTalk(&this->actor, play, 120.0f);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF338.s")
|
||||
void EnTakaraya_SpawnWalls(EnTakaraya* this, PlayState* play) {
|
||||
u8 var_v1;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF4E0.s")
|
||||
if (Flags_GetSwitch(play, this->formSwitchFlag)) {
|
||||
var_v1 = D_80ADFB38[GET_PLAYER_FORM][1];
|
||||
} else {
|
||||
var_v1 = D_80ADFB38[GET_PLAYER_FORM][0];
|
||||
}
|
||||
Actor_SpawnAsChildAndCutscene(&play->actorCtx, play, ACTOR_OBJ_TAKARAYA_WALL, 0.0f, 0.0f, 0.0f, 0, 0, 5,
|
||||
((var_v1 << 5) + this->actor.params) + 0xB000, this->actor.csId, HALFDAYBIT_ALL,
|
||||
NULL);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF520.s")
|
||||
void EnTakaraya_SetupTalk(EnTakaraya* this) {
|
||||
this->actionFunc = EnTakaraya_Talk;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF608.s")
|
||||
void EnTakaraya_Talk(EnTakaraya* this, PlayState* play) {
|
||||
u8 talkState;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF654.s")
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->skelAnime.animation == &object_bg_Anim_00AD98) {
|
||||
Animation_PlayOnce(&this->skelAnime, &object_bg_Anim_000968);
|
||||
} else if (this->skelAnime.animation == &object_bg_Anim_00A280) {
|
||||
Animation_PlayLoop(&this->skelAnime, &object_bg_Anim_001384);
|
||||
} else {
|
||||
Animation_PlayLoop(&this->skelAnime, &object_bg_Anim_009890);
|
||||
}
|
||||
}
|
||||
talkState = Message_GetState(&play->msgCtx);
|
||||
if ((talkState == TEXT_STATE_CLOSING) || (talkState == TEXT_STATE_DONE)) {
|
||||
if (this->actor.textId == 0x778) {
|
||||
func_80ADF2D4(this);
|
||||
} else {
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED);
|
||||
EnTakaraya_SetupWait(this);
|
||||
}
|
||||
} else if ((talkState == TEXT_STATE_1) && (this->actor.textId != 0x778)) {
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 5.0f);
|
||||
}
|
||||
} else if ((talkState == TEXT_STATE_CHOICE) && Message_ShouldAdvance(play)) {
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.save.saveInfo.playerData.rupees < play->msgCtx.unk1206C) {
|
||||
this->actor.textId = 0x77B;
|
||||
if (this->skelAnime.animation == &object_bg_Anim_009890) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_000968, 5.0f);
|
||||
}
|
||||
Audio_PlaySfx(NA_SE_SY_ERROR);
|
||||
} else {
|
||||
Audio_PlaySfx_MessageDecide();
|
||||
Rupees_ChangeBy(-play->msgCtx.unk1206C);
|
||||
EnTakaraya_SpawnWalls(this, play);
|
||||
this->actor.textId = 0x778;
|
||||
if (this->skelAnime.animation != &object_bg_Anim_009890) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &object_bg_Anim_009890, 5.0f);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Audio_PlaySfx_MessageCancel();
|
||||
this->actor.textId = D_80ADFB44[GET_PLAYER_FORM];
|
||||
if (this->skelAnime.animation == &object_bg_Anim_009890) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_000968, 5.0f);
|
||||
}
|
||||
}
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF6DC.s")
|
||||
void func_80ADF2D4(EnTakaraya* this) {
|
||||
Actor_PlaySfx_FlaggedCentered2(&this->actor, NA_SE_SY_FOUND);
|
||||
Audio_PlaySubBgm(NA_BGM_TIMED_MINI_GAME);
|
||||
this->timer = 145;
|
||||
SET_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED);
|
||||
this->actionFunc = func_80ADF338;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF730.s")
|
||||
void func_80ADF338(EnTakaraya* this, PlayState* play) {
|
||||
Actor* chest = play->actorCtx.actorLists[ACTORCAT_CHEST].first;
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f subCamEye;
|
||||
Vec3f subCamAt;
|
||||
f32 sp2C;
|
||||
s16 subCamId;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF7B8.s")
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if ((CutsceneManager_GetCurrentCsId() == this->actor.csId) && (chest != NULL)) {
|
||||
this->timer--;
|
||||
subCamId = CutsceneManager_GetCurrentSubCamId(this->actor.csId);
|
||||
if (this->timer >= 26) {
|
||||
sp2C = 250.0f;
|
||||
} else {
|
||||
sp2C = ((chest->xzDistToPlayer - 250.0f) * (25 - this->timer) * 0.04f) + 250.0f;
|
||||
}
|
||||
subCamEye.x = (Math_SinS(chest->yawTowardsPlayer) * sp2C) + chest->world.pos.x;
|
||||
subCamEye.y = player->actor.world.pos.y + 120.0f;
|
||||
subCamEye.z = (Math_CosS(chest->yawTowardsPlayer) * sp2C) + chest->world.pos.z;
|
||||
subCamAt.x = subCamEye.x - (Math_SinS(chest->yawTowardsPlayer) * 250.0f);
|
||||
subCamAt.y = subCamEye.y - 90.0f;
|
||||
subCamAt.z = subCamEye.z - (Math_CosS(chest->yawTowardsPlayer) * 250.0f);
|
||||
Play_SetCameraAtEye(play, subCamId, &subCamAt, &subCamEye);
|
||||
} else if (this->timer < 145) {
|
||||
func_80ADF4E0(this);
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF7CC.s")
|
||||
void func_80ADF4E0(EnTakaraya* this) {
|
||||
Interface_StartTimer(TIMER_ID_MINIGAME_2, 45);
|
||||
this->timer = 1;
|
||||
this->actionFunc = func_80ADF520;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/EnTakaraya_Update.s")
|
||||
void func_80ADF520(EnTakaraya* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (!Play_InCsMode(play)) {
|
||||
if (Flags_GetTreasure(play, this->actor.params)) {
|
||||
Flags_SetSwitch(play, this->formSwitchFlag);
|
||||
play->actorCtx.sceneFlags.chest &= ~TAKARAYA_GET_TREASURE_FLAG(&this->actor);
|
||||
this->timer = 0;
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_6;
|
||||
func_80ADF608(this, play);
|
||||
} else if (gSaveContext.timerCurTimes[TIMER_ID_MINIGAME_2] == TIMER_STATE_OFF) {
|
||||
this->timer = 50;
|
||||
Message_StartTextbox(play, 0x77D, &this->actor);
|
||||
gSaveContext.timerStates[TIMER_ID_MINIGAME_2] = TIMER_STATE_STOP;
|
||||
func_80ADF608(this, play);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF94C.s")
|
||||
void func_80ADF608(EnTakaraya* this, PlayState* play) {
|
||||
func_800B7298(play, &this->actor, PLAYER_CSMODE_WAIT);
|
||||
this->unk2AD = true;
|
||||
this->actionFunc = func_80ADF654;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/func_80ADF984.s")
|
||||
void func_80ADF654(EnTakaraya* this, PlayState* play) {
|
||||
if (this->timer > 0) {
|
||||
this->timer--;
|
||||
} else {
|
||||
if (gSaveContext.timerStates[TIMER_ID_MINIGAME_2] == TIMER_STATE_6) {
|
||||
play->transitionType = TRANS_TYPE_80;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
} else {
|
||||
play->transitionType = TRANS_TYPE_64;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
}
|
||||
gSaveContext.nextCutsceneIndex = 0;
|
||||
play->nextEntrance = ENTRANCE(TREASURE_CHEST_SHOP, 1);
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_En_Takaraya/EnTakaraya_Draw.s")
|
||||
void func_80ADF6DC(EnTakaraya* this) {
|
||||
Animation_PlayLoop(&this->skelAnime, &object_bg_Anim_001384);
|
||||
this->eyeTexIndex = 0;
|
||||
this->actor.flags |= ACTOR_FLAG_10000;
|
||||
this->actionFunc = func_80ADF730;
|
||||
}
|
||||
|
||||
void func_80ADF730(EnTakaraya* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (Actor_ProcessTalkRequest(&this->actor, &play->state)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_10000;
|
||||
func_80ADF7B8(this);
|
||||
} else {
|
||||
this->formSwitchFlag = GET_PLAYER_FORM + this->switchFlag;
|
||||
Actor_OfferTalk(&this->actor, play, 120.0f);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ADF7B8(EnTakaraya* this) {
|
||||
this->actionFunc = func_80ADF7CC;
|
||||
}
|
||||
|
||||
void func_80ADF7CC(EnTakaraya* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_5) && Message_ShouldAdvance(play)) {
|
||||
if (this->actor.textId == 0x77A) {
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED)) {
|
||||
Message_CloseTextbox(play);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_WAIT);
|
||||
CLEAR_WEEKEVENTREG(WEEKEVENTREG_KICKOUT_TIME_PASSED);
|
||||
EnTakaraya_SetupWait(this);
|
||||
} else {
|
||||
this->actor.textId = 0x77C;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
}
|
||||
} else {
|
||||
this->actor.textId = D_80ADFB50[GET_PLAYER_FORM];
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_bg_Anim_00AD98, 5.0f);
|
||||
EnTakaraya_SetupTalk(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void EnTakaraya_Update(Actor* thisx, PlayState* play) {
|
||||
EnTakaraya* this = THIS;
|
||||
s32 pad;
|
||||
Vec3s torsoRot;
|
||||
|
||||
this->actionFunc(this, play);
|
||||
Actor_TrackPlayer(play, &this->actor, &this->headRot, &torsoRot, this->actor.focus.pos);
|
||||
EnTakaraya_Blink(this);
|
||||
}
|
||||
|
||||
s32 EnTakaraya_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, Actor* thisx) {
|
||||
EnTakaraya* this = THIS;
|
||||
|
||||
if (limbIndex == TREASURE_CHEST_SHOP_GAL_LIMB_HEAD) {
|
||||
rot->x += this->headRot.y;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void EnTakaraya_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
|
||||
EnTakaraya* this = THIS;
|
||||
|
||||
if (limbIndex == TREASURE_CHEST_SHOP_GAL_LIMB_HEAD) {
|
||||
Matrix_RotateYS(0x400 - this->headRot.x, MTXMODE_APPLY);
|
||||
Matrix_MultVecX(500.0f, &thisx->focus.pos);
|
||||
}
|
||||
}
|
||||
|
||||
void EnTakaraya_Draw(Actor* thisx, PlayState* play) {
|
||||
EnTakaraya* this = THIS;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
Gfx_SetupDL25_Opa(play->state.gfxCtx);
|
||||
|
||||
if ((GET_PLAYER_FORM == PLAYER_FORM_DEKU) || (GET_PLAYER_FORM == PLAYER_FORM_HUMAN)) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, sEyesDownTextures[this->eyeTexIndex]);
|
||||
} else {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, sEyesUpTextures[this->eyeTexIndex]);
|
||||
}
|
||||
SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
|
||||
this->skelAnime.dListCount, EnTakaraya_OverrideLimbDraw, NULL,
|
||||
EnTakaraya_TransformLimbDraw, &this->actor);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
@ -2,16 +2,27 @@
|
|||
#define Z_EN_TAKARAYA_H
|
||||
|
||||
#include "global.h"
|
||||
#include "objects/object_bg/object_bg.h"
|
||||
|
||||
struct EnTakaraya;
|
||||
|
||||
typedef void (*EnTakarayaActionFunc)(struct EnTakaraya*, PlayState*);
|
||||
|
||||
#define EN_TAKARAYA_GET_SWITCH_FLAG(thisx) (((thisx)->params >> 0x8) & 0xFF)
|
||||
#define TAKARAYA_GET_TREASURE_FLAG(thisx) (1 << (thisx)->params)
|
||||
|
||||
typedef struct EnTakaraya {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x164];
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[TREASURE_CHEST_SHOP_GAL_LIMB_MAX];
|
||||
/* 0x218 */ Vec3s morphTable[TREASURE_CHEST_SHOP_GAL_LIMB_MAX];
|
||||
/* 0x2A8 */ EnTakarayaActionFunc actionFunc;
|
||||
/* 0x2AC */ char unk_2AC[0x10];
|
||||
/* 0x2AC */ u8 eyeTexIndex;
|
||||
/* 0x2AD */ u8 unk2AD;
|
||||
/* 0x2AE */ s16 timer;
|
||||
/* 0x2B0 */ s16 formSwitchFlag;
|
||||
/* 0x2B2 */ s16 switchFlag;
|
||||
/* 0x2B4 */ Vec3s headRot;
|
||||
} EnTakaraya; // size = 0x2BC
|
||||
|
||||
#endif // Z_EN_TAKARAYA_H
|
||||
|
|
Loading…
Reference in New Issue