mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-13 11:24:40 +00:00
Merge commit '274743738b
' into doc_pause_menu
This commit is contained in:
commit
5bd4d4dd49
99 changed files with 1786 additions and 1554 deletions
|
@ -35,34 +35,34 @@
|
|||
<Animation Name="gObjOsAnim_4CF4" Offset="0x4CF4"/>
|
||||
<Animation Name="gObjOsAnim_4E90" Offset="0x4E90"/>
|
||||
<Animation Name="gObjOsAnim_4F28" Offset="0x4F28"/>
|
||||
<Animation Name="gObjOsAnim_5808" Offset="0x5808"/>
|
||||
<Animation Name="gObjOsAnim_62DC" Offset="0x62DC"/>
|
||||
<Animation Name="gKokiriLaughingAnim" Offset="0x5808"/>
|
||||
<Animation Name="gKokiriIdleAnim" Offset="0x62DC"/>
|
||||
<Animation Name="gObjOsAnim_6458" Offset="0x6458"/>
|
||||
<Animation Name="gObjOsAnim_6518" Offset="0x6518"/>
|
||||
<Animation Name="gObjOsAnim_65E0" Offset="0x65E0"/>
|
||||
<Animation Name="gObjOsAnim_6A60" Offset="0x6A60"/>
|
||||
<Animation Name="gObjOsAnim_6EE0" Offset="0x6EE0"/>
|
||||
<Animation Name="gObjOsAnim_6F9C" Offset="0x6F9C"/>
|
||||
<Animation Name="gObjOsAnim_7064" Offset="0x7064"/>
|
||||
<Animation Name="gObjOsAnim_7120" Offset="0x7120"/>
|
||||
<Animation Name="gObjOsAnim_7454" Offset="0x7454"/>
|
||||
<Animation Name="gObjOsAnim_7830" Offset="0x7830"/>
|
||||
<Animation Name="gObjOsAnim_7D94" Offset="0x7D94"/>
|
||||
<Animation Name="gObjOsAnim_7E64" Offset="0x7E64"/>
|
||||
<Animation Name="gObjOsAnim_7F38" Offset="0x7F38"/>
|
||||
<Animation Name="gObjOsAnim_7FFC" Offset="0x7FFC"/>
|
||||
<Animation Name="gObjOsAnim_80B4" Offset="0x80B4"/>
|
||||
<Animation Name="gObjOsAnim_8178" Offset="0x8178"/>
|
||||
<Animation Name="gObjOsAnim_879C" Offset="0x879C"/>
|
||||
<Animation Name="gObjOsAnim_8F6C" Offset="0x8F6C"/>
|
||||
<Animation Name="gObjOsAnim_9028" Offset="0x9028"/>
|
||||
<Animation Name="gObjOsAnim_90EC" Offset="0x90EC"/>
|
||||
<Animation Name="gObjOsAnim_91AC" Offset="0x91AC"/>
|
||||
<Animation Name="gObjOsAnim_9274" Offset="0x9274"/>
|
||||
<Animation Name="gObjOsAnim_982C" Offset="0x982C"/>
|
||||
<Animation Name="gObjOsAnim_98EC" Offset="0x98EC"/>
|
||||
<Animation Name="gObjOsAnim_99A4" Offset="0x99A4"/>
|
||||
<Animation Name="gObjOsAnim_9B64" Offset="0x9B64"/>
|
||||
<Animation Name="gKokiriRecliningSittingUpAnim" Offset="0x65E0"/>
|
||||
<Animation Name="gKokiriWipingForeheadAnim" Offset="0x6A60"/>
|
||||
<Animation Name="gKokiriBackflipAnim" Offset="0x6EE0"/>
|
||||
<Animation Name="gKokiriSittingCrossedArmsLegsAnim" Offset="0x6F9C"/>
|
||||
<Animation Name="gKokiriStandingApprehensiveAnim" Offset="0x7064"/>
|
||||
<Animation Name="gKokiriLeaningOnArmsAnim" Offset="0x7120"/>
|
||||
<Animation Name="gKokiriSittingDiggingAnim" Offset="0x7454"/> <!-- unused -->
|
||||
<Animation Name="gKokiriLiftingRockAnim" Offset="0x7830"/>
|
||||
<Animation Name="gKokiriCuttingGrassAnim" Offset="0x7D94"/>
|
||||
<Animation Name="gKokiriSittingHeadOnHandAnim" Offset="0x7E64"/>
|
||||
<Animation Name="gKokiriRecliningLeaningBackAnim" Offset="0x7F38"/>
|
||||
<Animation Name="gKokiriStandingHandOnChestAnim" Offset="0x7FFC"/>
|
||||
<Animation Name="gKokiriStandingHandsOnHipsAnim" Offset="0x80B4"/>
|
||||
<Animation Name="gKokiriRecliningStandingAnim" Offset="0x8178"/>
|
||||
<Animation Name="gKokiriPunchingAnim" Offset="0x879C"/>
|
||||
<Animation Name="gKokiriBlockingAnim" Offset="0x8F6C"/>
|
||||
<Animation Name="gKokiriSittingArmsUpAnim" Offset="0x9028"/>
|
||||
<Animation Name="gKokiriStandingRightArmUpAnim" Offset="0x90EC"/>
|
||||
<Animation Name="gKokiriSittingAnim" Offset="0x91AC"/>
|
||||
<Animation Name="gKokiriStandingAnim" Offset="0x9274"/>
|
||||
<Animation Name="gKokiriStandingArmsBehindBackAnim" Offset="0x982C"/>
|
||||
<Animation Name="gKokiriLeaningForwardAnim" Offset="0x98EC"/> <!-- unused -->
|
||||
<Animation Name="gKokiriSittingCrossedLegsAnim" Offset="0x99A4"/>
|
||||
<Animation Name="gKokiriStandUpAnim" Offset="0x9B64"/>
|
||||
<Animation Name="gObjOsAnim_9F94" Offset="0x9F94"/>
|
||||
<Animation Name="gObjOsAnim_A630" Offset="0xA630"/>
|
||||
</File>
|
||||
|
|
|
@ -1,32 +1,35 @@
|
|||
<Root>
|
||||
<File Name="object_rs" Segment="6">
|
||||
<Animation Name="object_rs_Anim_00065C" Offset="0x65C"/>
|
||||
<DList Name="object_rs_DL_001FA0" Offset="0x1FA0"/>
|
||||
<DList Name="object_rs_DL_0021F8" Offset="0x21F8"/>
|
||||
<DList Name="object_rs_DL_0025F8" Offset="0x25F8"/>
|
||||
<DList Name="object_rs_DL_002730" Offset="0x2730"/>
|
||||
<DList Name="object_rs_DL_002860" Offset="0x2860"/>
|
||||
<DList Name="object_rs_DL_002A70" Offset="0x2A70"/>
|
||||
<DList Name="object_rs_DL_002BA8" Offset="0x2BA8"/>
|
||||
<DList Name="object_rs_DL_002CD8" Offset="0x2CD8"/>
|
||||
<Texture Name="object_rs_TLUT_002EE8" OutName="tlut_00002EE8" Format="rgba16" Width="16" Height="16" Offset="0x2EE8"/>
|
||||
<Texture Name="object_rs_Tex_0030E8" OutName="tex_000030E8" Format="ci8" Width="8" Height="8" Offset="0x30E8" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="object_rs_Tex_003128" OutName="tex_00003128" Format="ci8" Width="8" Height="8" Offset="0x3128" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="object_rs_Tex_003168" OutName="tex_00003168" Format="ci8" Width="32" Height="64" Offset="0x3168" TlutOffset="0x2EE8"/>
|
||||
<Animation Name="gBombchuShopkeeperIdleAnim" Offset="0x65C"/>
|
||||
|
||||
<DList Name="gBombchuShopkeeperTorsoDL" Offset="0x1FA0"/>
|
||||
<DList Name="gBombchuShopkeeperHeadDL" Offset="0x21F8"/>
|
||||
<DList Name="gBombchuShopkeeperRightUpperArmDL" Offset="0x25F8"/>
|
||||
<DList Name="gBombchuShopkeeperRightForearmDL" Offset="0x2730"/>
|
||||
<DList Name="gBombchuShopkeeperRightHandDL" Offset="0x2860"/>
|
||||
<DList Name="gBombchuShopkeeperLeftUpperArmDL" Offset="0x2A70"/>
|
||||
<DList Name="gBombchuShopkeeperLeftForearmDL" Offset="0x2BA8"/>
|
||||
<DList Name="gBombchuShopkeeperLeftHandDL" Offset="0x2CD8"/>
|
||||
|
||||
<Texture Name="gBombchuShopkeeperTLUT" OutName="tlut" Format="rgba16" Width="16" Height="16" Offset="0x2EE8"/>
|
||||
<Texture Name="gBombchuShopkeeperSkinTex" OutName="skin" Format="ci8" Width="8" Height="8" Offset="0x30E8" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="gBombchuShopkeeperEarTex" OutName="ear" Format="ci8" Width="8" Height="8" Offset="0x3128" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="gBombchuShopkeeperTattooTex" OutName="tattoo" Format="ci8" Width="32" Height="64" Offset="0x3168" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="gBombchuShopkeeperEyeOpenTex" OutName="eye_open" Format="ci8" Width="32" Height="32" Offset="0x3968" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="gBombchuShopkeeperEyeHalfTex" OutName="eye_half" Format="ci8" Width="32" Height="32" Offset="0x3D68" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="gBombchuShopkeeperEyeClosedTex" OutName="eye_closed" Format="ci8" Width="32" Height="32" Offset="0x4168" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="object_rs_Tex_004568" OutName="tex_00004568" Format="ci8" Width="16" Height="16" Offset="0x4568" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="object_rs_Tex_004668" OutName="tex_00004668" Format="i8" Width="8" Height="16" Offset="0x4668"/>
|
||||
<Texture Name="object_rs_Tex_0046E8" OutName="tex_000046E8" Format="ci8" Width="8" Height="32" Offset="0x46E8" TlutOffset="0x2EE8"/>
|
||||
<Limb Name="object_rs_Limb_0047E8" LimbType="Standard" Offset="0x47E8"/>
|
||||
<Limb Name="object_rs_Limb_0047F4" LimbType="Standard" Offset="0x47F4"/>
|
||||
<Limb Name="object_rs_Limb_004800" LimbType="Standard" Offset="0x4800"/>
|
||||
<Limb Name="object_rs_Limb_00480C" LimbType="Standard" Offset="0x480C"/>
|
||||
<Limb Name="object_rs_Limb_004818" LimbType="Standard" Offset="0x4818"/>
|
||||
<Limb Name="object_rs_Limb_004824" LimbType="Standard" Offset="0x4824"/>
|
||||
<Limb Name="object_rs_Limb_004830" LimbType="Standard" Offset="0x4830"/>
|
||||
<Limb Name="object_rs_Limb_00483C" LimbType="Standard" Offset="0x483C"/>
|
||||
<Skeleton Name="object_rs_Skel_004868" Type="Flex" LimbType="Standard" Offset="0x4868"/>
|
||||
<Texture Name="gBombchuShopkeeperFingersTex" OutName="fingers" Format="ci8" Width="16" Height="16" Offset="0x4568" TlutOffset="0x2EE8"/>
|
||||
<Texture Name="gBombchuShopkeeperVestTex" OutName="vest" Format="i8" Width="8" Height="16" Offset="0x4668"/>
|
||||
<Texture Name="gBombchuShopkeeperTorsoTex" OutName="torso" Format="ci8" Width="8" Height="32" Offset="0x46E8" TlutOffset="0x2EE8"/>
|
||||
|
||||
<Limb Name="gBombchuShopkeeperTorsoLimb" LimbType="Standard" Offset="0x47E8"/>
|
||||
<Limb Name="gBombchuShopkeeperLeftUpperArmLimb" LimbType="Standard" Offset="0x47F4"/>
|
||||
<Limb Name="gBombchuShopkeeperLeftForearmLimb" LimbType="Standard" Offset="0x4800"/>
|
||||
<Limb Name="gBombchuShopkeeperLeftHandLimb" LimbType="Standard" Offset="0x480C"/>
|
||||
<Limb Name="gBombchuShopkeeperRightUpperArmLimb" LimbType="Standard" Offset="0x4818"/>
|
||||
<Limb Name="gBombchuShopkeeperRightForearmLimb" LimbType="Standard" Offset="0x4824"/>
|
||||
<Limb Name="gBombchuShopkeeperRightHandLimb" LimbType="Standard" Offset="0x4830"/>
|
||||
<Limb Name="gBombchuShopkeeperHeadLimb" LimbType="Standard" Offset="0x483C"/>
|
||||
<Skeleton Name="gBombchuShopkeeperSkel" Type="Flex" LimbType="Standard" Offset="0x4868"/>
|
||||
</File>
|
||||
</Root>
|
||||
|
|
|
@ -484,10 +484,11 @@ void func_8003424C(PlayState* play, Vec3f* arg1);
|
|||
void Actor_SetColorFilter(Actor* actor, s16 colorFlag, s16 colorIntensityMax, s16 xluFlag, s16 duration);
|
||||
Hilite* func_800342EC(Vec3f* object, PlayState* play);
|
||||
Hilite* func_8003435C(Vec3f* object, PlayState* play);
|
||||
s32 func_800343CC(PlayState* play, Actor* actor, s16* arg2, f32 interactRange,
|
||||
u16 (*unkFunc1)(PlayState*, Actor*), s16 (*unkFunc2)(PlayState*, Actor*));
|
||||
s16 func_800347E8(s16 arg0);
|
||||
void func_80034A14(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3);
|
||||
s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interactRange,
|
||||
NpcGetTextIdFunc getTextId, NpcUpdateTalkStateFunc updateTalkState);
|
||||
s16 Npc_GetTrackingPresetMaxPlayerYaw(s16 presetIndex);
|
||||
void Npc_TrackPoint(Actor* actor, NpcInteractInfo* interactInfo, s16 presetIndex,
|
||||
s16 trackingMode);
|
||||
void func_80034BA0(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
|
||||
PostLimbDraw postLimbDraw, Actor* actor, s16 alpha);
|
||||
void func_80034CC4(PlayState* play, SkelAnime* skelAnime, OverrideLimbDraw overrideLimbDraw,
|
||||
|
@ -957,7 +958,7 @@ void Map_Destroy(PlayState* play);
|
|||
void Map_Init(PlayState* play);
|
||||
void Minimap_Draw(PlayState* play);
|
||||
void Map_Update(PlayState* play);
|
||||
void Interface_ChangeAlpha(u16 alphaType);
|
||||
void Interface_ChangeHudVisibilityMode(u16 hudVisibilityMode);
|
||||
void Interface_SetSceneRestrictions(PlayState* play);
|
||||
void Inventory_SwapAgeEquipment(void);
|
||||
void Interface_InitHorsebackArchery(PlayState* play);
|
||||
|
|
|
@ -1436,17 +1436,6 @@ typedef struct {
|
|||
/* 0x08 */ f32 morphFrames;
|
||||
} AnimationMinimalInfo; // size = 0xC
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 unk_00;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ s16 unk_04;
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x08 */ Vec3s unk_08;
|
||||
/* 0x0E */ Vec3s unk_0E;
|
||||
/* 0x14 */ f32 unk_14;
|
||||
/* 0x18 */ Vec3f unk_18;
|
||||
/* 0x24 */ s16 unk_24;
|
||||
} struct_80034A14_arg1; // size = 0x28
|
||||
|
||||
// Macros for `EntranceInfo.field`
|
||||
#define ENTRANCE_INFO_CONTINUE_BGM_FLAG (1 << 15)
|
||||
|
|
|
@ -19,8 +19,8 @@ struct Lights;
|
|||
|
||||
typedef void (*ActorFunc)(struct Actor*, struct PlayState*);
|
||||
typedef void (*ActorShadowFunc)(struct Actor*, struct Lights*, struct PlayState*);
|
||||
typedef u16 (*callback1_800343CC)(struct PlayState*, struct Actor*);
|
||||
typedef s16 (*callback2_800343CC)(struct PlayState*, struct Actor*);
|
||||
typedef u16 (*NpcGetTextIdFunc)(struct PlayState*, struct Actor*);
|
||||
typedef s16 (*NpcUpdateTalkStateFunc)(struct PlayState*, struct Actor*);
|
||||
|
||||
typedef struct {
|
||||
Vec3f pos;
|
||||
|
@ -532,4 +532,31 @@ typedef enum {
|
|||
#define UPDBGCHECKINFO_FLAG_6 (1 << 6) // disable water ripples
|
||||
#define UPDBGCHECKINFO_FLAG_7 (1 << 7) // alternate wall check?
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ NPC_TALK_STATE_IDLE, // NPC not currently talking to player
|
||||
/* 0x1 */ NPC_TALK_STATE_TALKING, // NPC is currently talking to player
|
||||
/* 0x2 */ NPC_TALK_STATE_ACTION, // An NPC-defined action triggered in the conversation
|
||||
/* 0x3 */ NPC_TALK_STATE_ITEM_GIVEN // NPC finished giving an item and text box is done
|
||||
} NpcTalkState;
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ NPC_TRACKING_PLAYER_AUTO_TURN, // Determine tracking mode based on player position, see Npc_UpdateAutoTurn
|
||||
/* 0x1 */ NPC_TRACKING_NONE, // Don't track the target (usually the player)
|
||||
/* 0x2 */ NPC_TRACKING_HEAD_AND_TORSO, // Track target by turning the head and the torso
|
||||
/* 0x3 */ NPC_TRACKING_HEAD, // Track target by turning the head
|
||||
/* 0x4 */ NPC_TRACKING_FULL_BODY // Track target by turning the body, torso and head
|
||||
} NpcTrackingMode;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 talkState;
|
||||
/* 0x02 */ s16 trackingMode;
|
||||
/* 0x04 */ s16 autoTurnTimer;
|
||||
/* 0x06 */ s16 autoTurnState;
|
||||
/* 0x08 */ Vec3s headRot;
|
||||
/* 0x0E */ Vec3s torsoRot;
|
||||
/* 0x14 */ f32 yOffset; // Y position offset to add to actor position when calculating angle to target
|
||||
/* 0x18 */ Vec3f trackPos;
|
||||
/* 0x24 */ char unk_24[0x4];
|
||||
} NpcInteractInfo; // size = 0x28
|
||||
|
||||
#endif
|
||||
|
|
|
@ -297,52 +297,55 @@ typedef enum {
|
|||
/* 0x06 */ PLAYER_ANIMTYPE_MAX
|
||||
} PlayerAnimType;
|
||||
|
||||
/**
|
||||
* Temporary names, derived from original animation names in `D_80853914`
|
||||
*/
|
||||
typedef enum {
|
||||
/* 0x00 */ PLAYER_ANIMGROUP_0,
|
||||
/* 0x01 */ PLAYER_ANIMGROUP_1,
|
||||
/* 0x02 */ PLAYER_ANIMGROUP_2,
|
||||
/* 0x03 */ PLAYER_ANIMGROUP_3,
|
||||
/* 0x04 */ PLAYER_ANIMGROUP_4,
|
||||
/* 0x05 */ PLAYER_ANIMGROUP_5,
|
||||
/* 0x06 */ PLAYER_ANIMGROUP_6,
|
||||
/* 0x07 */ PLAYER_ANIMGROUP_7,
|
||||
/* 0x08 */ PLAYER_ANIMGROUP_8,
|
||||
/* 0x09 */ PLAYER_ANIMGROUP_9,
|
||||
/* 0x0A */ PLAYER_ANIMGROUP_10,
|
||||
/* 0x0B */ PLAYER_ANIMGROUP_11,
|
||||
/* 0x0C */ PLAYER_ANIMGROUP_12,
|
||||
/* 0x0D */ PLAYER_ANIMGROUP_13,
|
||||
/* 0x0E */ PLAYER_ANIMGROUP_14,
|
||||
/* 0x0F */ PLAYER_ANIMGROUP_15,
|
||||
/* 0x10 */ PLAYER_ANIMGROUP_16,
|
||||
/* 0x11 */ PLAYER_ANIMGROUP_17,
|
||||
/* 0x12 */ PLAYER_ANIMGROUP_18,
|
||||
/* 0x13 */ PLAYER_ANIMGROUP_19,
|
||||
/* 0x14 */ PLAYER_ANIMGROUP_20,
|
||||
/* 0x15 */ PLAYER_ANIMGROUP_21,
|
||||
/* 0x16 */ PLAYER_ANIMGROUP_22,
|
||||
/* 0x17 */ PLAYER_ANIMGROUP_23,
|
||||
/* 0x18 */ PLAYER_ANIMGROUP_24,
|
||||
/* 0x19 */ PLAYER_ANIMGROUP_25,
|
||||
/* 0x1A */ PLAYER_ANIMGROUP_26,
|
||||
/* 0x1B */ PLAYER_ANIMGROUP_27,
|
||||
/* 0x1C */ PLAYER_ANIMGROUP_28,
|
||||
/* 0x1D */ PLAYER_ANIMGROUP_29,
|
||||
/* 0x1E */ PLAYER_ANIMGROUP_30,
|
||||
/* 0x1F */ PLAYER_ANIMGROUP_31,
|
||||
/* 0x20 */ PLAYER_ANIMGROUP_32,
|
||||
/* 0x21 */ PLAYER_ANIMGROUP_33,
|
||||
/* 0x22 */ PLAYER_ANIMGROUP_34,
|
||||
/* 0x23 */ PLAYER_ANIMGROUP_35,
|
||||
/* 0x24 */ PLAYER_ANIMGROUP_36,
|
||||
/* 0x25 */ PLAYER_ANIMGROUP_37,
|
||||
/* 0x26 */ PLAYER_ANIMGROUP_38,
|
||||
/* 0x27 */ PLAYER_ANIMGROUP_39,
|
||||
/* 0x28 */ PLAYER_ANIMGROUP_40,
|
||||
/* 0x29 */ PLAYER_ANIMGROUP_41,
|
||||
/* 0x2A */ PLAYER_ANIMGROUP_42,
|
||||
/* 0x2B */ PLAYER_ANIMGROUP_43,
|
||||
/* 0x2C */ PLAYER_ANIMGROUP_44,
|
||||
/* 0x00 */ PLAYER_ANIMGROUP_wait,
|
||||
/* 0x01 */ PLAYER_ANIMGROUP_walk,
|
||||
/* 0x02 */ PLAYER_ANIMGROUP_run,
|
||||
/* 0x03 */ PLAYER_ANIMGROUP_damage_run,
|
||||
/* 0x04 */ PLAYER_ANIMGROUP_heavy_run,
|
||||
/* 0x05 */ PLAYER_ANIMGROUP_waitL,
|
||||
/* 0x06 */ PLAYER_ANIMGROUP_waitR,
|
||||
/* 0x07 */ PLAYER_ANIMGROUP_wait2waitR,
|
||||
/* 0x08 */ PLAYER_ANIMGROUP_normal2fighter,
|
||||
/* 0x09 */ PLAYER_ANIMGROUP_doorA_free,
|
||||
/* 0x0A */ PLAYER_ANIMGROUP_doorA,
|
||||
/* 0x0B */ PLAYER_ANIMGROUP_doorB_free,
|
||||
/* 0x0C */ PLAYER_ANIMGROUP_doorB,
|
||||
/* 0x0D */ PLAYER_ANIMGROUP_carryB,
|
||||
/* 0x0E */ PLAYER_ANIMGROUP_landing,
|
||||
/* 0x0F */ PLAYER_ANIMGROUP_short_landing,
|
||||
/* 0x10 */ PLAYER_ANIMGROUP_landing_roll,
|
||||
/* 0x11 */ PLAYER_ANIMGROUP_hip_down,
|
||||
/* 0x12 */ PLAYER_ANIMGROUP_walk_endL,
|
||||
/* 0x13 */ PLAYER_ANIMGROUP_walk_endR,
|
||||
/* 0x14 */ PLAYER_ANIMGROUP_defense,
|
||||
/* 0x15 */ PLAYER_ANIMGROUP_defense_wait,
|
||||
/* 0x16 */ PLAYER_ANIMGROUP_defense_end,
|
||||
/* 0x17 */ PLAYER_ANIMGROUP_side_walk,
|
||||
/* 0x18 */ PLAYER_ANIMGROUP_side_walkL,
|
||||
/* 0x19 */ PLAYER_ANIMGROUP_side_walkR,
|
||||
/* 0x1A */ PLAYER_ANIMGROUP_45_turn,
|
||||
/* 0x1B */ PLAYER_ANIMGROUP_waitL2wait,
|
||||
/* 0x1C */ PLAYER_ANIMGROUP_waitR2wait,
|
||||
/* 0x1D */ PLAYER_ANIMGROUP_throw,
|
||||
/* 0x1E */ PLAYER_ANIMGROUP_put,
|
||||
/* 0x1F */ PLAYER_ANIMGROUP_back_walk,
|
||||
/* 0x20 */ PLAYER_ANIMGROUP_check,
|
||||
/* 0x21 */ PLAYER_ANIMGROUP_check_wait,
|
||||
/* 0x22 */ PLAYER_ANIMGROUP_check_end,
|
||||
/* 0x23 */ PLAYER_ANIMGROUP_pull_start,
|
||||
/* 0x24 */ PLAYER_ANIMGROUP_pulling,
|
||||
/* 0x25 */ PLAYER_ANIMGROUP_pull_end,
|
||||
/* 0x26 */ PLAYER_ANIMGROUP_fall_up,
|
||||
/* 0x27 */ PLAYER_ANIMGROUP_jump_climb_hold,
|
||||
/* 0x28 */ PLAYER_ANIMGROUP_jump_climb_wait,
|
||||
/* 0x29 */ PLAYER_ANIMGROUP_jump_climb_up,
|
||||
/* 0x2A */ PLAYER_ANIMGROUP_down_slope_slip_end,
|
||||
/* 0x2B */ PLAYER_ANIMGROUP_up_slope_slip_end,
|
||||
/* 0x2C */ PLAYER_ANIMGROUP_nwait,
|
||||
/* 0x2D */ PLAYER_ANIMGROUP_MAX
|
||||
} PlayerAnimGroup;
|
||||
|
||||
|
|
|
@ -4,6 +4,28 @@
|
|||
#include "ultra64.h"
|
||||
#include "z64math.h"
|
||||
|
||||
// `_FORCE` means that this request will respond to `forceRisingButtonAlphas`.
|
||||
// If set, the buttons will also raise alphas but will also account for disabled buttons
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ HUD_VISIBILITY_NO_CHANGE,
|
||||
/* 1 */ HUD_VISIBILITY_NOTHING,
|
||||
/* 2 */ HUD_VISIBILITY_NOTHING_ALT, // Identical to HUD_VISIBILITY_NOTHING
|
||||
/* 3 */ HUD_VISIBILITY_HEARTS_FORCE, // See above
|
||||
/* 4 */ HUD_VISIBILITY_A,
|
||||
/* 5 */ HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE, // See above
|
||||
/* 6 */ HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE, // See above
|
||||
/* 7 */ HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS, // Only raises button alphas if not disabled
|
||||
/* 8 */ HUD_VISIBILITY_B,
|
||||
/* 9 */ HUD_VISIBILITY_HEARTS_MAGIC,
|
||||
/* 10 */ HUD_VISIBILITY_B_ALT, // Identical to HUD_VISIBILITY_B
|
||||
/* 11 */ HUD_VISIBILITY_HEARTS,
|
||||
/* 12 */ HUD_VISIBILITY_A_B_MINIMAP,
|
||||
/* 13 */ HUD_VISIBILITY_HEARTS_MAGIC_FORCE, // See above
|
||||
/* 50 */ HUD_VISIBILITY_ALL = 50, // Only raises button alphas if not disabled
|
||||
/* 52 */ HUD_VISIBILITY_NOTHING_INSTANT = 52
|
||||
} HudVisibilityMode;
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ MAGIC_STATE_IDLE, // Regular gameplay
|
||||
/* 0x1 */ MAGIC_STATE_CONSUME_SETUP, // Sets the speed at which magic border flashes
|
||||
|
@ -246,11 +268,11 @@ typedef struct {
|
|||
/* 0x13E0 */ u8 seqId;
|
||||
/* 0x13E1 */ u8 natureAmbienceId;
|
||||
/* 0x13E2 */ u8 buttonStatus[5];
|
||||
/* 0x13E7 */ u8 unk_13E7; // alpha related
|
||||
/* 0x13E8 */ u16 unk_13E8; // alpha type?
|
||||
/* 0x13EA */ u16 unk_13EA; // also alpha type?
|
||||
/* 0x13EC */ u16 unk_13EC; // alpha type counter?
|
||||
/* 0x13EE */ u16 unk_13EE; // previous alpha type?
|
||||
/* 0x13E7 */ u8 forceRisingButtonAlphas; // if btn alphas are updated through Interface_DimButtonAlphas, instead update them through Interface_RaiseButtonAlphas
|
||||
/* 0x13E8 */ u16 nextHudVisibilityMode; // triggers the hud to change visibility mode to the requested value. Reset to HUD_VISIBILITY_NO_CHANGE when target is reached
|
||||
/* 0x13EA */ u16 hudVisibilityMode; // current hud visibility mode
|
||||
/* 0x13EC */ u16 hudVisibilityModeTimer; // number of frames in the transition to a new hud visibility mode. Used to step alpha
|
||||
/* 0x13EE */ u16 prevHudVisibilityMode; // used to store and recover hud visibility mode for pause menu and text boxes
|
||||
/* 0x13F0 */ s16 magicState; // determines magic meter behavior on each frame
|
||||
/* 0x13F2 */ s16 prevMagicState; // used to resume the previous state after adding or filling magic
|
||||
/* 0x13F4 */ s16 magicCapacity; // maximum magic available
|
||||
|
|
|
@ -2136,14 +2136,14 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
sDbCamAnim.unk_04 = 0;
|
||||
} else if (CHECK_BTN_ALL(sPlay->state.input[DBCAM_CONTROLLER_PORT].press.button, BTN_CLEFT)) {
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
D_8016110C = 0;
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (func_800B91B0(cam, dbCamera) == 0) {
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
@ -2302,7 +2302,7 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
|||
sDbCamAnim.unk_04 = 0.0f;
|
||||
sDbCamAnim.unk_0A = 1;
|
||||
sDbCamAnim.unk_0C = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
Letterbox_SetSizeTarget(32);
|
||||
D_8016110C = 0;
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
|
|
@ -1991,18 +1991,30 @@ void Actor_InitContext(PlayState* play, ActorContext* actorCtx, ActorEntry* play
|
|||
func_8002FA60(play);
|
||||
}
|
||||
|
||||
u32 D_80116068[ACTORCAT_MAX] = {
|
||||
u32 sCategoryFreezeMasks[ACTORCAT_MAX] = {
|
||||
// ACTORCAT_SWITCH
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
// ACTORCAT_BG
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
// ACTORCAT_PLAYER
|
||||
0,
|
||||
// ACTORCAT_EXPLOSIVE
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_10 | PLAYER_STATE1_28,
|
||||
// ACTORCAT_NPC
|
||||
PLAYER_STATE1_7,
|
||||
// ACTORCAT_ENEMY
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29,
|
||||
// ACTORCAT_PROP
|
||||
PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
// ACTORCAT_ITEMACTION
|
||||
0,
|
||||
// ACTORCAT_MISC
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28 | PLAYER_STATE1_29,
|
||||
// ACTORCAT_BOSS
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_10 | PLAYER_STATE1_28,
|
||||
// ACTORCAT_DOOR
|
||||
0,
|
||||
// ACTORCAT_CHEST
|
||||
PLAYER_STATE1_6 | PLAYER_STATE1_7 | PLAYER_STATE1_28,
|
||||
};
|
||||
|
||||
|
@ -2010,9 +2022,9 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
Actor* refActor;
|
||||
Actor* actor;
|
||||
Player* player;
|
||||
u32* sp80;
|
||||
u32 unkFlag;
|
||||
u32 unkCondition;
|
||||
u32* categoryFreezeMaskP;
|
||||
u32 requiredActorFlag;
|
||||
u32 canFreezeCategory;
|
||||
Actor* sp74;
|
||||
ActorEntry* actorEntry;
|
||||
s32 i;
|
||||
|
@ -2025,7 +2037,7 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
}
|
||||
|
||||
sp74 = NULL;
|
||||
unkFlag = 0;
|
||||
requiredActorFlag = 0;
|
||||
|
||||
if (play->numActorEntries != 0) {
|
||||
actorEntry = &play->actorEntryList[0];
|
||||
|
@ -2046,18 +2058,18 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
refActor->world.pos.z, 0, 0, 0, 1);
|
||||
}
|
||||
|
||||
sp80 = &D_80116068[0];
|
||||
categoryFreezeMaskP = &sCategoryFreezeMasks[0];
|
||||
|
||||
if (player->stateFlags2 & PLAYER_STATE2_27) {
|
||||
unkFlag = ACTOR_FLAG_25;
|
||||
requiredActorFlag = ACTOR_FLAG_25;
|
||||
}
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_6) && ((player->actor.textId & 0xFF00) != 0x600)) {
|
||||
sp74 = player->targetActor;
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++, sp80++) {
|
||||
unkCondition = (*sp80 & player->stateFlags1);
|
||||
for (i = 0; i < ARRAY_COUNT(actorCtx->actorLists); i++, categoryFreezeMaskP++) {
|
||||
canFreezeCategory = (*categoryFreezeMaskP & player->stateFlags1);
|
||||
|
||||
actor = actorCtx->actorLists[i].head;
|
||||
while (actor != NULL) {
|
||||
|
@ -2077,9 +2089,10 @@ void Actor_UpdateAll(PlayState* play, ActorContext* actorCtx) {
|
|||
} else if (!Object_IsLoaded(&play->objectCtx, actor->objBankIndex)) {
|
||||
Actor_Kill(actor);
|
||||
actor = actor->next;
|
||||
} else if ((unkFlag && !(actor->flags & unkFlag)) ||
|
||||
(!unkFlag && unkCondition && (sp74 != actor) && (actor != player->naviActor) &&
|
||||
(actor != player->heldActor) && (&player->actor != actor->parent))) {
|
||||
} else if ((requiredActorFlag && !(actor->flags & requiredActorFlag)) ||
|
||||
(!requiredActorFlag && canFreezeCategory &&
|
||||
!((sp74 == actor) || (actor == player->naviActor) || (actor == player->heldActor) ||
|
||||
(&player->actor == actor->parent)))) {
|
||||
CollisionCheck_ResetDamage(&actor->colChkInfo);
|
||||
actor = actor->next;
|
||||
} else if (actor->update == NULL) {
|
||||
|
@ -3646,24 +3659,40 @@ Hilite* func_8003435C(Vec3f* object, PlayState* play) {
|
|||
return func_8002EB44(object, &play->view.eye, &lightDir, play->state.gfxCtx);
|
||||
}
|
||||
|
||||
s32 func_800343CC(PlayState* play, Actor* actor, s16* arg2, f32 interactRange, callback1_800343CC unkFunc1,
|
||||
callback2_800343CC unkFunc2) {
|
||||
/**
|
||||
* Updates NPC talking state. Checks for a talk request and updates
|
||||
* the talkState parameter when a dialog is ongoing. Otherwise checks if
|
||||
* the actor is onscreen, advertises the interaction in a range and sets
|
||||
* the current text id if necessary.
|
||||
*
|
||||
* The talk state values are defined in the NpcTalkState enum.
|
||||
*
|
||||
* @see NpcTalkState
|
||||
*
|
||||
* @param[in,out] talkState Talk state
|
||||
* @param interactRange The interact (talking) range for the actor
|
||||
* @param getTextId Callback for getting the next text id
|
||||
* @param updateTalkState Callback for getting the next talkState value
|
||||
* @return True if a new dialog was started (player talked to the actor). False otherwise.
|
||||
*/
|
||||
s32 Npc_UpdateTalking(PlayState* play, Actor* actor, s16* talkState, f32 interactRange, NpcGetTextIdFunc getTextId,
|
||||
NpcUpdateTalkStateFunc updateTalkState) {
|
||||
s16 x;
|
||||
s16 y;
|
||||
|
||||
if (Actor_ProcessTalkRequest(actor, play)) {
|
||||
*arg2 = 1;
|
||||
*talkState = NPC_TALK_STATE_TALKING;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (*arg2 != 0) {
|
||||
*arg2 = unkFunc2(play, actor);
|
||||
if (*talkState != NPC_TALK_STATE_IDLE) {
|
||||
*talkState = updateTalkState(play, actor);
|
||||
return false;
|
||||
}
|
||||
|
||||
Actor_GetScreenPos(play, actor, &x, &y);
|
||||
|
||||
if ((x < 0) || (x > SCREEN_WIDTH) || (y < 0) || (y > SCREEN_HEIGHT)) {
|
||||
// Actor is offscreen
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -3671,162 +3700,242 @@ s32 func_800343CC(PlayState* play, Actor* actor, s16* arg2, f32 interactRange, c
|
|||
return false;
|
||||
}
|
||||
|
||||
actor->textId = unkFunc1(play, actor);
|
||||
actor->textId = getTextId(play, actor);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 unk_00;
|
||||
/* 0x02 */ s16 unk_02;
|
||||
/* 0x04 */ s16 unk_04;
|
||||
/* 0x06 */ s16 unk_06;
|
||||
/* 0x08 */ s16 unk_08;
|
||||
/* 0x0A */ s16 unk_0A;
|
||||
/* 0x0C */ u8 unk_0C;
|
||||
} struct_80116130_0; // size = 0x10
|
||||
/* 0x00 */ s16 maxHeadYaw;
|
||||
/* 0x02 */ s16 minHeadPitch;
|
||||
/* 0x04 */ s16 maxHeadPitch;
|
||||
/* 0x06 */ s16 maxTorsoYaw;
|
||||
/* 0x08 */ s16 minTorsoPitch;
|
||||
/* 0x0A */ s16 maxTorsoPitch;
|
||||
/* 0x0C */ u8 rotateYaw;
|
||||
} NpcTrackingRotLimits; // size = 0x10
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ struct_80116130_0 sub_00;
|
||||
/* 0x10 */ f32 unk_10;
|
||||
/* 0x14 */ s16 unk_14;
|
||||
} struct_80116130; // size = 0x18
|
||||
/* 0x00 */ NpcTrackingRotLimits rotLimits;
|
||||
// Fields specific to NPC_TRACKING_PLAYER_AUTO_TURN mode
|
||||
/* 0x10 */ f32 autoTurnDistanceRange; // Max distance to player to enable tracking and auto-turn
|
||||
/* 0x14 */ s16 maxYawForPlayerTracking; // Player is tracked if within this yaw
|
||||
} NpcTrackingParams; // size = 0x18
|
||||
|
||||
static struct_80116130 D_80116130[] = {
|
||||
{ { 0x2AA8, 0xF1C8, 0x18E2, 0x1554, 0x0000, 0x0000, 1 }, 170.0f, 0x3FFC },
|
||||
{ { 0x2AA8, 0xEAAC, 0x1554, 0x1554, 0xF8E4, 0x0E38, 1 }, 170.0f, 0x3FFC },
|
||||
{ { 0x31C4, 0xE390, 0x0E38, 0x0E38, 0xF1C8, 0x071C, 1 }, 170.0f, 0x3FFC },
|
||||
{ { 0x1554, 0xF1C8, 0x0000, 0x071C, 0xF8E4, 0x0000, 1 }, 170.0f, 0x3FFC },
|
||||
{ { 0x2AA8, 0xF8E4, 0x071C, 0x0E38, 0xD558, 0x2AA8, 1 }, 170.0f, 0x3FFC },
|
||||
{ { 0x0000, 0xE390, 0x2AA8, 0x3FFC, 0xF1C8, 0x0E38, 1 }, 170.0f, 0x3FFC },
|
||||
{ { 0x2AA8, 0xF1C8, 0x0E38, 0x0E38, 0x0000, 0x0000, 1 }, 0.0f, 0x0000 },
|
||||
{ { 0x2AA8, 0xF1C8, 0x0000, 0x0E38, 0x0000, 0x1C70, 1 }, 0.0f, 0x0000 },
|
||||
{ { 0x2AA8, 0xF1C8, 0xF1C8, 0x0000, 0x0000, 0x0000, 1 }, 0.0f, 0x0000 },
|
||||
{ { 0x071C, 0xF1C8, 0x0E38, 0x1C70, 0x0000, 0x0000, 1 }, 0.0f, 0x0000 },
|
||||
{ { 0x0E38, 0xF1C8, 0x0000, 0x1C70, 0x0000, 0x0E38, 1 }, 0.0f, 0x0000 },
|
||||
{ { 0x2AA8, 0xE390, 0x1C70, 0x0E38, 0xF1C8, 0x0E38, 1 }, 0.0f, 0x0000 },
|
||||
{ { 0x18E2, 0xF1C8, 0x0E38, 0x0E38, 0x0000, 0x0000, 1 }, 0.0f, 0x0000 },
|
||||
/**
|
||||
* Npc tracking angle limit presets to use with Npc_TrackPoint.
|
||||
*
|
||||
* @see Npc_TrackPoint
|
||||
*/
|
||||
static NpcTrackingParams sNpcTrackingPresets[] = {
|
||||
{ { 0x2AA8, -0x0E38, 0x18E2, 0x1554, 0x0000, 0x0000, true }, 170.0f, 0x3FFC },
|
||||
{ { 0x2AA8, -0x1554, 0x1554, 0x1554, -0x071C, 0x0E38, true }, 170.0f, 0x3FFC },
|
||||
{ { 0x31C4, -0x1C70, 0x0E38, 0x0E38, -0x0E38, 0x071C, true }, 170.0f, 0x3FFC },
|
||||
{ { 0x1554, -0x0E38, 0x0000, 0x071C, -0x071C, 0x0000, true }, 170.0f, 0x3FFC },
|
||||
{ { 0x2AA8, -0x071C, 0x071C, 0x0E38, -0x2AA8, 0x2AA8, true }, 170.0f, 0x3FFC },
|
||||
{ { 0x0000, -0x1C70, 0x2AA8, 0x3FFC, -0x0E38, 0x0E38, true }, 170.0f, 0x3FFC },
|
||||
{ { 0x2AA8, -0x0E38, 0x0E38, 0x0E38, 0x0000, 0x0000, true }, 0.0f, 0x0000 },
|
||||
{ { 0x2AA8, -0x0E38, 0x0000, 0x0E38, 0x0000, 0x1C70, true }, 0.0f, 0x0000 },
|
||||
{ { 0x2AA8, -0x0E38, -0x0E38, 0x0000, 0x0000, 0x0000, true }, 0.0f, 0x0000 },
|
||||
{ { 0x071C, -0x0E38, 0x0E38, 0x1C70, 0x0000, 0x0000, true }, 0.0f, 0x0000 },
|
||||
{ { 0x0E38, -0x0E38, 0x0000, 0x1C70, 0x0000, 0x0E38, true }, 0.0f, 0x0000 },
|
||||
{ { 0x2AA8, -0x1C70, 0x1C70, 0x0E38, -0x0E38, 0x0E38, true }, 0.0f, 0x0000 },
|
||||
{ { 0x18E2, -0x0E38, 0x0E38, 0x0E38, 0x0000, 0x0000, true }, 0.0f, 0x0000 },
|
||||
};
|
||||
|
||||
void func_800344BC(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3, s16 arg4, s16 arg5, s16 arg6, s16 arg7,
|
||||
u8 arg8) {
|
||||
s16 sp46;
|
||||
s16 sp44;
|
||||
s16 temp2;
|
||||
s16 sp40;
|
||||
s16 temp1;
|
||||
Vec3f sp30;
|
||||
/**
|
||||
* Smoothly turns the actor's whole body and updates torso and head rotations in
|
||||
* NpcInteractInfo so that the actor tracks the point specified in NpcInteractInfo.trackPos.
|
||||
* Rotations are limited to specified angles.
|
||||
*
|
||||
* Head and torso rotation angles are determined by calculating the pitch and yaw
|
||||
* from the actor position to the given target position.
|
||||
*
|
||||
* The y position of the actor is offset by NpcInteractInfo.yOffset
|
||||
* before calculating the angles. It can be used to configure the height difference
|
||||
* between the actor and the target.
|
||||
*
|
||||
* @param maxHeadYaw maximum head yaw difference from neutral position
|
||||
* @param maxHeadPitch maximum head pitch angle
|
||||
* @param minHeadPitch minimum head pitch angle
|
||||
* @param maxTorsoYaw maximum torso yaw difference from neutral position
|
||||
* @param maxTorsoPitch maximum torso pitch angle
|
||||
* @param minTorsoPitch minimum torso pitch angle
|
||||
* @param rotateYaw if true, the actor's yaw (shape.rot.y) is updated to turn the actor's whole body
|
||||
*/
|
||||
void Npc_TrackPointWithLimits(Actor* actor, NpcInteractInfo* interactInfo, s16 maxHeadYaw, s16 maxHeadPitch,
|
||||
s16 minHeadPitch, s16 maxTorsoYaw, s16 maxTorsoPitch, s16 minTorsoPitch, u8 rotateYaw) {
|
||||
s16 pitchTowardsTarget;
|
||||
s16 yawTowardsTarget;
|
||||
s16 torsoPitch;
|
||||
s16 bodyYawDiff;
|
||||
s16 temp;
|
||||
Vec3f offsetActorPos;
|
||||
|
||||
sp30.x = actor->world.pos.x;
|
||||
sp30.y = actor->world.pos.y + arg1->unk_14;
|
||||
sp30.z = actor->world.pos.z;
|
||||
offsetActorPos.x = actor->world.pos.x;
|
||||
offsetActorPos.y = actor->world.pos.y + interactInfo->yOffset;
|
||||
offsetActorPos.z = actor->world.pos.z;
|
||||
|
||||
sp46 = Math_Vec3f_Pitch(&sp30, &arg1->unk_18);
|
||||
sp44 = Math_Vec3f_Yaw(&sp30, &arg1->unk_18);
|
||||
sp40 = Math_Vec3f_Yaw(&actor->world.pos, &arg1->unk_18) - actor->shape.rot.y;
|
||||
pitchTowardsTarget = Math_Vec3f_Pitch(&offsetActorPos, &interactInfo->trackPos);
|
||||
yawTowardsTarget = Math_Vec3f_Yaw(&offsetActorPos, &interactInfo->trackPos);
|
||||
bodyYawDiff = Math_Vec3f_Yaw(&actor->world.pos, &interactInfo->trackPos) - actor->shape.rot.y;
|
||||
|
||||
temp1 = CLAMP(sp40, -arg2, arg2);
|
||||
Math_SmoothStepToS(&arg1->unk_08.y, temp1, 6, 2000, 1);
|
||||
temp = CLAMP(bodyYawDiff, -maxHeadYaw, maxHeadYaw);
|
||||
Math_SmoothStepToS(&interactInfo->headRot.y, temp, 6, 2000, 1);
|
||||
|
||||
temp1 = (ABS(sp40) >= 0x8000) ? 0 : ABS(sp40);
|
||||
arg1->unk_08.y = CLAMP(arg1->unk_08.y, -temp1, temp1);
|
||||
temp = (ABS(bodyYawDiff) >= 0x8000) ? 0 : ABS(bodyYawDiff);
|
||||
interactInfo->headRot.y = CLAMP(interactInfo->headRot.y, -temp, temp);
|
||||
|
||||
sp40 -= arg1->unk_08.y;
|
||||
bodyYawDiff -= interactInfo->headRot.y;
|
||||
|
||||
temp1 = CLAMP(sp40, -arg5, arg5);
|
||||
Math_SmoothStepToS(&arg1->unk_0E.y, temp1, 6, 2000, 1);
|
||||
temp = CLAMP(bodyYawDiff, -maxTorsoYaw, maxTorsoYaw);
|
||||
Math_SmoothStepToS(&interactInfo->torsoRot.y, temp, 6, 2000, 1);
|
||||
|
||||
temp1 = (ABS(sp40) >= 0x8000) ? 0 : ABS(sp40);
|
||||
arg1->unk_0E.y = CLAMP(arg1->unk_0E.y, -temp1, temp1);
|
||||
temp = (ABS(bodyYawDiff) >= 0x8000) ? 0 : ABS(bodyYawDiff);
|
||||
interactInfo->torsoRot.y = CLAMP(interactInfo->torsoRot.y, -temp, temp);
|
||||
|
||||
if (arg8) {
|
||||
Math_SmoothStepToS(&actor->shape.rot.y, sp44, 6, 2000, 1);
|
||||
if (rotateYaw) {
|
||||
Math_SmoothStepToS(&actor->shape.rot.y, yawTowardsTarget, 6, 2000, 1);
|
||||
}
|
||||
|
||||
temp1 = CLAMP(sp46, arg4, (s16)(u16)arg3);
|
||||
Math_SmoothStepToS(&arg1->unk_08.x, temp1, 6, 2000, 1);
|
||||
temp = CLAMP(pitchTowardsTarget, minHeadPitch, (s16)(u16)maxHeadPitch);
|
||||
Math_SmoothStepToS(&interactInfo->headRot.x, temp, 6, 2000, 1);
|
||||
|
||||
temp2 = sp46 - arg1->unk_08.x;
|
||||
torsoPitch = pitchTowardsTarget - interactInfo->headRot.x;
|
||||
|
||||
temp1 = CLAMP(temp2, arg7, arg6);
|
||||
Math_SmoothStepToS(&arg1->unk_0E.x, temp1, 6, 2000, 1);
|
||||
temp = CLAMP(torsoPitch, minTorsoPitch, maxTorsoPitch);
|
||||
Math_SmoothStepToS(&interactInfo->torsoRot.x, temp, 6, 2000, 1);
|
||||
}
|
||||
|
||||
s16 func_800347E8(s16 arg0) {
|
||||
return D_80116130[arg0].unk_14;
|
||||
s16 Npc_GetTrackingPresetMaxPlayerYaw(s16 presetIndex) {
|
||||
return sNpcTrackingPresets[presetIndex].maxYawForPlayerTracking;
|
||||
}
|
||||
|
||||
s16 func_80034810(Actor* actor, struct_80034A14_arg1* arg1, f32 arg2, s16 arg3, s16 arg4) {
|
||||
/**
|
||||
* Handles NPC tracking modes and auto-turning towards the player when
|
||||
* NPC_TRACKING_PLAYER_AUTO_TURN tracking mode is used.
|
||||
*
|
||||
* Returns a tracking mode that will determine which actor limbs
|
||||
* will be rotated towards the target.
|
||||
*
|
||||
* When the player is behind the actor (i.e. not in the yaw range in front of the actor
|
||||
* defined by maxYawForPlayerTracking), the actor will start an auto-turn sequence:
|
||||
* - look forward for 30-60 frames
|
||||
* - turn head to look at the player for 10-20 frames
|
||||
* - look forward for 30-60 frames
|
||||
* - turn the entire body to face the player
|
||||
*
|
||||
* @param distanceRange Max distance to player that tracking and auto-turning will be active for
|
||||
* @param maxYawForPlayerTracking Maximum angle for tracking the player.
|
||||
* @param trackingMode The tracking mode selected by the actor. If this is not
|
||||
* NPC_TRACKING_PLAYER_AUTO_TURN this function does nothing
|
||||
*
|
||||
* @return The tracking mode (NpcTrackingMode) to use for the current frame.
|
||||
*/
|
||||
s16 Npc_UpdateAutoTurn(Actor* actor, NpcInteractInfo* interactInfo, f32 distanceRange, s16 maxYawForPlayerTracking,
|
||||
s16 trackingMode) {
|
||||
|
||||
s32 pad;
|
||||
s16 var;
|
||||
s16 abs_var;
|
||||
s16 yaw;
|
||||
s16 yawDiff;
|
||||
|
||||
if (arg4 != 0) {
|
||||
return arg4;
|
||||
if (trackingMode != NPC_TRACKING_PLAYER_AUTO_TURN) {
|
||||
return trackingMode;
|
||||
}
|
||||
|
||||
if (arg1->unk_00 != 0) {
|
||||
return 4;
|
||||
if (interactInfo->talkState != NPC_TALK_STATE_IDLE) {
|
||||
// When talking, always fully turn to face the player
|
||||
return NPC_TRACKING_FULL_BODY;
|
||||
}
|
||||
|
||||
if (arg2 < Math_Vec3f_DistXYZ(&actor->world.pos, &arg1->unk_18)) {
|
||||
arg1->unk_04 = 0;
|
||||
arg1->unk_06 = 0;
|
||||
return 1;
|
||||
if (distanceRange < Math_Vec3f_DistXYZ(&actor->world.pos, &interactInfo->trackPos)) {
|
||||
// Player is too far away, do not track
|
||||
interactInfo->autoTurnTimer = 0;
|
||||
interactInfo->autoTurnState = 0;
|
||||
return NPC_TRACKING_NONE;
|
||||
}
|
||||
|
||||
var = Math_Vec3f_Yaw(&actor->world.pos, &arg1->unk_18);
|
||||
abs_var = ABS((s16)((f32)var - actor->shape.rot.y));
|
||||
if (arg3 >= abs_var) {
|
||||
arg1->unk_04 = 0;
|
||||
arg1->unk_06 = 0;
|
||||
return 2;
|
||||
yaw = Math_Vec3f_Yaw(&actor->world.pos, &interactInfo->trackPos);
|
||||
yawDiff = ABS((s16)((f32)yaw - actor->shape.rot.y));
|
||||
if (maxYawForPlayerTracking >= yawDiff) {
|
||||
// Player is in front of the actor, track with the head and the torso
|
||||
interactInfo->autoTurnTimer = 0;
|
||||
interactInfo->autoTurnState = 0;
|
||||
return NPC_TRACKING_HEAD_AND_TORSO;
|
||||
}
|
||||
|
||||
if (DECR(arg1->unk_04) != 0) {
|
||||
return arg1->unk_02;
|
||||
// Player is behind the actor, run the auto-turn sequence.
|
||||
|
||||
if (DECR(interactInfo->autoTurnTimer) != 0) {
|
||||
// While the timer is still running, return the previous tracking mode
|
||||
return interactInfo->trackingMode;
|
||||
}
|
||||
|
||||
switch (arg1->unk_06) {
|
||||
switch (interactInfo->autoTurnState) {
|
||||
case 0:
|
||||
case 2:
|
||||
arg1->unk_04 = Rand_S16Offset(30, 30);
|
||||
arg1->unk_06++;
|
||||
return 1;
|
||||
// Just stand still, not tracking the player
|
||||
interactInfo->autoTurnTimer = Rand_S16Offset(30, 30);
|
||||
interactInfo->autoTurnState++;
|
||||
return NPC_TRACKING_NONE;
|
||||
case 1:
|
||||
arg1->unk_04 = Rand_S16Offset(10, 10);
|
||||
arg1->unk_06++;
|
||||
return 3;
|
||||
// Glance at the player by only turning the head
|
||||
interactInfo->autoTurnTimer = Rand_S16Offset(10, 10);
|
||||
interactInfo->autoTurnState++;
|
||||
return NPC_TRACKING_HEAD;
|
||||
}
|
||||
|
||||
return 4;
|
||||
// Auto-turn sequence complete, turn towards the player
|
||||
return NPC_TRACKING_FULL_BODY;
|
||||
}
|
||||
|
||||
void func_80034A14(Actor* actor, struct_80034A14_arg1* arg1, s16 arg2, s16 arg3) {
|
||||
struct_80116130_0 sp38;
|
||||
/**
|
||||
* Rotates the actor's whole body, torso and head tracking the point specified in NpcInteractInfo.trackPos.
|
||||
* Uses angle limits from a preset selected from from sNpcTrackingPresets.
|
||||
*
|
||||
* The trackingMode parameter controls whether the head and torso are turned towards the target.
|
||||
* If not, they are smoothly turned towards zero. Setting the parameter to NPC_TRACKING_FULL_BODY
|
||||
* causes the actor's whole body to be rotated to face the target.
|
||||
*
|
||||
* If NPC_TRACKING_PLAYER_AUTO_TURN is used, the actor will track the player with its head and torso as long
|
||||
* as the player is in front of the actor (within a yaw angle specified in the option preset).
|
||||
* If the player is outside of this angle, the actor will turn to face the player after a while.
|
||||
*
|
||||
* @see Npc_UpdateAutoTurn
|
||||
* @see sNpcTrackingPresets
|
||||
* @see NpcTrackingMode
|
||||
*
|
||||
* @param presetIndex The index to a preset in sNpcTrackingPresets
|
||||
* @param trackingMode A value from NpcTrackingMode enum
|
||||
*/
|
||||
void Npc_TrackPoint(Actor* actor, NpcInteractInfo* interactInfo, s16 presetIndex, s16 trackingMode) {
|
||||
NpcTrackingRotLimits rotLimits;
|
||||
|
||||
arg1->unk_02 = func_80034810(actor, arg1, D_80116130[arg2].unk_10, D_80116130[arg2].unk_14, arg3);
|
||||
interactInfo->trackingMode =
|
||||
Npc_UpdateAutoTurn(actor, interactInfo, sNpcTrackingPresets[presetIndex].autoTurnDistanceRange,
|
||||
sNpcTrackingPresets[presetIndex].maxYawForPlayerTracking, trackingMode);
|
||||
|
||||
sp38 = D_80116130[arg2].sub_00;
|
||||
rotLimits = sNpcTrackingPresets[presetIndex].rotLimits;
|
||||
|
||||
switch (arg1->unk_02) {
|
||||
case 1:
|
||||
sp38.unk_00 = 0;
|
||||
sp38.unk_04 = 0;
|
||||
sp38.unk_02 = 0;
|
||||
switch (interactInfo->trackingMode) {
|
||||
case NPC_TRACKING_NONE:
|
||||
rotLimits.maxHeadYaw = 0;
|
||||
rotLimits.maxHeadPitch = 0;
|
||||
rotLimits.minHeadPitch = 0;
|
||||
FALLTHROUGH;
|
||||
case 3:
|
||||
sp38.unk_06 = 0;
|
||||
sp38.unk_0A = 0;
|
||||
sp38.unk_08 = 0;
|
||||
case NPC_TRACKING_HEAD:
|
||||
rotLimits.maxTorsoYaw = 0;
|
||||
rotLimits.maxTorsoPitch = 0;
|
||||
rotLimits.minTorsoPitch = 0;
|
||||
FALLTHROUGH;
|
||||
case 2:
|
||||
sp38.unk_0C = 0;
|
||||
case NPC_TRACKING_HEAD_AND_TORSO:
|
||||
rotLimits.rotateYaw = false;
|
||||
break;
|
||||
}
|
||||
|
||||
func_800344BC(actor, arg1, sp38.unk_00, sp38.unk_04, sp38.unk_02, sp38.unk_06, sp38.unk_0A, sp38.unk_08,
|
||||
sp38.unk_0C);
|
||||
Npc_TrackPointWithLimits(actor, interactInfo, rotLimits.maxHeadYaw, rotLimits.maxHeadPitch, rotLimits.minHeadPitch,
|
||||
rotLimits.maxTorsoYaw, rotLimits.maxTorsoPitch, rotLimits.minTorsoPitch,
|
||||
rotLimits.rotateYaw);
|
||||
}
|
||||
|
||||
Gfx* func_80034B28(GraphicsContext* gfxCtx) {
|
||||
|
|
|
@ -791,11 +791,11 @@ void Camera_UpdateInterface(s16 flags) {
|
|||
if ((flags & IFACE_ALPHA_MASK) != IFACE_ALPHA_MASK) {
|
||||
interfaceAlpha = (flags & IFACE_ALPHA_MASK) >> 8;
|
||||
if (interfaceAlpha == 0) {
|
||||
interfaceAlpha = 0x32;
|
||||
interfaceAlpha = HUD_VISIBILITY_ALL;
|
||||
}
|
||||
if (interfaceAlpha != sCameraInterfaceAlpha) {
|
||||
sCameraInterfaceAlpha = interfaceAlpha;
|
||||
Interface_ChangeAlpha(sCameraInterfaceAlpha);
|
||||
Interface_ChangeHudVisibilityMode(sCameraInterfaceAlpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,5 +19,5 @@ void SaveContext_Init(void) {
|
|||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
gSaveContext.unk_13EE = 50;
|
||||
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ void Interface_Init(PlayState* play) {
|
|||
u8 timerId;
|
||||
|
||||
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
|
||||
gSaveContext.unk_13E8 = gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
|
||||
View_Init(&interfaceCtx->view, play->state.gfxCtx);
|
||||
|
||||
|
|
|
@ -188,7 +188,7 @@ u32 func_8006472C(PlayState* play, CutsceneContext* csCtx, f32 target) {
|
|||
}
|
||||
|
||||
void func_80064760(PlayState* play, CutsceneContext* csCtx) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
Letterbox_SetSizeTarget(32);
|
||||
|
||||
if (func_8006472C(play, csCtx, 1.0f)) {
|
||||
|
@ -199,7 +199,7 @@ void func_80064760(PlayState* play, CutsceneContext* csCtx) {
|
|||
|
||||
void func_800647C0(PlayState* play, CutsceneContext* csCtx) {
|
||||
func_80068C3C(play, csCtx);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
Letterbox_SetSizeTarget(32);
|
||||
|
||||
if (func_8006472C(play, csCtx, 1.0f)) {
|
||||
|
@ -510,7 +510,7 @@ void Cutscene_Command_Terminator(PlayState* play, CutsceneContext* csCtx, CsCmdB
|
|||
osSyncPrintf("\n分岐先指定!!=[%d]番", cmd->base); // "Future fork designation=No. [%d]"
|
||||
|
||||
if ((gSaveContext.gameMode != GAMEMODE_NORMAL) && (csCtx->frames != cmd->startFrame)) {
|
||||
gSaveContext.unk_13E7 = 1;
|
||||
gSaveContext.forceRisingButtonAlphas = true;
|
||||
}
|
||||
|
||||
gSaveContext.cutsceneIndex = 0;
|
||||
|
@ -1554,7 +1554,7 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
|||
}
|
||||
|
||||
if (csCtx->frames == originalCsFrames) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
D_8011E1C0 = 0;
|
||||
D_8011E1C4 = 0;
|
||||
}
|
||||
|
@ -2018,7 +2018,7 @@ void func_80068ECC(PlayState* play, CutsceneContext* csCtx) {
|
|||
}
|
||||
|
||||
if (gSaveContext.cutsceneTrigger == 0) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
Letterbox_SetSizeTarget(32);
|
||||
Letterbox_SetSize(32);
|
||||
csCtx->state++;
|
||||
|
|
|
@ -70,7 +70,8 @@ void GameOver_Update(PlayState* play) {
|
|||
gSaveContext.eventInf[3] = 0;
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode =
|
||||
gSaveContext.hudVisibilityModeTimer = 0; // false, HUD_VISIBILITY_NO_CHANGE
|
||||
|
||||
Environment_InitGameOverLights(play);
|
||||
gGameOverTimer = 20;
|
||||
|
|
|
@ -56,7 +56,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
|||
} else if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
// The start button was pressed, pause
|
||||
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
gSaveContext.prevHudVisibilityMode = gSaveContext.hudVisibilityMode;
|
||||
|
||||
R_PAUSE_CURSOR_LEFT_X = -175;
|
||||
R_PAUSE_CURSOR_RIGHT_X = 155;
|
||||
|
|
|
@ -1589,10 +1589,10 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
s16 textBoxType;
|
||||
|
||||
if (msgCtx->msgMode == MSGMODE_NONE) {
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
gSaveContext.prevHudVisibilityMode = gSaveContext.hudVisibilityMode;
|
||||
}
|
||||
if (R_SCENE_CAM_TYPE == SCENE_CAM_TYPE_FIXED_SHOP_VIEWPOINT) {
|
||||
Interface_ChangeAlpha(5);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE);
|
||||
}
|
||||
|
||||
sMessageHasSetSfx = D_8014B2F4 = sTextboxSkipped = sTextIsCredits = 0;
|
||||
|
@ -1623,7 +1623,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
|||
textId == 0x2061 || // Learning Epona's Song
|
||||
textId == 0x5035 || // Guru-Guru in Windmill
|
||||
textId == 0x40AC) { // Ocarina Frog Minigame
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
}
|
||||
msgCtx->textId = textId;
|
||||
|
||||
|
@ -1840,9 +1840,9 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
|||
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
|
||||
if (noStop == false) {
|
||||
Interface_LoadActionLabelB(play, DO_ACTION_STOP);
|
||||
noStop = gSaveContext.unk_13EA;
|
||||
Interface_ChangeAlpha(0xA);
|
||||
gSaveContext.unk_13EA = noStop;
|
||||
noStop = gSaveContext.hudVisibilityMode;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_B_ALT);
|
||||
gSaveContext.hudVisibilityMode = noStop;
|
||||
}
|
||||
// "Music Performance Start"
|
||||
osSyncPrintf("演奏開始\n");
|
||||
|
@ -1853,7 +1853,7 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
|||
msgCtx->msgMode = MSGMODE_FROGS_START;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_BLUE;
|
||||
} else if (ocarinaActionId == OCARINA_ACTION_MEMORY_GAME) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
Message_Decode(play);
|
||||
msgCtx->msgMode = MSGMODE_MEMORY_GAME_START;
|
||||
} else if (ocarinaActionId == OCARINA_ACTION_SCARECROW_LONG_PLAYBACK) {
|
||||
|
@ -1868,8 +1868,8 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
|||
msgCtx->stateTimer = 3;
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_LONG_PLAYBACK;
|
||||
AudioOcarina_SetPlaybackSong(OCARINA_SONG_SCARECROW_LONG + 1, 1);
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(1);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
}
|
||||
for (k = 0, j = 0; j < 48; j++, k += 0x80) {
|
||||
func_8006EE50(&play->msgCtx.font, 0x8140, k);
|
||||
|
@ -2139,7 +2139,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW_SPAWN) {
|
||||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW_SPAWN) {
|
||||
|
@ -2159,7 +2159,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
Audio_PlaySfxGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
|
||||
// "Ocarina_Free Correct Example Performance"
|
||||
|
@ -2176,7 +2176,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
|||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
} else {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_OFF);
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
|
@ -3189,7 +3189,7 @@ void Message_Update(PlayState* play) {
|
|||
case MSGMODE_TEXT_NEXT_MSG:
|
||||
Message_Decode(play);
|
||||
if (sTextFade) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
}
|
||||
if (D_80153D74 != 0) {
|
||||
msgCtx->textDrawPos = msgCtx->decodedTextLen;
|
||||
|
@ -3271,7 +3271,7 @@ void Message_Update(PlayState* play) {
|
|||
if (msgCtx->textId == 0x301F || msgCtx->textId == 0xA || msgCtx->textId == 0xC || msgCtx->textId == 0xCF ||
|
||||
msgCtx->textId == 0x21C || msgCtx->textId == 9 || msgCtx->textId == 0x4078 ||
|
||||
msgCtx->textId == 0x2015 || msgCtx->textId == 0x3040) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
|
||||
}
|
||||
if (play->csCtx.state == 0) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
|
@ -3282,11 +3282,13 @@ void Message_Update(PlayState* play) {
|
|||
(msgCtx->textId != 0x3055 && gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
osSyncPrintf("=== day_time=%x ", ((void)0, gSaveContext.cutsceneIndex));
|
||||
if (play->activeCamId == CAM_ID_MAIN) {
|
||||
if (gSaveContext.unk_13EE == 0 || gSaveContext.unk_13EE == 1 || gSaveContext.unk_13EE == 2) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
if (gSaveContext.prevHudVisibilityMode == HUD_VISIBILITY_NO_CHANGE ||
|
||||
gSaveContext.prevHudVisibilityMode == HUD_VISIBILITY_NOTHING ||
|
||||
gSaveContext.prevHudVisibilityMode == HUD_VISIBILITY_NOTHING_ALT) {
|
||||
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
|
||||
}
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(gSaveContext.unk_13EE);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(gSaveContext.prevHudVisibilityMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1176,7 +1176,7 @@ s16 OnePointCutscene_Init(PlayState* play, s16 csId, s16 timer, Actor* actor, s1
|
|||
OnePointCutscene_SetAsChild(play, vChildCamId, subCamId);
|
||||
vSubCamStatus = CAM_STAT_WAIT;
|
||||
} else {
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
}
|
||||
OnePointCutscene_SetAsChild(play, subCamId, parentCamId);
|
||||
|
||||
|
|
|
@ -164,15 +164,20 @@ static Gfx sSetupDL_80125A60[] = {
|
|||
};
|
||||
|
||||
// original name: "alpha_change"
|
||||
void Interface_ChangeAlpha(u16 alphaType) {
|
||||
if (alphaType != gSaveContext.unk_13EA) {
|
||||
osSyncPrintf("ALPHAーTYPE=%d LAST_TIME_TYPE=%d\n", alphaType, gSaveContext.unk_13EE);
|
||||
gSaveContext.unk_13EA = gSaveContext.unk_13E8 = alphaType;
|
||||
gSaveContext.unk_13EC = 1;
|
||||
void Interface_ChangeHudVisibilityMode(u16 hudVisibilityMode) {
|
||||
if (hudVisibilityMode != gSaveContext.hudVisibilityMode) {
|
||||
osSyncPrintf("ALPHAーTYPE=%d LAST_TIME_TYPE=%d\n", hudVisibilityMode,
|
||||
gSaveContext.prevHudVisibilityMode);
|
||||
gSaveContext.hudVisibilityMode = gSaveContext.nextHudVisibilityMode = hudVisibilityMode;
|
||||
gSaveContext.hudVisibilityModeTimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80082644(PlayState* play, s16 alpha) {
|
||||
/**
|
||||
* Raise button alphas on the HUD to the requested value
|
||||
* Apply a set value of 70 to disabled buttons
|
||||
*/
|
||||
void Interface_RaiseButtonAlphas(PlayState* play, s16 risingAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
if (gSaveContext.buttonStatus[0] == BTN_DISABLED) {
|
||||
|
@ -181,7 +186,7 @@ void func_80082644(PlayState* play, s16 alpha) {
|
|||
}
|
||||
} else {
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = alpha;
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -191,7 +196,7 @@ void func_80082644(PlayState* play, s16 alpha) {
|
|||
}
|
||||
} else {
|
||||
if (interfaceCtx->cLeftAlpha != 255) {
|
||||
interfaceCtx->cLeftAlpha = alpha;
|
||||
interfaceCtx->cLeftAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -201,7 +206,7 @@ void func_80082644(PlayState* play, s16 alpha) {
|
|||
}
|
||||
} else {
|
||||
if (interfaceCtx->cDownAlpha != 255) {
|
||||
interfaceCtx->cDownAlpha = alpha;
|
||||
interfaceCtx->cDownAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -211,7 +216,7 @@ void func_80082644(PlayState* play, s16 alpha) {
|
|||
}
|
||||
} else {
|
||||
if (interfaceCtx->cRightAlpha != 255) {
|
||||
interfaceCtx->cRightAlpha = alpha;
|
||||
interfaceCtx->cRightAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -221,182 +226,194 @@ void func_80082644(PlayState* play, s16 alpha) {
|
|||
}
|
||||
} else {
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = alpha;
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_8008277C(PlayState* play, s16 maxAlpha, s16 alpha) {
|
||||
/**
|
||||
* Lower button alphas on the HUD to the requested value
|
||||
* if forceRisingButtonAlphas is set, then instead raise button alphas
|
||||
*/
|
||||
void Interface_DimButtonAlphas(PlayState* play, s16 dimmingAlpha, s16 risingAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
|
||||
if (gSaveContext.unk_13E7 != 0) {
|
||||
func_80082644(play, alpha);
|
||||
if (gSaveContext.forceRisingButtonAlphas) {
|
||||
Interface_RaiseButtonAlphas(play, risingAlpha);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > maxAlpha)) {
|
||||
interfaceCtx->bAlpha = maxAlpha;
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > maxAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > maxAlpha)) {
|
||||
interfaceCtx->cDownAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > maxAlpha)) {
|
||||
interfaceCtx->cRightAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80082850(PlayState* play, s16 maxAlpha) {
|
||||
void Interface_UpdateHudAlphas(PlayState* play, s16 dimmingAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s16 alpha = 255 - maxAlpha;
|
||||
s16 risingAlpha = 255 - dimmingAlpha;
|
||||
|
||||
switch (gSaveContext.unk_13E8) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 8:
|
||||
switch (gSaveContext.nextHudVisibilityMode) {
|
||||
case HUD_VISIBILITY_NOTHING:
|
||||
case HUD_VISIBILITY_NOTHING_ALT:
|
||||
case HUD_VISIBILITY_B:
|
||||
osSyncPrintf("a_alpha=%d, c_alpha=%d → ", interfaceCtx->aAlpha, interfaceCtx->cLeftAlpha);
|
||||
|
||||
if (gSaveContext.unk_13E8 == 8) {
|
||||
if (gSaveContext.nextHudVisibilityMode == HUD_VISIBILITY_B) {
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = alpha;
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
} else {
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > maxAlpha)) {
|
||||
interfaceCtx->bAlpha = maxAlpha;
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > maxAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > maxAlpha)) {
|
||||
interfaceCtx->cDownAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > maxAlpha)) {
|
||||
interfaceCtx->cRightAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > maxAlpha)) {
|
||||
interfaceCtx->healthAlpha = maxAlpha;
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > maxAlpha)) {
|
||||
interfaceCtx->magicAlpha = maxAlpha;
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
osSyncPrintf("a_alpha=%d, c_alpha=%d\n", interfaceCtx->aAlpha, interfaceCtx->cLeftAlpha);
|
||||
|
||||
break;
|
||||
case 3:
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS_FORCE:
|
||||
// aAlpha is immediately overwritten in Interface_DimButtonAlphas
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
func_8008277C(play, maxAlpha, alpha);
|
||||
Interface_DimButtonAlphas(play, dimmingAlpha, risingAlpha);
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > maxAlpha)) {
|
||||
interfaceCtx->magicAlpha = maxAlpha;
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 4:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > maxAlpha)) {
|
||||
interfaceCtx->bAlpha = maxAlpha;
|
||||
|
||||
case HUD_VISIBILITY_A:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
// aAlpha is immediately overwritten below
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > maxAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > maxAlpha)) {
|
||||
interfaceCtx->cDownAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > maxAlpha)) {
|
||||
interfaceCtx->cRightAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > maxAlpha)) {
|
||||
interfaceCtx->healthAlpha = maxAlpha;
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > maxAlpha)) {
|
||||
interfaceCtx->magicAlpha = maxAlpha;
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = alpha;
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 5:
|
||||
func_8008277C(play, maxAlpha, alpha);
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
case HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE:
|
||||
Interface_DimButtonAlphas(play, dimmingAlpha, risingAlpha);
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
// aAlpha overwrites the value set in Interface_DimButtonAlphas
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = alpha;
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = alpha;
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 6:
|
||||
func_8008277C(play, maxAlpha, alpha);
|
||||
|
||||
case HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE:
|
||||
Interface_DimButtonAlphas(play, dimmingAlpha, risingAlpha);
|
||||
|
||||
// aAlpha overwrites the value set in Interface_DimButtonAlphas
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = alpha;
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = alpha;
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
switch (play->sceneId) {
|
||||
|
@ -421,187 +438,195 @@ void func_80082850(PlayState* play, s16 maxAlpha) {
|
|||
case SCENE_SPOT20:
|
||||
case SCENE_GANON_TOU:
|
||||
if (interfaceCtx->minimapAlpha < 170) {
|
||||
interfaceCtx->minimapAlpha = alpha;
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
} else {
|
||||
interfaceCtx->minimapAlpha = 170;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = alpha;
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
|
||||
case HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS:
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
func_80082644(play, alpha);
|
||||
Interface_RaiseButtonAlphas(play, risingAlpha);
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = alpha;
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 9:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > maxAlpha)) {
|
||||
interfaceCtx->bAlpha = maxAlpha;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > maxAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > maxAlpha)) {
|
||||
interfaceCtx->cDownAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > maxAlpha)) {
|
||||
interfaceCtx->cRightAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = alpha;
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 10:
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
|
||||
case HUD_VISIBILITY_B_ALT:
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > maxAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > maxAlpha)) {
|
||||
interfaceCtx->cDownAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > maxAlpha)) {
|
||||
interfaceCtx->cRightAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > maxAlpha)) {
|
||||
interfaceCtx->healthAlpha = maxAlpha;
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > maxAlpha)) {
|
||||
interfaceCtx->magicAlpha = maxAlpha;
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = alpha;
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 11:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > maxAlpha)) {
|
||||
interfaceCtx->bAlpha = maxAlpha;
|
||||
|
||||
case HUD_VISIBILITY_HEARTS:
|
||||
if ((interfaceCtx->bAlpha != 0) && (interfaceCtx->bAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->bAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > maxAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > maxAlpha)) {
|
||||
interfaceCtx->cDownAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > maxAlpha)) {
|
||||
interfaceCtx->cRightAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > maxAlpha)) {
|
||||
interfaceCtx->magicAlpha = maxAlpha;
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 12:
|
||||
|
||||
case HUD_VISIBILITY_A_B_MINIMAP:
|
||||
if (interfaceCtx->aAlpha != 255) {
|
||||
interfaceCtx->aAlpha = alpha;
|
||||
interfaceCtx->aAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = alpha;
|
||||
interfaceCtx->bAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = alpha;
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > maxAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cLeftAlpha != 0) && (interfaceCtx->cLeftAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cLeftAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > maxAlpha)) {
|
||||
interfaceCtx->cDownAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cDownAlpha != 0) && (interfaceCtx->cDownAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cDownAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > maxAlpha)) {
|
||||
interfaceCtx->cRightAlpha = maxAlpha;
|
||||
if ((interfaceCtx->cRightAlpha != 0) && (interfaceCtx->cRightAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->cRightAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > maxAlpha)) {
|
||||
interfaceCtx->magicAlpha = maxAlpha;
|
||||
if ((interfaceCtx->magicAlpha != 0) && (interfaceCtx->magicAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->magicAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > maxAlpha)) {
|
||||
interfaceCtx->healthAlpha = maxAlpha;
|
||||
if ((interfaceCtx->healthAlpha != 0) && (interfaceCtx->healthAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->healthAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
case 13:
|
||||
func_8008277C(play, maxAlpha, alpha);
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > maxAlpha)) {
|
||||
interfaceCtx->minimapAlpha = maxAlpha;
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC_FORCE:
|
||||
Interface_DimButtonAlphas(play, dimmingAlpha, risingAlpha);
|
||||
|
||||
if ((interfaceCtx->minimapAlpha != 0) && (interfaceCtx->minimapAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->minimapAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > maxAlpha)) {
|
||||
interfaceCtx->aAlpha = maxAlpha;
|
||||
// aAlpha overwrites the value set in Interface_DimButtonAlphas
|
||||
if ((interfaceCtx->aAlpha != 0) && (interfaceCtx->aAlpha > dimmingAlpha)) {
|
||||
interfaceCtx->aAlpha = dimmingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = alpha;
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -621,12 +646,12 @@ void func_80083108(PlayState* play) {
|
|||
|
||||
if ((gSaveContext.cutsceneIndex < 0xFFF0) ||
|
||||
((play->sceneId == SCENE_SPOT20) && (gSaveContext.cutsceneIndex == 0xFFF0))) {
|
||||
gSaveContext.unk_13E7 = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = false;
|
||||
|
||||
if ((player->stateFlags1 & PLAYER_STATE1_23) || (play->shootingGalleryStatus > 1) ||
|
||||
((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38))) {
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) {
|
||||
gSaveContext.unk_13E7 = 1;
|
||||
gSaveContext.forceRisingButtonAlphas = true;
|
||||
|
||||
if (gSaveContext.buttonStatus[0] == BTN_DISABLED) {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
|
@ -661,44 +686,45 @@ void func_80083108(PlayState* play) {
|
|||
|
||||
gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] = gSaveContext.buttonStatus[3] =
|
||||
BTN_DISABLED;
|
||||
Interface_ChangeAlpha(6);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE);
|
||||
}
|
||||
|
||||
if (play->transitionMode != TRANS_MODE_OFF) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
} else if (gSaveContext.minigameState == 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_B);
|
||||
} else if (play->shootingGalleryStatus > 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_B);
|
||||
} else if ((play->sceneId == SCENE_BOWLING) && Flags_GetSwitch(play, 0x38)) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_B);
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_B_MINIMAP);
|
||||
}
|
||||
} else {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_B_MINIMAP);
|
||||
}
|
||||
}
|
||||
} else if (play->sceneId == SCENE_KENJYANOMA) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
} else if (play->sceneId == SCENE_TURIBORI) {
|
||||
gSaveContext.unk_13E7 = 2;
|
||||
// should likely be set to true
|
||||
gSaveContext.forceRisingButtonAlphas = 2;
|
||||
if (play->interfaceCtx.unk_260 != 0) {
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_FISHING_POLE) {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.equips.buttonItems[0];
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_FISHING_POLE;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_LoadItemIcon1(play, 0);
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_B_MINIMAP);
|
||||
}
|
||||
|
||||
if (gSaveContext.unk_13EA != 12) {
|
||||
Interface_ChangeAlpha(12);
|
||||
if (gSaveContext.hudVisibilityMode != HUD_VISIBILITY_A_B_MINIMAP) {
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_B_MINIMAP);
|
||||
}
|
||||
} else if (gSaveContext.equips.buttonItems[0] == ITEM_FISHING_POLE) {
|
||||
gSaveContext.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
|
||||
if (gSaveContext.equips.buttonItems[0] != ITEM_NONE) {
|
||||
Interface_LoadItemIcon1(play, 0);
|
||||
|
@ -706,15 +732,15 @@ void func_80083108(PlayState* play) {
|
|||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
} else {
|
||||
if (gSaveContext.buttonStatus[0] == BTN_ENABLED) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
}
|
||||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
}
|
||||
} else if (msgCtx->msgMode == MSGMODE_NONE) {
|
||||
if ((Player_GetEnvironmentalHazard(play) >= PLAYER_ENV_HAZARD_UNDERWATER_FLOOR) &&
|
||||
|
@ -751,18 +777,18 @@ void func_80083108(PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
}
|
||||
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_21) || (player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
|
||||
if (gSaveContext.buttonStatus[0] != BTN_DISABLED) {
|
||||
gSaveContext.buttonStatus[0] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[1] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[2] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
}
|
||||
} else if (GET_EVENTINF_HORSES_STATE() == EVENTINF_HORSES_STATE_1) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_23) {
|
||||
|
@ -814,10 +840,10 @@ void func_80083108(PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
}
|
||||
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
} else {
|
||||
if (interfaceCtx->restrictions.bButton == 0) {
|
||||
if ((gSaveContext.equips.buttonItems[0] == ITEM_SLINGSHOT) ||
|
||||
|
@ -1059,9 +1085,9 @@ void func_80083108(PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
osSyncPrintf("???????? alpha_change( 50 ); ?????\n");
|
||||
} else {
|
||||
osSyncPrintf("game_play->fade_direction || game_play->fbdemo_wipe_modem");
|
||||
|
@ -1312,7 +1338,7 @@ void func_80084BF4(PlayState* play, u16 flag) {
|
|||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
Interface_ChangeAlpha(7);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS);
|
||||
} else {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
|
@ -2806,7 +2832,9 @@ void Interface_DrawItemButtons(PlayState* play) {
|
|||
// C-Up Button Texture, Color & Label (Navi Text)
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
|
||||
if ((gSaveContext.hudVisibilityMode == HUD_VISIBILITY_NOTHING) ||
|
||||
(gSaveContext.hudVisibilityMode == HUD_VISIBILITY_NOTHING_ALT) ||
|
||||
(gSaveContext.hudVisibilityMode == HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE)) {
|
||||
temp = 0;
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_21) ||
|
||||
(Player_GetEnvironmentalHazard(play) == PLAYER_ENV_HAZARD_UNDERWATER_FREE) ||
|
||||
|
@ -3918,8 +3946,8 @@ void Interface_Update(PlayState* play) {
|
|||
MessageContext* msgCtx = &play->msgCtx;
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 alpha;
|
||||
s16 alpha1;
|
||||
s16 dimmingAlpha;
|
||||
s16 risingAlpha;
|
||||
u16 action;
|
||||
Input* debugInput = &play->state.input[2];
|
||||
|
||||
|
@ -3946,52 +3974,55 @@ void Interface_Update(PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
switch (gSaveContext.unk_13E8) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
alpha = 255 - (gSaveContext.unk_13EC << 5);
|
||||
if (alpha < 0) {
|
||||
alpha = 0;
|
||||
// Update hud visibility mode
|
||||
switch (gSaveContext.nextHudVisibilityMode) {
|
||||
case HUD_VISIBILITY_NOTHING:
|
||||
case HUD_VISIBILITY_NOTHING_ALT:
|
||||
case HUD_VISIBILITY_HEARTS_FORCE:
|
||||
case HUD_VISIBILITY_A:
|
||||
case HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE:
|
||||
case HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE:
|
||||
case HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS:
|
||||
case HUD_VISIBILITY_B:
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC:
|
||||
case HUD_VISIBILITY_B_ALT:
|
||||
case HUD_VISIBILITY_HEARTS:
|
||||
case HUD_VISIBILITY_A_B_MINIMAP:
|
||||
case HUD_VISIBILITY_HEARTS_MAGIC_FORCE:
|
||||
dimmingAlpha = 255 - (32 * gSaveContext.hudVisibilityModeTimer);
|
||||
if (dimmingAlpha < 0) {
|
||||
dimmingAlpha = 0;
|
||||
}
|
||||
|
||||
func_80082850(play, alpha);
|
||||
gSaveContext.unk_13EC++;
|
||||
Interface_UpdateHudAlphas(play, dimmingAlpha);
|
||||
gSaveContext.hudVisibilityModeTimer++;
|
||||
|
||||
if (alpha == 0) {
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
if (dimmingAlpha == 0) {
|
||||
gSaveContext.nextHudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
}
|
||||
break;
|
||||
case 50:
|
||||
alpha = 255 - (gSaveContext.unk_13EC << 5);
|
||||
if (alpha < 0) {
|
||||
alpha = 0;
|
||||
|
||||
case HUD_VISIBILITY_ALL:
|
||||
dimmingAlpha = 255 - (32 * gSaveContext.hudVisibilityModeTimer);
|
||||
if (dimmingAlpha < 0) {
|
||||
dimmingAlpha = 0;
|
||||
}
|
||||
|
||||
alpha1 = 255 - alpha;
|
||||
if (alpha1 >= 255) {
|
||||
alpha1 = 255;
|
||||
risingAlpha = 255 - dimmingAlpha;
|
||||
if (risingAlpha >= 255) {
|
||||
risingAlpha = 255;
|
||||
}
|
||||
|
||||
osSyncPrintf("case 50 : alpha=%d alpha1=%d\n", alpha, alpha1);
|
||||
func_80082644(play, alpha1);
|
||||
osSyncPrintf("case 50 : alpha=%d alpha1=%d\n", dimmingAlpha, risingAlpha);
|
||||
|
||||
Interface_RaiseButtonAlphas(play, risingAlpha);
|
||||
|
||||
if (interfaceCtx->healthAlpha != 255) {
|
||||
interfaceCtx->healthAlpha = alpha1;
|
||||
interfaceCtx->healthAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
if (interfaceCtx->magicAlpha != 255) {
|
||||
interfaceCtx->magicAlpha = alpha1;
|
||||
interfaceCtx->magicAlpha = risingAlpha;
|
||||
}
|
||||
|
||||
switch (play->sceneId) {
|
||||
|
@ -4016,28 +4047,32 @@ void Interface_Update(PlayState* play) {
|
|||
case SCENE_SPOT20:
|
||||
case SCENE_GANON_TOU:
|
||||
if (interfaceCtx->minimapAlpha < 170) {
|
||||
interfaceCtx->minimapAlpha = alpha1;
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
} else {
|
||||
interfaceCtx->minimapAlpha = 170;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
if (interfaceCtx->minimapAlpha != 255) {
|
||||
interfaceCtx->minimapAlpha = alpha1;
|
||||
interfaceCtx->minimapAlpha = risingAlpha;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
gSaveContext.unk_13EC++;
|
||||
if (alpha1 == 255) {
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
gSaveContext.hudVisibilityModeTimer++;
|
||||
if (risingAlpha == 255) {
|
||||
gSaveContext.nextHudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
}
|
||||
|
||||
break;
|
||||
case 52:
|
||||
gSaveContext.unk_13E8 = 1;
|
||||
func_80082850(play, 0);
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
|
||||
case HUD_VISIBILITY_NOTHING_INSTANT:
|
||||
// Hide the HUD immediately
|
||||
gSaveContext.nextHudVisibilityMode = HUD_VISIBILITY_NOTHING;
|
||||
Interface_UpdateHudAlphas(play, 0);
|
||||
gSaveContext.nextHudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -509,7 +509,7 @@ void Play_Update(PlayState* this) {
|
|||
if (this->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
s16 sceneLayer = SCENE_LAYER_CHILD_DAY;
|
||||
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
|
||||
if (gSaveContext.cutsceneIndex >= 0xFFF0) {
|
||||
sceneLayer = SCENE_LAYER_CUTSCENE_FIRST + (gSaveContext.cutsceneIndex & 0xF);
|
||||
|
|
|
@ -391,7 +391,7 @@ void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
|||
|
||||
if ((this->dialogState == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
|
||||
Message_CloseTextbox(play);
|
||||
Interface_ChangeAlpha(5);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE);
|
||||
this->actionFunc = BgDyYoseizo_SetupHealPlayer_NoReward;
|
||||
}
|
||||
|
||||
|
@ -712,7 +712,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
|||
gSaveContext.isMagicAcquired = true;
|
||||
gSaveContext.magicFillTarget = MAGIC_NORMAL_METER;
|
||||
// magicLevel is already 0, setting isMagicAcquired to true triggers magicCapacity to grow
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS_MAGIC);
|
||||
break;
|
||||
case FAIRY_UPGRADE_DOUBLE_MAGIC:
|
||||
if (!gSaveContext.isMagicAcquired) {
|
||||
|
@ -722,11 +722,11 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
|||
gSaveContext.magicFillTarget = MAGIC_DOUBLE_METER;
|
||||
// Setting magicLevel to 0 triggers magicCapacity to grow
|
||||
gSaveContext.magicLevel = 0;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS_MAGIC);
|
||||
break;
|
||||
case FAIRY_UPGRADE_DOUBLE_DEFENSE:
|
||||
gSaveContext.isDoubleDefenseAcquired = true;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS_MAGIC);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -760,7 +760,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
|||
|
||||
this->itemSpawned = true;
|
||||
gSaveContext.healthAccumulator = 0x140;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS_MAGIC);
|
||||
gSaveContext.itemGetInf[ITEMGETINF_18_19_1A_INDEX] |= sItemGetFlags[actionIndex];
|
||||
Item_Give(play, sItemIds[actionIndex]);
|
||||
}
|
||||
|
|
|
@ -785,7 +785,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||
|
||||
if (this->csTimer == 20) {
|
||||
func_8002DF54(play, &this->actor, 0x17);
|
||||
Interface_ChangeAlpha(11); // show hearts only
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS);
|
||||
}
|
||||
|
||||
if (this->csTimer == 25) {
|
||||
|
@ -793,7 +793,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->csTimer == 100) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
}
|
||||
|
||||
if (this->csTimer == 120) {
|
||||
|
|
|
@ -791,7 +791,7 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
|||
case MO_TENT_SHAKE:
|
||||
if (this->timers[0] == 138) {
|
||||
Letterbox_SetSizeTarget(0);
|
||||
Interface_ChangeAlpha(0xB);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_HEARTS);
|
||||
}
|
||||
if ((this->timers[0] % 8) == 0) {
|
||||
play->damagePlayer(play, -1);
|
||||
|
|
|
@ -1097,7 +1097,7 @@ void DemoEc_DrawFishingOwner(DemoEc* this, PlayState* play) {
|
|||
|
||||
void DemoEc_InitBombchuShopOwner(DemoEc* this, PlayState* play) {
|
||||
DemoEc_UseDrawObject(this, play);
|
||||
DemoEc_InitSkelAnime(this, play, &object_rs_Skel_004868);
|
||||
DemoEc_InitSkelAnime(this, play, &gBombchuShopkeeperSkel);
|
||||
DemoEc_UseAnimationObject(this, play);
|
||||
DemoEc_ChangeAnimation(this, &gDemoEcPotionShopOwnerAnim, 0, 0.0f, false);
|
||||
func_8096D5D4(this, play);
|
||||
|
|
|
@ -166,44 +166,44 @@ void DemoIm_UpdateCollider(DemoIm* this, PlayState* play) {
|
|||
|
||||
void func_80984DB8(DemoIm* this) {
|
||||
s32 pad[2];
|
||||
Vec3s* vec1 = &this->unk_2D4.unk_08;
|
||||
Vec3s* vec2 = &this->unk_2D4.unk_0E;
|
||||
Vec3s* headRot = &this->interactInfo.headRot;
|
||||
Vec3s* torsoRot = &this->interactInfo.torsoRot;
|
||||
|
||||
Math_SmoothStepToS(&vec1->x, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&vec1->y, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&headRot->x, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&headRot->y, 0, 20, 6200, 100);
|
||||
|
||||
Math_SmoothStepToS(&vec2->x, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&vec2->y, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&torsoRot->x, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&torsoRot->y, 0, 20, 6200, 100);
|
||||
}
|
||||
|
||||
void func_80984E58(DemoIm* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 yawDiff;
|
||||
s16 phi_a3;
|
||||
s16 npcTrackingMode;
|
||||
|
||||
this->unk_2D4.unk_18 = player->actor.world.pos;
|
||||
this->unk_2D4.unk_14 = kREG(16) + 4.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) + 4.0f;
|
||||
|
||||
yawDiff = this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
phi_a3 = (ABS(yawDiff) < 0x18E3) ? 2 : 1;
|
||||
func_80034A14(&this->actor, &this->unk_2D4, kREG(17) + 0xC, phi_a3);
|
||||
npcTrackingMode = (ABS(yawDiff) < 0x18E3) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, kREG(17) + 0xC, npcTrackingMode);
|
||||
}
|
||||
|
||||
void func_80984F10(DemoIm* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_2D4.unk_18 = player->actor.world.pos;
|
||||
this->unk_2D4.unk_14 = kREG(16) + 12.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) + 12.0f;
|
||||
|
||||
func_80034A14(&this->actor, &this->unk_2D4, kREG(17) + 0xC, 2);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, kREG(17) + 0xC, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
|
||||
void func_80984F94(DemoIm* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_2D4.unk_18 = player->actor.world.pos;
|
||||
this->unk_2D4.unk_14 = kREG(16) + 4.0f;
|
||||
func_80034A14(&this->actor, &this->unk_2D4, kREG(17) + 0xC, 4);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) + 4.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, kREG(17) + 0xC, NPC_TRACKING_FULL_BODY);
|
||||
}
|
||||
|
||||
void DemoIm_UpdateBgCheckInfo(DemoIm* this, PlayState* play) {
|
||||
|
@ -1137,17 +1137,17 @@ s32 DemoIm_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
s32* unk_2D0 = &this->unk_2D0;
|
||||
|
||||
if (this->unk_280 != 0) {
|
||||
Vec3s* unk_2D4_unk_0E = &this->unk_2D4.unk_0E;
|
||||
Vec3s* unk_2D4_unk_08 = &this->unk_2D4.unk_08;
|
||||
Vec3s* torsoRot = &this->interactInfo.torsoRot;
|
||||
Vec3s* headRot = &this->interactInfo.headRot;
|
||||
|
||||
switch (limbIndex) {
|
||||
case IMPA_LIMB_CHEST:
|
||||
rot->x += unk_2D4_unk_0E->y;
|
||||
rot->y -= unk_2D4_unk_0E->x;
|
||||
rot->x += torsoRot->y;
|
||||
rot->y -= torsoRot->x;
|
||||
break;
|
||||
case IMPA_LIMB_HEAD:
|
||||
rot->x += unk_2D4_unk_08->y;
|
||||
rot->z += unk_2D4_unk_08->x;
|
||||
rot->x += headRot->y;
|
||||
rot->z += headRot->x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ typedef struct DemoIm {
|
|||
/* 0x0280 */ s32 unk_280;
|
||||
/* 0x0284 */ ColliderCylinder collider;
|
||||
/* 0x02D0 */ s32 unk_2D0;
|
||||
/* 0x02D4 */ struct_80034A14_arg1 unk_2D4;
|
||||
/* 0x02D4 */ NpcInteractInfo interactInfo;
|
||||
} DemoIm; // size = 0x02FC
|
||||
|
||||
#endif
|
||||
|
|
|
@ -14,10 +14,10 @@ void EnBird_Destroy(Actor* thisx, PlayState* play);
|
|||
void EnBird_Update(Actor* thisx, PlayState* play);
|
||||
void EnBird_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_809C1E00(EnBird* this, s16 params);
|
||||
void func_809C1E40(EnBird* this, PlayState* play);
|
||||
void func_809C1D60(EnBird* this, PlayState* play);
|
||||
void func_809C1CAC(EnBird* this, s16 params);
|
||||
void EnBird_SetupMove(EnBird* this, s16 params);
|
||||
void EnBird_Move(EnBird* this, PlayState* play);
|
||||
void EnBird_Idle(EnBird* this, PlayState* play);
|
||||
void EnBird_SetupIdle(EnBird* this, s16 params);
|
||||
|
||||
ActorInit En_Bird_InitVars = {
|
||||
ACTOR_EN_BIRD,
|
||||
|
@ -47,81 +47,75 @@ void EnBird_Init(Actor* thisx, PlayState* play) {
|
|||
SkelAnime_Init(play, &this->skelAnime, &gBirdSkel, &gBirdFlyAnim, NULL, NULL, 0);
|
||||
ActorShape_Init(&this->actor.shape, 5500, ActorShadow_DrawCircle, 4);
|
||||
this->unk_194 = 0;
|
||||
this->unk_198 = 0;
|
||||
this->unk_1C0 = 0x9C4;
|
||||
this->timer = 0;
|
||||
this->rotYStep = 2500;
|
||||
this->actor.colChkInfo.mass = 0;
|
||||
this->unk_1A8 = 1.5f;
|
||||
this->unk_1AC = 0.5f;
|
||||
this->unk_1A0 = 0.0f;
|
||||
this->unk_1A4 = 0.0f;
|
||||
this->unk_1B8 = 0.0f;
|
||||
this->unk_1B0 = 40.0f;
|
||||
this->speedXZTarget = 1.5f;
|
||||
this->speedXZStep = 0.5f;
|
||||
this->posYMag = 0.0f;
|
||||
this->rotYMag = 0.0f;
|
||||
this->posYPhaseStep = 0.0f;
|
||||
this->flightDistance = 40.0f;
|
||||
this->unk_1BC = 70.0f;
|
||||
func_809C1CAC(this, this->actor.params);
|
||||
EnBird_SetupIdle(this, this->actor.params);
|
||||
}
|
||||
|
||||
void EnBird_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809C1CAC(EnBird* this, s16 params) {
|
||||
void EnBird_SetupIdle(EnBird* this, s16 params) {
|
||||
f32 frameCount = Animation_GetLastFrame(&gBirdFlyAnim);
|
||||
f32 playbackSpeed = this->unk_19C ? 0.0f : 1.0f;
|
||||
AnimationHeader* anim = &gBirdFlyAnim;
|
||||
f32 playbackSpeed = this->scaleAnimSpeed ? 0.0f : 1.0f;
|
||||
|
||||
this->unk_198 = Rand_S16Offset(5, 0x23);
|
||||
Animation_Change(&this->skelAnime, anim, playbackSpeed, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
|
||||
EnBird_SetupAction(this, func_809C1D60);
|
||||
this->timer = Rand_S16Offset(5, 35);
|
||||
Animation_Change(&this->skelAnime, &gBirdFlyAnim, playbackSpeed, 0.0f, frameCount, ANIMMODE_LOOP, 0.0f);
|
||||
EnBird_SetupAction(this, EnBird_Idle);
|
||||
}
|
||||
|
||||
void func_809C1D60(EnBird* this, PlayState* play) {
|
||||
f32 fVar2 = sinf(this->unk_1B4);
|
||||
|
||||
this->actor.shape.yOffset = this->actor.shape.yOffset + fVar2 * this->unk_1A0;
|
||||
void EnBird_Idle(EnBird* this, PlayState* play) {
|
||||
this->actor.shape.yOffset += sinf(this->posYPhase) * this->posYMag;
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 0.1f, 0.5f, 0.0f);
|
||||
|
||||
if (this->unk_19C != 0) {
|
||||
this->skelAnime.playSpeed = this->actor.speedXZ + this->actor.speedXZ;
|
||||
if (this->scaleAnimSpeed) {
|
||||
this->skelAnime.playSpeed = this->actor.speedXZ * 2.0f;
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_198 -= 1;
|
||||
this->timer--;
|
||||
|
||||
if (this->unk_198 <= 0) {
|
||||
func_809C1E00(this, this->actor.params);
|
||||
if (this->timer <= 0) {
|
||||
EnBird_SetupMove(this, this->actor.params);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809C1E00(EnBird* this, s16 params) {
|
||||
this->unk_198 = Rand_S16Offset(0x14, 0x2D);
|
||||
EnBird_SetupAction(this, func_809C1E40);
|
||||
void EnBird_SetupMove(EnBird* this, s16 params) {
|
||||
this->timer = Rand_S16Offset(20, 45);
|
||||
EnBird_SetupAction(this, EnBird_Move);
|
||||
}
|
||||
|
||||
void func_809C1E40(EnBird* this, PlayState* play) {
|
||||
f32 fVar4 = sinf(this->unk_1B4);
|
||||
void EnBird_Move(EnBird* this, PlayState* play) {
|
||||
this->actor.shape.yOffset += sinf(this->posYPhase) * this->posYMag;
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->speedXZTarget, 0.1f, this->speedXZStep, 0.0f);
|
||||
|
||||
this->actor.shape.yOffset += fVar4 * this->unk_1A0;
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->unk_1A8, 0.1f, this->unk_1AC, 0.0f);
|
||||
|
||||
if (this->unk_1B0 < Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) || this->unk_198 < 4) {
|
||||
if (this->flightDistance < Math_Vec3f_DistXZ(&this->actor.world.pos, &this->actor.home.pos) || this->timer < 4) {
|
||||
Math_StepToAngleS(&this->actor.world.rot.y, Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos),
|
||||
this->unk_1C0);
|
||||
this->rotYStep);
|
||||
} else {
|
||||
fVar4 = sinf(this->unk_1B4);
|
||||
this->actor.world.rot.y += (s16)(fVar4 * this->unk_1A4);
|
||||
this->actor.world.rot.y += (s16)(sinf(this->posYPhase) * this->rotYMag);
|
||||
}
|
||||
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
this->unk_198 -= 1;
|
||||
if (this->unk_198 < 0) {
|
||||
func_809C1CAC(this, this->actor.params);
|
||||
this->timer--;
|
||||
if (this->timer < 0) {
|
||||
EnBird_SetupIdle(this, this->actor.params);
|
||||
}
|
||||
}
|
||||
|
||||
void EnBird_Update(Actor* thisx, PlayState* play) {
|
||||
EnBird* this = (EnBird*)thisx;
|
||||
|
||||
this->unk_1B4 += this->unk_1B8;
|
||||
this->posYPhase += this->posYPhaseStep;
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
|
|
|
@ -12,19 +12,18 @@ typedef struct EnBird {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnBirdActionFunc actionFunc;
|
||||
/* 0x0194 */ u32 unk_194;
|
||||
/* 0x0198 */ s32 unk_198;
|
||||
/* 0x019C */ s16 unk_19C;
|
||||
/* 0x019E */ char unk_19E[0x2];
|
||||
/* 0x01A0 */ f32 unk_1A0;
|
||||
/* 0x01A4 */ f32 unk_1A4;
|
||||
/* 0x01A8 */ f32 unk_1A8;
|
||||
/* 0x01AC */ f32 unk_1AC;
|
||||
/* 0x01B0 */ f32 unk_1B0;
|
||||
/* 0x01B4 */ f32 unk_1B4;
|
||||
/* 0x01B8 */ f32 unk_1B8;
|
||||
/* 0x01BC */ f32 unk_1BC;
|
||||
/* 0x01C0 */ s16 unk_1C0;
|
||||
/* 0x0194 */ u32 unk_194; // set to 0 but otherwise unused
|
||||
/* 0x0198 */ s32 timer;
|
||||
/* 0x019C */ s16 scaleAnimSpeed; // when true, anim speed scales with XZ speed while slowing down. otherwise anim plays full speed
|
||||
/* 0x01A0 */ f32 posYMag;
|
||||
/* 0x01A4 */ f32 rotYMag;
|
||||
/* 0x01A8 */ f32 speedXZTarget;
|
||||
/* 0x01AC */ f32 speedXZStep;
|
||||
/* 0x01B0 */ f32 flightDistance; // radius of "home" area
|
||||
/* 0x01B4 */ f32 posYPhase;
|
||||
/* 0x01B8 */ f32 posYPhaseStep;
|
||||
/* 0x01BC */ f32 unk_1BC; // set but otherwise unused.
|
||||
/* 0x01C0 */ s16 rotYStep;
|
||||
/* 0x01C2 */ char unk_1C2[0x1A];
|
||||
} EnBird; // size = 0x01DC
|
||||
|
||||
|
|
|
@ -403,10 +403,10 @@ void EnCs_Talk(EnCs* this, PlayState* play) {
|
|||
}
|
||||
|
||||
this->flag |= 1;
|
||||
this->npcInfo.unk_18.x = player->actor.focus.pos.x;
|
||||
this->npcInfo.unk_18.y = player->actor.focus.pos.y;
|
||||
this->npcInfo.unk_18.z = player->actor.focus.pos.z;
|
||||
func_80034A14(&this->actor, &this->npcInfo, 0, 4);
|
||||
this->interactInfo.trackPos.x = player->actor.focus.pos.x;
|
||||
this->interactInfo.trackPos.y = player->actor.focus.pos.y;
|
||||
this->interactInfo.trackPos.z = player->actor.focus.pos.z;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_FULL_BODY);
|
||||
|
||||
if (this->talkState == 0) {
|
||||
EnCs_ChangeAnim(this, ENCS_ANIM_0, &this->currentAnimIndex);
|
||||
|
@ -494,12 +494,12 @@ s32 EnCs_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
if (this->flag & 1) {
|
||||
switch (limbIndex) {
|
||||
case 8:
|
||||
rot->x += this->npcInfo.unk_0E.y;
|
||||
rot->y -= this->npcInfo.unk_0E.x;
|
||||
rot->x += this->interactInfo.torsoRot.y;
|
||||
rot->y -= this->interactInfo.torsoRot.x;
|
||||
break;
|
||||
case 15:
|
||||
rot->x += this->npcInfo.unk_08.y;
|
||||
rot->z += this->npcInfo.unk_08.x;
|
||||
rot->x += this->interactInfo.headRot.y;
|
||||
rot->z += this->interactInfo.headRot.x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ typedef struct EnCs {
|
|||
/* 0x0210 */ s32 currentAnimIndex;
|
||||
/* 0x0214 */ char unk_214[4];
|
||||
/* 0x0218 */ MtxF spookyMaskMtx;
|
||||
/* 0x0258 */ struct_80034A14_arg1 npcInfo;
|
||||
/* 0x0258 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0280 */ s32 flag;
|
||||
/* 0x0284 */ Vec3s jointTable[16];
|
||||
/* 0x02E4 */ Vec3s morphTable[16];
|
||||
|
|
|
@ -573,14 +573,14 @@ void EnDaiku_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc(this, play);
|
||||
|
||||
if (this->stateFlags & ENDAIKU_STATEFLAG_1) {
|
||||
this->unk_244.unk_18.x = player->actor.focus.pos.x;
|
||||
this->unk_244.unk_18.y = player->actor.focus.pos.y;
|
||||
this->unk_244.unk_18.z = player->actor.focus.pos.z;
|
||||
this->interactInfo.trackPos.x = player->actor.focus.pos.x;
|
||||
this->interactInfo.trackPos.y = player->actor.focus.pos.y;
|
||||
this->interactInfo.trackPos.z = player->actor.focus.pos.z;
|
||||
|
||||
if (this->stateFlags & ENDAIKU_STATEFLAG_2) {
|
||||
func_80034A14(&this->actor, &this->unk_244, 0, 4);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_FULL_BODY);
|
||||
} else {
|
||||
func_80034A14(&this->actor, &this->unk_244, 0, 2);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -613,12 +613,12 @@ s32 EnDaiku_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos,
|
|||
|
||||
switch (limb) {
|
||||
case 8: // torso
|
||||
rot->x += this->unk_244.unk_0E.y;
|
||||
rot->y -= this->unk_244.unk_0E.x;
|
||||
rot->x += this->interactInfo.torsoRot.y;
|
||||
rot->y -= this->interactInfo.torsoRot.x;
|
||||
break;
|
||||
case 15: // head
|
||||
rot->x += this->unk_244.unk_08.y;
|
||||
rot->z += this->unk_244.unk_08.x;
|
||||
rot->x += this->interactInfo.headRot.y;
|
||||
rot->z += this->interactInfo.headRot.x;
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@ typedef struct EnDaiku {
|
|||
/* 0x0230 */ Vec3f subCamAt;
|
||||
/* 0x023C */ s32 stateFlags;
|
||||
/* 0x0240 */ s32 startFightSwitchFlag;
|
||||
/* 0x0244 */ struct_80034A14_arg1 unk_244; // probably related to animating torso and head towards the player
|
||||
/* 0x0244 */ NpcInteractInfo interactInfo;
|
||||
/* 0x026C */ Vec3s jointTable[17];
|
||||
/* 0x02D2 */ Vec3s morphTable[17];
|
||||
/* 0x0338 */ Vec3s initRot;
|
||||
|
|
|
@ -474,18 +474,18 @@ void EnDaikuKakariko_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
this->actionFunc(this, play);
|
||||
|
||||
this->npcInfo.unk_18.x = player->actor.focus.pos.x;
|
||||
this->npcInfo.unk_18.y = player->actor.focus.pos.y;
|
||||
this->npcInfo.unk_18.z = player->actor.focus.pos.z;
|
||||
this->interactInfo.trackPos.x = player->actor.focus.pos.x;
|
||||
this->interactInfo.trackPos.y = player->actor.focus.pos.y;
|
||||
this->interactInfo.trackPos.z = player->actor.focus.pos.z;
|
||||
|
||||
if (this->flags & 0x100) {
|
||||
this->neckAngleTarget.x = 5900;
|
||||
this->flags |= 0x1000;
|
||||
func_80034A14(&this->actor, &this->npcInfo, 0, 2);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
} else if (this->flags & 0x200) {
|
||||
this->neckAngleTarget.x = 5900;
|
||||
this->flags |= 0x1000;
|
||||
func_80034A14(&this->actor, &this->npcInfo, 0, 4);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, NPC_TRACKING_FULL_BODY);
|
||||
}
|
||||
|
||||
Math_SmoothStepToS(&this->neckAngle.x, this->neckAngleTarget.x, 1, 1820, 0);
|
||||
|
@ -497,13 +497,13 @@ s32 EnDaikuKakariko_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList
|
|||
|
||||
switch (limbIndex) {
|
||||
case 8:
|
||||
angle = this->npcInfo.unk_0E;
|
||||
angle = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(-BINANG_TO_RAD(angle.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(-BINANG_TO_RAD(angle.x), MTXMODE_APPLY);
|
||||
break;
|
||||
case 15:
|
||||
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
angle = this->npcInfo.unk_08;
|
||||
angle = this->interactInfo.headRot;
|
||||
|
||||
if (this->flags & 0x1000) {
|
||||
osSyncPrintf("<%d>\n", this->neckAngle.x);
|
||||
|
|
|
@ -22,7 +22,7 @@ typedef struct EnDaikuKakariko {
|
|||
/* 0x01FC */ s32 run; // If true the carpenter will run
|
||||
/* 0x0200 */ u16 flags;
|
||||
/* 0x0202 */ u16 runFlag;
|
||||
/* 0x0204 */ struct_80034A14_arg1 npcInfo; // Info related to NPCs and turning their head towards the player
|
||||
/* 0x0204 */ NpcInteractInfo interactInfo;
|
||||
/* 0x022C */ Vec3s jointTable[17];
|
||||
/* 0x0292 */ Vec3s morphTable[17];
|
||||
/* 0x02F8 */ s32 timer;
|
||||
|
|
|
@ -520,11 +520,11 @@ void EnDivingGame_Update(Actor* thisx, PlayState* play2) {
|
|||
}
|
||||
this->actionFunc(this, play);
|
||||
Actor_SetFocus(&this->actor, 80.0f);
|
||||
this->unk_324.unk_18 = player->actor.world.pos;
|
||||
this->unk_324.unk_18.y = player->actor.world.pos.y;
|
||||
func_80034A14(&this->actor, &this->unk_324, 2, 4);
|
||||
this->vec_284 = this->unk_324.unk_08;
|
||||
this->vec_28A = this->unk_324.unk_0E;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.trackPos.y = player->actor.world.pos.y;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
|
||||
this->vec_284 = this->interactInfo.headRot;
|
||||
this->vec_28A = this->interactInfo.torsoRot;
|
||||
if ((play->gameplayFrames % 16) == 0) {
|
||||
pos = this->actor.world.pos;
|
||||
pos.y += 20.0f;
|
||||
|
|
|
@ -45,7 +45,7 @@ typedef struct EnDivingGame {
|
|||
/* 0x031E */ u8 allRupeesThrown; // flag
|
||||
/* 0x031F */ u8 unk_31F; // flag
|
||||
/* 0x0320 */ char unk_320[0x4]; // unused
|
||||
/* 0x0324 */ struct_80034A14_arg1 unk_324;
|
||||
/* 0x0324 */ NpcInteractInfo interactInfo;
|
||||
/* 0x034C */ ColliderCylinder collider;
|
||||
} EnDivingGame; // size = 0x0398
|
||||
|
||||
|
|
|
@ -130,19 +130,19 @@ s16 func_809FDCDC(PlayState* play, Actor* actor) {
|
|||
break;
|
||||
case 0x301C:
|
||||
case 0x301F:
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
case 0x3020:
|
||||
SET_EVENTCHKINF(EVENTCHKINF_22);
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
break;
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
return 3;
|
||||
return NPC_TALK_STATE_ITEM_GIVEN;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
|
@ -150,7 +150,7 @@ s16 func_809FDCDC(PlayState* play, Actor* actor) {
|
|||
case TEXT_STATE_9:
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
s32 func_809FDDB4(EnDu* this, PlayState* play) {
|
||||
|
@ -164,17 +164,17 @@ s32 func_809FDDB4(EnDu* this, PlayState* play) {
|
|||
|
||||
void func_809FDE24(EnDu* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 phi_a3 = 0;
|
||||
s16 trackingMode = NPC_TRACKING_PLAYER_AUTO_TURN;
|
||||
|
||||
if (this->unk_1F4.unk_00 == 0) {
|
||||
phi_a3 = 1;
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
if (this->actionFunc == func_809FE890) {
|
||||
phi_a3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
this->unk_1F4.unk_18 = player->actor.world.pos;
|
||||
this->unk_1F4.unk_14 = 10.0f;
|
||||
func_80034A14(&this->actor, &this->unk_1F4, 3, phi_a3);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = 10.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 3, trackingMode);
|
||||
}
|
||||
|
||||
void func_809FDE9C(EnDu* this) {
|
||||
|
@ -292,7 +292,7 @@ void EnDu_Init(Actor* thisx, PlayState* play) {
|
|||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENDU_ANIM_0);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.targetMode = 1;
|
||||
this->unk_1F4.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
|
||||
if (gSaveContext.cutsceneIndex >= 0xFFF0) {
|
||||
play->csCtx.segment = SEGMENTED_TO_VIRTUAL(gGoronCityDarunia01Cs);
|
||||
|
@ -327,9 +327,9 @@ void func_809FE3C0(EnDu* this, PlayState* play) {
|
|||
EnDu_SetupAction(this, func_809FE4A4);
|
||||
return;
|
||||
}
|
||||
if (this->unk_1F4.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
this->unk_1F4.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer < 116.0f + this->collider.dim.radius) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
|
@ -377,13 +377,13 @@ void func_809FE6CC(EnDu* this, PlayState* play) {
|
|||
if (DECR(this->unk_1E2) == 0) {
|
||||
this->actor.textId = 0x3039;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->unk_1F4.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
EnDu_SetupAction(this, func_809FE740);
|
||||
}
|
||||
}
|
||||
|
||||
void func_809FE740(EnDu* this, PlayState* play) {
|
||||
if (this->unk_1F4.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
func_8005B1A4(GET_ACTIVE_CAM(play));
|
||||
this->unk_1E2 = 0x5A;
|
||||
EnDu_SetupAction(this, func_809FE798);
|
||||
|
@ -504,11 +504,11 @@ void func_809FEB08(EnDu* this, PlayState* play) {
|
|||
}
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENDU_ANIM_14);
|
||||
this->unk_1F4.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
void func_809FEC14(EnDu* this, PlayState* play) {
|
||||
if (this->unk_1F4.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
EnDu_SetupAction(this, func_809FEC70);
|
||||
func_809FEC70(this, play);
|
||||
|
@ -527,8 +527,8 @@ void func_809FEC70(EnDu* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_809FECE4(EnDu* this, PlayState* play) {
|
||||
if (this->unk_1F4.unk_00 == 3) {
|
||||
this->unk_1F4.unk_00 = 0;
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN) {
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
EnDu_SetupAction(this, func_809FE3C0);
|
||||
}
|
||||
}
|
||||
|
@ -560,8 +560,8 @@ void EnDu_Update(Actor* thisx, PlayState* play) {
|
|||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
|
||||
if (this->actionFunc != func_809FE4A4) {
|
||||
func_800343CC(play, &this->actor, &this->unk_1F4.unk_00, this->collider.dim.radius + 116.0f, func_809FDC38,
|
||||
func_809FDCDC);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 116.0f,
|
||||
func_809FDC38, func_809FDCDC);
|
||||
}
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
@ -572,13 +572,13 @@ s32 EnDu_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if (limbIndex == 16) {
|
||||
Matrix_Translate(2400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp1C = this->unk_1F4.unk_08;
|
||||
sp1C = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp1C.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-2400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 8) {
|
||||
sp1C = this->unk_1F4.unk_0E;
|
||||
sp1C = this->interactInfo.torsoRot;
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp1C.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ typedef struct EnDu {
|
|||
/* 0x01F0 */ u8 mouthTexIndex;
|
||||
/* 0x01F1 */ u8 noseTexIndex;
|
||||
/* 0x01F2 */ s16 blinkTimer;
|
||||
/* 0x01F4 */ struct_80034A14_arg1 unk_1F4;
|
||||
/* 0x01F4 */ NpcInteractInfo interactInfo;
|
||||
} EnDu; // size = 0x021C
|
||||
|
||||
#endif
|
||||
|
|
|
@ -195,8 +195,8 @@ u16 EnGo_GetTextID(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo_SetFlagsGetStates(PlayState* play, Actor* thisx) {
|
||||
s16 unkState = 1;
|
||||
s16 EnGo_UpdateTalkState(PlayState* play, Actor* thisx) {
|
||||
s16 unkState = NPC_TALK_STATE_TALKING;
|
||||
f32 xzRange;
|
||||
f32 yRange = fabsf(thisx->yDistToPlayer) + 1.0f;
|
||||
|
||||
|
@ -207,51 +207,51 @@ s16 EnGo_SetFlagsGetStates(PlayState* play, Actor* thisx) {
|
|||
switch (thisx->textId) {
|
||||
case 0x3008:
|
||||
SET_INFTABLE(INFTABLE_E0);
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x300B:
|
||||
SET_INFTABLE(INFTABLE_EB);
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x3014:
|
||||
SET_INFTABLE(INFTABLE_F0);
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x3016:
|
||||
SET_INFTABLE(INFTABLE_F4);
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x3018:
|
||||
SET_INFTABLE(INFTABLE_F8);
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x3036:
|
||||
func_8002F434(thisx, play, GI_TUNIC_GORON, xzRange, yRange);
|
||||
SET_INFTABLE(INFTABLE_10D); // EnGo exclusive flag
|
||||
unkState = 2;
|
||||
unkState = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
case 0x3037:
|
||||
SET_INFTABLE(INFTABLE_10E);
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x3041:
|
||||
SET_INFTABLE(INFTABLE_10F);
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x3059:
|
||||
unkState = 2;
|
||||
unkState = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
case 0x3052:
|
||||
case 0x3054:
|
||||
case 0x3055:
|
||||
case 0x305A:
|
||||
unkState = 2;
|
||||
unkState = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
case 0x305E:
|
||||
unkState = 2;
|
||||
unkState = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
default:
|
||||
unkState = 0;
|
||||
unkState = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -269,7 +269,7 @@ s16 EnGo_SetFlagsGetStates(PlayState* play, Actor* thisx) {
|
|||
thisx->textId = 0x300D;
|
||||
}
|
||||
Message_ContinueTextbox(play, thisx->textId);
|
||||
unkState = 1;
|
||||
unkState = NPC_TALK_STATE_TALKING;
|
||||
break;
|
||||
case 0x3034:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
|
@ -284,16 +284,16 @@ s16 EnGo_SetFlagsGetStates(PlayState* play, Actor* thisx) {
|
|||
thisx->textId = 0x3033;
|
||||
}
|
||||
Message_ContinueTextbox(play, thisx->textId);
|
||||
unkState = 1;
|
||||
unkState = NPC_TALK_STATE_TALKING;
|
||||
break;
|
||||
case 0x3054:
|
||||
case 0x3055:
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
unkState = 2;
|
||||
unkState = NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
thisx->textId = 0x3056;
|
||||
Message_ContinueTextbox(play, thisx->textId);
|
||||
unkState = 1;
|
||||
unkState = NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
SET_INFTABLE(INFTABLE_B4);
|
||||
break;
|
||||
|
@ -310,17 +310,17 @@ s16 EnGo_SetFlagsGetStates(PlayState* play, Actor* thisx) {
|
|||
case 0x3033:
|
||||
thisx->textId = 0x3034;
|
||||
Message_ContinueTextbox(play, thisx->textId);
|
||||
unkState = 1;
|
||||
unkState = NPC_TALK_STATE_TALKING;
|
||||
break;
|
||||
default:
|
||||
unkState = 2;
|
||||
unkState = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
unkState = 3;
|
||||
unkState = NPC_TALK_STATE_ITEM_GIVEN;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_NONE:
|
||||
|
@ -333,13 +333,13 @@ s16 EnGo_SetFlagsGetStates(PlayState* play, Actor* thisx) {
|
|||
return unkState;
|
||||
}
|
||||
|
||||
s32 func_80A3ED24(PlayState* play, EnGo* this, struct_80034A14_arg1* arg2, f32 arg3,
|
||||
u16 (*getTextId)(PlayState*, Actor*), s16 (*unkFunc2)(PlayState*, Actor*)) {
|
||||
if (arg2->unk_00) {
|
||||
arg2->unk_00 = unkFunc2(play, &this->actor);
|
||||
s32 func_80A3ED24(PlayState* play, EnGo* this, NpcInteractInfo* interactInfo, f32 arg3, NpcGetTextIdFunc getTextId,
|
||||
NpcUpdateTalkStateFunc updateTalkState) {
|
||||
if (interactInfo->talkState != NPC_TALK_STATE_IDLE) {
|
||||
interactInfo->talkState = updateTalkState(play, &this->actor);
|
||||
return false;
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||
arg2->unk_00 = 1;
|
||||
interactInfo->talkState = NPC_TALK_STATE_TALKING;
|
||||
return true;
|
||||
} else if (!func_8002F2CC(&this->actor, play, arg3)) {
|
||||
return false;
|
||||
|
@ -396,16 +396,16 @@ f32 EnGo_GetGoronSize(EnGo* this) {
|
|||
|
||||
void func_80A3F060(EnGo* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 unkVal;
|
||||
s16 npcTrackingMode;
|
||||
|
||||
if (this->actionFunc != EnGo_BiggoronActionFunc && this->actionFunc != EnGo_FireGenericActionFunc &&
|
||||
this->actionFunc != func_80A40B1C) {
|
||||
unkVal = 1;
|
||||
npcTrackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
|
||||
this->unk_1E0.unk_18 = player->actor.world.pos;
|
||||
this->unk_1E0.unk_14 = EnGo_GetGoronSize(this);
|
||||
func_80034A14(&this->actor, &this->unk_1E0, 4, unkVal);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = EnGo_GetGoronSize(this);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 4, npcTrackingMode);
|
||||
}
|
||||
|
||||
void func_80A3F0E4(EnGo* this) {
|
||||
|
@ -544,7 +544,7 @@ s32 EnGo_SpawnDust(EnGo* this, u8 initialTimer, f32 scale, f32 scaleStep, s32 nu
|
|||
s32 EnGo_IsRollingOnGround(EnGo* this, s16 unkArg1, f32 unkArg2) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || this->actor.velocity.y > 0.0f) {
|
||||
return false;
|
||||
} else if (this->unk_1E0.unk_00 != 0) {
|
||||
} else if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
return true;
|
||||
} else if (DECR(this->unk_21C)) {
|
||||
if (this->unk_21C & 1) {
|
||||
|
@ -586,10 +586,11 @@ void func_80A3F908(EnGo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
isUnkCondition = func_80A3ED24(play, this, &this->unk_1E0, float1, EnGo_GetTextID, EnGo_SetFlagsGetStates);
|
||||
isUnkCondition =
|
||||
func_80A3ED24(play, this, &this->interactInfo, float1, EnGo_GetTextID, EnGo_UpdateTalkState);
|
||||
} else {
|
||||
isUnkCondition = func_800343CC(play, &this->actor, &this->unk_1E0.unk_00, float1, EnGo_GetTextID,
|
||||
EnGo_SetFlagsGetStates);
|
||||
isUnkCondition = Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, float1,
|
||||
EnGo_GetTextID, EnGo_UpdateTalkState);
|
||||
}
|
||||
|
||||
if (((this->actor.params & 0xF0) == 0x90) && (isUnkCondition == true)) {
|
||||
|
@ -642,7 +643,7 @@ void EnGo_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
EnGo_ChangeAnim(this, ENGO_ANIM_0);
|
||||
this->actor.targetMode = 6;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actor.gravity = -1.0f;
|
||||
|
||||
switch (this->actor.params & 0xF0) {
|
||||
|
@ -855,26 +856,26 @@ void func_80A405CC(EnGo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnGo_BiggoronActionFunc(EnGo* this, PlayState* play) {
|
||||
if (((this->actor.params & 0xF0) == 0x90) && (this->unk_1E0.unk_00 == 2)) {
|
||||
if (((this->actor.params & 0xF0) == 0x90) && (this->interactInfo.talkState == NPC_TALK_STATE_ACTION)) {
|
||||
if (gSaveContext.bgsFlag) {
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_EYE_DROPS) {
|
||||
EnGo_ChangeAnim(this, ENGO_ANIM_2);
|
||||
this->unk_21E = 100;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
EnGo_SetupAction(this, EnGo_Eyedrops);
|
||||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
gSaveContext.subTimerState = SUBTIMER_STATE_OFF;
|
||||
OnePointCutscene_Init(play, 4190, -99, &this->actor, CAM_ID_MAIN);
|
||||
} else {
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
Message_CloseTextbox(play);
|
||||
EnGo_GetItem(this, play);
|
||||
}
|
||||
}
|
||||
} else if (((this->actor.params & 0xF0) == 0) && (this->unk_1E0.unk_00 == 2)) {
|
||||
} else if (((this->actor.params & 0xF0) == 0) && (this->interactInfo.talkState == NPC_TALK_STATE_ACTION)) {
|
||||
EnGo_SetupAction(this, EnGo_GetItem);
|
||||
play->msgCtx.stateTimer = 4;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
|
@ -947,7 +948,7 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
|
|||
s32 getItemId;
|
||||
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->unk_1E0.unk_00 = 2;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_ACTION;
|
||||
this->actor.parent = NULL;
|
||||
EnGo_SetupAction(this, func_80A40C78);
|
||||
} else {
|
||||
|
@ -976,21 +977,21 @@ void EnGo_GetItem(EnGo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A40C78(EnGo* this, PlayState* play) {
|
||||
if (this->unk_1E0.unk_00 == 3) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN) {
|
||||
EnGo_SetupAction(this, EnGo_BiggoronActionFunc);
|
||||
if ((this->actor.params & 0xF0) != 0x90) {
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
} else if (this->unk_20C) {
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
gSaveContext.bgsFlag = true;
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_PRESCRIPTION) {
|
||||
this->actor.textId = 0x3058;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
this->unk_1E0.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
} else if (INV_CONTENT(ITEM_TRADE_ADULT) == ITEM_CLAIM_CHECK) {
|
||||
this->actor.textId = 0x305C;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
this->unk_1E0.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
Environment_ClearBgsDayCount();
|
||||
}
|
||||
}
|
||||
|
@ -1000,13 +1001,13 @@ void EnGo_Eyedrops(EnGo* this, PlayState* play) {
|
|||
if (DECR(this->unk_21E) == 0) {
|
||||
this->actor.textId = 0x305A;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
this->unk_1E0.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
EnGo_SetupAction(this, func_80A40DCC);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A40DCC(EnGo* this, PlayState* play) {
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
EnGo_ChangeAnim(this, ENGO_ANIM_1);
|
||||
this->skelAnime.curFrame = Animation_GetLastFrame(&gGoronAnim_004930);
|
||||
Message_CloseTextbox(play);
|
||||
|
@ -1030,7 +1031,7 @@ void EnGo_Update(Actor* thisx, PlayState* play) {
|
|||
|
||||
EnGo_UpdateShadow(this);
|
||||
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
}
|
||||
|
||||
|
@ -1085,7 +1086,7 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Ve
|
|||
|
||||
if (limb == 17) {
|
||||
Matrix_Translate(2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec1 = this->unk_1E0.unk_08;
|
||||
vec1 = this->interactInfo.headRot;
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.y);
|
||||
Matrix_RotateX(float1, MTXMODE_APPLY);
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.x);
|
||||
|
@ -1094,7 +1095,7 @@ s32 EnGo_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, Ve
|
|||
}
|
||||
|
||||
if (limb == 10) {
|
||||
vec1 = this->unk_1E0.unk_0E;
|
||||
vec1 = this->interactInfo.torsoRot;
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.y);
|
||||
Matrix_RotateY(float1, MTXMODE_APPLY);
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.x);
|
||||
|
|
|
@ -43,7 +43,7 @@ typedef struct EnGo {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnGoActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ char unk_208[0x4];
|
||||
/* 0x020C */ s16 unk_20C;
|
||||
/* 0x020E */ s16 unk_20E;
|
||||
|
|
|
@ -41,7 +41,7 @@ EnGo2
|
|||
(this->actor.params & 0xFC00) >> 0xA - Gorons in Fire Temple
|
||||
this->actor.params & 0x1F
|
||||
|
||||
Gorons only move when this->unk_194.unk_00 == 0
|
||||
Gorons only move when this->interactInfo.talkState == NPC_TALK_STATE_IDLE
|
||||
*/
|
||||
|
||||
void EnGo2_Init(Actor* thisx, PlayState* play);
|
||||
|
@ -329,12 +329,12 @@ u16 EnGo2_GetTextIdGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
||||
s32 bombBagUpgrade;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
if (this->actor.textId == 0x3012) {
|
||||
|
@ -343,14 +343,14 @@ s16 EnGo2_GetStateGoronCityRollingBig(PlayState* play, EnGo2* this) {
|
|||
EnGo2_GetItem(this, play, bombBagUpgrade);
|
||||
Message_CloseTextbox(play);
|
||||
SET_INFTABLE(INFTABLE_11E);
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
}
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -359,14 +359,14 @@ u16 EnGo2_GetTextIdGoronDmtBombFlower(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
|
||||
// DMT Goron by Bomb Flower Choice
|
||||
s16 EnGo2_GetStateGoronDmtBombFlower(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronDmtBombFlower(PlayState* play, EnGo2* this) {
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
if ((this->actor.textId == 0x300B) && !GET_INFTABLE(INFTABLE_EB)) {
|
||||
SET_INFTABLE(INFTABLE_EB);
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
|
@ -379,11 +379,11 @@ s16 EnGo2_GetStateGoronDmtBombFlower(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -395,11 +395,11 @@ u16 EnGo2_GetTextIdGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronDmtRollingSmall(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -413,14 +413,14 @@ u16 EnGo2_GetTextIdGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronDmtDcEntrance(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3008) {
|
||||
SET_INFTABLE(INFTABLE_E0);
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -434,14 +434,14 @@ u16 EnGo2_GetTextIdGoronCityEntrance(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityEntrance(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronCityEntrance(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3014) {
|
||||
SET_INFTABLE(INFTABLE_F0);
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -455,14 +455,14 @@ u16 EnGo2_GetTextIdGoronCityIsland(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityIsland(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronCityIsland(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3016) {
|
||||
SET_INFTABLE(INFTABLE_F4);
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -479,14 +479,14 @@ u16 EnGo2_GetTextIdGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronCityLowestFloor(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3018) {
|
||||
SET_INFTABLE(INFTABLE_F8);
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -504,19 +504,19 @@ u16 EnGo2_GetTextIdGoronCityLink(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityLink(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronCityLink(PlayState* play, EnGo2* this) {
|
||||
switch (EnGo2_GetDialogState(this, play)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x3036:
|
||||
EnGo2_GetItem(this, play, GI_TUNIC_GORON);
|
||||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
case 0x3037:
|
||||
SET_INFTABLE(INFTABLE_10E);
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
|
@ -538,7 +538,7 @@ s16 EnGo2_GetStateGoronCityLink(PlayState* play, EnGo2* this) {
|
|||
} else {
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
switch (this->actor.textId) {
|
||||
|
@ -549,14 +549,14 @@ s16 EnGo2_GetStateGoronCityLink(PlayState* play, EnGo2* this) {
|
|||
case 0x3033:
|
||||
this->actor.textId = 0x3034;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
default:
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
||||
|
@ -577,7 +577,7 @@ u16 EnGo2_GetTextIdGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
||||
s32 unusedPad;
|
||||
u8 dialogState = this->dialogState;
|
||||
|
||||
|
@ -587,12 +587,12 @@ s16 EnGo2_GetStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
|||
if (!gSaveContext.bgsFlag) {
|
||||
EnGo2_GetItem(this, play, GI_SWORD_BIGGORON);
|
||||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
} else {
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
switch (this->actor.textId) {
|
||||
|
@ -613,19 +613,19 @@ s16 EnGo2_GetStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
if ((this->actor.textId == 0x3054) || (this->actor.textId == 0x3055)) {
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
EnGo2_GetItem(this, play, GI_PRESCRIPTION);
|
||||
this->actionFunc = EnGo2_SetupGetItem;
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
this->actor.textId = 0x3056;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_EVENT:
|
||||
|
@ -634,11 +634,11 @@ s16 EnGo2_GetStateGoronDmtBiggoron(PlayState* play, EnGo2* this) {
|
|||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = EnGo2_BiggoronEyedrops;
|
||||
}
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
u16 EnGo2_GetTextIdGoronFireGeneric(PlayState* play, EnGo2* this) {
|
||||
|
@ -649,21 +649,21 @@ u16 EnGo2_GetTextIdGoronFireGeneric(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronFireGeneric(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronFireGeneric(PlayState* play, EnGo2* this) {
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
if (this->actor.textId == 0x3071) {
|
||||
this->actor.textId = EnGo2_GoronFireGenericGetTextId(this);
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -671,14 +671,14 @@ u16 EnGo2_GetTextIdGoronCityStairwell(PlayState* play, EnGo2* this) {
|
|||
return !LINK_IS_ADULT ? GET_INFTABLE(INFTABLE_E3) ? 0x3022 : 0x300E : 0x3043;
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityStairwell(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronCityStairwell(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x300E) {
|
||||
SET_INFTABLE(INFTABLE_E3);
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -687,11 +687,11 @@ u16 EnGo2_GetTextIdGoronMarketBazaar(PlayState* play, EnGo2* this) {
|
|||
return 0x7122;
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronMarketBazaar(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronMarketBazaar(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -707,14 +707,14 @@ u16 EnGo2_GetTextIdGoronCityLostWoods(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronCityLostWoods(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronCityLostWoods(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
if (this->actor.textId == 0x3024) {
|
||||
SET_INFTABLE(INFTABLE_E6);
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -727,11 +727,11 @@ u16 EnGo2_GetTextIdGoronDmtFairyHint(PlayState* play, EnGo2* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnGo2_GetStateGoronDmtFairyHint(PlayState* play, EnGo2* this) {
|
||||
s16 EnGo2_UpdateTalkStateGoronDmtFairyHint(PlayState* play, EnGo2* this) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
} else {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -778,37 +778,37 @@ u16 EnGo2_GetTextId(PlayState* play, Actor* thisx) {
|
|||
#endif
|
||||
}
|
||||
|
||||
s16 EnGo2_GetState(PlayState* play, Actor* thisx) {
|
||||
s16 EnGo2_UpdateTalkState(PlayState* play, Actor* thisx) {
|
||||
EnGo2* this = (EnGo2*)thisx;
|
||||
switch (this->actor.params & 0x1F) {
|
||||
case GORON_CITY_ROLLING_BIG:
|
||||
return EnGo2_GetStateGoronCityRollingBig(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronCityRollingBig(play, this);
|
||||
case GORON_CITY_LINK:
|
||||
return EnGo2_GetStateGoronCityLink(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronCityLink(play, this);
|
||||
case GORON_DMT_BIGGORON:
|
||||
return EnGo2_GetStateGoronDmtBiggoron(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronDmtBiggoron(play, this);
|
||||
case GORON_FIRE_GENERIC:
|
||||
return EnGo2_GetStateGoronFireGeneric(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronFireGeneric(play, this);
|
||||
case GORON_DMT_BOMB_FLOWER:
|
||||
return EnGo2_GetStateGoronDmtBombFlower(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronDmtBombFlower(play, this);
|
||||
case GORON_DMT_ROLLING_SMALL:
|
||||
return EnGo2_GetStateGoronDmtRollingSmall(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronDmtRollingSmall(play, this);
|
||||
case GORON_DMT_DC_ENTRANCE:
|
||||
return EnGo2_GetStateGoronDmtDcEntrance(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronDmtDcEntrance(play, this);
|
||||
case GORON_CITY_ENTRANCE:
|
||||
return EnGo2_GetStateGoronCityEntrance(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronCityEntrance(play, this);
|
||||
case GORON_CITY_ISLAND:
|
||||
return EnGo2_GetStateGoronCityIsland(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronCityIsland(play, this);
|
||||
case GORON_CITY_LOWEST_FLOOR:
|
||||
return EnGo2_GetStateGoronCityLowestFloor(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronCityLowestFloor(play, this);
|
||||
case GORON_CITY_STAIRWELL:
|
||||
return EnGo2_GetStateGoronCityStairwell(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronCityStairwell(play, this);
|
||||
case GORON_CITY_LOST_WOODS:
|
||||
return EnGo2_GetStateGoronCityLostWoods(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronCityLostWoods(play, this);
|
||||
case GORON_DMT_FAIRY_HINT:
|
||||
return EnGo2_GetStateGoronDmtFairyHint(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronDmtFairyHint(play, this);
|
||||
case GORON_MARKET_BAZAAR:
|
||||
return EnGo2_GetStateGoronMarketBazaar(play, this);
|
||||
return EnGo2_UpdateTalkStateGoronMarketBazaar(play, this);
|
||||
}
|
||||
#ifdef AVOID_UB
|
||||
// The v0 register isn't set in this function, the last value in v0 is the return value of Actor_ProcessTalkRequest
|
||||
|
@ -819,16 +819,17 @@ s16 EnGo2_GetState(PlayState* play, Actor* thisx) {
|
|||
|
||||
s32 func_80A44790(EnGo2* this, PlayState* play) {
|
||||
if ((this->actor.params & 0x1F) != GORON_DMT_BIGGORON && (this->actor.params & 0x1F) != GORON_CITY_ROLLING_BIG) {
|
||||
return func_800343CC(play, &this->actor, &this->unk_194.unk_00, this->unk_218, EnGo2_GetTextId, EnGo2_GetState);
|
||||
return Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->unk_218, EnGo2_GetTextId,
|
||||
EnGo2_UpdateTalkState);
|
||||
} else if (((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) &&
|
||||
!(this->collider.base.ocFlags2 & OC2_HIT_PLAYER)) {
|
||||
return false;
|
||||
} else {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||
this->unk_194.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
return true;
|
||||
} else if (this->unk_194.unk_00 != 0) {
|
||||
this->unk_194.unk_00 = EnGo2_GetState(play, &this->actor);
|
||||
} else if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
this->interactInfo.talkState = EnGo2_UpdateTalkState(play, &this->actor);
|
||||
return false;
|
||||
} else if (func_8002F2CC(&this->actor, play, this->unk_218)) {
|
||||
this->actor.textId = EnGo2_GetTextId(play, &this->actor);
|
||||
|
@ -1089,9 +1090,9 @@ void func_80A45288(EnGo2* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->actionFunc != EnGo2_GoronFireGenericAction) {
|
||||
this->unk_194.unk_18 = player->actor.world.pos;
|
||||
this->unk_194.unk_14 = D_80A482D8[this->actor.params & 0x1F][((void)0, gSaveContext.linkAge)];
|
||||
func_80034A14(&this->actor, &this->unk_194, 4, this->unk_26E);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = D_80A482D8[this->actor.params & 0x1F][((void)0, gSaveContext.linkAge)];
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 4, this->trackingMode);
|
||||
}
|
||||
if ((this->actionFunc != EnGo2_SetGetItem) && (this->isAwake == true)) {
|
||||
if (func_80A44790(this, play)) {
|
||||
|
@ -1111,7 +1112,7 @@ void func_80A45360(EnGo2* this, f32* alpha) {
|
|||
void EnGo2_RollForward(EnGo2* this) {
|
||||
f32 speedXZ = this->actor.speedXZ;
|
||||
|
||||
if (this->unk_194.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -1182,13 +1183,13 @@ s32 EnGo2_IsCameraModified(EnGo2* this, PlayState* play) {
|
|||
|
||||
void EnGo2_DefaultWakingUp(EnGo2* this) {
|
||||
if (EnGo2_IsWakingUp(this)) {
|
||||
this->unk_26E = 2;
|
||||
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
} else {
|
||||
this->unk_26E = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
|
||||
if (this->unk_194.unk_00 != 0) {
|
||||
this->unk_26E = 4;
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
this->trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
}
|
||||
|
||||
this->isAwake = true;
|
||||
|
@ -1199,20 +1200,20 @@ void EnGo2_WakingUp(EnGo2* this) {
|
|||
s32 isTrue = true;
|
||||
|
||||
xyzDist = SQ(xyzDist);
|
||||
this->unk_26E = 1;
|
||||
if ((this->actor.xyzDistToPlayerSq <= xyzDist) || (this->unk_194.unk_00 != 0)) {
|
||||
this->unk_26E = 4;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
if ((this->actor.xyzDistToPlayerSq <= xyzDist) || (this->interactInfo.talkState != NPC_TALK_STATE_IDLE)) {
|
||||
this->trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
}
|
||||
|
||||
this->isAwake = isTrue;
|
||||
}
|
||||
|
||||
void EnGo2_BiggoronWakingUp(EnGo2* this) {
|
||||
if (EnGo2_IsWakingUp(this) || this->unk_194.unk_00 != 0) {
|
||||
this->unk_26E = 2;
|
||||
if (EnGo2_IsWakingUp(this) || this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
this->isAwake = true;
|
||||
} else {
|
||||
this->unk_26E = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->isAwake = false;
|
||||
}
|
||||
}
|
||||
|
@ -1221,7 +1222,7 @@ void EnGo2_SelectGoronWakingUp(EnGo2* this) {
|
|||
switch (this->actor.params & 0x1F) {
|
||||
case GORON_DMT_BOMB_FLOWER:
|
||||
this->isAwake = true;
|
||||
this->unk_26E = EnGo2_IsWakingUp(this) ? 2 : 1;
|
||||
this->trackingMode = EnGo2_IsWakingUp(this) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
||||
break;
|
||||
case GORON_FIRE_GENERIC:
|
||||
EnGo2_WakingUp(this);
|
||||
|
@ -1308,7 +1309,7 @@ void EnGo2_RollingAnimation(EnGo2* this, PlayState* play) {
|
|||
this->skelAnime.playSpeed = -1.0f;
|
||||
}
|
||||
EnGo2_SwapInitialFrameAnimFrameCount(this);
|
||||
this->unk_26E = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->unk_211 = false;
|
||||
this->isAwake = false;
|
||||
this->actionFunc = EnGo2_CurledUp;
|
||||
|
@ -1393,30 +1394,31 @@ s32 EnGo2_IsFreeingGoronInFire(EnGo2* this, PlayState* play) {
|
|||
}
|
||||
|
||||
s32 EnGo2_IsGoronDmtBombFlower(EnGo2* this) {
|
||||
if ((this->actor.params & 0x1F) != GORON_DMT_BOMB_FLOWER || this->unk_194.unk_00 != 2) {
|
||||
if ((this->actor.params & 0x1F) != GORON_DMT_BOMB_FLOWER || this->interactInfo.talkState != NPC_TALK_STATE_ACTION) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_3);
|
||||
this->unk_194.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->isAwake = false;
|
||||
this->unk_26E = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->actionFunc = EnGo2_GoronDmtBombFlowerAnimation;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 EnGo2_IsGoronRollingBig(EnGo2* this, PlayState* play) {
|
||||
if ((this->actor.params & 0x1F) != GORON_CITY_ROLLING_BIG || (this->unk_194.unk_00 != 2)) {
|
||||
if ((this->actor.params & 0x1F) != GORON_CITY_ROLLING_BIG ||
|
||||
(this->interactInfo.talkState != NPC_TALK_STATE_ACTION)) {
|
||||
return false;
|
||||
}
|
||||
this->unk_194.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
EnGo2_RollingAnimation(this, play);
|
||||
this->actionFunc = EnGo2_GoronRollingBigContinueRolling;
|
||||
return true;
|
||||
}
|
||||
|
||||
s32 EnGo2_IsGoronFireGeneric(EnGo2* this) {
|
||||
if ((this->actor.params & 0x1F) != GORON_FIRE_GENERIC || this->unk_194.unk_00 == 0) {
|
||||
if ((this->actor.params & 0x1F) != GORON_FIRE_GENERIC || this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
return false;
|
||||
}
|
||||
this->actionFunc = EnGo2_GoronFireGenericAction;
|
||||
|
@ -1432,7 +1434,7 @@ s32 EnGo2_IsGoronLinkReversing(EnGo2* this) {
|
|||
}
|
||||
|
||||
s32 EnGo2_IsRolling(EnGo2* this) {
|
||||
if (this->unk_194.unk_00 == 0 || this->actor.speedXZ < 1.0f) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE || this->actor.speedXZ < 1.0f) {
|
||||
return false;
|
||||
}
|
||||
if (EnGo2_IsRollingOnGround(this, 2, 20.0 / 3.0f, 0)) {
|
||||
|
@ -1500,7 +1502,7 @@ void EnGo2_GoronFireClearCamera(EnGo2* this, PlayState* play) {
|
|||
|
||||
void EnGo2_BiggoronAnimation(EnGo2* this) {
|
||||
if (INV_CONTENT(ITEM_TRADE_ADULT) >= ITEM_BROKEN_GORONS_SWORD && INV_CONTENT(ITEM_TRADE_ADULT) <= ITEM_EYE_DROPS &&
|
||||
(this->actor.params & 0x1F) == GORON_DMT_BIGGORON && this->unk_194.unk_00 == 0) {
|
||||
(this->actor.params & 0x1F) == GORON_DMT_BIGGORON && this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
if (DECR(this->animTimer) == 0) {
|
||||
this->animTimer = Rand_S16Offset(30, 30);
|
||||
func_800F4524(&gSfxDefaultPos, NA_SE_EN_GOLON_EYE_BIG, 60);
|
||||
|
@ -1546,7 +1548,7 @@ void EnGo2_Init(Actor* thisx, PlayState* play) {
|
|||
this->goronState = 0;
|
||||
this->waypoint = 0;
|
||||
this->unk_216 = this->actor.shape.rot.z;
|
||||
this->unk_26E = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->path = Path_GetByIndex(play, (this->actor.params & 0x3E0) >> 5, 0x1F);
|
||||
switch (this->actor.params & 0x1F) {
|
||||
case GORON_CITY_ENTRANCE:
|
||||
|
@ -1796,7 +1798,7 @@ void EnGo2_SetupGetItem(EnGo2* this, PlayState* play) {
|
|||
|
||||
void EnGo2_SetGetItem(EnGo2* this, PlayState* play) {
|
||||
if ((Message_GetState(&play->msgCtx) == TEXT_STATE_DONE) && Message_ShouldAdvance(play)) {
|
||||
this->unk_194.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
switch (this->getItemId) {
|
||||
case GI_CLAIM_CHECK:
|
||||
Environment_ClearBgsDayCount();
|
||||
|
@ -1825,7 +1827,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
|
|||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_5);
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
this->actor.shape.rot.y += 0x5B0;
|
||||
this->unk_26E = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->animTimer = this->skelAnime.endFrame + 60.0f + 60.0f; // eyeDrops animation timer
|
||||
this->eyeMouthTexState = 2;
|
||||
this->unk_20C = 0;
|
||||
|
@ -1855,7 +1857,7 @@ void EnGo2_BiggoronEyedrops(EnGo2* this, PlayState* play) {
|
|||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENGO2_ANIM_1);
|
||||
this->actor.flags |= ACTOR_FLAG_0;
|
||||
this->unk_26E = 2;
|
||||
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
this->skelAnime.curFrame = this->skelAnime.endFrame;
|
||||
EnGo2_GetItem(this, play, GI_CLAIM_CHECK);
|
||||
|
@ -1888,7 +1890,7 @@ void EnGo2_GoronLinkStopRolling(EnGo2* this, PlayState* play) {
|
|||
player->actor.freezeTimer = 10;
|
||||
} else {
|
||||
SET_INFTABLE(INFTABLE_10C);
|
||||
this->unk_26E = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->unk_211 = false;
|
||||
this->isAwake = false;
|
||||
this->actionFunc = EnGo2_CurledUp;
|
||||
|
@ -1912,8 +1914,8 @@ void EnGo2_GoronFireGenericAction(EnGo2* this, PlayState* play) {
|
|||
this->animTimer = 60;
|
||||
this->actor.gravity = 0.0f;
|
||||
this->actor.speedXZ = 2.0f;
|
||||
this->unk_194.unk_08 = D_80A4854C;
|
||||
this->unk_194.unk_0E = D_80A4854C;
|
||||
this->interactInfo.headRot = D_80A4854C;
|
||||
this->interactInfo.torsoRot = D_80A4854C;
|
||||
this->goronState++;
|
||||
this->goronState++;
|
||||
player->actor.world.rot.y = this->actor.world.rot.y;
|
||||
|
@ -1976,7 +1978,7 @@ void EnGo2_Update(Actor* thisx, PlayState* play) {
|
|||
EnGo2_RollForward(this);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, (f32)this->collider.dim.height * 0.5f,
|
||||
(f32)this->collider.dim.radius * 0.6f, 0.0f, UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
||||
if (this->unk_194.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
func_80A44AB0(this, play);
|
||||
}
|
||||
this->actionFunc(this, play);
|
||||
|
@ -2026,7 +2028,7 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
|
|||
|
||||
if (limb == 17) {
|
||||
Matrix_Translate(2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec1 = this->unk_194.unk_08;
|
||||
vec1 = this->interactInfo.headRot;
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.y);
|
||||
Matrix_RotateX(float1, MTXMODE_APPLY);
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.x);
|
||||
|
@ -2034,7 +2036,7 @@ s32 EnGo2_OverrideLimbDraw(PlayState* play, s32 limb, Gfx** dList, Vec3f* pos, V
|
|||
Matrix_Translate(-2800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limb == 10) {
|
||||
vec1 = this->unk_194.unk_0E;
|
||||
vec1 = this->interactInfo.torsoRot;
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.y);
|
||||
Matrix_RotateY(float1, MTXMODE_APPLY);
|
||||
float1 = BINANG_TO_RAD_ALT(vec1.x);
|
||||
|
|
|
@ -71,7 +71,7 @@ typedef struct EnGo2 {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnGo2ActionFunc actionFunc;
|
||||
/* 0x0194 */ struct_80034A14_arg1 unk_194;
|
||||
/* 0x0194 */ NpcInteractInfo interactInfo;
|
||||
/* 0x01BC */ ColliderCylinder collider;
|
||||
/* 0x0208 */ Path* path;
|
||||
/* 0x020C */ u8 unk_20C; // counter for GORON_CITY_LINK animation
|
||||
|
@ -94,7 +94,7 @@ typedef struct EnGo2 {
|
|||
/* 0x0224 */ s16 blinkTimer;
|
||||
/* 0x0226 */ s16 unk_226[18]; // Remains unknown
|
||||
/* 0x024A */ s16 unk_24A[18]; // Remains unknown
|
||||
/* 0x026E */ u16 unk_26E; // Remains unknown = 1, 2, or 4: used in func_80034A14
|
||||
/* 0x026E */ u16 trackingMode;
|
||||
/* 0x0270 */ EnGoEffect effects[EN_GO2_EFFECT_COUNT];
|
||||
/* 0x04A0 */ Vec3f subCamEye;
|
||||
/* 0x04AC */ Vec3f subCamAt;
|
||||
|
|
|
@ -150,13 +150,13 @@ void func_80A505CC(Actor* thisx, PlayState* play) {
|
|||
func_80A5046C(this);
|
||||
this->actionFunc(this, play);
|
||||
|
||||
this->unk_2A0.unk_18 = player->actor.world.pos;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
if (LINK_IS_ADULT) {
|
||||
this->unk_2A0.unk_14 = 10.0f;
|
||||
this->interactInfo.yOffset = 10.0f;
|
||||
} else {
|
||||
this->unk_2A0.unk_14 = 20.0f;
|
||||
this->interactInfo.yOffset = 20.0f;
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_2A0, 6, 2);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 6, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
|
||||
func_80034F54(play, this->unk_2CC, this->unk_2EC, 16);
|
||||
|
||||
|
@ -188,14 +188,14 @@ s32 EnGuest_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
if (limbIndex == 15) {
|
||||
*dList = object_boj_DL_0059B0;
|
||||
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp3C = this->unk_2A0.unk_08;
|
||||
sp3C = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp3C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp3C.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 8) {
|
||||
sp3C = this->unk_2A0.unk_0E;
|
||||
sp3C = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-sp3C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp3C.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ typedef struct EnGuest {
|
|||
/* 0x01F0 */ Vec3s morphTable[16];
|
||||
/* 0x0250 */ EnGuestActionFunc actionFunc;
|
||||
/* 0x0254 */ ColliderCylinder collider;
|
||||
/* 0x02A0 */ struct_80034A14_arg1 unk_2A0;
|
||||
/* 0x02A0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x02C8 */ s16 unk_2C8;
|
||||
/* 0x02CA */ s16 unk_2CA;
|
||||
/* 0x02CC */ s16 unk_2CC[16];
|
||||
|
|
|
@ -93,7 +93,7 @@ void EnHeishi4_Init(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc = func_80A56544;
|
||||
break;
|
||||
}
|
||||
this->unk_27C = ((thisx->params >> 8) & 0xFF);
|
||||
this->unk_27C = (thisx->params >> 8) & 0xFF;
|
||||
osSyncPrintf("\n\n");
|
||||
osSyncPrintf(VT_FGCOL(GREEN) " ☆☆☆☆☆ 兵士2セット完了! ☆☆☆☆☆ %d\n" VT_RST, thisx->params);
|
||||
osSyncPrintf(VT_FGCOL(YELLOW) " ☆☆☆☆☆ 識別完了!\t ☆☆☆☆☆ %d\n" VT_RST, this->type);
|
||||
|
@ -293,7 +293,7 @@ void func_80A56B40(EnHeishi4* this, PlayState* play) {
|
|||
s16 reactionOffset;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
reactionOffset = (this->type - 4);
|
||||
reactionOffset = this->type - 4;
|
||||
if (reactionOffset < 0) {
|
||||
reactionOffset = 0;
|
||||
}
|
||||
|
@ -347,13 +347,13 @@ void EnHeishi4_Update(Actor* thisx, PlayState* play) {
|
|||
thisx->world.pos.z = this->pos.z;
|
||||
Actor_SetFocus(thisx, this->height);
|
||||
if (this->type != HEISHI4_AT_MARKET_DYING) {
|
||||
this->unk_28C.unk_18 = player->actor.world.pos;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->unk_28C.unk_18.y = (player->actor.world.pos.y - 10.0f);
|
||||
this->interactInfo.trackPos.y = player->actor.world.pos.y - 10.0f;
|
||||
}
|
||||
func_80034A14(thisx, &this->unk_28C, 2, 4);
|
||||
this->unk_260 = this->unk_28C.unk_08;
|
||||
this->unk_266 = this->unk_28C.unk_0E;
|
||||
Npc_TrackPoint(thisx, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
|
||||
this->unk_260 = this->interactInfo.headRot;
|
||||
this->unk_266 = this->interactInfo.torsoRot;
|
||||
}
|
||||
this->unk_27E += 1;
|
||||
this->actionFunc(this, play);
|
||||
|
|
|
@ -31,7 +31,7 @@ typedef struct EnHeishi4 {
|
|||
/* 0x0282 */ s16 unk_282;
|
||||
/* 0x0284 */ s16 unk_284;
|
||||
/* 0x0288 */ f32 unk_288;
|
||||
/* 0x028C */ struct_80034A14_arg1 unk_28C;
|
||||
/* 0x028C */ NpcInteractInfo interactInfo;
|
||||
/* 0x02B4 */ u8 unk_2B4;
|
||||
/* 0x02B6 */ char unk_2B6[7];
|
||||
/* 0x02BC */ ColliderCylinder collider;
|
||||
|
|
|
@ -565,7 +565,7 @@ s16 func_80A70058(PlayState* play, Actor* thisx) {
|
|||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x709E:
|
||||
|
@ -587,7 +587,7 @@ s16 func_80A70058(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x70F0:
|
||||
|
@ -663,16 +663,16 @@ s16 func_80A70058(PlayState* play, Actor* thisx) {
|
|||
this->actionFunc = func_80A714C4;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
case TEXT_STATE_EVENT:
|
||||
if (!Message_ShouldAdvance(play)) {
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
} else {
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
void EnHy_UpdateEyes(EnHy* this) {
|
||||
|
@ -762,42 +762,46 @@ void func_80A70834(EnHy* this, PlayState* play) {
|
|||
|
||||
void func_80A70978(EnHy* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 phi_a3;
|
||||
s16 trackingMode;
|
||||
|
||||
switch (this->actor.params & 0x7F) {
|
||||
case ENHY_TYPE_BOJ_3:
|
||||
case ENHY_TYPE_BJI_7:
|
||||
case ENHY_TYPE_BOJ_9:
|
||||
case ENHY_TYPE_BOJ_10:
|
||||
phi_a3 = (this->unk_1E8.unk_00 == 0) ? 1 : 2;
|
||||
trackingMode =
|
||||
(this->interactInfo.talkState == NPC_TALK_STATE_IDLE) ? NPC_TRACKING_NONE : NPC_TRACKING_HEAD_AND_TORSO;
|
||||
break;
|
||||
case ENHY_TYPE_BOJ_12:
|
||||
phi_a3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
break;
|
||||
case ENHY_TYPE_AHG_2:
|
||||
case ENHY_TYPE_AHG_17:
|
||||
phi_a3 = 4;
|
||||
trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
break;
|
||||
case ENHY_TYPE_AOB:
|
||||
case ENHY_TYPE_BOB_18:
|
||||
phi_a3 = (this->unk_1E8.unk_00 == 0) ? 2 : 4;
|
||||
trackingMode = (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) ? NPC_TRACKING_HEAD_AND_TORSO
|
||||
: NPC_TRACKING_FULL_BODY;
|
||||
break;
|
||||
default:
|
||||
phi_a3 = 2;
|
||||
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
break;
|
||||
}
|
||||
|
||||
this->unk_1E8.unk_18 = player->actor.world.pos;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
|
||||
if (LINK_IS_ADULT) {
|
||||
this->unk_1E8.unk_14 = sInit1Info[this->actor.params & 0x7F].unkValueAdult;
|
||||
this->interactInfo.yOffset = sInit1Info[this->actor.params & 0x7F].unkValueAdult;
|
||||
} else {
|
||||
this->unk_1E8.unk_14 = sInit1Info[this->actor.params & 0x7F].unkValueChild;
|
||||
this->interactInfo.yOffset = sInit1Info[this->actor.params & 0x7F].unkValueChild;
|
||||
}
|
||||
|
||||
func_80034A14(&this->actor, &this->unk_1E8, sInit1Info[this->actor.params & 0x7F].unkPresetIndex, phi_a3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, sInit1Info[this->actor.params & 0x7F].unkPresetIndex,
|
||||
trackingMode);
|
||||
|
||||
if (func_800343CC(play, &this->actor, &this->unk_1E8.unk_00, this->unkRange, func_80A6F810, func_80A70058)) {
|
||||
if (Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->unkRange, func_80A6F810,
|
||||
func_80A70058)) {
|
||||
func_80A70834(this, play);
|
||||
}
|
||||
}
|
||||
|
@ -966,7 +970,7 @@ void EnHy_InitImpl(EnHy* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A710F8(EnHy* this, PlayState* play) {
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if (this->skelAnime.animation != &gObjOsAnim_0BFC) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_26);
|
||||
}
|
||||
|
@ -1016,11 +1020,11 @@ void func_80A7134C(EnHy* this, PlayState* play) {
|
|||
s16 yaw;
|
||||
f32 distSq;
|
||||
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_2160) && (this->unk_1E8.unk_00 != 0)) {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_2160) && (this->interactInfo.talkState != NPC_TALK_STATE_IDLE)) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_8);
|
||||
}
|
||||
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_265C) && (this->unk_1E8.unk_00 == 0)) {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_265C) && (this->interactInfo.talkState == NPC_TALK_STATE_IDLE)) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENHY_ANIM_7);
|
||||
}
|
||||
|
||||
|
@ -1082,7 +1086,7 @@ void EnHy_Update(Actor* thisx, PlayState* play) {
|
|||
SkelAnime_Update(&this->skelAnime);
|
||||
EnHy_UpdateEyes(this);
|
||||
|
||||
if (this->unk_1E8.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
}
|
||||
|
||||
|
@ -1121,14 +1125,14 @@ s32 EnHy_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if (limbIndex == 15) {
|
||||
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp48 = this->unk_1E8.unk_08;
|
||||
sp48 = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp48.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp48.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 8) {
|
||||
sp48 = this->unk_1E8.unk_0E;
|
||||
sp48 = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-sp48.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp48.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -44,7 +44,7 @@ typedef struct EnHy {
|
|||
/* 0x0198 */ s8 objBankIndexSkel1; // sets the object used when drawing the skeleton for limb <= 7 (lower part?)
|
||||
/* 0x0199 */ s8 objBankIndexOsAnime;
|
||||
/* 0x019C */ ColliderCylinder collider;
|
||||
/* 0x01E8 */ struct_80034A14_arg1 unk_1E8;
|
||||
/* 0x01E8 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0210 */ Path* path;
|
||||
/* 0x0214 */ s8 waypoint;
|
||||
/* 0x0215 */ s8 unk_215;
|
||||
|
|
|
@ -191,14 +191,14 @@ u16 func_80A79168(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
s16 func_80A791CC(PlayState* play, Actor* thisx) {
|
||||
s32 ret = 0;
|
||||
s32 ret = NPC_TALK_STATE_IDLE;
|
||||
|
||||
switch (thisx->textId) {
|
||||
case 0x2045:
|
||||
SET_INFTABLE(INFTABLE_97);
|
||||
break;
|
||||
case 0x203E:
|
||||
ret = 2;
|
||||
ret = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
case 0x203F:
|
||||
SET_EVENTCHKINF(EVENTCHKINF_11);
|
||||
|
@ -210,7 +210,7 @@ s16 func_80A791CC(PlayState* play, Actor* thisx) {
|
|||
|
||||
s16 func_80A7924C(PlayState* play, Actor* thisx) {
|
||||
EnIn* this = (EnIn*)thisx;
|
||||
s32 sp18 = 1;
|
||||
s32 sp18 = NPC_TALK_STATE_TALKING;
|
||||
|
||||
switch (this->actor.textId) {
|
||||
case 0x2030:
|
||||
|
@ -237,7 +237,7 @@ s16 func_80A7924C(PlayState* play, Actor* thisx) {
|
|||
case 0x2036:
|
||||
case 0x2037:
|
||||
if (play->msgCtx.choiceIndex == 1) {
|
||||
sp18 = 2;
|
||||
sp18 = NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
this->actor.textId = 0x201F;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
|
@ -245,7 +245,7 @@ s16 func_80A7924C(PlayState* play, Actor* thisx) {
|
|||
break;
|
||||
case 0x2038:
|
||||
if (play->msgCtx.choiceIndex == 0 && gSaveContext.rupees >= 50) {
|
||||
sp18 = 2;
|
||||
sp18 = NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
this->actor.textId = 0x2039;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
|
@ -254,7 +254,7 @@ s16 func_80A7924C(PlayState* play, Actor* thisx) {
|
|||
break;
|
||||
case 0x205B:
|
||||
if (play->msgCtx.choiceIndex == 0 && gSaveContext.rupees >= 50) {
|
||||
sp18 = 2;
|
||||
sp18 = NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
Message_ContinueTextbox(play, this->actor.textId = 0x2039);
|
||||
SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_0);
|
||||
|
@ -270,20 +270,20 @@ s16 func_80A7924C(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
s16 func_80A7949C(PlayState* play, Actor* thisx) {
|
||||
s32 phi_v1 = 1;
|
||||
s32 phi_v1 = NPC_TALK_STATE_TALKING;
|
||||
|
||||
if (thisx->textId == 0x2035) {
|
||||
Rupees_ChangeBy(-10);
|
||||
thisx->textId = 0x205C;
|
||||
Message_ContinueTextbox(play, thisx->textId);
|
||||
} else {
|
||||
phi_v1 = 2;
|
||||
phi_v1 = NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
return phi_v1;
|
||||
}
|
||||
|
||||
s16 func_80A79500(PlayState* play, Actor* thisx) {
|
||||
s16 sp1E = 1;
|
||||
s16 sp1E = NPC_TALK_STATE_TALKING;
|
||||
|
||||
osSyncPrintf("message_check->(%d[%x])\n", Message_GetState(&play->msgCtx), thisx->textId);
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
|
@ -316,25 +316,25 @@ s16 func_80A79500(PlayState* play, Actor* thisx) {
|
|||
|
||||
void func_80A795C8(EnIn* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 arg3;
|
||||
s16 npcTrackingMode;
|
||||
|
||||
if (this->skelAnime.animation == &object_in_Anim_0003B4 || this->skelAnime.animation == &object_in_Anim_001BE0 ||
|
||||
this->skelAnime.animation == &object_in_Anim_013D60) {
|
||||
arg3 = 1;
|
||||
npcTrackingMode = NPC_TRACKING_NONE;
|
||||
} else {
|
||||
arg3 = 0;
|
||||
npcTrackingMode = NPC_TRACKING_PLAYER_AUTO_TURN;
|
||||
}
|
||||
if (this->actionFunc == func_80A7A568) {
|
||||
arg3 = 4;
|
||||
npcTrackingMode = NPC_TRACKING_FULL_BODY;
|
||||
}
|
||||
if (this->actionFunc == func_80A7B024) {
|
||||
this->unk_308.unk_18 = play->view.eye;
|
||||
this->unk_308.unk_14 = 60.0f;
|
||||
this->interactInfo.trackPos = play->view.eye;
|
||||
this->interactInfo.yOffset = 60.0f;
|
||||
} else {
|
||||
this->unk_308.unk_18 = player->actor.world.pos;
|
||||
this->unk_308.unk_14 = 16.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = 16.0f;
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_308, 1, arg3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 1, npcTrackingMode);
|
||||
}
|
||||
|
||||
void func_80A79690(SkelAnime* skelAnime, EnIn* this, PlayState* play) {
|
||||
|
@ -433,7 +433,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) {
|
|||
play->transitionType = transitionType;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
func_8002DF54(play, &this->actor, 8);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
if (index == 0) {
|
||||
AREG(6) = 0;
|
||||
}
|
||||
|
@ -457,10 +457,10 @@ void func_80A79C78(EnIn* this, PlayState* play) {
|
|||
subCamEye.z = subCamAt.z + 40.0f;
|
||||
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
|
||||
this->actor.shape.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &subCamEye);
|
||||
this->unk_308.unk_08 = zeroVec;
|
||||
this->unk_308.unk_0E = zeroVec;
|
||||
this->interactInfo.headRot = zeroVec;
|
||||
this->interactInfo.torsoRot = zeroVec;
|
||||
Message_StartTextbox(play, 0x2025, NULL);
|
||||
this->unk_308.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
player->actor.world.pos = this->actor.world.pos;
|
||||
player->actor.world.pos.x += 100.0f * Math_SinS(this->actor.shape.rot.y);
|
||||
player->actor.world.pos.z += 100.0f * Math_CosS(this->actor.shape.rot.y);
|
||||
|
@ -471,7 +471,7 @@ void func_80A79C78(EnIn* this, PlayState* play) {
|
|||
player->actor.freezeTimer = 10;
|
||||
this->actor.flags &= ~ACTOR_FLAG_0;
|
||||
Letterbox_SetSizeTarget(32);
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
}
|
||||
|
||||
static s32 D_80A7B998 = 0;
|
||||
|
@ -519,7 +519,7 @@ void func_80A79FB0(EnIn* this, PlayState* play) {
|
|||
}
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.targetMode = 6;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actionFunc = func_80A7A4BC;
|
||||
|
||||
switch (func_80A79830(this, play)) {
|
||||
|
@ -637,7 +637,7 @@ void func_80A7A4BC(EnIn* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A7A4C8(EnIn* this, PlayState* play) {
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
func_80A79BAC(this, play, 1, TRANS_TYPE_CIRCLE(TCA_NORMAL, TCC_BLACK, TCS_FAST));
|
||||
SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_1);
|
||||
SET_EVENTINF_HORSES_0F(1);
|
||||
|
@ -645,7 +645,7 @@ void func_80A7A4C8(EnIn* this, PlayState* play) {
|
|||
Environment_ForcePlaySequence(NA_BGM_HORSE);
|
||||
play->msgCtx.stateTimer = 0;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -663,12 +663,12 @@ void func_80A7A568(EnIn* this, PlayState* play) {
|
|||
func_80A79C78(this, play);
|
||||
this->actionFunc = func_80A7B024;
|
||||
gSaveContext.timerState = TIMER_STATE_OFF;
|
||||
} else if (this->unk_308.unk_00 == 2) {
|
||||
} else if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
if (gSaveContext.rupees < 50) {
|
||||
play->msgCtx.stateTimer = 4;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
return;
|
||||
}
|
||||
SET_EVENTINF_HORSES_HORSETYPE(((EnHorse*)GET_PLAYER(play)->rideActor)->type);
|
||||
|
@ -692,20 +692,20 @@ void func_80A7A568(EnIn* this, PlayState* play) {
|
|||
play->msgCtx.stateTimer = 0;
|
||||
SET_EVENTINF_HORSES_0F(1);
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A7A770(EnIn* this, PlayState* play) {
|
||||
if (this->unk_308.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
} else if (this->unk_308.unk_00 == 2) {
|
||||
} else if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
Rupees_ChangeBy(-50);
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_3);
|
||||
this->actionFunc = func_80A7A848;
|
||||
SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_7);
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
gSaveContext.eventInf[EVENTINF_HORSES_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & 0xFFFF) | EVENTINF_HORSES_05_MASK;
|
||||
if (!GET_EVENTINF(EVENTINF_HORSES_06)) {
|
||||
|
@ -716,7 +716,7 @@ void func_80A7A770(EnIn* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A7A848(EnIn* this, PlayState* play) {
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
if ((play->msgCtx.choiceIndex == 0 && gSaveContext.rupees < 50) || play->msgCtx.choiceIndex == 1) {
|
||||
SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_0);
|
||||
this->actionFunc = func_80A7A4C8;
|
||||
|
@ -727,14 +727,14 @@ void func_80A7A848(EnIn* this, PlayState* play) {
|
|||
play->msgCtx.stateTimer = 0;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
}
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
CLEAR_EVENTINF(EVENTINF_HORSES_05);
|
||||
CLEAR_EVENTINF(EVENTINF_HORSES_06);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80A7A940(EnIn* this, PlayState* play) {
|
||||
if (this->unk_308.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
return;
|
||||
}
|
||||
|
@ -744,14 +744,14 @@ void func_80A7A940(EnIn* this, PlayState* play) {
|
|||
Audio_PlayActorSfx2(&this->actor, NA_SE_VO_IN_LOST);
|
||||
}
|
||||
}
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
func_80A79BAC(this, play, 2, TRANS_TYPE_CIRCLE(TCA_STARBURST, TCC_BLACK, TCS_FAST));
|
||||
SET_EVENTINF_HORSES_STATE(EVENTINF_HORSES_STATE_2);
|
||||
SET_EVENTINF_HORSES_0F(1);
|
||||
play->msgCtx.stateTimer = 0;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
gSaveContext.eventInf[EVENTINF_HORSES_INDEX] =
|
||||
(gSaveContext.eventInf[EVENTINF_HORSES_INDEX] & 0xFFFF) | EVENTINF_HORSES_06_MASK;
|
||||
}
|
||||
|
@ -788,11 +788,11 @@ void func_80A7AA40(EnIn* this, PlayState* play) {
|
|||
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
|
||||
this->actor.textId = 0x203B;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->unk_308.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
this->unk_1FC = 0;
|
||||
play->csCtx.frames = 0;
|
||||
Letterbox_SetSizeTarget(32);
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
this->actionFunc = func_80A7ABD4;
|
||||
}
|
||||
|
||||
|
@ -813,16 +813,16 @@ void func_80A7ABD4(EnIn* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if (this->unk_308.unk_00 != 0) {
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
if (this->actor.textId == 0x203B) {
|
||||
this->actor.textId = 0x203C;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->unk_308.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
EnIn_ChangeAnim(this, ENIN_ANIM_3);
|
||||
} else {
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -857,7 +857,7 @@ void func_80A7AE84(EnIn* this, PlayState* play) {
|
|||
Play_ChangeCameraStatus(play, this->returnToCamId, CAM_STAT_ACTIVE);
|
||||
Play_ClearCamera(play, this->subCamId);
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
Interface_ChangeAlpha(0x32);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
this->actionFunc = func_80A7AEF0;
|
||||
}
|
||||
|
||||
|
@ -874,10 +874,10 @@ void func_80A7AEF0(EnIn* this, PlayState* play) {
|
|||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
this->actionFunc = func_80A7B018;
|
||||
} else if (this->unk_308.unk_00 == 2) {
|
||||
} else if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
play->msgCtx.stateTimer = 4;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -891,7 +891,7 @@ void func_80A7B024(EnIn* this, PlayState* play) {
|
|||
player->rideActor->freezeTimer = 10;
|
||||
}
|
||||
player->actor.freezeTimer = 10;
|
||||
if (this->unk_308.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
if (1) {}
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_1B) && GET_INFTABLE(INFTABLE_AB)) {
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1B);
|
||||
|
@ -902,7 +902,7 @@ void func_80A7B024(EnIn* this, PlayState* play) {
|
|||
SET_EVENTINF_HORSES_0F(1);
|
||||
play->msgCtx.stateTimer = 4;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
this->unk_308.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -930,13 +930,13 @@ void EnIn_Update(Actor* thisx, PlayState* play) {
|
|||
if (this->actionFunc != func_80A7A304) {
|
||||
func_80A79AB4(this, play);
|
||||
if ((gSaveContext.subTimerSeconds < 6) && (gSaveContext.subTimerState != SUBTIMER_STATE_OFF) &&
|
||||
(this->unk_308.unk_00 == 0)) {
|
||||
this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
if (Actor_ProcessTalkRequest(&this->actor, play)) {}
|
||||
} else {
|
||||
func_800343CC(play, &this->actor, &this->unk_308.unk_00,
|
||||
((this->actor.targetMode == 6) ? 80.0f : 320.0f) + this->collider.dim.radius, func_80A79168,
|
||||
func_80A79500);
|
||||
if (this->unk_308.unk_00 != 0) {
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState,
|
||||
((this->actor.targetMode == 6) ? 80.0f : 320.0f) + this->collider.dim.radius,
|
||||
func_80A79168, func_80A79500);
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
this->unk_1FA = this->unk_1F8;
|
||||
this->unk_1F8 = Message_GetState(&play->msgCtx);
|
||||
}
|
||||
|
@ -956,13 +956,13 @@ s32 EnIn_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
}
|
||||
if (limbIndex == INGO_HEAD_LIMB) {
|
||||
Matrix_Translate(1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp2C = this->unk_308.unk_08;
|
||||
sp2C = this->interactInfo.headRot;
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp2C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp2C.y), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1500.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == INGO_CHEST_LIMB) {
|
||||
sp2C = this->unk_308.unk_0E;
|
||||
sp2C = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp2C.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(sp2C.y), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef struct EnIn {
|
|||
/* 0x0276 */ Vec3s morphTable[INGO_LIMB_MAX];
|
||||
/* 0x02F0 */ Vec3f subCamAtOffset;
|
||||
/* 0x02FC */ Vec3f subCamEyeOffset;
|
||||
/* 0x0308 */ struct_80034A14_arg1 unk_308;
|
||||
/* 0x0308 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0330 */ Vec3s unk_330[INGO_LIMB_MAX];
|
||||
} EnIn; // size = 0x03A8
|
||||
|
||||
|
|
|
@ -90,93 +90,116 @@ static EnKoSkeleton sSkeleton[2] = {
|
|||
};
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ENKO_ANIM_0,
|
||||
/* 1 */ ENKO_ANIM_1,
|
||||
/* 2 */ ENKO_ANIM_2,
|
||||
/* 3 */ ENKO_ANIM_3,
|
||||
/* 4 */ ENKO_ANIM_4,
|
||||
/* 5 */ ENKO_ANIM_5,
|
||||
/* 6 */ ENKO_ANIM_6,
|
||||
/* 7 */ ENKO_ANIM_7,
|
||||
/* 8 */ ENKO_ANIM_8,
|
||||
/* 9 */ ENKO_ANIM_9,
|
||||
/* 10 */ ENKO_ANIM_10,
|
||||
/* 11 */ ENKO_ANIM_11,
|
||||
/* 12 */ ENKO_ANIM_12,
|
||||
/* 13 */ ENKO_ANIM_13,
|
||||
/* 14 */ ENKO_ANIM_14,
|
||||
/* 15 */ ENKO_ANIM_15,
|
||||
/* 16 */ ENKO_ANIM_16,
|
||||
/* 17 */ ENKO_ANIM_17,
|
||||
/* 18 */ ENKO_ANIM_18,
|
||||
/* 19 */ ENKO_ANIM_19,
|
||||
/* 20 */ ENKO_ANIM_20,
|
||||
/* 21 */ ENKO_ANIM_21,
|
||||
/* 22 */ ENKO_ANIM_22,
|
||||
/* 23 */ ENKO_ANIM_23,
|
||||
/* 24 */ ENKO_ANIM_24,
|
||||
/* 25 */ ENKO_ANIM_25,
|
||||
/* 26 */ ENKO_ANIM_26,
|
||||
/* 27 */ ENKO_ANIM_27,
|
||||
/* 28 */ ENKO_ANIM_28,
|
||||
/* 29 */ ENKO_ANIM_29,
|
||||
/* 30 */ ENKO_ANIM_30,
|
||||
/* 31 */ ENKO_ANIM_31,
|
||||
/* 32 */ ENKO_ANIM_32,
|
||||
/* 33 */ ENKO_ANIM_33
|
||||
/* 0 */ ENKO_ANIM_BLOCKING_NOMORPH,
|
||||
/* 1 */ ENKO_ANIM_BLOCKING_NOMORPH_STATIC,
|
||||
/* 2 */ ENKO_ANIM_STANDUP_1,
|
||||
/* 3 */ ENKO_ANIM_STANDUP_2,
|
||||
/* 4 */ ENKO_ANIM_STANDUP_3,
|
||||
/* 5 */ ENKO_ANIM_IDLE_NOMORPH,
|
||||
/* 6 */ ENKO_ANIM_IDLE,
|
||||
/* 7 */ ENKO_ANIM_LAUGHING,
|
||||
/* 8 */ ENKO_ANIM_LIFTING_ROCK_NOMORPH,
|
||||
/* 9 */ ENKO_ANIM_RECLINED_STANDING,
|
||||
/* 10 */ ENKO_ANIM_RECLINED_SITTING_UP,
|
||||
/* 11 */ ENKO_ANIM_PUNCHING_NOMORPH,
|
||||
/* 12 */ ENKO_ANIM_STANDING_HAND_ON_CHEST,
|
||||
/* 13 */ ENKO_ANIM_STANDING_HANDS_ON_HIPS,
|
||||
/* 14 */ ENKO_ANIM_SITTING,
|
||||
/* 15 */ ENKO_ANIM_SITTING_CROSSED_ARMS_LEGS,
|
||||
/* 16 */ ENKO_ANIM_STANDING_APPREHENSIVE,
|
||||
/* 17 */ ENKO_ANIM_LEANING_ON_ARMS,
|
||||
/* 18 */ ENKO_ANIM_RECLINED_LEANING_BACK,
|
||||
/* 19 */ ENKO_ANIM_CUTTING_GRASS_NOMORPH,
|
||||
/* 20 */ ENKO_ANIM_BACKFLIP,
|
||||
/* 21 */ ENKO_ANIM_LEANING_FORWARD,
|
||||
/* 22 */ ENKO_ANIM_STANDING_RIGHT_ARM_UP,
|
||||
/* 23 */ ENKO_ANIM_STANDING_ARMS_BEHIND_BACK,
|
||||
/* 24 */ ENKO_ANIM_STANDING,
|
||||
/* 25 */ ENKO_ANIM_SITTING_CROSSED_LEGS,
|
||||
/* 26 */ ENKO_ANIM_SITTING_ARMS_UP,
|
||||
/* 27 */ ENKO_ANIM_SITTING_HEAD_ON_HAND,
|
||||
/* 28 */ ENKO_ANIM_SITTING_DIGGING,
|
||||
/* 29 */ ENKO_ANIM_BLOCKING_STATIC,
|
||||
/* 30 */ ENKO_ANIM_CUTTING_GRASS,
|
||||
/* 31 */ ENKO_ANIM_PUNCHING,
|
||||
/* 32 */ ENKO_ANIM_WIPING_FOREHEAD,
|
||||
/* 33 */ ENKO_ANIM_LIFTING_ROCK
|
||||
} EnKoAnimation;
|
||||
|
||||
static AnimationInfo sAnimationInfo[] = {
|
||||
{ &gObjOsAnim_8F6C, 1.0f, 2.0f, 14.0f, ANIMMODE_LOOP_PARTIAL, 0.0f },
|
||||
{ &gObjOsAnim_8F6C, 0.0f, 1.0f, 1.0f, ANIMMODE_LOOP_PARTIAL, 0.0f },
|
||||
{ &gObjOsAnim_9B64, 0.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gObjOsAnim_9B64, 0.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gObjOsAnim_9B64, 0.0f, 2.0f, 2.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gObjOsAnim_62DC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_62DC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
|
||||
{ &gObjOsAnim_5808, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
|
||||
{ &gObjOsAnim_7830, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_8178, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_65E0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_879C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_7FFC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_80B4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_91AC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_6F9C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_7064, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_7120, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_7F38, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_7D94, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_6EE0, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_98EC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_90EC, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_982C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_9274, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_99A4, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_9028, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_7E64, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_7454, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gObjOsAnim_8F6C, 0.0f, 1.0f, 1.0f, ANIMMODE_LOOP_PARTIAL, -8.0f },
|
||||
{ &gObjOsAnim_7D94, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gObjOsAnim_879C, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gObjOsAnim_6A60, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gObjOsAnim_7830, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gKokiriBlockingAnim, 1.0f, 2.0f, 14.0f, ANIMMODE_LOOP_PARTIAL, 0.0f },
|
||||
{ &gKokiriBlockingAnim, 0.0f, 1.0f, 1.0f, ANIMMODE_LOOP_PARTIAL, 0.0f },
|
||||
{ &gKokiriStandUpAnim, 0.0f, 0.0f, 0.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gKokiriStandUpAnim, 0.0f, 1.0f, 1.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gKokiriStandUpAnim, 0.0f, 2.0f, 2.0f, ANIMMODE_ONCE, 0.0f },
|
||||
{ &gKokiriIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriIdleAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
|
||||
{ &gKokiriLaughingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -10.0f },
|
||||
{ &gKokiriLiftingRockAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriRecliningStandingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriRecliningSittingUpAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriPunchingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriStandingHandOnChestAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriStandingHandsOnHipsAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriSittingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriSittingCrossedArmsLegsAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriStandingApprehensiveAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriLeaningOnArmsAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriRecliningLeaningBackAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriCuttingGrassAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriBackflipAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriLeaningForwardAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriStandingRightArmUpAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriStandingArmsBehindBackAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriStandingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriSittingCrossedLegsAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriSittingArmsUpAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriSittingHeadOnHandAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriSittingDiggingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, 0.0f },
|
||||
{ &gKokiriBlockingAnim, 0.0f, 1.0f, 1.0f, ANIMMODE_LOOP_PARTIAL, -8.0f },
|
||||
{ &gKokiriCuttingGrassAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gKokiriPunchingAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gKokiriWipingForeheadAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
{ &gKokiriLiftingRockAnim, 1.0f, 0.0f, -1.0f, ANIMMODE_LOOP, -8.0f },
|
||||
};
|
||||
|
||||
static u8 sOsAnimeLookup[13][5] = {
|
||||
/* ENKO_TYPE_CHILD_0 */ { ENKO_ANIM_8, ENKO_ANIM_9, ENKO_ANIM_9, ENKO_ANIM_14, ENKO_ANIM_11 },
|
||||
/* ENKO_TYPE_CHILD_1 */ { ENKO_ANIM_2, ENKO_ANIM_12, ENKO_ANIM_2, ENKO_ANIM_13, ENKO_ANIM_13 },
|
||||
/* ENKO_TYPE_CHILD_2 */ { ENKO_ANIM_11, ENKO_ANIM_11, ENKO_ANIM_11, ENKO_ANIM_15, ENKO_ANIM_9 },
|
||||
/* ENKO_TYPE_CHILD_3 */ { ENKO_ANIM_0, ENKO_ANIM_16, ENKO_ANIM_16, ENKO_ANIM_17, ENKO_ANIM_18 },
|
||||
/* ENKO_TYPE_CHILD_4 */ { ENKO_ANIM_19, ENKO_ANIM_19, ENKO_ANIM_20, ENKO_ANIM_10, ENKO_ANIM_9 },
|
||||
/* ENKO_TYPE_CHILD_5 */ { ENKO_ANIM_3, ENKO_ANIM_3, ENKO_ANIM_3, ENKO_ANIM_3, ENKO_ANIM_3 },
|
||||
/* ENKO_TYPE_CHILD_6 */ { ENKO_ANIM_4, ENKO_ANIM_22, ENKO_ANIM_22, ENKO_ANIM_4, ENKO_ANIM_23 },
|
||||
/* ENKO_TYPE_CHILD_7 */ { ENKO_ANIM_24, ENKO_ANIM_16, ENKO_ANIM_16, ENKO_ANIM_25, ENKO_ANIM_16 },
|
||||
/* ENKO_TYPE_CHILD_8 */ { ENKO_ANIM_26, ENKO_ANIM_15, ENKO_ANIM_15, ENKO_ANIM_26, ENKO_ANIM_15 },
|
||||
/* ENKO_TYPE_CHILD_9 */ { ENKO_ANIM_3, ENKO_ANIM_3, ENKO_ANIM_3, ENKO_ANIM_27, ENKO_ANIM_27 },
|
||||
/* ENKO_TYPE_CHILD_10 */ { ENKO_ANIM_2, ENKO_ANIM_2, ENKO_ANIM_2, ENKO_ANIM_2, ENKO_ANIM_22 },
|
||||
/* ENKO_TYPE_CHILD_11 */ { ENKO_ANIM_14, ENKO_ANIM_14, ENKO_ANIM_14, ENKO_ANIM_14, ENKO_ANIM_14 },
|
||||
/* ENKO_TYPE_CHILD_FADO */ { ENKO_ANIM_5, ENKO_ANIM_5, ENKO_ANIM_5, ENKO_ANIM_5, ENKO_ANIM_5 },
|
||||
/* ENKO_TYPE_CHILD_0 */ { ENKO_ANIM_LIFTING_ROCK_NOMORPH, ENKO_ANIM_RECLINED_STANDING,
|
||||
ENKO_ANIM_RECLINED_STANDING, ENKO_ANIM_SITTING, ENKO_ANIM_PUNCHING_NOMORPH },
|
||||
/* ENKO_TYPE_CHILD_1 */
|
||||
{ ENKO_ANIM_STANDUP_1, ENKO_ANIM_STANDING_HAND_ON_CHEST, ENKO_ANIM_STANDUP_1, ENKO_ANIM_STANDING_HANDS_ON_HIPS,
|
||||
ENKO_ANIM_STANDING_HANDS_ON_HIPS },
|
||||
/* ENKO_TYPE_CHILD_2 */
|
||||
{ ENKO_ANIM_PUNCHING_NOMORPH, ENKO_ANIM_PUNCHING_NOMORPH, ENKO_ANIM_PUNCHING_NOMORPH,
|
||||
ENKO_ANIM_SITTING_CROSSED_ARMS_LEGS, ENKO_ANIM_RECLINED_STANDING },
|
||||
/* ENKO_TYPE_CHILD_3 */
|
||||
{ ENKO_ANIM_BLOCKING_NOMORPH, ENKO_ANIM_STANDING_APPREHENSIVE, ENKO_ANIM_STANDING_APPREHENSIVE,
|
||||
ENKO_ANIM_LEANING_ON_ARMS, ENKO_ANIM_RECLINED_LEANING_BACK },
|
||||
/* ENKO_TYPE_CHILD_4 */
|
||||
{ ENKO_ANIM_CUTTING_GRASS_NOMORPH, ENKO_ANIM_CUTTING_GRASS_NOMORPH, ENKO_ANIM_BACKFLIP,
|
||||
ENKO_ANIM_RECLINED_SITTING_UP, ENKO_ANIM_RECLINED_STANDING },
|
||||
/* ENKO_TYPE_CHILD_5 */
|
||||
{ ENKO_ANIM_STANDUP_2, ENKO_ANIM_STANDUP_2, ENKO_ANIM_STANDUP_2, ENKO_ANIM_STANDUP_2, ENKO_ANIM_STANDUP_2 },
|
||||
/* ENKO_TYPE_CHILD_6 */
|
||||
{ ENKO_ANIM_STANDUP_3, ENKO_ANIM_STANDING_RIGHT_ARM_UP, ENKO_ANIM_STANDING_RIGHT_ARM_UP, ENKO_ANIM_STANDUP_3,
|
||||
ENKO_ANIM_STANDING_ARMS_BEHIND_BACK },
|
||||
/* ENKO_TYPE_CHILD_7 */
|
||||
{ ENKO_ANIM_STANDING, ENKO_ANIM_STANDING_APPREHENSIVE, ENKO_ANIM_STANDING_APPREHENSIVE,
|
||||
ENKO_ANIM_SITTING_CROSSED_LEGS, ENKO_ANIM_STANDING_APPREHENSIVE },
|
||||
/* ENKO_TYPE_CHILD_8 */
|
||||
{ ENKO_ANIM_SITTING_ARMS_UP, ENKO_ANIM_SITTING_CROSSED_ARMS_LEGS, ENKO_ANIM_SITTING_CROSSED_ARMS_LEGS,
|
||||
ENKO_ANIM_SITTING_ARMS_UP, ENKO_ANIM_SITTING_CROSSED_ARMS_LEGS },
|
||||
/* ENKO_TYPE_CHILD_9 */
|
||||
{ ENKO_ANIM_STANDUP_2, ENKO_ANIM_STANDUP_2, ENKO_ANIM_STANDUP_2, ENKO_ANIM_SITTING_HEAD_ON_HAND,
|
||||
ENKO_ANIM_SITTING_HEAD_ON_HAND },
|
||||
/* ENKO_TYPE_CHILD_10 */
|
||||
{ ENKO_ANIM_STANDUP_1, ENKO_ANIM_STANDUP_1, ENKO_ANIM_STANDUP_1, ENKO_ANIM_STANDUP_1,
|
||||
ENKO_ANIM_STANDING_RIGHT_ARM_UP },
|
||||
/* ENKO_TYPE_CHILD_11 */
|
||||
{ ENKO_ANIM_SITTING, ENKO_ANIM_SITTING, ENKO_ANIM_SITTING, ENKO_ANIM_SITTING, ENKO_ANIM_SITTING },
|
||||
/* ENKO_TYPE_CHILD_FADO */
|
||||
{ ENKO_ANIM_IDLE_NOMORPH, ENKO_ANIM_IDLE_NOMORPH, ENKO_ANIM_IDLE_NOMORPH, ENKO_ANIM_IDLE_NOMORPH,
|
||||
ENKO_ANIM_IDLE_NOMORPH },
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
|
@ -530,9 +553,9 @@ s16 func_80A97738(PlayState* play, Actor* thisx) {
|
|||
SET_INFTABLE(INFTABLE_B7);
|
||||
break;
|
||||
case 0x10BA:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x10B7:
|
||||
|
@ -543,7 +566,7 @@ s16 func_80A97738(PlayState* play, Actor* thisx) {
|
|||
this->unk_210 = 1;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
case TEXT_STATE_CHOICE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
switch (this->actor.textId) {
|
||||
|
@ -566,17 +589,17 @@ s16 func_80A97738(PlayState* play, Actor* thisx) {
|
|||
FALLTHROUGH;
|
||||
case 0x10B8:
|
||||
this->actor.textId = (play->msgCtx.choiceIndex == 0) ? 0x10BA : 0x10B9;
|
||||
return (play->msgCtx.choiceIndex == 0) ? 2 : 1;
|
||||
return (play->msgCtx.choiceIndex == 0) ? NPC_TALK_STATE_ACTION : NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
return 3;
|
||||
return NPC_TALK_STATE_ITEM_GIVEN;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
s32 EnKo_GetForestQuestState(EnKo* this) {
|
||||
|
@ -661,108 +684,108 @@ s32 EnKo_IsWithinTalkAngle(EnKo* this) {
|
|||
}
|
||||
|
||||
s32 func_80A97D68(EnKo* this, PlayState* play) {
|
||||
s16 arg3;
|
||||
s16 trackingMode;
|
||||
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_6A60) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_32);
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if ((this->skelAnime.animation == &gKokiriWipingForeheadAnim) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_WIPING_FOREHEAD);
|
||||
}
|
||||
arg3 = 2;
|
||||
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
} else {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_7830) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_33);
|
||||
if ((this->skelAnime.animation == &gKokiriLiftingRockAnim) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_LIFTING_ROCK);
|
||||
}
|
||||
arg3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 2, arg3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode);
|
||||
return EnKo_IsWithinTalkAngle(this);
|
||||
}
|
||||
|
||||
s32 func_80A97E18(EnKo* this, PlayState* play) {
|
||||
s16 arg3;
|
||||
s16 trackingMode;
|
||||
|
||||
func_80034F54(play, this->unk_2E4, this->unk_304, 16);
|
||||
if (EnKo_IsWithinTalkAngle(this) == true) {
|
||||
arg3 = 2;
|
||||
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
} else {
|
||||
arg3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
arg3 = 4;
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
} else if (this->lookDist < this->actor.xzDistToPlayer) {
|
||||
arg3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 2, arg3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode);
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 func_80A97EB0(EnKo* this, PlayState* play) {
|
||||
s16 arg3;
|
||||
s16 trackingMode;
|
||||
s32 result;
|
||||
|
||||
func_80034F54(play, this->unk_2E4, this->unk_304, 16);
|
||||
result = EnKo_IsWithinTalkAngle(this);
|
||||
arg3 = (result == true) ? 2 : 1;
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 2, arg3);
|
||||
trackingMode = (result == true) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode);
|
||||
return result;
|
||||
}
|
||||
|
||||
s32 func_80A97F20(EnKo* this, PlayState* play) {
|
||||
func_80034F54(play, this->unk_2E4, this->unk_304, 16);
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 2, 4);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 func_80A97F70(EnKo* this, PlayState* play) {
|
||||
s16 arg3;
|
||||
s16 trackingMode;
|
||||
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_8F6C) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_29);
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if ((this->skelAnime.animation == &gKokiriBlockingAnim) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_BLOCKING_STATIC);
|
||||
}
|
||||
func_80034F54(play, this->unk_2E4, this->unk_304, 16);
|
||||
arg3 = 2;
|
||||
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
} else {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_7D94) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_30);
|
||||
if ((this->skelAnime.animation == &gKokiriCuttingGrassAnim) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_CUTTING_GRASS);
|
||||
}
|
||||
arg3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 5, arg3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 5, trackingMode);
|
||||
return EnKo_IsWithinTalkAngle(this);
|
||||
}
|
||||
|
||||
s32 func_80A98034(EnKo* this, PlayState* play) {
|
||||
s16 arg3;
|
||||
s16 trackingMode;
|
||||
s32 result;
|
||||
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_8F6C) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_29);
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if ((this->skelAnime.animation == &gKokiriBlockingAnim) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_BLOCKING_STATIC);
|
||||
}
|
||||
func_80034F54(play, this->unk_2E4, this->unk_304, 16);
|
||||
result = EnKo_IsWithinTalkAngle(this);
|
||||
arg3 = (result == true) ? 2 : 1;
|
||||
trackingMode = (result == true) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
||||
} else {
|
||||
if ((this->skelAnime.animation == &gObjOsAnim_879C) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_31);
|
||||
if ((this->skelAnime.animation == &gKokiriPunchingAnim) == false) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_PUNCHING);
|
||||
}
|
||||
arg3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
result = EnKo_IsWithinTalkAngle(this);
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 5, arg3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 5, trackingMode);
|
||||
return result;
|
||||
}
|
||||
|
||||
// Same as func_80A97F20
|
||||
s32 func_80A98124(EnKo* this, PlayState* play) {
|
||||
func_80034F54(play, this->unk_2E4, this->unk_304, 16);
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 2, 4);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 func_80A98174(EnKo* this, PlayState* play) {
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 18.0f)) {
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
}
|
||||
|
@ -772,7 +795,8 @@ s32 func_80A98174(EnKo* this, PlayState* play) {
|
|||
if (this->skelAnime.playSpeed == 0.0f) {
|
||||
func_80034F54(play, this->unk_2E4, this->unk_304, 16);
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 2, (this->skelAnime.playSpeed == 0.0f) ? 2 : 1);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2,
|
||||
(this->skelAnime.playSpeed == 0.0f) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE);
|
||||
return EnKo_IsWithinTalkAngle(this);
|
||||
}
|
||||
|
||||
|
@ -934,19 +958,20 @@ void func_80A9877C(EnKo* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((play->csCtx.state != 0) || (gDbgCamEnabled != 0)) {
|
||||
this->unk_1E8.unk_18 = play->view.eye;
|
||||
this->unk_1E8.unk_14 = 40.0f;
|
||||
this->interactInfo.trackPos = play->view.eye;
|
||||
this->interactInfo.yOffset = 40.0f;
|
||||
if (ENKO_TYPE != ENKO_TYPE_CHILD_0) {
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 2, 2);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
} else {
|
||||
this->unk_1E8.unk_18 = player->actor.world.pos;
|
||||
this->unk_1E8.unk_14 = func_80A97BC0(this);
|
||||
if ((func_80A98ECC(this, play) == 0) && (this->unk_1E8.unk_00 == 0)) {
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = func_80A97BC0(this);
|
||||
if ((func_80A98ECC(this, play) == 0) && (this->interactInfo.talkState == NPC_TALK_STATE_IDLE)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (func_800343CC(play, &this->actor, &this->unk_1E8.unk_00, this->lookDist, func_80A97610, func_80A97738) &&
|
||||
if (Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->lookDist, func_80A97610,
|
||||
func_80A97738) &&
|
||||
ENKO_TYPE == ENKO_TYPE_CHILD_FADO && play->sceneId == SCENE_SPOT10) {
|
||||
this->actor.textId = INV_CONTENT(ITEM_TRADE_ADULT) > ITEM_ODD_POTION ? 0x10B9 : 0x10DF;
|
||||
|
||||
|
@ -1171,10 +1196,11 @@ void func_80A99048(EnKo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A99384(EnKo* this, PlayState* play) {
|
||||
if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->unk_1E8.unk_00 != 0 && this->actor.textId == 0x10B9) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_7);
|
||||
if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->interactInfo.talkState != NPC_TALK_STATE_IDLE &&
|
||||
this->actor.textId == 0x10B9) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_LAUGHING);
|
||||
this->actionFunc = func_80A99438;
|
||||
} else if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->unk_1E8.unk_00 == 2) {
|
||||
} else if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
this->actionFunc = func_80A99504;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
|
@ -1182,13 +1208,13 @@ void func_80A99384(EnKo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A99438(EnKo* this, PlayState* play) {
|
||||
if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->unk_1E8.unk_00 == 2) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_6);
|
||||
if (ENKO_TYPE == ENKO_TYPE_CHILD_FADO && this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_IDLE);
|
||||
this->actionFunc = func_80A99504;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
} else if (this->unk_1E8.unk_00 == 0 || this->actor.textId != 0x10B9) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_6);
|
||||
} else if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE || this->actor.textId != 0x10B9) {
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENKO_ANIM_IDLE);
|
||||
this->actionFunc = func_80A99384;
|
||||
}
|
||||
}
|
||||
|
@ -1203,10 +1229,10 @@ void func_80A99504(EnKo* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80A99560(EnKo* this, PlayState* play) {
|
||||
if (this->unk_1E8.unk_00 == 3) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN) {
|
||||
this->actor.textId = 0x10B9;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
this->unk_1E8.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
SET_ITEMGETINF(ITEMGETINF_31);
|
||||
this->actionFunc = func_80A99384;
|
||||
}
|
||||
|
@ -1224,7 +1250,7 @@ void func_80A995CC(EnKo* this, PlayState* play) {
|
|||
this->actor.world.pos.z += 80.0f * Math_CosS(homeYawToPlayer);
|
||||
this->actor.shape.rot.y = this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
|
||||
if (this->unk_1E8.unk_00 == 0 || !this->actor.isTargeted) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE || !this->actor.isTargeted) {
|
||||
temp_f2 = fabsf((f32)this->actor.yawTowardsPlayer - homeYawToPlayer) * 0.001f * 3.0f;
|
||||
if (temp_f2 < 1.0f) {
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
|
@ -1252,7 +1278,7 @@ void EnKo_Update(Actor* thisx, PlayState* play) {
|
|||
func_80A98DB4(this, play);
|
||||
}
|
||||
}
|
||||
if (this->unk_1E8.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
Actor_MoveForward(&this->actor);
|
||||
}
|
||||
if (func_80A97C7C(this)) {
|
||||
|
@ -1288,13 +1314,13 @@ s32 EnKo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
gSegments[6] = VIRTUAL_TO_PHYSICAL(play->objectCtx.status[this->legsObjectBankIdx].segment);
|
||||
}
|
||||
if (limbIndex == 8) {
|
||||
sp40 = this->unk_1E8.unk_0E;
|
||||
sp40 = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-sp40.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp40.x), MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 15) {
|
||||
Matrix_Translate(1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp40 = this->unk_1E8.unk_08;
|
||||
sp40 = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp40.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp40.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
|
|
@ -18,7 +18,7 @@ typedef struct EnKo {
|
|||
/* 0x0197 */ s8 osAnimeBankIndex;
|
||||
/* 0x0198 */ ColliderCylinder collider;
|
||||
/* 0x01E4 */ Path* path;
|
||||
/* 0x01E8 */ struct_80034A14_arg1 unk_1E8;
|
||||
/* 0x01E8 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0210 */ u8 unk_210; // block trade quest sfx
|
||||
/* 0x0212 */ s16 forestQuestState;
|
||||
/* 0x0214 */ s16 blinkTimer;
|
||||
|
|
|
@ -117,18 +117,18 @@ u16 EnKz_GetText(PlayState* play, Actor* thisx) {
|
|||
|
||||
s16 func_80A9C6C0(PlayState* play, Actor* thisx) {
|
||||
EnKz* this = (EnKz*)thisx;
|
||||
s16 ret = 1;
|
||||
s16 ret = NPC_TALK_STATE_TALKING;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_DONE:
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
switch (this->actor.textId) {
|
||||
case 0x4012:
|
||||
SET_INFTABLE(INFTABLE_139);
|
||||
ret = 2;
|
||||
ret = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
case 0x401B:
|
||||
ret = !Message_ShouldAdvance(play) ? 1 : 2;
|
||||
ret = !Message_ShouldAdvance(play) ? NPC_TALK_STATE_TALKING : NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
case 0x401F:
|
||||
SET_INFTABLE(INFTABLE_139);
|
||||
|
@ -155,7 +155,7 @@ s16 func_80A9C6C0(PlayState* play, Actor* thisx) {
|
|||
if (this->actor.textId == 0x4014) {
|
||||
if (play->msgCtx.choiceIndex == 0) {
|
||||
EnKz_SetupGetItem(this, play);
|
||||
ret = 2;
|
||||
ret = NPC_TALK_STATE_ACTION;
|
||||
} else {
|
||||
this->actor.textId = 0x4016;
|
||||
Message_ContinueTextbox(play, this->actor.textId);
|
||||
|
@ -164,7 +164,7 @@ s16 func_80A9C6C0(PlayState* play, Actor* thisx) {
|
|||
break;
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
ret = 2;
|
||||
ret = NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_NONE:
|
||||
|
@ -188,8 +188,8 @@ void EnKz_UpdateEyes(EnKz* this) {
|
|||
}
|
||||
}
|
||||
|
||||
s32 func_80A9C95C(PlayState* play, EnKz* this, s16* arg2, f32 unkf, callback1_800343CC callback1,
|
||||
callback2_800343CC callback2) {
|
||||
s32 func_80A9C95C(PlayState* play, EnKz* this, s16* talkState, f32 unkf, NpcGetTextIdFunc getTextId,
|
||||
NpcUpdateTalkStateFunc updateTalkState) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 sp32;
|
||||
s16 sp30;
|
||||
|
@ -197,12 +197,12 @@ s32 func_80A9C95C(PlayState* play, EnKz* this, s16* arg2, f32 unkf, callback1_80
|
|||
f32 yaw;
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||
*arg2 = 1;
|
||||
*talkState = NPC_TALK_STATE_TALKING;
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (*arg2 != 0) {
|
||||
*arg2 = callback2(play, &this->actor);
|
||||
if (*talkState != NPC_TALK_STATE_IDLE) {
|
||||
*talkState = updateTalkState(play, &this->actor);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -227,7 +227,7 @@ s32 func_80A9C95C(PlayState* play, EnKz* this, s16* arg2, f32 unkf, callback1_80
|
|||
return 0;
|
||||
}
|
||||
this->actor.xzDistToPlayer = xzDistToPlayer;
|
||||
this->actor.textId = callback1(play, &this->actor);
|
||||
this->actor.textId = getTextId(play, &this->actor);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -235,7 +235,7 @@ s32 func_80A9C95C(PlayState* play, EnKz* this, s16* arg2, f32 unkf, callback1_80
|
|||
void func_80A9CB18(EnKz* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (func_80A9C95C(play, this, &this->unk_1E0.unk_00, 340.0f, EnKz_GetText, func_80A9C6C0)) {
|
||||
if (func_80A9C95C(play, this, &this->interactInfo.talkState, 340.0f, EnKz_GetText, func_80A9C6C0)) {
|
||||
if ((this->actor.textId == 0x401A) && !GET_EVENTCHKINF(EVENTCHKINF_33)) {
|
||||
if (func_8002F368(play) == EXCH_ITEM_BOTTLE_RUTOS_LETTER) {
|
||||
this->actor.textId = 0x401B;
|
||||
|
@ -327,7 +327,7 @@ void EnKz_Init(Actor* thisx, PlayState* play) {
|
|||
CollisionCheck_SetInfo2(&this->actor.colChkInfo, NULL, &sColChkInfoInit);
|
||||
Actor_SetScale(&this->actor, 0.01);
|
||||
this->actor.targetMode = 3;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_0);
|
||||
|
||||
if (GET_EVENTCHKINF(EVENTCHKINF_33)) {
|
||||
|
@ -352,9 +352,9 @@ void EnKz_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnKz_PreMweepWait(EnKz* this, PlayState* play) {
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
Animation_ChangeByInfo(&this->skelanime, sAnimationInfo, ENKZ_ANIM_2);
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actionFunc = EnKz_SetupMweep;
|
||||
} else {
|
||||
func_80034F54(play, this->unk_2A6, this->unk_2BE, 12);
|
||||
|
@ -413,7 +413,7 @@ void EnKz_StopMweep(EnKz* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnKz_Wait(EnKz* this, PlayState* play) {
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
this->actionFunc = EnKz_SetupGetItem;
|
||||
EnKz_SetupGetItem(this, play);
|
||||
} else {
|
||||
|
@ -428,7 +428,7 @@ void EnKz_SetupGetItem(EnKz* this, PlayState* play) {
|
|||
|
||||
if (Actor_HasParent(&this->actor, play)) {
|
||||
this->actor.parent = NULL;
|
||||
this->unk_1E0.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
this->actionFunc = EnKz_StartTimer;
|
||||
} else {
|
||||
getItemId = this->isTrading == true ? GI_EYEBALL_FROG : GI_TUNIC_ZORA;
|
||||
|
@ -444,7 +444,7 @@ void EnKz_StartTimer(EnKz* this, PlayState* play) {
|
|||
Interface_SetSubTimer(180);
|
||||
CLEAR_EVENTINF(EVENTINF_MARATHON_ACTIVE);
|
||||
}
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actionFunc = EnKz_Wait;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef struct EnKz {
|
|||
/* 0x014C */ SkelAnime skelanime;
|
||||
/* 0x0190 */ EnKzActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ u8 sfxPlayed;
|
||||
/* 0x0209 */ u8 isTrading;
|
||||
/* 0x020A */ s16 waypoint;
|
||||
|
|
|
@ -124,7 +124,7 @@ u16 EnMa1_GetText(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
s16 func_80AA0778(PlayState* play, Actor* thisx) {
|
||||
s16 ret = 1;
|
||||
s16 ret = NPC_TALK_STATE_TALKING;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
|
@ -132,40 +132,40 @@ s16 func_80AA0778(PlayState* play, Actor* thisx) {
|
|||
case 0x2041:
|
||||
SET_INFTABLE(INFTABLE_84);
|
||||
SET_EVENTCHKINF(EVENTCHKINF_10);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x2043:
|
||||
ret = 1;
|
||||
ret = NPC_TALK_STATE_TALKING;
|
||||
break;
|
||||
case 0x2047:
|
||||
SET_EVENTCHKINF(EVENTCHKINF_15);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x2048:
|
||||
SET_INFTABLE(INFTABLE_85);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x2049:
|
||||
SET_EVENTCHKINF(EVENTCHKINF_16);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x2061:
|
||||
ret = 2;
|
||||
ret = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_CHOICE:
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
ret = 2;
|
||||
ret = NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_DONE:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
ret = 3;
|
||||
ret = NPC_TALK_STATE_ITEM_GIVEN;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_NONE:
|
||||
|
@ -174,7 +174,7 @@ s16 func_80AA0778(PlayState* play, Actor* thisx) {
|
|||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
ret = 1;
|
||||
ret = NPC_TALK_STATE_TALKING;
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
|
@ -230,23 +230,23 @@ void EnMa1_ChangeAnim(EnMa1* this, s32 index) {
|
|||
|
||||
void func_80AA0AF4(EnMa1* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 phi_a3;
|
||||
s16 trackingMode;
|
||||
|
||||
if ((this->unk_1E8.unk_00 == 0) && (this->skelAnime.animation == &gMalonChildSingAnim)) {
|
||||
phi_a3 = 1;
|
||||
if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (this->skelAnime.animation == &gMalonChildSingAnim)) {
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
} else {
|
||||
phi_a3 = 0;
|
||||
trackingMode = NPC_TRACKING_PLAYER_AUTO_TURN;
|
||||
}
|
||||
|
||||
this->unk_1E8.unk_18 = player->actor.world.pos;
|
||||
this->unk_1E8.unk_18.y -= -10.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.trackPos.y -= -10.0f;
|
||||
|
||||
func_80034A14(&this->actor, &this->unk_1E8, 0, phi_a3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, trackingMode);
|
||||
}
|
||||
|
||||
void func_80AA0B74(EnMa1* this) {
|
||||
if (this->skelAnime.animation == &gMalonChildSingAnim) {
|
||||
if (this->unk_1E8.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
if (this->isNotSinging) {
|
||||
// Turn on singing
|
||||
this->isNotSinging = false;
|
||||
|
@ -280,7 +280,7 @@ void EnMa1_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.targetMode = 6;
|
||||
this->unk_1E8.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
|
||||
if (!GET_EVENTCHKINF(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
this->actionFunc = func_80AA0D88;
|
||||
|
@ -299,7 +299,7 @@ void EnMa1_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80AA0D88(EnMa1* this, PlayState* play) {
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if (this->skelAnime.animation != &gMalonChildIdleAnim) {
|
||||
EnMa1_ChangeAnim(this, ENMA1_ANIM_1);
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ void func_80AA0D88(EnMa1* this, PlayState* play) {
|
|||
if ((play->sceneId == SCENE_SPOT15) && GET_EVENTCHKINF(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE)) {
|
||||
Actor_Kill(&this->actor);
|
||||
} else if (!GET_EVENTCHKINF(EVENTCHKINF_TALON_RETURNED_FROM_CASTLE) || CHECK_QUEST_ITEM(QUEST_SONG_EPONA)) {
|
||||
if (this->unk_1E8.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
this->actionFunc = func_80AA0EA0;
|
||||
play->msgCtx.stateTimer = 4;
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
|
@ -330,8 +330,8 @@ void func_80AA0EA0(EnMa1* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80AA0EFC(EnMa1* this, PlayState* play) {
|
||||
if (this->unk_1E8.unk_00 == 3) {
|
||||
this->unk_1E8.unk_00 = 0;
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ITEM_GIVEN) {
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actionFunc = func_80AA0D88;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_12);
|
||||
play->msgCtx.msgMode = MSGMODE_TEXT_CLOSING;
|
||||
|
@ -341,7 +341,7 @@ void func_80AA0EFC(EnMa1* this, PlayState* play) {
|
|||
void func_80AA0F44(EnMa1* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->unk_1E8.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
if (this->skelAnime.animation != &gMalonChildIdleAnim) {
|
||||
EnMa1_ChangeAnim(this, ENMA1_ANIM_1);
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
|
|||
player->unk_6A8 = &this->actor;
|
||||
this->actor.textId = 0x2061;
|
||||
Message_StartTextbox(play, this->actor.textId, NULL);
|
||||
this->unk_1E8.unk_00 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
this->actionFunc = func_80AA106C;
|
||||
} else if (this->actor.xzDistToPlayer < 30.0f + (f32)this->collider.dim.radius) {
|
||||
|
@ -368,7 +368,7 @@ void func_80AA0F44(EnMa1* this, PlayState* play) {
|
|||
|
||||
void func_80AA106C(EnMa1* this, PlayState* play) {
|
||||
GET_PLAYER(play)->stateFlags2 |= PLAYER_STATE2_23;
|
||||
if (this->unk_1E8.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
AudioOcarina_SetInstrument(OCARINA_INSTRUMENT_MALON);
|
||||
func_8010BD58(play, OCARINA_ACTION_TEACH_EPONA);
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
|
@ -408,8 +408,8 @@ void EnMa1_Update(Actor* thisx, PlayState* play) {
|
|||
EnMa1_UpdateEyes(this);
|
||||
this->actionFunc(this, play);
|
||||
if (this->actionFunc != EnMa1_DoNothing) {
|
||||
func_800343CC(play, &this->actor, &this->unk_1E8.unk_00, (f32)this->collider.dim.radius + 30.0f, EnMa1_GetText,
|
||||
func_80AA0778);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, (f32)this->collider.dim.radius + 30.0f,
|
||||
EnMa1_GetText, func_80AA0778);
|
||||
}
|
||||
func_80AA0B74(this);
|
||||
func_80AA0AF4(this, play);
|
||||
|
@ -424,13 +424,13 @@ s32 EnMa1_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
}
|
||||
if (limbIndex == 15) {
|
||||
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec = this->unk_1E8.unk_08;
|
||||
vec = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(vec.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 8) {
|
||||
vec = this->unk_1E8.unk_0E;
|
||||
vec = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(-vec.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ typedef struct EnMa1 {
|
|||
/* 0x01E2 */ s16 blinkTimer;
|
||||
/* 0x01E4 */ s16 eyeIndex;
|
||||
/* 0x01E6 */ s16 mouthIndex;
|
||||
/* 0x01E8 */ struct_80034A14_arg1 unk_1E8;
|
||||
/* 0x01E8 */ NpcInteractInfo interactInfo;
|
||||
} EnMa1; // size = 0x0210
|
||||
|
||||
#endif
|
||||
|
|
|
@ -90,21 +90,21 @@ u16 func_80AA19A0(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
s16 func_80AA1A38(PlayState* play, Actor* thisx) {
|
||||
s16 ret = 1;
|
||||
s16 ret = NPC_TALK_STATE_TALKING;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x2051:
|
||||
SET_INFTABLE(INFTABLE_8C);
|
||||
ret = 2;
|
||||
ret = NPC_TALK_STATE_ACTION;
|
||||
break;
|
||||
case 0x2053:
|
||||
SET_INFTABLE(INFTABLE_8D);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -123,18 +123,18 @@ s16 func_80AA1A38(PlayState* play, Actor* thisx) {
|
|||
|
||||
void func_80AA1AE4(EnMa2* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 phi_a3;
|
||||
s16 trackingMode;
|
||||
|
||||
if ((this->unk_1E0.unk_00 == 0) && (this->skelAnime.animation == &gMalonAdultSingAnim)) {
|
||||
phi_a3 = 1;
|
||||
if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (this->skelAnime.animation == &gMalonAdultSingAnim)) {
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
} else {
|
||||
phi_a3 = 0;
|
||||
trackingMode = NPC_TRACKING_PLAYER_AUTO_TURN;
|
||||
}
|
||||
|
||||
this->unk_1E0.unk_18 = player->actor.world.pos;
|
||||
this->unk_1E0.unk_14 = 0.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = 0.0f;
|
||||
|
||||
func_80034A14(&this->actor, &this->unk_1E0, 0, phi_a3);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, trackingMode);
|
||||
}
|
||||
|
||||
u16 func_80AA1B58(EnMa2* this, PlayState* play) {
|
||||
|
@ -165,7 +165,7 @@ s32 func_80AA1C68(EnMa2* this) {
|
|||
if (this->skelAnime.animation != &gMalonAdultSingAnim) {
|
||||
return 0;
|
||||
}
|
||||
if (this->unk_1E0.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
return 0;
|
||||
}
|
||||
this->blinkTimer = 0;
|
||||
|
@ -195,7 +195,7 @@ void EnMa2_ChangeAnim(EnMa2* this, s32 index) {
|
|||
|
||||
void func_80AA1DB4(EnMa2* this, PlayState* play) {
|
||||
if (this->skelAnime.animation == &gMalonAdultSingAnim) {
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
if (this->isNotSinging) {
|
||||
// Turn on singing
|
||||
Audio_ToggleMalonSinging(false);
|
||||
|
@ -246,7 +246,7 @@ void EnMa2_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.targetMode = 6;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
|
||||
void EnMa2_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
@ -257,9 +257,9 @@ void EnMa2_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80AA2018(EnMa2* this, PlayState* play) {
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ void func_80AA21C8(EnMa2* this, PlayState* play) {
|
|||
if (DECR(this->unk_208)) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
} else {
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
this->actor.flags |= ACTOR_FLAG_16;
|
||||
Message_CloseTextbox(play);
|
||||
} else {
|
||||
|
@ -322,8 +322,8 @@ void EnMa2_Update(Actor* thisx, PlayState* play) {
|
|||
func_80AA1DB4(this, play);
|
||||
func_80AA1AE4(this, play);
|
||||
if (this->actionFunc != func_80AA20E4) {
|
||||
func_800343CC(play, &this->actor, &this->unk_1E0.unk_00, (f32)this->collider.dim.radius + 30.0f, func_80AA19A0,
|
||||
func_80AA1A38);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, (f32)this->collider.dim.radius + 30.0f,
|
||||
func_80AA19A0, func_80AA1A38);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -336,13 +336,13 @@ s32 EnMa2_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
}
|
||||
if (limbIndex == MALON_ADULT_HEAD_LIMB) {
|
||||
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec = this->unk_1E0.unk_08;
|
||||
vec = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(vec.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == MALON_ADULT_CHEST_AND_NECK_LIMB) {
|
||||
vec = this->unk_1E0.unk_0E;
|
||||
vec = this->interactInfo.torsoRot;
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(-vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-vec.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef struct EnMa2 {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnMa2ActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ s16 unk_208;
|
||||
/* 0x020A */ s16 isNotSinging;
|
||||
/* 0x020C */ s16 blinkTimer;
|
||||
|
|
|
@ -114,7 +114,7 @@ u16 func_80AA2AA0(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
|
||||
s16 ret = 1;
|
||||
s16 ret = NPC_TALK_STATE_TALKING;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_EVENT:
|
||||
|
@ -145,7 +145,7 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
|
|||
switch (thisx->textId) {
|
||||
case 0x2000:
|
||||
SET_INFTABLE(INFTABLE_B8);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x208F:
|
||||
SET_EVENTCHKINF(EVENTCHKINF_1E);
|
||||
|
@ -159,7 +159,7 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
|
|||
case 0x208E:
|
||||
CLEAR_EVENTINF(EVENTINF_HORSES_0A);
|
||||
thisx->flags &= ~ACTOR_FLAG_16;
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
gSaveContext.timerState = TIMER_STATE_STOP;
|
||||
break;
|
||||
case 0x2002:
|
||||
|
@ -167,11 +167,11 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
|
|||
FALLTHROUGH;
|
||||
case 0x2003:
|
||||
if (!GET_EVENTINF(EVENTINF_HORSES_0A)) {
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -189,17 +189,17 @@ s16 func_80AA2BD4(PlayState* play, Actor* thisx) {
|
|||
|
||||
void func_80AA2E54(EnMa3* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 phi_a3;
|
||||
s16 trackingMode;
|
||||
|
||||
if ((this->unk_1E0.unk_00 == 0) && (this->skelAnime.animation == &gMalonAdultSingAnim)) {
|
||||
phi_a3 = 1;
|
||||
if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (this->skelAnime.animation == &gMalonAdultSingAnim)) {
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
} else {
|
||||
phi_a3 = 0;
|
||||
trackingMode = NPC_TRACKING_PLAYER_AUTO_TURN;
|
||||
}
|
||||
|
||||
this->unk_1E0.unk_18 = player->actor.world.pos;
|
||||
this->unk_1E0.unk_14 = 0.0f;
|
||||
func_80034A14(&this->actor, &this->unk_1E0, 0, phi_a3);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = 0.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 0, trackingMode);
|
||||
}
|
||||
|
||||
s32 func_80AA2EC8(EnMa3* this, PlayState* play) {
|
||||
|
@ -219,7 +219,7 @@ s32 func_80AA2F28(EnMa3* this) {
|
|||
if (this->skelAnime.animation != &gMalonAdultSingAnim) {
|
||||
return 0;
|
||||
}
|
||||
if (this->unk_1E0.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
return 0;
|
||||
}
|
||||
this->blinkTimer = 0;
|
||||
|
@ -273,7 +273,7 @@ void EnMa3_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->unk_1E0.unk_00 = (u16)0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
|
||||
void EnMa3_Destroy(Actor* thisx, PlayState* play) {
|
||||
|
@ -284,9 +284,9 @@ void EnMa3_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80AA3200(EnMa3* this, PlayState* play) {
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_16;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -300,9 +300,9 @@ void EnMa3_Update(Actor* thisx, PlayState* play) {
|
|||
EnMa3_UpdateEyes(this);
|
||||
this->actionFunc(this, play);
|
||||
func_80AA2E54(this, play);
|
||||
func_800343CC(play, &this->actor, &this->unk_1E0.unk_00, (f32)this->collider.dim.radius + 150.0f, func_80AA2AA0,
|
||||
func_80AA2BD4);
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, (f32)this->collider.dim.radius + 150.0f,
|
||||
func_80AA2AA0, func_80AA2BD4);
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
if (this->isNotSinging) {
|
||||
// Turn on singing
|
||||
Audio_ToggleMalonSinging(false);
|
||||
|
@ -324,13 +324,13 @@ s32 EnMa3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
}
|
||||
if (limbIndex == MALON_ADULT_LIMB_HEAD) {
|
||||
Matrix_Translate(1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec = this->unk_1E0.unk_08;
|
||||
vec = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(vec.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1400.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == MALON_ADULT_LIMB_CHEST_AND_NECK) {
|
||||
vec = this->unk_1E0.unk_0E;
|
||||
vec = this->interactInfo.torsoRot;
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(-vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-vec.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ typedef struct EnMa3 {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnMa3ActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ s16 unk_208;
|
||||
/* 0x020A */ s16 isNotSinging;
|
||||
/* 0x020C */ s16 blinkTimer;
|
||||
|
|
|
@ -68,7 +68,7 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
|
|||
this->effectFadeInState = this->effectPrimLodFrac = this->globalState = this->effectAlpha = this->mainAlpha =
|
||||
this->subAlpha = this->copyrightAlpha = 0.0f;
|
||||
|
||||
if (gSaveContext.unk_13E7 != 0) {
|
||||
if (gSaveContext.forceRisingButtonAlphas) {
|
||||
this->mainAlpha = 210;
|
||||
this->subAlpha = 255;
|
||||
this->copyrightAlpha = 255;
|
||||
|
@ -83,7 +83,7 @@ void EnMag_Init(Actor* thisx, PlayState* play) {
|
|||
this->effectEnvColor[1] = 255.0f;
|
||||
this->effectEnvColor[2] = 0;
|
||||
|
||||
gSaveContext.unk_13E7 = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = false;
|
||||
this->globalState = MAG_STATE_DISPLAY;
|
||||
sDelayTimer = 20;
|
||||
gSaveContext.transFadeDuration = 1;
|
||||
|
|
|
@ -319,7 +319,7 @@ void func_80AAA93C(EnMd* this) {
|
|||
}
|
||||
|
||||
void func_80AAAA24(EnMd* this) {
|
||||
if (this->unk_1E0.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x102F:
|
||||
if ((this->unk_208 == 0) && (this->unk_20B != 1)) {
|
||||
|
@ -473,7 +473,7 @@ s16 func_80AAAF04(PlayState* play, Actor* thisx) {
|
|||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (this->actor.textId) {
|
||||
case 0x1028:
|
||||
|
@ -491,16 +491,16 @@ s16 func_80AAAF04(PlayState* play, Actor* thisx) {
|
|||
break;
|
||||
case 0x1033:
|
||||
case 0x1067:
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play)) {
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
default:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -539,7 +539,7 @@ void EnMd_UpdateEyes(EnMd* this) {
|
|||
void func_80AAB158(EnMd* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 absYawDiff;
|
||||
s16 temp;
|
||||
s16 trackingMode;
|
||||
s16 temp2;
|
||||
s16 yawDiff;
|
||||
|
||||
|
@ -547,40 +547,41 @@ void func_80AAB158(EnMd* this, PlayState* play) {
|
|||
yawDiff = (f32)this->actor.yawTowardsPlayer - this->actor.shape.rot.y;
|
||||
absYawDiff = ABS(yawDiff);
|
||||
|
||||
temp = (absYawDiff <= func_800347E8(2)) ? 2 : 1;
|
||||
trackingMode =
|
||||
absYawDiff <= Npc_GetTrackingPresetMaxPlayerYaw(2) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE;
|
||||
temp2 = 1;
|
||||
} else {
|
||||
temp = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
temp2 = 0;
|
||||
}
|
||||
|
||||
if (this->unk_1E0.unk_00 != 0) {
|
||||
temp = 4;
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
}
|
||||
|
||||
if (this->actionFunc == func_80AABD0C) {
|
||||
temp = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
temp2 = 0;
|
||||
}
|
||||
if (this->actionFunc == func_80AAB8F8) {
|
||||
temp = 4;
|
||||
trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
temp2 = 1;
|
||||
}
|
||||
|
||||
if ((play->csCtx.state != CS_STATE_IDLE) || gDbgCamEnabled) {
|
||||
this->unk_1E0.unk_18 = play->view.eye;
|
||||
this->unk_1E0.unk_14 = 40.0f;
|
||||
temp = 2;
|
||||
this->interactInfo.trackPos = play->view.eye;
|
||||
this->interactInfo.yOffset = 40.0f;
|
||||
trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
} else {
|
||||
this->unk_1E0.unk_18 = player->actor.world.pos;
|
||||
this->unk_1E0.unk_14 = (gSaveContext.linkAge > 0) ? 0.0f : -18.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = (gSaveContext.linkAge > 0) ? 0.0f : -18.0f;
|
||||
}
|
||||
|
||||
func_80034A14(&this->actor, &this->unk_1E0, 2, temp);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode);
|
||||
if (this->actionFunc != func_80AABC10) {
|
||||
if (temp2) {
|
||||
func_800343CC(play, &this->actor, &this->unk_1E0.unk_00, this->collider.dim.radius + 30.0f, EnMd_GetText,
|
||||
func_80AAAF04);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 30.0f,
|
||||
EnMd_GetText, func_80AAAF04);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -695,7 +696,7 @@ void EnMd_Destroy(Actor* thisx, PlayState* play) {
|
|||
void func_80AAB874(EnMd* this, PlayState* play) {
|
||||
if (this->skelAnime.animation == &gMidoHandsOnHipsIdleAnim) {
|
||||
func_80034F54(play, this->unk_214, this->unk_236, ENMD_LIMB_MAX);
|
||||
} else if ((this->unk_1E0.unk_00 == 0) && (this->unk_20B != 7)) {
|
||||
} else if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (this->unk_20B != 7)) {
|
||||
func_80AAA92C(this, 7);
|
||||
}
|
||||
|
||||
|
@ -717,7 +718,7 @@ void func_80AAB948(EnMd* this, PlayState* play) {
|
|||
|
||||
func_80AAAA24(this);
|
||||
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
|
||||
|
@ -733,7 +734,7 @@ void func_80AAB948(EnMd* this, PlayState* play) {
|
|||
this->skelAnime.playSpeed = CLAMP(temp, 1.0f, 3.0f);
|
||||
}
|
||||
|
||||
if (this->unk_1E0.unk_00 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
if (CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD) && !GET_EVENTCHKINF(EVENTCHKINF_1C) &&
|
||||
(play->sceneId == SCENE_SPOT04)) {
|
||||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
|
@ -749,7 +750,7 @@ void func_80AAB948(EnMd* this, PlayState* play) {
|
|||
func_80AAA92C(this, 3);
|
||||
func_80AAA93C(this);
|
||||
this->waypoint = 1;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actionFunc = func_80AABD0C;
|
||||
this->actor.speedXZ = 1.5f;
|
||||
return;
|
||||
|
@ -759,7 +760,7 @@ void func_80AAB948(EnMd* this, PlayState* play) {
|
|||
func_80034F54(play, this->unk_214, this->unk_236, ENMD_LIMB_MAX);
|
||||
}
|
||||
|
||||
if ((this->unk_1E0.unk_00 == 0) && (play->sceneId == SCENE_SPOT10)) {
|
||||
if ((this->interactInfo.talkState == NPC_TALK_STATE_IDLE) && (play->sceneId == SCENE_SPOT10)) {
|
||||
if (player->stateFlags2 & PLAYER_STATE2_24) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_25;
|
||||
player->unk_6A8 = &this->actor;
|
||||
|
@ -838,13 +839,13 @@ s32 EnMd_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if (limbIndex == ENMD_LIMB_HEAD) {
|
||||
Matrix_Translate(1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec = this->unk_1E0.unk_08;
|
||||
vec = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(vec.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1200.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == ENMD_LIMB_TORSO) {
|
||||
vec = this->unk_1E0.unk_0E;
|
||||
vec = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(vec.x), MTXMODE_APPLY);
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(vec.y), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ typedef struct EnMd {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnMdActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ u8 unk_208;
|
||||
/* 0x0209 */ u8 unk_209;
|
||||
/* 0x020A */ u8 unk_20A;
|
||||
|
|
|
@ -15,7 +15,7 @@ void EnMu_Update(Actor* thisx, PlayState* play);
|
|||
void EnMu_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void EnMu_Pose(EnMu* this, PlayState* play);
|
||||
s16 EnMu_CheckDialogState(PlayState* play, Actor* thisx);
|
||||
s16 EnMu_UpdateTalkState(PlayState* play, Actor* thisx);
|
||||
|
||||
static ColliderCylinderInit D_80AB0BD0 = {
|
||||
{
|
||||
|
@ -108,7 +108,7 @@ u16 EnMu_GetFaceReaction(PlayState* play, Actor* thisx) {
|
|||
return this->defFaceReaction;
|
||||
}
|
||||
|
||||
s16 EnMu_CheckDialogState(PlayState* play, Actor* thisx) {
|
||||
s16 EnMu_UpdateTalkState(PlayState* play, Actor* thisx) {
|
||||
EnMu* this = (EnMu*)thisx;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
|
@ -121,12 +121,12 @@ s16 EnMu_CheckDialogState(PlayState* play, Actor* thisx) {
|
|||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
case TEXT_STATE_CLOSING:
|
||||
EnMu_Interact(this, play);
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
default:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -172,7 +172,8 @@ void EnMu_Update(Actor* thisx, PlayState* play) {
|
|||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
this->actionFunc(this, play);
|
||||
talkDist = this->collider.dim.radius + 30.0f;
|
||||
func_800343CC(play, &this->actor, &this->npcInfo.unk_00, talkDist, EnMu_GetFaceReaction, EnMu_CheckDialogState);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->npcInfo.talkState, talkDist, EnMu_GetFaceReaction,
|
||||
EnMu_UpdateTalkState);
|
||||
|
||||
this->actor.focus.pos = this->actor.world.pos;
|
||||
this->actor.focus.pos.y += 60.0f;
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef struct EnMu {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnMuActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 npcInfo;
|
||||
/* 0x01E0 */ NpcInteractInfo npcInfo;
|
||||
/* 0x0208 */ u16 defFaceReaction;
|
||||
/* 0x020A */ s16 unk_20A[16];
|
||||
/* 0x022A */ s16 unk_22A[17];
|
||||
|
|
|
@ -152,17 +152,17 @@ void EnNb_Destroy(Actor* thisx, PlayState* play) {
|
|||
void func_80AB0FBC(EnNb* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_300.unk_18 = player->actor.world.pos;
|
||||
this->unk_300.unk_14 = kREG(16) + 9.0f;
|
||||
func_80034A14(&this->actor, &this->unk_300, kREG(17) + 0xC, 2);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) + 9.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, kREG(17) + 0xC, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
|
||||
void func_80AB1040(EnNb* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_300.unk_18 = player->actor.world.pos;
|
||||
this->unk_300.unk_14 = kREG(16) + 9.0f;
|
||||
func_80034A14(&this->actor, &this->unk_300, kREG(17) + 0xC, 4);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) + 9.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, kREG(17) + 0xC, NPC_TRACKING_FULL_BODY);
|
||||
}
|
||||
|
||||
void func_80AB10C4(EnNb* this) {
|
||||
|
@ -170,10 +170,10 @@ void func_80AB10C4(EnNb* this) {
|
|||
Vec3s* tempPtr;
|
||||
Vec3s* tempPtr2;
|
||||
|
||||
tempPtr = &this->unk_300.unk_08;
|
||||
tempPtr = &this->interactInfo.headRot;
|
||||
Math_SmoothStepToS(&tempPtr->x, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&tempPtr->y, 0, 20, 6200, 100);
|
||||
tempPtr2 = &this->unk_300.unk_0E;
|
||||
tempPtr2 = &this->interactInfo.torsoRot;
|
||||
Math_SmoothStepToS(&tempPtr2->x, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&tempPtr2->y, 0, 20, 6200, 100);
|
||||
}
|
||||
|
@ -1452,17 +1452,17 @@ void EnNb_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
s32 EnNb_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
EnNb* this = (EnNb*)thisx;
|
||||
struct_80034A14_arg1* unk_300 = &this->unk_300;
|
||||
NpcInteractInfo* interactInfo = &this->interactInfo;
|
||||
s32 ret = false;
|
||||
|
||||
if (this->headTurnFlag != 0) {
|
||||
if (limbIndex == NB_LIMB_TORSO) {
|
||||
rot->x += unk_300->unk_0E.y;
|
||||
rot->y -= unk_300->unk_0E.x;
|
||||
rot->x += interactInfo->torsoRot.y;
|
||||
rot->y -= interactInfo->torsoRot.x;
|
||||
ret = false;
|
||||
} else if (limbIndex == NB_LIMB_HEAD) {
|
||||
rot->x += unk_300->unk_08.y;
|
||||
rot->z += unk_300->unk_08.x;
|
||||
rot->x += interactInfo->headRot.y;
|
||||
rot->z += interactInfo->headRot.x;
|
||||
ret = false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ typedef struct EnNb {
|
|||
/* 0x02F0 */ Vec3f finalPos;
|
||||
/* 0x02FC */ s16 pathYaw;
|
||||
/* 0x02FE */ u16 movementTimer;
|
||||
/* 0x0300 */ struct_80034A14_arg1 unk_300;
|
||||
/* 0x0300 */ NpcInteractInfo interactInfo;
|
||||
} EnNb; // size = 0x0328
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -202,13 +202,13 @@ void EnNiwGirl_Update(Actor* thisx, PlayState* play) {
|
|||
this->unk_280 = 30.0f;
|
||||
Actor_SetFocus(&this->actor, 30.0f);
|
||||
if (tempActionFunc == this->actionFunc) {
|
||||
this->unk_2D4.unk_18 = player->actor.world.pos;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->unk_2D4.unk_18.y = player->actor.world.pos.y - 10.0f;
|
||||
this->interactInfo.trackPos.y = player->actor.world.pos.y - 10.0f;
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_2D4, 2, 4);
|
||||
this->unk_260 = this->unk_2D4.unk_08;
|
||||
this->unk_266 = this->unk_2D4.unk_0E;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
|
||||
this->unk_260 = this->interactInfo.headRot;
|
||||
this->unk_266 = this->interactInfo.torsoRot;
|
||||
} else {
|
||||
Math_SmoothStepToS(&this->unk_266.y, 0, 5, 3000, 0);
|
||||
Math_SmoothStepToS(&this->unk_260.y, 0, 5, 3000, 0);
|
||||
|
|
|
@ -29,7 +29,7 @@ typedef struct EnNiwGirl {
|
|||
/* 0x0280 */ f32 unk_280;
|
||||
/* 0x0284 */ EnNiw* chasedEnNiw;
|
||||
/* 0x0288 */ ColliderCylinder collider;
|
||||
/* 0x02D4 */ struct_80034A14_arg1 unk_2D4;
|
||||
/* 0x02D4 */ NpcInteractInfo interactInfo;
|
||||
} EnNiwGirl; // size = 0x02FC
|
||||
|
||||
#endif
|
||||
|
|
|
@ -496,13 +496,13 @@ void EnNiwLady_Update(Actor* thisx, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Actor_SetFocus(thisx, 60.0f);
|
||||
this->unk_288.unk_18 = player->actor.world.pos;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
if (!LINK_IS_ADULT) {
|
||||
this->unk_288.unk_18.y = player->actor.world.pos.y - 10.0f;
|
||||
this->interactInfo.trackPos.y = player->actor.world.pos.y - 10.0f;
|
||||
}
|
||||
func_80034A14(thisx, &this->unk_288, 2, 4);
|
||||
this->unk_254 = this->unk_288.unk_08;
|
||||
this->unk_25A = this->unk_288.unk_0E;
|
||||
Npc_TrackPoint(thisx, &this->interactInfo, 2, NPC_TRACKING_FULL_BODY);
|
||||
this->unk_254 = this->interactInfo.headRot;
|
||||
this->unk_25A = this->interactInfo.torsoRot;
|
||||
if (this->unk_276 == 0) {
|
||||
Math_SmoothStepToS(&this->unk_254.y, 0, 5, 3000, 0);
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef struct EnNiwLady {
|
|||
/* 0x0280 */ s8 objectAneIndex;
|
||||
/* 0x0281 */ s8 objectOsAnimeIndex;
|
||||
/* 0x0284 */ s32 getItemId;
|
||||
/* 0x0288 */ struct_80034A14_arg1 unk_288;
|
||||
/* 0x0288 */ NpcInteractInfo interactInfo;
|
||||
/* 0x02B0 */ ColliderCylinder collider;
|
||||
} EnNiwLady; // size = 0x02FC
|
||||
|
||||
|
|
|
@ -654,7 +654,7 @@ void EnOssan_EndInteraction(PlayState* play, EnOssan* this) {
|
|||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_29;
|
||||
Play_SetViewpoint(play, VIEWPOINT_LOCKED);
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
this->stickLeftPrompt.isEnabled = false;
|
||||
this->stickRightPrompt.isEnabled = false;
|
||||
|
@ -1323,7 +1323,7 @@ void EnOssan_GiveItemWithFanfare(PlayState* play, EnOssan* this) {
|
|||
play->msgCtx.stateTimer = 4;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_29;
|
||||
Play_SetViewpoint(play, VIEWPOINT_LOCKED);
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
this->drawCursor = 0;
|
||||
EnOssan_UpdateCameraDirection(this, play, 0.0f);
|
||||
this->stateFlag = OSSAN_STATE_GIVE_ITEM_FANFARE;
|
||||
|
@ -2029,7 +2029,7 @@ void EnOssan_InitHappyMaskShopkeeper(EnOssan* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnOssan_InitBombchuShopkeeper(EnOssan* this, PlayState* play) {
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &object_rs_Skel_004868, &object_rs_Anim_00065C, NULL, NULL, 0);
|
||||
SkelAnime_InitFlex(play, &this->skelAnime, &gBombchuShopkeeperSkel, &gBombchuShopkeeperIdleAnim, NULL, NULL, 0);
|
||||
this->actor.draw = EnOssan_DrawBombchuShopkeeper;
|
||||
this->obj3ToSeg6Func = NULL;
|
||||
}
|
||||
|
|
|
@ -1274,10 +1274,10 @@ void func_80AED83C(EnRu1* this) {
|
|||
Vec3s* tempPtr;
|
||||
Vec3s* tempPtr2;
|
||||
|
||||
tempPtr = &this->unk_374.unk_08;
|
||||
tempPtr = &this->interactInfo.headRot;
|
||||
Math_SmoothStepToS(&tempPtr->x, 0, 0x14, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&tempPtr->y, 0, 0x14, 0x1838, 0x64);
|
||||
tempPtr2 = &this->unk_374.unk_0E;
|
||||
tempPtr2 = &this->interactInfo.torsoRot;
|
||||
Math_SmoothStepToS(&tempPtr2->x, 0, 0x14, 0x1838, 0x64);
|
||||
Math_SmoothStepToS(&tempPtr2->y, 0, 0x14, 0x1838, 0x64);
|
||||
}
|
||||
|
@ -1285,7 +1285,7 @@ void func_80AED83C(EnRu1* this) {
|
|||
void func_80AED8DC(EnRu1* this) {
|
||||
s32 temp_hi;
|
||||
s16* unk_2AC = &this->unk_2AC;
|
||||
s16* someY = &this->unk_374.unk_08.y;
|
||||
s16* someY = &this->interactInfo.headRot.y;
|
||||
s16* unk_29E = &this->unk_29E;
|
||||
s32 pad[2];
|
||||
|
||||
|
@ -1787,20 +1787,20 @@ void func_80AEEF68(EnRu1* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
s16 something;
|
||||
|
||||
this->unk_374.unk_18 = player->actor.world.pos;
|
||||
this->unk_374.unk_14 = kREG(16) - 3.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) - 3.0f;
|
||||
something = kREG(17) + 0xC;
|
||||
func_80034A14(&this->actor, &this->unk_374, something, 2);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, something, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
|
||||
void func_80AEEFEC(EnRu1* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 something;
|
||||
|
||||
this->unk_374.unk_18 = player->actor.world.pos;
|
||||
this->unk_374.unk_14 = kREG(16) - 3.0f;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) - 3.0f;
|
||||
something = kREG(17) + 0xC;
|
||||
func_80034A14(&this->actor, &this->unk_374, something, 4);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, something, NPC_TRACKING_FULL_BODY);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
}
|
||||
|
||||
|
@ -2260,8 +2260,8 @@ void EnRu1_Init(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void func_80AF0278(EnRu1* this, PlayState* play, s32 limbIndex, Vec3s* rot) {
|
||||
Vec3s* vec1 = &this->unk_374.unk_0E;
|
||||
Vec3s* vec2 = &this->unk_374.unk_08;
|
||||
Vec3s* vec1 = &this->interactInfo.torsoRot;
|
||||
Vec3s* vec2 = &this->interactInfo.headRot;
|
||||
|
||||
switch (limbIndex) {
|
||||
case RUTO_CHILD_LEFT_UPPER_ARM:
|
||||
|
|
|
@ -54,7 +54,7 @@ typedef struct EnRu1 {
|
|||
/* 0x0360 */ f32 unk_360;
|
||||
/* 0x0364 */ Vec3f unk_364;
|
||||
/* 0x0370 */ f32 unk_370;
|
||||
/* 0x0374 */ struct_80034A14_arg1 unk_374;
|
||||
/* 0x0374 */ NpcInteractInfo interactInfo;
|
||||
} EnRu1; // size = 0x039C
|
||||
|
||||
typedef enum {
|
||||
|
|
|
@ -179,7 +179,7 @@ u16 func_80AF55E0(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
s16 func_80AF56F4(PlayState* play, Actor* thisx) {
|
||||
s16 ret = 1;
|
||||
s16 ret = NPC_TALK_STATE_TALKING;
|
||||
EnSa* this = (EnSa*)thisx;
|
||||
|
||||
switch (func_80AF5560(this, play)) {
|
||||
|
@ -187,19 +187,19 @@ s16 func_80AF56F4(PlayState* play, Actor* thisx) {
|
|||
switch (this->actor.textId) {
|
||||
case 0x1002:
|
||||
SET_INFTABLE(INFTABLE_01);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x1031:
|
||||
SET_EVENTCHKINF(EVENTCHKINF_03);
|
||||
SET_INFTABLE(INFTABLE_03);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case 0x1047:
|
||||
SET_INFTABLE(INFTABLE_05);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
default:
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -218,9 +218,9 @@ s16 func_80AF56F4(PlayState* play, Actor* thisx) {
|
|||
|
||||
void func_80AF57D8(EnSa* this, PlayState* play) {
|
||||
if (play->sceneId != SCENE_SPOT05 || ABS((s16)(this->actor.yawTowardsPlayer - this->actor.shape.rot.y)) < 0x1555 ||
|
||||
this->unk_1E0.unk_00 != 0) {
|
||||
func_800343CC(play, &this->actor, &this->unk_1E0.unk_00, this->collider.dim.radius + 30.0f, func_80AF55E0,
|
||||
func_80AF56F4);
|
||||
this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 30.0f,
|
||||
func_80AF55E0, func_80AF56F4);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -406,25 +406,25 @@ s32 func_80AF5DFC(EnSa* this, PlayState* play) {
|
|||
|
||||
void func_80AF5F34(EnSa* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s16 phi_a3 = 0;
|
||||
s16 trackingMode = NPC_TRACKING_PLAYER_AUTO_TURN;
|
||||
|
||||
if (play->sceneId == SCENE_SPOT04) {
|
||||
phi_a3 = (this->actionFunc == func_80AF68E4) ? 1 : 4;
|
||||
trackingMode = (this->actionFunc == func_80AF68E4) ? NPC_TRACKING_NONE : NPC_TRACKING_FULL_BODY;
|
||||
}
|
||||
if (play->sceneId == SCENE_SPOT05) {
|
||||
phi_a3 = (this->skelAnime.animation == &gSariaPlayingOcarinaAnim) ? 1 : 3;
|
||||
trackingMode = (this->skelAnime.animation == &gSariaPlayingOcarinaAnim) ? NPC_TRACKING_NONE : NPC_TRACKING_HEAD;
|
||||
}
|
||||
if (play->sceneId == SCENE_SPOT05 && this->actionFunc == func_80AF6448 &&
|
||||
this->skelAnime.animation == &gSariaStopPlayingOcarinaAnim) {
|
||||
phi_a3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
if (play->sceneId == SCENE_SPOT05 && this->actionFunc == func_80AF68E4 &&
|
||||
this->skelAnime.animation == &gSariaOcarinaToMouthAnim) {
|
||||
phi_a3 = 1;
|
||||
trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
this->unk_1E0.unk_18 = player->actor.world.pos;
|
||||
this->unk_1E0.unk_14 = 4.0f;
|
||||
func_80034A14(&this->actor, &this->unk_1E0, 2, phi_a3);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = 4.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, trackingMode);
|
||||
}
|
||||
|
||||
s32 func_80AF603C(EnSa* this) {
|
||||
|
@ -432,7 +432,7 @@ s32 func_80AF603C(EnSa* this) {
|
|||
this->skelAnime.animation != &gSariaOcarinaToMouthAnim) {
|
||||
return 0;
|
||||
}
|
||||
if (this->unk_1E0.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
return 0;
|
||||
}
|
||||
this->unk_20E = 0;
|
||||
|
@ -523,7 +523,7 @@ void EnSa_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_SetScale(&this->actor, 0.01f);
|
||||
|
||||
this->actor.targetMode = 6;
|
||||
this->unk_1E0.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->alpha = 255;
|
||||
this->unk_21A = this->actor.shape.rot;
|
||||
|
||||
|
@ -539,7 +539,7 @@ void EnSa_Destroy(Actor* thisx, PlayState* play) {
|
|||
|
||||
void func_80AF6448(EnSa* this, PlayState* play) {
|
||||
if (play->sceneId == SCENE_SPOT04) {
|
||||
if (this->unk_1E0.unk_00 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
switch (this->actor.textId) {
|
||||
case 0x1002:
|
||||
if (this->unk_208 == 0 && this->unk_20B != 1) {
|
||||
|
@ -607,14 +607,14 @@ void func_80AF6448(EnSa* this, PlayState* play) {
|
|||
EnSa_ChangeAnim(this, ENSA_ANIM1_6);
|
||||
}
|
||||
}
|
||||
if (this->unk_1E0.unk_00 != 0 && play->sceneId == SCENE_SPOT05) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE && play->sceneId == SCENE_SPOT05) {
|
||||
Animation_Change(&this->skelAnime, &gSariaStopPlayingOcarinaAnim, 1.0f, 0.0f, 10.0f, ANIMMODE_ONCE, -10.0f);
|
||||
this->actionFunc = func_80AF67D0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80AF67D0(EnSa* this, PlayState* play) {
|
||||
if (this->unk_1E0.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
Animation_Change(&this->skelAnime, &gSariaStopPlayingOcarinaAnim, 0.0f, 10.0f, 0.0f, ANIMMODE_ONCE, -10.0f);
|
||||
this->actionFunc = func_80AF6448;
|
||||
}
|
||||
|
@ -765,14 +765,14 @@ s32 EnSa_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if (limbIndex == 16) {
|
||||
Matrix_Translate(900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
sp18 = this->unk_1E0.unk_08;
|
||||
sp18 = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp18.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp18.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 9) {
|
||||
sp18 = this->unk_1E0.unk_0E;
|
||||
sp18 = this->interactInfo.torsoRot;
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(sp18.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp18.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ typedef struct EnSa {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnSaActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ u8 unk_208;
|
||||
/* 0x0209 */ u8 unk_209;
|
||||
/* 0x020A */ u8 unk_20A;
|
||||
|
|
|
@ -78,7 +78,7 @@ u16 EnTg_GetTextId(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
}
|
||||
|
||||
s16 EnTg_OnTextComplete(PlayState* play, Actor* thisx) {
|
||||
s16 EnTg_UpdateTalkState(PlayState* play, Actor* thisx) {
|
||||
EnTg* this = (EnTg*)thisx;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
|
@ -132,7 +132,7 @@ void EnTg_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnTg_SpinIfNotTalking(EnTg* this, PlayState* play) {
|
||||
if (!this->isTalking) {
|
||||
if (!this->interactInfo.talkState) {
|
||||
this->actor.shape.rot.y += 0x800;
|
||||
}
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ void EnTg_Update(Actor* thisx, PlayState* play) {
|
|||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, UPDBGCHECKINFO_FLAG_2);
|
||||
this->actionFunc(this, play);
|
||||
temp = this->collider.dim.radius + 30.0f;
|
||||
func_800343CC(play, &this->actor, &this->isTalking, temp, EnTg_GetTextId, EnTg_OnTextComplete);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, temp, EnTg_GetTextId, EnTg_UpdateTalkState);
|
||||
}
|
||||
|
||||
s32 EnTg_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s* rot, void* thisx) {
|
||||
|
|
|
@ -13,8 +13,7 @@ typedef struct EnTg {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnTgActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ s16 isTalking;
|
||||
/* 0x01E2 */ char unk_1E2[0x26];
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ u8 nextDialogue;
|
||||
} EnTg; // size = 0x020C
|
||||
|
||||
|
|
|
@ -348,7 +348,7 @@ u16 func_80B1C54C(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
|
||||
s16 func_80B1C5A0(PlayState* play, Actor* thisx) {
|
||||
s32 ret = 1;
|
||||
s32 ret = NPC_TALK_STATE_TALKING;
|
||||
|
||||
switch (Message_GetState(&play->msgCtx)) {
|
||||
case TEXT_STATE_NONE:
|
||||
|
@ -359,7 +359,7 @@ s16 func_80B1C5A0(PlayState* play, Actor* thisx) {
|
|||
if (thisx->textId == 0x5028) {
|
||||
SET_INFTABLE(INFTABLE_D8);
|
||||
}
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
break;
|
||||
case TEXT_STATE_DONE_FADING:
|
||||
break;
|
||||
|
@ -375,7 +375,7 @@ s16 func_80B1C5A0(PlayState* play, Actor* thisx) {
|
|||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
Rupees_ChangeBy(-10);
|
||||
SET_INFTABLE(INFTABLE_D9);
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
Message_ContinueTextbox(play, thisx->textId);
|
||||
SET_INFTABLE(INFTABLE_D9);
|
||||
|
@ -384,7 +384,7 @@ s16 func_80B1C5A0(PlayState* play, Actor* thisx) {
|
|||
case TEXT_STATE_EVENT:
|
||||
if (Message_ShouldAdvance(play) && (thisx->textId == 0x0084 || thisx->textId == 0x0085)) {
|
||||
Message_CloseTextbox(play);
|
||||
ret = 0;
|
||||
ret = NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
break;
|
||||
case TEXT_STATE_DONE:
|
||||
|
@ -516,35 +516,35 @@ void EnTk_Rest(EnTk* this, PlayState* play) {
|
|||
s16 v1;
|
||||
s16 a1_;
|
||||
|
||||
if (this->h_1E0 != 0) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
v1 = this->actor.shape.rot.y;
|
||||
v1 -= this->h_21E;
|
||||
v1 = this->actor.yawTowardsPlayer - v1;
|
||||
|
||||
if (this->h_1E0 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
EnTk_DigAnim(this, play);
|
||||
this->h_1E0 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actionFunc = EnTk_Dig;
|
||||
return;
|
||||
}
|
||||
|
||||
func_800343CC(play, &this->actor, &this->h_1E0, this->collider.dim.radius + 30.0f, func_80B1C54C,
|
||||
func_80B1C5A0);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 30.0f,
|
||||
func_80B1C54C, func_80B1C5A0);
|
||||
} else if (EnTk_CheckFacingPlayer(this)) {
|
||||
v1 = this->actor.shape.rot.y;
|
||||
v1 -= this->h_21E;
|
||||
v1 = this->actor.yawTowardsPlayer - v1;
|
||||
|
||||
this->actionCountdown = 0;
|
||||
func_800343CC(play, &this->actor, &this->h_1E0, this->collider.dim.radius + 30.0f, func_80B1C54C,
|
||||
func_80B1C5A0);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 30.0f,
|
||||
func_80B1C54C, func_80B1C5A0);
|
||||
} else if (Actor_ProcessTalkRequest(&this->actor, play)) {
|
||||
v1 = this->actor.shape.rot.y;
|
||||
v1 -= this->h_21E;
|
||||
v1 = this->actor.yawTowardsPlayer - v1;
|
||||
|
||||
this->actionCountdown = 0;
|
||||
this->h_1E0 = 1;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
} else if (DECR(this->actionCountdown) == 0) {
|
||||
EnTk_WalkAnim(this, play);
|
||||
this->actionFunc = EnTk_Walk;
|
||||
|
@ -559,9 +559,9 @@ void EnTk_Rest(EnTk* this, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnTk_Walk(EnTk* this, PlayState* play) {
|
||||
if (this->h_1E0 == 2) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_ACTION) {
|
||||
EnTk_DigAnim(this, play);
|
||||
this->h_1E0 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
this->actionFunc = EnTk_Dig;
|
||||
} else {
|
||||
this->actor.speedXZ = EnTk_Step(this, play);
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include "ultra64.h"
|
||||
#include "global.h"
|
||||
#include "z64.h"
|
||||
|
||||
/* Dirt particle effect */
|
||||
struct EnTkEff;
|
||||
|
@ -28,8 +29,7 @@ typedef struct EnTk {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnTkActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ s16 h_1E0;
|
||||
/* 0x01E2 */ char unk_1E2[0x26];
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ u8 validDigHere;
|
||||
/* 0x0209 */ u8 rewardCount[4];
|
||||
/* 0x0210 */ Actor* currentSpot;
|
||||
|
|
|
@ -357,20 +357,20 @@ void EnToryo_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc(this, play);
|
||||
|
||||
if (this->stateFlags & 8) {
|
||||
this->unk_1EC.unk_18.x = player->actor.focus.pos.x;
|
||||
this->unk_1EC.unk_18.y = player->actor.focus.pos.y;
|
||||
this->unk_1EC.unk_18.z = player->actor.focus.pos.z;
|
||||
this->interactInfo.trackPos.x = player->actor.focus.pos.x;
|
||||
this->interactInfo.trackPos.y = player->actor.focus.pos.y;
|
||||
this->interactInfo.trackPos.z = player->actor.focus.pos.z;
|
||||
|
||||
if (this->stateFlags & 0x10) {
|
||||
func_80034A14(thisx, &this->unk_1EC, 0, 4);
|
||||
Npc_TrackPoint(thisx, &this->interactInfo, 0, NPC_TRACKING_FULL_BODY);
|
||||
return;
|
||||
}
|
||||
|
||||
rot = thisx->yawTowardsPlayer - thisx->shape.rot.y;
|
||||
if ((rot < 14563.0f) && (rot > -14563.0f)) {
|
||||
func_80034A14(thisx, &this->unk_1EC, 0, 2);
|
||||
Npc_TrackPoint(thisx, &this->interactInfo, 0, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
} else {
|
||||
func_80034A14(thisx, &this->unk_1EC, 0, 1);
|
||||
Npc_TrackPoint(thisx, &this->interactInfo, 0, NPC_TRACKING_NONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -389,12 +389,12 @@ s32 EnToryo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
|||
if (this->stateFlags & 8) {
|
||||
switch (limbIndex) {
|
||||
case 8:
|
||||
rot->x += this->unk_1EC.unk_0E.y;
|
||||
rot->y -= this->unk_1EC.unk_0E.x;
|
||||
rot->x += this->interactInfo.torsoRot.y;
|
||||
rot->y -= this->interactInfo.torsoRot.x;
|
||||
break;
|
||||
case 15:
|
||||
rot->x += this->unk_1EC.unk_08.y;
|
||||
rot->z += this->unk_1EC.unk_08.x;
|
||||
rot->x += this->interactInfo.headRot.y;
|
||||
rot->z += this->interactInfo.headRot.x;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ typedef struct EnToryo {
|
|||
/* 0x01E4 */ s32 unk_1E4;
|
||||
/* 0x01E8 */ u16 stateFlags;
|
||||
/* 0x01EA */ s16 unk_1EA;
|
||||
/* 0x01EC */ struct_80034A14_arg1 unk_1EC;
|
||||
/* 0x01EC */ NpcInteractInfo interactInfo;
|
||||
/* 0x0214 */ Vec3s jointTable[17];
|
||||
/* 0x027A */ Vec3s morphTable[17];
|
||||
} EnToryo; // size = 0x02E0
|
||||
|
|
|
@ -78,9 +78,9 @@ void EnXc_Destroy(Actor* thisx, PlayState* play) {
|
|||
void EnXc_CalculateHeadTurn(EnXc* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->npcInfo.unk_18 = player->actor.world.pos;
|
||||
this->npcInfo.unk_14 = kREG(16) - 3.0f;
|
||||
func_80034A14(&this->actor, &this->npcInfo, kREG(17) + 0xC, 2);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) - 3.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, kREG(17) + 0xC, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
|
||||
void EnXc_SetEyePattern(EnXc* this) {
|
||||
|
@ -2345,11 +2345,11 @@ s32 EnXc_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if (this->unk_30C != 0) {
|
||||
if (limbIndex == 9) {
|
||||
rot->x += this->npcInfo.unk_0E.y;
|
||||
rot->y -= this->npcInfo.unk_0E.x;
|
||||
rot->x += this->interactInfo.torsoRot.y;
|
||||
rot->y -= this->interactInfo.torsoRot.x;
|
||||
} else if (limbIndex == 16) {
|
||||
rot->x += this->npcInfo.unk_08.y;
|
||||
rot->z += this->npcInfo.unk_08.x;
|
||||
rot->x += this->interactInfo.headRot.y;
|
||||
rot->z += this->interactInfo.headRot.x;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -139,7 +139,7 @@ typedef struct EnXc {
|
|||
/* 0x02C0 */ ColliderCylinder collider;
|
||||
/* 0x030C */ s32 unk_30C;
|
||||
/* 0x0310 */ Actor* flameActor;
|
||||
/* 0x0314 */ struct_80034A14_arg1 npcInfo;
|
||||
/* 0x0314 */ NpcInteractInfo interactInfo;
|
||||
} EnXc; // size = 0x033C
|
||||
|
||||
#endif
|
||||
|
|
|
@ -181,7 +181,7 @@ void func_80B4B010(EnZl1* this, PlayState* play) {
|
|||
Play_CameraSetAtEye(play, this->subCamId, &subCamAt, &subCamEye);
|
||||
Play_CameraSetFov(play, this->subCamId, 30.0f);
|
||||
Letterbox_SetSizeTarget(32);
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
player->actor.world.pos = playerPos;
|
||||
player->actor.speedXZ = 0.0f;
|
||||
this->unk_1E2 = 0;
|
||||
|
@ -556,7 +556,7 @@ void func_80B4BF2C(EnZl1* this, PlayState* play) {
|
|||
case 6:
|
||||
if (Actor_TextboxIsClosing(&this->actor, play)) {
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
this->actor.flags &= ~ACTOR_FLAG_8;
|
||||
this->unk_1E2 = 4;
|
||||
}
|
||||
|
|
|
@ -136,8 +136,8 @@ void func_80B536B4(EnZl3* this) {
|
|||
|
||||
void func_80B536C4(EnZl3* this) {
|
||||
s32 pad[2];
|
||||
Vec3s* vec1 = &this->unk_3F8.unk_08;
|
||||
Vec3s* vec2 = &this->unk_3F8.unk_0E;
|
||||
Vec3s* vec1 = &this->interactInfo.headRot;
|
||||
Vec3s* vec2 = &this->interactInfo.torsoRot;
|
||||
|
||||
Math_SmoothStepToS(&vec1->x, 0, 20, 6200, 100);
|
||||
Math_SmoothStepToS(&vec1->y, 0, 20, 6200, 100);
|
||||
|
@ -148,9 +148,9 @@ void func_80B536C4(EnZl3* this) {
|
|||
void func_80B53764(EnZl3* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_3F8.unk_18 = player->actor.world.pos;
|
||||
this->unk_3F8.unk_14 = kREG(16) - 16.0f;
|
||||
func_80034A14(&this->actor, &this->unk_3F8, kREG(17) + 0xC, 2);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
this->interactInfo.yOffset = kREG(16) - 16.0f;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, kREG(17) + 0xC, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
|
||||
s32 func_80B537E8(EnZl3* this) {
|
||||
|
@ -588,8 +588,8 @@ s32 func_80B5458C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||
Mtx* sp78;
|
||||
MtxF sp38;
|
||||
Vec3s sp30;
|
||||
Vec3s* unk_3F8_unk_08 = &this->unk_3F8.unk_08;
|
||||
Vec3s* unk_3F8_unk_0E = &this->unk_3F8.unk_0E;
|
||||
Vec3s* unk_3F8_unk_08 = &this->interactInfo.headRot;
|
||||
Vec3s* unk_3F8_unk_0E = &this->interactInfo.torsoRot;
|
||||
|
||||
if (limbIndex == 14) {
|
||||
sp78 = Graph_Alloc(play->state.gfxCtx, sizeof(Mtx) * 7);
|
||||
|
@ -1960,18 +1960,18 @@ void func_80B57D60(EnZl3* this, PlayState* play) {
|
|||
s32 func_80B57D80(EnZl3* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s16* sp32 = &this->actor.shape.rot.y;
|
||||
struct_80034A14_arg1* unk_3F8 = &this->unk_3F8;
|
||||
NpcInteractInfo* interactInfo = &this->interactInfo;
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 unk_314 = this->unk_314;
|
||||
s16 temp_v0 = func_80B57104(this, unk_314);
|
||||
s32 pad2;
|
||||
s16 phi_v1;
|
||||
|
||||
unk_3F8->unk_18.y = player->actor.world.pos.y;
|
||||
unk_3F8->unk_18.x = (Math_SinS(temp_v0) * this->actor.xzDistToPlayer) + this->actor.world.pos.x;
|
||||
unk_3F8->unk_18.z = (Math_CosS(temp_v0) * this->actor.xzDistToPlayer) + this->actor.world.pos.z;
|
||||
unk_3F8->unk_14 = kREG(16) - 16.0f;
|
||||
func_80034A14(&this->actor, unk_3F8, kREG(17) + 0xC, 4);
|
||||
interactInfo->trackPos.y = player->actor.world.pos.y;
|
||||
interactInfo->trackPos.x = (Math_SinS(temp_v0) * this->actor.xzDistToPlayer) + this->actor.world.pos.x;
|
||||
interactInfo->trackPos.z = (Math_CosS(temp_v0) * this->actor.xzDistToPlayer) + this->actor.world.pos.z;
|
||||
interactInfo->yOffset = kREG(16) - 16.0f;
|
||||
Npc_TrackPoint(&this->actor, interactInfo, kREG(17) + 0xC, NPC_TRACKING_FULL_BODY);
|
||||
|
||||
phi_v1 = ABS(temp_v0 - *sp32);
|
||||
if (phi_v1 <= 0x320) {
|
||||
|
@ -2439,7 +2439,7 @@ s32 func_80B5944C(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* pos, Vec3s
|
|||
if (limbIndex == 14) {
|
||||
Mtx* mtx = Graph_Alloc(play->state.gfxCtx, sizeof(Mtx) * 7);
|
||||
EnZl3* this = (EnZl3*)thisx;
|
||||
Vec3s* vec = &this->unk_3F8.unk_08;
|
||||
Vec3s* vec = &this->interactInfo.headRot;
|
||||
|
||||
gSPSegment(gfx[0]++, 0x0C, mtx);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ typedef struct EnZl3 {
|
|||
/* 0x03EC */ f32 unk_3EC;
|
||||
/* 0x03F0 */ f32 unk_3F0;
|
||||
/* 0x03F4 */ f32 unk_3F4;
|
||||
/* 0x03F8 */ struct_80034A14_arg1 unk_3F8;
|
||||
/* 0x03F8 */ NpcInteractInfo interactInfo;
|
||||
} EnZl3; // size = 0x0420
|
||||
|
||||
#endif
|
||||
|
|
|
@ -228,9 +228,9 @@ u16 EnZl4_GetText(PlayState* play, Actor* thisx) {
|
|||
|
||||
s16 func_80B5B9B0(PlayState* play, Actor* thisx) {
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
return false;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
}
|
||||
return true;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
void EnZl4_UpdateFace(EnZl4* this) {
|
||||
|
@ -305,8 +305,8 @@ void EnZl4_SetMove(EnZl4* this, PlayState* play) {
|
|||
void func_80B5BB78(EnZl4* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_1E0.unk_18 = player->actor.world.pos;
|
||||
func_80034A14(&this->actor, &this->unk_1E0, 2, 2);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2, NPC_TRACKING_HEAD_AND_TORSO);
|
||||
}
|
||||
|
||||
void EnZl4_GetActionStartPos(CsCmdActorAction* action, Vec3f* vec) {
|
||||
|
@ -330,7 +330,7 @@ s32 EnZl4_SetupFromLegendCs(EnZl4* this, PlayState* play) {
|
|||
|
||||
EnZl4_SetActiveCamMove(play, 5);
|
||||
Letterbox_SetSizeTarget(32);
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
this->talkTimer2 = 0;
|
||||
return true;
|
||||
}
|
||||
|
@ -1150,7 +1150,7 @@ void EnZl4_Cutscene(EnZl4* this, PlayState* play) {
|
|||
this->mouthExpression = ZL4_MOUTH_SURPRISED;
|
||||
Audio_PlayFanfare(NA_BGM_APPEAR);
|
||||
EnZl4_SetActiveCamDir(play, 0);
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
Letterbox_SetSizeTarget(32);
|
||||
this->talkState = 0;
|
||||
this->csState++;
|
||||
|
@ -1194,22 +1194,23 @@ void EnZl4_Cutscene(EnZl4* this, PlayState* play) {
|
|||
case ZL4_CS_PLAN:
|
||||
if (EnZl4_CsMakePlan(this, play)) {
|
||||
func_8002DF54(play, &this->actor, 7);
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
|
||||
SET_EVENTCHKINF(EVENTCHKINF_40);
|
||||
this->actionFunc = EnZl4_Idle;
|
||||
}
|
||||
break;
|
||||
}
|
||||
this->unk_1E0.unk_18 = player->actor.world.pos;
|
||||
func_80034A14(&this->actor, &this->unk_1E0, 2, (this->csState == ZL4_CS_WINDOW) ? 2 : 1);
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 2,
|
||||
(this->csState == ZL4_CS_WINDOW) ? NPC_TRACKING_HEAD_AND_TORSO : NPC_TRACKING_NONE);
|
||||
if (EnZl4_InMovingAnim(this)) {
|
||||
EnZl4_SetMove(this, play);
|
||||
}
|
||||
}
|
||||
|
||||
void EnZl4_Idle(EnZl4* this, PlayState* play) {
|
||||
func_800343CC(play, &this->actor, &this->unk_1E0.unk_00, this->collider.dim.radius + 60.0f, EnZl4_GetText,
|
||||
func_80B5B9B0);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->collider.dim.radius + 60.0f,
|
||||
EnZl4_GetText, func_80B5B9B0);
|
||||
func_80B5BB78(this, play);
|
||||
}
|
||||
|
||||
|
@ -1268,14 +1269,14 @@ s32 EnZl4_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* p
|
|||
Vec3s sp1C;
|
||||
|
||||
if (limbIndex == 17) {
|
||||
sp1C = this->unk_1E0.unk_08;
|
||||
sp1C = this->interactInfo.headRot;
|
||||
Matrix_Translate(900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(sp1C.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-900.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
if (limbIndex == 10) {
|
||||
sp1C = this->unk_1E0.unk_0E;
|
||||
sp1C = this->interactInfo.torsoRot;
|
||||
Matrix_RotateY(BINANG_TO_RAD_ALT(sp1C.y), MTXMODE_APPLY);
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(sp1C.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct EnZl4 {
|
|||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnZl4ActionFunc actionFunc;
|
||||
/* 0x0194 */ ColliderCylinder collider;
|
||||
/* 0x01E0 */ struct_80034A14_arg1 unk_1E0;
|
||||
/* 0x01E0 */ NpcInteractInfo interactInfo;
|
||||
/* 0x0208 */ u8 talkState;
|
||||
/* 0x0209 */ u8 csState;
|
||||
/* 0x020A */ u8 leftEyeState;
|
||||
|
|
|
@ -449,13 +449,13 @@ s16 func_80B61298(PlayState* play, Actor* thisx) {
|
|||
case TEXT_STATE_SONG_DEMO_DONE:
|
||||
case TEXT_STATE_8:
|
||||
case TEXT_STATE_9:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
|
||||
case TEXT_STATE_CLOSING:
|
||||
switch (thisx->textId) {
|
||||
case 0x4020:
|
||||
case 0x4021:
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
case 0x4008:
|
||||
SET_INFTABLE(INFTABLE_124);
|
||||
break;
|
||||
|
@ -464,12 +464,12 @@ s16 func_80B61298(PlayState* play, Actor* thisx) {
|
|||
break;
|
||||
}
|
||||
SET_EVENTCHKINF(EVENTCHKINF_30);
|
||||
return 0;
|
||||
return NPC_TALK_STATE_IDLE;
|
||||
|
||||
case TEXT_STATE_CHOICE:
|
||||
switch (Message_ShouldAdvance(play)) {
|
||||
case 0:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
default:
|
||||
if (thisx->textId == 0x400C) {
|
||||
thisx->textId = (play->msgCtx.choiceIndex == 0) ? 0x400D : 0x400E;
|
||||
|
@ -477,18 +477,19 @@ s16 func_80B61298(PlayState* play, Actor* thisx) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
|
||||
case TEXT_STATE_EVENT:
|
||||
switch (Message_ShouldAdvance(play)) {
|
||||
case 0:
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
default:
|
||||
return 2;
|
||||
return NPC_TALK_STATE_ACTION;
|
||||
}
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return NPC_TALK_STATE_TALKING;
|
||||
}
|
||||
|
||||
void EnZo_Blink(EnZo* this) {
|
||||
|
@ -504,16 +505,17 @@ void EnZo_Blink(EnZo* this) {
|
|||
void EnZo_Dialog(EnZo* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
this->unk_194.unk_18 = player->actor.world.pos;
|
||||
this->interactInfo.trackPos = player->actor.world.pos;
|
||||
if (this->actionFunc == EnZo_Standing) {
|
||||
// Look down at link if child, look up if adult
|
||||
this->unk_194.unk_14 = !LINK_IS_ADULT ? 10.0f : -10.0f;
|
||||
this->interactInfo.yOffset = !LINK_IS_ADULT ? 10.0f : -10.0f;
|
||||
} else {
|
||||
this->unk_194.unk_18.y = this->actor.world.pos.y;
|
||||
this->interactInfo.trackPos.y = this->actor.world.pos.y;
|
||||
}
|
||||
func_80034A14(&this->actor, &this->unk_194, 11, this->unk_64C);
|
||||
Npc_TrackPoint(&this->actor, &this->interactInfo, 11, this->trackingMode);
|
||||
if (this->canSpeak == true) {
|
||||
func_800343CC(play, &this->actor, &this->unk_194.unk_00, this->dialogRadius, func_80B61024, func_80B61298);
|
||||
Npc_UpdateTalking(play, &this->actor, &this->interactInfo.talkState, this->dialogRadius, func_80B61024,
|
||||
func_80B61298);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -541,7 +543,7 @@ void EnZo_SetAnimation(EnZo* this) {
|
|||
|
||||
if (this->skelAnime.animation == &gZoraHandsOnHipsTappingFootAnim ||
|
||||
this->skelAnime.animation == &gZoraOpenArmsAnim) {
|
||||
if (this->unk_194.unk_00 == 0) {
|
||||
if (this->interactInfo.talkState == NPC_TALK_STATE_IDLE) {
|
||||
if (this->actionFunc == EnZo_Standing) {
|
||||
animId = ENZO_ANIM_0;
|
||||
} else {
|
||||
|
@ -550,12 +552,13 @@ void EnZo_SetAnimation(EnZo* this) {
|
|||
}
|
||||
}
|
||||
|
||||
if (this->unk_194.unk_00 != 0 && this->actor.textId == 0x4006 &&
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE && this->actor.textId == 0x4006 &&
|
||||
this->skelAnime.animation != &gZoraHandsOnHipsTappingFootAnim) {
|
||||
animId = ENZO_ANIM_6;
|
||||
}
|
||||
|
||||
if (this->unk_194.unk_00 != 0 && this->actor.textId == 0x4007 && this->skelAnime.animation != &gZoraOpenArmsAnim) {
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE && this->actor.textId == 0x4007 &&
|
||||
this->skelAnime.animation != &gZoraOpenArmsAnim) {
|
||||
animId = ENZO_ANIM_7;
|
||||
}
|
||||
|
||||
|
@ -586,9 +589,9 @@ void EnZo_Init(Actor* thisx, PlayState* play) {
|
|||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.targetMode = 6;
|
||||
this->dialogRadius = this->collider.dim.radius + 30.0f;
|
||||
this->unk_64C = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->canSpeak = false;
|
||||
this->unk_194.unk_00 = 0;
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_IDLE;
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, this->collider.dim.height * 0.5f, this->collider.dim.radius, 0.0f,
|
||||
UPDBGCHECKINFO_FLAG_0 | UPDBGCHECKINFO_FLAG_2);
|
||||
|
||||
|
@ -613,20 +616,20 @@ void EnZo_Standing(EnZo* this, PlayState* play) {
|
|||
|
||||
func_80034F54(play, this->unk_656, this->unk_67E, 20);
|
||||
EnZo_SetAnimation(this);
|
||||
if (this->unk_194.unk_00 != 0) {
|
||||
this->unk_64C = 4;
|
||||
if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
this->trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
return;
|
||||
}
|
||||
|
||||
angle = ABS((s16)((f32)this->actor.yawTowardsPlayer - (f32)this->actor.shape.rot.y));
|
||||
if (angle < 0x4718) {
|
||||
if (EnZo_PlayerInProximity(this, play)) {
|
||||
this->unk_64C = 2;
|
||||
this->trackingMode = NPC_TRACKING_HEAD_AND_TORSO;
|
||||
} else {
|
||||
this->unk_64C = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
} else {
|
||||
this->unk_64C = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -656,7 +659,7 @@ void EnZo_TreadWater(EnZo* this, PlayState* play) {
|
|||
func_80034F54(play, this->unk_656, this->unk_67E, 20);
|
||||
if (Animation_OnFrame(&this->skelAnime, this->skelAnime.endFrame)) {
|
||||
this->canSpeak = true;
|
||||
this->unk_64C = 4;
|
||||
this->trackingMode = NPC_TRACKING_FULL_BODY;
|
||||
this->skelAnime.playSpeed = 0.0f;
|
||||
}
|
||||
EnZo_SetAnimation(this);
|
||||
|
@ -678,7 +681,7 @@ void EnZo_TreadWater(EnZo* this, PlayState* play) {
|
|||
f32 startFrame;
|
||||
Animation_ChangeByInfo(&this->skelAnime, sAnimationInfo, ENZO_ANIM_4);
|
||||
this->canSpeak = false;
|
||||
this->unk_64C = 1;
|
||||
this->trackingMode = NPC_TRACKING_NONE;
|
||||
this->actionFunc = EnZo_Dive;
|
||||
startFrame = this->skelAnime.startFrame;
|
||||
this->skelAnime.startFrame = this->skelAnime.endFrame;
|
||||
|
@ -756,14 +759,14 @@ s32 EnZo_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f* po
|
|||
|
||||
if (limbIndex == 15) {
|
||||
Matrix_Translate(1800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
vec = this->unk_194.unk_08;
|
||||
vec = this->interactInfo.headRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(vec.x), MTXMODE_APPLY);
|
||||
Matrix_Translate(-1800.0f, 0.0f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (limbIndex == 8) {
|
||||
vec = this->unk_194.unk_0E;
|
||||
vec = this->interactInfo.torsoRot;
|
||||
Matrix_RotateX(BINANG_TO_RAD_ALT(-vec.y), MTXMODE_APPLY);
|
||||
Matrix_RotateZ(BINANG_TO_RAD_ALT(vec.x), MTXMODE_APPLY);
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ typedef struct EnZo {
|
|||
/* 0x0000 */ Actor actor;
|
||||
/* 0x014C */ SkelAnime skelAnime;
|
||||
/* 0x0190 */ EnZoActionFunc actionFunc;
|
||||
/* 0x0194 */ struct_80034A14_arg1 unk_194;
|
||||
/* 0x0194 */ NpcInteractInfo interactInfo;
|
||||
/* 0x01BC */ ColliderCylinder collider;
|
||||
/* 0x0208 */ u8 canSpeak;
|
||||
/* 0x020A */ Vec3s jointTable[20];
|
||||
|
@ -33,7 +33,7 @@ typedef struct EnZo {
|
|||
/* 0x02FC */ EnZoEffect effects[EN_ZO_EFFECT_COUNT];
|
||||
/* 0x0644 */ f32 dialogRadius;
|
||||
/* 0x0648 */ f32 alpha;
|
||||
/* 0x064C */ s16 unk_64C;
|
||||
/* 0x064C */ s16 trackingMode;
|
||||
/* 0x064E */ s16 rippleTimer;
|
||||
/* 0x0650 */ s16 timeToDive;
|
||||
/* 0x0652 */ s16 blinkTimer;
|
||||
|
|
|
@ -5238,7 +5238,7 @@ void Fishing_UpdateOwner(Actor* thisx, PlayState* play2) {
|
|||
sSubCamAt.y = mainCam->at.y;
|
||||
sSubCamAt.z = mainCam->at.z;
|
||||
D_80B7A6CC = 2;
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_A_B_MINIMAP);
|
||||
sSubCamVelFactor = 0.0f;
|
||||
FALLTHROUGH;
|
||||
}
|
||||
|
|
|
@ -16,13 +16,13 @@ void ObjLift_Destroy(Actor* thisx, PlayState* play);
|
|||
void ObjLift_Update(Actor* thisx, PlayState* play);
|
||||
void ObjLift_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80B9651C(ObjLift* this);
|
||||
void func_80B9664C(ObjLift* this);
|
||||
void func_80B967C0(ObjLift* this);
|
||||
void ObjLift_SetupWait(ObjLift* this);
|
||||
void ObjLift_SetupShake(ObjLift* this);
|
||||
void ObjLift_SetupFall(ObjLift* this);
|
||||
|
||||
void func_80B96560(ObjLift* this, PlayState* play);
|
||||
void func_80B96678(ObjLift* this, PlayState* play);
|
||||
void func_80B96840(ObjLift* this, PlayState* play);
|
||||
void ObjLift_Wait(ObjLift* this, PlayState* play);
|
||||
void ObjLift_Shake(ObjLift* this, PlayState* play);
|
||||
void ObjLift_Fall(ObjLift* this, PlayState* play);
|
||||
|
||||
ActorInit Obj_Lift_InitVars = {
|
||||
ACTOR_OBJ_LIFT,
|
||||
|
@ -76,7 +76,7 @@ void ObjLift_InitDynaPoly(ObjLift* this, PlayState* play, CollisionHeader* colli
|
|||
}
|
||||
}
|
||||
|
||||
void func_80B96160(ObjLift* this, PlayState* play) {
|
||||
void ObjLift_SpawnFragments(ObjLift* this, PlayState* play) {
|
||||
Vec3f pos;
|
||||
Vec3f velocity;
|
||||
Vec3f* temp_s3;
|
||||
|
@ -116,10 +116,10 @@ void ObjLift_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
Actor_SetScale(&this->dyna.actor, sScales[(this->dyna.actor.params >> 1) & 1]);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
this->unk_168.x = Rand_ZeroOne() * 65535.5f;
|
||||
this->unk_168.y = Rand_ZeroOne() * 65535.5f;
|
||||
this->unk_168.z = Rand_ZeroOne() * 65535.5f;
|
||||
func_80B9651C(this);
|
||||
this->shakeOrientation.x = Rand_ZeroOne() * 65535.5f;
|
||||
this->shakeOrientation.y = Rand_ZeroOne() * 65535.5f;
|
||||
this->shakeOrientation.z = Rand_ZeroOne() * 65535.5f;
|
||||
ObjLift_SetupWait(this);
|
||||
osSyncPrintf("(Dungeon Lift)(arg_data 0x%04x)\n", this->dyna.actor.params);
|
||||
}
|
||||
|
||||
|
@ -129,25 +129,25 @@ void ObjLift_Destroy(Actor* thisx, PlayState* play) {
|
|||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
void func_80B9651C(ObjLift* this) {
|
||||
void ObjLift_SetupWait(ObjLift* this) {
|
||||
this->timer = sFallTimerDurations[(this->dyna.actor.params >> 8) & 7];
|
||||
ObjLift_SetupAction(this, func_80B96560);
|
||||
ObjLift_SetupAction(this, ObjLift_Wait);
|
||||
}
|
||||
|
||||
void func_80B96560(ObjLift* this, PlayState* play) {
|
||||
void ObjLift_Wait(ObjLift* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 quakeIndex;
|
||||
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->timer <= 0) {
|
||||
if (((this->dyna.actor.params >> 8) & 7) == 7) {
|
||||
func_80B967C0(this);
|
||||
ObjLift_SetupFall(this);
|
||||
} else {
|
||||
quakeIndex = Quake_Request(GET_ACTIVE_CAM(play), QUAKE_TYPE_1);
|
||||
Quake_SetSpeed(quakeIndex, 10000);
|
||||
Quake_SetPerturbations(quakeIndex, 2, 0, 0, 0);
|
||||
Quake_SetDuration(quakeIndex, 20);
|
||||
func_80B9664C(this);
|
||||
ObjLift_SetupShake(this);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
@ -155,25 +155,27 @@ void func_80B96560(ObjLift* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80B9664C(ObjLift* this) {
|
||||
void ObjLift_SetupShake(ObjLift* this) {
|
||||
this->timer = 20;
|
||||
ObjLift_SetupAction(this, func_80B96678);
|
||||
ObjLift_SetupAction(this, ObjLift_Shake);
|
||||
}
|
||||
|
||||
void func_80B96678(ObjLift* this, PlayState* play) {
|
||||
void ObjLift_Shake(ObjLift* this, PlayState* play) {
|
||||
if (this->timer <= 0) {
|
||||
func_80B967C0(this);
|
||||
ObjLift_SetupFall(this);
|
||||
} else {
|
||||
this->unk_168.x += 10000;
|
||||
this->dyna.actor.world.rot.x = (s16)(Math_SinS(this->unk_168.x) * 300.0f) + this->dyna.actor.home.rot.x;
|
||||
this->dyna.actor.world.rot.z = (s16)(Math_CosS(this->unk_168.x) * 300.0f) + this->dyna.actor.home.rot.z;
|
||||
this->shakeOrientation.x += 10000;
|
||||
this->dyna.actor.world.rot.x =
|
||||
(s16)(Math_SinS(this->shakeOrientation.x) * 300.0f) + this->dyna.actor.home.rot.x;
|
||||
this->dyna.actor.world.rot.z =
|
||||
(s16)(Math_CosS(this->shakeOrientation.x) * 300.0f) + this->dyna.actor.home.rot.z;
|
||||
this->dyna.actor.shape.rot.x = this->dyna.actor.world.rot.x;
|
||||
this->dyna.actor.shape.rot.z = this->dyna.actor.world.rot.z;
|
||||
this->unk_168.y += 18000;
|
||||
this->dyna.actor.world.pos.y = Math_SinS(this->unk_168.y) + this->dyna.actor.home.pos.y;
|
||||
this->unk_168.z += 18000;
|
||||
this->dyna.actor.world.pos.x = Math_SinS(this->unk_168.z) * 3.0f + this->dyna.actor.home.pos.x;
|
||||
this->dyna.actor.world.pos.z = Math_CosS(this->unk_168.z) * 3.0f + this->dyna.actor.home.pos.z;
|
||||
this->shakeOrientation.y += 18000;
|
||||
this->dyna.actor.world.pos.y = Math_SinS(this->shakeOrientation.y) + this->dyna.actor.home.pos.y;
|
||||
this->shakeOrientation.z += 18000;
|
||||
this->dyna.actor.world.pos.x = Math_SinS(this->shakeOrientation.z) * 3.0f + this->dyna.actor.home.pos.x;
|
||||
this->dyna.actor.world.pos.z = Math_CosS(this->shakeOrientation.z) * 3.0f + this->dyna.actor.home.pos.z;
|
||||
}
|
||||
|
||||
if ((this->timer & 3) == 3) {
|
||||
|
@ -181,13 +183,13 @@ void func_80B96678(ObjLift* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80B967C0(ObjLift* this) {
|
||||
ObjLift_SetupAction(this, func_80B96840);
|
||||
void ObjLift_SetupFall(ObjLift* this) {
|
||||
ObjLift_SetupAction(this, ObjLift_Fall);
|
||||
Math_Vec3f_Copy(&this->dyna.actor.world.pos, &this->dyna.actor.home.pos);
|
||||
this->dyna.actor.shape.rot = this->dyna.actor.world.rot = this->dyna.actor.home.rot;
|
||||
}
|
||||
|
||||
void func_80B96840(ObjLift* this, PlayState* play) {
|
||||
void ObjLift_Fall(ObjLift* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 bgId;
|
||||
Vec3f pos;
|
||||
|
@ -200,7 +202,7 @@ void func_80B96840(ObjLift* this, PlayState* play) {
|
|||
|
||||
if ((this->dyna.actor.floorHeight - this->dyna.actor.world.pos.y) >=
|
||||
(sMaxFallDistances[(this->dyna.actor.params >> 1) & 1] - 0.001f)) {
|
||||
func_80B96160(this, play);
|
||||
ObjLift_SpawnFragments(this, play);
|
||||
SfxSource_PlaySfxAtFixedWorldPos(play, &this->dyna.actor.world.pos, 20, NA_SE_EV_BOX_BREAK);
|
||||
Flags_SetSwitch(play, (this->dyna.actor.params >> 2) & 0x3F);
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
|
|
|
@ -11,7 +11,7 @@ typedef void (*ObjLiftActionFunc)(struct ObjLift*, PlayState*);
|
|||
typedef struct ObjLift {
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ ObjLiftActionFunc actionFunc;
|
||||
/* 0x0168 */ Vec3s unk_168;
|
||||
/* 0x0168 */ Vec3s shakeOrientation;
|
||||
/* 0x016E */ s16 timer;
|
||||
} ObjLift; // size = 0x0170
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ void ShotSun_Update(Actor* thisx, PlayState* play);
|
|||
|
||||
void ShotSun_SpawnFairy(ShotSun* this, PlayState* play);
|
||||
void ShotSun_TriggerFairy(ShotSun* this, PlayState* play);
|
||||
void func_80BADF0C(ShotSun* this, PlayState* play);
|
||||
void ShotSun_UpdateFairySpawner(ShotSun* this, PlayState* play);
|
||||
void ShotSun_UpdateHyliaSun(ShotSun* this, PlayState* play);
|
||||
|
||||
ActorInit Shot_Sun_InitVars = {
|
||||
|
@ -33,6 +33,12 @@ ActorInit Shot_Sun_InitVars = {
|
|||
NULL,
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ SPAWNER_OUT_OF_RANGE,
|
||||
/* 1 */ SPAWNER_OCARINA_START,
|
||||
/* 2 */ SPAWNER_OCARINA_PLAYING
|
||||
} FairySpawnerState;
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
|
@ -61,10 +67,10 @@ void ShotSun_Init(Actor* thisx, PlayState* play) {
|
|||
osSyncPrintf("%d ---- オカリナの秘密発生!!!!!!!!!!!!!\n", this->actor.params);
|
||||
params = this->actor.params & 0xFF;
|
||||
if (params == 0x40 || params == 0x41) {
|
||||
this->unk_1A4 = 0;
|
||||
this->fairySpawnerState = SPAWNER_OUT_OF_RANGE;
|
||||
this->actor.flags |= ACTOR_FLAG_4;
|
||||
this->actor.flags |= ACTOR_FLAG_25;
|
||||
this->actionFunc = func_80BADF0C;
|
||||
this->actionFunc = ShotSun_UpdateFairySpawner;
|
||||
this->actor.flags |= ACTOR_FLAG_27;
|
||||
} else {
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
|
@ -119,35 +125,35 @@ void ShotSun_TriggerFairy(ShotSun* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
void func_80BADF0C(ShotSun* this, PlayState* play) {
|
||||
void ShotSun_UpdateFairySpawner(ShotSun* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 pad;
|
||||
s32 params = this->actor.params & 0xFF;
|
||||
|
||||
if (Math3D_Vec3fDistSq(&this->actor.world.pos, &player->actor.world.pos) > SQ(150.0f)) {
|
||||
this->unk_1A4 = 0;
|
||||
this->fairySpawnerState = SPAWNER_OUT_OF_RANGE;
|
||||
} else {
|
||||
if (this->unk_1A4 == 0) {
|
||||
if (this->fairySpawnerState == SPAWNER_OUT_OF_RANGE) {
|
||||
if (!(player->stateFlags2 & PLAYER_STATE2_24)) {
|
||||
player->stateFlags2 |= PLAYER_STATE2_23;
|
||||
return;
|
||||
} else {
|
||||
this->unk_1A4 = 1;
|
||||
this->fairySpawnerState = SPAWNER_OCARINA_START;
|
||||
}
|
||||
}
|
||||
if (this->unk_1A4 == 1) {
|
||||
if (this->fairySpawnerState == SPAWNER_OCARINA_START) {
|
||||
func_8010BD58(play, OCARINA_ACTION_FREE_PLAY);
|
||||
this->unk_1A4 = 2;
|
||||
} else if (this->unk_1A4 == 2 && play->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
this->fairySpawnerState = SPAWNER_OCARINA_PLAYING;
|
||||
} else if (this->fairySpawnerState == SPAWNER_OCARINA_PLAYING && play->msgCtx.ocarinaMode == OCARINA_MODE_04) {
|
||||
if ((params == 0x40 && play->msgCtx.lastPlayedSong == OCARINA_SONG_SUNS) ||
|
||||
(params == 0x41 && play->msgCtx.lastPlayedSong == OCARINA_SONG_STORMS)) {
|
||||
this->actionFunc = ShotSun_TriggerFairy;
|
||||
OnePointCutscene_Attention(play, &this->actor);
|
||||
this->timer = 0;
|
||||
} else {
|
||||
this->unk_1A4 = 0;
|
||||
this->fairySpawnerState = SPAWNER_OUT_OF_RANGE;
|
||||
}
|
||||
this->unk_1A4 = 0;
|
||||
this->fairySpawnerState = SPAWNER_OUT_OF_RANGE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ typedef struct ShotSun {
|
|||
/* 0x0198 */ ShotSunActionFunc actionFunc;
|
||||
/* 0x019C */ Vec3s hitboxPos;
|
||||
/* 0x01A2 */ s16 timer; // Frames until fairy spawns
|
||||
/* 0x01A4 */ u8 unk_1A4;
|
||||
/* 0x01A4 */ u8 fairySpawnerState;
|
||||
} ShotSun; // size = 0x01A8
|
||||
|
||||
#endif
|
||||
|
|
|
@ -748,315 +748,315 @@ static GetItemEntry sGetItemTable[] = {
|
|||
#define GET_PLAYER_ANIM(group, type) D_80853914[group * PLAYER_ANIMTYPE_MAX + type]
|
||||
|
||||
static LinkAnimationHeader* D_80853914[PLAYER_ANIMGROUP_MAX * PLAYER_ANIMTYPE_MAX] = {
|
||||
/* PLAYER_ANIMGROUP_0 */
|
||||
/* PLAYER_ANIMGROUP_wait */
|
||||
&gPlayerAnim_link_normal_wait_free,
|
||||
&gPlayerAnim_link_normal_wait,
|
||||
&gPlayerAnim_link_normal_wait,
|
||||
&gPlayerAnim_link_fighter_wait_long,
|
||||
&gPlayerAnim_link_normal_wait_free,
|
||||
&gPlayerAnim_link_normal_wait_free,
|
||||
/* PLAYER_ANIMGROUP_1 */
|
||||
/* PLAYER_ANIMGROUP_walk */
|
||||
&gPlayerAnim_link_normal_walk_free,
|
||||
&gPlayerAnim_link_normal_walk,
|
||||
&gPlayerAnim_link_normal_walk,
|
||||
&gPlayerAnim_link_fighter_walk_long,
|
||||
&gPlayerAnim_link_normal_walk_free,
|
||||
&gPlayerAnim_link_normal_walk_free,
|
||||
/* PLAYER_ANIMGROUP_2 */
|
||||
/* PLAYER_ANIMGROUP_run */
|
||||
&gPlayerAnim_link_normal_run_free,
|
||||
&gPlayerAnim_link_fighter_run,
|
||||
&gPlayerAnim_link_normal_run,
|
||||
&gPlayerAnim_link_fighter_run_long,
|
||||
&gPlayerAnim_link_normal_run_free,
|
||||
&gPlayerAnim_link_normal_run_free,
|
||||
/* PLAYER_ANIMGROUP_3 */
|
||||
/* PLAYER_ANIMGROUP_damage_run */
|
||||
&gPlayerAnim_link_normal_damage_run_free,
|
||||
&gPlayerAnim_link_fighter_damage_run,
|
||||
&gPlayerAnim_link_normal_damage_run_free,
|
||||
&gPlayerAnim_link_fighter_damage_run_long,
|
||||
&gPlayerAnim_link_normal_damage_run_free,
|
||||
&gPlayerAnim_link_normal_damage_run_free,
|
||||
/* PLAYER_ANIMGROUP_4 */
|
||||
/* PLAYER_ANIMGROUP_heavy_run */
|
||||
&gPlayerAnim_link_normal_heavy_run_free,
|
||||
&gPlayerAnim_link_normal_heavy_run,
|
||||
&gPlayerAnim_link_normal_heavy_run_free,
|
||||
&gPlayerAnim_link_fighter_heavy_run_long,
|
||||
&gPlayerAnim_link_normal_heavy_run_free,
|
||||
&gPlayerAnim_link_normal_heavy_run_free,
|
||||
/* PLAYER_ANIMGROUP_5 */
|
||||
/* PLAYER_ANIMGROUP_waitL */
|
||||
&gPlayerAnim_link_normal_waitL_free,
|
||||
&gPlayerAnim_link_anchor_waitL,
|
||||
&gPlayerAnim_link_anchor_waitL,
|
||||
&gPlayerAnim_link_fighter_waitL_long,
|
||||
&gPlayerAnim_link_normal_waitL_free,
|
||||
&gPlayerAnim_link_normal_waitL_free,
|
||||
/* PLAYER_ANIMGROUP_6 */
|
||||
/* PLAYER_ANIMGROUP_waitR */
|
||||
&gPlayerAnim_link_normal_waitR_free,
|
||||
&gPlayerAnim_link_anchor_waitR,
|
||||
&gPlayerAnim_link_anchor_waitR,
|
||||
&gPlayerAnim_link_fighter_waitR_long,
|
||||
&gPlayerAnim_link_normal_waitR_free,
|
||||
&gPlayerAnim_link_normal_waitR_free,
|
||||
/* PLAYER_ANIMGROUP_7 */
|
||||
/* PLAYER_ANIMGROUP_wait2waitR */
|
||||
&gPlayerAnim_link_fighter_wait2waitR_long,
|
||||
&gPlayerAnim_link_normal_wait2waitR,
|
||||
&gPlayerAnim_link_normal_wait2waitR,
|
||||
&gPlayerAnim_link_fighter_wait2waitR_long,
|
||||
&gPlayerAnim_link_fighter_wait2waitR_long,
|
||||
&gPlayerAnim_link_fighter_wait2waitR_long,
|
||||
/* PLAYER_ANIMGROUP_8 */
|
||||
/* PLAYER_ANIMGROUP_normal2fighter */
|
||||
&gPlayerAnim_link_normal_normal2fighter_free,
|
||||
&gPlayerAnim_link_fighter_normal2fighter,
|
||||
&gPlayerAnim_link_fighter_normal2fighter,
|
||||
&gPlayerAnim_link_normal_normal2fighter_free,
|
||||
&gPlayerAnim_link_normal_normal2fighter_free,
|
||||
&gPlayerAnim_link_normal_normal2fighter_free,
|
||||
/* PLAYER_ANIMGROUP_9 */
|
||||
/* PLAYER_ANIMGROUP_doorA_free */
|
||||
&gPlayerAnim_link_demo_doorA_link_free,
|
||||
&gPlayerAnim_link_demo_doorA_link,
|
||||
&gPlayerAnim_link_demo_doorA_link,
|
||||
&gPlayerAnim_link_demo_doorA_link_free,
|
||||
&gPlayerAnim_link_demo_doorA_link_free,
|
||||
&gPlayerAnim_link_demo_doorA_link_free,
|
||||
/* PLAYER_ANIMGROUP_10 */
|
||||
/* PLAYER_ANIMGROUP_doorA */
|
||||
&gPlayerAnim_clink_demo_doorA_link,
|
||||
&gPlayerAnim_clink_demo_doorA_link,
|
||||
&gPlayerAnim_clink_demo_doorA_link,
|
||||
&gPlayerAnim_clink_demo_doorA_link,
|
||||
&gPlayerAnim_clink_demo_doorA_link,
|
||||
&gPlayerAnim_clink_demo_doorA_link,
|
||||
/* PLAYER_ANIMGROUP_11 */
|
||||
/* PLAYER_ANIMGROUP_doorB_free */
|
||||
&gPlayerAnim_link_demo_doorB_link_free,
|
||||
&gPlayerAnim_link_demo_doorB_link,
|
||||
&gPlayerAnim_link_demo_doorB_link,
|
||||
&gPlayerAnim_link_demo_doorB_link_free,
|
||||
&gPlayerAnim_link_demo_doorB_link_free,
|
||||
&gPlayerAnim_link_demo_doorB_link_free,
|
||||
/* PLAYER_ANIMGROUP_12 */
|
||||
/* PLAYER_ANIMGROUP_doorB */
|
||||
&gPlayerAnim_clink_demo_doorB_link,
|
||||
&gPlayerAnim_clink_demo_doorB_link,
|
||||
&gPlayerAnim_clink_demo_doorB_link,
|
||||
&gPlayerAnim_clink_demo_doorB_link,
|
||||
&gPlayerAnim_clink_demo_doorB_link,
|
||||
&gPlayerAnim_clink_demo_doorB_link,
|
||||
/* PLAYER_ANIMGROUP_13 */
|
||||
/* PLAYER_ANIMGROUP_carryB */
|
||||
&gPlayerAnim_link_normal_carryB_free,
|
||||
&gPlayerAnim_link_normal_carryB,
|
||||
&gPlayerAnim_link_normal_carryB,
|
||||
&gPlayerAnim_link_normal_carryB_free,
|
||||
&gPlayerAnim_link_normal_carryB_free,
|
||||
&gPlayerAnim_link_normal_carryB_free,
|
||||
/* PLAYER_ANIMGROUP_14 */
|
||||
/* PLAYER_ANIMGROUP_landing */
|
||||
&gPlayerAnim_link_normal_landing_free,
|
||||
&gPlayerAnim_link_normal_landing,
|
||||
&gPlayerAnim_link_normal_landing,
|
||||
&gPlayerAnim_link_normal_landing_free,
|
||||
&gPlayerAnim_link_normal_landing_free,
|
||||
&gPlayerAnim_link_normal_landing_free,
|
||||
/* PLAYER_ANIMGROUP_15 */
|
||||
/* PLAYER_ANIMGROUP_short_landing */
|
||||
&gPlayerAnim_link_normal_short_landing_free,
|
||||
&gPlayerAnim_link_normal_short_landing,
|
||||
&gPlayerAnim_link_normal_short_landing,
|
||||
&gPlayerAnim_link_normal_short_landing_free,
|
||||
&gPlayerAnim_link_normal_short_landing_free,
|
||||
&gPlayerAnim_link_normal_short_landing_free,
|
||||
/* PLAYER_ANIMGROUP_16 */
|
||||
/* PLAYER_ANIMGROUP_landing_roll */
|
||||
&gPlayerAnim_link_normal_landing_roll_free,
|
||||
&gPlayerAnim_link_normal_landing_roll,
|
||||
&gPlayerAnim_link_normal_landing_roll,
|
||||
&gPlayerAnim_link_fighter_landing_roll_long,
|
||||
&gPlayerAnim_link_normal_landing_roll_free,
|
||||
&gPlayerAnim_link_normal_landing_roll_free,
|
||||
/* PLAYER_ANIMGROUP_17 */
|
||||
/* PLAYER_ANIMGROUP_hip_down */
|
||||
&gPlayerAnim_link_normal_hip_down_free,
|
||||
&gPlayerAnim_link_normal_hip_down,
|
||||
&gPlayerAnim_link_normal_hip_down,
|
||||
&gPlayerAnim_link_normal_hip_down_long,
|
||||
&gPlayerAnim_link_normal_hip_down_free,
|
||||
&gPlayerAnim_link_normal_hip_down_free,
|
||||
/* PLAYER_ANIMGROUP_18 */
|
||||
/* PLAYER_ANIMGROUP_walk_endL */
|
||||
&gPlayerAnim_link_normal_walk_endL_free,
|
||||
&gPlayerAnim_link_normal_walk_endL,
|
||||
&gPlayerAnim_link_normal_walk_endL,
|
||||
&gPlayerAnim_link_fighter_walk_endL_long,
|
||||
&gPlayerAnim_link_normal_walk_endL_free,
|
||||
&gPlayerAnim_link_normal_walk_endL_free,
|
||||
/* PLAYER_ANIMGROUP_19 */
|
||||
/* PLAYER_ANIMGROUP_walk_endR */
|
||||
&gPlayerAnim_link_normal_walk_endR_free,
|
||||
&gPlayerAnim_link_normal_walk_endR,
|
||||
&gPlayerAnim_link_normal_walk_endR,
|
||||
&gPlayerAnim_link_fighter_walk_endR_long,
|
||||
&gPlayerAnim_link_normal_walk_endR_free,
|
||||
&gPlayerAnim_link_normal_walk_endR_free,
|
||||
/* PLAYER_ANIMGROUP_20 */
|
||||
/* PLAYER_ANIMGROUP_defense */
|
||||
&gPlayerAnim_link_normal_defense_free,
|
||||
&gPlayerAnim_link_normal_defense,
|
||||
&gPlayerAnim_link_normal_defense,
|
||||
&gPlayerAnim_link_normal_defense_free,
|
||||
&gPlayerAnim_link_bow_defense,
|
||||
&gPlayerAnim_link_normal_defense_free,
|
||||
/* PLAYER_ANIMGROUP_21 */
|
||||
/* PLAYER_ANIMGROUP_defense_wait */
|
||||
&gPlayerAnim_link_normal_defense_wait_free,
|
||||
&gPlayerAnim_link_normal_defense_wait,
|
||||
&gPlayerAnim_link_normal_defense_wait,
|
||||
&gPlayerAnim_link_normal_defense_wait_free,
|
||||
&gPlayerAnim_link_bow_defense_wait,
|
||||
&gPlayerAnim_link_normal_defense_wait_free,
|
||||
/* PLAYER_ANIMGROUP_22 */
|
||||
/* PLAYER_ANIMGROUP_defense_end */
|
||||
&gPlayerAnim_link_normal_defense_end_free,
|
||||
&gPlayerAnim_link_normal_defense_end,
|
||||
&gPlayerAnim_link_normal_defense_end,
|
||||
&gPlayerAnim_link_normal_defense_end_free,
|
||||
&gPlayerAnim_link_normal_defense_end_free,
|
||||
&gPlayerAnim_link_normal_defense_end_free,
|
||||
/* PLAYER_ANIMGROUP_23 */
|
||||
/* PLAYER_ANIMGROUP_side_walk */
|
||||
&gPlayerAnim_link_normal_side_walk_free,
|
||||
&gPlayerAnim_link_normal_side_walk,
|
||||
&gPlayerAnim_link_normal_side_walk,
|
||||
&gPlayerAnim_link_fighter_side_walk_long,
|
||||
&gPlayerAnim_link_normal_side_walk_free,
|
||||
&gPlayerAnim_link_normal_side_walk_free,
|
||||
/* PLAYER_ANIMGROUP_24 */
|
||||
/* PLAYER_ANIMGROUP_side_walkL */
|
||||
&gPlayerAnim_link_normal_side_walkL_free,
|
||||
&gPlayerAnim_link_anchor_side_walkL,
|
||||
&gPlayerAnim_link_anchor_side_walkL,
|
||||
&gPlayerAnim_link_fighter_side_walkL_long,
|
||||
&gPlayerAnim_link_normal_side_walkL_free,
|
||||
&gPlayerAnim_link_normal_side_walkL_free,
|
||||
/* PLAYER_ANIMGROUP_25 */
|
||||
/* PLAYER_ANIMGROUP_side_walkR */
|
||||
&gPlayerAnim_link_normal_side_walkR_free,
|
||||
&gPlayerAnim_link_anchor_side_walkR,
|
||||
&gPlayerAnim_link_anchor_side_walkR,
|
||||
&gPlayerAnim_link_fighter_side_walkR_long,
|
||||
&gPlayerAnim_link_normal_side_walkR_free,
|
||||
&gPlayerAnim_link_normal_side_walkR_free,
|
||||
/* PLAYER_ANIMGROUP_26 */
|
||||
/* PLAYER_ANIMGROUP_45_turn */
|
||||
&gPlayerAnim_link_normal_45_turn_free,
|
||||
&gPlayerAnim_link_normal_45_turn,
|
||||
&gPlayerAnim_link_normal_45_turn,
|
||||
&gPlayerAnim_link_normal_45_turn_free,
|
||||
&gPlayerAnim_link_normal_45_turn_free,
|
||||
&gPlayerAnim_link_normal_45_turn_free,
|
||||
/* PLAYER_ANIMGROUP_27 */
|
||||
/* PLAYER_ANIMGROUP_waitL2wait */
|
||||
&gPlayerAnim_link_fighter_waitL2wait_long,
|
||||
&gPlayerAnim_link_normal_waitL2wait,
|
||||
&gPlayerAnim_link_normal_waitL2wait,
|
||||
&gPlayerAnim_link_fighter_waitL2wait_long,
|
||||
&gPlayerAnim_link_fighter_waitL2wait_long,
|
||||
&gPlayerAnim_link_fighter_waitL2wait_long,
|
||||
/* PLAYER_ANIMGROUP_28 */
|
||||
/* PLAYER_ANIMGROUP_waitR2wait */
|
||||
&gPlayerAnim_link_fighter_waitR2wait_long,
|
||||
&gPlayerAnim_link_normal_waitR2wait,
|
||||
&gPlayerAnim_link_normal_waitR2wait,
|
||||
&gPlayerAnim_link_fighter_waitR2wait_long,
|
||||
&gPlayerAnim_link_fighter_waitR2wait_long,
|
||||
&gPlayerAnim_link_fighter_waitR2wait_long,
|
||||
/* PLAYER_ANIMGROUP_29 */
|
||||
/* PLAYER_ANIMGROUP_throw */
|
||||
&gPlayerAnim_link_normal_throw_free,
|
||||
&gPlayerAnim_link_normal_throw,
|
||||
&gPlayerAnim_link_normal_throw,
|
||||
&gPlayerAnim_link_normal_throw_free,
|
||||
&gPlayerAnim_link_normal_throw_free,
|
||||
&gPlayerAnim_link_normal_throw_free,
|
||||
/* PLAYER_ANIMGROUP_30 */
|
||||
/* PLAYER_ANIMGROUP_put */
|
||||
&gPlayerAnim_link_normal_put_free,
|
||||
&gPlayerAnim_link_normal_put,
|
||||
&gPlayerAnim_link_normal_put,
|
||||
&gPlayerAnim_link_normal_put_free,
|
||||
&gPlayerAnim_link_normal_put_free,
|
||||
&gPlayerAnim_link_normal_put_free,
|
||||
/* PLAYER_ANIMGROUP_31 */
|
||||
/* PLAYER_ANIMGROUP_back_walk */
|
||||
&gPlayerAnim_link_normal_back_walk,
|
||||
&gPlayerAnim_link_normal_back_walk,
|
||||
&gPlayerAnim_link_normal_back_walk,
|
||||
&gPlayerAnim_link_normal_back_walk,
|
||||
&gPlayerAnim_link_normal_back_walk,
|
||||
&gPlayerAnim_link_normal_back_walk,
|
||||
/* PLAYER_ANIMGROUP_32 */
|
||||
/* PLAYER_ANIMGROUP_check */
|
||||
&gPlayerAnim_link_normal_check_free,
|
||||
&gPlayerAnim_link_normal_check,
|
||||
&gPlayerAnim_link_normal_check,
|
||||
&gPlayerAnim_link_normal_check_free,
|
||||
&gPlayerAnim_link_normal_check_free,
|
||||
&gPlayerAnim_link_normal_check_free,
|
||||
/* PLAYER_ANIMGROUP_33 */
|
||||
/* PLAYER_ANIMGROUP_check_wait */
|
||||
&gPlayerAnim_link_normal_check_wait_free,
|
||||
&gPlayerAnim_link_normal_check_wait,
|
||||
&gPlayerAnim_link_normal_check_wait,
|
||||
&gPlayerAnim_link_normal_check_wait_free,
|
||||
&gPlayerAnim_link_normal_check_wait_free,
|
||||
&gPlayerAnim_link_normal_check_wait_free,
|
||||
/* PLAYER_ANIMGROUP_34 */
|
||||
/* PLAYER_ANIMGROUP_check_end */
|
||||
&gPlayerAnim_link_normal_check_end_free,
|
||||
&gPlayerAnim_link_normal_check_end,
|
||||
&gPlayerAnim_link_normal_check_end,
|
||||
&gPlayerAnim_link_normal_check_end_free,
|
||||
&gPlayerAnim_link_normal_check_end_free,
|
||||
&gPlayerAnim_link_normal_check_end_free,
|
||||
/* PLAYER_ANIMGROUP_35 */
|
||||
/* PLAYER_ANIMGROUP_pull_start */
|
||||
&gPlayerAnim_link_normal_pull_start_free,
|
||||
&gPlayerAnim_link_normal_pull_start,
|
||||
&gPlayerAnim_link_normal_pull_start,
|
||||
&gPlayerAnim_link_normal_pull_start_free,
|
||||
&gPlayerAnim_link_normal_pull_start_free,
|
||||
&gPlayerAnim_link_normal_pull_start_free,
|
||||
/* PLAYER_ANIMGROUP_36 */
|
||||
/* PLAYER_ANIMGROUP_pulling */
|
||||
&gPlayerAnim_link_normal_pulling_free,
|
||||
&gPlayerAnim_link_normal_pulling,
|
||||
&gPlayerAnim_link_normal_pulling,
|
||||
&gPlayerAnim_link_normal_pulling_free,
|
||||
&gPlayerAnim_link_normal_pulling_free,
|
||||
&gPlayerAnim_link_normal_pulling_free,
|
||||
/* PLAYER_ANIMGROUP_37 */
|
||||
/* PLAYER_ANIMGROUP_pull_end */
|
||||
&gPlayerAnim_link_normal_pull_end_free,
|
||||
&gPlayerAnim_link_normal_pull_end,
|
||||
&gPlayerAnim_link_normal_pull_end,
|
||||
&gPlayerAnim_link_normal_pull_end_free,
|
||||
&gPlayerAnim_link_normal_pull_end_free,
|
||||
&gPlayerAnim_link_normal_pull_end_free,
|
||||
/* PLAYER_ANIMGROUP_38 */
|
||||
/* PLAYER_ANIMGROUP_fall_up */
|
||||
&gPlayerAnim_link_normal_fall_up_free,
|
||||
&gPlayerAnim_link_normal_fall_up,
|
||||
&gPlayerAnim_link_normal_fall_up,
|
||||
&gPlayerAnim_link_normal_fall_up_free,
|
||||
&gPlayerAnim_link_normal_fall_up_free,
|
||||
&gPlayerAnim_link_normal_fall_up_free,
|
||||
/* PLAYER_ANIMGROUP_39 */
|
||||
/* PLAYER_ANIMGROUP_jump_climb_hold */
|
||||
&gPlayerAnim_link_normal_jump_climb_hold_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_hold,
|
||||
&gPlayerAnim_link_normal_jump_climb_hold,
|
||||
&gPlayerAnim_link_normal_jump_climb_hold_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_hold_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_hold_free,
|
||||
/* PLAYER_ANIMGROUP_40 */
|
||||
/* PLAYER_ANIMGROUP_jump_climb_wait */
|
||||
&gPlayerAnim_link_normal_jump_climb_wait_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_wait,
|
||||
&gPlayerAnim_link_normal_jump_climb_wait,
|
||||
&gPlayerAnim_link_normal_jump_climb_wait_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_wait_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_wait_free,
|
||||
/* PLAYER_ANIMGROUP_41 */
|
||||
/* PLAYER_ANIMGROUP_jump_climb_up */
|
||||
&gPlayerAnim_link_normal_jump_climb_up_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_up,
|
||||
&gPlayerAnim_link_normal_jump_climb_up,
|
||||
&gPlayerAnim_link_normal_jump_climb_up_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_up_free,
|
||||
&gPlayerAnim_link_normal_jump_climb_up_free,
|
||||
/* PLAYER_ANIMGROUP_42 */
|
||||
/* PLAYER_ANIMGROUP_down_slope_slip_end */
|
||||
&gPlayerAnim_link_normal_down_slope_slip_end_free,
|
||||
&gPlayerAnim_link_normal_down_slope_slip_end,
|
||||
&gPlayerAnim_link_normal_down_slope_slip_end,
|
||||
&gPlayerAnim_link_normal_down_slope_slip_end_long,
|
||||
&gPlayerAnim_link_normal_down_slope_slip_end_free,
|
||||
&gPlayerAnim_link_normal_down_slope_slip_end_free,
|
||||
/* PLAYER_ANIMGROUP_43 */
|
||||
/* PLAYER_ANIMGROUP_up_slope_slip_end */
|
||||
&gPlayerAnim_link_normal_up_slope_slip_end_free,
|
||||
&gPlayerAnim_link_normal_up_slope_slip_end,
|
||||
&gPlayerAnim_link_normal_up_slope_slip_end,
|
||||
&gPlayerAnim_link_normal_up_slope_slip_end_long,
|
||||
&gPlayerAnim_link_normal_up_slope_slip_end_free,
|
||||
&gPlayerAnim_link_normal_up_slope_slip_end_free,
|
||||
/* PLAYER_ANIMGROUP_44 */
|
||||
/* PLAYER_ANIMGROUP_nwait */
|
||||
&gPlayerAnim_sude_nwait,
|
||||
&gPlayerAnim_lkt_nwait,
|
||||
&gPlayerAnim_lkt_nwait,
|
||||
|
@ -2005,7 +2005,7 @@ void func_808332F4(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
static LinkAnimationHeader* func_80833338(Player* this) {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_0, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType);
|
||||
}
|
||||
|
||||
s32 func_80833350(Player* this) {
|
||||
|
@ -2032,12 +2032,12 @@ void func_808333FC(Player* this, s32 arg1) {
|
|||
|
||||
LinkAnimationHeader* func_80833438(Player* this) {
|
||||
if (this->unk_890 != 0) {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_3, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_damage_run, this->modelAnimType);
|
||||
} else if (!(this->stateFlags1 & (PLAYER_STATE1_27 | PLAYER_STATE1_29)) &&
|
||||
(this->currentBoots == PLAYER_BOOTS_IRON)) {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_4, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_heavy_run, this->modelAnimType);
|
||||
} else {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_2, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_run, this->modelAnimType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2049,7 +2049,7 @@ LinkAnimationHeader* func_808334E4(Player* this) {
|
|||
if (func_808334B4(this)) {
|
||||
return &gPlayerAnim_link_boom_throw_waitR;
|
||||
} else {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_6, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_waitR, this->modelAnimType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2057,7 +2057,7 @@ LinkAnimationHeader* func_80833528(Player* this) {
|
|||
if (func_808334B4(this)) {
|
||||
return &gPlayerAnim_link_boom_throw_waitL;
|
||||
} else {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_5, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_waitL, this->modelAnimType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2065,7 +2065,7 @@ LinkAnimationHeader* func_8083356C(Player* this) {
|
|||
if (func_8002DD78(this)) {
|
||||
return &gPlayerAnim_link_bow_side_walk;
|
||||
} else {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_23, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_side_walk, this->modelAnimType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2073,7 +2073,7 @@ LinkAnimationHeader* func_808335B0(Player* this) {
|
|||
if (func_808334B4(this)) {
|
||||
return &gPlayerAnim_link_boom_throw_side_walkR;
|
||||
} else {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_25, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_side_walkR, this->modelAnimType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2081,7 +2081,7 @@ LinkAnimationHeader* func_808335F4(Player* this) {
|
|||
if (func_808334B4(this)) {
|
||||
return &gPlayerAnim_link_boom_throw_side_walkL;
|
||||
} else {
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_24, this->modelAnimType);
|
||||
return GET_PLAYER_ANIM(PLAYER_ANIMGROUP_side_walkL, this->modelAnimType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2650,7 +2650,7 @@ s32 func_80834C74(Player* this, PlayState* play) {
|
|||
|
||||
if (D_80853614 || LinkAnimation_Update(play, &this->skelAnime2)) {
|
||||
func_80833638(this, D_80853EDC[this->heldItemAction]);
|
||||
LinkAnimation_PlayLoop(play, &this->skelAnime2, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_0, this->modelAnimType));
|
||||
LinkAnimation_PlayLoop(play, &this->skelAnime2, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType));
|
||||
this->unk_6AC = 0;
|
||||
this->func_82C(this, play);
|
||||
return 0;
|
||||
|
@ -2682,7 +2682,7 @@ s32 func_80834D2C(Player* this, PlayState* play) {
|
|||
if (this->stateFlags1 & PLAYER_STATE1_23) {
|
||||
func_80832284(play, this, &gPlayerAnim_link_uma_anim_walk);
|
||||
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && !func_80833B54(this)) {
|
||||
func_80832284(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_0, this->modelAnimType));
|
||||
func_80832284(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType));
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
@ -3106,7 +3106,7 @@ void func_80835DE4(PlayState* play, Player* this, PlayerFunc674 func, s32 flags)
|
|||
void func_80835E44(PlayState* play, s16 camSetting) {
|
||||
if (!Play_CamIsNotFixed(play)) {
|
||||
if (camSetting == CAM_SET_SCENE_TRANSITION) {
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING_ALT);
|
||||
}
|
||||
} else {
|
||||
Camera_ChangeSetting(Play_GetCamera(play, CAM_ID_MAIN), camSetting);
|
||||
|
@ -3918,7 +3918,7 @@ void func_80837C0C(PlayState* play, Player* this, s32 arg2, f32 arg3, f32 arg4,
|
|||
this->linearVelocity = 3.0f;
|
||||
this->actor.velocity.y = 6.0f;
|
||||
|
||||
func_80832C2C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_3, this->modelAnimType));
|
||||
func_80832C2C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_damage_run, this->modelAnimType));
|
||||
func_80832698(this, NA_SE_VO_LI_DAMAGE_S);
|
||||
} else {
|
||||
this->actor.speedXZ = arg3;
|
||||
|
@ -4659,13 +4659,13 @@ s32 func_80839800(Player* this, PlayState* play) {
|
|||
: (LINK_IS_ADULT ? DOOR_OPEN_ANIM_ADULT_R : DOOR_OPEN_ANIM_CHILD_R);
|
||||
|
||||
if (door->openAnim == DOOR_OPEN_ANIM_ADULT_L) {
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_9, this->modelAnimType);
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_doorA_free, this->modelAnimType);
|
||||
} else if (door->openAnim == DOOR_OPEN_ANIM_CHILD_L) {
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_10, this->modelAnimType);
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_doorA, this->modelAnimType);
|
||||
} else if (door->openAnim == DOOR_OPEN_ANIM_ADULT_R) {
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_11, this->modelAnimType);
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_doorB_free, this->modelAnimType);
|
||||
} else {
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_12, this->modelAnimType);
|
||||
sp5C = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_doorB, this->modelAnimType);
|
||||
}
|
||||
|
||||
func_80835C58(play, this, func_80845EF8, 0);
|
||||
|
@ -4845,7 +4845,7 @@ void func_8083A0F4(PlayState* play, Player* this) {
|
|||
anim = &gPlayerAnim_link_normal_nocarry_free;
|
||||
} else {
|
||||
func_80835C58(play, this, func_80846050, 0);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_13, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_carryB, this->modelAnimType);
|
||||
}
|
||||
|
||||
func_80832264(play, this, anim);
|
||||
|
@ -5288,7 +5288,7 @@ s32 func_8083B040(Player* this, PlayState* play) {
|
|||
this->exchangeItemId = sp2C;
|
||||
|
||||
if (this->unk_84F < 0) {
|
||||
func_80832B0C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_32, this->modelAnimType));
|
||||
func_80832B0C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check, this->modelAnimType));
|
||||
} else {
|
||||
func_80832264(play, this, D_80854548[this->unk_84F]);
|
||||
}
|
||||
|
@ -5491,7 +5491,8 @@ s32 func_8083BBA0(Player* this, PlayState* play) {
|
|||
|
||||
void func_8083BC04(Player* this, PlayState* play) {
|
||||
func_80835C58(play, this, func_80844708, 0);
|
||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_16, this->modelAnimType),
|
||||
LinkAnimation_PlayOnceSetSpeed(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing_roll, this->modelAnimType),
|
||||
1.25f * D_808535E8);
|
||||
}
|
||||
|
||||
|
@ -5564,14 +5565,14 @@ void func_8083BF50(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (sp30 < 14.0f) {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_18, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk_endL, this->modelAnimType);
|
||||
sp30 = 11.0f - sp30;
|
||||
if (sp30 < 0.0f) {
|
||||
sp30 = 1.375f * -sp30;
|
||||
}
|
||||
sp30 /= 11.0f;
|
||||
} else {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_19, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk_endR, this->modelAnimType);
|
||||
sp30 = 26.0f - sp30;
|
||||
if (sp30 < 0.0f) {
|
||||
sp30 = 2 * -sp30;
|
||||
|
@ -5643,7 +5644,7 @@ s32 func_8083C2B0(Player* this, PlayState* play) {
|
|||
|
||||
if (!Player_IsChildWithHylianShield(this)) {
|
||||
Player_SetModelsForHoldingShield(this);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_20, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_defense, this->modelAnimType);
|
||||
} else {
|
||||
anim = &gPlayerAnim_clink_normal_defense_ALL;
|
||||
}
|
||||
|
@ -5779,7 +5780,7 @@ void func_8083C858(Player* this, PlayState* play) {
|
|||
}
|
||||
|
||||
func_80835C58(play, this, func, 1);
|
||||
func_80832BE8(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_2, this->modelAnimType));
|
||||
func_80832BE8(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_run, this->modelAnimType));
|
||||
|
||||
this->unk_89C = 0;
|
||||
this->unk_864 = this->unk_868 = 0.0f;
|
||||
|
@ -5852,7 +5853,7 @@ void func_8083CB2C(Player* this, s16 yaw, PlayState* play) {
|
|||
|
||||
void func_8083CB94(Player* this, PlayState* play) {
|
||||
func_80835C58(play, this, func_80840DE4, 1);
|
||||
func_80832BE8(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_1, this->modelAnimType));
|
||||
func_80832BE8(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk, this->modelAnimType));
|
||||
}
|
||||
|
||||
void func_8083CBF0(Player* this, s16 yaw, PlayState* play) {
|
||||
|
@ -5865,7 +5866,7 @@ void func_8083CBF0(Player* this, s16 yaw, PlayState* play) {
|
|||
|
||||
void func_8083CC9C(Player* this, PlayState* play) {
|
||||
func_80835C58(play, this, func_8084193C, 1);
|
||||
func_80832BE8(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_25, this->modelAnimType));
|
||||
func_80832BE8(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_side_walkR, this->modelAnimType));
|
||||
this->unk_868 = 0.0f;
|
||||
}
|
||||
|
||||
|
@ -5879,8 +5880,8 @@ void func_8083CD54(PlayState* play, Player* this, s16 yaw) {
|
|||
func_80835C58(play, this, func_80841BA8, 1);
|
||||
this->unk_87E = 1200;
|
||||
this->unk_87E *= D_808535E8;
|
||||
LinkAnimation_Change(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_26, this->modelAnimType), 1.0f, 0.0f,
|
||||
0.0f, ANIMMODE_LOOP, -6.0f);
|
||||
LinkAnimation_Change(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_45_turn, this->modelAnimType), 1.0f,
|
||||
0.0f, 0.0f, ANIMMODE_LOOP, -6.0f);
|
||||
}
|
||||
|
||||
void func_8083CE0C(Player* this, PlayState* play) {
|
||||
|
@ -5889,9 +5890,9 @@ void func_8083CE0C(Player* this, PlayState* play) {
|
|||
func_80835C58(play, this, func_80840BC8, 1);
|
||||
|
||||
if (this->unk_870 < 0.5f) {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_28, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_waitR2wait, this->modelAnimType);
|
||||
} else {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_27, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_waitL2wait, this->modelAnimType);
|
||||
}
|
||||
func_80832264(play, this, anim);
|
||||
|
||||
|
@ -5900,7 +5901,7 @@ void func_8083CE0C(Player* this, PlayState* play) {
|
|||
|
||||
void func_8083CEAC(Player* this, PlayState* play) {
|
||||
func_80835C58(play, this, func_80840450, 1);
|
||||
func_80832B0C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_7, this->modelAnimType));
|
||||
func_80832B0C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait2waitR, this->modelAnimType));
|
||||
this->unk_850 = 1;
|
||||
}
|
||||
|
||||
|
@ -6515,7 +6516,7 @@ s32 func_8083E5A8(Player* this, PlayState* play) {
|
|||
|
||||
void func_8083EA94(Player* this, PlayState* play) {
|
||||
func_80835C58(play, this, func_80846578, 1);
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_29, this->modelAnimType));
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_throw, this->modelAnimType));
|
||||
}
|
||||
|
||||
s32 func_8083EAF0(Player* this, Actor* actor) {
|
||||
|
@ -6533,7 +6534,7 @@ s32 func_8083EB44(Player* this, PlayState* play) {
|
|||
if (!func_80835644(play, this, this->heldActor)) {
|
||||
if (!func_8083EAF0(this, this->heldActor)) {
|
||||
func_80835C58(play, this, func_808464B0, 1);
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_30, this->modelAnimType));
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_put, this->modelAnimType));
|
||||
} else {
|
||||
func_8083EA94(this, play);
|
||||
}
|
||||
|
@ -6927,7 +6928,7 @@ void func_8083FAB8(Player* this, PlayState* play) {
|
|||
void func_8083FB14(Player* this, PlayState* play) {
|
||||
func_80835C58(play, this, func_8084B9E4, 0);
|
||||
this->stateFlags2 |= PLAYER_STATE2_4;
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_35, this->modelAnimType));
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_pull_start, this->modelAnimType));
|
||||
}
|
||||
|
||||
void func_8083FB7C(Player* this, PlayState* play) {
|
||||
|
@ -7457,8 +7458,8 @@ void func_80841138(Player* this, PlayState* play) {
|
|||
if (this->unk_864 < 1.0f) {
|
||||
temp1 = R_UPDATE_RATE * 0.5f;
|
||||
func_8084029C(this, REG(35) / 1000.0f);
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_31, this->modelAnimType),
|
||||
this->unk_868);
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_back_walk, this->modelAnimType), this->unk_868);
|
||||
this->unk_864 += 1 * temp1;
|
||||
if (this->unk_864 >= 1.0f) {
|
||||
this->unk_864 = 1.0f;
|
||||
|
@ -7469,8 +7470,8 @@ void func_80841138(Player* this, PlayState* play) {
|
|||
if (temp2 < 0.0f) {
|
||||
temp1 = 1.0f;
|
||||
func_8084029C(this, (REG(35) / 1000.0f) + ((REG(36) / 1000.0f) * this->linearVelocity));
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_31, this->modelAnimType),
|
||||
this->unk_868);
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_back_walk, this->modelAnimType), this->unk_868);
|
||||
} else {
|
||||
temp1 = (REG(37) / 1000.0f) * temp2;
|
||||
if (temp1 < 1.0f) {
|
||||
|
@ -7479,8 +7480,8 @@ void func_80841138(Player* this, PlayState* play) {
|
|||
temp1 = 1.0f;
|
||||
func_8084029C(this, 1.2f + ((REG(38) / 1000.0f) * temp2));
|
||||
}
|
||||
LinkAnimation_LoadToMorph(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_31, this->modelAnimType),
|
||||
this->unk_868);
|
||||
LinkAnimation_LoadToMorph(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_back_walk, this->modelAnimType), this->unk_868);
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime, &gPlayerAnim_link_normal_back_run,
|
||||
this->unk_868 * (16.0f / 29.0f));
|
||||
}
|
||||
|
@ -7596,8 +7597,8 @@ void func_808417FC(Player* this, PlayState* play) {
|
|||
|
||||
void func_80841860(PlayState* play, Player* this) {
|
||||
f32 frame;
|
||||
LinkAnimationHeader* sp38 = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_24, this->modelAnimType);
|
||||
LinkAnimationHeader* sp34 = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_25, this->modelAnimType);
|
||||
LinkAnimationHeader* sp38 = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_side_walkL, this->modelAnimType);
|
||||
LinkAnimationHeader* sp34 = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_side_walkR, this->modelAnimType);
|
||||
|
||||
this->skelAnime.animation = sp38;
|
||||
|
||||
|
@ -7713,11 +7714,11 @@ void func_80841CC4(Player* this, s32 arg1, PlayState* play) {
|
|||
|
||||
if ((this->modelAnimType == PLAYER_ANIMTYPE_3) || ((this->unk_89C == 0) && (this->unk_6C4 <= 0.0f))) {
|
||||
if (arg1 == 0) {
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_1, this->modelAnimType),
|
||||
this->unk_868);
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk, this->modelAnimType), this->unk_868);
|
||||
} else {
|
||||
LinkAnimation_LoadToMorph(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_1, this->modelAnimType),
|
||||
this->unk_868);
|
||||
LinkAnimation_LoadToMorph(play, &this->skelAnime,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk, this->modelAnimType), this->unk_868);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@ -7742,10 +7743,10 @@ void func_80841CC4(Player* this, s32 arg1, PlayState* play) {
|
|||
}
|
||||
|
||||
if (arg1 == 0) {
|
||||
LinkAnimation_BlendToJoint(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_1, this->modelAnimType),
|
||||
LinkAnimation_BlendToJoint(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk, this->modelAnimType),
|
||||
this->unk_868, anim, this->unk_868, rate, this->blendTable);
|
||||
} else {
|
||||
LinkAnimation_BlendToMorph(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_1, this->modelAnimType),
|
||||
LinkAnimation_BlendToMorph(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk, this->modelAnimType),
|
||||
this->unk_868, anim, this->unk_868, rate, this->blendTable);
|
||||
}
|
||||
}
|
||||
|
@ -7758,7 +7759,7 @@ void func_80841EE4(Player* this, PlayState* play) {
|
|||
temp1 = R_UPDATE_RATE * 0.5f;
|
||||
|
||||
func_8084029C(this, REG(35) / 1000.0f);
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_1, this->modelAnimType),
|
||||
LinkAnimation_LoadToJoint(play, &this->skelAnime, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_walk, this->modelAnimType),
|
||||
this->unk_868);
|
||||
|
||||
this->unk_864 += 1 * temp1;
|
||||
|
@ -7936,11 +7937,11 @@ s32 func_8084269C(PlayState* play, Player* this) {
|
|||
}
|
||||
|
||||
void func_8084279C(Player* this, PlayState* play) {
|
||||
func_80832CB0(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_33, this->modelAnimType));
|
||||
func_80832CB0(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_wait, this->modelAnimType));
|
||||
|
||||
if (DECR(this->unk_850) == 0) {
|
||||
if (!func_8083B040(this, play)) {
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_34, this->modelAnimType), play);
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_check_end, this->modelAnimType), play);
|
||||
}
|
||||
|
||||
this->actor.flags &= ~ACTOR_FLAG_8;
|
||||
|
@ -8164,7 +8165,7 @@ void func_80843188(Player* this, PlayState* play) {
|
|||
|
||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
if (!Player_IsChildWithHylianShield(this)) {
|
||||
func_80832284(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_21, this->modelAnimType));
|
||||
func_80832284(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_defense_wait, this->modelAnimType));
|
||||
}
|
||||
this->unk_850 = 1;
|
||||
this->unk_84F = 0;
|
||||
|
@ -8232,7 +8233,7 @@ void func_80843188(Player* this, PlayState* play) {
|
|||
if (this->itemAction < 0) {
|
||||
func_8008EC70(this);
|
||||
}
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_22, this->modelAnimType), play);
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_defense_end, this->modelAnimType), play);
|
||||
}
|
||||
|
||||
func_8002F7DC(&this->actor, NA_SE_IT_SHIELD_REMOVE);
|
||||
|
@ -8267,7 +8268,7 @@ void func_808435C4(Player* this, PlayState* play) {
|
|||
func_80835C58(play, this, func_80843188, 1);
|
||||
this->stateFlags1 |= PLAYER_STATE1_22;
|
||||
Player_SetModelsForHoldingShield(this);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_20, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_defense, this->modelAnimType);
|
||||
frames = Animation_GetLastFrame(anim);
|
||||
LinkAnimation_Change(play, &this->skelAnime, anim, 1.0f, frames, frames, ANIMMODE_ONCE, 0.0f);
|
||||
}
|
||||
|
@ -8600,7 +8601,7 @@ void func_8084411C(Player* this, PlayState* play) {
|
|||
}
|
||||
this->actor.world.pos.y += this->wallHeight;
|
||||
func_8083A5C4(play, this, this->actor.wallPoly, this->wallDistance,
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_39, this->modelAnimType));
|
||||
GET_PLAYER_ANIM(PLAYER_ANIMGROUP_jump_climb_hold, this->modelAnimType));
|
||||
this->actor.shape.rot.y = this->currentYaw += 0x8000;
|
||||
this->stateFlags1 |= PLAYER_STATE1_13;
|
||||
}
|
||||
|
@ -8609,7 +8610,7 @@ void func_8084411C(Player* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
LinkAnimationHeader* anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_14, this->modelAnimType);
|
||||
LinkAnimationHeader* anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing, this->modelAnimType);
|
||||
s32 sp3C;
|
||||
|
||||
if (this->stateFlags2 & PLAYER_STATE2_19) {
|
||||
|
@ -8624,7 +8625,7 @@ void func_8084411C(Player* this, PlayState* play) {
|
|||
anim = &gPlayerAnim_link_anchor_landingR;
|
||||
func_80833C3C(this);
|
||||
} else if (this->fallDistance <= 80) {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_15, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_short_landing, this->modelAnimType);
|
||||
} else if ((this->fallDistance < 800) && (this->unk_84B[this->unk_846] == 0) &&
|
||||
!(this->stateFlags1 & PLAYER_STATE1_11)) {
|
||||
func_8083BC04(this, play);
|
||||
|
@ -8634,7 +8635,7 @@ void func_8084411C(Player* this, PlayState* play) {
|
|||
sp3C = func_80843E64(play, this);
|
||||
|
||||
if (sp3C > 0) {
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_14, this->modelAnimType), play);
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_landing, this->modelAnimType), play);
|
||||
this->skelAnime.endFrame = 8.0f;
|
||||
if (sp3C == 1) {
|
||||
this->unk_850 = 10;
|
||||
|
@ -8697,7 +8698,7 @@ void func_80844708(Player* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_17, this->modelAnimType));
|
||||
func_80832264(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_hip_down, this->modelAnimType));
|
||||
this->linearVelocity = -this->linearVelocity;
|
||||
Player_RequestQuake(play, 33267, 3, 12);
|
||||
Player_RequestRumble(this, 255, 20, 150, 0);
|
||||
|
@ -9587,8 +9588,8 @@ void Player_InitCommon(Player* this, PlayState* play, FlexSkeletonHeader* skelHe
|
|||
this->currentYaw = this->actor.world.rot.y;
|
||||
func_80834644(play, this);
|
||||
|
||||
SkelAnime_InitLink(play, &this->skelAnime, skelHeader, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_0, this->modelAnimType), 9,
|
||||
this->jointTable, this->morphTable, PLAYER_LIMB_MAX);
|
||||
SkelAnime_InitLink(play, &this->skelAnime, skelHeader, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_wait, this->modelAnimType),
|
||||
9, this->jointTable, this->morphTable, PLAYER_LIMB_MAX);
|
||||
this->skelAnime.baseTransl = D_80854730;
|
||||
SkelAnime_InitLink(play, &this->skelAnime2, skelHeader, func_80833338(this), 9, this->jointTable2,
|
||||
this->morphTable2, PLAYER_LIMB_MAX);
|
||||
|
@ -11444,7 +11445,7 @@ void func_8084B9E4(Player* this, PlayState* play) {
|
|||
Vec3f sp44;
|
||||
Vec3f sp38;
|
||||
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_36, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_pulling, this->modelAnimType);
|
||||
this->stateFlags2 |= PLAYER_STATE2_0 | PLAYER_STATE2_6 | PLAYER_STATE2_8;
|
||||
|
||||
if (func_80832CB0(play, this, anim)) {
|
||||
|
@ -11467,7 +11468,7 @@ void func_8084B9E4(Player* this, PlayState* play) {
|
|||
if (temp1 > 0) {
|
||||
func_8083FAB8(this, play);
|
||||
} else if (temp1 == 0) {
|
||||
func_8083F72C(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_37, this->modelAnimType), play);
|
||||
func_8083F72C(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_pull_end, this->modelAnimType), play);
|
||||
} else {
|
||||
this->stateFlags2 |= PLAYER_STATE2_4;
|
||||
}
|
||||
|
@ -11498,7 +11499,7 @@ void func_8084BBE4(Player* this, PlayState* play) {
|
|||
|
||||
if (LinkAnimation_Update(play, &this->skelAnime)) {
|
||||
// clang-format off
|
||||
anim = (this->unk_84F > 0) ? &gPlayerAnim_link_normal_fall_wait : GET_PLAYER_ANIM(PLAYER_ANIMGROUP_40, this->modelAnimType); func_80832284(play, this, anim);
|
||||
anim = (this->unk_84F > 0) ? &gPlayerAnim_link_normal_fall_wait : GET_PLAYER_ANIM(PLAYER_ANIMGROUP_jump_climb_wait, this->modelAnimType); func_80832284(play, this, anim);
|
||||
// clang-format on
|
||||
} else if (this->unk_84F == 0) {
|
||||
if (this->skelAnime.animation == &gPlayerAnim_link_normal_fall) {
|
||||
|
@ -11523,9 +11524,9 @@ void func_8084BBE4(Player* this, PlayState* play) {
|
|||
func_80837268(this, &sp3C, &sp3A, 0.0f, play);
|
||||
if (this->unk_847[this->unk_846] >= 0) {
|
||||
if (this->unk_84F > 0) {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_38, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_fall_up, this->modelAnimType);
|
||||
} else {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_41, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_jump_climb_up, this->modelAnimType);
|
||||
}
|
||||
func_8083A9B8(this, anim, play);
|
||||
return;
|
||||
|
@ -12192,7 +12193,7 @@ void func_8084D610(Player* this, PlayState* play) {
|
|||
sp32 = this->actor.shape.rot.y;
|
||||
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_15, this->modelAnimType), play);
|
||||
func_8083A098(this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_short_landing, this->modelAnimType), play);
|
||||
func_808328A0(this);
|
||||
}
|
||||
} else {
|
||||
|
@ -12986,9 +12987,9 @@ void func_8084F390(Player* this, PlayState* play) {
|
|||
LinkAnimationHeader* anim;
|
||||
|
||||
if (this->unk_84F == 0) {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_42, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_down_slope_slip_end, this->modelAnimType);
|
||||
} else {
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_43, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_up_slope_slip_end, this->modelAnimType);
|
||||
}
|
||||
func_8083A098(this, anim, play);
|
||||
}
|
||||
|
@ -14025,7 +14026,7 @@ void func_808515A4(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
|||
return;
|
||||
}
|
||||
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_44, this->modelAnimType);
|
||||
anim = GET_PLAYER_ANIM(PLAYER_ANIMGROUP_nwait, this->modelAnimType);
|
||||
|
||||
if ((this->unk_446 == 6) || (this->unk_446 == 0x2E)) {
|
||||
func_80832264(play, this, anim);
|
||||
|
@ -14349,7 +14350,7 @@ void func_808521B8(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
|||
}
|
||||
|
||||
void func_808521F4(PlayState* play, Player* this, CsCmdActorAction* arg2) {
|
||||
func_80832B0C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_44, this->modelAnimType));
|
||||
func_80832B0C(play, this, GET_PLAYER_ANIM(PLAYER_ANIMGROUP_nwait, this->modelAnimType));
|
||||
func_80832210(this);
|
||||
}
|
||||
|
||||
|
|
|
@ -1472,7 +1472,7 @@ void FileSelect_LoadGame(GameState* thisx) {
|
|||
gSaveContext.eventInf[1] = 0;
|
||||
gSaveContext.eventInf[2] = 0;
|
||||
gSaveContext.eventInf[3] = 0;
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
gSaveContext.prevHudVisibilityMode = HUD_VISIBILITY_ALL;
|
||||
gSaveContext.nayrusLoveTimer = 0;
|
||||
gSaveContext.healthAccumulator = 0;
|
||||
gSaveContext.magicState = MAGIC_STATE_IDLE;
|
||||
|
@ -1489,8 +1489,8 @@ void FileSelect_LoadGame(GameState* thisx) {
|
|||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC =
|
||||
gSaveContext.magicCapacity = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode =
|
||||
gSaveContext.hudVisibilityModeTimer = gSaveContext.magicCapacity = 0; // false, HUD_VISIBILITY_NO_CHANGE
|
||||
|
||||
// Set the fill target to be the saved magic amount
|
||||
gSaveContext.magicFillTarget = gSaveContext.magic;
|
||||
|
|
|
@ -29,7 +29,8 @@ void MapSelect_LoadGame(MapSelectState* this, s32 entranceIndex) {
|
|||
}
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13E7 = gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode =
|
||||
gSaveContext.hudVisibilityModeTimer = 0; // false, HUD_VISIBILITY_NO_CHANGE
|
||||
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 0);
|
||||
gSaveContext.entranceIndex = entranceIndex;
|
||||
gSaveContext.respawnFlag = 0;
|
||||
|
|
|
@ -874,8 +874,8 @@ void KaleidoScope_SwitchPage(PauseContext* pauseCtx, u8 pt) {
|
|||
|
||||
osSyncPrintf("kscope->kscp_pos+pt = %d\n", pauseCtx->pageIndex + pt);
|
||||
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
}
|
||||
|
||||
void KaleidoScope_HandlePageToggles(PauseContext* pauseCtx, Input* input) {
|
||||
|
@ -3901,8 +3901,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
|
||||
}
|
||||
|
@ -3949,8 +3949,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
|
||||
} else if (pauseCtx->ocarinaStaff->state == pauseCtx->ocarinaSongIdx) {
|
||||
|
@ -4005,8 +4005,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[4] = BTN_ENABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_APPEARING;
|
||||
pauseCtx->state = PAUSE_STATE_SAVE_PROMPT;
|
||||
}
|
||||
|
@ -4041,8 +4041,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING;
|
||||
R_PAUSE_OFFSET_VERTICAL = -6240;
|
||||
|
@ -4072,8 +4072,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -4085,8 +4085,8 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_ALL);
|
||||
|
||||
pauseCtx->savePromptState = PAUSE_SAVE_PROMPT_STATE_CLOSING_AFTER_SAVED;
|
||||
R_PAUSE_OFFSET_VERTICAL = -6240;
|
||||
|
@ -4143,7 +4143,7 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
R_PAUSE_CURSOR_LEFT_X = -175;
|
||||
R_PAUSE_CURSOR_RIGHT_X = 155;
|
||||
pauseCtx->rollRotSavePrompt_ = -434.0f;
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(HUD_VISIBILITY_NOTHING);
|
||||
|
||||
//! @bug messed up alignment, should match `ALIGN64`
|
||||
pauseCtx->iconItemSegment = (void*)(((uintptr_t)play->objectCtx.spaceStart + 0x30) & ~0x3F);
|
||||
|
@ -4497,10 +4497,9 @@ void KaleidoScope_Update(PlayState* play) {
|
|||
interfaceCtx->unk_1FA = interfaceCtx->unk_1FC = 0;
|
||||
|
||||
osSyncPrintf(VT_FGCOL(YELLOW));
|
||||
osSyncPrintf("i=%d LAST_TIME_TYPE=%d\n", i, gSaveContext.unk_13EE);
|
||||
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(gSaveContext.unk_13EE);
|
||||
osSyncPrintf("i=%d LAST_TIME_TYPE=%d\n", i, gSaveContext.prevHudVisibilityMode);
|
||||
gSaveContext.hudVisibilityMode = HUD_VISIBILITY_NO_CHANGE;
|
||||
Interface_ChangeHudVisibilityMode(gSaveContext.prevHudVisibilityMode);
|
||||
|
||||
player->targetActor = NULL;
|
||||
Player_SetEquipmentData(play, player);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue