Anju objects (#1444)

* bring over the objects from the other branch

* kafeis mask

* use symbols

* dman naming after assets

* stateFlags

* remaining stuff

* anim array bug

* Name everything in DmGm after DmAn

* WEEKEVENTREG_COUPLES_MASK_CUTSCENE_FINISHED

* undef

* format

* idk

* ing

* format

* name animations from an4, thanks emil!

* emptydl

* disbelief

* review

* format

* Update assets/xml/objects/object_mask_kerfay.xml

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>

* review

---------

Co-authored-by: Derek Hensley <hensley.derek58@gmail.com>
This commit is contained in:
Anghelo Carvajal 2023-10-23 02:03:16 -03:00 committed by GitHub
parent a468be77d5
commit 1e19cfe869
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 576 additions and 460 deletions

View File

@ -1,88 +1,107 @@
<Root>
<!-- Assets for Anju -->
<File Name="object_an1" Segment="6">
<Animation Name="object_an1_Anim_001090" Offset="0x1090" /> <!-- Original name is "an_ajimi" ("tasting; sampling") -->
<Animation Name="object_an1_Anim_00144C" Offset="0x144C" /> <!-- Original name is "an_ajimiend" -->
<Animation Name="object_an1_Anim_001E74" Offset="0x1E74" /> <!-- Original name is "an_aogu" ("to look up") -->
<Animation Name="object_an1_Anim_0026B4" Offset="0x26B4" /> <!-- Original name is "an_bikkuri" ("to be surprised") -->
<Animation Name="object_an1_Anim_00341C" Offset="0x341C" /> <!-- Original name is "an_obonwait" ("obon" = "tray") -->
<Animation Name="object_an1_Anim_003EA8" Offset="0x3EA8" /> <!-- Original name is "an_obonwalk" -->
<Animation Name="object_an1_Anim_00544C" Offset="0x544C" /> <!-- Original name is "an_ojigit" ("bow; bowing") -->
<Animation Name="object_an1_Anim_0065C8" Offset="0x65C8" /> <!-- Original name is "an_ryouri" ("cooking") -->
<Animation Name="object_an1_Anim_0071E8" Offset="0x71E8" /> <!-- Original name is "an_suwaru" ("to sit") -->
<Animation Name="object_an1_Anim_007E08" Offset="0x7E08" /> <!-- Original name is "an_suzetsubou" ("su" = short for "suwaru", "zetsubou" = "despair; hopelessness") -->
<Animation Name="object_an1_Anim_008B6C" Offset="0x8B6C" /> <!-- Original name is "an_wait" -->
<DList Name="object_an1_DL_00BC20" Offset="0xBC20" />
<DList Name="object_an1_DL_00BD20" Offset="0xBD20" />
<DList Name="object_an1_DL_00BE60" Offset="0xBE60" />
<DList Name="object_an1_DL_00BF88" Offset="0xBF88" />
<DList Name="object_an1_DL_00C080" Offset="0xC080" />
<DList Name="object_an1_DL_00C2E8" Offset="0xC2E8" />
<DList Name="object_an1_DL_00C3C0" Offset="0xC3C0" />
<DList Name="object_an1_DL_00C480" Offset="0xC480" />
<DList Name="object_an1_DL_00C6E8" Offset="0xC6E8" />
<DList Name="object_an1_DL_00C7C0" Offset="0xC7C0" />
<DList Name="object_an1_DL_00C880" Offset="0xC880" />
<DList Name="object_an1_DL_00C940" Offset="0xC940" />
<DList Name="object_an1_DL_00D030" Offset="0xD030" />
<DList Name="object_an1_DL_00D208" Offset="0xD208" />
<DList Name="object_an1_DL_00D320" Offset="0xD320" />
<DList Name="object_an1_DL_00D440" Offset="0xD440" />
<DList Name="object_an1_DL_00D618" Offset="0xD618" />
<DList Name="object_an1_DL_00D730" Offset="0xD730" />
<DList Name="object_an1_DL_00D850" Offset="0xD850" />
<Texture Name="object_an1_TLUT_00DB20" OutName="tlut_00DB20" Format="rgba16" Width="16" Height="16" Offset="0xDB20" />
<Texture Name="object_an1_Tex_00DD20" OutName="tex_00DD20" Format="rgba16" Width="16" Height="16" Offset="0xDD20" />
<Texture Name="object_an1_Tex_00DF20" OutName="tex_00DF20" Format="rgba16" Width="16" Height="16" Offset="0xDF20" />
<Texture Name="object_an1_Tex_00E120" OutName="tex_00E120" Format="ci8" Width="8" Height="8" Offset="0xE120" />
<Texture Name="object_an1_Tex_00E160" OutName="tex_00E160" Format="ci8" Width="8" Height="16" Offset="0xE160" />
<Texture Name="object_an1_Tex_00E1E0" OutName="tex_00E1E0" Format="ci8" Width="32" Height="32" Offset="0xE1E0" />
<Texture Name="object_an1_Tex_00E5E0" OutName="tex_00E5E0" Format="ci8" Width="16" Height="16" Offset="0xE5E0" />
<Texture Name="object_an1_Tex_00E6E0" OutName="tex_00E6E0" Format="ci8" Width="32" Height="16" Offset="0xE6E0" />
<Texture Name="object_an1_Tex_00E8E0" OutName="tex_00E8E0" Format="ci8" Width="8" Height="8" Offset="0xE8E0" />
<Texture Name="object_an1_Tex_00E920" OutName="tex_00E920" Format="ci8" Width="16" Height="16" Offset="0xE920" />
<Texture Name="object_an1_Tex_00EA20" OutName="tex_00EA20" Format="ci8" Width="32" Height="32" Offset="0xEA20" />
<Texture Name="object_an1_Tex_00EE20" OutName="tex_00EE20" Format="ci8" Width="16" Height="16" Offset="0xEE20" />
<Texture Name="object_an1_Tex_00EF20" OutName="tex_00EF20" Format="ci8" Width="8" Height="16" Offset="0xEF20" />
<Texture Name="object_an1_Tex_00EFA0" OutName="tex_00EFA0" Format="ci8" Width="32" Height="32" Offset="0xEFA0" />
<Texture Name="object_an1_Tex_00F3A0" OutName="tex_00F3A0" Format="ci8" Width="32" Height="32" Offset="0xF3A0" />
<Texture Name="object_an1_Tex_00F7A0" OutName="tex_00F7A0" Format="ci8" Width="32" Height="16" Offset="0xF7A0" />
<Texture Name="object_an1_Tex_00F9A0" OutName="tex_00F9A0" Format="ci8" Width="32" Height="32" Offset="0xF9A0" />
<Texture Name="object_an1_Tex_00FDA0" OutName="tex_00FDA0" Format="ci8" Width="32" Height="32" Offset="0xFDA0" />
<Texture Name="object_an1_Tex_0101A0" OutName="tex_0101A0" Format="ci8" Width="32" Height="16" Offset="0x101A0" />
<Texture Name="object_an1_Tex_0103A0" OutName="tex_0103A0" Format="ci8" Width="32" Height="32" Offset="0x103A0" />
<!-- <Blob Name="object_an1_Blob_0107A0" Size="0xA40" Offset="0x107A0" /> -->
<DList Name="object_an1_DL_0111E0" Offset="0x111E0" />
<DList Name="object_an1_DL_0111E8" Offset="0x111E8" /> <!-- Original name is "an_obon_model" -->
<Texture Name="object_an1_Tex_011928" OutName="tex_011928" Format="i8" Width="32" Height="32" Offset="0x11928" />
<Texture Name="object_an1_Tex_011D28" OutName="tex_011D28" Format="rgba16" Width="16" Height="16" Offset="0x11D28" />
<Texture Name="object_an1_Tex_011F28" OutName="tex_011F28" Format="rgba16" Width="16" Height="16" Offset="0x11F28" />
<Texture Name="object_an1_Tex_012128" OutName="tex_012128" Format="i8" Width="16" Height="16" Offset="0x12128" />
<Texture Name="object_an1_Tex_012228" OutName="tex_012228" Format="i4" Width="16" Height="16" Offset="0x12228" />
<Texture Name="object_an1_Tex_0122A8" OutName="tex_0122A8" Format="i8" Width="16" Height="16" Offset="0x122A8" />
<Animation Name="gAnju1TasteAnim" Offset="0x1090" /> <!-- Original name is "an_ajimi" ("tasting; sampling") -->
<Animation Name="gAnju1TasteEndAnim" Offset="0x144C" /> <!-- Original name is "an_ajimiend" -->
<Animation Name="gAnju1LookUpRelievedAnim" Offset="0x1E74" /> <!-- Original name is "an_aogu" ("to look up") -->
<Animation Name="gAnju1SurprisedAnim" Offset="0x26B4" /> <!-- Original name is "an_bikkuri" ("to be surprised") -->
<Animation Name="gAnju1WaitWithTrayAnim" Offset="0x341C" /> <!-- Original name is "an_obonwait" ("obon" = "tray") -->
<Animation Name="gAnju1WalkWithTrayAnim" Offset="0x3EA8" /> <!-- Original name is "an_obonwalk" -->
<Animation Name="gAnju1BowAnim" Offset="0x544C" /> <!-- Original name is "an_ojigit" ("bow; bowing") -->
<Animation Name="gAnju1CookAnim" Offset="0x65C8" /> <!-- Original name is "an_ryouri" ("cooking") -->
<Animation Name="gAnju1SitAnim" Offset="0x71E8" /> <!-- Original name is "an_suwaru" ("to sit") -->
<Animation Name="gAnju1SittingInDisbeliefAnim" Offset="0x7E08" /> <!-- Original name is "an_suzetsubou" ("su" = short for "suwaru", "zetsubou" = "despair; hopelessness") -->
<Animation Name="gAnju1IdleAnim" Offset="0x8B6C" /> <!-- Original name is "an_wait" -->
<!-- Skeleton's Display lists -->
<DList Name="gAnju1Skirt4DL" Offset="0xBC20" />
<DList Name="gAnju1Skirt3DL" Offset="0xBD20" />
<DList Name="gAnju1Skirt2DL" Offset="0xBE60" />
<DList Name="gAnju1Skirt1DL" Offset="0xBF88" />
<DList Name="gAnju1LeftFootDL" Offset="0xC080" />
<DList Name="gAnju1LeftShinDL" Offset="0xC2E8" />
<DList Name="gAnju1LeftThighDL" Offset="0xC3C0" />
<DList Name="gAnju1RightFootDL" Offset="0xC480" />
<DList Name="gAnju1RightShinDL" Offset="0xC6E8" />
<DList Name="gAnju1RightThighDL" Offset="0xC7C0" />
<DList Name="gAnju1PelvisDL" Offset="0xC880" />
<DList Name="gAnju1HeadDL" Offset="0xC940" />
<DList Name="gAnju1RightHandDL" Offset="0xD030" />
<DList Name="gAnju1RightForearmDL" Offset="0xD208" />
<DList Name="gAnju1RightUpperArmDL" Offset="0xD320" />
<DList Name="gAnju1LeftHandDL" Offset="0xD440" />
<DList Name="gAnju1LeftForearmDL" Offset="0xD618" />
<DList Name="gAnju1LeftUpperArmDL" Offset="0xD730" />
<DList Name="gAnju1TorsoDL" Offset="0xD850" />
<!-- Skeleton's TLUTs -->
<Texture Name="gAnju1TLUT" OutName="tlut" Format="rgba16" Width="16" Height="16" Offset="0xDB20" />
<Texture Name="gAnju1EyesTLUT" OutName="eyes_tlut" Format="rgba16" Width="16" Height="16" Offset="0xDD20" />
<Texture Name="gAnju1MouthTLUT" OutName="mouth_tlut" Format="rgba16" Width="16" Height="16" Offset="0xDF20" />
<!-- Skeleton's textures -->
<Texture Name="gAnju1SkinTex" OutName="anju_skin" Format="ci8" Width="8" Height="8" Offset="0xE120" />
<Texture Name="gAnju1HairTex" OutName="anju_hair" Format="ci8" Width="8" Height="16" Offset="0xE160" />
<Texture Name="gAnju1EyeOpenTex" OutName="anju_eye_open" Format="ci8" Width="32" Height="32" Offset="0xE1E0" TlutOffset="0xDD20" />
<Texture Name="gAnju1EarTex" OutName="anju_ear" Format="ci8" Width="16" Height="16" Offset="0xE5E0" />
<Texture Name="gAnju1MouthClosedTex" OutName="anju_mouth_closed" Format="ci8" Width="32" Height="16" Offset="0xE6E0" TlutOffset="0xDF20" />
<Texture Name="gAnju1ShirtButtonTex" OutName="anju_shirt_button" Format="ci8" Width="8" Height="8" Offset="0xE8E0" />
<Texture Name="gAnju1HandTex" OutName="anju_hand" Format="ci8" Width="16" Height="16" Offset="0xE920" />
<Texture Name="gAnju1SkirtTex" OutName="anju_skirt" Format="ci8" Width="32" Height="32" Offset="0xEA20" />
<Texture Name="gAnju1ShirtTex" OutName="anju_shirt" Format="ci8" Width="16" Height="16" Offset="0xEE20" />
<Texture Name="gAnju1SleeveTex" OutName="anju_sleeve" Format="ci8" Width="8" Height="16" Offset="0xEF20" />
<Texture Name="gAnju1EyeHalfTex" OutName="anju_eye_half" Format="ci8" Width="32" Height="32" Offset="0xEFA0" TlutOffset="0xDD20" />
<Texture Name="gAnju1EyeClosedTex" OutName="anju_eye_closed" Format="ci8" Width="32" Height="32" Offset="0xF3A0" TlutOffset="0xDD20" />
<Texture Name="gAnju1MouthHappyTex" OutName="anju_mouth_happy" Format="ci8" Width="32" Height="16" Offset="0xF7A0" TlutOffset="0xDF20" />
<Texture Name="gAnju1EyeSadTex" OutName="anju_eye_sad" Format="ci8" Width="32" Height="32" Offset="0xF9A0" TlutOffset="0xDD20" />
<Texture Name="gAnju1EyeComfortTex" OutName="anju_eye_comfort" Format="ci8" Width="32" Height="32" Offset="0xFDA0" TlutOffset="0xDD20" />
<Texture Name="gAnju1MouthOpenTex" OutName="anju_mouth_open" Format="ci8" Width="32" Height="16" Offset="0x101A0" TlutOffset="0xDF20" />
<Texture Name="gAnju1EyeRelievedClosedTex" OutName="anju_eye_relieved_closed" Format="ci8" Width="32" Height="32" Offset="0x103A0" TlutOffset="0xDD20" />
<!-- Empty -->
<DList Name="gAnju1EmptyDL" Offset="0x111E0" />
<!-- Food tray for Granny -->
<DList Name="gAnju1FoodTrayDL" Offset="0x111E8" /> <!-- Original name is "an_obon_model" -->
<Texture Name="gAnju1PlateTex" OutName="tray_plate" Format="i8" Width="32" Height="32" Offset="0x11928" />
<Texture Name="gAnju1Food1Tex" OutName="tray_food_1" Format="rgba16" Width="16" Height="16" Offset="0x11D28" />
<Texture Name="gAnju1Food2Tex" OutName="tray_food_2" Format="rgba16" Width="16" Height="16" Offset="0x11F28" />
<Texture Name="gAnju1CircleTex" OutName="tray_circle" Format="i8" Width="16" Height="16" Offset="0x12128" />
<Texture Name="gAnju1Steam1Tex" OutName="tray_steam_1" Format="i4" Width="16" Height="16" Offset="0x12228" />
<Texture Name="gAnju1Steam2Tex" OutName="tray_steam_2" Format="i8" Width="16" Height="16" Offset="0x122A8" />
<!-- <Blob Name="object_an1_Blob_0123A8" Size="0x10" Offset="0x123A8" /> -->
<DList Name="object_an1_DL_012478" Offset="0x12478" /> <!-- Original name is "an_hashi_model" ("chopsticks") -->
<Limb Name="object_an1_Standardlimb_0124D8" Type="Standard" EnumName="OBJECT_AN1_LIMB_01" Offset="0x124D8" />
<Limb Name="object_an1_Standardlimb_0124E4" Type="Standard" EnumName="OBJECT_AN1_LIMB_02" Offset="0x124E4" />
<Limb Name="object_an1_Standardlimb_0124F0" Type="Standard" EnumName="OBJECT_AN1_LIMB_03" Offset="0x124F0" />
<Limb Name="object_an1_Standardlimb_0124FC" Type="Standard" EnumName="OBJECT_AN1_LIMB_04" Offset="0x124FC" />
<Limb Name="object_an1_Standardlimb_012508" Type="Standard" EnumName="OBJECT_AN1_LIMB_05" Offset="0x12508" />
<Limb Name="object_an1_Standardlimb_012514" Type="Standard" EnumName="OBJECT_AN1_LIMB_06" Offset="0x12514" />
<Limb Name="object_an1_Standardlimb_012520" Type="Standard" EnumName="OBJECT_AN1_LIMB_07" Offset="0x12520" />
<Limb Name="object_an1_Standardlimb_01252C" Type="Standard" EnumName="OBJECT_AN1_LIMB_08" Offset="0x1252C" />
<Limb Name="object_an1_Standardlimb_012538" Type="Standard" EnumName="OBJECT_AN1_LIMB_09" Offset="0x12538" />
<Limb Name="object_an1_Standardlimb_012544" Type="Standard" EnumName="OBJECT_AN1_LIMB_0A" Offset="0x12544" />
<Limb Name="object_an1_Standardlimb_012550" Type="Standard" EnumName="OBJECT_AN1_LIMB_0B" Offset="0x12550" />
<Limb Name="object_an1_Standardlimb_01255C" Type="Standard" EnumName="OBJECT_AN1_LIMB_0C" Offset="0x1255C" />
<Limb Name="object_an1_Standardlimb_012568" Type="Standard" EnumName="OBJECT_AN1_LIMB_0D" Offset="0x12568" />
<Limb Name="object_an1_Standardlimb_012574" Type="Standard" EnumName="OBJECT_AN1_LIMB_0E" Offset="0x12574" />
<Limb Name="object_an1_Standardlimb_012580" Type="Standard" EnumName="OBJECT_AN1_LIMB_0F" Offset="0x12580" />
<Limb Name="object_an1_Standardlimb_01258C" Type="Standard" EnumName="OBJECT_AN1_LIMB_10" Offset="0x1258C" />
<Limb Name="object_an1_Standardlimb_012598" Type="Standard" EnumName="OBJECT_AN1_LIMB_11" Offset="0x12598" />
<Limb Name="object_an1_Standardlimb_0125A4" Type="Standard" EnumName="OBJECT_AN1_LIMB_12" Offset="0x125A4" />
<Limb Name="object_an1_Standardlimb_0125B0" Type="Standard" EnumName="OBJECT_AN1_LIMB_13" Offset="0x125B0" />
<Limb Name="object_an1_Standardlimb_0125BC" Type="Standard" EnumName="OBJECT_AN1_LIMB_14" Offset="0x125BC" />
<Skeleton Name="object_an1_Skel_012618" Type="Flex" LimbType="Standard" LimbNone="OBJECT_AN1_LIMB_NONE" LimbMax="OBJECT_AN1_LIMB_MAX" EnumName="ObjectAn1Limb" Offset="0x12618" />
<Animation Name="object_an1_Anim_013048" Offset="0x13048" /> <!-- Original name is "an_walk" -->
<Animation Name="object_an1_Anim_013E1C" Offset="0x13E1C" /> <!-- Original name is "anj_tetunagu_loop" ("joined hands") -->
<!-- Chopsticks used for cooking -->
<DList Name="gAnju1ChopsticksDL" Offset="0x12478" /> <!-- Original name is "an_hashi_model" ("chopsticks") -->
<!-- Skeleton's limbs -->
<Limb Name="gAnju1RootLimb" Type="Standard" EnumName="ANJU1_LIMB_ROOT" Offset="0x124D8" />
<Limb Name="gAnju1TorsoLimb" Type="Standard" EnumName="ANJU1_LIMB_TORSO" Offset="0x124E4" />
<Limb Name="gAnju1LeftUpperArmLimb" Type="Standard" EnumName="ANJU1_LIMB_LEFT_UPPER_ARM" Offset="0x124F0" />
<Limb Name="gAnju1LeftForearmLimb" Type="Standard" EnumName="ANJU1_LIMB_LEFT_FOREARM" Offset="0x124FC" />
<Limb Name="gAnju1LeftHandLimb" Type="Standard" EnumName="ANJU1_LIMB_LEFT_HAND" Offset="0x12508" />
<Limb Name="gAnju1RightUpperArmLimb" Type="Standard" EnumName="ANJU1_LIMB_RIGHT_UPPER_ARM" Offset="0x12514" />
<Limb Name="gAnju1RightForearmLimb" Type="Standard" EnumName="ANJU1_LIMB_RIGHT_FOREARM" Offset="0x12520" />
<Limb Name="gAnju1RightHandLimb" Type="Standard" EnumName="ANJU1_LIMB_RIGHT_HAND" Offset="0x1252C" />
<Limb Name="gAnju1HeadLimb" Type="Standard" EnumName="ANJU1_LIMB_HEAD" Offset="0x12538" />
<Limb Name="gAnju1PelvisLimb" Type="Standard" EnumName="ANJU1_LIMB_PELVIS" Offset="0x12544" />
<Limb Name="gAnju1RightThighLimb" Type="Standard" EnumName="ANJU1_LIMB_RIGHT_THIGH" Offset="0x12550" />
<Limb Name="gAnju1RightShinLimb" Type="Standard" EnumName="ANJU1_LIMB_RIGHT_SHIN" Offset="0x1255C" />
<Limb Name="gAnju1RightFootLimb" Type="Standard" EnumName="ANJU1_LIMB_RIGHT_FOOT" Offset="0x12568" />
<Limb Name="gAnju1LeftThighLimb" Type="Standard" EnumName="ANJU1_LIMB_LEFT_THIGH" Offset="0x12574" />
<Limb Name="gAnju1LeftShinLimb" Type="Standard" EnumName="ANJU1_LIMB_LEFT_SHIN" Offset="0x12580" />
<Limb Name="gAnju1LeftFootLimb" Type="Standard" EnumName="ANJU1_LIMB_LEFT_FOOT" Offset="0x1258C" />
<Limb Name="gAnju1Skirt1Limb" Type="Standard" EnumName="ANJU1_LIMB_SKIRT1" Offset="0x12598" />
<Limb Name="gAnju1Skirt2Limb" Type="Standard" EnumName="ANJU1_LIMB_SKIRT2" Offset="0x125A4" />
<Limb Name="gAnju1Skirt3Limb" Type="Standard" EnumName="ANJU1_LIMB_SKIRT3" Offset="0x125B0" />
<Limb Name="gAnju1Skirt4Limb" Type="Standard" EnumName="ANJU1_LIMB_SKIRT4" Offset="0x125BC" />
<!-- Skeleton -->
<Skeleton Name="gAnju1Skel" Type="Flex" LimbType="Standard" LimbNone="ANJU1_LIMB_NONE" LimbMax="ANJU1_LIMB_MAX" EnumName="Anju1Limb" Offset="0x12618" />
<Animation Name="gAnju1WalkAnim" Offset="0x13048" /> <!-- Original name is "an_walk" -->
<Animation Name="gAnju1HoldHandsAnim" Offset="0x13E1C" /> <!-- Holding hands with Kafei while kneeled --> <!-- Original name is "anj_tetunagu_loop" ("joined hands") -->
</File>
</Root>

View File

@ -1,12 +1,18 @@
<Root>
<!-- Assets for Anju on the rainy second day -->
<File Name="object_an2" Segment="6">
<DList Name="object_an2_DL_000370" Offset="0x370" />
<DList Name="object_an2_DL_000378" Offset="0x378" /> <!-- Original name is "an_kasa_model" ("umbrella; parasol") -->
<Texture Name="object_an2_Tex_000578" OutName="tex_000578" Format="i8" Width="16" Height="16" Offset="0x578" />
<Texture Name="object_an2_Tex_000678" OutName="tex_000678" Format="i8" Width="32" Height="32" Offset="0x678" />
<Animation Name="object_an2_Anim_001B80" Offset="0x1B80" /> <!-- Original name is "an_kasasuwarinaku" ("suwari" = "sitting", "naku" = "to cry; to weep; to sob") -->
<Animation Name="object_an2_Anim_0028DC" Offset="0x28DC" /> <!-- Original name is "an_kasawait" -->
<Animation Name="object_an2_Anim_0038A0" Offset="0x38A0" /> <!-- Original name is "an_kasawait2suwaru" ("suwaru" = "to sit") -->
<Animation Name="object_an2_Anim_0042CC" Offset="0x42CC" /> <!-- Original name is "an_kasawalk" -->
<!-- Empty -->
<DList Name="gAnju2EmptyDL" Offset="0x370" />
<!-- Umbrella -->
<DList Name="gAnju2UmbrellaDL" Offset="0x378" /> <!-- Original name is "an_kasa_model" ("umbrella; parasol") -->
<Texture Name="gAnju2UmbrellaCircleTex" OutName="umbrella_circle" Format="i8" Width="16" Height="16" Offset="0x578" />
<Texture Name="gAnju2UmbrellaDesignTex" OutName="umbrella_design" Format="i8" Width="32" Height="32" Offset="0x678" />
<!-- Animations holding the umbrella -->
<Animation Name="gAnju2UmbrellaCryAnim" Offset="0x1B80" /> <!-- Original name is "an_kasasuwarinaku" ("suwari" = "sitting", "naku" = "to cry; to weep; to sob") -->
<Animation Name="gAnju2UmbrellaIdleAnim" Offset="0x28DC" /> <!-- Original name is "an_kasawait" -->
<Animation Name="gAnju2UmbrellaSitAnim" Offset="0x38A0" /> <!-- Original name is "an_kasawait2suwaru" ("suwaru" = "to sit") -->
<Animation Name="gAnju2UmbrellaWalkAnim" Offset="0x42CC" /> <!-- Original name is "an_kasawalk" -->
</File>
</Root>

View File

@ -1,12 +1,18 @@
<Root>
<!-- Assets for Anju sweeping on the third day -->
<File Name="object_an3" Segment="6">
<DList Name="object_an3_DL_000300" Offset="0x300" />
<DList Name="object_an3_DL_000308" Offset="0x308" /> <!-- Original name is "an_hoki_model" ("broom") -->
<Texture Name="object_an3_Tex_0004C8" OutName="tex_0004C8" Format="i8" Width="16" Height="16" Offset="0x4C8" />
<Texture Name="object_an3_Tex_0005C8" OutName="tex_0005C8" Format="rgba16" Width="8" Height="32" Offset="0x5C8" />
<Texture Name="object_an3_Tex_0007C8" OutName="tex_0007C8" Format="rgba16" Width="8" Height="8" Offset="0x7C8" />
<Animation Name="object_an3_Anim_0012C0" Offset="0x12C0" /> <!-- Original name is "an_hokihaku" ("haku" = "to sweep; to brush; to clean") -->
<Animation Name="object_an3_Anim_00201C" Offset="0x201C" /> <!-- Original name is "an_hokiwait" -->
<Animation Name="object_an3_Anim_002A4C" Offset="0x2A4C" /> <!-- Original name is "an_hokiwalk" -->
<!-- Empty -->
<DList Name="gAnju3EmptyDL" Offset="0x300" />
<!-- Broom -->
<DList Name="gAnju3BroomDL" Offset="0x308" /> <!-- Original name is "an_hoki_model" ("broom") -->
<Texture Name="gAnju3BroomCircleTex" OutName="broom_circle" Format="i8" Width="16" Height="16" Offset="0x4C8" />
<Texture Name="gAnju3BroomSideTex" OutName="broom_side" Format="rgba16" Width="8" Height="32" Offset="0x5C8" />
<Texture Name="gAnju3BroomBaseTex" OutName="broom_base" Format="rgba16" Width="8" Height="8" Offset="0x7C8" />
<!-- Broom-related animations -->
<Animation Name="gAnju3BroomSweepAnim" Offset="0x12C0" /> <!-- Original name is "an_hokihaku" ("haku" = "to sweep; to brush; to clean") -->
<Animation Name="gAnju3BroomIdleAnim" Offset="0x201C" /> <!-- Original name is "an_hokiwait" -->
<Animation Name="gAnju3BroomWalkAnim" Offset="0x2A4C" /> <!-- Original name is "an_hokiwalk" -->
</File>
</Root>

View File

@ -1,15 +1,22 @@
<Root>
<!-- Assets for Anju in the Couple's Mask cutscene -->
<File Name="object_an4" Segment="6">
<Animation Name="object_an4_Anim_00041C" Offset="0x41C" /> <!-- Original name is "anj_awase" ("to face; to be opposite (someone)") -->
<Animation Name="object_an4_Anim_0013C8" Offset="0x13C8" /> <!-- Original name is "anj_dakiau" ("to embrace each other") -->
<Animation Name="object_an4_Anim_002550" Offset="0x2550" /> <!-- Original name is "anj_dakiau_loop" -->
<Animation Name="object_an4_Anim_00353C" Offset="0x353C" /> <!-- Original name is "anj_hanare" ("to be separated; to be apart") -->
<Animation Name="object_an4_Anim_004498" Offset="0x4498" /> <!-- Original name is "anj_hanare_loop" -->
<Animation Name="object_an4_Anim_004A78" Offset="0x4A78" /> <!-- Original name is "anj_kaoage" ("raising face") -->
<Animation Name="object_an4_Anim_00506C" Offset="0x506C" /> <!-- Original name is "anj_kaoage_loop" -->
<Animation Name="object_an4_Anim_0060B4" Offset="0x60B4" /> <!-- Original name is "anj_miseau" ("to show each other") -->
<Animation Name="object_an4_Anim_006CC0" Offset="0x6CC0" /> <!-- Original name is "anj_mitume_loop" ("to stare (at); to gaze (at)") -->
<Animation Name="object_an4_Anim_007E3C" Offset="0x7E3C" /> <!-- Original name is "anj_omen" ("mask") -->
<Animation Name="object_an4_Anim_0088C0" Offset="0x88C0" /> <!-- Original name is "anj_omen_loop" -->
<Animation Name="gAnju4CombineMasks2Anim" Offset="0x41C" /> <!-- Original name is "anj_awase" ("to face; to be opposite (someone)") -->
<Animation Name="gAnju4HugAnim" Offset="0x13C8" /> <!-- Start hugging while kneeled --> <!-- Original name is "anj_dakiau" ("to embrace each other") -->
<Animation Name="gAnju4HugLoopAnim" Offset="0x2550" /> <!-- hugging while kneeled --> <!-- Original name is "anj_dakiau_loop" -->
<Animation Name="gAnju4HugReleaseAnim" Offset="0x353C" /> <!-- Stop hugging while kneeled --> <!-- Original name is "anj_hanare" ("to be separated; to be apart") -->
<Animation Name="gAnju4HugReleaseLoopAnim" Offset="0x4498" /> <!-- Original name is "anj_hanare_loop" -->
<Animation Name="gAnju4LookUpAnim" Offset="0x4A78" /> <!-- Original name is "anj_kaoage" ("raising face") -->
<Animation Name="gAnju4LookUpLoopAnim" Offset="0x506C" /> <!-- Original name is "anj_kaoage_loop" -->
<Animation Name="gAnju4CombineMasks1Anim" Offset="0x60B4" /> <!-- Shows Moon Mask to Kafei --> <!-- Original name is "anj_miseau" ("to show each other") -->
<Animation Name="gAnju4MaskStandLoopAnim" Offset="0x6CC0" /> <!-- Holds the Moon Mask while standing --> <!-- Original name is "anj_mitume_loop" ("to stare (at); to gaze (at)") -->
<Animation Name="gAnju4MaskKneelAnim" Offset="0x7E3C" /> <!-- Holds the Moon Mask while kneeling --> <!-- Original name is "anj_omen" ("mask") -->
<Animation Name="gAnju4MaskKneelLoopAnim" Offset="0x88C0" /> <!-- Holds the Moon Mask while kneeled --> <!-- Original name is "anj_omen_loop" -->
</File>
</Root>

View File

@ -1,10 +1,12 @@
<Root>
<!-- Assets for Kafei's Mask -->
<File Name="object_mask_kerfay" Segment="10">
<DList Name="object_mask_kerfay_DL_000D40" Offset="0xD40" />
<Texture Name="object_mask_kerfay_TLUT_001140" OutName="tlut_001140" Format="rgba16" Width="16" Height="16" Offset="0x1140" />
<Texture Name="object_mask_kerfay_Tex_001340" OutName="tex_001340" Format="ci8" Width="16" Height="16" Offset="0x1340" />
<Texture Name="object_mask_kerfay_Tex_001440" OutName="tex_001440" Format="ci8" Width="8" Height="16" Offset="0x1440" />
<Texture Name="object_mask_kerfay_Tex_0014C0" OutName="tex_0014C0" Format="ci8" Width="8" Height="16" Offset="0x14C0" />
<Texture Name="object_mask_kerfay_Tex_001540" OutName="tex_001540" Format="ci8" Width="16" Height="8" Offset="0x1540" />
<DList Name="gKafeisMaskDL" Offset="0xD40" />
<Texture Name="gKafeisMaskTLUT" OutName="kafeis_mask_tlut" Format="rgba16" Width="16" Height="16" Offset="0x1140" />
<Texture Name="gKafeisMaskHoleTex" OutName="hole" Format="ci8" Width="16" Height="16" Offset="0x1340" TlutOffset="0x1140" />
<Texture Name="gKafeisMaskHairTex" OutName="hair" Format="ci8" Width="8" Height="16" Offset="0x1440" TlutOffset="0x1140" />
<Texture Name="gKafeisMaskHairPartAndUndersideTex" OutName="hair_part_and_underside" Format="ci8" Width="8" Height="16" Offset="0x14C0" TlutOffset="0x1140" />
<Texture Name="gKafeisMaskEyebrowTex" OutName="eyebrow" Format="ci8" Width="16" Height="8" Offset="0x1540" TlutOffset="0x1140" />
</File>
</Root>

View File

@ -482,7 +482,7 @@ typedef enum {
/* 0x22A */ CS_CMD_ACTOR_CUE_554,
/* 0x22B */ CS_CMD_ACTOR_CUE_555,
/* 0x22C */ CS_CMD_ACTOR_CUE_556,
/* 0x22D */ CS_CMD_ACTOR_CUE_557,
/* 0x22D */ CS_CMD_ACTOR_CUE_557, // Couple's Mask cs, Anju cues
/* 0x22E */ CS_CMD_ACTOR_CUE_558,
/* 0x22F */ CS_CMD_ACTOR_CUE_559,
/* 0x230 */ CS_CMD_ACTOR_CUE_560,

View File

@ -1017,7 +1017,7 @@ typedef enum {
#define WEEKEVENTREG_51_08 PACK_WEEKEVENTREG_FLAG(51, 0x08)
#define WEEKEVENTREG_51_10 PACK_WEEKEVENTREG_FLAG(51, 0x10)
#define WEEKEVENTREG_ESCAPED_SAKONS_HIDEOUT PACK_WEEKEVENTREG_FLAG(51, 0x20)
#define WEEKEVENTREG_51_40 PACK_WEEKEVENTREG_FLAG(51, 0x40)
#define WEEKEVENTREG_COUPLES_MASK_CUTSCENE_FINISHED PACK_WEEKEVENTREG_FLAG(51, 0x40)
#define WEEKEVENTREG_51_80 PACK_WEEKEVENTREG_FLAG(51, 0x80)
// Protected Cremia

View File

@ -2515,7 +2515,7 @@ u8 D_801C0B1C[] = {
Gfx* D_801C0B20[] = {
object_mask_truth_DL_0001A0, // PLAYER_MASK_TRUTH
object_mask_kerfay_DL_000D40, // PLAYER_MASK_KAFEIS_MASK
gKafeisMaskDL, // PLAYER_MASK_KAFEIS_MASK
object_mask_yofukasi_DL_000490, // PLAYER_MASK_ALL_NIGHT
object_mask_rabit_DL_000610, // PLAYER_MASK_BUNNY
object_mask_ki_tan_DL_0004A0, // PLAYER_MASK_KEATON

View File

@ -16,10 +16,10 @@ void DmAn_Init(Actor* thisx, PlayState* play);
void DmAn_Destroy(Actor* thisx, PlayState* play);
void DmAn_Update(Actor* thisx, PlayState* play);
void func_80C1C958(DmAn* this, PlayState* play);
void DmAn_HandleCutscene(DmAn* this, PlayState* play);
void DmAn_WaitForObject(DmAn* this, PlayState* play);
void DmAn_HandleCouplesMaskCs(DmAn* this, PlayState* play);
void DmAn_DoNothing(DmAn* this, PlayState* play);
void func_80C1D0B0(Actor* thisx, PlayState* play);
void DmAn_Draw(Actor* thisx, PlayState* play);
ActorInit Dm_An_InitVars = {
ACTOR_DM_AN,
@ -33,40 +33,51 @@ ActorInit Dm_An_InitVars = {
(ActorFunc)NULL,
};
typedef enum {
/* -1 */ DMAN_ANIM_NONE = -1,
/* 0x0 */ DMAN_ANIM_0,
/* 0x1 */ DMAN_ANIM_1,
/* 0x2 */ DMAN_ANIM_2,
/* 0x3 */ DMAN_ANIM_3,
/* 0x4 */ DMAN_ANIM_4,
/* 0x5 */ DMAN_ANIM_5,
/* 0x6 */ DMAN_ANIM_6,
/* 0x7 */ DMAN_ANIM_7,
/* 0x8 */ DMAN_ANIM_8,
/* 0x9 */ DMAN_ANIM_9,
/* 0xA */ DMAN_ANIM_10,
/* 0xB */ DMAN_ANIM_11,
/* 0xC */ DMAN_ANIM_12,
/* 0xD */ DMAN_ANIM_13,
/* 0xE */ DMAN_ANIM_MAX
/**
* Anju stores her animations across different objects and the ones used by this actor are put together right next to
* each other in the sAnimationInfo array. Due to this, animation functions check which object to load by comparing
* index ranges. To make this a bit easier to read, this enum includes `DMAN_ANIMOBJ_*` values that mark when a range of
* animations of a certain object start
*/
typedef enum DmAnAnimation {
/* -1 */ DMAN_ANIM_NONE = -1,
/* 0 */ DMAN_ANIM_SITTING_IN_DISBELIEF,
/* 1 */ DMAN_ANIM_SIT,
/* 2 */ DMAN_ANIMOBJ_AN4,
/* 2 */ DMAN_ANIM_MASK_STAND_LOOP = DMAN_ANIMOBJ_AN4,
/* 3 */ DMAN_ANIM_HOLD_HANDS, //! @bug See note at `sAnimationInfo`
/* 4 */ DMAN_ANIM_MASK_KNEEL,
/* 5 */ DMAN_ANIM_MASK_KNEEL_LOOP,
/* 6 */ DMAN_ANIM_HUG,
/* 7 */ DMAN_ANIM_HUG_LOOP,
/* 8 */ DMAN_ANIM_HUG_RELEASE,
/* 9 */ DMAN_ANIM_HUG_RELEASE_LOOP,
/* 10 */ DMAN_ANIM_COMBINE_MASKS_1,
/* 11 */ DMAN_ANIM_COMBINE_MASKS_2,
/* 12 */ DMAN_ANIM_LOOK_UP,
/* 13 */ DMAN_ANIM_LOOK_UP_LOOP,
/* 14 */ DMAN_ANIM_MAX
} DmAnAnimation;
static AnimationInfoS sAnimationInfo[DMAN_ANIM_MAX] = {
{ &object_an1_Anim_007E08, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_0
{ &object_an1_Anim_0071E8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_1
{ &object_an4_Anim_006CC0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_2
{ &object_an1_Anim_013E1C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_3
{ &object_an4_Anim_007E3C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_4
{ &object_an4_Anim_0088C0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_5
{ &object_an4_Anim_0013C8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_6
{ &object_an4_Anim_002550, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_7
{ &object_an4_Anim_00353C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_8
{ &object_an4_Anim_004498, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_9
{ &object_an4_Anim_0060B4, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_10
{ &object_an4_Anim_00041C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_11
{ &object_an4_Anim_004A78, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_12
{ &object_an4_Anim_00506C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_13
{ &gAnju1SittingInDisbeliefAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_SITTING_IN_DISBELIEF
{ &gAnju1SitAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_SIT
// DMAN_ANIMOBJ_AN4
{ &gAnju4MaskStandLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_MASK_STAND_LOOP
//! @bug Uses symbol from OBJECT_AN1 instead of OBJECT_AN4
{ &gAnju1HoldHandsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_HOLD_HANDS
{ &gAnju4MaskKneelAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_MASK_KNEEL
{ &gAnju4MaskKneelLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_MASK_KNEEL_LOOP
{ &gAnju4HugAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_HUG
{ &gAnju4HugLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_HUG_LOOP
{ &gAnju4HugReleaseAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_HUG_RELEASE
{ &gAnju4HugReleaseLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_HUG_RELEASE_LOOP
{ &gAnju4CombineMasks1Anim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_COMBINE_MASKS_1
{ &gAnju4CombineMasks2Anim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_COMBINE_MASKS_2
{ &gAnju4LookUpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMAN_ANIM_LOOK_UP
{ &gAnju4LookUpLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMAN_ANIM_LOOK_UP_LOOP
};
s32 DmAn_UpdateSkelAnime(DmAn* this, PlayState* play) {
@ -74,13 +85,13 @@ s32 DmAn_UpdateSkelAnime(DmAn* this, PlayState* play) {
s8 objectSlot2;
s32 isAnimFinished = false;
if (this->animIndex <= DMAN_ANIM_1) {
if (this->animIndex < DMAN_ANIMOBJ_AN4) {
objectSlot2 = this->actor.objectSlot;
} else {
objectSlot2 = this->an4ObjectSlot;
}
if (objectSlot2 >= 0) {
if (objectSlot2 > OBJECT_SLOT_NONE) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot2].segment);
isAnimFinished = SkelAnime_Update(&this->skelAnime);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
@ -89,18 +100,18 @@ s32 DmAn_UpdateSkelAnime(DmAn* this, PlayState* play) {
return isAnimFinished;
}
s32 DmAn_ChangeAnim(DmAn* this, PlayState* play, s32 animIndex) {
s32 DmAn_ChangeAnim(DmAn* this, PlayState* play, DmAnAnimation animIndex) {
s8 objectSlot = this->actor.objectSlot;
s8 objectSlot2;
s32 didAnimChange = false;
if (animIndex <= DMAN_ANIM_1) {
if (animIndex < DMAN_ANIMOBJ_AN4) {
objectSlot2 = this->actor.objectSlot;
} else {
objectSlot2 = this->an4ObjectSlot;
}
if ((objectSlot2 >= 0) && (this->animIndex != animIndex)) {
if ((objectSlot2 > OBJECT_SLOT_NONE) && (this->animIndex != animIndex)) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot2].segment);
this->animIndex = animIndex;
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
@ -110,66 +121,85 @@ s32 DmAn_ChangeAnim(DmAn* this, PlayState* play, s32 animIndex) {
return didAnimChange;
}
void func_80C1C5B4(DmAn* this) {
if (DECR(this->unk_2BA) == 0) {
this->unk_2B8++;
if (this->unk_2B8 >= 4) {
this->unk_2BA = Rand_S16Offset(30, 30);
this->unk_2B8 = 0;
typedef enum DmAnEyes {
/* 0 */ DMAN_EYES_OPEN,
/* 1 */ DMAN_EYES_HALF1,
/* 2 */ DMAN_EYES_CLOSED,
/* 3 */ DMAN_EYES_HALF2,
/* 4 */ DMAN_EYES_COMFORT,
/* 5 */ DMAN_EYES_SAD,
/* 6 */ DMAN_EYES_RELIEVED_CLOSED,
/* 7 */ DMAN_EYES_MAX
} DmAnEyes;
typedef enum DmAnMouth {
/* 0 */ DMAN_MOUTH_CLOSED,
/* 1 */ DMAN_MOUTH_HAPPY,
/* 2 */ DMAN_MOUTH_OPEN,
/* 3 */ DMAN_MOUTH_MAX
} DmAnMouth;
void DmAn_Blink(DmAn* this) {
if (DECR(this->eyeTimer) == 0) {
this->eyeTexIndex++;
if (this->eyeTexIndex > DMAN_EYES_HALF2) {
this->eyeTimer = Rand_S16Offset(30, 30);
this->eyeTexIndex = 0;
}
}
}
s32 func_80C1C62C(DmAn* this, PlayState* play) {
s32 DmAn_UpdateHeadRot(DmAn* this, PlayState* play) {
s32 pad;
Vec3f sp40;
Vec3f sp34;
s16 sp32;
Vec3f lookAtActorPos;
Vec3f pos;
s16 yaw;
Math_Vec3f_Copy(&sp40, &this->unk_2B4->world.pos);
Math_Vec3f_Copy(&sp34, &this->actor.world.pos);
sp32 = Math_Vec3f_Yaw(&sp34, &sp40);
Math_Vec3f_Copy(&lookAtActorPos, &this->lookAtActor->world.pos);
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
yaw = Math_Vec3f_Yaw(&pos, &lookAtActorPos);
Math_ApproachS(&this->unk_2C0, (sp32 - this->unk_2C4) - this->actor.shape.rot.y, 4, 0x2AA8);
this->unk_2C0 = CLAMP(this->unk_2C0, -0x1FFE, 0x1FFE);
Math_ApproachS(&this->headRotY, (yaw - this->torsoRotY) - this->actor.shape.rot.y, 4, 0x2AA8);
this->headRotY = CLAMP(this->headRotY, -0x1FFE, 0x1FFE);
Math_ApproachS(&this->unk_2C4, (sp32 - this->unk_2C0) - this->actor.shape.rot.y, 4, 0x2AA8);
this->unk_2C4 = CLAMP(this->unk_2C4, -0x1C70, 0x1C70);
Math_ApproachS(&this->torsoRotY, (yaw - this->headRotY) - this->actor.shape.rot.y, 4, 0x2AA8);
this->torsoRotY = CLAMP(this->torsoRotY, -0x1C70, 0x1C70);
if (this->unk_2B4->id == ACTOR_PLAYER) {
sp40.y = ((Player*)this->unk_2B4)->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
if (this->lookAtActor->id == ACTOR_PLAYER) {
lookAtActorPos.y = ((Player*)this->lookAtActor)->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
} else {
Math_Vec3f_Copy(&sp40, &this->unk_2B4->focus.pos);
Math_Vec3f_Copy(&lookAtActorPos, &this->lookAtActor->focus.pos);
}
Math_Vec3f_Copy(&sp34, &this->actor.focus.pos);
Math_ApproachS(&this->unk_2BE, Math_Vec3f_Pitch(&sp34, &sp40) - this->unk_2C2, 4, 0x2AA8);
this->unk_2BE = CLAMP(this->unk_2BE, -0x1C70, 0x1C70);
Math_Vec3f_Copy(&pos, &this->actor.focus.pos);
Math_ApproachS(&this->headRotZ, Math_Vec3f_Pitch(&pos, &lookAtActorPos) - this->torsoRotZ, 4, 0x2AA8);
this->headRotZ = CLAMP(this->headRotZ, -0x1C70, 0x1C70);
Math_ApproachS(&this->torsoRotZ, Math_Vec3f_Pitch(&pos, &lookAtActorPos) - this->headRotZ, 4, 0x2AA8);
this->torsoRotZ = CLAMP(this->torsoRotZ, -0x1C70, 0x1C70);
Math_ApproachS(&this->unk_2C2, Math_Vec3f_Pitch(&sp34, &sp40) - this->unk_2BE, 4, 0x2AA8);
this->unk_2C2 = CLAMP(this->unk_2C2, -0x1C70, 0x1C70);
return true;
}
s32 func_80C1C83C(DmAn* this, PlayState* play) {
if (this->unk_2B4 != NULL) {
func_80C1C62C(this, play);
this->unk_2AE &= ~1;
this->unk_2AE |= 2;
} else if (this->unk_2AE & 2) {
this->unk_2AE &= ~2;
this->unk_2BE = 0;
this->unk_2C0 = 0;
this->unk_2C2 = 0;
this->unk_2C4 = 0;
this->unk_2BC = 20;
} else if (DECR(this->unk_2BC) == 0) {
this->unk_2AE |= 1;
s32 DmAn_UpdateAttention(DmAn* this, PlayState* play) {
if (this->lookAtActor != NULL) {
DmAn_UpdateHeadRot(this, play);
this->stateFlags &= ~DMAN_STATE_LOST_ATTENTION;
this->stateFlags |= DMAN_STATE_FACE_TARGET;
} else if (this->stateFlags & DMAN_STATE_FACE_TARGET) {
this->stateFlags &= ~DMAN_STATE_FACE_TARGET;
this->headRotZ = 0;
this->headRotY = 0;
this->torsoRotZ = 0;
this->torsoRotY = 0;
this->loseAttentionTimer = 20;
} else if (DECR(this->loseAttentionTimer) == 0) {
this->stateFlags |= DMAN_STATE_LOST_ATTENTION;
}
return true;
}
Actor* func_80C1C8E8(PlayState* play) {
Actor* DmAn_FindAnjusMotherActor(PlayState* play) {
Actor* tempActor;
Actor* foundActor = NULL;
@ -190,34 +220,42 @@ Actor* func_80C1C8E8(PlayState* play) {
return foundActor;
}
void func_80C1C958(DmAn* this, PlayState* play) {
void DmAn_WaitForObject(DmAn* this, PlayState* play) {
if ((this->an4ObjectSlot > OBJECT_SLOT_NONE) && SubS_IsObjectLoaded(this->an4ObjectSlot, play) &&
(this->msmoObjectSlot > OBJECT_SLOT_NONE) && SubS_IsObjectLoaded(this->msmoObjectSlot, play)) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &object_an1_Skel_012618, NULL, this->jointTable, this->morphTable,
OBJECT_AN1_LIMB_MAX);
SkelAnime_InitFlex(play, &this->skelAnime, &gAnju1Skel, NULL, this->jointTable, this->morphTable,
ANJU1_LIMB_MAX);
this->animIndex = DMAN_ANIM_NONE;
DmAn_ChangeAnim(this, play, DMAN_ANIM_0);
DmAn_ChangeAnim(this, play, DMAN_ANIM_SITTING_IN_DISBELIEF);
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
Actor_SetScale(&this->actor, 0.01f);
this->unk_2AE |= 1;
this->actor.draw = func_80C1D0B0;
this->stateFlags |= DMAN_STATE_LOST_ATTENTION;
this->actor.draw = DmAn_Draw;
if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) {
this->unk_2B4 = func_80C1C8E8(play);
DmAn_ChangeAnim(this, play, DMAN_ANIM_1);
this->lookAtActor = DmAn_FindAnjusMotherActor(play);
DmAn_ChangeAnim(this, play, DMAN_ANIM_SIT);
this->actionFunc = DmAn_DoNothing;
} else {
this->actionFunc = DmAn_HandleCutscene;
this->actionFunc = DmAn_HandleCouplesMaskCs;
}
}
}
void DmAn_HandleCutscene(DmAn* this, PlayState* play) {
void DmAn_HandleCouplesMaskCs(DmAn* this, PlayState* play) {
s32 csAnimIndex[] = {
DMAN_ANIM_0, DMAN_ANIM_0, DMAN_ANIM_12, DMAN_ANIM_2, DMAN_ANIM_4,
DMAN_ANIM_6, DMAN_ANIM_8, DMAN_ANIM_10, DMAN_ANIM_11, DMAN_ANIM_3,
/* 0 */ 0, // no cue
/* 1 */ DMAN_ANIM_SITTING_IN_DISBELIEF,
/* 2 */ DMAN_ANIM_LOOK_UP,
/* 3 */ DMAN_ANIM_MASK_STAND_LOOP,
/* 4 */ DMAN_ANIM_MASK_KNEEL,
/* 5 */ DMAN_ANIM_HUG,
/* 6 */ DMAN_ANIM_HUG_RELEASE,
/* 7 */ DMAN_ANIM_COMBINE_MASKS_1,
/* 8 */ DMAN_ANIM_COMBINE_MASKS_2,
/* 9 */ DMAN_ANIM_HOLD_HANDS,
};
u16 cueId;
s32 cueChannel;
@ -247,8 +285,8 @@ void DmAn_HandleCutscene(DmAn* this, PlayState* play) {
case 6:
case 7:
case 8:
if ((this->animIndex == DMAN_ANIM_12) || (this->animIndex == DMAN_ANIM_4) ||
(this->animIndex == DMAN_ANIM_6) || (this->animIndex == DMAN_ANIM_8)) {
if ((this->animIndex == DMAN_ANIM_LOOK_UP) || (this->animIndex == DMAN_ANIM_MASK_KNEEL) ||
(this->animIndex == DMAN_ANIM_HUG) || (this->animIndex == DMAN_ANIM_HUG_RELEASE)) {
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
DmAn_ChangeAnim(this, play, this->animIndex + 1);
}
@ -275,7 +313,7 @@ void DmAn_Init(Actor* thisx, PlayState* play) {
this->an4ObjectSlot = SubS_GetObjectSlot(OBJECT_AN4, play);
this->msmoObjectSlot = SubS_GetObjectSlot(OBJECT_MSMO, play);
this->actionFunc = func_80C1C958;
this->actionFunc = DmAn_WaitForObject;
}
void DmAn_Destroy(Actor* thisx, PlayState* play) {
@ -286,26 +324,25 @@ void DmAn_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
func_80C1C83C(this, play);
DmAn_UpdateAttention(this, play);
if (this->actor.draw != NULL) {
DmAn_UpdateSkelAnime(this, play);
func_80C1C5B4(this);
DmAn_Blink(this);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, UPDBGCHECKINFO_FLAG_4);
}
Vec3f D_80C1D2C8 = { 450.0f, 700.0f, -760.0f };
Vec3s D_80C1D2D4 = { 0x238C, 0, -0x3FFC };
Vec3f D_80C1D2DC = { 1000.0f, 0.0f, 0.0f };
void func_80C1CD80(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
void DmAn_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
s32 pad[2];
DmAn* this = THIS;
s8 objectSlot = this->actor.objectSlot;
s8 msmoObjectSlot = this->msmoObjectSlot;
if ((limbIndex == OBJECT_AN1_LIMB_05) && this->didAnimChangeInCs) {
if ((limbIndex == ANJU1_LIMB_LEFT_HAND) && this->didAnimChangeInCs) {
static Vec3f D_80C1D2C8 = { 450.0f, 700.0f, -760.0f };
static Vec3s D_80C1D2D4 = { 0x238C, 0, -0x3FFC };
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
@ -321,19 +358,21 @@ void func_80C1CD80(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Acto
CLOSE_DISPS(play->state.gfxCtx);
}
if (limbIndex == OBJECT_AN1_LIMB_09) {
if (limbIndex == ANJU1_LIMB_HEAD) {
static Vec3f D_80C1D2DC = { 1000.0f, 0.0f, 0.0f };
Matrix_MultVec3f(&D_80C1D2DC, &this->actor.focus.pos);
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
}
}
void func_80C1CEFC(PlayState* play, s32 limbIndex, Actor* thisx) {
void DmAn_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
DmAn* this = THIS;
s16 stepRot;
s16 overrideRot;
if (!(this->unk_2AE & 1)) {
if (this->unk_2AE & 2) {
if (!(this->stateFlags & DMAN_STATE_LOST_ATTENTION)) {
if (this->stateFlags & DMAN_STATE_FACE_TARGET) {
overrideRot = true;
} else {
overrideRot = false;
@ -344,53 +383,57 @@ void func_80C1CEFC(PlayState* play, s32 limbIndex, Actor* thisx) {
overrideRot = false;
}
if (limbIndex == OBJECT_AN1_LIMB_09) {
SubS_UpdateLimb(this->unk_2BE + this->unk_2C2 + 0x4000,
this->unk_2C0 + this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_18C,
&this->unk_1A4, stepRot, overrideRot);
if (limbIndex == ANJU1_LIMB_HEAD) {
SubS_UpdateLimb(this->headRotZ + this->torsoRotZ + 0x4000,
this->headRotY + this->torsoRotY + this->actor.shape.rot.y + 0x4000, &this->headComputedPos,
&this->headComputedRot, stepRot, overrideRot);
Matrix_Pop();
Matrix_Translate(this->unk_18C.x, this->unk_18C.y, this->unk_18C.z, MTXMODE_NEW);
Matrix_Translate(this->headComputedPos.x, this->headComputedPos.y, this->headComputedPos.z, MTXMODE_NEW);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
Matrix_RotateYS(this->unk_1A4.y, MTXMODE_APPLY);
Matrix_RotateXS(this->unk_1A4.x, MTXMODE_APPLY);
Matrix_RotateZS(this->unk_1A4.z, MTXMODE_APPLY);
Matrix_RotateYS(this->headComputedRot.y, MTXMODE_APPLY);
Matrix_RotateXS(this->headComputedRot.x, MTXMODE_APPLY);
Matrix_RotateZS(this->headComputedRot.z, MTXMODE_APPLY);
Matrix_Push();
} else if (limbIndex == OBJECT_AN1_LIMB_02) {
SubS_UpdateLimb(this->unk_2C2 + 0x4000, this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_194,
&this->unk_1AA, stepRot, overrideRot);
} else if (limbIndex == ANJU1_LIMB_TORSO) {
SubS_UpdateLimb(this->torsoRotZ + 0x4000, this->torsoRotY + this->actor.shape.rot.y + 0x4000,
&this->torsoComputedPos, &this->torsoComputedRot, stepRot, overrideRot);
Matrix_Pop();
Matrix_Translate(this->unk_194.x, this->unk_194.y, this->unk_194.z, MTXMODE_NEW);
Matrix_Translate(this->torsoComputedPos.x, this->torsoComputedPos.y, this->torsoComputedPos.z, MTXMODE_NEW);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
Matrix_RotateYS(this->unk_1AA.y, MTXMODE_APPLY);
Matrix_RotateXS(this->unk_1AA.x, MTXMODE_APPLY);
Matrix_RotateZS(this->unk_1AA.z, MTXMODE_APPLY);
Matrix_RotateYS(this->torsoComputedRot.y, MTXMODE_APPLY);
Matrix_RotateXS(this->torsoComputedRot.x, MTXMODE_APPLY);
Matrix_RotateZS(this->torsoComputedRot.z, MTXMODE_APPLY);
Matrix_Push();
}
}
TexturePtr D_80C1D2E8[] = {
object_an1_Tex_00E6E0,
object_an1_Tex_00F7A0,
object_an1_Tex_0101A0,
};
TexturePtr D_80C1D2F4[] = {
object_an1_Tex_00E1E0, object_an1_Tex_00EFA0, object_an1_Tex_00F3A0, object_an1_Tex_00EFA0,
object_an1_Tex_00FDA0, object_an1_Tex_00F9A0, object_an1_Tex_0103A0,
};
void func_80C1D0B0(Actor* thisx, PlayState* play) {
void DmAn_Draw(Actor* thisx, PlayState* play) {
static TexturePtr sMouthTextures[DMAN_MOUTH_MAX] = {
gAnju1MouthClosedTex, // DMAN_MOUTH_CLOSED
gAnju1MouthHappyTex, // DMAN_MOUTH_HAPPY
gAnju1MouthOpenTex, // DMAN_MOUTH_OPEN
};
static TexturePtr sEyeTextures[DMAN_EYES_MAX] = {
gAnju1EyeOpenTex, // DMAN_EYES_OPEN
gAnju1EyeHalfTex, // DMAN_EYES_HALF1
gAnju1EyeClosedTex, // DMAN_EYES_CLOSED
gAnju1EyeHalfTex, // DMAN_EYES_HALF2
gAnju1EyeComfortTex, // DMAN_EYES_COMFORT
gAnju1EyeSadTex, // DMAN_EYES_SAD
gAnju1EyeRelievedClosedTex, // DMAN_EYES_RELIEVED_CLOSED
};
DmAn* this = THIS;
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL25_Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80C1D2F4[this->unk_2B8]));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(D_80C1D2E8[0]));
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->eyeTexIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(sMouthTextures[DMAN_MOUTH_CLOSED]));
SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, NULL, func_80C1CD80, func_80C1CEFC, &this->actor);
this->skelAnime.dListCount, NULL, DmAn_PostLimbDraw, DmAn_TransformLimbDraw,
&this->actor);
CLOSE_DISPS(play->state.gfxCtx);
}

View File

@ -8,28 +8,31 @@ struct DmAn;
typedef void (*DmAnActionFunc)(struct DmAn*, PlayState*);
#define DMAN_STATE_LOST_ATTENTION (1 << 0)
#define DMAN_STATE_FACE_TARGET (1 << 1)
typedef struct DmAn {
/* 0x000 */ Actor actor;
/* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ DmAnActionFunc actionFunc;
/* 0x18C */ Vec3f unk_18C;
/* 0x18C */ Vec3f unk_194;
/* 0x1A4 */ Vec3s unk_1A4;
/* 0x1A4 */ Vec3s unk_1AA;
/* 0x1B0 */ Vec3s jointTable[OBJECT_AN1_LIMB_MAX];
/* 0x22E */ Vec3s morphTable[OBJECT_AN1_LIMB_MAX];
/* 0x18C */ Vec3f headComputedPos;
/* 0x18C */ Vec3f torsoComputedPos;
/* 0x1A4 */ Vec3s headComputedRot;
/* 0x1A4 */ Vec3s torsoComputedRot;
/* 0x1B0 */ Vec3s jointTable[ANJU1_LIMB_MAX];
/* 0x22E */ Vec3s morphTable[ANJU1_LIMB_MAX];
/* 0x2AC */ s8 an4ObjectSlot;
/* 0x2AD */ s8 msmoObjectSlot;
/* 0x2AE */ u16 unk_2AE;
/* 0x2AE */ u16 stateFlags;
/* 0x2B0 */ u8 cueId;
/* 0x2B4 */ Actor* unk_2B4;
/* 0x2B8 */ s16 unk_2B8;
/* 0x2BA */ s16 unk_2BA;
/* 0x2BC */ s16 unk_2BC;
/* 0x2BE */ s16 unk_2BE;
/* 0x2C0 */ s16 unk_2C0;
/* 0x2C2 */ s16 unk_2C2;
/* 0x2C4 */ s16 unk_2C4;
/* 0x2B4 */ Actor* lookAtActor;
/* 0x2B8 */ s16 eyeTexIndex;
/* 0x2BA */ s16 eyeTimer;
/* 0x2BC */ s16 loseAttentionTimer;
/* 0x2BE */ s16 headRotZ;
/* 0x2C0 */ s16 headRotY;
/* 0x2C2 */ s16 torsoRotZ;
/* 0x2C4 */ s16 torsoRotY;
/* 0x2C8 */ s32 animIndex;
/* 0x2CC */ s32 prevAnimIndex;
/* 0x2D0 */ s32 isCutscenePlaying;

View File

@ -16,10 +16,10 @@ void DmGm_Init(Actor* thisx, PlayState* play);
void DmGm_Destroy(Actor* thisx, PlayState* play);
void DmGm_Update(Actor* thisx, PlayState* play);
void func_80C248A8(DmGm* this, PlayState* play);
void DmGm_HandleCutscene(DmGm* this, PlayState* play);
void DmGm_WaitForObject(DmGm* this, PlayState* play);
void DmGm_HandleCouplesMaskCs(DmGm* this, PlayState* play);
void DmGm_DoNothing(DmGm* this, PlayState* play);
void func_80C25000(Actor* thisx, PlayState* play);
void DmGm_Draw(Actor* thisx, PlayState* play);
ActorInit Dm_Gm_InitVars = {
ACTOR_DM_GM,
@ -33,40 +33,51 @@ ActorInit Dm_Gm_InitVars = {
(ActorFunc)NULL,
};
typedef enum {
/* -1 */ DMGM_ANIM_NONE = -1,
/* 0x0 */ DMGM_ANIM_0,
/* 0x1 */ DMGM_ANIM_1,
/* 0x2 */ DMGM_ANIM_2,
/* 0x3 */ DMGM_ANIM_3,
/* 0x4 */ DMGM_ANIM_4,
/* 0x5 */ DMGM_ANIM_5,
/* 0x6 */ DMGM_ANIM_6,
/* 0x7 */ DMGM_ANIM_7,
/* 0x8 */ DMGM_ANIM_8,
/* 0x9 */ DMGM_ANIM_9,
/* 0xA */ DMGM_ANIM_10,
/* 0xB */ DMGM_ANIM_11,
/* 0xC */ DMGM_ANIM_12,
/* 0xD */ DMGM_ANIM_13,
/* 0xE */ DMGM_ANIM_MAX
/**
* Anju stores her animations across different objects and the ones used by this actor are put together right next to
* each other in the sAnimationInfo array. Due to this, animation functions check which object to load by comparing
* index ranges. To make this a bit easier to read, this enum includes `DMGM_ANIMOBJ_*` values that mark when a range of
* animations of a certain object start
*/
typedef enum DmGmAnimation {
/* -1 */ DMGM_ANIM_NONE = -1,
/* 0 */ DMGM_ANIM_SITTING_IN_DISBELIEF,
/* 1 */ DMGM_ANIM_SIT,
/* 2 */ DMGM_ANIMOBJ_AN4,
/* 2 */ DMGM_ANIM_MASK_STAND_LOOP = DMGM_ANIMOBJ_AN4,
/* 3 */ DMGM_ANIM_HOLD_HANDS, //! @bug See note at `sAnimationInfo`
/* 4 */ DMGM_ANIM_MASK_KNEEL,
/* 5 */ DMGM_ANIM_MASK_KNEEL_LOOP,
/* 6 */ DMGM_ANIM_HUG,
/* 7 */ DMGM_ANIM_HUG_LOOP,
/* 8 */ DMGM_ANIM_HUG_RELEASE,
/* 9 */ DMGM_ANIM_HUG_RELEASE_LOOP,
/* 10 */ DMGM_ANIM_COMBINE_MASKS_1,
/* 11 */ DMGM_ANIM_COMBINE_MASKS_2,
/* 12 */ DMGM_ANIM_LOOK_UP,
/* 13 */ DMGM_ANIM_LOOK_UP_LOOP,
/* 14 */ DMGM_ANIM_MAX
} DmGmAnimation;
static AnimationInfoS sAnimationInfo[DMGM_ANIM_MAX] = {
{ &object_an1_Anim_007E08, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_0
{ &object_an1_Anim_0071E8, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_1
{ &object_an4_Anim_006CC0, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // DMGM_ANIM_2
{ &object_an1_Anim_013E1C, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // DMGM_ANIM_3
{ &object_an4_Anim_007E3C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_4
{ &object_an4_Anim_0088C0, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_5
{ &object_an4_Anim_0013C8, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_6
{ &object_an4_Anim_002550, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_7
{ &object_an4_Anim_00353C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_8
{ &object_an4_Anim_004498, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_9
{ &object_an4_Anim_0060B4, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_10
{ &object_an4_Anim_00041C, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_11
{ &object_an4_Anim_004A78, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_12
{ &object_an4_Anim_00506C, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_13
{ &gAnju1SittingInDisbeliefAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_SITTING_IN_DISBELIEF
{ &gAnju1SitAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_SIT
// DMGM_ANIMOBJ_AN4
{ &gAnju4MaskStandLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // DMGM_ANIM_MASK_STAND_LOOP
//! @bug Uses symbol from OBJECT_AN1 instead of OBJECT_AN4
{ &gAnju1HoldHandsAnim, 1.0f, 0, -1, ANIMMODE_LOOP, -4 }, // DMGM_ANIM_HOLD_HANDS
{ &gAnju4MaskKneelAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_MASK_KNEEL
{ &gAnju4MaskKneelLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_MASK_KNEEL_LOOP
{ &gAnju4HugAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_HUG
{ &gAnju4HugLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_HUG_LOOP
{ &gAnju4HugReleaseAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_HUG_RELEASE
{ &gAnju4HugReleaseLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_HUG_RELEASE_LOOP
{ &gAnju4CombineMasks1Anim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_COMBINE_MASKS_1
{ &gAnju4CombineMasks2Anim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_COMBINE_MASKS_2
{ &gAnju4LookUpAnim, 1.0f, 0, -1, ANIMMODE_ONCE, 0 }, // DMGM_ANIM_LOOK_UP
{ &gAnju4LookUpLoopAnim, 1.0f, 0, -1, ANIMMODE_LOOP, 0 }, // DMGM_ANIM_LOOK_UP_LOOP
};
s32 DmGm_UpdateSkelAnime(DmGm* this, PlayState* play) {
@ -74,13 +85,13 @@ s32 DmGm_UpdateSkelAnime(DmGm* this, PlayState* play) {
s8 objectIndex2;
s32 isAnimFinished = false;
if (this->animIndex <= DMGM_ANIM_1) {
if (this->animIndex < DMGM_ANIMOBJ_AN4) {
objectIndex2 = this->actor.objectSlot;
} else {
objectIndex2 = this->an4ObjectSlot;
}
if (objectIndex2 >= 0) {
if (objectIndex2 > OBJECT_SLOT_NONE) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectIndex2].segment);
isAnimFinished = SkelAnime_Update(&this->skelAnime);
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectSlot].segment);
@ -89,18 +100,18 @@ s32 DmGm_UpdateSkelAnime(DmGm* this, PlayState* play) {
return isAnimFinished;
}
s32 DmGm_ChangeAnim(DmGm* this, PlayState* play, s32 animIndex) {
s32 DmGm_ChangeAnim(DmGm* this, PlayState* play, DmGmAnimation animIndex) {
s8 objectSlot = this->actor.objectSlot;
s8 objectIndex2;
s32 didAnimChange = false;
if (animIndex <= DMGM_ANIM_1) {
if (animIndex < DMGM_ANIMOBJ_AN4) {
objectIndex2 = this->actor.objectSlot;
} else {
objectIndex2 = this->an4ObjectSlot;
}
if ((objectIndex2 >= 0) && (this->animIndex != animIndex)) {
if ((objectIndex2 > OBJECT_SLOT_NONE) && (this->animIndex != animIndex)) {
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.slots[objectIndex2].segment);
this->animIndex = animIndex;
didAnimChange = SubS_ChangeAnimationByInfoS(&this->skelAnime, sAnimationInfo, animIndex);
@ -110,66 +121,85 @@ s32 DmGm_ChangeAnim(DmGm* this, PlayState* play, s32 animIndex) {
return didAnimChange;
}
void func_80C24504(DmGm* this) {
if (DECR(this->unk_2BA) == 0) {
this->unk_2B8++;
if (this->unk_2B8 >= 4) {
this->unk_2BA = Rand_S16Offset(30, 30);
this->unk_2B8 = 0;
typedef enum DmGmEyes {
/* 0 */ DMGM_EYES_OPEN,
/* 1 */ DMGM_EYES_HALF1,
/* 2 */ DMGM_EYES_CLOSED,
/* 3 */ DMGM_EYES_HALF2,
/* 4 */ DMGM_EYES_COMFORT,
/* 5 */ DMGM_EYES_SAD,
/* 6 */ DMGM_EYES_RELIEVED_CLOSED,
/* 7 */ DMGM_EYES_MAX
} DmGmEyes;
typedef enum DmGmMouth {
/* 0 */ DMGM_MOUTH_CLOSED,
/* 1 */ DMGM_MOUTH_HAPPY,
/* 2 */ DMGM_MOUTH_OPEN,
/* 3 */ DMGM_MOUTH_MAX
} DmGmMouth;
void DmGm_Blink(DmGm* this) {
if (DECR(this->eyeTimer) == 0) {
this->eyeTexIndex++;
if (this->eyeTexIndex > DMGM_EYES_HALF2) {
this->eyeTimer = Rand_S16Offset(30, 30);
this->eyeTexIndex = 0;
}
}
}
s32 func_80C2457C(DmGm* this, PlayState* play) {
s32 DmGm_UpdateHeadRot(DmGm* this, PlayState* play) {
s32 pad;
Vec3f sp40;
Vec3f sp34;
s16 sp32;
Vec3f lookAtActorPos;
Vec3f pos;
s16 yaw;
Math_Vec3f_Copy(&sp40, &this->unk_2B4->world.pos);
Math_Vec3f_Copy(&sp34, &this->actor.world.pos);
sp32 = Math_Vec3f_Yaw(&sp34, &sp40);
Math_Vec3f_Copy(&lookAtActorPos, &this->lookAtActor->world.pos);
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
yaw = Math_Vec3f_Yaw(&pos, &lookAtActorPos);
Math_ApproachS(&this->unk_2C0, (sp32 - this->unk_2C4) - this->actor.shape.rot.y, 4, 0x2AA8);
this->unk_2C0 = CLAMP(this->unk_2C0, -0x1FFE, 0x1FFE);
Math_ApproachS(&this->headRotY, (yaw - this->torsoRotY) - this->actor.shape.rot.y, 4, 0x2AA8);
this->headRotY = CLAMP(this->headRotY, -0x1FFE, 0x1FFE);
Math_ApproachS(&this->unk_2C4, (sp32 - this->unk_2C0) - this->actor.shape.rot.y, 4, 0x2AA8);
this->unk_2C4 = CLAMP(this->unk_2C4, -0x1C70, 0x1C70);
Math_ApproachS(&this->torsoRotY, (yaw - this->headRotY) - this->actor.shape.rot.y, 4, 0x2AA8);
this->torsoRotY = CLAMP(this->torsoRotY, -0x1C70, 0x1C70);
if (this->unk_2B4->id == ACTOR_PLAYER) {
sp40.y = ((Player*)this->unk_2B4)->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
if (this->lookAtActor->id == ACTOR_PLAYER) {
lookAtActorPos.y = ((Player*)this->lookAtActor)->bodyPartsPos[PLAYER_BODYPART_HEAD].y + 3.0f;
} else {
Math_Vec3f_Copy(&sp40, &this->unk_2B4->focus.pos);
Math_Vec3f_Copy(&lookAtActorPos, &this->lookAtActor->focus.pos);
}
Math_Vec3f_Copy(&sp34, &this->actor.focus.pos);
Math_ApproachS(&this->unk_2BE, Math_Vec3f_Pitch(&sp34, &sp40) - this->unk_2C2, 4, 0x2AA8);
this->unk_2BE = CLAMP(this->unk_2BE, -0x1C70, 0x1C70);
Math_Vec3f_Copy(&pos, &this->actor.focus.pos);
Math_ApproachS(&this->headRotZ, Math_Vec3f_Pitch(&pos, &lookAtActorPos) - this->torsoRotZ, 4, 0x2AA8);
this->headRotZ = CLAMP(this->headRotZ, -0x1C70, 0x1C70);
Math_ApproachS(&this->torsoRotZ, Math_Vec3f_Pitch(&pos, &lookAtActorPos) - this->headRotZ, 4, 0x2AA8);
this->torsoRotZ = CLAMP(this->torsoRotZ, -0x1C70, 0x1C70);
Math_ApproachS(&this->unk_2C2, Math_Vec3f_Pitch(&sp34, &sp40) - this->unk_2BE, 4, 0x2AA8);
this->unk_2C2 = CLAMP(this->unk_2C2, -0x1C70, 0x1C70);
return true;
}
s32 func_80C2478C(DmGm* this, PlayState* play) {
if (this->unk_2B4 != NULL) {
func_80C2457C(this, play);
this->unk_2AE &= ~1;
this->unk_2AE |= 2;
} else if (this->unk_2AE & 2) {
this->unk_2AE &= ~2;
this->unk_2BE = 0;
this->unk_2C0 = 0;
this->unk_2C2 = 0;
this->unk_2C4 = 0;
this->unk_2BC = 20;
} else if (DECR(this->unk_2BC) == 0) {
this->unk_2AE |= 1;
s32 DmGm_UpdateAttention(DmGm* this, PlayState* play) {
if (this->lookAtActor != NULL) {
DmGm_UpdateHeadRot(this, play);
this->stateFlags &= ~DMGM_STATE_LOST_ATTENTION;
this->stateFlags |= DMGM_STATE_FACE_TARGET;
} else if (this->stateFlags & DMGM_STATE_FACE_TARGET) {
this->stateFlags &= ~DMGM_STATE_FACE_TARGET;
this->headRotZ = 0;
this->headRotY = 0;
this->torsoRotZ = 0;
this->torsoRotY = 0;
this->loseAttentionTimer = 20;
} else if (DECR(this->loseAttentionTimer) == 0) {
this->stateFlags |= DMGM_STATE_LOST_ATTENTION;
}
return true;
}
Actor* func_80C24838(PlayState* play) {
Actor* DmGm_FindAnjusMotherActor(PlayState* play) {
Actor* tempActor;
Actor* foundActor = NULL;
@ -190,34 +220,42 @@ Actor* func_80C24838(PlayState* play) {
return foundActor;
}
void func_80C248A8(DmGm* this, PlayState* play) {
void DmGm_WaitForObject(DmGm* this, PlayState* play) {
if ((this->an4ObjectSlot > OBJECT_SLOT_NONE) && SubS_IsObjectLoaded(this->an4ObjectSlot, play) &&
(this->msmoObjectSlot > OBJECT_SLOT_NONE) && SubS_IsObjectLoaded(this->msmoObjectSlot, play)) {
ActorShape_Init(&this->actor.shape, 0.0f, ActorShadow_DrawCircle, 14.0f);
SkelAnime_InitFlex(play, &this->skelAnime, &object_an1_Skel_012618, NULL, this->jointTable, this->morphTable,
OBJECT_AN1_LIMB_MAX);
SkelAnime_InitFlex(play, &this->skelAnime, &gAnju1Skel, NULL, this->jointTable, this->morphTable,
ANJU1_LIMB_MAX);
this->animIndex = DMGM_ANIM_NONE;
DmGm_ChangeAnim(this, play, DMGM_ANIM_0);
DmGm_ChangeAnim(this, play, DMGM_ANIM_SITTING_IN_DISBELIEF);
this->actor.flags &= ~ACTOR_FLAG_TARGETABLE;
Actor_SetScale(&this->actor, 0.01f);
this->unk_2AE |= 1;
this->actor.draw = func_80C25000;
this->stateFlags |= 1;
this->actor.draw = DmGm_Draw;
if ((play->sceneId == SCENE_YADOYA) && (play->curSpawn == 4)) {
this->unk_2B4 = func_80C24838(play);
DmGm_ChangeAnim(this, play, DMGM_ANIM_1);
this->lookAtActor = DmGm_FindAnjusMotherActor(play);
DmGm_ChangeAnim(this, play, DMGM_ANIM_SIT);
this->actionFunc = DmGm_DoNothing;
} else {
this->actionFunc = DmGm_HandleCutscene;
this->actionFunc = DmGm_HandleCouplesMaskCs;
}
}
}
void DmGm_HandleCutscene(DmGm* this, PlayState* play) {
void DmGm_HandleCouplesMaskCs(DmGm* this, PlayState* play) {
s32 csAnimIndex[] = {
DMGM_ANIM_0, DMGM_ANIM_0, DMGM_ANIM_12, DMGM_ANIM_2, DMGM_ANIM_4,
DMGM_ANIM_6, DMGM_ANIM_8, DMGM_ANIM_10, DMGM_ANIM_11, DMGM_ANIM_3,
/* 0 */ 0, // no cue
/* 1 */ DMGM_ANIM_SITTING_IN_DISBELIEF,
/* 2 */ DMGM_ANIM_LOOK_UP,
/* 3 */ DMGM_ANIM_MASK_STAND_LOOP,
/* 4 */ DMGM_ANIM_MASK_KNEEL,
/* 5 */ DMGM_ANIM_HUG,
/* 6 */ DMGM_ANIM_HUG_RELEASE,
/* 7 */ DMGM_ANIM_COMBINE_MASKS_1,
/* 8 */ DMGM_ANIM_COMBINE_MASKS_2,
/* 9 */ DMGM_ANIM_HOLD_HANDS,
};
u16 cueId;
s32 cueChannel;
@ -247,8 +285,8 @@ void DmGm_HandleCutscene(DmGm* this, PlayState* play) {
case 6:
case 7:
case 8:
if ((this->animIndex == DMGM_ANIM_12) || (this->animIndex == DMGM_ANIM_4) ||
(this->animIndex == DMGM_ANIM_6) || (this->animIndex == DMGM_ANIM_8)) {
if ((this->animIndex == DMGM_ANIM_LOOK_UP) || (this->animIndex == DMGM_ANIM_MASK_KNEEL) ||
(this->animIndex == DMGM_ANIM_HUG) || (this->animIndex == DMGM_ANIM_HUG_RELEASE)) {
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
DmGm_ChangeAnim(this, play, this->animIndex + 1);
}
@ -275,7 +313,7 @@ void DmGm_Init(Actor* thisx, PlayState* play) {
this->an4ObjectSlot = SubS_GetObjectSlot(OBJECT_AN4, play);
this->msmoObjectSlot = SubS_GetObjectSlot(OBJECT_MSMO, play);
this->actionFunc = func_80C248A8;
this->actionFunc = DmGm_WaitForObject;
}
void DmGm_Destroy(Actor* thisx, PlayState* play) {
@ -286,42 +324,43 @@ void DmGm_Update(Actor* thisx, PlayState* play) {
this->actionFunc(this, play);
func_80C2478C(this, play);
DmGm_UpdateAttention(this, play);
if (this->actor.draw != NULL) {
DmGm_UpdateSkelAnime(this, play);
func_80C24504(this);
DmGm_Blink(this);
}
Actor_UpdateBgCheckInfo(play, &this->actor, 30.0f, 12.0f, 0.0f, UPDBGCHECKINFO_FLAG_4);
}
Vec3f D_80C25218 = { 450.0f, 700.0f, -760.0f };
Vec3s D_80C25224 = { 0x238C, 0, -0x3FFC };
Vec3f D_80C2522C = { 1000.0f, 0.0f, 0.0f };
void DmGm_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3s* rot, Actor* thisx) {
s32 pad[2];
DmGm* this = THIS;
s8 sp2B = this->actor.objectSlot;
s8 sp2A = this->msmoObjectSlot;
s8 objectSlot = this->actor.objectSlot;
s8 msmoObjectSlot = this->msmoObjectSlot;
if ((limbIndex == ANJU1_LIMB_LEFT_HAND) && this->didAnimChangeInCs) {
static Vec3f D_80C25218 = { 450.0f, 700.0f, -760.0f };
static Vec3s D_80C25224 = { 0x238C, 0, -0x3FFC };
if ((limbIndex == OBJECT_AN1_LIMB_05) && this->didAnimChangeInCs) {
OPEN_DISPS(play->state.gfxCtx);
Matrix_Push();
Matrix_TranslateRotateZYX(&D_80C25218, &D_80C25224);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[sp2A].segment);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[msmoObjectSlot].segment);
gSPDisplayList(POLY_OPA_DISP++, gMoonMaskDL);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[sp2B].segment);
gSPSegment(POLY_OPA_DISP++, 0x06, play->objectCtx.slots[objectSlot].segment);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
}
if (limbIndex == OBJECT_AN1_LIMB_09) {
if (limbIndex == ANJU1_LIMB_HEAD) {
static Vec3f D_80C2522C = { 1000.0f, 0.0f, 0.0f };
Matrix_MultVec3f(&D_80C2522C, &this->actor.focus.pos);
Math_Vec3s_Copy(&this->actor.focus.rot, &this->actor.world.rot);
}
@ -332,8 +371,8 @@ void DmGm_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
s16 stepRot;
s16 overrideRot;
if (!(this->unk_2AE & 1)) {
if (this->unk_2AE & 2) {
if (!(this->stateFlags & DMGM_STATE_LOST_ATTENTION)) {
if (this->stateFlags & DMGM_STATE_FACE_TARGET) {
overrideRot = true;
} else {
overrideRot = false;
@ -344,50 +383,53 @@ void DmGm_TransformLimbDraw(PlayState* play, s32 limbIndex, Actor* thisx) {
overrideRot = false;
}
if (limbIndex == OBJECT_AN1_LIMB_09) {
SubS_UpdateLimb(this->unk_2BE + this->unk_2C2 + 0x4000,
this->unk_2C0 + this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_18C,
&this->unk_1A4, stepRot, overrideRot);
if (limbIndex == ANJU1_LIMB_HEAD) {
SubS_UpdateLimb(this->headRotZ + this->torsoRotZ + 0x4000,
this->headRotY + this->torsoRotY + this->actor.shape.rot.y + 0x4000, &this->headComputedPos,
&this->headComputedRot, stepRot, overrideRot);
Matrix_Pop();
Matrix_Translate(this->unk_18C.x, this->unk_18C.y, this->unk_18C.z, MTXMODE_NEW);
Matrix_Translate(this->headComputedPos.x, this->headComputedPos.y, this->headComputedPos.z, MTXMODE_NEW);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
Matrix_RotateYS(this->unk_1A4.y, MTXMODE_APPLY);
Matrix_RotateXS(this->unk_1A4.x, MTXMODE_APPLY);
Matrix_RotateZS(this->unk_1A4.z, MTXMODE_APPLY);
Matrix_RotateYS(this->headComputedRot.y, MTXMODE_APPLY);
Matrix_RotateXS(this->headComputedRot.x, MTXMODE_APPLY);
Matrix_RotateZS(this->headComputedRot.z, MTXMODE_APPLY);
Matrix_Push();
} else if (limbIndex == OBJECT_AN1_LIMB_02) {
SubS_UpdateLimb(this->unk_2C2 + 0x4000, this->unk_2C4 + this->actor.shape.rot.y + 0x4000, &this->unk_194,
&this->unk_1AA, stepRot, overrideRot);
} else if (limbIndex == ANJU1_LIMB_TORSO) {
SubS_UpdateLimb(this->torsoRotZ + 0x4000, this->torsoRotY + this->actor.shape.rot.y + 0x4000,
&this->torsoComputedPos, &this->torsoComputedRot, stepRot, overrideRot);
Matrix_Pop();
Matrix_Translate(this->unk_194.x, this->unk_194.y, this->unk_194.z, MTXMODE_NEW);
Matrix_Translate(this->torsoComputedPos.x, this->torsoComputedPos.y, this->torsoComputedPos.z, MTXMODE_NEW);
Matrix_Scale(this->actor.scale.x, this->actor.scale.y, this->actor.scale.z, MTXMODE_APPLY);
Matrix_RotateYS(this->unk_1AA.y, MTXMODE_APPLY);
Matrix_RotateXS(this->unk_1AA.x, MTXMODE_APPLY);
Matrix_RotateZS(this->unk_1AA.z, MTXMODE_APPLY);
Matrix_RotateYS(this->torsoComputedRot.y, MTXMODE_APPLY);
Matrix_RotateXS(this->torsoComputedRot.x, MTXMODE_APPLY);
Matrix_RotateZS(this->torsoComputedRot.z, MTXMODE_APPLY);
Matrix_Push();
}
}
TexturePtr D_80C25238[] = {
object_an1_Tex_00E6E0,
object_an1_Tex_00F7A0,
object_an1_Tex_0101A0,
};
TexturePtr D_80C25244[] = {
object_an1_Tex_00E1E0, object_an1_Tex_00EFA0, object_an1_Tex_00F3A0, object_an1_Tex_00EFA0,
object_an1_Tex_00FDA0, object_an1_Tex_00F9A0, object_an1_Tex_0103A0,
};
void func_80C25000(Actor* thisx, PlayState* play) {
void DmGm_Draw(Actor* thisx, PlayState* play) {
static TexturePtr sMouthTextures[DMGM_MOUTH_MAX] = {
gAnju1MouthClosedTex, // DMGM_MOUTH_CLOSED
gAnju1MouthHappyTex, // DMGM_MOUTH_HAPPY
gAnju1MouthOpenTex, // DMGM_MOUTH_OPEN
};
static TexturePtr sEyeTextures[DMGM_EYES_MAX] = {
gAnju1EyeOpenTex, // DMGM_EYES_OPEN
gAnju1EyeHalfTex, // DMGM_EYES_HALF1
gAnju1EyeClosedTex, // DMGM_EYES_CLOSED
gAnju1EyeHalfTex, // DMGM_EYES_HALF2
gAnju1EyeComfortTex, // DMGM_EYES_COMFORT
gAnju1EyeSadTex, // DMGM_EYES_SAD
gAnju1EyeRelievedClosedTex, // DMGM_EYES_RELIEVED_CLOSED
};
DmGm* this = THIS;
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL25_Opa(play->state.gfxCtx);
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80C25244[this->unk_2B8]));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(D_80C25238[0]));
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sEyeTextures[this->eyeTexIndex]));
gSPSegment(POLY_OPA_DISP++, 0x09, Lib_SegmentedToVirtual(sMouthTextures[DMGM_MOUTH_CLOSED]));
SkelAnime_DrawTransformFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable,
this->skelAnime.dListCount, NULL, DmGm_PostLimbDraw, DmGm_TransformLimbDraw,

View File

@ -8,28 +8,31 @@ struct DmGm;
typedef void (*DmGmActionFunc)(struct DmGm*, PlayState*);
#define DMGM_STATE_LOST_ATTENTION (1 << 0)
#define DMGM_STATE_FACE_TARGET (1 << 1)
typedef struct DmGm {
/* 0x000 */ Actor actor;
/* 0x144 */ SkelAnime skelAnime;
/* 0x188 */ DmGmActionFunc actionFunc;
/* 0x18C */ Vec3f unk_18C;
/* 0x18C */ Vec3f unk_194;
/* 0x1A4 */ Vec3s unk_1A4;
/* 0x1A4 */ Vec3s unk_1AA;
/* 0x1B0 */ Vec3s jointTable[OBJECT_AN1_LIMB_MAX];
/* 0x22E */ Vec3s morphTable[OBJECT_AN1_LIMB_MAX];
/* 0x18C */ Vec3f headComputedPos;
/* 0x18C */ Vec3f torsoComputedPos;
/* 0x1A4 */ Vec3s headComputedRot;
/* 0x1A4 */ Vec3s torsoComputedRot;
/* 0x1B0 */ Vec3s jointTable[ANJU1_LIMB_MAX];
/* 0x22E */ Vec3s morphTable[ANJU1_LIMB_MAX];
/* 0x2AC */ s8 an4ObjectSlot;
/* 0x2AD */ s8 msmoObjectSlot;
/* 0x2AE */ u16 unk_2AE;
/* 0x2AE */ u16 stateFlags;
/* 0x2B0 */ u8 cueId;
/* 0x2B4 */ Actor* unk_2B4;
/* 0x2B8 */ s16 unk_2B8;
/* 0x2BA */ s16 unk_2BA;
/* 0x2BC */ s16 unk_2BC;
/* 0x2BE */ s16 unk_2BE;
/* 0x2C0 */ s16 unk_2C0;
/* 0x2C2 */ s16 unk_2C2;
/* 0x2C4 */ s16 unk_2C4;
/* 0x2B4 */ Actor* lookAtActor;
/* 0x2B8 */ s16 eyeTexIndex;
/* 0x2BA */ s16 eyeTimer;
/* 0x2BC */ s16 loseAttentionTimer;
/* 0x2BE */ s16 headRotZ;
/* 0x2C0 */ s16 headRotY;
/* 0x2C2 */ s16 torsoRotZ;
/* 0x2C4 */ s16 torsoRotY;
/* 0x2C8 */ s32 animIndex;
/* 0x2CC */ s32 prevAnimIndex;
/* 0x2D0 */ s32 isCutscenePlaying;

View File

@ -824,7 +824,7 @@ s32 func_80A3FE20(EnTest3* this, PlayState* play) {
s32 func_80A3FF10(EnTest3* this, PlayState* play, struct_80A41828* arg2, ScheduleOutput* scheduleOutput) {
static Vec3f D_80A418BC = { -420.0f, 210.0f, -162.0f };
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_51_40)) {
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_COUPLES_MASK_CUTSCENE_FINISHED)) {
D_80A41D68 = 2;
Math_Vec3f_Copy(&this->player.actor.world.pos, &D_80A418BC);
Math_Vec3f_Copy(&this->player.actor.home.pos, &D_80A418BC);
@ -856,7 +856,7 @@ s32 func_80A3FFD0(EnTest3* this, PlayState* play2) {
D_80A41D68 = 2;
}
} else {
SET_WEEKEVENTREG(WEEKEVENTREG_51_40);
SET_WEEKEVENTREG(WEEKEVENTREG_COUPLES_MASK_CUTSCENE_FINISHED);
play->startPlayerCutscene(play, &this->player, PLAYER_CSMODE_110);
}
return false;

View File

@ -16941,19 +16941,19 @@
0x80C1C130:("DmAl_Draw",),
0x80C1C410:("DmAn_UpdateSkelAnime",),
0x80C1C4D8:("DmAn_ChangeAnim",),
0x80C1C5B4:("func_80C1C5B4",),
0x80C1C62C:("func_80C1C62C",),
0x80C1C83C:("func_80C1C83C",),
0x80C1C8E8:("func_80C1C8E8",),
0x80C1C958:("func_80C1C958",),
0x80C1CAB0:("DmAn_HandleCutscene",),
0x80C1C5B4:("DmAn_Blink",),
0x80C1C62C:("DmAn_UpdateHeadRot",),
0x80C1C83C:("DmAn_UpdateAttention",),
0x80C1C8E8:("DmAn_FindAnjusMotherActor",),
0x80C1C958:("DmAn_WaitForObject",),
0x80C1CAB0:("DmAn_HandleCouplesMaskCs",),
0x80C1CC80:("DmAn_DoNothing",),
0x80C1CC90:("DmAn_Init",),
0x80C1CCE4:("DmAn_Destroy",),
0x80C1CCF4:("DmAn_Update",),
0x80C1CD80:("func_80C1CD80",),
0x80C1CEFC:("func_80C1CEFC",),
0x80C1D0B0:("func_80C1D0B0",),
0x80C1CD80:("DmAn_PostLimbDraw",),
0x80C1CEFC:("DmAn_TransformLimbDraw",),
0x80C1D0B0:("DmAn_Draw",),
0x80C1D410:("DmAh_ChangeAnim",),
0x80C1D458:("func_80C1D458",),
0x80C1D4D0:("func_80C1D4D0",),
@ -17102,19 +17102,19 @@
0x80C23F6C:("EnEndingHero6_Draw",),
0x80C24360:("DmGm_UpdateSkelAnime",),
0x80C24428:("DmGm_ChangeAnim",),
0x80C24504:("func_80C24504",),
0x80C2457C:("func_80C2457C",),
0x80C2478C:("func_80C2478C",),
0x80C24838:("func_80C24838",),
0x80C248A8:("func_80C248A8",),
0x80C24A00:("DmGm_HandleCutscene",),
0x80C24504:("DmGm_Blink",),
0x80C2457C:("DmGm_UpdateHeadRot",),
0x80C2478C:("DmGm_UpdateAttention",),
0x80C24838:("DmGm_FindAnjusMotherActor",),
0x80C248A8:("DmGm_WaitForObject",),
0x80C24A00:("DmGm_HandleCouplesMaskCs",),
0x80C24BD0:("DmGm_DoNothing",),
0x80C24BE0:("DmGm_Init",),
0x80C24C34:("DmGm_Destroy",),
0x80C24C44:("DmGm_Update",),
0x80C24CD0:("DmGm_PostLimbDraw",),
0x80C24E4C:("DmGm_TransformLimbDraw",),
0x80C25000:("func_80C25000",),
0x80C25000:("DmGm_Draw",),
0x80C25360:("func_80C25360",),
0x80C253D0:("func_80C253D0",),
0x80C255DC:("ObjSwprize_Init",),

View File

@ -16414,8 +16414,8 @@
0x80C1D2C8:("D_80C1D2C8","UNK_TYPE1","",0x1),
0x80C1D2D4:("D_80C1D2D4","UNK_TYPE1","",0x1),
0x80C1D2DC:("D_80C1D2DC","UNK_TYPE1","",0x1),
0x80C1D2E8:("D_80C1D2E8","UNK_TYPE4","",0x4),
0x80C1D2F4:("D_80C1D2F4","UNK_TYPE1","",0x1),
0x80C1D2E8:("sMouthTextures","UNK_TYPE4","",0x4),
0x80C1D2F4:("sEyeTextures","UNK_TYPE1","",0x1),
0x80C1D310:("jtbl_80C1D310","UNK_PTR","",0x4),
0x80C1DDC0:("Dm_Ah_InitVars","UNK_TYPE1","",0x1),
0x80C1DDE0:("D_80C1DDE0","UNK_PTR","",0x4),
@ -16501,8 +16501,8 @@
0x80C25218:("D_80C25218","UNK_TYPE1","",0x1),
0x80C25224:("D_80C25224","UNK_TYPE1","",0x1),
0x80C2522C:("D_80C2522C","UNK_TYPE1","",0x1),
0x80C25238:("D_80C25238","UNK_TYPE4","",0x4),
0x80C25244:("D_80C25244","UNK_TYPE1","",0x1),
0x80C25238:("sMouthTextures","UNK_TYPE4","",0x4),
0x80C25244:("sEyeTextures","UNK_TYPE1","",0x1),
0x80C25260:("jtbl_80C25260","UNK_PTR","",0x4),
0x80C257D0:("Obj_Swprize_InitVars","UNK_TYPE1","",0x1),
0x80C257F0:("D_80C257F0","UNK_TYPE1","",0x1),

View File

@ -418,7 +418,7 @@ weekEventReg = {
(51 << 8) | 0x08: "WEEKEVENTREG_51_08",
(51 << 8) | 0x10: "WEEKEVENTREG_51_10",
(51 << 8) | 0x20: "WEEKEVENTREG_ESCAPED_SAKONS_HIDEOUT",
(51 << 8) | 0x40: "WEEKEVENTREG_51_40",
(51 << 8) | 0x40: "WEEKEVENTREG_COUPLES_MASK_CUTSCENE_FINISHED",
(51 << 8) | 0x80: "WEEKEVENTREG_51_80",
(52 << 8) | 0x01: "WEEKEVENTREG_ESCORTED_CREMIA",
(52 << 8) | 0x02: "WEEKEVENTREG_52_02",

View File

@ -338,21 +338,6 @@ D_06014040 = 0x06014040;
D_06002D30 = 0x06002D30;
D_06011458 = 0x06011458;
// ovl_Door_Spiral
D_06000590 = 0x06000590;
D_060007A8 = 0x060007A8;
D_06000EA0 = 0x06000EA0;
D_060012C0 = 0x060012C0;
D_060014C8 = 0x060014C8;
D_06002110 = 0x06002110;
D_06004448 = 0x06004448;
D_060051B8 = 0x060051B8;
D_06006128 = 0x06006128;
D_06009278 = 0x06009278;
D_06012B70 = 0x06012B70;
D_06013EA8 = 0x06013EA8;
// ovl_En_An
D_06000308 = 0x06000308;