1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 06:24:30 +00:00

Decompile a bunch of objects (#603)

* Mostly done but shifted

* still messed up

* Almost OK

* OBJECT_JYA_OBJ OK, OBJECT_GR OK

* Done

* Merge master and format

* Cleanup

* Cleanup 2

* Start object MB dont merge yet

* Object_MB OK

* Object_ydan_objects OK

* General 'ydan' actor cleanup

* Forgot some small things

* Object_EC OK

* add .gitkeep and run format

* Object_sd OK but no textures cause of a zap issue

* PR fixes

* Fix object_sd

* fix ydan

* delete .gitkeep files

* OBJECT_BOX as far as it can go with current ZAP

* Fix undefined_syms

* Start child link object

* Push progress, dont merge yet

* Object_mori_objects OK

* Fixed?

* Fix conflicts again

* Seems like i missed some textures

* Extract data for BgBombwall

* More field

* ZAP YEP 2.0

* Object_Box OK

* Object_SD ok.  Ready to merge

* remove ASM and merge master

* remove ASM

* remove files wrongfully added to docs/

* Almost done

* Change comment in z_player_lib.c

* forgot some DLists in player_lib.c

* Fix conflict, run format

* Same as before but this time with Tex and TLUT

* Last few things

* fix object_GR and add limbs to object_sd

* Nane -> Name

* gChildDekuShieldMtx is now a matrix and not a blob

* PR fixes (Fig)

* add a space for comment in z_player_lib.c

* re push and new lines

* PR fixes (AngheloAlf)

* PR fixes (Roman)

* Fix Heishi2

* PR fixes (Fig)

* Replace spacing in a file

* PR fixes (Roman)
This commit is contained in:
louist103 2021-05-26 18:59:21 -04:00 committed by GitHub
parent 36fead60a0
commit 201c9ec1cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
72 changed files with 1499 additions and 1128 deletions

View file

@ -712,8 +712,8 @@ glabel func_80076934
/* AEE4D0 80077330 AC400004 */ sw $zero, 4($v0)
/* AEE4D4 80077334 AC590000 */ sw $t9, ($v0)
/* AEE4D8 80077338 8C6202D0 */ lw $v0, 0x2d0($v1)
/* AEE4DC 8007733C 3C0E0501 */ lui $t6, %hi(D_0500CA70) # $t6, 0x501
/* AEE4E0 80077340 25CECA70 */ addiu $t6, %lo(D_0500CA70) # addiu $t6, $t6, -0x3590
/* AEE4DC 8007733C 3C0E0501 */ lui $t6, %hi(gFieldDL_00CA70) # $t6, 0x501
/* AEE4E0 80077340 25CECA70 */ addiu $t6, %lo(gFieldDL_00CA70) # addiu $t6, $t6, -0x3590
/* AEE4E4 80077344 244F0008 */ addiu $t7, $v0, 8
/* AEE4E8 80077348 AC6F02D0 */ sw $t7, 0x2d0($v1)
/* AEE4EC 8007734C 3C18DE00 */ lui $t8, 0xde00

View file

@ -0,0 +1,60 @@
<Root>
<File Name="gameplay_field_keep" Segment= "5">
<DList Name="gHanaFlower1DL" Offset="0x000"/>
<DList Name="gHanaFlower2DL" Offset="0x0A0"/>
<DList Name="gHanaFlower3DL" Offset="0x0140"/>
<DList Name="gHanaLeaf1DL" Offset="0x01E0"/>
<DList Name="gHanaLeaf2DL" Offset="0x0280"/>
<DList Name="gHanaLeaf3DL" Offset="0x0320"/>
<DList Name="gHanaLeaf4DL" Offset="0x03C0"/>
<DList Name="gHanaLeaf5DL" Offset="0x0460"/>
<Texture Name="gHanaFlowerTex" OutName="hana_flower" Format="rgb5a1" Width="16" Height="32" Offset="0x750"/>
<Texture Name="gHanaLeafTex" OutName="hana_leaf" Format="rgb5a1" Width="32" Height="32" Offset="0xB50"/>
<DList Name="gHanaDL" Offset="0x500"/>
<Collision Name="gBgBombwallCol" Offset="0x41B0"/>
<DList Name="gBgBombwallNormalDL" Offset="0x3FC0"/>
<DList Name="gBgBombwallBrokenDL" Offset="0x4088"/>
<DList Name="gGrottoDL" Offset="0x1390"/>
<Texture Name="gGrottoTex" OutName="grotto_tex" Format="ia16" Width="32" Height="64" Offset="0x1420"/>
<DList Name="gButterflyDL_002480" Offset="0x2480"/>
<DList Name="gButterflyDL_002520" Offset="0x2520"/>
<DList Name="gButterflyDL_002580" Offset="0x2580"/>
<DList Name="gButterflyDL_002620" Offset="0x2620"/>
<Texture Name="gButterflyWingTex" OutName="butterfly_wing" Format="rgb5a1" Width="32" Height="64" Offset="0x2680"/>
<Skeleton Name="gButterflySkel" Type="Standard" LimbType="Standard" Offset="0x36F0"/>
<Animation Name="gButterflyAnim" Offset="0x2470"/>
<Texture Name="gBgBombwallTLUT" OutName="bombwall_palette" Format="rgb5a1" Width="4" Height="4" Offset="0x3700"/>
<Texture Name="gBgBombwallNormalTex" OutName="bombwall_normal" Format="ci4" Width="32" Height="64" Offset="0x3720"/>
<Texture Name="gBgBombWallBrokenTex" OutName="bombwall_broken" Format="ci4" Width="32" Height="64" Offset="0x3B20"/>
<DList Name="gFieldDoorDL_004720" Offset="0x4720"/>
<DList Name="gFieldDoor1DL" Offset="0x47A0"/>
<DList Name="gFieldDoor2DL" Offset="0x4978"/>
<Texture Name="gFieldDoor1Tex" OutName="field_door1" Format="i8" Width="32" Height="128" Offset="0x04F50"/>
<Texture Name="gFieldDoorKnobTopHalfTex" OutName="field_door_knob_upper" Format="rgb5a1" Width="16" Height="16" Offset="0x4B50"/>
<Texture Name="gFieldDoorKnobTex" OutName="field_door_knob" Format="rgb5a1" Width="16" Height="16" Offset="0x4D50"/>
<Skeleton Name="gFieldUnusedFishSkel" Type="Standard" LimbType="Standard" Offset="0x088F8"/>
<Animation Name="gFieldUnusedFishAnim" Offset="0x5FF0"/>
<DList Name="gFieldUnusedFishDL" Offset="0x6000"/>
<DList Name="gFieldSkelUnusedFishDL_0061E8" Offset="0x61E8"/>
<DList Name="gFieldSkelUnusedFishDL_0063A8" Offset="0x63A8"/>
<DList Name="gFieldSkelUnusedFishDL_006448" Offset="0x6448"/>
<Texture Name="gFieldUnusedFishTex" OutName="unused_fish" Format="rgb5a1" Width="64" Height="32" Offset="0x64A8"/>
<Texture Name="gFieldUnusedFishBottomTex" OutName="unused_fish_bottom" Format="rgb5a1" Width="64" Height="32" Offset="0x074A8"/>
<Texture Name="gFieldUnusedFishFinTex" OutName="unused_fish_fin" Format="rgb5a1" Width="32" Height="16" Offset="0x84A8"/>
<DList Name="gSilverRockDL" Offset="0xA3B8"/>
<DList Name="gFieldKakeraDL" Offset="0xA880"/>
<Texture Name="gFieldKakeraTex" OutName="kakera" Format="rgb5a1" Width="32" Height="32" Offset="0xA940"/>
<DList Name="gSilverRockFragmentsDL" Offset="0xA5E8"/>
<DList Name="gFieldBushDL" Offset="0xB9D0"/>
<Texture Name="gFieldBushTex" OutName="bush" Format="rgb5a1" Width="32" Height="32" Offset="0xB140"/>
<DList Name="gFieldBeehiveDL" Offset="0x95B0"/>
<DList Name="gFieldBeehiveFragmentDL" Offset="0x9940"/>
<Texture Name="gFieldBeehiveTex" OutName="beehive" Format="rgb5a1" Width="32" Height="32" Offset="0x8900"/>
<Texture Name="gFieldBeehiveFragmentTex" OutName="beehive_fragment" Format="rgb5a1" Width="16" Height="16" Offset="0x9710"/>
<Texture Name="gFieldSilverRockTex" OutName="silver_rock" Format="ci4" Width="64" Height="64" Offset="0x99F8"/>
<Texture Name="gFieldSilverRockTLUT" OutName="silver_rock_palette" Format="rgb5a1" Width="4" Height="4" Offset="0x99D0"/>
<!-- Kankyo Stuff-->
<DList Name="gFieldDL_00CA70" Offset="0xCA70"/>
<Blob Name="gFieldUnaccounted_00CB30" Size="0x800"/>
</File>
</Root>

View file

@ -0,0 +1,29 @@
<Root>
<File Name="object_box" Segment="6">
<Skeleton Name="gTreasureChestCurveSkel" Type="Curve" LimbType="Curve" Offset="0x5EB8"/>
<CurveAnimation Name="gTreasureChestCurveAnim_4B60" SkelOffset="0x5EB8" Offset="0x4B60"/>
<CurveAnimation Name="gTreasureChestCurveAnim_4F70" SkelOffset="0x5EB8" Offset="0x4F70"/>
<Animation Name="gTreasureChestAnim_000128" Offset="0x128"/>
<Animation Name="gTreasureChestAnim_00024C" Offset="0x24C"/>
<Animation Name="gTreasureChestAnim_00043C" Offset="0x43C"/>
<DList Name="gTreasureChestChestFrontDL" Offset="0x6F0"/>
<Texture Name="gTreasureChestFrontTex" OutName="chest_front" Format="rgb5a1" Width="32" Height="64" Offset="0x1798"/>
<DList Name="gTreasureChestBossKeyChestFrontDL" Offset="0xAE8"/>
<Texture Name="gTreasureChestBossKeyFrontTex" OutName="boss_key_front_tex" Format="rgb5a1" Width="32" Height="64" Offset="0x3798"/>
<DList Name="gTreasureChestChestSideAndLidDL" Offset="0x10C0"/>
<Texture Name="gTreasureChestSideAndTopTex" OutName="side_and_top" Format="rgb5a1" Width="32" Height="32" Offset="0x2798"/>
<DList Name="gTreasureChestBossKeyChestSideAndTopDL" Offset="0x1678"/>
<Texture Name="gTreasureChestBossKeySideAndTopTex" OutName="boss_key_side_and_top" Format="rgb5a1" Width="32" Height="32" Offset="0x2F98"/>
<Skeleton Name="gTreasureChestSkel" Type="Standard" LimbType="Standard" Offset="0x47D8"/>
<Collision Name="gTreasureChestCol" Offset="0x5FC8"/>
<!--Large Unaccounted-->
<Blob Name="gBoxBlob_00025C" Size="0xF4" Offset="0x025C"/>
<Blob Name="gBoxBlob_00044C" Size="0x64" Offset="0x044C"/>
</File>
</Root>

View file

@ -0,0 +1,26 @@
<Root>
<File Name="object_ec" Segment="6">
<Animation Name="gDemoEcCuccoLadyAnim" Offset="0xCD8"/>
<Animation Name="gDemoEcCarpenterAnim" Offset="0x164C"/>
<Animation Name="gDemoEcWindmillManAnim" Offset="0x196C"/>
<Animation Name="gDemoEcGerudoAnim" Offset="0x2254"/>
<Animation Name="gDemoEcGoronAnim" Offset="0x2FA0"/>
<Animation Name="gDemoEcGoron2Anim" Offset="0x3A98"/>
<Animation Name="gDemoEcIngoAnim" Offset="0x48F4"/>
<Animation Name="gDemoEcDancingKokiriAnim" Offset="0x513C"/>
<Animation Name="gDemoEcKokiriAnim" Offset="0x5670"/>
<Animation Name="gDemoEcOldManAnim" Offset="0x5EA8"/>
<Animation Name="gDemoEcAnim_006220" Offset="0x6220"/>
<Animation Name="gDemoEcAnim_006930" Offset="0x6930"/>
<Animation Name="gDemoEcKingZoraAnim" Offset="0x6C40"/>
<Animation Name="gDemoEcAnim_008D1C" Offset="0x8D1C"/>
<Animation Name="gDemoEcAnim_009234" Offset="0x9234"/>
<Animation Name="gDemoEcMidoAnim" Offset="0x95DC"/>
<Animation Name="gDemoEcJumpingCuccoAnim" Offset="0x9BB4"/>
<Animation Name="gDemoEcJumpingCucco2Anim" Offset="0xA07C"/>
<Animation Name="gDemoEcWalkingCuccoAnim" Offset="0xA474"/>
<Animation Name="gDemoEcPotionShopOwnerAnim" Offset="0xAFE0"/>
<Animation Name="gDemoEcTalonAnim" Offset="0xBD38"/>
<Animation Name="gDemoEcDancingZoraAnim" Offset="0xC918"/>
</File>
</Root>

View file

@ -0,0 +1,16 @@
<Root>
<File Name="object_gr" Segment="6">
<Skeleton Name="gNiwGirlSkel" Type="Flex" LimbType="Standard" Offset="0x9948"/>
<Animation Name="gNiwGirlRunAnim" Offset="0x0378"/>
<Animation Name="gNiwGirlJumpAnim" Offset="0x9C78"/>
<Texture Name="gNiwGirlEyeOpenTex" OutName="eye_open" Format="rgb5a1" Width="32" Height="32" Offset="0x4178"/>
<Texture Name="gNiwGirlEyeHalfTex" OutName="eye_half" Format="rgb5a1" Width="32" Height="32" Offset="0x4978"/>
<Texture Name="gNiwGirlEyeClosedTex" OutName="eye_closed" Format="rgb5a1" Width="32" Height="32" Offset="0x5178"/>
<Texture Name="gNiwGirlMouthTex" OutName="mouth" Format="rgb5a1" Width="32" Height="16" Offset="0x5978"/>
<Texture Name="gNiwGirlDress1Tex" OutName="dress_1" Format="rgb5a1" Width="32" Height="32" Offset="0x5FF8"/>
<Texture Name="gNiwGirlDress2Tex" OutName="dress_2" Format="rgb5a1" Width="32" Height="32" Offset="0x6FF8"/>
<Texture Name="gNiwGirlDress3Tex" OutName="dress_3" Format="rgb5a1" Width="32" Height="32" Offset="0x8FF8"/>
<Texture Name="gNiwGirlDress4Tex" OutName="dress_4" Format="rgb5a1" Width="32" Height="32" Offset="0x67F8"/>
<Texture Name="gNiwGirlDress5Tex" OutName="dress_5" Format="rgb5a1" Width="32" Height="32" Offset="0x87F8"/>
</File>
</Root>

View file

@ -0,0 +1,79 @@
<Root>
<File Name="object_jya_obj" Segment="6">
<DList Name="g1fliftDL" Offset="0x1F0"/>
<Collision Name="g1fliftCol" Offset="0x4A8" />
<Texture Name="g1f1fiftTopTex" OutName="1flift_top" Format="rgb5a1" Width="32" Height="32" Offset="0x1B940"/>
<Texture Name="g1fLiftBottomTex" OutName="1flift_bottom" Format="rgb5a1" Width="32" Height="32" Offset="0x17540"/>
<DList Name="gAmishutterDL" Offset="0xC0A0"/>
<Collision Name="gAmishutterCol" Offset="0xC4C8" />
<DList Name="gBigMirror1DL" Offset="0xBC70"/>
<DList Name="gBigMirror2DL" Offset="0xBD80"/>
<DList Name="gBigMirror3DL" Offset="0xE1B0"/>
<DList Name="gBigMirror4DL" Offset="0xE2D0"/>
<Texture Name="gBigMirrorGradientTex" OutName="mirror_gradient" Format="ia16" Width="8" Height="128" Offset="0x1AB40"/>
<DList Name="gBombchuiwaDL" Offset="0xE8D0"/>
<DList Name="gBombchuiwaLight1DL" Offset="0xDC40"/>
<DList Name="gBombchuiwaLight2DL" Offset="0xDB60"/>
<DList Name="gBombchuiwa2DL" Offset="0x119B0"/>
<DList Name="gBombiwaDL" Offset="0xE490"/>
<DList Name="gBombiwaEffectDL" Offset="0xEDC0"/>
<Texture Name="gBombiwaRockTex" OutName="bombiwa_rock" Format="rgb5a1" Width="32" Height="64" Offset="0x18B40"/>
<Texture Name="gBombiwaLight1Tex" OutName="bombiwa_light" Format="ia16" Width="32" Height="64" Offset="0x19B40"/>
<Collision Name="gBombiwaCol" Offset="0xE710" />
<DList Name="gCobra1DL" Offset="0x10790"/>
<DList Name="gCobra2DL" Offset="0x10C20"/>
<Collision Name="gCobraCol" Offset="0x1167C" />
<DList Name="gCobra3DL" Offset="0x117D0"/>
<Texture Name="gCobraMirrorStoneTex" OutName="cobra_stone" Format="rgb5a1" Width="32" Height="32" Offset="0x13D40"/>
<Texture Name="gCobraMirrorBorderTex" OutName="cobra_boarder" Format="rgb5a1" Width="16" Height="16" Offset="0x15D40"/>
<Texture Name="gCobraMirrorEyeTex" OutName="cobra_eye" Format="rgb5a1" Width="32" Height="32" Offset="0x15540"/>
<Texture Name="gCobraMirrorHandleTex" OutName="cobra_handle" Format="rgb5a1" Width="32" Height="8" Offset="0x15F40"/>
<Texture Name="gCobraMirrorMirrorTex" OutName="cobra_mirror" Format="ia16" Width="32" Height="32" Offset="0x14540"/>
<Texture Name="gCobraMirrorToothTex" OutName="cobra_tooth" Format="ia16" Width="32" Height="32" Offset="0x14D40"/>
<DList Name="gKanaamiDL" Offset="0xF000"/>
<Collision Name="gKanaamiCol" Offset="0xF208" />
<Texture Name="gKanaamiTopTex" OutName="kanaami_top" Format="rgb5a1" Width="32" Height="64" Offset="0x12540"/>
<Texture Name="gKanaamiMiddleTex" OutName="kanaami_middle" Format="rgb5a1" Width="32" Height="32" Offset="0x13540"/>
<DList Name="gLiftDL" Offset="0xCCE0"/>
<Texture Name="gLiftChainTex" OutName="lift_chain" Format="rgb5a1" Width="16" Height="32" Offset="0x17D40"/>
<Texture Name="gLiftTopTex" OutName="lift_top" Format="rgb5a1" Width="16" Height="64" Offset="0x18140"/>
<Texture Name="gLiftUpperChainTex" OutName="lift_upper_chain" Format="rgb5a1" Width="8" Height="32" Offset="0x18940"/>
<Collision Name="gLiftCol" Offset="0xD7E8" />
<DList Name="gMegami1DL" Offset="0x5780"/>
<Collision Name="GMegamiCol" Offset="0x5C4C" />
<DList Name="gMegami2DL" Offset="0xB9F8"/>
<DList Name="gMegamiPiece1DL" Offset="0x9928"/>
<DList Name="gMegamiPiece2DL" Offset="0x9AC0"/>
<DList Name="gMegamiPiece3DL" Offset="0x9C80"/>
<DList Name="gMegamiPiece4DL" Offset="0x9DE8"/>
<DList Name="gMegamiPiece5DL" Offset="0x9F60"/>
<DList Name="gMegamiPiece6DL" Offset="0xA0A8"/>
<DList Name="gMegamiPiece7DL" Offset="0xA278"/>
<DList Name="gMegamiPiece8DL" Offset="0xA418"/>
<DList Name="gMegamiPiece9DL" Offset="0xA568"/>
<DList Name="gMegamiPiece10DL" Offset="0xA6A0"/>
<DList Name="gMegamiPiece11DL" Offset="0xA7E0"/>
<DList Name="gMegamiPiece12DL" Offset="0xA978"/>
<DList Name="gMegamiPiece13DL" Offset="0xAAC8"/>
<Texture Name="gMegami1TLUT" OutName="megami_palette_1" Format="rgb5a1" Width="4" Height="4" Offset="0x5C80"/>
<Texture Name="gMegami1Tex" OutName="megami_tex_1" Format="ci4" Width="64" Height="64" Offset="0x5CE8"/>
<Texture Name="gMegami2TLUT" OutName="megami_palette_2" Format="rgb5a1" Width="4" Height="4" Offset="0xAC50"/>
<Texture Name="gMegami2Tex" OutName="megami_tex_2" Format="ci4" Width="64" Height="64" Offset="0xACB8"/>
<Texture Name="gMegami3TLUT" OutName="megami_palette_3" Format="rgb5a1" Width="4" Height="64" Offset="0x6CE8"/>
<Texture Name="gMegami3Tex" OutName="megami_tex_3" Format="ci4" Width="64" Height="64" Offset="0x64E8"/>
<Texture Name="gMegami4TLUT" OutName="megami_palette_4" Format="rgb5a1" Width="4" Height="4" Offset="0x5CA0"/>
<Texture Name="gMegami5TLUT" OutName="megami_palette_5" Format="rgb5a1" Width="4" Height="4" Offset="0xAC70"/>
<Texture Name="gMeagmiRightCrumble1Tex" OutName="megami_right_crumble_1" Format="ci4" Width="64" Height="64" Offset="0xD00"/>
<Texture Name="gMeagmiRightCrumble2Tex" OutName="megami_right_crumble_2" Format="ci4" Width="64" Height="64" Offset="0x1D00"/>
<Texture Name="gMeagmiRightCrumble3Tex" OutName="megami_right_crumble_3" Format="ci4" Width="64" Height="64" Offset="0x2500"/>
<Texture Name="gMeagmiRightCrumble4Tex" OutName="megami_right_crumble_4" Format="ci4" Width="64" Height="64" Offset="0x2D00"/>
<Texture Name="gMeagmiRightCrumble5Tex" OutName="megami_right_crumble_5" Format="ci4" Width="64" Height="64" Offset="0x4D00"/>
<Texture Name="gMeagmiLeftCrumble1Tex" OutName="megami_left_crumble_1" Format="ci4" Width="64" Height="64" Offset="0x1500"/>
<Texture Name="gMeagmiLeftCrumble2Tex" OutName="megami_left_crumble_2" Format="ci4" Width="64" Height="64" Offset="0x3500"/>
<Texture Name="gMeagmiLeftCrumble3Tex" OutName="megami_left_crumble_3" Format="ci4" Width="64" Height="64" Offset="0x3D00"/>
<Texture Name="gMeagmiLeftCrumble4Tex" OutName="megami_left_crumble_4" Format="ci4" Width="64" Height="64" Offset="0x4500"/>
<Texture Name="gMeagmiLeftCrumble5Tex" OutName="megami_left_crumble_5" Format="ci4" Width="64" Height="64" Offset="0x0500"/>
<DList Name="gZurerukabeDL" Offset="0x12340"/>
<Collision Name="gZurerukabeCol" Offset="0x12508" />
</File>
</Root>

View file

@ -0,0 +1,225 @@
<Root>
<File Name="object_link_child" Segment="6">
<Skeleton Name="gLinkChildSkel" Type="Flex" LimbType="LOD" Offset="0x2CF6C"/>
<!--Far Limb DLists-->
<DList Name="gLinkChildLeftHandFarDL" Offset="0x16280"/>
<DList Name="gLinkChildRightHandFarDL" Offset="0x164E0"/>
<DList Name="gLinkChildSwordAndSheathFarDL" Offset="0x17360"/>
<DList Name="gLinkChildWaistFarDL" Offset="0x1AEC8"/>
<DList Name="gLinkChildLeftThighFarDL" Offset="0x1B0F8"/>
<DList Name="gLinkChildLeftShinFarDL" Offset="0x1B2B8"/>
<DList Name="gLinkChildLeftFootFarDL" Offset="0x1B510"/>
<DList Name="gLinkChildRightThighFarDL" Offset="0x1B638"/>
<DList Name="gLinkChildRightShinFarDL" Offset="0x1B7F8"/>
<DList Name="gLinkChildRightFootFarDL" Offset="0x1BA50"/>
<DList Name="gLinkChildCollarFarDL" Offset="0x1BB78"/>
<DList Name="gLinkChildTorsoFarDL" Offset="0x1BBD8"/>
<DList Name="gLinkChildHeadFarDL" Offset="0x1BDA0"/>
<DList Name="gLinkChildHatFarDL" Offset="0x1C2A8"/>
<DList Name="gLinkChildLeftShoulderFarDL" Offset="0x1C398"/>
<DList Name="gLinkChildLeftForearmFarDL" Offset="0x1C558"/>
<DList Name="gLinkChildRightShoulderFarDL" Offset="0x1C688"/>
<DList Name="gLinkChildRightForearmFarDL" Offset="0x1C848"/>
<!--Near Limb DLists-->
<DList Name="gLinkChildLeftHandNearDL" Offset="0x13CB0"/>
<DList Name="gLinkChildRightHandNearDL" Offset="0x141C0"/>
<DList Name="gLinkChildSwordAndSheathNearDL" Offset="0x15248"/>
<DList Name="gLinkChildWaistNearDL" Offset="0x202A8"/>
<DList Name="gLinkChildLeftThighNearDL" Offset="0x204F0"/>
<DList Name="gLinkChildLeftShinNearDL" Offset="0x206E8"/>
<DList Name="gLinkChildLeftFootNearDL" Offset="0x20978"/>
<DList Name="gLinkChildRightThighNearDL" Offset="0x20AD8"/>
<DList Name="gLinkChildRightShinNearDL" Offset="0x20CD0"/>
<DList Name="gLinkChildRightFootNearDL" Offset="0x20F60"/>
<DList Name="gLinkChildCollarNearDL" Offset="0x210C0"/>
<DList Name="gLinkChildTorsoNearDL" Offset="0x21130"/>
<DList Name="gLinkChildHeadNearDL" Offset="0x21360"/>
<DList Name="gLinkChildHatNearDL" Offset="0x219B0"/>
<DList Name="gLinkChildLeftShoulderNearDL" Offset="0x21AE8"/>
<DList Name="gLinkChildLeftForearmNearDL" Offset="0x21CB8"/>
<DList Name="gLinkChildRightShoulderNearDL" Offset="0x21E18"/>
<DList Name="gLinkChildRightForearmNearDL" Offset="0x21FE8"/>
<!--Limbs-->
<Limb Name="gLinkChildLimb_02CDC8" Type="LOD" Offset="0x2CDC8"/>
<Limb Name="gLinkChildWaistLimb" Type="LOD" Offset="0x2CDD8"/>
<Limb Name="gLinkChildLimb_02CDE8" Type="LOD" Offset="0x2CDE8"/>
<Limb Name="gLinkChildLeftThighLimb" Type="LOD" Offset="0x2CDF8"/>
<Limb Name="gLinkChildLeftShinLimb" Type="LOD" Offset="0x2CE08"/>
<Limb Name="gLinkChildLeftFootLimb" Type="LOD" Offset="0x2CE18"/>
<Limb Name="gLinkChildRightThighLimb" Type="LOD" Offset="0x2CE28"/>
<Limb Name="gLinkChildRightShinLimb" Type="LOD" Offset="0x2CE38"/>
<Limb Name="gLinkChildRightFootLimb" Type="LOD" Offset="0x2CE48"/>
<Limb Name="gLinkChildLimb_02CE58" Type="LOD" Offset="0x2CE58"/>
<Limb Name="gLinkChildHandLimb" Type="LOD" Offset="0x2CE68"/>
<Limb Name="gLinkChildHatLimb" Type="LOD" Offset="0x2CE78"/>
<Limb Name="gLinkChildCollarLimb" Type="LOD" Offset="0x2CE88"/>
<Limb Name="gLinkChildRightSholderLimb" Type="LOD" Offset="0x2CE98"/>
<Limb Name="gLinkChildRightForearmLimb" Type="LOD" Offset="0x2CEA8"/>
<Limb Name="gLinkChildLeftHandLimb" Type="LOD" Offset="0x2CEB8"/>
<Limb Name="gLinkChildLeftSholderLimb" Type="LOD" Offset="0x2CEC8"/>
<Limb Name="gLinkChildLeftForearmLimb" Type="LOD" Offset="0x2CED8"/>
<Limb Name="gLinkChildRightHandLimb" Type="LOD" Offset="0x2CEE8"/>
<Limb Name="gLinkChildSwordAndSheathLimb" Type="LOD" Offset="0x2CEF8"/>
<Limb Name="gLinkChildTorsoLimb" Type="LOD" Offset="0x2CF08"/>
<!--General DLists-->
<DList Name="gLinkChildLinkDekuStickDL" Offset="0x6CC0"/>
<DList Name="gLinkChildLeftHandHoldingMasterSwordDL" Offset="0x15540"/>
<DList Name="gLinkChildGoronBraceletDL" Offset="0x16118"/>
<!--Body Parts not used in Limbs-->
<DList Name="gLinkChildLeftFistNearDL" Offset="0x13E18"/>
<DList Name="gLinkChildRightHandClosedNearDL" Offset="0x14320"/>
<DList Name="gLinkChildRightHandClosedFarDL" Offset="0x16620"/>
<DList Name="gLinkChildLeftFistFarDL" Offset="0x163C0"/>
<DList Name="gLinkChildLeftFistAndKokiriSwordNearDL" Offset="0x13F38"/>
<DList Name="gLinkChildLeftFistAndKokiriSwordFarDL" Offset="0x17630"/>
<DList Name="gLinkChildRightFistAndDekuShieldNearDL" Offset="0x14440"/>
<DList Name="gLinkChildRightFistAndDekuShieldFarDL" Offset="0x16740"/>
<DList Name="gLinkChildLeftFistAndBoomerangNearDL" Offset="0x14660"/>
<DList Name="gLinkChildLeftFistAndBoomerangFarDL" Offset="0x16908"/>
<DList Name="gLinkChildHylianShieldSwordAndSheathNearDL" Offset="0x148A8"/>
<DList Name="gLinkChildHylianShieldSwordAndSheathFarDL" Offset="0x16A98"/>
<DList Name="gLinkChildHylianShieldAndSheathNearDL" Offset="0x14B40"/>
<DList Name="gLinkChildHylianShieldAndSheathFarDL" Offset="0x16CF8"/>
<DList Name="gLinkChildDekuShieldSwordAndSheathNearDL" Offset="0x14D68"/>
<DList Name="gLinkChildDekuShieldSwordAndSheathFarDL" Offset="0x16EE8"/>
<DList Name="gLinkChildDekuShieldAndSheathNearDL" Offset="0x15010"/>
<DList Name="gLinkChildDekuShieldAndSheathFarDL" Offset="0x17150"/>
<DList Name="gLinkChildSheathNearDL" Offset="0x15408"/>
<DList Name="gLinkChildSheathFarDL" Offset="0x17500"/>
<DList Name="gLinkChildRightHandAndOOTNearDL" Offset="0x15958"/>
<DList Name="gLinkChildRightHandHoldingOOTFarDL" Offset="0x178A0"/>
<DList Name="gLinkChildRightHandHoldingFairyOcarinaNearDL" Offset="0x15BA8"/>
<DList Name="gLinkChildRightHandHoldingFairyOcarinaFarDL" Offset="0x17AF0"/>
<DList Name="gLinkChildRightHandHoldingFairySlingshotNearDL" Offset="0x15DF0"/>
<DList Name="gLinkChildRightHandHoldingFairySlingshotFarDL" Offset="0x17D38"/>
<DList Name="gLinkChildLeftHandUpNearDL" Offset="0x15FD0"/>
<DList Name="gLinkChildLeftHandUpFarDL" Offset="0x17F00"/>
<DList Name="gLinkChildRightArmStretchedSlingshotDL" Offset="0x18048"/>
<DList Name="gLinkChildBottleDL" Offset="0x18478"/>
<DList Name="gLinkChildDL_18580" Offset="0x18580"/>
<DList Name="gLinkChildBottle2DL" Offset="0x18648"/>
<DList Name="gLinkChildSlinghotStringDL" Offset="0x221A8"/>
<DList Name="gLinkChildDekuShieldDL" Offset="0x224F8"/>
<Mtx Name="gLinkChildDekuShieldMtx" Offset="0x22648"/>
<DList Name="gLinkChildDekuShieldWithMatrixDL" Offset="0x22688"/>
<!--Masks-->
<DList Name="gLinkChildSkullMaskDL" Offset="0x2AD40"/>
<DList Name="gLinkChildSpookyMaskDL" Offset="0x2AF70"/>
<DList Name="gLinkChildKeatonMaskDL" Offset="0x2B060"/>
<DList Name="gLinkChildMaskOfTruthDL" Offset="0x2B1F0"/>
<DList Name="gLinkChildGoronMaskDL" Offset="0x2B350"/>
<DList Name="gLinkChildZoraMaskDL" Offset="0x2B580"/>
<DList Name="gLinkChildGerudoMaskDL" Offset="0x2B788"/>
<DList Name="gLinkChildBunnyHoodDL" Offset="0x2CA38"/>
<!--Textures-->
<Texture Name="gLinkChildNoseTex" OutName="link_child_nose" Format="ci8" Width="16" Height="16" Offset="0x5000"/>
<Texture Name="gLinkChildUnusedHandTex" OutName="link_child_hand_unused" Format="ci8" Width="16" Height="16" Offset="0x5100"/>
<Texture Name="gLinkChildEarTex" OutName="link_child_ear" Format="ci8" Width="16" Height="16" Offset="0x5200"/>
<Texture Name="gLinkChildLowerBootTex" OutName="link_child_lower_boot" Format="ci8" Height="16" Width="16" Offset="0x5C00"/>
<Texture Name="gLinkChildUnusedBootTex" OutName="link_child_unused_boot" Format="ci8" Height="32" Width="24" Offset="0x5D00"/><!--Unused so hard to verify-->
<Texture Name="gLinkChildBootTex" OutName="link_child_boot" Format="ci8" Width="32" Height="32" Offset="0x6000"/>
<Texture Name="gLinkChildWaistTex" OutName="link_child_waist" Format="i8" Width="32" Height="32" Offset="0x6400"/>
<Texture Name="gLinkChildBeltTex" OutName="link_child_belt" Format="ci8" Width="8" Height="16" Offset="0x6800"/>
<Texture Name="gLinkChildBeltClaspTex" OutName="link_child_belt_clasp" Format="ci8" Width="32" Height="16" Offset="0x6880"/>
<Texture Name="gLinkChildFairyOcarinaTex" OutName="link_child_fairy_ocarina" Format="rgb5a1" Width="32" Height="16" Offset="0x6E08"/>
<Texture Name="gLinkChildDekuShieldBackTex" OutName="link_child_deku_shield_back" Format="rgb5a1" Height="32" Width="32" Offset="0x7688"/>
<Texture Name="gLinkChildDekuShieldFrontTex" OutName="link_child_deku_shield_front" Format="rgb5a1" Height="32" Width="64" Offset="0x7E88"/>
<Texture Name="gLinkChildHylianShieldBackTex" OutName="link_child_hylian_shield_back" Format="rgb5a1" Height="32" Width="16" Offset="0x8E88"/>
<Texture Name="gLinkChildSlingshotTex" OutName="link_child_slingshot" Format="rgb5a1" Width="16" Height="32" Offset="0x9288"/>
<Texture Name="gLinkChildSlingshotSeedTex" Outname="link_child_slingshot_seed" Format="rgb5a1" Width="32" Height="32" Offset="0x9688"/>
<Texture Name="gLinkChildHandTex" OutName="link_child_hand" Format="ci8" Width="16" Height="16" Offset="0xA1F0"/>
<Texture Name="gLinkChildKokiriSwordSheathTex" OutName="link_child_kokiri_sword_sheath" Format="ci8" Height="16" Width="16" Offset="0xA2F0"/>
<Texture Name="gLinkChildSwordJewelTex" OutName="link_child_sword_jewel" Format="ci8" Width="32" Height="16" Offset="0xA3F0"/>
<Texture Name="gLinkChildMasterSwordPommelTex" OutName="link_child_master_sword_pommel" Format="ci8" Height="16" Width="16" Offset="0xA5F0"/>
<Texture Name="gLinkChildMasterSwordGuardTex" OutName="link_child_master_sword_guard" Format="ci8" Height="32" Width="32" Offset="0xA6F0"/>
<Texture Name="gLinkChildMasterSwordEmblemTex" OutName="link_child_master_sword_emblem" Format="ci8" Height="16" Width="16" Offset="0xAAF0"/>
<Texture Name="gLinkChildGoronBracletTex" OutName="link_child_goron_braclet" Format="rgb5a1" Width="8" Height="8" Offset="0x7208"/>
<Texture Name="gLinkChildGoronSymbolTex" Outname="link_child_goron_symbol" Format="ia16" Width="16" Height="32" Offset="0x7288"/>
<Texture Name="gLinkChildSkullMaskTeethTex" OutName="link_child_skull_mask_teeth" Format="rgb5a1" Width="8" Height="8" Offset="0x26BA0"/>
<Texture Name="gLinkChildSkullMaskNoseTex" OutName="link_child_skull_mask_nose" Format="rgb5a1" Width="8" Height="8" Offset="0x27520"/>
<Texture Name="gLinkChildSkullMaskEyeTex" OutName="link_child_skull_mask_eye" Format="rgb5a1" Width="16" Height="16" Offset="0x23B20"/>
<Texture Name="gLinkChildSpookyMaskTex" OutName="link_child_spooky_mask" Format="ia16" Width="32" Height="64" Offset="0x226A0"/>
<Texture Name="gLinkChildKeatonMaskEyeBrowTex" OutName="link_child_keaton_mask_eye_brow" Format="rgb5a1" Width="32" Height="16" Offset="0x236A0"/>
<Texture Name="gLinkChildKeatonMaskEarTex" OutName="link_child_keaton_mask_ear" Format="rgb5a1" Width="8" Height="8" Offset="0x23AA0"/>
<Texture Name="gLinkChildMaskOfTruthCurveTex" OutName="link_child_mask_of_truth_curves" Format="rgb5a1" Width="16" Height="32" Offset="0x24D20"/>
<Texture Name="gLinkChildMaskOfTruthTex" OutName="link_child_mask_of_truth" Format="rgb5a1" Width="32" Height="64" Offset="0x23D20"/>
<Texture Name="gLinkChildGoronMaskMouthTex" OutName="link_child_goron_mask_mouth" Format="rgb5a1" Width="64" Height="32" Offset="0x25120"/>
<Texture Name="gLinkChildGoronMaskEyeTex" OutName="link_child_goron_mask_eye" Format="rgb5a1" Width="32" Height="32" Offset="0x26120"/>
<Texture Name="gLinkChildGoronMaskNoseTex" OutName="link_child_goron_mask_nose" Format="rgb5a1" Width="8" Height="8" Offset="0x26920"/>
<Texture Name="gLinkChildGoronMaskHairTex" OutName="link_child_goron_mask_hair" Format="rgb5a1" Width="16" Height="16" Offset="0x269A0"/>
<Texture Name="gLinkChildGoronMaskEarTex" OutName="link_child_goron_mask_ear" Format="rgb5a1" Width="8" Height="8" Offset="0x26C20"/><!--TODO verify this-->
<Texture Name="gLinkChildZoraMaskEyeBoarderTex" OutName="link_child_zora_mask_eye_boarder" Format="rgb5a1" Width="8" Height="8" Offset="0x26CA0"/>
<Texture Name="gLinkChildZoraMaskEarTex" OutName="link_child_zora_mask_ear" Format="rgb5a1" Width="32" Height="32" Offset="0x26D20"/>
<Texture Name="gLinkChildZoraMaskEyeTex" OutName="link_child_zora_mask_eye" Format="rgb5a1" Width="32" Height="32" Offset="0x275A0"/>
<Texture Name="gLinkChildZoraMaskMouthTex" OutName="link_child_zora_mask_mouth" Format="rgb5a1" Width="32" Height="32" Offset="0x27DA0"/>
<Texture Name="gLinkChildGerudoMaskEyeTex" OutName="link_child_gerudo_mask_eye" Format="rgb5a1" Width="32" Height="32" Offset="0x285A0"/>
<Texture Name="gLinkChildGerudoMaskMouthTex" OutName="link_child_gerudo_mask_mouth" Format="rgb5a1" Width="16" Height="16" Offset="0x28DA0"/>
<Texture Name="gLinkChildGerudoMaskHairTex" OutName="link_child_gerudo_mask_hair" Format="rgb5a1" Width="16" Height="16" Offset="0x28FA0"/>
<Texture Name="gLinkChildGerudoMaskNoseTex" OutName="link_child_gerudo_mask_nose" Format="rgb5a1" Width="8" Height="8" Offset="0x291A0"/>
<Texture Name="gLinkChildBunnyHoodEyeTex" OutName="link_child_bunny_hood_eye" Format="rgb5a1" Width="16" Height="16" Offset="0x2BA28"/>
<Texture Name="gLinkChildBunnyHoodTex" OutName="link_child_bunny_hood" Format="rgb5a1" Width="16" Height="32" Offset="0x2BC28"/>
<Texture Name="gLinkChildBunnyHoodEarTex" OutName="link_child_bunny_hood_ear" Format="rgb5a1" Width="16" Height="32" Offset="0x2C028"/>
<!--TLUTettes-->
<Texture Name="gLinkChildSkinTLUT" OutName="link_child_skin_TLUT" Format="rgb5a1" Width="16" Height="16" Offset="0x5500"/>
<Texture Name="gLinkChildHandTLUT" OutName="link_child_hand_TLUT" Format="rgb5a1" Width="17" Height="4" Offset="0x9E88"/>
<Texture Name="gLinkChildSwordsTLUT" OutName="link_child_swords_TLUT" Format="rgb5a1" Width="20" Height="13" Offset="0x9F10"/> <!--For both the kokiri sword sheath and master sword-->
<Texture Name="gLinkChildSwordTLUT" OutName="link_child_sword_TLUT" Format="rgb5a1" Width="27" Height="4" Offset="0xA118"/>
<Texture Name="gLinkChildBeltTLUT" OutName="link_child_belt_TLUT" Format="rgb5a1" Width="16" Height="16" Offset="0x5300"/>
<!--Eyes-->
<Texture Name="gLinkChildEyesOpenTex" OutName="link_child_eyes_open" Format="i8" Width="64" Height="32" Offset="0x0000"/>
<Texture Name="gLinkChildEyesHalfTex" OutName="link_child_eyes_half" Format="i8" Width="64" Height="32" Offset="0x0800"/>
<Texture Name="gLinkChildEyesClosedfTex" OutName="link_child_eyes_closed" Format="i8" Width="64" Height="32" Offset="0x1000"/>
<Texture Name="gLinkChildEyesRollLeftTex" OutName="link_child_eyes_roll_left" Format="i8" Width="64" Height="32" Offset="0x1800"/><!--Left from links perspective-->
<Texture Name="gLinkChildEyesRollRightTex" OutName="link_child_eyes_roll_right" Format="i8" Width="64" Height="32" Offset="0x2000"/><!--Right from links perspective-->
<Texture Name="gLinkChildEyesShockTex" OutName="link_child_eyes_shock" Format="i8" Width="64" Height="32" Offset="0x2800"/>
<Texture Name="gLinkChildEyesUnk1Tex" OutName="link_child_eyes_unk_1" Format="i8" Width="64" Height="32" Offset="0x3000"/>
<Texture Name="gLinkChildEyesUnk2Tex" OutName="link_child_eyes_unk_2" Format="i8" Width="64" Height="32" Offset="0x3800"/>
<!--Mouth-->
<Texture Name="gLinkChildMouth1Tex" OutName="link_mouth_1" Format="i8" Width="32" Height="32" Offset="0x4000"/>
<Texture Name="gLinkChildMouth2Tex" OutName="link_mouth_2" Format="i8" Width="32" Height="32" Offset="0x4400"/>
<Texture Name="gLinkChildMouth3Tex" OutName="link_mouth_3" Format="i8" Width="32" Height="32" Offset="0x4800"/>
<Texture Name="gLinkChildMouth4Tex" OutName="link_mouth_4" Format="i8" Width="32" Height="32" Offset="0x4C00"/>
<!--Unused Vtx-->
<Array Name="gLinkChildVtx_019E08" Count="35" Offset="0x19E08">
<Vtx/>
</Array>
<Array Name="gLinkChildVtx_01A428" Count="39" Offset="0x1A428">
<Vtx/>
</Array>
<Array Name="gLinkChildVtx_01AA98" Count="40" Offset="0x1AA98">
<Vtx/>
</Array>
<Array Name="gLinkChildVtx_01EB38" Count="39" Offset="0x1EB38">
<Vtx/>
</Array>
<Array Name="gLinkChildVtx_01F2B8" Count="39" Offset="0x1F2B8">
<Vtx/>
</Array>
<Array Name="gLinkChildVtx_01FA28" Count="62" Offset="0x1FA28">
<Vtx/>
</Array>
</File>
</Root>

View file

@ -0,0 +1,59 @@
<Root>
<File Name="object_mb" Segment="6">
<Skeleton Name="gEnMbSkel_008F38" Type="Flex" LimbType="Standard" Offset="0x8F38"/>
<Skeleton Name="gEnMbSkel_014190" Type="Flex" LimbType="Standard" Offset="0x14190"/>
<Animation Name="gEnMbFallForwardAnim" Offset="0x6A4"/><!--Unused-->
<Animation Name="gEnMbAnim_00095C" Offset="0x95C"/><!--Unused-->
<Animation Name="gEnMbAnim_001000" Offset="0x1000"/><!--Unused-->
<Animation Name="gEnMbFallBackAnim" Offset="0x16B4"/>
<Animation Name="gEnMbAnim_001950" Offset="0x1950"/>
<Animation Name="gEnMbStandStillAnim" Offset="0x28E0"/>
<Animation Name="gEnMbReadyAttackAnim" Offset="0x2C10"/>
<Animation Name="gEnMbChargePlayerAnim" Offset="0x2F10"/>
<Animation Name="gEnMbLookLeftAndRightAnim" Offset="0x41A8"/>
<Animation Name="gEnMbResumePatrolAnim" Offset="0x9280"/>
<Animation Name ="gEnMbAnim_009450" Offset="0x9450"/> <!--Unused -->
<Animation Name="gEnMbWalkAnim" Offset="0x9FC0"/>
<Animation Name="gEnMbUnusedGrabSpearAnim" Offset="0xA410"/>
<Animation Name="gEnMbUnusedGrabSpear2Anim" Offset="0xA80C"/>
<Animation Name="gEnMbAnim_00ABE0" Offset="0xABE0"/>
<Animation Name="gEnMbAnim_00B4BC" Offset="0xB4BC"/>
<Animation Name="gEnMbAnim_00BE58" Offset="0xBE58"/>
<Animation Name="gEnMbAnim_00C44C" Offset="0xC44C"/>
<Animation Name="gEnMbAnim_00CF1C" Offset="0xCF1C"/>
<Animation Name="gEnMbAnim_00D380" Offset="0xD380"/>
<Animation Name="gEnMbAnim_00D5D4" Offset="0xD5D4"/>
<Animation Name="gEnMbAnim_00E18C" Offset="0xE18C"/>
<Animation Name="gEnMbAnim_00EBE4" Offset="0xEBE4"/>
<DList Name="gEnMbDL_006930" Offset="0x06930"/>
<DList Name="gEnMbDL_006A18" Offset="0x06A18"/>
<DList Name="gEnMbDL_006B20" Offset="0x06B20"/>
<DList Name="gEnMbDL_006CD0" Offset="0x06CD0"/>
<DList Name="gEnMbDL_006DD8" Offset="0x06DD8"/>
<DList Name="gEnMbDL_006EE0" Offset="0x06EE0"/>
<DList Name="gEnMbDL_007090" Offset="0x07090"/>
<DList Name="gEnMbDL_007198" Offset="0x07198"/><!--Spear-->
<DList Name="gEnMbDL_0073F0" Offset="0x073F0"/>
<DList Name="gEnMbDL_007500" Offset="0x07500"/>
<DList Name="gEnMbDL_0076C8" Offset="0x076C8"/>
<DList Name="gEnMbDL_0077F8" Offset="0x077F8"/>
<DList Name="gEnMbDL_007AD0" Offset="0x07AD0"/>
<DList Name="gEnMbDL_007E70" Offset="0x07E70"/>
<Texture Name="gEnMbFaceTex" OutName="face" Format="rgb5a1" Width="16" Height="32" Offset="0x8528"/>
<DList Name="gEnMbDL_012580" Offset="0x12580"/>
<DList Name="gEnMbDL_012698" Offset="0x12698"/>
<DList Name="gEnMbDL_012868" Offset="0x12868"/>
<DList Name="gEnMbDL_012A18" Offset="0x12A18"/>
<DList Name="gEnMbDL_012B20" Offset="0x12B20"/>
<DList Name="gEnMbDL_012CF0" Offset="0x12CF0"/>
<DList Name="gEnMbDL_012EA0" Offset="0x12EA0"/>
<DList Name="gEnMbDL_012FA8" Offset="0x12FA8"/>
<DList Name="gEnMbDL_0130D8" Offset="0x130D8"/>
<DList Name="gEnMbDL_013228" Offset="0x13228"/>
<DList Name="gEnMbDL_013440" Offset="0x13440"/>
<DList Name="gEnMbDL_0136C8" Offset="0x136C8"/>
<DList Name="gEnMbDL_013818" Offset="0x13818"/>
<DList Name="gEnMbDL_013A30" Offset="0x13A30"/>
<DList Name="gEnMbDL_013DF0" Offset="0x13DF0"/>
</File>
</Root>

View file

@ -0,0 +1,24 @@
<Root>
<File Name="object_mori_objects" Segment="6">
<Texture Name="gMoriHashiraTLUT" OutName="hashira_palette" Width="112" Height="1" Format="rgb5a1" Offset="0x0000"/>
<Texture Name="gMoriHashiraTex" OutName="hashira" Width="32" Height="32" Format="ci8" Offset="0x00E0"/>
<Texture Name="gMoriHashigoClaspTLUT" OutName="hashigo_clasp_palette" Width="112" Height="1" Format="rgb5a1" Offset="0x3810"/>
<Texture Name="gMoriHashigoClaspTex" OutName="hashigo_clasp" Width="32" Height="32" Format="ci8" Offset="0x38F0"/>
<Collision Name="gMoriBigstCol" Offset="0x221C"/>
<DList Name="gMoriBigstDL" Offset="0x1E50"/>
<Collision Name="gMoriElevatorCol" Offset="0x35F8"/>
<DList Name="gMoriElevatorDL" Offset="0x2AD0"/>
<Collision Name="gMoriHashigoCol" Offset="0x37D8"/>
<DList Name="gMoriHashigoLadderDL" Offset="0x36B0"/>
<DList Name="gMoriHashigoClaspDL" Offset="0x4770"/>
<Collision Name="gMoriHashira1Col" Offset="0x1AF8"/>
<Collision Name="gMoriHashira2Col" Offset="0x89E0"/>
<DList Name="gMoriHashiraPlatformsDL" Offset="0x1300"/>
<DList Name="gMoriHashiraGateDL" Offset="0x8840"/>
<DList Name="gMoriIdomizuWaterDL" Offset="0x49D0"/>
<Collision Name="gMoriKaitenkabeCol" Offset="0x63B8"/>
<DList Name="gMoriKaitenkabeDL" Offset="0x56B0"/>
<Collision Name="gMoriRakkatenjoCol" Offset="0x87AC"/>
<DList Name="gMoriRakkatenjoDL" Offset="0x7690"/>
</File>
</Root>

View file

@ -3,8 +3,8 @@
<Texture Name="gEnNyRockBodyTex" OutName="rock_body" Format="rgb5a1" Width="16" Height="16" Offset="0x0000"/>
<Texture Name="gEnNySpikeTex" OutName="spike" Format="rgb5a1" Width="32" Height="32" Offset="0x0200"/>
<Texture Name="gEnNyMetalBodyTex" OutName="metal_body" Format="rgb5a1" Width="32" Height="32" Offset="0x0A00"/>
<DList Name="gEnNyRockBodyDlist" Offset="0x1DD0"/>
<DList Name="gEnNyMetalBodyDlist" Offset="0x1EA8"/>
<DList Name="gEnNySpikeDlist" Offset="0x1FC8"/>
<DList Name="gEnNyRockBodyDL" Offset="0x1DD0"/>
<DList Name="gEnNyMetalBodyDL" Offset="0x1EA8"/>
<DList Name="gEnNySpikeDL" Offset="0x1FC8"/>
</File>
</Root>

View file

@ -0,0 +1,70 @@
<Root>
<File Name="object_sd" Segment="6">
<Skeleton Name="gEnHeishiSkel" Type="Standard" LimbType="Standard" Offset="0xBAC8"/>
<Limb Name="gEnHeishiRootLimb" LimbType="Standard" Offset="0xB9C8"/>
<Limb Name="gEnHeishiTorsoLimb" LimbType="Standard" Offset="0xB9D4"/>
<Limb Name="gEnHeishiLeftThighLimb" LimbType="Standard" Offset="0xB9E0"/>
<Limb Name="gEnHeishiLeftShinLimb" LimbType="Standard" Offset="0xB9EC"/>
<Limb Name="gEnHeishiLeftFootLimb" LimbType="Standard" Offset="0xB9F8"/>
<Limb Name="gEnHeishiRightThighLimb" LimbType="Standard" Offset="0xBA04"/>
<Limb Name="gEnHeishiRightShinLimb" LimbType="Standard" Offset="0xBA10"/>
<Limb Name="gEnHeishiRightFootLimb" LimbType="Standard" Offset="0xBA1C"/>
<Limb Name="gEnHeishiChestLimb" LimbType="Standard" Offset="0xBA28"/>
<Limb Name="gEnHeishiLeftUpperArmLimb" LimbType="Standard" Offset="0xBA34"/>
<Limb Name="gEnHeishiLeftArmLimb" LimbType="Standard" Offset="0xBA40"/>
<Limb Name="gEnHeishiLeftHandLimb" LimbType="Standard" Offset="0xBA4C"/>
<Limb Name="gEnHeishiRightUpperArmLimb" LimbType="Standard" Offset="0xBA58"/>
<Limb Name="gEnHeishiRightArmLimb" LimbType="Standard" Offset="0xBA64"/>
<Limb Name="gEnHeishiRightHandLimb" LimbType="Standard" Offset="0xBA70"/>
<Limb Name="gEnHeishiRightHeadLimb" LimbType="Standard" Offset="0xBA7C"/>
<Animation Name="gEnHeishiSlamSpearAnim" Offset="0x5500"/>
<Animation Name="gEnHeishiWalkAnim" Offset="0x5880"/>
<Animation Name="gEnHeishiIdleAnim" Offset="0x5C30"/>
<Animation Name="gEnHeishiDyingGuardTalkAnim" Offset="0xC6C8"/>
<Animation Name="gEnHeishiDyingGuardDieAnim" Offset="0xC374"/>
<Animation Name="gEnHeishiDyingGuardAnim_00C444" Offset="0xC444"/>
<DList Name="gHeishiKingGuardDL" Offset="0x2C10"/>
<DList Name="gEnHeishiHeadDL" Offset="0xA030"/>
<DList Name="gEnHeishiTorsoArmorDL" Offset="0xA440"/>
<DList Name="gEnHeishiTorsoDL" Offset="0xA6F8"/><!--Belt?-->
<DList Name="gEnHeishiRightFootDL" Offset="0xA848"/>
<DList Name="gEnHeishiLeg1DL" Offset="0xA930"/>
<DList Name="gEnHeishiUpperLeg1DL" Offset="0xAAC0"/>
<DList Name="gEnHeishiSpearDL" Offset="0xAC10"/>
<DList Name="gEnHeishiLowerRightArmDL" Offset="0xAEC0"/>
<DList Name="gEnHeishiUpperArmDL" Offset="0xB050"/>
<DList Name="gEnHeishiLeftFootDL" Offset="0xB158"/>
<DList Name="gEnHeishiLeftShinDL" Offset="0xB240"/>
<DList Name="gEnHeishiLeftThighDL" Offset="0xB3D0"/>
<DList Name="gEnHeishiHandDL" Offset="0xB520"/>
<DList Name="gEnHeishiLeftArmDL" Offset="0xB730"/>
<DList Name="gEnHeishiUpperLeftArmDL" Offset="0xB8C0"/>
<!--King Guard Textures-->
<Texture Name="gEnHeishiKingGuardTLUT" OutName="king_guard_tlut" Format="rgb5a1" Width="16" Height="16" Offset="0x0000"/>
<Texture Name="gEnHeishiKingGuardTex_200" Format="ci8" Width="8" Height="8" Offset="0x0200"/><!--Mouth?-->
<Texture Name="gEnHeishiKingGuardTex_240" Format="ci8" Width="8" Height="8" Offset="0x0240"/><!--Eyes?-->
<Texture Name="gEnHeishiKingGuardArmorTex" OutName="king_guard_armor" Format="ci8" Width="8" Height="8" Offset="0x0280"/>
<Texture Name="gEnHeishiKingGuardSholderGuardTex" OutName="king_guard_sholder_guard" Format="ci8" Width="8" Height="16" Offset="0x02C0"/>
<Texture Name="gEnHeishiKingGuardChestArmorTex" OutName="king_guard_chest_armor" Format="ci8" Width="32" Height="64" Offset="0x0340"/>
<Texture Name="gEnHeishiKingGuardTex_B40" Format="ci8" Width="16" Height="16" Offset="0x0B40"/> <!--Leg Armor?-->
<Texture Name="gEnHeishiKingGuardHandTex" OutName="king_guard_hand" Format="ci8" Width="8" Height="8" Offset="0x0C40"/>
<Texture Name="gEnHeishiKingGuardPantsTex" OutName="king_guard_pants" Format="ci8" Width="16" Height="16" Offset="0x0C80"/>
<!--Normal Guard Textures-->
<Texture Name="gHeishiTLUT" OutName="guard_tlut" Format="rgb5a1" Width="16" Height="16" Offset="0x5C40"/>
<Texture Name="gEnHeishiMouthTex" OutName="mouth_tex" Format="ci8" Width="16" Height="16" Offset="0x5E40"/>
<Texture Name="gEnHeishiGradient1Tex" OutName="gradient1" Format="ci8" Width="8" Height="8" Offset="0x5F40"/>
<Texture Name="gEnHeishiGradient2Tex" OutName="gradient2" Format="ci8" Width="8" Height="8" Offset="0x5F80"/>
<Texture Name="gEnHeishiArmorTex" OutName="armor" Format="ci8" Width="8" Height="8" Offset="0x5FC0"/>
<Texture Name="gEnHeishiUniform1Tex" OutName="uniform1" Format="i4" Width="16" Height="16" Offset="0x6000"/>
<Texture Name="gEnHeishiUniform2Tex" OutName="uniform2" Format="i4" Width="16" Height="8" Offset="0x6080"/>
<Texture Name="gEnHeishiUniformGreyTriforceTex" OutName="uniform_grey_triforce" Format="i4" Width="32" Height="32" Offset="0x60C0"/>
<Texture Name="gEnHeishiUniformGoldTriforceTex" OutName="uniform_gold_triforce" Format="ci8" Width="32" Height="32" Offset="0x62C0"/>
<Texture Name="gEnHeishiLegTex" OutName="leg" Format="ci8" Width="16" Height="16" Offset="0x66C0"/>
<Texture Name="gEnHeishiTex_0067C0" Format="ci8" Width="32" Height="32" Offset="0x67C0"/>
<Texture Name="gEnHeishiHandTex" OutName="hand" Format="ci8" Width="16" Height="16" Offset="0x6BC0"/>
</File>
</Root>

View file

@ -1,5 +1,20 @@
<Root>
<File Name="object_ydan_objects" Segment="6">
<Texture Name="gYdanDoor1Tex" OutName="door_tex1" Format="rgb5a1" Width="32" Height="64" Offset="0x2800"/>
<Texture Name="gYdanWebTex" OutName="web_tex" Format="ia16" Width="32" Height="64" Offset="0x1000"/>
<Texture Name="gYdanHasiFloatingBlockSideTex" OutName="floating_block_side" Format="rgb5a1" Width="32" Height="32" Offset="0x0"/>
<Texture Name="gYdanHasiFloatingBlockBottomTex" OutName="floating_block_bottom" Format="rgb5a1" Width="32" Height="32" Offset="0x800"/>
<Texture Name="gYdanUnused1Tex" OutName="unused_1" Format="ci8" Width="32" Height="64" Offset="0x6BC8"/>
<Texture Name="gYdanHasi2TLUT" OutName="palette_2" Format="rgb5a1" Width="16" Height="16" Offset="0x69C0"/>
<Texture Name="gYdanHasi3BlocksTopTex" OutName="three_blocks_top" Format="ci8" Width="32" Height="64" Offset="0x3AF8"/>
<Texture Name="gYdanTLUT_38F0" OutName="palette_3" Format="rgb5a1" Width="16" Height="16" Offset="0x38F0"/> <!--3Blocks Palette?-->
<Texture Name="gYdanHasi3BlocksSideTex" OutName="three_blocks_side" Format="ci8" Width="32" Height="64" Offset="0x42F8"/>
<Texture Name="gYdanHasiWaterTex" OutName="water_tex" Format="ci8" Width="32" Height="32" Offset="0x5950"/>
<Texture Name="gYdanHasiWaterTLUT" OutName="water_palette" Format="rgb5a1" Width="208" Height="1" Offset="0x57B0"/>
<Texture Name="gYdanMarutaUnused1Tex" OutName="maruta_unused_1" Format="rgb5a1" Width="32" Height="32" Offset="0x2000"/>
<Texture Name="gYdanMarutaUnused2Tex" OutName="maruta_unused_2" Format="ci8" Width="32" Height="64" Offset="0x79D8"/>
<Texture Name="gYdanMaruta1TLUT" OutName="maruta_palette" Format="rgb5a1" Width="16" Height="16" Offset="0x77D0"/>
<DList Name="gDTUnknownWebDL" Offset="0x3850"/>
<DList Name="gDTRisingPlatformsDL" Offset="0x5018"/>
<DList Name="gDTWaterPlaneDL" Offset="0x5DE0"/>

View file

@ -26,9 +26,6 @@ extern u8 D_02003940[];
extern u8 D_02003AC0[];
extern u32 D_0300AA48;
extern u32 D_03012B20;
//extern ? D_0500CA70;
extern Gfx D_06006CC0[];
extern Gfx D_06016118[];
extern Gfx D_06025218[];
extern Gfx D_060252D8[];
extern Gfx D_06025438[];

27
spec
View file

@ -3453,7 +3453,8 @@ endseg
beginseg
name "gameplay_field_keep"
romalign 0x1000
include "build/baserom/gameplay_field_keep.o"
include "build/assets/objects/gameplay_field_keep/gameplay_field_keep.o"
number 5
endseg
beginseg
@ -3478,13 +3479,15 @@ endseg
beginseg
name "object_link_child"
romalign 0x1000
include "build/baserom/object_link_child.o"
include "build/assets/objects/object_link_child/object_link_child.o"
number 6
endseg
beginseg
name "object_box"
romalign 0x1000
include "build/baserom/object_box.o"
include "build/assets/objects/object_box/object_box.o"
number 6
endseg
beginseg
@ -3732,7 +3735,8 @@ endseg
beginseg
name "object_mb"
romalign 0x1000
include "build/baserom/object_mb.o"
include "build/assets/objects/object_mb/object_mb.o"
number 6
endseg
beginseg
@ -4164,7 +4168,8 @@ endseg
beginseg
name "object_mori_objects"
romalign 0x1000
include "build/baserom/object_mori_objects.o"
include "build/assets/objects/object_mori_objects/object_mori_objects.o"
number 6
endseg
beginseg
@ -4353,7 +4358,8 @@ endseg
beginseg
name "object_sd"
romalign 0x1000
include "build/baserom/object_sd.o"
include "build/assets/objects/object_sd/object_sd.o"
number 6
endseg
beginseg
@ -4948,7 +4954,8 @@ endseg
beginseg
name "object_jya_obj"
romalign 0x1000
include "build/baserom/object_jya_obj.o"
include "build/assets/objects/object_jya_obj/object_jya_obj.o"
number 6
endseg
beginseg
@ -5633,7 +5640,8 @@ endseg
beginseg
name "object_ec"
romalign 0x1000
include "build/baserom/object_ec.o"
include "build/assets/objects/object_ec/object_ec.o"
number 6
endseg
beginseg
@ -5741,7 +5749,8 @@ endseg
beginseg
name "object_gr"
romalign 0x1000
include "build/baserom/object_gr.o"
include "build/assets/objects/object_gr/object_gr.o"
number 6
endseg
beginseg

View file

@ -1,4 +1,5 @@
#include "global.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#pragma GLOBAL_ASM("asm/non_matchings/code/z_kankyo/func_8006F0A0.s")

View file

@ -1,5 +1,6 @@
#include "global.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/object_link_child/object_link_child.h"
typedef struct {
/* 0x00 */ u8 flag;
@ -11,7 +12,7 @@ typedef struct {
/* 0x04 */ Vec3f pos;
} BowStringData; // size = 0x10
FlexSkeletonHeader* gPlayerSkelHeaders[] = { 0x060377F4, 0x0602CF6C };
FlexSkeletonHeader* gPlayerSkelHeaders[] = { 0x060377F4, &gLinkChildSkel };
s16 sBootData[PLAYER_BOOTS_MAX][17] = {
{ 200, 1000, 300, 700, 550, 270, 600, 350, 800, 600, -100, 600, 590, 750, 125, 200, 130 },
@ -44,146 +45,164 @@ u8 gPlayerModelTypes[][5] = {
};
Gfx* D_80125CE8[] = {
0x060226E0, 0x06014320, 0x06027690, 0x06016620, 0x060226E0, 0x06014440, 0x06027690, 0x06016740,
0x06022970, 0x06014320, 0x06027918, 0x06016620, 0x060241C0, 0x06014320, 0x06028B40, 0x06016620,
0x060226E0, gLinkChildRightHandClosedNearDL, 0x06027690, gLinkChildRightHandClosedFarDL,
0x060226E0, gLinkChildRightFistAndDekuShieldNearDL, 0x06027690, gLinkChildRightFistAndDekuShieldFarDL,
0x06022970, gLinkChildRightHandClosedNearDL, 0x06027918, gLinkChildRightHandClosedFarDL,
0x060241C0, gLinkChildRightHandClosedNearDL, 0x06028B40, gLinkChildRightHandClosedFarDL,
};
Gfx* D_80125D28[] = {
0x06023160, 0x06015248, 0x06027F00, 0x06017360, 0x06023160, 0x06014D68, 0x06027F00, 0x06016EE8,
0x06020A78, 0x060148A8, 0x06025FB8, 0x06016A98, 0x060211B8, 0x06015248, 0x060264F0, 0x06017360,
0x06023160, gLinkChildSwordAndSheathNearDL,
0x06027F00, gLinkChildSwordAndSheathFarDL,
0x06023160, gLinkChildDekuShieldSwordAndSheathNearDL,
0x06027F00, gLinkChildDekuShieldSwordAndSheathFarDL,
0x06020A78, gLinkChildHylianShieldSwordAndSheathNearDL,
0x06025FB8, gLinkChildHylianShieldSwordAndSheathFarDL,
0x060211B8, gLinkChildSwordAndSheathNearDL,
0x060264F0, gLinkChildSwordAndSheathFarDL,
};
Gfx* D_80125D68[] = {
NULL, NULL, NULL, NULL, NULL, 0x06022688, NULL, 0x06022688,
NULL, NULL, NULL, NULL, NULL, gLinkChildDekuShieldWithMatrixDL, NULL, gLinkChildDekuShieldWithMatrixDL,
};
Gfx* D_80125D88[] = {
0x060249D8, 0x06015408, 0x06028150, 0x06017500, 0x060249D8, 0x06015010, 0x06028150, 0x06017150,
0x06020E70, 0x06014B40, 0x060262B8, 0x06016CF8, 0x060216B0, 0x06015408, 0x06026910, 0x06017500,
NULL, NULL, NULL, NULL, 0x060249D8, 0x06022688, 0x060249D8, 0x06022688,
0x060249D8, gLinkChildSheathNearDL,
0x06028150, gLinkChildSheathFarDL,
0x060249D8, gLinkChildDekuShieldAndSheathNearDL,
0x06028150, gLinkChildDekuShieldAndSheathFarDL,
0x06020E70, gLinkChildHylianShieldAndSheathNearDL,
0x060262B8, gLinkChildHylianShieldAndSheathFarDL,
0x060216B0, gLinkChildSheathNearDL,
0x06026910, gLinkChildSheathFarDL,
NULL, NULL,
NULL, NULL,
0x060249D8, gLinkChildDekuShieldWithMatrixDL,
0x060249D8, gLinkChildDekuShieldWithMatrixDL,
};
Gfx* D_80125DE8[] = {
0x060238C8, 0x06015540, 0x060286B8, 0x06015540, 0x06023D50, 0x06015540, 0x060291E8, 0x06015540,
0x060238C8, gLinkChildLeftHandHoldingMasterSwordDL, 0x060286B8, gLinkChildLeftHandHoldingMasterSwordDL,
0x06023D50, gLinkChildLeftHandHoldingMasterSwordDL, 0x060291E8, gLinkChildLeftHandHoldingMasterSwordDL,
};
Gfx* D_80125E08[] = {
0x06021AA8,
0x06013CB0,
gLinkChildLeftHandNearDL,
0x06026C58,
0x06016280,
gLinkChildLeftHandFarDL,
};
Gfx* D_80125E18[] = {
0x06021CE8,
0x06013E18,
gLinkChildLeftFistNearDL,
0x06026DF0,
0x060163C0,
gLinkChildLeftFistFarDL,
};
Gfx* D_80125E28[] = {
0x06021F78,
0x06013F38,
gLinkChildLeftFistAndKokiriSwordNearDL,
0x06027078,
0x06017630,
gLinkChildLeftFistAndKokiriSwordFarDL,
};
Gfx* D_80125E38[] = {
0x06021F78,
0x06013F38,
gLinkChildLeftFistAndKokiriSwordNearDL,
0x06027078,
0x06017630,
gLinkChildLeftFistAndKokiriSwordFarDL,
};
Gfx* D_80125E48[] = {
0x06022498,
0x060141C0,
gLinkChildRightHandNearDL,
0x060274F8,
0x060164E0,
gLinkChildRightHandFarDL,
};
Gfx* D_80125E58[] = {
0x060226E0,
0x06014320,
gLinkChildRightHandClosedNearDL,
0x06027690,
0x06016620,
gLinkChildRightHandClosedFarDL,
};
Gfx* D_80125E68[] = {
0x06022DA8,
0x06015DF0,
gLinkChildRightHandHoldingFairySlingshotNearDL,
0x06027B88,
0x06017D38,
gLinkChildRightHandHoldingFairySlingshotFarDL,
};
Gfx* D_80125E78[] = {
0x06023160,
0x06015248,
gLinkChildSwordAndSheathNearDL,
0x06027F00,
0x06017360,
gLinkChildSwordAndSheathFarDL,
};
Gfx* D_80125E88[] = {
0x060249D8,
0x06015408,
gLinkChildSheathNearDL,
0x06028150,
0x06017500,
gLinkChildSheathFarDL,
};
Gfx* D_80125E98[] = {
0x06035330,
0x060202A8,
gLinkChildWaistNearDL,
0x0602F530,
0x0601AEC8,
gLinkChildWaistFarDL,
};
Gfx* D_80125EA8[] = {
0x06022DA8,
0x06015DF0,
gLinkChildRightHandHoldingFairySlingshotNearDL,
0x06027B88,
0x06017D38,
gLinkChildRightHandHoldingFairySlingshotFarDL,
};
Gfx* D_80125EB8[] = {
0x06024698,
0x06015BA8,
gLinkChildRightHandHoldingFairyOcarinaNearDL,
0x06028F58,
0x06017AF0,
gLinkChildRightHandHoldingFairyOcarinaFarDL,
};
Gfx* D_80125EC8[] = {
0x06024698,
0x06015958,
gLinkChildRightHandAndOOTNearDL,
0x06028F58,
0x060178A0,
gLinkChildRightHandHoldingOOTFarDL,
};
Gfx* D_80125ED8[] = {
0x06024D70,
0x060141C0,
gLinkChildRightHandNearDL,
0x06024D70,
0x060164E0,
gLinkChildRightHandFarDL,
};
Gfx* D_80125EE8[] = {
0x060233E0,
0x06013CB0,
gLinkChildLeftHandNearDL,
0x06028288,
0x06016280,
gLinkChildLeftHandFarDL,
};
Gfx* D_80125EF8[] = {
0x06021AA8,
0x06014660,
gLinkChildLeftFistAndBoomerangNearDL,
0x06026C58,
0x06016908,
gLinkChildLeftFistAndBoomerangFarDL,
};
Gfx* D_80125F08[] = {
0x06024B58,
0x06015FD0,
gLinkChildLeftHandUpNearDL,
0x06024B58,
0x06015FD0,
gLinkChildLeftHandUpNearDL,
};
Gfx* D_80125F18[] = {
@ -198,7 +217,7 @@ Gfx* D_80125F20[] = {
Gfx* D_80125F28[] = {
0x06036E58,
0x06021AE8,
gLinkChildLeftShoulderNearDL,
};
Gfx* D_80125F30[] = {
@ -208,7 +227,7 @@ Gfx* D_80125F30[] = {
Gfx* D_80125F38[] = {
0x0602A248,
0x06018048,
gLinkChildRightArmStretchedSlingshotDL,
};
// Indexed by model types (left hand, right hand, sheath or waist)
@ -599,11 +618,17 @@ u8 sEyeMouthIndexes[][2] = {
{ 7, 2 }, { 0, 2 }, { 3, 0 }, { 4, 0 }, { 2, 2 }, { 1, 1 }, { 0, 2 }, { 0, 0 },
};
u8* sEyeTextures[] = {
/**
* Link's eye and mouth textures are placed at the exact same place in adult and child Link's respective object files.
* This allows the array to only contain the symbols for one file and have it apply to both. This is a problem for
* shiftability, and changes will need to be made in the code to account for this in a modding scenario. The symbols
* from adult Link's object are used here.
*/
void* sEyeTextures[] = {
0x06000000, 0x06000800, 0x06001000, 0x06001800, 0x06002000, 0x06002800, 0x06003000, 0x06003800,
};
u8* sMouthTextures[] = {
void* sMouthTextures[] = {
0x06004000,
0x06004400,
0x06004800,
@ -677,7 +702,7 @@ void func_8008F470(GlobalContext* globalCtx, void** skeleton, Vec3s* jointTable,
}
} else {
if (Player_GetStrength() > PLAYER_STR_NONE) {
gSPDisplayList(POLY_OPA_DISP++, D_06016118);
gSPDisplayList(POLY_OPA_DISP++, gLinkChildGoronBraceletDL);
}
}
}
@ -1112,7 +1137,7 @@ f32 sSwordLengths[] = {
0.0f, 4000.0f, 3000.0f, 5500.0f, 0.0f, 2500.0f,
};
Gfx* sBottleDLists[] = { 0x0602AD58, 0x06018478 };
Gfx* sBottleDLists[] = { 0x0602AD58, gLinkChildBottleDL };
Color_RGB8 sBottleColors[] = {
{ 255, 255, 255 }, { 80, 80, 255 }, { 255, 100, 255 }, { 0, 0, 255 }, { 255, 0, 255 },
@ -1186,7 +1211,7 @@ void func_80090D20(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s*
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_player_lib.c", 2653),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06006CC0);
gSPDisplayList(POLY_OPA_DISP++, gLinkChildLinkDekuStickDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_player_lib.c", 2656);
} else if ((this->actor.scale.y >= 0.0f) && (this->swordState != 0)) {

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_bombwall.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00400000
@ -21,10 +22,6 @@ void func_8086EDFC(BgBombwall* this, GlobalContext* globalCtx);
void func_8086EE40(BgBombwall* this, GlobalContext* globalCtx);
void func_8086EE94(BgBombwall* this, GlobalContext* globalCtx);
extern CollisionHeader D_050041B0;
extern Gfx D_05003FC0[];
extern Gfx D_05004088[];
static ColliderTrisElementInit sTrisElementsInit[3] = {
{
{
@ -92,7 +89,7 @@ void BgBombwall_InitDynapoly(BgBombwall* this, GlobalContext* globalCtx) {
CollisionHeader* colHeader = NULL;
DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&D_050041B0, &colHeader);
CollisionHeader_GetVirtual(&gBgBombwallCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.bgId == BG_ACTOR_MAX) {
@ -176,7 +173,7 @@ void BgBombwall_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgBombwall_DestroyCollision(this, globalCtx);
}
Vec3s D_8086F010[] = {
static Vec3s D_8086F010[] = {
{ 40, 85, 21 }, { -43, 107, 14 }, { -1, 142, 14 }, { -27, 44, 27 }, { 28, 24, 20 }, { -39, 54, 21 }, { 49, 50, 20 },
};
@ -210,7 +207,7 @@ void func_8086EB5C(BgBombwall* this, GlobalContext* globalCtx) {
}
void func_8086ED50(BgBombwall* this, GlobalContext* globalCtx) {
this->dList = D_05003FC0;
this->dList = gBgBombwallNormalDL;
this->actionFunc = func_8086ED70;
}
@ -225,7 +222,7 @@ void func_8086ED70(BgBombwall* this, GlobalContext* globalCtx) {
}
void func_8086EDFC(BgBombwall* this, GlobalContext* globalCtx) {
this->dList = D_05003FC0;
this->dList = gBgBombwallNormalDL;
this->unk_2A0 = 1;
func_8086EB5C(this, globalCtx);
this->actionFunc = func_8086EE40;
@ -244,7 +241,7 @@ void func_8086EE40(BgBombwall* this, GlobalContext* globalCtx) {
}
void func_8086EE94(BgBombwall* this, GlobalContext* globalCtx) {
this->dList = D_05004088;
this->dList = gBgBombwallBrokenDL;
BgBombwall_DestroyCollision(this, globalCtx);
this->actionFunc = NULL;
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_jya_1flift.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000010
@ -15,12 +16,12 @@ void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx);
void BgJya1flift_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_80892DB0(BgJya1flift* this);
void func_80892DCC(BgJya1flift* this, GlobalContext* globalCtx);
void BgJya1flift_SetupWaitForSwitch(BgJya1flift* this);
void BgJya1flift_WaitForSwitch(BgJya1flift* this, GlobalContext* globalCtx);
void BgJya1flift_DoNothing(BgJya1flift* this, GlobalContext* globalCtx);
void BgJya1flift_ChangeDirection(BgJya1flift* this);
void BgJya1flift_Move(BgJya1flift* this, GlobalContext* globalCtx);
void func_80892E0C(BgJya1flift* this);
void BgJya1flift_SetupDoNothing(BgJya1flift* this);
void BgJya1flift_ResetMoveDelay(BgJya1flift* this);
void BgJya1flift_DelayMove(BgJya1flift* this, GlobalContext* globalCtx);
@ -67,10 +68,8 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
};
extern CollisionHeader D_060004A8;
extern Gfx D_060001F0[];
void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 moveFlag) {
void BgJya1flift_InitDynapoly(BgJya1flift* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag moveFlag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;
@ -103,13 +102,13 @@ void BgJya1flift_Init(Actor* thisx, GlobalContext* globalCtx) {
Actor_Kill(thisx);
return;
}
BgJya1flift_InitDynapoly(this, globalCtx, &D_060004A8, DPM_UNK);
BgJya1flift_InitDynapoly(this, globalCtx, &g1fliftCol, 0);
Actor_ProcessInitChain(thisx, sInitChain);
BgJya1flift_InitCollision(thisx, globalCtx);
if (Flags_GetSwitch(globalCtx, (thisx->params & 0x3F))) {
LINK_AGE_IN_YEARS == YEARS_ADULT ? BgJya1flift_ChangeDirection(this) : func_80892E0C(this);
LINK_AGE_IN_YEARS == YEARS_ADULT ? BgJya1flift_ChangeDirection(this) : BgJya1flift_SetupDoNothing(this);
} else {
func_80892DB0(this);
BgJya1flift_SetupWaitForSwitch(this);
}
thisx->room = -1;
sIsSpawned = true;
@ -126,18 +125,18 @@ void BgJya1flift_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
}
void func_80892DB0(BgJya1flift* this) {
this->actionFunc = func_80892DCC;
void BgJya1flift_SetupWaitForSwitch(BgJya1flift* this) {
this->actionFunc = BgJya1flift_WaitForSwitch;
this->dyna.actor.world.pos.y = sFinalPositions[0];
}
void func_80892DCC(BgJya1flift* this, GlobalContext* globalCtx) {
void BgJya1flift_WaitForSwitch(BgJya1flift* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, (this->dyna.actor.params & 0x3F))) {
BgJya1flift_ChangeDirection(this);
}
}
void func_80892E0C(BgJya1flift* this) {
void BgJya1flift_SetupDoNothing(BgJya1flift* this) {
this->actionFunc = BgJya1flift_DoNothing;
this->dyna.actor.world.pos.y = sFinalPositions[0];
}
@ -208,5 +207,5 @@ void BgJya1flift_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgJya1flift_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_060001F0);
Gfx_DrawDListOpa(globalCtx, g1fliftDL);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_jya_amishutter.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000000
@ -15,8 +16,8 @@ void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx);
void BgJyaAmishutter_Update(Actor* thisx, GlobalContext* globalCtx);
void BgJyaAmishutter_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_808933BC(BgJyaAmishutter* this);
void func_808933CC(BgJyaAmishutter* this);
void BgJyaAmishutter_SetupWaitForPlayer(BgJyaAmishutter* this);
void BgJyaAmishutter_WaitForPlayer(BgJyaAmishutter* this);
void func_80893428(BgJyaAmishutter* this);
void func_80893438(BgJyaAmishutter* this);
void func_808934B0(BgJyaAmishutter* this);
@ -43,13 +44,11 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
extern CollisionHeader D_0600C4C8;
extern Gfx D_0600C0A0[];
void func_808932C0(BgJyaAmishutter* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
s16 pad1;
void BgJyaAmishutter_InitDynaPoly(BgJyaAmishutter* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
s32 pad1;
CollisionHeader* colHeader = NULL;
s16 pad2;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader);
@ -63,9 +62,9 @@ void func_808932C0(BgJyaAmishutter* this, GlobalContext* globalCtx, CollisionHea
void BgJyaAmishutter_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaAmishutter* this = THIS;
func_808932C0(this, globalCtx, &D_0600C4C8, DPM_UNK);
BgJyaAmishutter_InitDynaPoly(this, globalCtx, &gAmishutterCol, DPM_UNK);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
func_808933BC(this);
BgJyaAmishutter_SetupWaitForPlayer(this);
}
void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@ -74,15 +73,13 @@ void BgJyaAmishutter_Destroy(Actor* thisx, GlobalContext* globalCtx) {
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
void func_808933BC(BgJyaAmishutter* this) {
this->actionFunc = func_808933CC;
void BgJyaAmishutter_SetupWaitForPlayer(BgJyaAmishutter* this) {
this->actionFunc = BgJyaAmishutter_WaitForPlayer;
}
void func_808933CC(BgJyaAmishutter* this) {
if (this->dyna.actor.xzDistToPlayer < 60.0f) {
if (fabsf(this->dyna.actor.yDistToPlayer) < 30.0f) {
func_80893428(this);
}
void BgJyaAmishutter_WaitForPlayer(BgJyaAmishutter* this) {
if ((this->dyna.actor.xzDistToPlayer < 60.0f) && (fabsf(this->dyna.actor.yDistToPlayer) < 30.0f)) {
func_80893428(this);
}
}
@ -115,7 +112,7 @@ void func_808934FC(BgJyaAmishutter* this) {
void func_8089350C(BgJyaAmishutter* this) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.0f)) {
func_808933BC(this);
BgJyaAmishutter_SetupWaitForPlayer(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_METALDOOR_STOP);
} else {
func_8002F974(&this->dyna.actor, NA_SE_EV_METALDOOR_SLIDE - SFX_FLAG);
@ -129,5 +126,5 @@ void BgJyaAmishutter_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgJyaAmishutter_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_0600C0A0);
Gfx_DrawDListOpa(globalCtx, gAmishutterDL);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_jya_bigmirror.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000030
@ -41,11 +42,6 @@ static BigMirrorDataEntry sCobraSpawnData[] = {
{ { 60.0f, 1743.0f, -310.0f }, 0xFF02, 0x8000, 0xA000 },
};
extern Gfx D_0600BC70[];
extern Gfx D_0600BD80[];
extern Gfx D_0600E1B0[];
extern Gfx D_0600E2D0[];
void BgJyaBigmirror_SetRoomFlag(Actor* thisx, GlobalContext* globalCtx) {
BgJyaBigmirror* this = THIS;
@ -68,11 +64,9 @@ void BgJyaBigmirror_HandleCobra(Actor* thisx, GlobalContext* globalCtx) {
s32 i;
if (this->puzzleFlags & (BIGMIR_PUZZLE_IN_1ST_TOP_ROOM | BIGMIR_PUZZLE_IN_2ND_TOP_ROOM)) {
for (i = 0; i < 2; i++) {
curSpawnData = &sCobraSpawnData[i];
curCobraInfo = &this->cobraInfo[i];
if (curCobraInfo->cobra != NULL) {
curCobraInfo->rotY = curCobraInfo->cobra->dyna.actor.shape.rot.y;
@ -197,7 +191,7 @@ void BgJyaBigmirror_Init(Actor* thisx, GlobalContext* globalCtx) {
this->mirRayObjIndex = -1;
// jya Bigmirror
osSyncPrintf("(jya 大鏡)(arg_data 0x%04x)\n", this->actor.params, this);
osSyncPrintf("(jya 大鏡)(arg_data 0x%04x)\n", this->actor.params);
}
void BgJyaBigmirror_Destroy(Actor* thisx, GlobalContext* globalCtx) {
@ -231,7 +225,7 @@ void BgJyaBigmirror_DrawLightBeam(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Scale(0.1f, (this->liftHeight * -(1.0f / 1280.0f)) + (1779.4f / 1280.0f), 0.1f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bigmirror.c", 457),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_0600BC70);
gSPDisplayList(POLY_XLU_DISP++, gBigMirror1DL);
if (lift != NULL) {
if (1) {}
@ -239,7 +233,7 @@ void BgJyaBigmirror_DrawLightBeam(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Scale(0.1f, 0.1f, 0.1f, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bigmirror.c", 467),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_0600BD80);
gSPDisplayList(POLY_XLU_DISP++, gBigMirror2DL);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bigmirror.c", 476);
@ -249,8 +243,8 @@ void BgJyaBigmirror_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaBigmirror* this = THIS;
if (this->puzzleFlags & BIGMIR_PUZZLE_IN_1ST_TOP_ROOM) {
Gfx_DrawDListOpa(globalCtx, D_0600E1B0);
Gfx_DrawDListXlu(globalCtx, D_0600E2D0);
Gfx_DrawDListOpa(globalCtx, gBigMirror3DL);
Gfx_DrawDListXlu(globalCtx, gBigMirror4DL);
}
if ((this->puzzleFlags &

View file

@ -1,6 +1,6 @@
#include "z_bg_jya_bombchuiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000001
#define THIS ((BgJyaBombchuiwa*)thisx)
@ -63,12 +63,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
extern Gfx D_0600EDC0[];
extern Gfx D_0600E8D0[];
extern Gfx D_060119B0[];
extern Gfx D_0600DC40[];
extern Gfx D_0600DB60[];
void BgJyaBombchuiwa_SetupCollider(BgJyaBombchuiwa* this, GlobalContext* globalCtx) {
s32 pad;
@ -137,7 +131,7 @@ void BgJyaBombchuiwa_Break(BgJyaBombchuiwa* this, GlobalContext* globalCtx) {
}
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &pos, -300, arg5, arg6, arg7, 0, scale, 1, 15, 80,
KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, D_0600EDC0);
KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, gBombiwaEffectDL);
}
func_80033480(globalCtx, &this->actor.world.pos, 100.0f, 8, 100, 160, 0);
}
@ -208,7 +202,7 @@ void BgJyaBombchuiwa_DrawRock(GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 439),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_060119B0);
gSPDisplayList(POLY_XLU_DISP++, gBombchuiwa2DL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 443);
}
@ -220,10 +214,10 @@ void BgJyaBombchuiwa_DrawLight(Actor* thisx, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 457),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 153.0f), 153));
gSPDisplayList(POLY_XLU_DISP++, D_0600DC40);
gSPDisplayList(POLY_XLU_DISP++, gBombchuiwaLight1DL);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, CLAMP_MAX((u32)(this->lightRayIntensity * 255.0f), 255));
gSPDisplayList(POLY_XLU_DISP++, D_0600DB60);
gSPDisplayList(POLY_XLU_DISP++, gBombchuiwaLight2DL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_bombchuiwa.c", 472);
}
@ -233,7 +227,7 @@ void BgJyaBombchuiwa_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaBombchuiwa* this = THIS;
if (this->drawFlags & 1) {
Gfx_DrawDListOpa(globalCtx, D_0600E8D0);
Gfx_DrawDListOpa(globalCtx, gBombchuiwaDL);
Collider_UpdateSpheres(0, &this->collider);
}

View file

@ -6,6 +6,7 @@
#include "z_bg_jya_bombiwa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#include "vt.h"
#define FLAGS 0x00000000
@ -42,6 +43,7 @@ static ColliderJntSphElementInit sJntSphElementsInit[] = {
{ 0, { { 0, 0, 0 }, 50 }, 100 },
},
};
static ColliderJntSphInit sJntSphInit = {
{
COLTYPE_NONE,
@ -54,6 +56,7 @@ static ColliderJntSphInit sJntSphInit = {
1,
sJntSphElementsInit,
};
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 1000, ICHAIN_CONTINUE),
@ -61,17 +64,14 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
extern CollisionHeader D_0600E710;
extern Gfx D_0600E490[];
extern Gfx D_0600EDC0[];
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, GlobalContext* globalCtx, void* arg2, DynaPolyMoveFlag flag) {
void BgJyaBombiwa_SetupDynaPoly(BgJyaBombiwa* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
s16 pad1;
CollisionHeader* colHeader = NULL;
s16 pad2;
DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(arg2, &colHeader);
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.bgId == BG_ACTOR_MAX) {
@ -99,7 +99,7 @@ void BgJyaBombiwa_Init(Actor* thisx, GlobalContext* globalCtx) {
this->dyna.actor.params & 0x3F);
osSyncPrintf(VT_RST);
}
BgJyaBombiwa_SetupDynaPoly(this, globalCtx, &D_0600E710, DPM_UNK);
BgJyaBombiwa_SetupDynaPoly(this, globalCtx, &gBombiwaCol, DPM_UNK);
BgJyaBombiwa_InitCollider(this, globalCtx);
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
Actor_Kill(&this->dyna.actor);
@ -154,7 +154,7 @@ void BgJyaBombiwa_Break(BgJyaBombiwa* this, GlobalContext* globalCtx) {
}
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &pos, -400, arg5, arg6, arg7, 0, scale, 1, 20, 80,
KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, D_0600EDC0);
KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, gBombiwaEffectDL);
}
pos.x = this->dyna.actor.world.pos.x;
pos.y = this->dyna.actor.world.pos.y + 70.0f;
@ -178,6 +178,6 @@ void BgJyaBombiwa_Update(Actor* thisx, GlobalContext* globalCtx) {
void BgJyaBombiwa_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaBombiwa* this = THIS;
Gfx_DrawDListOpa(globalCtx, D_0600E490);
Gfx_DrawDListOpa(globalCtx, gBombiwaDL);
Collider_UpdateSpheres(0, &this->collider);
}

View file

@ -1,6 +1,7 @@
#include "z_bg_jya_cobra.h"
#include "overlays/actors/ovl_Bg_Jya_Bigmirror/z_bg_jya_bigmirror.h"
#include "overlays/actors/ovl_Mir_Ray/z_mir_ray.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#include "vt.h"
#define FLAGS 0x00000010
@ -17,11 +18,6 @@ void func_80896950(BgJyaCobra* this, GlobalContext* globalCtx);
void func_808969F8(BgJyaCobra* this, GlobalContext* globalCtx);
void func_80896ABC(BgJyaCobra* this, GlobalContext* globalCtx);
extern Gfx D_06010790[];
extern Gfx D_06010C20[];
extern UNK_TYPE D_0601167C;
extern Gfx D_060117D0[];
static Vtx sShadowVtx[4] = {
VTX(-800, 0, -800, 0, 2048, 255, 255, 255, 255),
VTX(800, 0, -800, 2048, 2048, 255, 255, 255, 255),
@ -136,13 +132,14 @@ void func_808958F0(Vec3f* dest, Vec3f* src, f32 arg2, f32 arg3) {
dest->z = (src->z * arg3) - (src->x * arg2);
}
void BgJyaCobra_InitDynapoly(BgJyaCobra* this, GlobalContext* globalCtx, void* arg2, DynaPolyMoveFlag flags) {
void BgJyaCobra_InitDynapoly(BgJyaCobra* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flags) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags);
CollisionHeader_GetVirtual(arg2, &colHeader);
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.bgId == BG_ACTOR_MAX) {
// Warning : move BG Registration Failure
@ -156,7 +153,7 @@ void BgJyaCobra_SpawnRay(BgJyaCobra* this, GlobalContext* globalCtx) {
this->dyna.actor.world.pos.y + 57.0f, this->dyna.actor.world.pos.z, 0, 0, 0, 6);
if (this->dyna.actor.child == NULL) {
osSyncPrintf(VT_FGCOL(RED));
// : Mir Ray occurrence failure
// : Mir Ray occurrence failure
osSyncPrintf(" : Mir Ray 発生失敗 (%s %d)\n", "../z_bg_jya_cobra.c", 270);
osSyncPrintf(VT_RST);
}
@ -421,7 +418,7 @@ void BgJyaCobra_UpdateShadowFromTop(BgJyaCobra* this) {
void BgJyaCobra_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaCobra* this = THIS;
BgJyaCobra_InitDynapoly(this, globalCtx, &D_0601167C, DPM_UNK);
BgJyaCobra_InitDynapoly(this, globalCtx, &gCobraCol, DPM_UNK);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
if (!(this->dyna.actor.params & 3) && Flags_GetSwitch(globalCtx, ((s32)this->dyna.actor.params >> 8) & 0x3F)) {
this->dyna.actor.world.rot.y = this->dyna.actor.home.rot.y = this->dyna.actor.shape.rot.y = 0;
@ -554,7 +551,7 @@ void func_80896CB4(GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 867),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_06010C20);
gSPDisplayList(POLY_XLU_DISP++, gCobra2DL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 872);
}
@ -575,7 +572,7 @@ void func_80896D78(BgJyaCobra* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 939),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (s32)(this->unk_18C * 140.0f));
gSPDisplayList(POLY_XLU_DISP++, D_060117D0);
gSPDisplayList(POLY_XLU_DISP++, gCobra3DL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_cobra.c", 947);
}
@ -629,7 +626,7 @@ void BgJyaCobra_Draw(Actor* thisx, GlobalContext* globalCtx) {
BgJyaCobra* this = THIS;
func_80896CB4(globalCtx);
Gfx_DrawDListOpa(globalCtx, D_06010790);
Gfx_DrawDListOpa(globalCtx, gCobra1DL);
if (this->unk_18C > 0.0f) {
func_80896D78(this, globalCtx);

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_jya_kanaami.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000000
@ -40,10 +41,8 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
extern Gfx D_0600F000[];
extern CollisionHeader D_0600F208;
void func_80899740(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader* collision, DynaPolyMoveFlag flag) {
void BgJyaKanaami_InitDynaPoly(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;
@ -60,7 +59,7 @@ void func_80899740(BgJyaKanaami* this, GlobalContext* globalCtx, CollisionHeader
void BgJyaKanaami_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaKanaami* this = THIS;
func_80899740(this, globalCtx, &D_0600F208, 0);
BgJyaKanaami_InitDynaPoly(this, globalCtx, &gKanaamiCol, DPM_UNK);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
func_80899A08(this);
@ -100,16 +99,16 @@ void func_8089993C(BgJyaKanaami* this) {
void func_80899950(BgJyaKanaami* this, GlobalContext* globalCtx) {
s32 pad[2];
s32 var;
s32 quakeId;
this->unk_168 += 0x20;
if (Math_ScaledStepToS(&this->dyna.actor.world.rot.x, 0x4000, this->unk_168)) {
func_80899A08(this);
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_TRAP_BOUND);
var = Quake_Add(ACTIVE_CAM, 3);
Quake_SetSpeed(var, 25000);
Quake_SetQuakeValues(var, 2, 0, 0, 0);
Quake_SetCountdown(var, 0x10);
quakeId = Quake_Add(ACTIVE_CAM, 3);
Quake_SetSpeed(quakeId, 25000);
Quake_SetQuakeValues(quakeId, 2, 0, 0, 0);
Quake_SetCountdown(quakeId, 16);
}
}
@ -128,5 +127,5 @@ void BgJyaKanaami_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgJyaKanaami_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_0600F000);
Gfx_DrawDListOpa(globalCtx, gKanaamiDL);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_jya_lift.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000010
@ -44,12 +45,9 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 2500, ICHAIN_STOP),
};
extern CollisionHeader D_0600D7E8;
extern Gfx D_0600CCE0[];
void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, CollisionHeader* collisionHeader,
DynaPolyMoveFlag moveFlag) {
s32 pad1;
s32 pad;
CollisionHeader* colHeader = NULL;
DynaPolyActor_Init(&this->dyna, moveFlag);
@ -59,8 +57,8 @@ void BgJyaLift_InitDynapoly(BgJyaLift* this, GlobalContext* globalCtx, Collision
void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaLift* this = THIS;
this->unk_16A = 0;
this->isSpawned = false;
if (sIsSpawned) {
Actor_Kill(thisx);
return;
@ -68,7 +66,7 @@ void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) {
// Goddess lift CT
osSyncPrintf("女神リフト CT\n");
BgJyaLift_InitDynapoly(this, globalCtx, &D_0600D7E8, 0);
BgJyaLift_InitDynapoly(this, globalCtx, &gLiftCol, DPM_UNK);
Actor_ProcessInitChain(thisx, sInitChain);
if (Flags_GetSwitch(globalCtx, (thisx->params & 0x3F))) {
BgJyaLift_SetFinalPosY(this);
@ -77,13 +75,13 @@ void BgJyaLift_Init(Actor* thisx, GlobalContext* globalCtx) {
}
thisx->room = -1;
sIsSpawned = true;
this->unk_16A = 1;
this->isSpawned = true;
}
void BgJyaLift_Destroy(Actor* thisx, GlobalContext* globalCtx) {
BgJyaLift* this = THIS;
if (this->unk_16A != 0) {
if (this->isSpawned) {
// Goddess Lift DT
osSyncPrintf("女神リフト DT\n");
@ -157,5 +155,5 @@ void BgJyaLift_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void BgJyaLift_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_0600CCE0);
Gfx_DrawDListOpa(globalCtx, gLiftDL);
}

View file

@ -11,7 +11,7 @@ typedef struct BgJyaLift {
/* 0x000 */ DynaPolyActor dyna;
/* 0x164 */ BgJyaLiftActionFunc actionFunc;
/* 0x168 */ s16 moveDelay;
/* 0x16A */ u8 unk_16A;
/* 0x16A */ u8 isSpawned;
/* 0x16B */ u8 unk_16B;
} BgJyaLift; // size = 0x016C

View file

@ -1,5 +1,6 @@
#include "z_bg_jya_megami.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#define FLAGS 0x00000000
@ -15,18 +16,6 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx);
void BgJyaMegami_SetupExplode(BgJyaMegami* this);
void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx);
extern Gfx D_06005780[];
extern CollisionHeader D_06005C4C;
extern Gfx D_0600B9F8[];
typedef struct {
/* 0x00 */ Vec3f unk_00;
/* 0x0C */ f32 velX;
/* 0x10 */ s16 rotVelX;
/* 0x12 */ s16 rotVelY;
/* 0x14 */ s16 delay;
} BgJyaMegamiPieceInit; // size = 0x18
const ActorInit Bg_Jya_Megami_InitVars = {
ACTOR_BG_JYA_MEGAMI,
ACTORCAT_BG,
@ -66,6 +55,14 @@ static ColliderJntSphInit sJntSphInit = {
sJntSphElementsInit,
};
typedef struct {
/* 0x00 */ Vec3f unk_00;
/* 0x0C */ f32 velX;
/* 0x10 */ s16 rotVelX;
/* 0x12 */ s16 rotVelY;
/* 0x14 */ s16 delay;
} BgJyaMegamiPieceInit; // size = 0x18
static BgJyaMegamiPieceInit sPiecesInit[] = {
{ { -50.0f, -21.28f, -38.92f }, -1.6f, 0xFED4, 0xFE70, 40 },
{ { -4.32f, -13.44f, -13.76f }, 0.0f, 0x04B0, 0x0190, 42 },
@ -100,7 +97,7 @@ static s16 D_8089B17C[] = {
0x0007,
};
static Vec3f D_8089B184 = { 0.0f, 0.0f, 0.8f };
static Vec3f sVelocity = { 0.0f, 0.0f, 0.8f };
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_CONTINUE),
@ -109,27 +106,12 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1200, ICHAIN_STOP),
};
static Vec3f sVec = { 0.0f, 0.0f, 0.0f };
static UNK_PTR sRightSideCrumbles[] = {
0x06000D00, 0x06001D00, 0x06002500, 0x06002D00, 0x06004D00,
};
static UNK_PTR sLeftSideCrumbles[] = {
0x06001500, 0x06003500, 0x06003D00, 0x06004500, 0x06000500,
};
static Gfx* sDLists[] = {
0x06009928, 0x06009AC0, 0x06009C80, 0x06009DE8, 0x06009F60, 0x0600A0A8, 0x0600A278,
0x0600A418, 0x0600A568, 0x0600A6A0, 0x0600A7E0, 0x0600A978, 0x0600AAC8,
};
void BgJyaMegami_InitDynaPoly(BgJyaMegami* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flags) {
DynaPolyMoveFlag flag) {
s32 pad;
CollisionHeader* colHeader = NULL;
DynaPolyActor_Init(&this->dyna, flags);
DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
}
@ -141,7 +123,7 @@ void BgJyaMegami_InitCollider(BgJyaMegami* this, GlobalContext* globalCtx) {
Collider_SetJntSph(globalCtx, &this->collider, &this->dyna.actor, &sJntSphInit, &this->colliderItem);
}
void func_8089A1DC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, s32 num, s32 arg4) {
void BgJyaMegami_SpawnEffect(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, s32 num, s32 arg4) {
Vec3f spB4;
s32 i;
@ -149,7 +131,7 @@ void func_8089A1DC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, s32 nu
s32 idx = ((s16)(Rand_ZeroOne() * 8.0f)) & D_8089B17C[arg4];
s16 arg5 = ((idx < 5) && (Rand_ZeroOne() < 0.7f)) ? 0x40 : 0x20;
EffectSsKakera_Spawn(globalCtx, pos, velocity, pos, -90, arg5, D_8089B16C[idx], 4, 0, D_8089B14C[idx], 0, 5,
D_8089B15C[idx], KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, D_0600B9F8);
D_8089B15C[idx], KAKERA_COLOR_NONE, OBJECT_JYA_OBJ, gMegami2DL);
if (Rand_ZeroOne() < 0.45f) {
Math_Vec3f_Copy(&spB4, pos);
spB4.z += 25.0f;
@ -158,15 +140,15 @@ void func_8089A1DC(GlobalContext* globalCtx, Vec3f* pos, Vec3f* velocity, s32 nu
}
}
void func_8089A41C(BgJyaMegami* this, GlobalContext* globalCtx, f32 arg2) {
void BgJyaMegami_SetupSpawnEffect(BgJyaMegami* this, GlobalContext* globalCtx, f32 arg2) {
s32 i;
Vec3f sp50;
Vec3f pos;
for (i = 0; i < ARRAY_COUNT(this->pieces); i++) {
if (Rand_ZeroOne() < arg2) {
Math_Vec3f_Sum(&this->dyna.actor.world.pos, &sPiecesInit[i].unk_00, &sp50);
sp50.z += 15.0f;
func_8089A1DC(globalCtx, &sp50, &D_8089B184, 1, 0);
Math_Vec3f_Sum(&this->dyna.actor.world.pos, &sPiecesInit[i].unk_00, &pos);
pos.z += 15.0f;
BgJyaMegami_SpawnEffect(globalCtx, &pos, &sVelocity, 1, 0);
}
}
}
@ -174,7 +156,7 @@ void func_8089A41C(BgJyaMegami* this, GlobalContext* globalCtx, f32 arg2) {
void BgJyaMegami_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaMegami* this = THIS;
BgJyaMegami_InitDynaPoly(this, globalCtx, &D_06005C4C, DPM_UNK);
BgJyaMegami_InitDynaPoly(this, globalCtx, &GMegamiCol, DPM_UNK);
BgJyaMegami_InitCollider(this, globalCtx);
if (Flags_GetSwitch(globalCtx, this->dyna.actor.params & 0x3F)) {
Actor_Kill(&this->dyna.actor);
@ -203,7 +185,7 @@ void BgJyaMegami_DetectLight(BgJyaMegami* this, GlobalContext* globalCtx) {
this->lightTimer++;
this->collider.base.acFlags &= ~AC_HIT;
if (globalCtx->gameplayFrames % 4 == 0) {
func_8089A41C(this, globalCtx, (this->crumbleIndex * 0.04f) + 0.05f);
BgJyaMegami_SetupSpawnEffect(this, globalCtx, (this->crumbleIndex * 0.04f) + 0.05f);
}
func_8002F974(&this->dyna.actor, NA_SE_EV_FACE_CRUMBLE_SLOW - SFX_FLAG);
} else if (this->lightTimer > 0) {
@ -242,6 +224,7 @@ void BgJyaMegami_SetupExplode(BgJyaMegami* this) {
}
void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx) {
static Vec3f sVec = { 0.0f, 0.0f, 0.0f };
BgJyaMegamiPiece* temp;
u32 i;
Vec3f sp8C;
@ -269,12 +252,12 @@ void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx) {
if (Rand_ZeroOne() < 0.067f) {
Math_Vec3f_Sum(&temp->pos, &temp2->unk_00, &sp8C);
sp8C.z += 10.0f;
func_8089A1DC(globalCtx, &sp8C, &temp->vel, 3, 2);
BgJyaMegami_SpawnEffect(globalCtx, &sp8C, &temp->vel, 3, 2);
}
} else if (this->explosionTimer == temp2->delay) {
Math_Vec3f_Sum(&temp->pos, &temp2->unk_00, &sp8C);
sp8C.z += 10.0f;
func_8089A1DC(globalCtx, &sp8C, &temp->vel, 4, 2);
BgJyaMegami_SpawnEffect(globalCtx, &sp8C, &temp->vel, 4, 2);
}
}
@ -282,8 +265,8 @@ void BgJyaMegami_Explode(BgJyaMegami* this, GlobalContext* globalCtx) {
(this->explosionTimer > 40)) {
sp8C.x = ((Rand_ZeroOne() - 0.5f) * 90.0f) + this->dyna.actor.world.pos.x;
sp8C.y = (this->dyna.actor.world.pos.y - (Rand_ZeroOne() * 80.0f)) - 20.0f;
sp8C.z = this->dyna.actor.world.pos.z - ((Rand_ZeroOne() - 0.5f) * 50.0f);
func_8089A1DC(globalCtx, &sp8C, &sVec, 1, 0);
sp8C.z = this->dyna.actor.world.pos.z - (Rand_ZeroOne() - 0.5f) * 50.0f;
BgJyaMegami_SpawnEffect(globalCtx, &sp8C, &sVec, 1, 0);
}
if (this->explosionTimer < ARRAY_COUNT(this->pieces)) {
sp8C.x = this->dyna.actor.world.pos.x;
@ -305,6 +288,16 @@ void BgJyaMegami_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
static u64* sRightSideCrumbles[] = {
gMeagmiRightCrumble1Tex, gMeagmiRightCrumble2Tex, gMeagmiRightCrumble3Tex,
gMeagmiRightCrumble4Tex, gMeagmiRightCrumble5Tex,
};
static u64* sLeftSideCrumbles[] = {
gMeagmiLeftCrumble1Tex, gMeagmiLeftCrumble2Tex, gMeagmiLeftCrumble3Tex,
gMeagmiLeftCrumble4Tex, gMeagmiLeftCrumble5Tex,
};
void BgJyaMegami_DrawFace(BgJyaMegami* this, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 706);
@ -313,11 +306,17 @@ void BgJyaMegami_DrawFace(BgJyaMegami* this, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x09, SEGMENTED_TO_VIRTUAL(sLeftSideCrumbles[this->crumbleIndex]));
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 716),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06005780);
gSPDisplayList(POLY_OPA_DISP++, gMegami1DL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_jya_megami.c", 720);
}
static Gfx* sDLists[] = {
gMegamiPiece1DL, gMegamiPiece2DL, gMegamiPiece3DL, gMegamiPiece4DL, gMegamiPiece5DL,
gMegamiPiece6DL, gMegamiPiece7DL, gMegamiPiece8DL, gMegamiPiece9DL, gMegamiPiece10DL,
gMegamiPiece11DL, gMegamiPiece12DL, gMegamiPiece13DL,
};
void BgJyaMegami_DrawExplode(BgJyaMegami* this, GlobalContext* globalCtx) {
s32 pad;
BgJyaMegamiPiece* piece;

View file

@ -1,10 +1,11 @@
/*
* File: z_bg_jya_zurerukabe.c
* Overlay: ovl_Bg_Jya_Zurerukabe
* Description:
* Description: Sliding, Climbable Brick Wall
*/
#include "z_bg_jya_zurerukabe.h"
#include "objects/object_jya_obj/object_jya_obj.h"
#include "vt.h"
#define FLAGS 0x00000010
@ -60,18 +61,15 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
extern Gfx D_06012340[];
extern CollisionHeader D_06012508;
void func_8089B440(BgJyaZurerukabe* this, GlobalContext* globalCtx, CollisionHeader* collision, s32 flags) {
void BgJyaZurerukabe_InitDynaPoly(BgJyaZurerukabe* this, GlobalContext* globalCtx, CollisionHeader* collision,
DynaPolyMoveFlag flag) {
s32 pad;
CollisionHeader* colHeader = NULL;
s32 pad2;
DynaPolyActor_Init(&this->dyna, flags);
DynaPolyActor_Init(&this->dyna, flag);
CollisionHeader_GetVirtual(collision, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
if (this->dyna.bgId == BG_ACTOR_MAX) {
osSyncPrintf("Warning : move BG 登録失敗(%s %d)(name %d)(arg_data 0x%04x)\n", "../z_bg_jya_zurerukabe.c", 194,
this->dyna.actor.id, this->dyna.actor.params);
@ -86,6 +84,7 @@ void func_8089B4C8(BgJyaZurerukabe* this, GlobalContext* globalCtx) {
for (i = 0; i < ARRAY_COUNT(D_8089BA18); i++) {
f32 posY = player->actor.world.pos.y;
if ((posY >= D_8089BA18[i][0]) && (posY <= D_8089BA18[i][1])) {
break;
}
@ -114,7 +113,7 @@ void BgJyaZurerukabe_Init(Actor* thisx, GlobalContext* globalCtx) {
BgJyaZurerukabe* this = THIS;
s32 i;
func_8089B440(this, globalCtx, &D_06012508, DPM_UNK);
BgJyaZurerukabe_InitDynaPoly(this, globalCtx, &gZurerukabeCol, DPM_UNK);
Actor_ProcessInitChain(thisx, sInitChain);
for (i = 0; i < ARRAY_COUNT(D_8089B9F0); i++) {
@ -157,11 +156,9 @@ void func_8089B7C4(BgJyaZurerukabe* this, GlobalContext* globalCtx) {
void func_8089B80C(BgJyaZurerukabe* this) {
this->actionFunc = func_8089B870;
this->unk_16A = D_8089BA00[this->unk_168];
if (ABS(this->unk_16C) == 4) {
this->unk_16E = -this->unk_16E;
}
this->unk_16C += this->unk_16E;
}
@ -183,12 +180,12 @@ void BgJyaZurerukabe_Update(Actor* thisx, GlobalContext* globalCtx) {
}
this->actionFunc(this, globalCtx);
if (this->unk_168 == 0) {
func_8089B4C8(this, globalCtx);
}
}
void BgJyaZurerukabe_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_06012340);
Gfx_DrawDListOpa(globalCtx, gZurerukabeDL);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_mori_bigst.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000010
@ -28,9 +29,6 @@ void BgMoriBigst_SetupStalfosPairFight(BgMoriBigst* this, GlobalContext* globalC
void BgMoriBigst_StalfosPairFight(BgMoriBigst* this, GlobalContext* globalCtx);
void BgMoriBigst_SetupDone(BgMoriBigst* this, GlobalContext* globalCtx);
extern CollisionHeader D_0600221C;
extern Gfx D_06001E50[];
const ActorInit Bg_Mori_Bigst_InitVars = {
ACTOR_BG_MORI_BIGST,
ACTORCAT_BG,
@ -78,7 +76,7 @@ void BgMoriBigst_Init(Actor* thisx, GlobalContext* globalCtx) {
Flags_GetSwitch(globalCtx, (this->dyna.actor.params >> 8) & 0x3F),
Flags_GetTempClear(globalCtx, this->dyna.actor.room), Flags_GetClear(globalCtx, this->dyna.actor.room),
PLAYER->actor.world.pos.y);
BgMoriBigst_InitDynapoly(this, globalCtx, &D_0600221C, DPM_UNK);
BgMoriBigst_InitDynapoly(this, globalCtx, &gMoriBigstCol, DPM_UNK);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->moriTexObjIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjIndex < 0) {
@ -254,6 +252,6 @@ void BgMoriBigst_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_bigst.c", 548),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06001E50);
gSPDisplayList(POLY_OPA_DISP++, gMoriBigstDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_bigst.c", 553);
}

View file

@ -1,4 +1,5 @@
#include "z_bg_mori_elevator.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000010
@ -39,9 +40,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
extern CollisionHeader D_060035F8;
extern Gfx D_06002AD0[];
f32 func_808A1800(f32* pValue, f32 target, f32 scale, f32 maxStep, f32 minStep) {
f32 var = (target - *pValue) * scale;
@ -105,7 +103,7 @@ void BgMoriElevator_Init(Actor* thisx, GlobalContext* globalCtx) {
this->dyna.actor.room = -1;
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
CollisionHeader_GetVirtual(&D_060035F8, &colHeader);
CollisionHeader_GetVirtual(&gMoriElevatorCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
BgMoriElevator_SetupWaitAfterInit(this);
break;
@ -261,7 +259,7 @@ void BgMoriElevator_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x08, globalCtx->objectCtx.status[this->moriTexObjIndex].segment);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 580),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06002AD0);
gSPDisplayList(POLY_OPA_DISP++, gMoriElevatorDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_elevator.c", 584);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_mori_hashigo.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000000
@ -25,10 +26,6 @@ void BgMoriHashigo_SetupLadderFall(BgMoriHashigo* this);
void BgMoriHashigo_LadderFall(BgMoriHashigo* this, GlobalContext* globalCtx);
void BgMoriHashigo_SetupLadderRest(BgMoriHashigo* this);
extern CollisionHeader D_060037D8;
extern Gfx D_060036B0[];
extern Gfx D_06004770[];
const ActorInit Bg_Mori_Hashigo_InitVars = {
ACTOR_BG_MORI_HASHIGO,
ACTORCAT_BG,
@ -142,7 +139,7 @@ s32 BgMoriHashigo_InitClasp(BgMoriHashigo* this, GlobalContext* globalCtx) {
this->dyna.actor.flags |= 1;
Actor_SetFocus(&this->dyna.actor, 55.0f);
BgMoriHashigo_InitCollider(this, globalCtx);
if ((this->dyna.actor.params == -1) && !BgMoriHashigo_SpawnLadder(this, globalCtx)) {
if ((this->dyna.actor.params == HASHIGO_CLASP) && !BgMoriHashigo_SpawnLadder(this, globalCtx)) {
return false;
} else {
return true;
@ -150,7 +147,7 @@ s32 BgMoriHashigo_InitClasp(BgMoriHashigo* this, GlobalContext* globalCtx) {
}
s32 BgMoriHashigo_InitLadder(BgMoriHashigo* this, GlobalContext* globalCtx) {
BgMoriHashigo_InitDynapoly(this, globalCtx, &D_060037D8, DPM_UNK);
BgMoriHashigo_InitDynapoly(this, globalCtx, &gMoriHashigoCol, DPM_UNK);
Actor_ProcessInitChain(&this->dyna.actor, sInitChainLadder);
return true;
}
@ -159,12 +156,12 @@ void BgMoriHashigo_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgMoriHashigo* this = THIS;
if (this->dyna.actor.params == -1) {
if (this->dyna.actor.params == HASHIGO_CLASP) {
if (!BgMoriHashigo_InitClasp(this, globalCtx)) {
Actor_Kill(&this->dyna.actor);
return;
}
} else if (this->dyna.actor.params == 0) {
} else if (this->dyna.actor.params == HASHIGO_LADDER) {
if (!BgMoriHashigo_InitLadder(this, globalCtx)) {
Actor_Kill(&this->dyna.actor);
return;
@ -187,10 +184,10 @@ void BgMoriHashigo_Destroy(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
BgMoriHashigo* this = THIS;
if (this->dyna.actor.params == 0) {
if (this->dyna.actor.params == HASHIGO_LADDER) {
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
}
if (this->dyna.actor.params == -1) {
if (this->dyna.actor.params == HASHIGO_CLASP) {
Collider_DestroyJntSph(globalCtx, &this->collider);
}
}
@ -201,9 +198,9 @@ void BgMoriHashigo_SetupWaitForMoriTex(BgMoriHashigo* this) {
void BgMoriHashigo_WaitForMoriTex(BgMoriHashigo* this, GlobalContext* globalCtx) {
if (Object_IsLoaded(&globalCtx->objectCtx, this->moriTexObjIndex)) {
if (this->dyna.actor.params == -1) {
if (this->dyna.actor.params == HASHIGO_CLASP) {
BgMoriHashigo_SetupClasp(this);
} else if (this->dyna.actor.params == 0) {
} else if (this->dyna.actor.params == HASHIGO_LADDER) {
BgMoriHashigo_SetupLadderWait(this);
}
this->dyna.actor.draw = BgMoriHashigo_Draw;
@ -295,11 +292,11 @@ void BgMoriHashigo_Draw(Actor* thisx, GlobalContext* globalCtx) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
switch (this->dyna.actor.params) {
case -1:
gSPDisplayList(POLY_OPA_DISP++, D_06004770);
case HASHIGO_CLASP:
gSPDisplayList(POLY_OPA_DISP++, gMoriHashigoClaspDL);
break;
case 0:
gSPDisplayList(POLY_OPA_DISP++, D_060036B0);
case HASHIGO_LADDER:
gSPDisplayList(POLY_OPA_DISP++, gMoriHashigoLadderDL);
break;
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_hashigo.c", 531);

View file

@ -18,6 +18,11 @@ typedef struct BgMoriHashigo {
/* 0x01CC */ s8 moriTexObjIndex;
} BgMoriHashigo; // size = 0x01D0
typedef enum {
/* -1 */ HASHIGO_CLASP = -1,
/* 0 */ HASHIGO_LADDER
} HasigoType;
extern const ActorInit Bg_Mori_Hashigo_InitVars;
#endif

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_mori_hashira4.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000010
@ -22,9 +23,6 @@ void BgMoriHashira4_PillarsRotate(BgMoriHashira4* this, GlobalContext* globalCtx
void BgMoriHashira4_GateWait(BgMoriHashira4* this, GlobalContext* globalCtx);
void BgMoriHashira4_GateOpen(BgMoriHashira4* this, GlobalContext* globalCtx);
extern CollisionHeader D_06001AF8;
extern CollisionHeader D_060089E0;
const ActorInit Bg_Mori_Hashira4_InitVars = {
ACTOR_BG_MORI_HASHIRA4,
ACTORCAT_BG,
@ -44,7 +42,7 @@ static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
};
static Gfx* sDisplayLists[] = { 0x06001300, 0x06008840 };
static Gfx* sDisplayLists[] = { gMoriHashiraPlatformsDL, gMoriHashiraGateDL };
static s16 sUnkTimer; // seems to be unused
@ -78,9 +76,9 @@ void BgMoriHashira4_Init(Actor* thisx, GlobalContext* globalCtx) {
this->dyna.actor.params &= 0xFF;
if (this->dyna.actor.params == 0) {
BgMoriHashira4_InitDynaPoly(this, globalCtx, &D_06001AF8, DPM_UNK3);
BgMoriHashira4_InitDynaPoly(this, globalCtx, &gMoriHashira1Col, DPM_UNK3);
} else {
BgMoriHashira4_InitDynaPoly(this, globalCtx, &D_060089E0, DPM_UNK);
BgMoriHashira4_InitDynaPoly(this, globalCtx, &gMoriHashira2Col, DPM_UNK);
}
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
this->moriTexObjIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_TEX);

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_mori_idomizu.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000030
@ -20,8 +21,6 @@ void BgMoriIdomizu_WaitForMoriTex(BgMoriIdomizu* this, GlobalContext* globalCtx)
void BgMoriIdomizu_SetupMain(BgMoriIdomizu* this);
void BgMoriIdomizu_Main(BgMoriIdomizu* this, GlobalContext* globalCtx);
extern Gfx D_060049D0[];
static s16 sIsSpawned = false;
const ActorInit Bg_Mori_Idomizu_InitVars = {
@ -180,7 +179,7 @@ void BgMoriIdomizu_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0x7F - (gameplayFrames & 0x7F), gameplayFrames % 0x80, 0x20,
0x20, 1, gameplayFrames & 0x7F, gameplayFrames % 0x80, 0x20, 0x20));
gSPDisplayList(POLY_XLU_DISP++, D_060049D0);
gSPDisplayList(POLY_XLU_DISP++, gMoriIdomizuWaterDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_idomizu.c", 382);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_mori_kaitenkabe.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000000
@ -21,9 +22,6 @@ void BgMoriKaitenkabe_Wait(BgMoriKaitenkabe* this, GlobalContext* globalCtx);
void BgMoriKaitenkabe_SetupRotate(BgMoriKaitenkabe* this);
void BgMoriKaitenkabe_Rotate(BgMoriKaitenkabe* this, GlobalContext* globalCtx);
extern CollisionHeader D_060063B8;
extern Gfx D_060056B0[];
const ActorInit Bg_Mori_Kaitenkabe_InitVars = {
ACTOR_BG_MORI_KAITENKABE,
ACTORCAT_BG,
@ -58,7 +56,7 @@ void BgMoriKaitenkabe_Init(Actor* thisx, GlobalContext* globalCtx) {
osSyncPrintf("◯◯◯森の神殿オブジェクト【回転壁(arg_data : 0x%04x)】出現 \n", this->dyna.actor.params);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&D_060063B8, &colHeader);
CollisionHeader_GetVirtual(&gMoriKaitenkabeCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
this->moriTexObjIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_MORI_TEX);
if (this->moriTexObjIndex < 0) {
@ -172,7 +170,7 @@ void BgMoriKaitenkabe_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_kaitenkabe.c", 352),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_060056B0);
gSPDisplayList(POLY_OPA_DISP++, gMoriKaitenkabeDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_kaitenkabe.c", 356);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_bg_mori_rakkatenjo.h"
#include "objects/object_mori_objects/object_mori_objects.h"
#define FLAGS 0x00000030
@ -26,9 +27,6 @@ void BgMoriRakkatenjo_Rest(BgMoriRakkatenjo* this, GlobalContext* globalCtx);
void BgMoriRakkatenjo_SetupRise(BgMoriRakkatenjo* this);
void BgMoriRakkatenjo_Rise(BgMoriRakkatenjo* this, GlobalContext* globalCtx);
extern CollisionHeader D_060087AC;
extern Gfx D_06007690[];
static s16 sCamSetting = 0;
const ActorInit Bg_Mori_Rakkatenjo_InitVars = {
@ -75,7 +73,7 @@ void BgMoriRakkatenjo_Init(Actor* thisx, GlobalContext* globalCtx) {
return;
}
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
CollisionHeader_GetVirtual(&D_060087AC, &colHeader);
CollisionHeader_GetVirtual(&gMoriRakkatenjoCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
BgMoriRakkatenjo_SetupWaitForMoriTex(this);
sCamSetting = 0;
@ -233,7 +231,7 @@ void BgMoriRakkatenjo_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_mori_rakkatenjo.c", 502),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_06007690);
gSPDisplayList(POLY_OPA_DISP++, gMoriRakkatenjoDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_mori_rakkatenjo.c", 506);
}

View file

@ -6,6 +6,7 @@
#include "z_bg_spot08_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00400000
@ -31,7 +32,6 @@ const ActorInit Bg_Spot08_Bakudankabe_InitVars = {
(ActorFunc)BgSpot08Bakudankabe_Draw,
};
extern Gfx D_0500A880[];
extern CollisionHeader D_060039D4;
extern Gfx D_06003898[];
@ -149,7 +149,7 @@ void func_808B0324(BgSpot08Bakudankabe* this, GlobalContext* globalCtx) {
}
EffectSsKakera_Spawn(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E,
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, gFieldKakeraDL);
}
for (i = 0; i < ARRAY_COUNT(D_808B08AC); i++) {

View file

@ -7,6 +7,7 @@
#include "z_bg_spot11_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_spot11_obj/object_spot11_obj.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00000030
@ -52,8 +53,6 @@ static ColliderCylinderInit sCylinderInit = {
static Vec3f D_808B272C = { 2259.0f, 108.0f, -1550.0f };
static Vec3f D_808B2738 = { 2259.0f, 108.0f, -1550.0f };
extern Gfx D_0500A880[];
void func_808B2180(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) {
s32 pad;
@ -100,7 +99,7 @@ void func_808B2218(BgSpot11Bakudankabe* this, GlobalContext* globalCtx) {
rotationSpeed = 33;
}
EffectSsKakera_Spawn(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E,
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, gFieldKakeraDL);
}
Math_Vec3f_Sum(&thisx->world.pos, &D_808B272C, &burstDepthY);
func_80033480(globalCtx, &burstDepthY, 70, 4, 110, 160, 1);

View file

@ -7,6 +7,7 @@
#include "z_bg_spot17_bakudankabe.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/object_spot17_obj/object_spot17_obj.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00000000
@ -36,8 +37,6 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 1000, ICHAIN_STOP),
};
extern Gfx D_0500A880[];
void func_808B6BC0(BgSpot17Bakudankabe* this, GlobalContext* globalCtx) {
s32 pad[2];
s32 i;
@ -83,7 +82,7 @@ void func_808B6BC0(BgSpot17Bakudankabe* this, GlobalContext* globalCtx) {
rotationSpeed = 33;
}
EffectSsKakera_Spawn(globalCtx, &burstDepthY, &burstDepthX, &burstDepthY, gravityInfluence, rotationSpeed, 0x1E,
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
4, 0, scale, 1, 3, 80, KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, gFieldKakeraDL);
}
Math_Vec3f_Copy(&burstDepthY, &this->dyna.actor.world.pos);
func_80033480(globalCtx, &burstDepthY, 60.0f, 4, 110, 160, 1);

View file

@ -46,16 +46,16 @@ void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) {
WaterBox* waterBox;
Actor_ProcessInitChain(thisx, sInitChain);
this->unk_168 = ((thisx->params >> 8) & 0x3F);
this->type = ((thisx->params >> 8) & 0x3F);
thisx->params = thisx->params & 0xFF;
waterBox = &globalCtx->colCtx.colHeader->waterBoxes[1];
DynaPolyActor_Init(&this->dyna, DPM_PLAYER);
if (thisx->params == 1) {
if (thisx->params == HASI_WATER) {
// Water the moving platform floats on in B1. Never runs in Master Quest
waterBox->ySurface = thisx->world.pos.y = thisx->home.pos.y += -5.0f;
this->actionFunc = BgYdanHasi_InitWater;
} else {
if (thisx->params == 0) {
if (thisx->params == HASI_WATER_BLOCK) {
// Moving platform on the water in B1
CollisionHeader_GetVirtual(&gDTSlidingPlatformCol, &colHeader);
thisx->scale.z = 0.15f;
@ -67,9 +67,9 @@ void BgYdanHasi_Init(Actor* thisx, GlobalContext* globalCtx) {
CollisionHeader_GetVirtual(&gDTRisingPlatformsCol, &colHeader);
thisx->draw = NULL;
this->actionFunc = BgYdanHasi_SetupThreeBlocks;
Actor_SetFocus(thisx, 40.0f);
Actor_SetFocus(&this->dyna.actor, 40.0f);
}
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
}
this->timer = 0;
}
@ -101,7 +101,7 @@ void BgYdanHasi_UpdateFloatingBlock(BgYdanHasi* this, GlobalContext* globalCtx)
}
void BgYdanHasi_InitWater(BgYdanHasi* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
if (Flags_GetSwitch(globalCtx, this->type)) {
this->timer = 600;
this->actionFunc = BgYdanHasi_MoveWater;
}
@ -111,8 +111,8 @@ void BgYdanHasi_MoveWater(BgYdanHasi* this, GlobalContext* globalCtx) {
WaterBox* waterBox;
if (this->timer == 0) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f)) {
Flags_UnsetSwitch(globalCtx, this->unk_168);
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 1.0f) != 0) {
Flags_UnsetSwitch(globalCtx, this->type);
this->actionFunc = BgYdanHasi_InitWater;
}
func_8002F948(&this->dyna.actor, NA_SE_EV_WATER_LEVEL_DOWN - SFX_FLAG);
@ -137,7 +137,7 @@ void BgYdanHasi_DecWaterTimer(BgYdanHasi* this, GlobalContext* globalCtx) {
}
void BgYdanHasi_SetupThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
if (Flags_GetSwitch(globalCtx, this->type)) {
this->timer = 260;
this->dyna.actor.draw = BgYdanHasi_Draw;
this->actionFunc = BgYdanHasi_UpdateThreeBlocks;
@ -151,18 +151,17 @@ void BgYdanHasi_UpdateThreeBlocks(BgYdanHasi* this, GlobalContext* globalCtx) {
}
if (this->timer == 0) {
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, 3.0f) != 0) {
Flags_UnsetSwitch(globalCtx, this->unk_168);
Flags_UnsetSwitch(globalCtx, this->type);
this->dyna.actor.draw = NULL;
this->actionFunc = BgYdanHasi_SetupThreeBlocks;
} else {
func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
}
} else if (!Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 3.0f)) {
func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
} else {
if (!Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f, 3.0f)) {
func_8002F948(&this->dyna.actor, NA_SE_EV_ELEVATOR_MOVE - SFX_FLAG);
} else {
func_8002F994(&this->dyna.actor, this->timer);
}
func_8002F994(&this->dyna.actor, this->timer);
}
}
@ -176,7 +175,7 @@ void BgYdanHasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
static Gfx* dLists[] = { gDTSlidingPlatformDL, gDTWaterPlaneDL, gDTRisingPlatformsDL };
BgYdanHasi* this = THIS;
if (this->dyna.actor.params == 0 || this->dyna.actor.params == 2) {
if (this->dyna.actor.params == HASI_WATER_BLOCK || this->dyna.actor.params == HASI_THREE_BLOCKS) {
Gfx_DrawDListOpa(globalCtx, dLists[this->dyna.actor.params]);
} else {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_ydan_hasi.c", 577);

View file

@ -11,11 +11,16 @@ typedef void (*BgYdanHasiActionFunc)(struct BgYdanHasi*, GlobalContext*);
typedef struct BgYdanHasi {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgYdanHasiActionFunc actionFunc;
/* 0x0168 */ u8 unk_168;
/* 0x0169 */ s8 unk_169; //Unused
/* 0x0168 */ u8 type;
/* 0x016A */ s16 timer; //Also used as an offset for the water blocks Y position for a "bobbing" effect
} BgYdanHasi; // size = 0x016C
typedef enum {
/* 0 */ HASI_WATER_BLOCK,
/* 1 */ HASI_WATER,
/* 2 */ HASI_THREE_BLOCKS
} HasiType;
extern const ActorInit Bg_Ydan_Hasi_InitVars;
#endif

View file

@ -86,14 +86,14 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) {
CollisionHeader* colHeader = NULL;
ColliderTrisElementInit* triInit;
Actor_ProcessInitChain(thisx, sInitChain);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
Collider_InitTris(globalCtx, &this->collider);
Collider_SetTris(globalCtx, &this->collider, thisx, &sTrisInit, this->elements);
Collider_SetTris(globalCtx, &this->collider, &this->dyna.actor, &sTrisInit, this->elements);
this->unk_168 = thisx->params & 0xFFFF;
thisx->params = (thisx->params >> 8) & 0xFF;
this->switchFlag = this->dyna.actor.params & 0xFFFF;
thisx->params = (thisx->params >> 8) & 0xFF; // thisx is required to match here
if (thisx->params == 0) {
if (this->dyna.actor.params == 0) {
triInit = &sTrisElementsInit[0];
this->actionFunc = func_808BEFF4;
} else {
@ -102,7 +102,7 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) {
CollisionHeader_GetVirtual(&gDTFallingLadderCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, thisx, colHeader);
thisx->home.pos.y += -280.0f;
if (Flags_GetSwitch(globalCtx, this->unk_168)) {
if (Flags_GetSwitch(globalCtx, this->switchFlag)) {
thisx->world.pos.y = thisx->home.pos.y;
this->actionFunc = BgYdanMaruta_DoNothing;
} else {
@ -110,20 +110,20 @@ void BgYdanMaruta_Init(Actor* thisx, GlobalContext* globalCtx) {
}
}
sinRotY = Math_SinS(thisx->shape.rot.y);
cosRotY = Math_CosS(thisx->shape.rot.y);
sinRotY = Math_SinS(this->dyna.actor.shape.rot.y);
cosRotY = Math_CosS(this->dyna.actor.shape.rot.y);
for (i = 0; i < 3; i++) {
sp4C[i].x = (triInit->dim.vtx[i].x * cosRotY) + thisx->world.pos.x;
sp4C[i].y = triInit->dim.vtx[i].y + thisx->world.pos.y;
sp4C[i].z = thisx->world.pos.z - (triInit->dim.vtx[i].x * sinRotY);
sp4C[i].x = (triInit->dim.vtx[i].x * cosRotY) + this->dyna.actor.world.pos.x;
sp4C[i].y = triInit->dim.vtx[i].y + this->dyna.actor.world.pos.y;
sp4C[i].z = this->dyna.actor.world.pos.z - (triInit->dim.vtx[i].x * sinRotY);
}
Collider_SetTrisVertices(&this->collider, 0, &sp4C[0], &sp4C[1], &sp4C[2]);
sp4C[1].x = (triInit->dim.vtx[2].x * cosRotY) + thisx->world.pos.x;
sp4C[1].y = triInit->dim.vtx[0].y + thisx->world.pos.y;
sp4C[1].z = thisx->world.pos.z - (triInit->dim.vtx[2].x * sinRotY);
sp4C[1].x = (triInit->dim.vtx[2].x * cosRotY) + this->dyna.actor.world.pos.x;
sp4C[1].y = triInit->dim.vtx[0].y + this->dyna.actor.world.pos.y;
sp4C[1].z = this->dyna.actor.world.pos.z - (triInit->dim.vtx[2].x * sinRotY);
Collider_SetTrisVertices(&this->collider, 1, &sp4C[0], &sp4C[2], &sp4C[1]);
}
@ -149,7 +149,7 @@ void func_808BEFF4(BgYdanMaruta* this, GlobalContext* globalCtx) {
void func_808BF078(BgYdanMaruta* this, GlobalContext* globalCtx) {
if (this->collider.base.acFlags & AC_HIT) {
this->unk_16A = 20;
Flags_SetSwitch(globalCtx, this->unk_168);
Flags_SetSwitch(globalCtx, this->switchFlag);
func_80078884(NA_SE_SY_CORRECT_CHIME);
this->actionFunc = func_808BF108;
OnePointCutscene_Init(globalCtx, 3010, 50, &this->dyna.actor, MAIN_CAM);

View file

@ -11,7 +11,7 @@ typedef void (*BgYdanMarutaActionFunc)(struct BgYdanMaruta*, GlobalContext*);
typedef struct BgYdanMaruta {
/* 0x0000 */ DynaPolyActor dyna;
/* 0x0164 */ BgYdanMarutaActionFunc actionFunc;
/* 0x0168 */ u8 unk_168;
/* 0x0168 */ u8 switchFlag;
/* 0x016A */ s16 unk_16A;
/* 0x016C */ ColliderTris collider;
/* 0x018C */ ColliderTrisElement elements[2];

View file

@ -5,8 +5,9 @@
*/
#include "z_demo_ec.h"
#include "objects/object_zo/object_zo.h"
#include "vt.h"
#include "objects/object_zo/object_zo.h"
#include "objects/object_ec/object_ec.h"
#define FLAGS 0x00000010
@ -91,53 +92,62 @@ static s16 sAnimationObjects[] = {
OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_EC, OBJECT_GM, OBJECT_MA2,
};
// skeletons
// skeletons (all from other objects)
// Object_IN
extern FlexSkeletonHeader D_06013B88;
// Object_TA
extern FlexSkeletonHeader D_0600B7B8;
// Object_FU
extern FlexSkeletonHeader D_06006C90;
// Object_KM1, Object_KW1, Object_BJI, Objct_AHG, Object_BOB, Object_BBA, Object_ANE
extern FlexSkeletonHeader D_060000F0;
// Object_Toryo
extern FlexSkeletonHeader D_06007150;
// Object_Daiku
extern FlexSkeletonHeader D_06007958;
// Object_GE1
extern FlexSkeletonHeader D_06000330;
// Object_ZO
extern FlexSkeletonHeader D_0600BFA8;
// Object_KZ
extern FlexSkeletonHeader D_060086D0;
// Object_MD
extern FlexSkeletonHeader D_06007FB8;
// Object_Niw
extern FlexSkeletonHeader D_06002530;
// Object_DS2
extern FlexSkeletonHeader D_06004258;
// Object_OS
extern FlexSkeletonHeader D_06004658;
// Object_Fish
extern FlexSkeletonHeader D_060085F8;
// Object_RS
extern FlexSkeletonHeader D_06004868;
// Object_OF1D_MAP
extern FlexSkeletonHeader D_0600FEF0;
// Object_MA2
extern FlexSkeletonHeader D_06008D90;
// animations
extern AnimationHeader D_0600BD38;
extern AnimationHeader D_060048F4;
extern AnimationHeader D_0600196C;
extern AnimationHeader D_06005670;
extern AnimationHeader D_06005EA8;
extern AnimationHeader D_0600164C;
extern AnimationHeader D_0600164C;
extern AnimationHeader D_0600513C;
extern AnimationHeader D_06002254;
extern AnimationHeader D_0600C918;
extern AnimationHeader D_06006C40;
extern AnimationHeader D_060095DC;
extern AnimationHeader D_06009BB4;
extern AnimationHeader D_0600A07C;
extern AnimationHeader D_0600A474;
extern AnimationHeader D_06000CD8;
extern AnimationHeader D_0600AFE0;
extern AnimationHeader D_0600AFE0;
extern AnimationHeader D_06002FA0;
extern AnimationHeader D_06003A98;
extern AnimationHeader D_06002FA0;
// animations from other objects
extern AnimationHeader D_060002B8;
extern AnimationHeader D_06009EE0;
extern AnimationHeader D_06006930;
extern AnimationHeader D_06006220;
extern AnimationHeader D_06008D1C;
extern AnimationHeader D_06009234;
extern AnimationHeader D_06009EE0; // Object MA2
extern AnimationHeader D_06004390;
extern AnimationHeader D_060076C0;
extern AnimationHeader D_06005F20;
@ -368,7 +378,7 @@ void DemoEc_InitIngo(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06013B88);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_060048F4, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcIngoAnim, 0, 0.0f, false);
func_8096D64C(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_INGO;
@ -389,7 +399,7 @@ void DemoEc_InitTalon(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_0600B7B8);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600BD38, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcTalonAnim, 0, 0.0f, false);
func_8096D64C(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_TALON;
@ -410,7 +420,7 @@ void DemoEc_InitWindmillMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06006C90);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600196C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcWindmillManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_WINDMILL_MAN;
@ -431,7 +441,7 @@ void DemoEc_InitKokiriBoy(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005670, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_KOKIRI_BOY;
@ -442,7 +452,7 @@ void DemoEc_InitDancingKokiriBoy(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600513C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcDancingKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_DANCING_KOKIRI_BOY;
@ -470,7 +480,7 @@ void DemoEc_InitKokiriGirl(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005670, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_KOKIRI_GIRL;
@ -481,7 +491,7 @@ void DemoEc_InitDancingKokiriGirl(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600513C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcDancingKokiriAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_DANCING_KOKIRI_GIRL;
@ -512,7 +522,7 @@ void DemoEc_InitOldMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_OLD_MAN;
@ -540,7 +550,7 @@ void DemoEc_InitBeardedMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_BEARDED_MAN;
@ -568,7 +578,7 @@ void DemoEc_InitWoman(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_WOMAN;
@ -594,7 +604,7 @@ void DemoEc_InitOldWoman(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06005EA8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcOldManAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_OLD_WOMAN;
@ -615,7 +625,7 @@ void DemoEc_InitBossCarpenter(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06007150);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600164C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcCarpenterAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_BOSS_CARPENTER;
@ -636,7 +646,7 @@ void DemoEc_InitCarpenter(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06007958);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600164C, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcCarpenterAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_CARPENTER;
@ -709,7 +719,7 @@ void DemoEc_InitGerudo(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06000330);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06002254, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcGerudoAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_GERUDO;
@ -760,7 +770,7 @@ void DemoEc_InitDancingZora(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &gZoraSkel);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600C918, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcDancingZoraAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_DANCING_ZORA;
@ -786,7 +796,7 @@ void DemoEc_InitKingZora(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060086D0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06006C40, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcKingZoraAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_KING_ZORA;
@ -806,13 +816,13 @@ void func_8096F1D4(DemoEc* this) {
void func_8096F224(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06006930, 2, -8.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_006930, 2, -8.0f, false);
this->updateMode = EC_UPDATE_17;
}
void func_8096F26C(DemoEc* this, s32 arg1) {
if (arg1 != 0) {
DemoEc_ChangeAnimation(this, &D_06006220, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_006220, 0, 0.0f, false);
this->updateMode = EC_UPDATE_18;
}
}
@ -871,7 +881,7 @@ void DemoEc_InitMido(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06007FB8);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_060095DC, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcMidoAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_MIDO;
@ -881,13 +891,13 @@ void DemoEc_InitMido(DemoEc* this, GlobalContext* globalCtx) {
void func_8096F4FC(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06008D1C, 2, -8.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_008D1C, 2, -8.0f, false);
this->updateMode = EC_UPDATE_20;
}
void func_8096F544(DemoEc* this, s32 changeAnim) {
if (changeAnim) {
DemoEc_ChangeAnimation(this, &D_06009234, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcAnim_009234, 0, 0.0f, false);
}
}
@ -940,11 +950,11 @@ void DemoEc_InitCucco(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
if (this->actor.params == 22) {
animation = &D_06009BB4;
animation = &gDemoEcJumpingCuccoAnim;
} else if (this->actor.params == 23) {
animation = &D_0600A07C;
animation = &gDemoEcJumpingCucco2Anim;
} else {
animation = &D_0600A474;
animation = &gDemoEcWalkingCuccoAnim;
}
DemoEc_ChangeAnimation(this, animation, 0, 0.0f, false);
@ -968,7 +978,7 @@ void DemoEc_InitCuccoLady(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060000F0);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_06000CD8, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcCuccoLadyAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_CUCCO_LADY;
@ -994,7 +1004,7 @@ void DemoEc_InitPotionShopOwner(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06004258);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_POTION_SHOP_OWNER;
@ -1020,7 +1030,7 @@ void DemoEc_InitMaskShopOwner(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06004658);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_MASK_SHOP_OWNER;
@ -1041,7 +1051,7 @@ void DemoEc_InitFishingMan(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_060085F8);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_FISHING_MAN;
@ -1076,7 +1086,7 @@ void DemoEc_InitBombchuShopOwner(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseDrawObject(this, globalCtx);
DemoEc_InitSkelAnime(this, globalCtx, &D_06004868);
DemoEc_UseAnimationObject(this, globalCtx);
DemoEc_ChangeAnimation(this, &D_0600AFE0, 0, 0.0f, false);
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
func_8096D5D4(this, globalCtx);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
this->updateMode = EC_UPDATE_BOMBCHU_SHOP_OWNER;
@ -1108,13 +1118,13 @@ void DemoEc_InitGorons(DemoEc* this, GlobalContext* globalCtx) {
DemoEc_UseAnimationObject(this, globalCtx);
if (this->actor.params == 30) {
animation = &D_06002FA0;
animation = &gDemoEcGoronAnim;
goronScale = 1.0f;
} else if (this->actor.params == 31) {
animation = &D_06003A98;
animation = &gDemoEcGoron2Anim;
goronScale = 1.0f;
} else if (this->actor.params == 32) {
animation = &D_06002FA0;
animation = &gDemoEcGoronAnim;
goronScale = 15.0f;
} else {
goronScale = 5.0f;

View file

@ -1,5 +1,6 @@
#include "z_demo_tre_lgt.h"
#include "overlays/actors/ovl_En_Box/z_en_box.h"
#include "objects/object_box/object_box.h"
#define FLAGS 0x00000010
@ -15,8 +16,6 @@ void func_80993754(DemoTreLgt* this);
void func_8099375C(DemoTreLgt* this, GlobalContext* globalCtx);
void func_809937B4(DemoTreLgt* this, GlobalContext* globalCtx, f32 currentFrame);
extern SkelCurveLimbList D_06005EB8;
typedef struct {
/* 0x00 */ f32 startFrame;
/* 0x04 */ f32 endFrame;
@ -41,7 +40,7 @@ const ActorInit Demo_Tre_Lgt_InitVars = {
(ActorFunc)DemoTreLgt_Draw,
};
static TransformUpdateIndex* sTransformUpdIdx[] = { 0x06004B60, 0x06004F70 };
static TransformUpdateIndex* sTransformUpdIdx[] = { &gTreasureChestCurveAnim_4B60, &gTreasureChestCurveAnim_4F70 };
static DemoTreLgtActionFunc sActionFuncs[] = {
func_8099375C,
@ -51,7 +50,8 @@ static DemoTreLgtActionFunc sActionFuncs[] = {
void DemoTreLgt_Init(Actor* thisx, GlobalContext* globalCtx) {
DemoTreLgt* this = THIS;
if (!SkelCurve_Init(globalCtx, &this->skelCurve, &D_06005EB8, sTransformUpdIdx[0])) {
if (!SkelCurve_Init(globalCtx, &this->skelCurve, &gTreasureChestCurveSkel, sTransformUpdIdx[0])) {
// Demo_Tre_Lgt_Actor_ct (); Construct failed
osSyncPrintf("Demo_Tre_Lgt_Actor_ct();コンストラクト失敗\n");
}

View file

@ -5,6 +5,7 @@
*/
#include "z_door_ana.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x02000000
@ -17,7 +18,7 @@ void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx);
void DoorAna_WaitClosed(DoorAna* this, GlobalContext* globalCtx);
void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx);
void DoorAna_GrabLink(DoorAna* this, GlobalContext* globalCtx);
void DoorAna_GrabPlayer(DoorAna* this, GlobalContext* globalCtx);
const ActorInit Door_Ana_InitVars = {
ACTOR_DOOR_ANA,
@ -57,8 +58,6 @@ static s16 entrances[] = {
0x05B0, 0x05B4, 0x05B8, 0x05BC, 0x05C0, 0x05C4, 0x05FC,
};
extern Gfx D_05001390[];
void DoorAna_SetupAction(DoorAna* this, DoorAnaActionFunc actionFunc) {
this->actionFunc = actionFunc;
}
@ -140,7 +139,7 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
destinationIdx = this->actor.home.rot.z + 1;
}
globalCtx->nextEntranceIndex = entrances[destinationIdx];
DoorAna_SetupAction(this, DoorAna_GrabLink);
DoorAna_SetupAction(this, DoorAna_GrabPlayer);
} else {
if (!Player_InCsMode(globalCtx) && !(player->stateFlags1 & 0x8800000) &&
this->actor.xzDistToPlayer <= 15.0f && -50.0f <= this->actor.yDistToPlayer &&
@ -156,7 +155,7 @@ void DoorAna_WaitOpen(DoorAna* this, GlobalContext* globalCtx) {
}
// update function for after the player has triggered the grotto
void DoorAna_GrabLink(DoorAna* this, GlobalContext* globalCtx) {
void DoorAna_GrabPlayer(DoorAna* this, GlobalContext* globalCtx) {
Player* player;
if (this->actor.yDistToPlayer <= 0.0f && 15.0f < this->actor.xzDistToPlayer) {
@ -180,7 +179,7 @@ void DoorAna_Draw(Actor* thisx, GlobalContext* globalCtx) {
func_80093D84(globalCtx->state.gfxCtx);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_door_ana.c", 446),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_05001390);
gSPDisplayList(POLY_XLU_DISP++, gGrottoDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_door_ana.c", 449);
}

View file

@ -7,6 +7,7 @@
#include "z_door_shutter.h"
#include "objects/object_demo_kekkai/object_demo_kekkai.h"
#include "overlays/actors/ovl_Boss_Goma/z_boss_goma.h"
#include "objects/object_ydan_objects/object_ydan_objects.h"
#include "objects/object_gnd/object_gnd.h"
#include "objects/object_goma/object_goma.h"
#include "objects/gameplay_keep/gameplay_keep.h"
@ -86,8 +87,8 @@ typedef struct {
} ShutterInfo;
static ShutterInfo D_80998134[] = {
{ 0x060067A0, gDoorMetalBarsDL, 130, 12, 20, 15 },
{ 0x06006910, gDoorMetalBarsDL, 130, 12, 20, 15 },
{ gDTDungeonDoor1DL, gDoorMetalBarsDL, 130, 12, 20, 15 },
{ gDTDungeonDoor2DL, gDoorMetalBarsDL, 130, 12, 20, 15 },
{ 0x060000C0, 0x060001F0, 240, 14, 70, 15 },
{ 0x06000590, 0x06006460, 0, 110, 50, 15 },
{ gPhantomGanonBarsDL, NULL, 130, 12, 50, 15 },

View file

@ -1,4 +1,5 @@
#include "z_en_box.h"
#include "objects/object_box/object_box.h"
#define FLAGS 0x00000000
@ -50,16 +51,6 @@ void EnBox_AppearAnimation(EnBox*, GlobalContext*);
void EnBox_WaitOpen(EnBox*, GlobalContext*);
void EnBox_Open(EnBox*, GlobalContext*);
extern AnimationHeader D_06000128;
extern AnimationHeader D_0600024C;
extern AnimationHeader D_0600043C;
extern Gfx D_060006F0[]; // regular chest base
extern Gfx D_06000AE8[]; // boss key chest base
extern Gfx D_060010C0[]; // regular chest top
extern Gfx D_06001678[]; // boss key chest top
extern SkeletonHeader D_060047D8;
extern CollisionHeader D_06005FC8;
const ActorInit En_Box_InitVars = {
ACTOR_EN_BOX,
ACTORCAT_CHEST,
@ -72,13 +63,14 @@ const ActorInit En_Box_InitVars = {
(ActorFunc)EnBox_Draw,
};
static AnimationHeader* D_809CA800[4] = { &D_0600024C, &D_06000128, &D_0600043C, &D_0600043C };
static AnimationHeader* sAnimations[4] = { &gTreasureChestAnim_00024C, &gTreasureChestAnim_000128,
&gTreasureChestAnim_00043C, &gTreasureChestAnim_00043C };
static InitChainEntry sInitChain[] = {
ICHAIN_U8(targetMode, 0, ICHAIN_STOP),
};
static s32 sUnused;
static UNK_TYPE sUnused;
void EnBox_SetupAction(EnBox* this, EnBoxActionFunc actionFunc) {
this->actionFunc = actionFunc;
@ -107,13 +99,13 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
f32 endFrame;
animFrameStart = 0.0f;
anim = D_809CA800[((void)0, gSaveContext.linkAge)];
anim = sAnimations[((void)0, gSaveContext.linkAge)];
colHeader = NULL;
endFrame = Animation_GetLastFrame(anim);
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, DPM_UNK);
CollisionHeader_GetVirtual(&D_06005FC8, &colHeader);
CollisionHeader_GetVirtual(&gTreasureChestCol, &colHeader);
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx2, &globalCtx2->colCtx.dyna, &this->dyna.actor, colHeader);
func_8003ECA8(globalCtx2, &globalCtx2->colCtx.dyna, this->dyna.bgId);
@ -179,7 +171,7 @@ void EnBox_Init(Actor* thisx, GlobalContext* globalCtx) {
this->dyna.actor.world.rot.y += 0x8000;
this->dyna.actor.home.rot.z = this->dyna.actor.world.rot.z = this->dyna.actor.shape.rot.z = 0;
SkelAnime_Init(globalCtx2, &this->skelanime, &D_060047D8, anim, this->jointTable, this->morphTable, 5);
SkelAnime_Init(globalCtx2, &this->skelanime, &gTreasureChestSkel, anim, this->jointTable, this->morphTable, 5);
Animation_Change(&this->skelanime, anim, 1.5f, animFrameStart, endFrame, ANIMMODE_ONCE, 0.0f);
switch (this->type) {
@ -407,7 +399,7 @@ void EnBox_WaitOpen(EnBox* this, GlobalContext* globalCtx) {
this->movementFlags |= ENBOX_MOVE_IMMOBILE;
if (this->unk_1F4 != 0) { // unk_1F4 is modified by player code
linkAge = gSaveContext.linkAge;
anim = D_809CA800[(this->unk_1F4 < 0 ? 2 : 0) + linkAge];
anim = sAnimations[(this->unk_1F4 < 0 ? 2 : 0) + linkAge];
frameCount = Animation_GetLastFrame(anim);
Animation_Change(&this->skelanime, anim, 1.5f, 0, frameCount, ANIMMODE_ONCE, 0.0f);
EnBox_SetupAction(this, EnBox_Open);
@ -558,17 +550,17 @@ void EnBox_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Ve
gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_box.c", 1492),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->type != ENBOX_TYPE_DECORATED_BIG) {
gSPDisplayList((*gfx)++, D_060006F0);
gSPDisplayList((*gfx)++, gTreasureChestChestFrontDL);
} else {
gSPDisplayList((*gfx)++, D_06000AE8);
gSPDisplayList((*gfx)++, gTreasureChestBossKeyChestFrontDL);
}
} else if (limbIndex == 3) {
gSPMatrix((*gfx)++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_box.c", 1502),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
if (this->type != ENBOX_TYPE_DECORATED_BIG) {
gSPDisplayList((*gfx)++, D_060010C0);
gSPDisplayList((*gfx)++, gTreasureChestChestSideAndLidDL);
} else {
gSPDisplayList((*gfx)++, D_06001678);
gSPDisplayList((*gfx)++, gTreasureChestBossKeyChestSideAndTopDL);
}
}
}

View file

@ -7,6 +7,7 @@
#include "z_en_butte.h"
#include "overlays/actors/ovl_En_Elf/z_en_elf.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00000000
@ -82,9 +83,6 @@ static EnButteFlightParams sFollowLinkParams[] = {
{ 10, 20, 2.4f, 0.3f, 1.0f, 0 },
};
extern AnimationHeader D_05002470;
extern SkeletonHeader D_050036F0;
void EnButte_SelectFlightParams(EnButte* this, EnButteFlightParams* flightParams) {
if (this->flightParamsIdx == 0) {
if (Rand_ZeroOne() < 0.6f) {
@ -162,14 +160,15 @@ void EnButte_Init(Actor* thisx, GlobalContext* globalCtx) {
this->actor.uncullZoneScale = 200.0f;
}
SkelAnime_Init(globalCtx, &this->skelAnime, &D_050036F0, &D_05002470, this->jointTable, this->morphTable, 8);
SkelAnime_Init(globalCtx, &this->skelAnime, &gButterflySkel, &gButterflyAnim, this->jointTable, this->morphTable,
8);
Collider_InitJntSph(globalCtx, &this->collider);
Collider_SetJntSph(globalCtx, &this->collider, &this->actor, &sColliderInit, this->colliderItems);
this->actor.colChkInfo.mass = 0;
this->unk_25C = Rand_ZeroOne() * 0xFFFF;
this->unk_25E = Rand_ZeroOne() * 0xFFFF;
this->unk_260 = Rand_ZeroOne() * 0xFFFF;
Animation_Change(&this->skelAnime, &D_05002470, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gButterflyAnim, 1.0f, 0.0f, 0.0f, ANIMMODE_LOOP_INTERP, 0.0f);
EnButte_SetupFlyAround(this);
this->actor.shape.rot.x -= 0x2320;
this->drawSkelAnime = true;

View file

@ -1,4 +1,5 @@
#include "z_en_cs.h"
#include "objects/object_link_child/object_link_child.h"
#define FLAGS 0x00000009
@ -16,7 +17,6 @@ s32 EnCs_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList,
void EnCs_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList, Vec3s* rot, void* thisx);
extern FlexSkeletonHeader D_06008540; // Graveyard boy skeleton
extern Gfx D_0602AF70[]; // Spooky Mask in Child Link's object
const ActorInit En_Cs_InitVars = {
ACTOR_EN_CS,
@ -439,7 +439,7 @@ void EnCs_Draw(Actor* thisx, GlobalContext* globalCtx) {
mtx = Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_cs.c", 1000);
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[childLinkObjectIndex].segment);
gSPSegment(POLY_OPA_DISP++, 0x0D, mtx - 7);
gSPDisplayList(POLY_OPA_DISP++, D_0602AF70);
gSPDisplayList(POLY_OPA_DISP++, gLinkChildSpookyMaskDL);
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment);
}
}

View file

@ -6,6 +6,7 @@
#include "z_en_door.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "objects/object_hidan_objects/object_hidan_objects.h"
#include "objects/object_mizu_objects/object_mizu_objects.h"
@ -73,7 +74,7 @@ static Gfx* D_809FCEE4[5][2] = {
{ gFireTempleDoorWithHandleFrontDL, gFireTempleDoorWithHandleBackDL },
{ gWaterTempleDoorLeftDL, gWaterTempleDoorRightDL },
{ 0x060013B8, 0x06001420 },
{ 0x050047A0, 0x05004978 },
{ gFieldDoor1DL, gFieldDoor2DL },
};
void EnDoor_Init(Actor* thisx, GlobalContext* globalCtx2) {

View file

@ -1,4 +1,5 @@
#include "z_en_fr.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "vt.h"
#define FLAGS 0x02000019
@ -51,8 +52,6 @@ void EnFr_SetIdle(EnFr* this, GlobalContext* globalCtx);
extern FlexSkeletonHeader D_0600B498; // Frog
extern AnimationHeader D_06001534; // Frog
extern SkeletonHeader D_050036F0; // Butterfly
extern AnimationHeader D_05002470; // Butterfly
extern AnimationHeader D_060007BC; // Frog Jumping
extern AnimationHeader D_060011C0; // Frog Landing
@ -161,8 +160,7 @@ static s16 sTimerFrogSong[] = {
40, 20, 15, 12, 12,
};
// static InitChainEntry sInitChain[]
InitChainEntry D_80A1D0BC[] = {
static InitChainEntry sInitChain[] = {
ICHAIN_U8(targetMode, 2, ICHAIN_CONTINUE),
ICHAIN_F32(targetArrowOffset, 30, ICHAIN_STOP),
};
@ -278,13 +276,13 @@ void EnFr_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actor.flags &= ~0x10;
frogIndex = this->actor.params - 1;
sEnFrPointers.frogs[frogIndex] = this;
Actor_ProcessInitChain(&this->actor, D_80A1D0BC);
Actor_ProcessInitChain(&this->actor, sInitChain);
// frog
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_0600B498, &D_06001534, this->jointTable, this->morphTable,
24);
// butterfly
SkelAnime_Init(globalCtx, &this->skelAnimeButterfly, &D_050036F0, &D_05002470, this->jointTableButterfly,
this->morphTableButterfly, 8);
SkelAnime_Init(globalCtx, &this->skelAnimeButterfly, &gButterflySkel, &gButterflyAnim,
this->jointTableButterfly, this->morphTableButterfly, 8);
// When playing the song for the HP, the frog with the next note and the butterfly turns on its lightsource
this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo);
Lights_PointNoGlowSetInfo(&this->lightInfo, this->actor.home.pos.x, this->actor.home.pos.y,

View file

@ -5,6 +5,7 @@
*/
#include "z_en_heishi1.h"
#include "objects/object_sd/object_sd.h"
#include "vt.h"
#define FLAGS 0x00000010
@ -64,10 +65,6 @@ static s32 sCamDataIdxs[] = {
static s16 sWaypoints[] = { 0, 4, 1, 5, 2, 6, 3, 7 };
extern AnimationHeader D_06005880;
extern AnimationHeader D_06005C30;
extern SkeletonHeader D_0600BAC8;
void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
s32 pad;
EnHeishi1* this = THIS;
@ -76,7 +73,8 @@ void EnHeishi1_Init(Actor* thisx, GlobalContext* globalCtx) {
u16 time;
Actor_SetScale(&this->actor, 0.01f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_06005C30, this->jointTable, this->morphTable, 17);
SkelAnime_Init(globalCtx, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable,
17);
this->type = (this->actor.params >> 8) & 0xFF;
this->path = this->actor.params & 0xFF;
@ -139,9 +137,9 @@ void EnHeishi1_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnHeishi1_SetupWalk(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005880);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiWalkAnim);
Animation_Change(&this->skelAnime, &D_06005880, this->animSpeed, 0.0f, (s16)frameCount, ANIMMODE_LOOP,
Animation_Change(&this->skelAnime, &gEnHeishiWalkAnim, this->animSpeed, 0.0f, (s16)frameCount, ANIMMODE_LOOP,
this->transitionRate);
this->bodyTurnSpeed = 0.0f;
this->moveSpeed = 0.0f;
@ -223,9 +221,9 @@ void EnHeishi1_Walk(EnHeishi1* this, GlobalContext* globalCtx) {
}
void EnHeishi1_SetupMoveToLink(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005880);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiWalkAnim);
Animation_Change(&this->skelAnime, &D_06005880, 3.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -3.0f);
Animation_Change(&this->skelAnime, &gEnHeishiWalkAnim, 3.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -3.0f);
this->bodyTurnSpeed = 0.0f;
this->moveSpeed = 0.0f;
func_8010B680(globalCtx, 0x702D, &this->actor);
@ -251,9 +249,9 @@ void EnHeishi1_MoveToLink(EnHeishi1* this, GlobalContext* globalCtx) {
void EnHeishi1_SetupWait(EnHeishi1* this, GlobalContext* globalCtx) {
s16 rand;
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, this->animSpeed, 0.0f, (s16)frameCount, ANIMMODE_LOOP,
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, this->animSpeed, 0.0f, (s16)frameCount, ANIMMODE_LOOP,
this->transitionRate);
this->headBehaviorDecided = false;
this->headDirection = Rand_ZeroFloat(1.99f);
@ -321,9 +319,9 @@ void EnHeishi1_Wait(EnHeishi1* this, GlobalContext* globalCtx) {
}
void EnHeishi1_SetupTurnTowardLink(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->kickTimer = 30;
this->actionFunc = EnHeishi1_TurnTowardLink;
}
@ -343,9 +341,9 @@ void EnHeishi1_TurnTowardLink(EnHeishi1* this, GlobalContext* globalCtx) {
}
void EnHeishi1_SetupKick(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = EnHeishi1_Kick;
}
@ -369,9 +367,9 @@ void EnHeishi1_Kick(EnHeishi1* this, GlobalContext* globalCtx) {
}
void EnHeishi1_SetupWaitNight(EnHeishi1* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = EnHeishi1_WaitNight;
}

View file

@ -6,6 +6,8 @@
#include "vt.h"
#include "z_en_heishi2.h"
#include "objects/object_sd/object_sd.h"
#include "objects/object_link_child/object_link_child.h"
#include "overlays/actors/ovl_Bg_Gate_Shutter/z_bg_gate_shutter.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "overlays/actors/ovl_Bg_Spot15_Saku/z_bg_spot15_saku.h"
@ -19,9 +21,9 @@ void EnHeishi2_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnHeishi2_Update(Actor* thisx, GlobalContext* globalCtx);
void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx);
void func_80A54C6C(Actor* thisx, GlobalContext* globalCtx);
void func_80A531CC(EnHeishi2* this, GlobalContext* globalCtx);
void func_80A531D8(EnHeishi2* this, GlobalContext* globalCtx);
void EnHeishi2_DrawKingGuard(Actor* thisx, GlobalContext* globalCtx);
void EnHeishi2_DoNothing1(EnHeishi2* this, GlobalContext* globalCtx);
void EnHeishi_DoNothing2(EnHeishi2* this, GlobalContext* globalCtx);
void func_80A531E4(EnHeishi2* this, GlobalContext* globalCtx);
void func_80A53278(EnHeishi2* this, GlobalContext* globalCtx);
void func_80A5344C(EnHeishi2* this, GlobalContext* globalCtx);
@ -50,12 +52,6 @@ void func_80A546DC(EnHeishi2* this, GlobalContext* globalCtx);
void func_80A541FC(EnHeishi2* this, GlobalContext* globalCtx);
void func_80A53DF8(EnHeishi2* this, GlobalContext* globalCtx);
extern AnimationHeader D_06005C30;
extern AnimationHeader D_06005500;
extern SkeletonHeader D_0600BAC8;
extern Gfx D_0602B060[]; // Keaton Mask
extern Gfx D_06002C10[]; // 2D Guard in Window
const ActorInit En_Heishi2_InitVars = {
ACTOR_EN_HEISHI2,
ACTORCAT_NPC,
@ -93,15 +89,15 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
EnHeishi2* this = THIS;
Actor_SetScale(&this->actor, 0.01f);
this->initParams = this->actor.params & 0xFF;
this->type = this->actor.params & 0xFF;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
if ((this->initParams == 6) || (this->initParams == 9)) {
this->actor.draw = func_80A54C6C;
if ((this->type == 6) || (this->type == 9)) {
this->actor.draw = EnHeishi2_DrawKingGuard;
this->actor.flags &= -2;
Actor_ChangeCategory(globalCtx, &globalCtx->actorCtx, &this->actor, 6);
if (this->initParams == 6) {
this->actionFunc = func_80A531CC;
if (this->type == 6) {
this->actionFunc = EnHeishi2_DoNothing1;
} else {
osSyncPrintf("\n\n");
@ -124,7 +120,8 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
} else {
this->unk_2E0 = 60.0f;
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_06005C30, this->jointTable, this->morphTable, 17);
SkelAnime_Init(globalCtx, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable,
this->morphTable, 17);
collider = &this->collider;
Collider_InitCylinder(globalCtx, collider);
Collider_SetCylinder(globalCtx, collider, &this->actor, &sCylinderInit);
@ -133,7 +130,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
this->collider.dim.height = 0x46;
this->actor.targetMode = 6;
switch (this->initParams) {
switch (this->type) {
case 2:
this->actionFunc = func_80A531E4;
@ -149,7 +146,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 覗き穴奥兵士ふぃ〜 ☆☆☆☆☆ \n" VT_RST);
Collider_DestroyCylinder(globalCtx, collider);
this->actor.flags &= -0xA;
this->actionFunc = func_80A531D8;
this->actionFunc = EnHeishi_DoNothing2;
break;
}
@ -158,7 +155,7 @@ void EnHeishi2_Init(Actor* thisx, GlobalContext* globalCtx) {
// "Soldier Set 2 Completed!"
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n" VT_RST, this->actor.params);
// "Identification Completed!"
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->initParams);
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了! ☆☆☆☆☆ %d\n" VT_RST, this->type);
// "Message completed!"
osSyncPrintf(VT_FGCOL(PURPLE) " ☆☆☆☆☆ メッセージ完了! ☆☆☆☆☆ %x\n\n" VT_RST, (this->actor.params >> 8) & 0xF);
}
@ -172,16 +169,16 @@ void EnHeishi2_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
}
void func_80A531CC(EnHeishi2* this, GlobalContext* globalCtx) {
void EnHeishi2_DoNothing1(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A531D8(EnHeishi2* this, GlobalContext* globalCtx) {
void EnHeishi_DoNothing2(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A531E4(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A53278;
}
@ -277,10 +274,10 @@ void func_80A53538(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A535BC(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005500);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiSlamSpearAnim);
this->unk_2EC = frameCount;
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiSlamSpearAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80A53638;
}
@ -312,9 +309,9 @@ void func_80A53638(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A5372C(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->unk_2F2[0] = 200;
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
@ -348,9 +345,9 @@ void func_80A53850(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A53908(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A5399C;
}
@ -441,10 +438,10 @@ void func_80A53C0C(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A53C90(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005500);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiSlamSpearAnim);
this->unk_2EC = frameCount;
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiSlamSpearAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80A53D0C;
}
@ -479,9 +476,9 @@ void func_80A53D0C(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A53DF8(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->unk_2F2[0] = 200;
this->cameraId = Gameplay_CreateSubCamera(globalCtx);
Gameplay_ChangeCameraStatus(globalCtx, MAIN_CAM, CAM_STAT_WAIT);
@ -604,10 +601,10 @@ void func_80A5427C(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A54320(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005500);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiSlamSpearAnim);
this->unk_2EC = frameCount;
Animation_Change(&this->skelAnime, &D_06005500, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiSlamSpearAnim, 1.0f, 0.0f, frameCount, ANIMMODE_ONCE, -10.0f);
this->audioFlag = 0;
this->actionFunc = func_80A543A0;
}
@ -699,28 +696,28 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
if (Text_GetFaceReaction(globalCtx, 5) != 0) {
if (this->unk_30B == 0) {
if (this->initParams == 2) {
if (this->type == 2) {
this->actionFunc = func_80A53278;
return;
}
if (this->initParams == 5) {
if (this->type == 5) {
this->actionFunc = func_80A5399C;
return;
}
}
} else if (this->unk_30B != 0) {
if (this->initParams == 2) {
if (this->type == 2) {
this->actionFunc = func_80A53278;
return;
}
if (this->initParams == 5) {
if (this->type == 5) {
this->actionFunc = func_80A5399C;
return;
}
}
if (func_8002F194(&this->actor, globalCtx)) {
if (this->initParams == 2) {
if (this->type == 2) {
if (this->unk_30E == 1) {
this->actionFunc = func_80A5344C;
return;
@ -728,7 +725,7 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
this->actionFunc = func_80A53278;
return;
}
} else if (this->initParams == 5) {
} else if (this->type == 5) {
if (this->unk_300 == 6) {
this->actionFunc = func_80A5399C;
}
@ -746,7 +743,7 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
}
}
if (((this->initParams != 2) && (this->initParams != 5)) ||
if (((this->type != 2) && (this->type != 5)) ||
((yawDiff = ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)),
!(this->actor.xzDistToPlayer > 120.0f)) &&
(yawDiff < 0x4300))) {
@ -755,9 +752,9 @@ void func_80A5475C(EnHeishi2* this, GlobalContext* globalCtx) {
}
void func_80A54954(EnHeishi2* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A549E8;
}
@ -766,10 +763,10 @@ void func_80A549E8(EnHeishi2* this, GlobalContext* globalCtx) {
if (this->unk_300 == func_8010BDBC(&globalCtx->msgCtx)) {
if (func_80106BC8(globalCtx) != 0) {
func_80106CCC(globalCtx);
if (this->initParams == 2) {
if (this->type == 2) {
this->actionFunc = func_80A531E4;
}
if (this->initParams == 5) {
if (this->type == 5) {
this->actionFunc = func_80A53908;
}
}
@ -782,7 +779,7 @@ void EnHeishi2_Update(Actor* thisx, GlobalContext* globalCtx) {
s32 i;
Actor_SetFocus(&this->actor, this->unk_2E0);
if ((this->initParams == 2) || (this->initParams == 5)) {
if ((this->type == 2) || (this->type == 5)) {
this->actor.focus.pos.y = 70.0f;
Actor_SetFocus(&this->actor, 70.0f);
func_80038290(globalCtx, &this->actor, &this->unk_260, &this->unk_26C, this->actor.focus.pos);
@ -797,7 +794,7 @@ void EnHeishi2_Update(Actor* thisx, GlobalContext* globalCtx) {
}
this->actionFunc(this, globalCtx);
Actor_MoveForward(&this->actor);
switch (this->initParams) {
switch (this->type) {
case 6:
break;
case 9:
@ -814,7 +811,7 @@ s32 EnHeishi2_OverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dL
void* thisx) {
EnHeishi2* this = THIS;
switch (this->initParams) {
switch (this->type) {
case 1:
break;
case 7:
@ -840,12 +837,12 @@ void EnHeishi2_PostLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dList
}
}
void func_80A54C6C(Actor* thisx, GlobalContext* globalCtx) {
void EnHeishi2_DrawKingGuard(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1772);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1774),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, &D_06002C10);
gSPDisplayList(POLY_OPA_DISP++, &gHeishiKingGuardDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_heishi2.c", 1777);
}
@ -861,7 +858,7 @@ void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) {
SkelAnime_DrawOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, EnHeishi2_OverrideLimbDraw,
EnHeishi2_PostLimbDraw, this);
if ((this->initParams == 5) && (gSaveContext.infTable[7] & 0x80)) {
if ((this->type == 5) && (gSaveContext.infTable[7] & 0x80)) {
linkObjBankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_LINK_CHILD);
if (linkObjBankIndex >= 0) {
Matrix_Put(&this->mtxf_330);
@ -871,7 +868,7 @@ void EnHeishi2_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[linkObjBankIndex].segment);
gSPSegment(POLY_OPA_DISP++, 0x0D, mtx);
gSPDisplayList(POLY_OPA_DISP++, &D_0602B060);
gSPDisplayList(POLY_OPA_DISP++, gLinkChildKeatonMaskDL);
gSPSegment(POLY_OPA_DISP++, 0x06, globalCtx->objectCtx.status[this->actor.objBankIndex].segment);
}
}

View file

@ -32,7 +32,7 @@ typedef struct EnHeishi2 {
/* 0x02F0 */ u16 unk_2F0;
/* 0x02F2 */ s16 unk_2F2[0x5]; // starts counting down when guard starts to open gate.
/* 0x02FC */ s16 unk_2FC;
/* 0x02FE */ s16 initParams; // copy of actor params at init
/* 0x02FE */ s16 type; // copy of actor params at init
/* 0x0300 */ s16 unk_300; // mask related
/* 0x0302 */ char unk_302[0x6];
/* 0x0308 */ u8 audioFlag;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_heishi3.h"
#include "objects/object_sd/object_sd.h"
#include "vt.h"
#define FLAGS 0x00000000
@ -24,10 +25,6 @@ void EnHeishi3_ResetAnimationToIdle(EnHeishi3* this, GlobalContext* globalCtx);
void func_80A55D00(EnHeishi3* this, GlobalContext* globalCtx);
void func_80A55BD4(EnHeishi3* this, GlobalContext* globalCtx);
extern SkeletonHeader D_0600BAC8;
extern AnimationHeader D_06005C30; // EnHeishi3_IdleAnimation
extern AnimationHeader D_06005880; // EnHeishi3_WalkAnimation
static s16 sPlayerCaught = 0;
const ActorInit En_Heishi3_InitVars = {
@ -76,7 +73,8 @@ void EnHeishi3_Init(Actor* thisx, GlobalContext* globalCtx) {
}
Actor_SetScale(&this->actor, 0.01f);
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_06005C30, this->jointTable, this->morphTable, 17);
SkelAnime_Init(globalCtx, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable, this->morphTable,
17);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->actor.targetMode = 6;
Collider_InitCylinder(globalCtx, &this->collider);
@ -96,9 +94,9 @@ void EnHeishi3_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnHeishi3_SetupGuardType(EnHeishi3* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
if (this->unk_278 == 0) {
this->actionFunc = EnHeishi3_StandSentinelInGrounds;
} else {
@ -172,9 +170,9 @@ void EnHeishi3_StandSentinelInCastle(EnHeishi3* this, GlobalContext* globalCtx)
}
void EnHeishi3_CatchStart(EnHeishi3* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005880);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiWalkAnim);
Animation_Change(&this->skelAnime, &D_06005880, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiWalkAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->caughtTimer = 20;
this->actionFunc = func_80A55BD4;
this->actor.speedXZ = 2.5f;
@ -195,9 +193,9 @@ void func_80A55BD4(EnHeishi3* this, GlobalContext* globalCtx) {
}
void EnHeishi3_ResetAnimationToIdle(EnHeishi3* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06005C30);
f32 frameCount = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frameCount, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A55D00;
}

View file

@ -1,4 +1,5 @@
#include "z_en_heishi4.h"
#include "objects/object_sd/object_sd.h"
#include "vt.h"
#define FLAGS 0x00000009
@ -56,12 +57,6 @@ static ColliderCylinderInit sCylinderInit = {
{ 33, 40, 0, { 0, 0, 0 } },
};
extern SkeletonHeader D_0600BAC8;
extern AnimationHeader D_0600C444;
extern AnimationHeader D_06005C30;
extern AnimationHeader D_0600C6C8;
extern AnimationHeader D_0600C374;
void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx) {
EnHeishi4* this = THIS;
@ -73,11 +68,13 @@ void EnHeishi4_Init(Actor* thisx, GlobalContext* globalCtx) {
if (this->type == HEISHI4_AT_MARKET_DYING) {
this->height = 30.0f;
ActorShape_Init(&thisx->shape, 0.0f, NULL, 30.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_0600C444, this->jointTable, this->morphTable, 17);
SkelAnime_Init(globalCtx, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiDyingGuardAnim_00C444, this->jointTable,
this->morphTable, 17);
} else {
this->height = 60.0f;
ActorShape_Init(&thisx->shape, 0.0f, ActorShadow_DrawCircle, 30.0f);
SkelAnime_Init(globalCtx, &this->skelAnime, &D_0600BAC8, &D_06005C30, this->jointTable, this->morphTable, 17);
SkelAnime_Init(globalCtx, &this->skelAnime, &gEnHeishiSkel, &gEnHeishiIdleAnim, this->jointTable,
this->morphTable, 17);
}
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, thisx, &sCylinderInit);
@ -113,9 +110,9 @@ void EnHeishi4_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void func_80A56328(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_06005C30);
f32 frames = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A563BC;
}
@ -168,9 +165,9 @@ void func_80A563BC(EnHeishi4* this, GlobalContext* globalCtx) {
}
void func_80A56544(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_06005C30);
f32 frames = Animation_GetLastFrame(&gEnHeishiIdleAnim);
Animation_Change(&this->skelAnime, &D_06005C30, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiIdleAnim, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
if (LINK_AGE_IN_YEARS != YEARS_CHILD) {
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ ぎゃぁ!オトナだー ☆☆☆☆☆ \n" VT_RST);
Actor_Kill(&this->actor);
@ -224,8 +221,9 @@ void func_80A5673C(EnHeishi4* this, GlobalContext* globalCtx) {
this->unk_284 = 0;
if (gSaveContext.eventChkInf[8] & 1) {
if (!(gSaveContext.infTable[6] & 0x1000)) {
f32 frames = Animation_GetLastFrame(&D_0600C444);
Animation_Change(&this->skelAnime, &D_0600C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
f32 frames = Animation_GetLastFrame(&gEnHeishiDyingGuardAnim_00C444);
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardAnim_00C444, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP,
-10.0f);
this->actor.textId = 0x7007;
this->unk_282 = 5;
this->unk_284 = 1;
@ -258,9 +256,9 @@ void func_80A56874(EnHeishi4* this, GlobalContext* globalCtx) {
}
void func_80A56900(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_0600C6C8);
f32 frames = Animation_GetLastFrame(&gEnHeishiDyingGuardTalkAnim);
Animation_Change(&this->skelAnime, &D_0600C6C8, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardTalkAnim, 1.0f, 0.0f, (s16)frames, ANIMMODE_LOOP, -10.0f);
this->actionFunc = func_80A56994;
}
@ -278,9 +276,9 @@ void func_80A56994(EnHeishi4* this, GlobalContext* globalCtx) {
}
void func_80A56A50(EnHeishi4* this, GlobalContext* globalCtx) {
f32 frames = Animation_GetLastFrame(&D_0600C374);
f32 frames = Animation_GetLastFrame(&gEnHeishiDyingGuardDieAnim);
this->unk_288 = frames;
Animation_Change(&this->skelAnime, &D_0600C374, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -10.0f);
Animation_Change(&this->skelAnime, &gEnHeishiDyingGuardDieAnim, 1.0f, 0.0f, frames, ANIMMODE_ONCE, -10.0f);
this->actionFunc = func_80A56ACC;
}

View file

@ -6,6 +6,7 @@
#include "z_en_ishi.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "vt.h"
@ -29,13 +30,6 @@ void EnIshi_SpawnFragmentsLarge(EnIshi* this, GlobalContext* globalCtx);
void EnIshi_SpawnDustSmall(EnIshi* this, GlobalContext* globalCtx);
void EnIshi_SpawnDustLarge(EnIshi* this, GlobalContext* globalCtx);
extern Gfx D_0500A3B8[]; // Large gray rock
extern Gfx D_0500A5E8[]; // Large gray rock fragments
extern Gfx D_0500A880[]; // Small gray rock
typedef void (*EnIshiEffectSpawnFunc)(struct EnIshi*, GlobalContext*);
typedef void (*EnIshiDrawFunc)(struct EnIshi*, GlobalContext*);
static s16 sRotSpeedX = 0;
static s16 sRotSpeedY = 0;
@ -171,7 +165,7 @@ void EnIshi_SpawnFragmentsSmall(EnIshi* this, GlobalContext* globalCtx) {
phi_v0 = 33;
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &pos, -420, phi_v0, 30, 5, 0, scales[i], 3, 10, 40,
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A880);
KAKERA_COLOR_NONE, OBJECT_GAMEPLAY_FIELD_KEEP, gFieldKakeraDL);
}
}
@ -217,7 +211,7 @@ void EnIshi_SpawnFragmentsLarge(EnIshi* this, GlobalContext* globalCtx) {
phi_v1 = -320;
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &this->actor.world.pos, phi_v1, phi_v0, 30, 5, 0, scales[i], 5,
2, 70, KAKERA_COLOR_WHITE, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A5E8);
2, 70, KAKERA_COLOR_WHITE, OBJECT_GAMEPLAY_FIELD_KEEP, gSilverRockFragmentsDL);
}
}
@ -483,7 +477,7 @@ void EnIshi_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnIshi_DrawSmall(EnIshi* this, GlobalContext* globalCtx) {
Gfx_DrawDListOpa(globalCtx, D_0500A880);
Gfx_DrawDListOpa(globalCtx, gFieldKakeraDL);
}
void EnIshi_DrawLarge(EnIshi* this, GlobalContext* globalCtx) {
@ -493,7 +487,7 @@ void EnIshi_DrawLarge(EnIshi* this, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ishi.c", 1055),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
gSPDisplayList(POLY_OPA_DISP++, D_0500A3B8);
gSPDisplayList(POLY_OPA_DISP++, gSilverRockDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ishi.c", 1062);
}

View file

@ -12,6 +12,8 @@ typedef enum {
struct EnIshi;
typedef void (*EnIshiActionFunc)(struct EnIshi*, GlobalContext*);
typedef void (*EnIshiEffectSpawnFunc)(struct EnIshi*, GlobalContext*);
typedef void (*EnIshiDrawFunc)(struct EnIshi*, GlobalContext*);
typedef struct EnIshi {
/* 0x0000 */ Actor actor;

View file

@ -7,6 +7,7 @@
#include "z_en_kusa.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#include "vt.h"
#define FLAGS 0x00800010
@ -490,7 +491,7 @@ void EnKusa_Update(Actor* thisx, GlobalContext* globalCtx) {
}
void EnKusa_Draw(Actor* thisx, GlobalContext* globalCtx) {
static Gfx* dLists[] = { 0x0500B9D0, 0x06000140, 0x06000140 };
static Gfx* dLists[] = { gFieldBushDL, 0x06000140, 0x06000140 };
EnKusa* this = THIS;
if (this->actor.flags & 0x800) {

View file

@ -6,6 +6,7 @@
#include "z_en_light.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "objects/gameplay_dangeon_keep/gameplay_dangeon_keep.h"
#define FLAGS 0x00000000
@ -46,8 +47,6 @@ static FlameParams D_80A9E840[] = {
{ { 170, 255, 255, 255 }, { 0, 0, 255 }, 75 }, { { 170, 255, 255, 255 }, { 0, 150, 255 }, 75 },
};
extern Gfx D_05000440[];
void EnLight_Init(Actor* thisx, GlobalContext* globalCtx) {
EnLight* this = THIS;
s16 yOffset;
@ -180,7 +179,7 @@ void EnLight_Draw(Actor* thisx, GlobalContext* globalCtx) {
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 16, 32, 1, ((this->timer * 2) & 63),
(this->timer * -6) & 127 * 1, 16, 32));
dList = D_05000440;
dList = gUnusedCandleDL;
gDPSetPrimColor(POLY_XLU_DISP++, 0xC0, 0xC0, 255, 200, 0, 0);
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_en_mb.h"
#include "objects/object_mb/object_mb.h"
#define FLAGS 0x00000015
@ -27,26 +28,6 @@ const ActorInit En_Mb_InitVars = {
(ActorFunc)EnMb_Draw,
};
extern FlexSkeletonHeader D_06008F38;
extern FlexSkeletonHeader D_06014190;
extern AnimationHeader D_060028E0;
extern AnimationHeader D_0600EBE4;
extern AnimationHeader D_060041A8;
extern AnimationHeader D_06009FC0;
extern AnimationHeader D_06002C10;
extern AnimationHeader D_06002F10;
extern AnimationHeader D_06009280;
extern AnimationHeader D_06001950;
extern AnimationHeader D_0600BE58;
extern AnimationHeader D_0600D5D4;
extern AnimationHeader D_0600E18C;
extern AnimationHeader D_0600B4BC;
extern AnimationHeader D_0600ABE0;
extern AnimationHeader D_0600095C;
extern AnimationHeader D_060016B4;
extern AnimationHeader D_060041A8;
extern AnimationHeader D_0600C44C;
void func_80AA68FC(EnMb* this, GlobalContext* globalCtx);
void func_80AA6898(EnMb* this);
void func_80AA7134(EnMb* this, GlobalContext* globalCtx);
@ -248,7 +229,7 @@ void EnMb_Init(Actor* thisx, GlobalContext* globalCtx) {
switch (this->actor.params) {
case -1:
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06008F38, &D_060028E0, this->jointTable,
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gEnMbSkel_008F38, &gEnMbStandStillAnim, this->jointTable,
this->morphTable, 28);
this->actor.colChkInfo.health = 2;
this->actor.colChkInfo.mass = MASS_HEAVY;
@ -257,7 +238,7 @@ void EnMb_Init(Actor* thisx, GlobalContext* globalCtx) {
func_80AA6830(this);
break;
case 0:
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06014190, &D_0600EBE4, this->jointTable,
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gEnMbSkel_014190, &gEnMbAnim_00EBE4, this->jointTable,
this->morphTable, 28);
this->actor.colChkInfo.health = 6;
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
@ -283,7 +264,7 @@ void EnMb_Init(Actor* thisx, GlobalContext* globalCtx) {
func_80AA6898(this);
break;
default:
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06008F38, &D_060028E0, this->jointTable,
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gEnMbSkel_008F38, &gEnMbStandStillAnim, this->jointTable,
this->morphTable, 28);
Actor_SetScale(&this->actor, 0.014f);
this->path = (thisx->params & 0xFF00) >> 8;
@ -406,7 +387,7 @@ void func_80AA66A0(EnMb* this, GlobalContext* globalCtx) {
}
void func_80AA6830(EnMb* this) {
Animation_MorphToLoop(&this->skelAnime, &D_060041A8, -4.0f);
Animation_MorphToLoop(&this->skelAnime, &gEnMbLookLeftAndRightAnim, -4.0f);
this->actor.speedXZ = 0.0f;
this->unk_32A = Rand_S16Offset(30, 50);
this->unk_320 = 6;
@ -414,7 +395,7 @@ void func_80AA6830(EnMb* this) {
}
void func_80AA6898(EnMb* this) {
Animation_PlayLoop(&this->skelAnime, &D_0600EBE4);
Animation_PlayLoop(&this->skelAnime, &gEnMbAnim_00EBE4);
this->actor.speedXZ = 0.0f;
this->unk_32A = Rand_S16Offset(30, 50);
this->unk_320 = 6;
@ -422,7 +403,7 @@ void func_80AA6898(EnMb* this) {
}
void func_80AA68FC(EnMb* this, GlobalContext* globalCtx) {
Animation_MorphToLoop(&this->skelAnime, &D_060041A8, -4.0f);
Animation_MorphToLoop(&this->skelAnime, &gEnMbLookLeftAndRightAnim, -4.0f);
this->actor.speedXZ = 0.0f;
this->unk_32A = Rand_S16Offset(40, 80);
this->unk_320 = 6;
@ -431,8 +412,8 @@ void func_80AA68FC(EnMb* this, GlobalContext* globalCtx) {
}
void func_80AA6974(EnMb* this) {
Animation_Change(&this->skelAnime, &D_06009FC0, 0.0f, 0.0f, Animation_GetLastFrame(&D_06009FC0), ANIMMODE_LOOP,
-4.0f);
Animation_Change(&this->skelAnime, &gEnMbWalkAnim, 0.0f, 0.0f, Animation_GetLastFrame(&gEnMbWalkAnim),
ANIMMODE_LOOP, -4.0f);
this->actor.speedXZ = 0.59999996f;
this->unk_32A = Rand_S16Offset(50, 70);
this->unk_332 = 1;
@ -443,20 +424,20 @@ void func_80AA6974(EnMb* this) {
void func_80AA6A18(EnMb* this) {
f32 frameCount;
frameCount = Animation_GetLastFrame(&D_06009FC0);
frameCount = Animation_GetLastFrame(&gEnMbWalkAnim);
this->actor.speedXZ = 0.59999996f;
this->unk_32A = Rand_S16Offset(50, 70);
this->unk_332 = 1;
this->unk_320 = 9;
Animation_Change(&this->skelAnime, &D_06009FC0, 0.0f, 0.0f, frameCount, ANIMMODE_LOOP_INTERP, -4.0f);
Animation_Change(&this->skelAnime, &gEnMbWalkAnim, 0.0f, 0.0f, frameCount, ANIMMODE_LOOP_INTERP, -4.0f);
EnMb_SetupAction(this, func_80AA8AEC);
}
void func_80AA6AC8(EnMb* this) {
f32 frameCount;
frameCount = Animation_GetLastFrame(&D_06002C10);
Animation_MorphToPlayOnce(&this->skelAnime, &D_06002C10, -4.0f);
frameCount = Animation_GetLastFrame(&gEnMbReadyAttackAnim);
Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbReadyAttackAnim, -4.0f);
this->unk_320 = 10;
this->actor.speedXZ = 0.0f;
this->unk_32E = (s16)frameCount + 6;
@ -469,7 +450,7 @@ void func_80AA6AC8(EnMb* this) {
}
void func_80AA6B80(EnMb* this) {
Animation_PlayLoop(&this->skelAnime, &D_06002F10);
Animation_PlayLoop(&this->skelAnime, &gEnMbChargePlayerAnim);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
this->attackParams = 1;
this->unk_320 = 10;
@ -483,9 +464,9 @@ void func_80AA6BF0(EnMb* this) {
s16 yawDiff;
s32 yawDiffABS;
frames = Animation_GetLastFrame(&D_0600B4BC);
frames = Animation_GetLastFrame(&gEnMbAnim_00B4BC);
this->unk_320 = 10;
Animation_Change(&this->skelAnime, &D_0600B4BC, 3.0f, 0.0f, frames, ANIMMODE_ONCE_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gEnMbAnim_00B4BC, 3.0f, 0.0f, frames, ANIMMODE_ONCE_INTERP, 0.0f);
this->unk_32E = 1;
yawDiff = (this->actor.world.rot.y - this->actor.yawTowardsPlayer);
@ -507,7 +488,7 @@ void func_80AA6BF0(EnMb* this) {
}
void func_80AA6CC0(EnMb* this) {
Animation_PlayOnce(&this->skelAnime, &D_06009280);
Animation_PlayOnce(&this->skelAnime, &gEnMbResumePatrolAnim);
this->unk_320 = 11;
this->unk_32A = 0;
this->unk_32E = 5;
@ -516,7 +497,7 @@ void func_80AA6CC0(EnMb* this) {
}
void func_80AA6D20(EnMb* this) {
Animation_PlayOnce(&this->skelAnime, &D_06009280);
Animation_PlayOnce(&this->skelAnime, &gEnMbResumePatrolAnim);
this->unk_320 = 0xB;
this->actor.bgCheckFlags &= ~1;
this->unk_32A = 0;
@ -530,14 +511,14 @@ void func_80AA6D20(EnMb* this) {
void func_80AA6DA4(EnMb* this) {
f32 frameCount;
frameCount = Animation_GetLastFrame(&D_0600EBE4);
frameCount = Animation_GetLastFrame(&gEnMbAnim_00EBE4);
this->unk_320 = 11;
Animation_Change(&this->skelAnime, &D_0600EBE4, 5.0f, 0.0f, frameCount, ANIMMODE_ONCE_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gEnMbAnim_00EBE4, 5.0f, 0.0f, frameCount, ANIMMODE_ONCE_INTERP, 0.0f);
EnMb_SetupAction(this, func_80AA7478);
}
void func_80AA6E1C(EnMb* this) {
Animation_PlayOnce(&this->skelAnime, &D_0600C44C);
Animation_PlayOnce(&this->skelAnime, &gEnMbAnim_00C44C);
this->unk_320 = 3;
this->unk_32A = 0;
this->unk_32E = 20;
@ -548,16 +529,16 @@ void func_80AA6E1C(EnMb* this) {
void func_80AA6E7C(EnMb* this) {
f32 frames;
frames = Animation_GetLastFrame(&D_0600D5D4);
frames = Animation_GetLastFrame(&gEnMbAnim_00D5D4);
this->unk_320 = 2;
this->unk_32A = 0;
this->unk_32E = 6;
Animation_Change(&this->skelAnime, &D_0600D5D4, 1.0f, 4.0f, frames, ANIMMODE_ONCE_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gEnMbAnim_00D5D4, 1.0f, 4.0f, frames, ANIMMODE_ONCE_INTERP, 0.0f);
EnMb_SetupAction(this, func_80AA840C);
}
void func_80AA6F04(EnMb* this) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600BE58, -4.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbAnim_00BE58, -4.0f);
this->unk_320 = 1;
this->actor.flags &= ~1;
this->collider1.dim.height = 80;
@ -576,7 +557,7 @@ void func_80AA6F8C(EnMb* this) {
this->unk_328 = 40;
} else {
if (this->actor.params != 0) {
Animation_PlayOnceSetSpeed(&this->skelAnime, &D_06001950, 0.0f);
Animation_PlayOnceSetSpeed(&this->skelAnime, &gEnMbAnim_001950, 0.0f);
}
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_JR_FREEZE);
}
@ -668,8 +649,8 @@ void func_80AA7310(EnMb* this, GlobalContext* globalCtx) {
if (this->unk_32A == 0) {
this->unk_32E--;
if (this->unk_32E == 0) {
Animation_Change(&this->skelAnime, &D_06002C10, -1.0f, Animation_GetLastFrame(&D_06002C10), 0.0f,
ANIMMODE_ONCE, 0.0f);
Animation_Change(&this->skelAnime, &gEnMbReadyAttackAnim, -1.0f,
Animation_GetLastFrame(&gEnMbReadyAttackAnim), 0.0f, ANIMMODE_ONCE, 0.0f);
this->unk_32A = 1;
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
@ -717,8 +698,9 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
(ABS(yawDiff) <= 0x4000) && (this->actor.xzDistToPlayer <= 200.0f)) {
func_80AA6AC8(this);
} else {
endFrame = Animation_GetLastFrame(&D_06002C10);
Animation_Change(&this->skelAnime, &D_06002C10, -1.0f, endFrame, 0.0f, ANIMMODE_ONCE, 0.0f);
endFrame = Animation_GetLastFrame(&gEnMbReadyAttackAnim);
Animation_Change(&this->skelAnime, &gEnMbReadyAttackAnim, -1.0f, endFrame, 0.0f, ANIMMODE_ONCE,
0.0f);
this->actor.speedXZ = 0.0f;
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_SPEAR_NORM);
}
@ -731,8 +713,9 @@ void func_80AA74BC(EnMb* this, GlobalContext* globalCtx) {
}
if (SkelAnime_Update(&this->skelAnime) != 0) {
if (this->unk_32A == 0) {
endFrame = Animation_GetLastFrame(&D_06002F10);
Animation_Change(&this->skelAnime, &D_06002F10, 0.5f, 0.0f, endFrame, ANIMMODE_LOOP_INTERP, 0.0f);
endFrame = Animation_GetLastFrame(&gEnMbChargePlayerAnim);
Animation_Change(&this->skelAnime, &gEnMbChargePlayerAnim, 0.5f, 0.0f, endFrame, ANIMMODE_LOOP_INTERP,
0.0f);
this->unk_32A = 1;
} else {
yawDiff = Math_Vec3f_Yaw(&this->actor.world.pos, &this->waypointPos) - this->actor.yawTowardsPlayer;
@ -760,7 +743,7 @@ void func_80AA77D0(EnMb* this, GlobalContext* globalCtx) {
currentFrame = this->skelAnime.curFrame;
if (SkelAnime_Update(&this->skelAnime)) {
Animation_PlayLoop(&this->skelAnime, &D_06002F10);
Animation_PlayLoop(&this->skelAnime, &gEnMbChargePlayerAnim);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
}
@ -818,8 +801,8 @@ void func_80AA7938(EnMb* this, GlobalContext* globalCtx) {
if (this->unk_32E != 0) {
this->unk_32E--;
if (this->unk_32E == 0) {
f32 pad1 = Animation_GetLastFrame(&D_0600ABE0);
Animation_Change(&this->skelAnime, &D_0600ABE0, 1.5f, 0.0f, pad1, ANIMMODE_ONCE_INTERP, 0.0f);
f32 pad1 = Animation_GetLastFrame(&gEnMbAnim_00ABE0);
Animation_Change(&this->skelAnime, &gEnMbAnim_00ABE0, 1.5f, 0.0f, pad1, ANIMMODE_ONCE_INTERP, 0.0f);
}
} else {
sp74 = this->effSpawnPos;
@ -853,7 +836,7 @@ void func_80AA7CAC(EnMb* this, GlobalContext* globalCtx) {
sp48 = !func_800339B8(&this->actor, globalCtx, 110.0f, this->actor.world.rot.y);
currentFrame = (s32)this->skelAnime.curFrame;
if (SkelAnime_Update(&this->skelAnime) != 0) {
Animation_PlayLoop(&this->skelAnime, &D_06002F10);
Animation_PlayLoop(&this->skelAnime, &gEnMbChargePlayerAnim);
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MORIBLIN_ATTACK);
}
if (this->unk_32E != 0) {
@ -998,7 +981,7 @@ void func_80AA800C(EnMb* this, GlobalContext* globalCtx) {
void func_80AA8378(EnMb* this, GlobalContext* globalCtx) {
if (SkelAnime_Update(&this->skelAnime)) {
if (this->unk_32E != 0) {
Animation_PlayOnce(&this->skelAnime, &D_0600E18C);
Animation_PlayOnce(&this->skelAnime, &gEnMbAnim_00E18C);
this->unk_32E = 0;
func_800AA000(this->actor.xzDistToPlayer, 0xFF, 0x14, 0x96);
Camera_AddQuake(&globalCtx->mainCamera, 2, 25, 5);
@ -1016,13 +999,13 @@ void func_80AA840C(EnMb* this, GlobalContext* globalCtx) {
this->unk_32E--;
if (this->unk_32E == 0) {
if (this->unk_32A == 0) {
Animation_Change(&this->skelAnime, &D_0600E18C, 3.0f, 0.0f, Animation_GetLastFrame(&D_0600E18C),
ANIMMODE_ONCE_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gEnMbAnim_00E18C, 3.0f, 0.0f,
Animation_GetLastFrame(&gEnMbAnim_00E18C), ANIMMODE_ONCE_INTERP, 0.0f);
this->unk_32A = 1;
this->unk_32E = 6;
} else {
Animation_Change(&this->skelAnime, &D_0600E18C, 3.0f, 0.0f, Animation_GetLastFrame(&D_0600E18C),
ANIMMODE_ONCE_INTERP, 0.0f);
Animation_Change(&this->skelAnime, &gEnMbAnim_00E18C, 3.0f, 0.0f,
Animation_GetLastFrame(&gEnMbAnim_00E18C), ANIMMODE_ONCE_INTERP, 0.0f);
}
}
} else {
@ -1205,10 +1188,10 @@ void func_80AA8E88(EnMb* this) {
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
yawDiffABS = ABS(yawDiff);
if (yawDiffABS <= 0x4000) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_06001950, -4.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbAnim_001950, -4.0f);
this->actor.speedXZ = -8.0f;
} else {
Animation_MorphToPlayOnce(&this->skelAnime, &D_0600095C, -4.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbAnim_00095C, -4.0f);
this->actor.speedXZ = 8.0f;
}
this->unk_32A = 30;
@ -1236,10 +1219,10 @@ void func_80AA8FC8(EnMb* this) {
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
yawDiffAbs = ABS(yawDiff);
if (yawDiffAbs <= 0x4000) {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060016B4, -4.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbFallBackAnim, -4.0f);
this->actor.speedXZ = -8.0f;
} else {
Animation_MorphToPlayOnce(&this->skelAnime, &D_060016B4, -4.0f);
Animation_MorphToPlayOnce(&this->skelAnime, &gEnMbFallBackAnim, -4.0f);
this->actor.speedXZ = 8.0f;
}
this->actor.world.rot.y = this->actor.shape.rot.y;

View file

@ -16,7 +16,7 @@ typedef struct EnMb {
/* 0x01D0 */ Vec3s jointTable[28];
/* 0x0278 */ Vec3s morphTable[28];
/* 0x0320 */ s32 unk_320;
/* 0x0324 */ EnMbActionFunc actionFunc;
/* 0x0324 */ EnMbActionFunc actionFunc;
/* 0x0328 */ s16 unk_328;
/* 0x032A */ s16 unk_32A;
/* 0x032C */ s16 soundTimer;
@ -24,7 +24,7 @@ typedef struct EnMb {
/* 0x0330 */ s16 unk_330;
/* 0x0332 */ s16 unk_332;
/* 0x0334 */ s16 attackParams;
/* 0x0338 */ Vec3f effSpawnPos;
/* 0x0338 */ Vec3f effSpawnPos;
/* 0x0344 */ Vec3f waypointPos;
/* 0x0350 */ char unk_34A[0xC];
/* 0x035C */ s8 waypoint;

View file

@ -5,6 +5,7 @@
*/
#include "z_en_niw_girl.h"
#include "objects/object_gr/object_gr.h"
#include "vt.h"
#define FLAGS 0x00000019
@ -52,14 +53,6 @@ static ColliderCylinderInit sCylinderInit = {
{ 10, 30, 0, { 0, 0, 0 } },
};
static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f };
static Gfx* D_80AB99D8[] = { 0x06004178, 0x06004978, 0x06005178 };
extern FlexSkeletonHeader D_06009948;
extern AnimationHeader D_06000378;
extern AnimationHeader D_06009C78;
void EnNiwGirl_Init(Actor* thisx, GlobalContext* globalCtx) {
EnNiwGirl* this = THIS;
s32 pad;
@ -67,7 +60,8 @@ void EnNiwGirl_Init(Actor* thisx, GlobalContext* globalCtx) {
Vec3f vec2;
s32 pad2;
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &D_06009948, &D_06000378, this->jointTable, this->morphTable, 17);
SkelAnime_InitFlex(globalCtx, &this->skelAnime, &gNiwGirlSkel, &gNiwGirlRunAnim, this->jointTable, this->morphTable,
17);
Collider_InitCylinder(globalCtx, &this->collider);
Collider_SetCylinder(globalCtx, &this->collider, &this->actor, &sCylinderInit);
this->actor.targetMode = 6;
@ -103,8 +97,8 @@ void EnNiwGirl_Destroy(Actor* thisx, GlobalContext* globalCtx) {
}
void EnNiwGirl_Jump(EnNiwGirl* this, GlobalContext* globalCtx) {
f32 frameCount = Animation_GetLastFrame(&D_06000378);
Animation_Change(&this->skelAnime, &D_06000378, 1.0f, 0.0f, frameCount, ANIMMODE_LOOP, -10.0f);
f32 frameCount = Animation_GetLastFrame(&gNiwGirlRunAnim);
Animation_Change(&this->skelAnime, &gNiwGirlRunAnim, 1.0f, 0.0f, frameCount, 0, -10.0f);
this->actor.flags &= ~1;
this->actionFunc = func_80AB9210;
}
@ -144,7 +138,7 @@ void func_80AB9210(EnNiwGirl* this, GlobalContext* globalCtx) {
}
void EnNiwGirl_Talk(EnNiwGirl* this, GlobalContext* globalCtx) {
Animation_Change(&this->skelAnime, &D_06009C78, 1.0f, 0.0f, Animation_GetLastFrame(&D_06009C78), ANIMMODE_LOOP,
Animation_Change(&this->skelAnime, &gNiwGirlJumpAnim, 1.0f, 0.0f, Animation_GetLastFrame(&gNiwGirlJumpAnim), 0,
-10.0f);
this->actor.flags |= 1;
this->actor.textId = 0x7000;
@ -201,11 +195,11 @@ void EnNiwGirl_Update(Actor* thisx, GlobalContext* globalCtx) {
Actor_SetScale(&this->actor, 0.013f);
this->unkUpTimer++;
tempActionFunc = func_80AB94D0;
if (this->unk_274 == 0) {
this->unk_272++;
if (this->unk_272 >= 3) {
this->unk_272 = 0;
this->unk_274 = (s16)Rand_ZeroFloat(60.0f) + 20;
if (this->blinkTimer == 0) {
this->eyeIndex++;
if (this->eyeIndex >= 3) {
this->eyeIndex = 0;
this->blinkTimer = (s16)Rand_ZeroFloat(60.0f) + 20;
}
}
this->unk_280 = 30.0f;
@ -223,8 +217,8 @@ void EnNiwGirl_Update(Actor* thisx, GlobalContext* globalCtx) {
Math_SmoothStepToS(&this->unk_260.y, 0, 5, 3000, 0);
Math_SmoothStepToS(&this->unk_260.z, 0, 5, 3000, 0);
}
if (this->unk_274 != 0) {
this->unk_274--;
if (this->blinkTimer != 0) {
this->blinkTimer--;
}
if (this->jumpTimer != 0) {
this->jumpTimer--;
@ -250,7 +244,10 @@ s32 EnNiwGirlOverrideLimbDraw(GlobalContext* globalCtx, s32 limbIndex, Gfx** dLi
return false;
}
static Vec3f sConstVec3f = { 0.2f, 0.2f, 0.2f };
void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) {
static u64* eyeTextures[] = { gNiwGirlEyeOpenTex, gNiwGirlEyeHalfTex, gNiwGirlEyeClosedTex };
EnNiwGirl* this = THIS;
s32 pad;
Vec3f sp4C = sConstVec3f;
@ -258,7 +255,7 @@ void EnNiwGirl_Draw(Actor* thisx, GlobalContext* globalCtx) {
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_en_niw_girl.c", 573);
func_80093D18(globalCtx->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(D_80AB99D8[this->unk_272]));
gSPSegment(POLY_OPA_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(eyeTextures[this->eyeIndex]));
SkelAnime_DrawFlexOpa(globalCtx, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount,
EnNiwGirlOverrideLimbDraw, NULL, this);
func_80033C30(&this->actor.world.pos, &sp4C, 255, globalCtx);

View file

@ -20,8 +20,8 @@ typedef struct EnNiwGirl {
/* 0x026C */ s16 jumpTimer; // Controls how many frames she jumps for and how long until she jumps again
/* 0x026E */ s16 unkUpTimer;
/* 0x0270 */ s16 unk_270;
/* 0x0272 */ s16 unk_272;
/* 0x0274 */ s16 unk_274;
/* 0x0272 */ s16 eyeIndex;
/* 0x0274 */ s16 blinkTimer;
/* 0x0276 */ s16 path;
/* 0x0278 */ s16 unk_278;
/* 0x027A */ s16 unk_27A;

View file

@ -534,18 +534,18 @@ void EnNy_Draw(Actor* thisx, GlobalContext* globalCtx) {
gDPPipeSync(POLY_XLU_DISP++);
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_PASS, G_RM_AA_ZB_XLU_SURF2);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_1D8);
gSPDisplayList(POLY_XLU_DISP++, gEnNyMetalBodyDlist);
gSPDisplayList(POLY_XLU_DISP++, gEnNyMetalBodyDL);
gDPPipeSync(POLY_XLU_DISP++);
gDPSetRenderMode(POLY_XLU_DISP++, G_RM_FOG_SHADE_A, G_RM_AA_ZB_XLU_SURF2);
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 0, this->unk_1D4);
gSPDisplayList(POLY_XLU_DISP++, gEnNyRockBodyDlist);
gSPDisplayList(POLY_XLU_DISP++, gEnNyRockBodyDL);
if (this->unk_1E0 > 0.25f) {
Matrix_Scale(this->unk_1E0, this->unk_1E0, this->unk_1E0, MTXMODE_APPLY);
func_8002EBCC(&this->actor, globalCtx, 1);
func_80093D18(globalCtx->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ny.c", 868),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gEnNySpikeDlist);
gSPDisplayList(POLY_OPA_DISP++, gEnNySpikeDL);
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ny.c", 872);
if (this->unk_1CA != 0) {
@ -583,7 +583,7 @@ void EnNy_DrawDeathEffect(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Scale(scale, scale, scale, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_en_ny.c", 912),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, gEnNyRockBodyDlist);
gSPDisplayList(POLY_OPA_DISP++, gEnNyRockBodyDL);
}
}
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_en_ny.c", 919);

View file

@ -6,6 +6,7 @@
#include "z_obj_comb.h"
#include "overlays/effects/ovl_Effect_Ss_Kakera/z_eff_ss_kakera.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00000000
@ -67,14 +68,11 @@ static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneDownward, 900, ICHAIN_STOP),
};
extern Gfx D_050095B0[];
extern Gfx D_05009940[];
void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) {
Vec3f pos1;
Vec3f pos;
Vec3f velocity;
Gfx* dlist = D_05009940;
Gfx* dlist = gFieldBeehiveFragmentDL;
s16 scale;
s16 angle = 0;
s16 gravity;
@ -85,7 +83,7 @@ void ObjComb_Break(ObjComb* this, GlobalContext* globalCtx) {
s32 i;
for (i = 0; i < 31; i++) {
angle += 20000;
angle += 0x4E20;
rand1 = Rand_ZeroOne() * 10.0f;
pos1.x = Math_SinS(angle) * rand1;
@ -200,7 +198,7 @@ void ObjComb_Wait(ObjComb* this, GlobalContext* globalCtx) {
void ObjComb_Update(Actor* thisx, GlobalContext* globalCtx) {
ObjComb* this = THIS;
this->unk_1B2 += 12000;
this->unk_1B2 += 0x2EE0;
this->actionFunc(this, globalCtx);
this->actor.shape.rot.x = Math_SinS(this->unk_1B2) * this->unk_1B0 + this->actor.home.rot.x;
}
@ -223,7 +221,7 @@ void ObjComb_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_comb.c", 394),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, D_050095B0);
gSPDisplayList(POLY_OPA_DISP++, gFieldBeehiveDL);
Collider_UpdateSpheres(0, &this->collider);

View file

@ -5,6 +5,7 @@
*/
#include "z_obj_hamishi.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00000000
@ -15,9 +16,6 @@ void ObjHamishi_Destroy(Actor* thisx, GlobalContext* globalCtx);
void ObjHamishi_Update(Actor* thisx, GlobalContext* globalCtx);
void ObjHamishi_Draw(Actor* thisx, GlobalContext* globalCtx);
extern Gfx D_0500A3B8[];
extern Gfx D_0500A5E8[];
const ActorInit Obj_Hamishi_InitVars = {
ACTOR_OBJ_HAMISHI,
ACTORCAT_PROP,
@ -131,7 +129,7 @@ void ObjHamishi_Break(ObjHamishi* this, GlobalContext* globalCtx) {
}
EffectSsKakera_Spawn(globalCtx, &pos, &velocity, &this->actor.world.pos, gravity, phi_v0, 30, 5, 0,
sEffectScales[i], 3, 0, 70, 1, OBJECT_GAMEPLAY_FIELD_KEEP, D_0500A5E8);
sEffectScales[i], 3, 0, 70, 1, OBJECT_GAMEPLAY_FIELD_KEEP, gSilverRockFragmentsDL);
}
func_80033480(globalCtx, &this->actor.world.pos, 140.0f, 6, 180, 90, 1);
@ -205,7 +203,7 @@ void ObjHamishi_Draw(Actor* thisx, GlobalContext* globalCtx) {
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_obj_hamishi.c", 404),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 170, 130, 255);
gSPDisplayList(POLY_OPA_DISP++, D_0500A3B8);
gSPDisplayList(POLY_OPA_DISP++, gSilverRockDL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_obj_hamishi.c", 411);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_obj_hana.h"
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
#define FLAGS 0x00000000
@ -58,9 +59,9 @@ typedef struct {
} HanaParams; // size = 0x10
static HanaParams sHanaParams[] = {
{ 0x05000500, 0.01f, 0.0f, -1, 0 },
{ 0x0500A880, 0.1f, 58.0f, 10, 18 },
{ 0x0500B9D0, 0.4f, 0.0f, 12, 44 },
{ gHanaDL, 0.01f, 0.0f, -1, 0 },
{ gFieldKakeraDL, 0.1f, 58.0f, 10, 18 },
{ gFieldBushDL, 0.4f, 0.0f, 12, 44 },
};
static InitChainEntry sInitChain[] = {

File diff suppressed because it is too large Load diff

View file

@ -230,7 +230,7 @@ TODO. I'm hoping somebody else will do this.
- Example:
```xml
<CurveAnimation Name="gEnBoxCurveAnim_4B60" SkelOffset="0x5EB8" Offset="0x4B60"/>
<CurveAnimation Name="gTreasureChestCurveAnim_4B60" SkelOffset="0x5EB8" Offset="0x4B60"/>
```
- Attributes:
@ -245,7 +245,7 @@ TODO. I'm hoping somebody else will do this.
- Example:
```xml
<Skeleton Name="gEnBoxCurveSkel" Type="Curve" LimbType="Curve" Offset="0x5EB8"/>
<Skeleton Name="gTreasureChestCurveSkel" Type="Curve" LimbType="Curve" Offset="0x5EB8"/>
```
- Attributes:

View file

@ -81,9 +81,6 @@ D_02003AC0 = 0x02003AC0;
D_0201DA50 = 0x0201DA50;
D_0300AA48 = 0x0300AA48;
D_03012B20 = 0x03012B20;
D_05001390 = 0x05001390;
D_05001390 = 0x05001390;
D_0500CA70 = 0x0500CA70;
D_06001220 = 0x06001220;
D_06001220 = 0x06001220;
D_06001290 = 0x06001290;
@ -93,7 +90,6 @@ D_06001438 = 0x06001438;
D_06001470 = 0x06001470;
D_06001470 = 0x06001470;
D_06001C40 = 0x06001C40;
D_06006CC0 = 0x06006CC0;
D_06016118 = 0x06016118;
D_06025218 = 0x06025218;
D_060252D8 = 0x060252D8;
@ -121,10 +117,6 @@ D_06004348 = 0x06004348;
D_06004C30 = 0x06004C30;
D_06004E98 = 0x06004E98;
// z_en_tubo_trap
D_05017870 = 0x05017870;
D_05017A60 = 0x05017A60;
// z_door_toki
D_06007888 = 0x06007888;
@ -135,9 +127,6 @@ D_060007D0 = 0x060007D0;
D_06001A38 = 0x06001A38;
D_06001C58 = 0x06001C58;
// z_bg_spot11_bakudankabe
D_0500A880 = 0x0500A880;
// z_bg_spot12_gate
D_06001080 = 0x06001080;
D_060011EC = 0x060011EC;
@ -175,9 +164,6 @@ D_06001220 = 0x06001220;
D_06001290 = 0x06001290;
D_06001470 = 0x06001470;
// z_door_ana
D_05001390 = 0x05001390;
// z_bg_bdan_switch
D_06005CF8 = 0x06005CF8;
D_060061A0 = 0x060061A0;
@ -187,35 +173,18 @@ D_06005A20 = 0x06005A20;
D_06000360 = 0x06000360;
D_06000180 = 0x06000180;
// z_bg_jya_1flift
D_060004A8 = 0x060004A8;
D_060001F0 = 0x060001F0;
// z_bg_hidan_dalm
D_0600BBF0 = 0x0600BBF0;
D_0600BDF0 = 0x0600BDF0;
D_0600DA10 = 0x0600DA10;
// z_bg_jya_bombiwa
D_0600E490 = 0x0600E490;
D_0600EDC0 = 0x0600EDC0;
D_0600E710 = 0x0600E710;
// z_bg_hidan_fslift
D_0600B630 = 0x0600B630;
D_0600E1E8 = 0x0600E1E8;
// z_bg_jya_amishutter
D_0600C0A0 = 0x0600C0A0;
D_0600C4C8 = 0x0600C4C8;
// z_bg_jya_block
D_05004350 = 0x05004350;
D_05004CD0 = 0x05004CD0;
D_05004E98 = 0x05004E98;
// z_bg_jya_kanaami
D_0600F000 = 0x0600F000;
D_0600F208 = 0x0600F208;
// z_bg_jya_lift
D_0600D7E8 = 0x0600D7E8;
D_0600CCE0 = 0x0600CCE0;
// z_bg_jya_zurerukabe
D_06012340 = 0x06012340;
D_06012508 = 0x06012508;
// z_bg_hidan_syoku
D_0600A7E0 = 0x0600A7E0;
D_0600E568 = 0x0600E568;
// z_bg_menkuri_kaiten
D_060038D0 = 0x060038D0;
@ -231,10 +200,6 @@ D_060074EC = 0x060074EC;
// z_bg_mizu_water
D_06004B20 = 0x06004B20;
// z_bg_mori_elevator
D_060035F8 = 0x060035F8;
D_06002AD0 = 0x06002AD0;
// z_bg_spot07_taki
D_060038FC = 0x060038FC;
D_06002590 = 0x06002590;
@ -242,7 +207,6 @@ D_06002590 = 0x06002590;
// z_bg_spot08_bakudankabe
D_060039D4 = 0x060039D4;
D_06003898 = 0x06003898;
D_0500A880 = 0x0500A880;
// z_bg_ydan_hasi
D_06005780 = 0x06005780;
@ -346,8 +310,6 @@ D_060138E0 = 0x060138E0;
D_06013F10 = 0x06013F10;
D_060143A8 = 0x060143A8;
// z_bg_spot17_bakudankabe
D_0500A880 = 0x0500A880;
// z_bg_spot00_break
D_06000908 = 0x06000908;
@ -379,12 +341,6 @@ D_060014E0 = 0x060014E0;
D_060053D0 = 0x060053D0;
D_06007564 = 0x06007564;
// z_bg_jya_cobra
D_0601167C = 0x0601167C;
D_06010790 = 0x06010790;
D_06010C20 = 0x06010C20;
D_060117D0 = 0x060117D0;
// z_en_lightbox
D_06001F10 = 0x06001F10;
D_06000B70 = 0x06000B70;
@ -452,10 +408,6 @@ D_06009CD0 = 0x6009CD0;
// z_bg_spot01_fusya
D_06000100 = 0x06000100;
// z_en_niw_girl
D_06009948 = 0x06009948;
D_06000378 = 0x06000378;
D_06009C78 = 0x06009C78;
// z_title
D_01002720 = 0x01002720;
@ -605,11 +557,6 @@ D_06005048 = 0x06005048;
D_06005580 = 0x06005580;
D_06008CE0 = 0x06008CE0;
// z_bg_bombwall
D_050041B0 = 0x050041B0;
D_05003FC0 = 0x05003FC0;
D_05004088 = 0x05004088;
// z_bg_bom_guard
D_06001C40 = 0x06001C40;
@ -652,28 +599,6 @@ D_06005810 = 0x06005810;
D_06000180 = 0x06000180;
D_06000360 = 0x06000360;
// z_obj_switch
D_05005800 = 0x05005800;
D_05005AD0 = 0x05005AD0;
D_05005D50 = 0x05005D50;
D_05005FB8 = 0x05005FB8;
D_05006170 = 0x05006170;
D_05006610 = 0x05006610;
D_05006810 = 0x05006810;
D_05006D10 = 0x05006D10;
D_05006E60 = 0x05006E60;
D_05007340 = 0x05007340;
D_05007488 = 0x05007488;
D_050090A0 = 0x050090A0;
D_050098A0 = 0x050098A0;
D_0500A0A0 = 0x0500A0A0;
D_0500A8A0 = 0x0500A8A0;
D_0500B0A0 = 0x0500B0A0;
D_0500B8A0 = 0x0500B8A0;
D_0500C0A0 = 0x0500C0A0;
D_050144B0 = 0x050144B0;
D_05014CB0 = 0x05014CB0;
// z_obj_lightswitch
D_06000260 = 0x06000260;
D_06000398 = 0x06000398;
@ -794,10 +719,6 @@ D_060086D0 = 0x060086D0;
D_06000918 = 0x06000918;
D_060012C0 = 0x060012C0;
// z_obj_comb
D_050095B0 = 0x050095B0;
D_05009940 = 0x05009940;
// z_en_ani
D_060000F0 = 0x060000F0;
D_060067B8 = 0x060067B8;
@ -811,9 +732,6 @@ D_06001A30 = 0x06001A30;
D_060018A0 = 0x060018A0;
// z_en_heishi2
D_06005C30 = 0x06005C30;
D_06005500 = 0x06005500;
D_0600BAC8 = 0x0600BAC8;
D_0602B060 = 0x0602B060;
D_06002C10 = 0x06002C10;
@ -823,17 +741,9 @@ D_060048A8 = 0x060048A8;
// z_en_heishi3
D_0600BAC8 = 0x0600BAC8;
D_06005C30 = 0x06005C30;
D_06005880 = 0x06005880;
// z_en_heishi4
D_0600BAC8 = 0x0600BAC8;
D_0600C444 = 0x0600C444;
D_06005C30 = 0x06005C30;
D_0600C6C8 = 0x0600C6C8;
D_0600C374 = 0x0600C374;
// z_en_floormas
D_06002158 = 0x06002158;
D_060039B0 = 0x060039B0;
// z_en_fu
D_0600057C = 0x0600057C;
@ -896,41 +806,15 @@ D_06003128 = 0x06003128;
D_060042AC = 0x060042AC;
D_060059B0 = 0x060059B0;
// z_obj_oshijiki
D_05004E98 = 0x05004E98;
D_05003350 = 0x05003350;
D_05003B50 = 0x05003B50;
D_05004350 = 0x05004350;
D_05004CD0 = 0x05004CD0;
// z_en_goroiwa
D_060006B0 = 0x060006B0;
// z_en_heishi1
D_06005880 = 0x06005880;
D_06005C30 = 0x06005C30;
D_0600BAC8 = 0x0600BAC8;
// z_en_bombf
D_06000340 = 0x06000340;
D_06000408 = 0x06000408;
D_06000530 = 0x06000530;
// z_en_box
D_06000128 = 0x06000128;
D_0600024C = 0x0600024C;
D_0600043C = 0x0600043C;
D_060006F0 = 0x060006F0;
D_06000AE8 = 0x06000AE8;
D_060010C0 = 0x060010C0;
D_06001678 = 0x06001678;
D_060047D8 = 0x060047D8;
D_06005FC8 = 0x06005FC8;
// z_en_butte
D_05002470 = 0x05002470;
D_050036F0 = 0x050036F0;
// z_Bg_Spot16_Bombstone
D_06000C20 = 0x06000C20;
D_060009E0 = 0x060009E0;
@ -1118,27 +1002,26 @@ D_0601E178 = 0x0601E178;
D_060203D8 = 0x060203D8;
D_060205C0 = 0x060205C0;
// z_en_ishi
D_0500A3B8 = 0x0500A3B8;
D_0500A5E8 = 0x0500A5E8;
D_0500A880 = 0x0500A880;
// z_obj_dekujr
D_060030D0 = 0x060030D0;
D_060032D8 = 0x060032D8;
// z_en_light
D_05000440 = 0x05000440;
// z_en_okarina_Tag
D_02003C80 = 0x02003C80;
D_02005020 = 0x02005020;
D_020024A0 = 0x020024A0;
// z_bg_jya_megami
D_06005C4C = 0x06005C4C;
D_06005780 = 0x06005780;
D_0600B9F8 = 0x0600B9F8;
// z_en_okuta
D_06000344 = 0x06000344;
D_060008FC = 0x060008FC;
D_06000AC0 = 0x06000AC0;
D_06000DDC = 0x06000DDC;
D_06003380 = 0x06003380;
D_06003660 = 0x06003660;
D_06003910 = 0x06003910;
D_06003C64 = 0x06003C64;
// z_bg_mori_hineri
D_060054B8 = 0x060054B8;
@ -1203,14 +1086,6 @@ D_0600BEC0 = 0x0600BEC0;
// z_en_torch2
D_06004764 = 0x06004764;
// z_bg_mori_rakkatenjo
D_06007690 = 0x06007690;
D_060087AC = 0x060087AC;
// z_bg_mori_kaitenkabe
D_060056B0 = 0x060056B0;
D_060063B8 = 0x060063B8;
// z_en_ssh
D_06000304 = 0x06000304;
D_060052E0 = 0x060052E0;
@ -1228,26 +1103,9 @@ D_060055A8 = 0x060055A8;
D_0601BFB0 = 0x0601BFB0;
D_0601C160 = 0x0601C160;
// z_en_mb
D_06008F38 = 0x06008F38;
D_060028E0 = 0x060028E0;
D_06014190 = 0x06014190;
D_0600EBE4 = 0x0600EBE4;
D_060041A8 = 0x060041A8;
D_06009FC0 = 0x06009FC0;
D_06002C10 = 0x06002C10;
D_06002F10 = 0x06002F10;
D_06009280 = 0x06009280;
D_06001950 = 0x06001950;
D_0600BE58 = 0x0600BE58;
D_0600D5D4 = 0x0600D5D4;
D_0600E18C = 0x0600E18C;
D_0600B4BC = 0x0600B4BC;
D_0600ABE0 = 0x0600ABE0;
D_060016B4 = 0x060016B4;
D_060041A8 = 0x060041A8;
D_0600C44C = 0x0600C44C;
D_0600095C = 0x0600095C;
// z_en_crow
D_060010C0 = 0x060010C0;
D_060000F0 = 0x060000F0;
// z_en_rl
D_06007B38 = 0x06007B38;
@ -1267,12 +1125,6 @@ D_06001A3C = 0x06001A3C;
D_0600375C = 0x0600375C;
D_06007FC0 = 0x06007FC0;
// z_bg_jya_bombchuiwa
D_0600E8D0 = 0x0600E8D0;
D_060119B0 = 0x060119B0;
D_0600DC40 = 0x0600DC40;
D_0600DB60 = 0x0600DB60;
// z_en_takara_man
D_06004FE0 = 0x06004FE0;
D_06000498 = 0x06000498;
@ -1344,42 +1196,6 @@ D_06006830 = 0x06006830;
D_06006D60 = 0x06006D60;
D_06007230 = 0x06007230;
// z_bg_mori_idomizu
D_060049D0 = 0x060049D0;
// z_bg_mori_hashigo
D_060037D8 = 0x060037D8;
D_060036B0 = 0x060036B0;
D_06004770 = 0x06004770;
// z_bg_mori_bigst
D_0600221C = 0x0600221C;
D_06001E50 = 0x06001E50;
// z_bg_mori_hashira4
D_06001AF8 = 0x06001AF8;
D_060089E0 = 0x060089E0;
//z_boss_dodongo
D_0601B310 = 0x0601B310;
D_0600F0D8 = 0x0600F0D8;
D_030021D8 = 0x030021D8;
D_06008EEC = 0x06008EEC;
D_06017410 = 0x06017410;
D_0601CAE0 = 0x0601CAE0;
D_06008EEC = 0x06008EEC;
D_060061D4 = 0x060061D4;
D_0600DF38 = 0x0600DF38;
D_0600E848 = 0x0600E848;
D_06004E0C = 0x06004E0C;
D_060042A8 = 0x060042A8;
D_06009D10 = 0x06009D10;
D_0601D934 = 0x0601D934;
D_06002D0C = 0x06002D0C;
D_060042A8 = 0x060042A8;
D_06009D50 = 0x06009D50;
D_06009DD0 = 0x06009DD0;
D_06001074 = 0x06001074;
// z_obj_timeblock
D_06000980 = 0x06000980;
D_06000B30 = 0x06000B30;
@ -1490,18 +1306,6 @@ D_06001C1C = 0x06001C1C;
D_06002640 = 0x06002640;
D_06002920 = 0x06002920;
// z_bg_jya_bigmirror
D_0600BC70 = 0x0600BC70;
D_0600BD80 = 0x0600BD80;
D_0600E1B0 = 0x0600E1B0;
D_0600E2D0 = 0x0600E2D0;
// z_bg_jya_cobra
D_06010790 = 0x06010790;
D_06010C20 = 0x06010C20;
D_0601167C = 0x0601167C;
D_060117D0 = 0x060117D0;
// z_bg_jya_haheniron
D_06000880 = 0x06000880;
@ -1830,9 +1634,6 @@ D_06004F00 = 0x06004F00;
D_06005A30 = 0x06005A30;
D_06005CB0 = 0x06005CB0;
// z_demo_tre_lgt
D_06005EB8 = 0x06005EB8;
// z_door_killer
D_06001BC8 = 0x06001BC8;
@ -1969,12 +1770,10 @@ D_06000DE0 = 0x06000DE0;
D_06000DE0 = 0x06000DE0;
// z_en_fr
D_05002470 = 0x05002470;
D_050036F0 = 0x050036F0;
D_060007BC = 0x060007BC;
D_060011C0 = 0x060011C0;
D_06001534 = 0x06001534;
D_0600B498 = 0x0600B498;
D_060007BC = 0x060007BC;
// z_en_fz
D_060030A0 = 0x060030A0;
@ -2053,7 +1852,6 @@ D_06010590 = 0x06010590;
// z_en_goma
D_05000530 = 0x05000530;
D_0600017C = 0x0600017C;
D_06000334 = 0x06000334;
D_06000544 = 0x06000544;
@ -2069,8 +1867,10 @@ D_06003D78 = 0x06003D78;
D_060017C0 = 0x060017C0;
D_06001960 = 0x06001960;
// z_en_honotrap
D_05006810 = 0x05006810;
// z_en_horse
D_02000230 = 0x02000230;
D_02002AC0 = 0x02002AC0;
D_06006530 = 0x06006530;
// z_en_hs
D_06000304 = 0x06000304;
@ -2361,6 +2161,18 @@ D_0601B874 = 0x0601B874;
D_0601BCF0 = 0x0601BCF0;
D_0601CE08 = 0x0601CE08;
// z_en_zo
D_06000598 = 0x06000598;
D_06000D48 = 0x06000D48;
D_060022F0 = 0x060022F0;
D_06002350 = 0x06002350;
D_060024A0 = 0x060024A0;
D_06002510 = 0x06002510;
D_06002F10 = 0x06002F10;
D_0600BFA8 = 0x0600BFA8;
D_0600BFC0 = 0x0600BFC0;
D_0600C028 = 0x0600C028;
// z_fishing
D_0600007C = 0x0600007C;
D_060029C0 = 0x060029C0;
@ -2420,10 +2232,6 @@ D_060003F0 = 0x060003F0;
D_060005DC = 0x060005DC;
D_06000650 = 0x06000650;
// z_obj_hamishi
D_0500A3B8 = 0x0500A3B8;
D_0500A5E8 = 0x0500A5E8;
// z_obj_kibako2
D_06000960 = 0x06000960;
D_06000B70 = 0x06000B70;