mirror of
https://github.com/zeldaret/mm.git
synced 2026-05-23 06:54:14 -04:00
ovl_player_actor: Dawn of a new PR (#1227)
* Rename Player_UpdateBottleHeld * Match func_808497A0 * func_80852290 NON_MATCHING * Match func_8083B3B4 * Params cleanup * Match func_8083FBC4 * sfxId cleanups and others * Fix declaration of functions from D_8085D990 * Change D_8085BE84 to be a 2D array * ARRAY_COUNT_2D * Match func_8085ADA0 * func_808426F0 nonmatching * Match func_80852290 * Match func_808426F0 Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * Add notes to Player_SetDoAction * Name putAwayCountdown * rebase * Match func_80856918 * format * func_8084933C nonmatching small amount of boomerang documentation * Progress on moving data near where it is used * finish moving data * format * cleanup up remaining data * more match * Some minor cleanups * PlayerCsMode enum * func_80851F18 nonmatching * Fix unk_B10 * Purge ExchangeItemID enum * Rename `targetActor` to `talkActor` * Name `targetedActor` * PLAYER_LIMB_BUF_SIZE Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * Change SkelAnime Player functions to take a void pointer for the corresponding buffers * Use PlayerAnimationFrame on Player_DrawImpl * Match func_8082F1AC * Match func_8083D23C * cleanup * Match and clean up func_808373F8 * Match and document func_8083A98C * PLAYER_PARAMS macro and PlayerInitMode enum * Preliminary names for InitMode functions * Match func_8083C8E8 * remove redundant externs * Match func_8084933C * cleanup func_8084933C * Access D_8085BE84 directly instead of using a macro * Match func_8084AC84 * Fix boomearng typo * OK boomerang * cleanup func_8083D168 * untargetedRotY * this->unk_14E = ABS_ALT(var_v1); * GIFIELD macros * sort of a match * Match func_8084C16C Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * Use the same trick to match func_808573A4 * Add note on Deku spinning * Match func_8084D18C * Match func_80850D68 * Improve func_80832660 * Match func_80854EFC Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> * Rename unk_B2A to getItemDrawId * Some cleanup * fix merge issues * format * minor anim docs * Match func_808553F4 * Cleanup func_808553F4 * func_8083D860 nonmatching * Match func_8083D860 * Defake func_80859BA8 * () * Add notes to PlayerAnimGroup enum * underwaterTimer Co-authored-by: engineer124 <engineer124engineer124@gmail.com> * some stateFlags cleaning * more stateFlags cleaning * some notes and minor cleanups * more general cleanups * Slightly less fake func_80832CAC * Document some melee weapon damage stuff * Mark lunge storage * Note PCS patch * match * add notes to bss * yeet extra indentation * add reloc as nonmatching to spec * floorSfxOffset * Player_GetFloorSfx * Player_GetFloorSfxByAge * Comments for AnimSfx dunctions * Name some AnimSfx functions * Name AnimSfx stuff * Some PlayerAgeProperties notes * use animflag defines * Player_SpawnExplosive * fix enum and some other minor fixes * Bit more misc. cleanup * Use OoT's version of func_808333CC * Note on quickspin buffer * Final nonmatching, func_80851F18 Co-authored-by: Synray <31429825+Synray@users.noreply.github.com> * RIP player.c * Name Player_StopHorizontalMovement * misc fixes * Actor_DeactivateLens * fixes * typos and tweaks * minor stuff * add names as comments on the animgoup array * Correct some function names and data type * add anim commets to ageproperties * some notes * De-fake func_80840F90 * Defake & clean up func_8085ADA0 * Improve func_80859BA8 * Enums in func_80852B28 * Name some secret-related things * 3 small things * stuff * Player_TalkWithPlayer * SurfaceType_GetFloorType * SurfaceType_GetWallFlags * and more bgcheck stuff * more bss naming * sPlayerControlInput * clean up func_80836F10 a bit * name the parameters of func_80835BF8 * door stuff * remove NON_MATCHING * remove D_8085D2B0 padding * Name some Player_Cutscene_ functions * various cleanups * format * remainingHopsCounter * some cleanups on the struct * Actor_RequestRumble * this->exchangeItemId = PLAYER_AP_NONE; * fix merge stuff * format * PlayerUnkAA5 * Name two cylinder-related functions * BSS * Add MagicConsume's enum, treat lensActive as bool * Update func_808332A0 based on better info * fix merge * fix merge issues * remove redundant comments * Name Player_AddQuake * ANIM_FLAG_UPDATE*_*Y * Format * AT_TYPE_ENEMY * fix merge issues * format * fix uintptr_ts * Rename * Name leftHandMf * fix merge issues * format * exchangeItemId <= PLAYER_IA_MINUS1 * getItemDrawIdPlusOne * currentActorCsIndex * <= PLAYER_IA_MINUS1 * fix merge issues * format * namefixer and bss * fix build * bombs parameters cleanup * bss * Fix building * fix building * Fix building * Fix building and cleanups * Pre-PR cleanup * really... * format * review * stateFlag Mistakes * 268 * 0.1f * z64door.h * fix cutscene stuff * bss * Update include/z64player.h Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * Update include/z64player.h Co-authored-by: EllipticEllipsis <elliptic.ellipsis@gmail.com> * reiew * PR Review * collision * review * format and a few stuff i missed * EnBomExplosiveType * weekeventregconvert and eventinfconvert * more review * review * bss * review * re format sGetItemTable * Entangle PlayerMask and PlayerItemAction * a few extra cases i missed * bss * review * EnArrow stuff * ARROW_MAGIC_DEKU_BUBBLE * minor format * merge * fix bss * review * !ARROW_IS_ARROW * review * bool cleanup * fix merge * review * Player_StopCutscene * Player_RequestQuake * quakeIndex * Player_RequestQuakeAndRumble * knobDoor and slidingDoor * bss * fix * review * dog and float --------- Co-authored-by: Elliptic Ellipsis <elliptic.ellipsis@gmail.com> Co-authored-by: engineer124 <engineer124engineer124@gmail.com> Co-authored-by: petrie911 <pmontag@PHYS-S129.iowa.uiowa.edu> Co-authored-by: petrie911 <69443847+petrie911@users.noreply.github.com> Co-authored-by: Synray <31429825+Synray@users.noreply.github.com>
This commit is contained in:
@@ -102,7 +102,7 @@ endif
|
||||
|
||||
# Check code syntax with host compiler
|
||||
ifneq ($(RUN_CC_CHECK),0)
|
||||
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces -Wno-int-conversion -Wno-unused-but-set-variable -Wno-unused-label
|
||||
CHECK_WARNINGS := -Wall -Wextra -Wno-format-security -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-variable -Wno-missing-braces -Wno-int-conversion -Wno-unused-but-set-variable -Wno-unused-label -Wno-sign-compare -Wno-tautological-compare
|
||||
CC_CHECK := gcc -fno-builtin -fsyntax-only -funsigned-char -fdiagnostics-color -std=gnu89 -D _LANGUAGE_C -D NON_MATCHING $(IINC) -nostdinc $(CHECK_WARNINGS)
|
||||
ifneq ($(WERROR), 0)
|
||||
CC_CHECK += -Werror
|
||||
|
||||
Executable → Regular
+3
-2
@@ -726,8 +726,9 @@ Actor* Actor_SpawnAsChildAndCutscene(ActorContext* actorCtx, PlayState* play, s1
|
||||
Actor* Actor_SpawnAsChild(ActorContext* actorCtx, Actor* parent, PlayState* play, s16 actorId, f32 posX, f32 posY, f32 posZ, s16 rotX, s16 rotY, s16 rotZ, s32 params);
|
||||
void Actor_SpawnTransitionActors(PlayState* play, ActorContext* actorCtx);
|
||||
void Enemy_StartFinishingBlow(PlayState* play, Actor* actor);
|
||||
s16 func_800BBAC0(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3);
|
||||
s16 func_800BBB74(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3);
|
||||
s16 func_800BBAC0(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3);
|
||||
s16 func_800BBB74(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3);
|
||||
s16 func_800BBC20(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3);
|
||||
void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 partParams, Gfx** dList);
|
||||
void Actor_SpawnFloorDustRing(PlayState* play, Actor* actor, Vec3f* posXZ, f32 radius, s32 countMinusOne, f32 randAccelWeight, s16 scale, s16 scaleStep, u8 useLighting);
|
||||
void func_800BBFB0(PlayState* play, Vec3f* position, f32 arg2, s32 arg3, s16 arg4, s16 scaleStep, u8 arg6);
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0]))
|
||||
#define ARRAY_COUNTU(arr) (u32)(sizeof(arr) / sizeof(arr[0]))
|
||||
|
||||
#define ARRAY_COUNT_2D(arr) (ARRAY_COUNT(arr) * ARRAY_COUNT(arr[0]))
|
||||
|
||||
// TODO: After uintptr_t cast change should have an AVOID_UB target that just toggles the KSEG0 bit in the address rather than add/sub 0x80000000
|
||||
#define PHYSICAL_TO_VIRTUAL(addr) ((uintptr_t)(addr) + RDRAM_CACHED)
|
||||
#define VIRTUAL_TO_PHYSICAL(addr) (uintptr_t)((u8*)(addr) - RDRAM_CACHED)
|
||||
|
||||
+7
-6
@@ -82,11 +82,12 @@
|
||||
#define Z_PRIORITY_IRQMGR 18
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ EQUIP_SLOT_B,
|
||||
/* 1 */ EQUIP_SLOT_C_LEFT,
|
||||
/* 2 */ EQUIP_SLOT_C_DOWN,
|
||||
/* 3 */ EQUIP_SLOT_C_RIGHT,
|
||||
/* 4 */ EQUIP_SLOT_A
|
||||
/* -1 */ EQUIP_SLOT_NONE = -1,
|
||||
/* 0 */ EQUIP_SLOT_B,
|
||||
/* 1 */ EQUIP_SLOT_C_LEFT,
|
||||
/* 2 */ EQUIP_SLOT_C_DOWN,
|
||||
/* 3 */ EQUIP_SLOT_C_RIGHT,
|
||||
/* 4 */ EQUIP_SLOT_A
|
||||
} EquipSlot;
|
||||
|
||||
typedef struct {
|
||||
@@ -517,7 +518,7 @@ typedef struct PlayState {
|
||||
/* 0x18770 */ void (*unk_18770)(struct PlayState* play, Player* player);
|
||||
/* 0x18774 */ s32 (*startPlayerFishing)(struct PlayState* play);
|
||||
/* 0x18778 */ s32 (*grabPlayer)(struct PlayState* play, Player* player);
|
||||
/* 0x1877C */ s32 (*startPlayerCutscene)(struct PlayState* play, Player* player, s32 mode);
|
||||
/* 0x1877C */ s32 (*startPlayerCutscene)(struct PlayState* play, Player* player, PlayerCsMode csMode);
|
||||
/* 0x18780 */ void (*func_18780)(Player* player, struct PlayState* play);
|
||||
/* 0x18784 */ s32 (*damagePlayer)(struct PlayState* play, s32 damage);
|
||||
/* 0x18788 */ void (*talkWithPlayer)(struct PlayState* play, Actor* actor);
|
||||
|
||||
@@ -739,6 +739,11 @@ typedef struct NpcInteractInfo {
|
||||
/* 0x24 */ UNK_TYPE1 unk_24[0x4];
|
||||
} NpcInteractInfo; // size = 0x28
|
||||
|
||||
typedef struct BlinkInfo {
|
||||
/* 0x0 */ s16 eyeTexIndex;
|
||||
/* 0x2 */ s16 blinkTimer;
|
||||
} BlinkInfo; // size = 0x4
|
||||
|
||||
extern TargetRangeParams gTargetRanges[];
|
||||
extern s16 D_801AED48[8];
|
||||
extern Gfx D_801AEF88[];
|
||||
|
||||
@@ -14,9 +14,13 @@ struct PlayerAnimationFrame;
|
||||
#define LIMB_DONE 0xFF
|
||||
|
||||
#define ANIM_FLAG_1 (1 << 0)
|
||||
#define ANIM_FLAG_UPDATEY (1 << 1)
|
||||
#define ANIM_FLAG_UPDATE_Y (1 << 1)
|
||||
#define ANIM_FLAG_4 (1 << 2)
|
||||
#define ANIM_FLAG_8 (1 << 3)
|
||||
#define ANIM_FLAG_NOMOVE (1 << 4)
|
||||
#define ANIM_FLAG_80 (1 << 7)
|
||||
#define ANIM_FLAG_100 (1 << 8)
|
||||
#define ANIM_FLAG_200 (1 << 9)
|
||||
|
||||
typedef enum AnimationMode {
|
||||
/* 0 */ ANIMMODE_LOOP,
|
||||
@@ -326,6 +330,7 @@ void AnimationContext_Update(struct PlayState* play, AnimationContext* animation
|
||||
void SkelAnime_InitPlayer(struct PlayState* play, SkelAnime* skelAnime, FlexSkeletonHeader* skeletonHeaderSeg, PlayerAnimationHeader* animation, s32 flags, void* jointTableBuffer, void* morphTableBuffer, s32 limbBufCount);
|
||||
void PlayerAnimation_SetUpdateFunction(SkelAnime* skelAnime);
|
||||
s32 PlayerAnimation_Update(struct PlayState* play, SkelAnime* skelAnime);
|
||||
void PlayerAnimation_AnimateFrame(struct PlayState* play, SkelAnime* skelAnime);
|
||||
void Animation_SetMorph(struct PlayState* play, SkelAnime* skelAnime, f32 morphFrames);
|
||||
void PlayerAnimation_Change(struct PlayState* play, SkelAnime* skelAnime, PlayerAnimationHeader* animation, f32 playSpeed, f32 startFrame, f32 endFrame, u8 mode, f32 morphFrames);
|
||||
void PlayerAnimation_PlayOnce(struct PlayState* play, SkelAnime* skelAnime, PlayerAnimationHeader* animation);
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
#ifndef Z64_DOOR_H
|
||||
#define Z64_DOOR_H
|
||||
|
||||
#include "ultra64.h"
|
||||
#include "z64actor.h"
|
||||
|
||||
typedef struct KnobDoorActor {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ SkelAnime skelAnime;
|
||||
/* 0x1A0 */ u8 animIndex;
|
||||
/* 0x1A1 */ u8 playOpenAnim;
|
||||
/* 0x1A2 */ s8 requiredObjBankIndex;
|
||||
/* 0x1A3 */ s8 dlIndex;
|
||||
} KnobDoorActor; // size = 0x1A4
|
||||
|
||||
typedef struct SlidingDoorActor {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ s16 unk_15C;
|
||||
/* 0x15E */ s16 unk_15E;
|
||||
} SlidingDoorActor; // size = 0x160
|
||||
|
||||
#define DOOR_GET_TRANSITION_ID(thisx) ((u16)(thisx)->params >> 10)
|
||||
|
||||
#endif
|
||||
+4
-4
@@ -118,10 +118,10 @@ typedef struct {
|
||||
/* 0x188 */ u16 flags;
|
||||
/* 0x18A */ s16 addAngleChange;
|
||||
/* 0x18C */ s16 addAngle;
|
||||
/* 0x18E */ Color_RGBA8 p1StartColor;
|
||||
/* 0x192 */ Color_RGBA8 p2StartColor;
|
||||
/* 0x196 */ Color_RGBA8 p1EndColor;
|
||||
/* 0x19A */ Color_RGBA8 p2EndColor;
|
||||
/* 0x18E */ u8 p1StartColor[4];
|
||||
/* 0x192 */ u8 p2StartColor[4];
|
||||
/* 0x196 */ u8 p1EndColor[4];
|
||||
/* 0x19A */ u8 p2EndColor[4];
|
||||
/* 0x19E */ u8 numElements; // "now_edge_num"
|
||||
/* 0x19F */ u8 elemDuration;
|
||||
/* 0x1A0 */ u8 unkFlag;
|
||||
|
||||
+51
-13
@@ -332,12 +332,16 @@ typedef enum GetItemId {
|
||||
/* 0x08 */ GI_WALLET_ADULT,
|
||||
/* 0x09 */ GI_WALLET_GIANT,
|
||||
/* 0x0A */ GI_RECOVERY_HEART,
|
||||
/* 0x0C */ GI_HEART_PIECE = 0x0C,
|
||||
/* 0x0B */ GI_0B,
|
||||
/* 0x0C */ GI_HEART_PIECE,
|
||||
/* 0x0D */ GI_HEART_CONTAINER,
|
||||
/* 0x0E */ GI_MAGIC_SMALL,
|
||||
/* 0x0F */ GI_MAGIC_LARGE,
|
||||
/* 0x11 */ GI_STRAY_FAIRY = 0x11,
|
||||
/* 0x14 */ GI_BOMBS_1 = 0x14,
|
||||
/* 0x10 */ GI_10,
|
||||
/* 0x11 */ GI_STRAY_FAIRY,
|
||||
/* 0x12 */ GI_12,
|
||||
/* 0x13 */ GI_13,
|
||||
/* 0x14 */ GI_BOMBS_1,
|
||||
/* 0x15 */ GI_BOMBS_5,
|
||||
/* 0x16 */ GI_BOMBS_10,
|
||||
/* 0x17 */ GI_BOMBS_20,
|
||||
@@ -360,8 +364,14 @@ typedef enum GetItemId {
|
||||
/* 0x28 */ GI_NUTS_1,
|
||||
/* 0x29 */ GI_NUTS_5,
|
||||
/* 0x2A */ GI_NUTS_10,
|
||||
/* 0x2E */ GI_BOMBCHUS_20 = 0x2E,
|
||||
/* 0x32 */ GI_SHIELD_HERO = 0x32,
|
||||
/* 0x2B */ GI_2B,
|
||||
/* 0x2C */ GI_2C,
|
||||
/* 0x2D */ GI_2D,
|
||||
/* 0x2E */ GI_BOMBCHUS_20,
|
||||
/* 0x2F */ GI_2F,
|
||||
/* 0x30 */ GI_30,
|
||||
/* 0x31 */ GI_31,
|
||||
/* 0x32 */ GI_SHIELD_HERO,
|
||||
/* 0x33 */ GI_SHIELD_MIRROR,
|
||||
/* 0x34 */ GI_POWDER_KEG,
|
||||
/* 0x35 */ GI_MAGIC_BEANS,
|
||||
@@ -379,10 +389,24 @@ typedef enum GetItemId {
|
||||
/* 0x41 */ GI_HOOKSHOT,
|
||||
/* 0x42 */ GI_LENS,
|
||||
/* 0x43 */ GI_PICTO_BOX,
|
||||
/* 0x4C */ GI_OCARINA = 0x4C,
|
||||
/* 0x50 */ GI_BOMBERS_NOTEBOOK = 0x50,
|
||||
/* 0x52 */ GI_SKULL_TOKEN = 0x52,
|
||||
/* 0x55 */ GI_REMAINS_ODOLWA = 0x55,
|
||||
/* 0x44 */ GI_44,
|
||||
/* 0x45 */ GI_45,
|
||||
/* 0x46 */ GI_46,
|
||||
/* 0x47 */ GI_47,
|
||||
/* 0x48 */ GI_48,
|
||||
/* 0x49 */ GI_49,
|
||||
/* 0x4A */ GI_4A,
|
||||
/* 0x4B */ GI_4B,
|
||||
/* 0x4C */ GI_OCARINA,
|
||||
/* 0x4D */ GI_4D,
|
||||
/* 0x4E */ GI_4E,
|
||||
/* 0x4F */ GI_4F,
|
||||
/* 0x50 */ GI_BOMBERS_NOTEBOOK,
|
||||
/* 0x51 */ GI_51,
|
||||
/* 0x52 */ GI_SKULL_TOKEN,
|
||||
/* 0x53 */ GI_53,
|
||||
/* 0x54 */ GI_54,
|
||||
/* 0x55 */ GI_REMAINS_ODOLWA,
|
||||
/* 0x56 */ GI_REMAINS_GOHT,
|
||||
/* 0x57 */ GI_REMAINS_GYORG,
|
||||
/* 0x58 */ GI_REMAINS_TWINMOLD,
|
||||
@@ -410,9 +434,14 @@ typedef enum GetItemId {
|
||||
/* 0x6E */ GI_SEAHORSE,
|
||||
/* 0x6F */ GI_CHATEAU_BOTTLE,
|
||||
/* 0x70 */ GI_HYLIAN_LOACH,
|
||||
/* 0x75 */ GI_75 = 0x75,
|
||||
/* 0x71 */ GI_71,
|
||||
/* 0x72 */ GI_72,
|
||||
/* 0x73 */ GI_73,
|
||||
/* 0x74 */ GI_74,
|
||||
/* 0x75 */ GI_75,
|
||||
/* 0x76 */ GI_ICE_TRAP,
|
||||
/* 0x78 */ GI_MASK_DEKU = 0x78,
|
||||
/* 0x77 */ GI_77,
|
||||
/* 0x78 */ GI_MASK_DEKU,
|
||||
/* 0x79 */ GI_MASK_GORON,
|
||||
/* 0x7A */ GI_MASK_ZORA,
|
||||
/* 0x7B */ GI_MASK_FIERCE_DEITY,
|
||||
@@ -436,7 +465,8 @@ typedef enum GetItemId {
|
||||
/* 0x8D */ GI_MASK_BLAST,
|
||||
/* 0x8E */ GI_MASK_SCENTS,
|
||||
/* 0x8F */ GI_MASK_KAFEIS_MASK,
|
||||
/* 0x91 */ GI_CHATEAU = 0x91,
|
||||
/* 0x90 */ GI_90,
|
||||
/* 0x91 */ GI_CHATEAU,
|
||||
/* 0x92 */ GI_MILK,
|
||||
/* 0x93 */ GI_GOLD_DUST_2,
|
||||
/* 0x94 */ GI_HYLIAN_LOACH_2, // Unused bottled eel
|
||||
@@ -463,7 +493,15 @@ typedef enum GetItemId {
|
||||
/* 0xA9 */ GI_BOTTLE_STOLEN, // buy back stolen bottle
|
||||
/* 0xAA */ GI_LETTER_TO_KAFEI,
|
||||
/* 0xAB */ GI_PENDANT_OF_MEMORIES,
|
||||
/* 0xB4 */ GI_TINGLE_MAP_CLOCK_TOWN = 0xB4,
|
||||
/* 0xAC */ GI_AC,
|
||||
/* 0xAD */ GI_AD,
|
||||
/* 0xAE */ GI_AE,
|
||||
/* 0xAF */ GI_AF,
|
||||
/* 0xB0 */ GI_B0,
|
||||
/* 0xB1 */ GI_B1,
|
||||
/* 0xB2 */ GI_B2,
|
||||
/* 0xB3 */ GI_B3,
|
||||
/* 0xB4 */ GI_TINGLE_MAP_CLOCK_TOWN,
|
||||
/* 0xB5 */ GI_TINGLE_MAP_WOODFALL,
|
||||
/* 0xB6 */ GI_TINGLE_MAP_SNOWHEAD,
|
||||
/* 0xB7 */ GI_TINGLE_MAP_ROMANI_RANCH,
|
||||
|
||||
+132
-80
@@ -43,35 +43,6 @@ typedef enum PlayerTransformation {
|
||||
/* 5 */ PLAYER_FORM_MAX
|
||||
} PlayerTransformation;
|
||||
|
||||
typedef enum PlayerMask {
|
||||
/* 0x00 */ PLAYER_MASK_NONE,
|
||||
/* 0x01 */ PLAYER_MASK_TRUTH,
|
||||
/* 0x02 */ PLAYER_MASK_KAFEIS_MASK,
|
||||
/* 0x03 */ PLAYER_MASK_ALL_NIGHT,
|
||||
/* 0x04 */ PLAYER_MASK_BUNNY,
|
||||
/* 0x05 */ PLAYER_MASK_KEATON,
|
||||
/* 0x06 */ PLAYER_MASK_GARO,
|
||||
/* 0x07 */ PLAYER_MASK_ROMANI,
|
||||
/* 0x08 */ PLAYER_MASK_CIRCUS_LEADER,
|
||||
/* 0x09 */ PLAYER_MASK_POSTMAN,
|
||||
/* 0x0A */ PLAYER_MASK_COUPLE,
|
||||
/* 0x0B */ PLAYER_MASK_GREAT_FAIRY,
|
||||
/* 0x0C */ PLAYER_MASK_GIBDO,
|
||||
/* 0x0D */ PLAYER_MASK_DON_GERO,
|
||||
/* 0x0E */ PLAYER_MASK_KAMARO,
|
||||
/* 0x0F */ PLAYER_MASK_CAPTAIN,
|
||||
/* 0x10 */ PLAYER_MASK_STONE,
|
||||
/* 0x11 */ PLAYER_MASK_BREMEN,
|
||||
/* 0x12 */ PLAYER_MASK_BLAST,
|
||||
/* 0x13 */ PLAYER_MASK_SCENTS,
|
||||
/* 0x14 */ PLAYER_MASK_GIANT,
|
||||
/* 0x15 */ PLAYER_MASK_FIERCE_DEITY,
|
||||
/* 0x16 */ PLAYER_MASK_GORON,
|
||||
/* 0x17 */ PLAYER_MASK_ZORA,
|
||||
/* 0x18 */ PLAYER_MASK_DEKU,
|
||||
/* 0x19 */ PLAYER_MASK_MAX
|
||||
} PlayerMask;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ PLAYER_ENV_HAZARD_NONE,
|
||||
/* 1 */ PLAYER_ENV_HAZARD_HOTROOM,
|
||||
@@ -89,7 +60,7 @@ typedef enum PlayerItemAction {
|
||||
/* 0x03 */ PLAYER_IA_SWORD_KOKIRI = PLAYER_IA_SWORD_MIN,
|
||||
/* 0x04 */ PLAYER_IA_SWORD_RAZOR,
|
||||
/* 0x05 */ PLAYER_IA_SWORD_GILDED,
|
||||
/* 0x06 */ PLAYER_IA_SWORD_GREAT_FAIRY,
|
||||
/* 0x06 */ PLAYER_IA_SWORD_TWO_HANDED,
|
||||
/* 0x07 */ PLAYER_IA_STICK,
|
||||
/* 0x08 */ PLAYER_IA_ZORA_FINS,
|
||||
/* 0x09 */ PLAYER_IA_BOW,
|
||||
@@ -143,7 +114,8 @@ typedef enum PlayerItemAction {
|
||||
/* 0x37 */ PLAYER_IA_37,
|
||||
/* 0x38 */ PLAYER_IA_38,
|
||||
/* 0x39 */ PLAYER_IA_39,
|
||||
/* 0x3A */ PLAYER_IA_MASK_TRUTH,
|
||||
/* 0x3A */ PLAYER_IA_MASK_MIN,
|
||||
/* 0x3A */ PLAYER_IA_MASK_TRUTH = PLAYER_IA_MASK_MIN,
|
||||
/* 0x3B */ PLAYER_IA_MASK_KAFEIS_MASK,
|
||||
/* 0x3C */ PLAYER_IA_MASK_ALL_NIGHT,
|
||||
/* 0x3D */ PLAYER_IA_MASK_BUNNY,
|
||||
@@ -163,10 +135,12 @@ typedef enum PlayerItemAction {
|
||||
/* 0x4B */ PLAYER_IA_MASK_BLAST,
|
||||
/* 0x4C */ PLAYER_IA_MASK_SCENTS,
|
||||
/* 0x4D */ PLAYER_IA_MASK_GIANT,
|
||||
/* 0x4E */ PLAYER_IA_MASK_FIERCE_DEITY,
|
||||
/* 0x4E */ PLAYER_IA_MASK_TRANSFORMATION_MIN,
|
||||
/* 0x4E */ PLAYER_IA_MASK_FIERCE_DEITY = PLAYER_IA_MASK_TRANSFORMATION_MIN,
|
||||
/* 0x4F */ PLAYER_IA_MASK_GORON,
|
||||
/* 0x50 */ PLAYER_IA_MASK_ZORA,
|
||||
/* 0x51 */ PLAYER_IA_MASK_DEKU,
|
||||
/* 0x51 */ PLAYER_IA_MASK_MAX = PLAYER_IA_MASK_DEKU,
|
||||
/* 0x52 */ PLAYER_IA_LENS,
|
||||
/* 0x53 */ PLAYER_IA_MAX
|
||||
} PlayerItemAction;
|
||||
@@ -190,12 +164,45 @@ typedef enum PlayerMeleeWeapon {
|
||||
/* 1 */ PLAYER_MELEEWEAPON_SWORD_KOKIRI = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_KOKIRI),
|
||||
/* 2 */ PLAYER_MELEEWEAPON_SWORD_RAZOR = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_RAZOR),
|
||||
/* 3 */ PLAYER_MELEEWEAPON_SWORD_GILDED = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_GILDED),
|
||||
/* 4 */ PLAYER_MELEEWEAPON_SWORD_GREAT_FAIRY = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_GREAT_FAIRY),
|
||||
/* 4 */ PLAYER_MELEEWEAPON_SWORD_TWO_HANDED = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_SWORD_TWO_HANDED),
|
||||
/* 5 */ PLAYER_MELEEWEAPON_STICK = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_STICK),
|
||||
/* 6 */ PLAYER_MELEEWEAPON_ZORA_FINS = GET_MELEE_WEAPON_FROM_IA(PLAYER_IA_ZORA_FINS),
|
||||
/* 7 */ PLAYER_MELEEWEAPON_MAX
|
||||
} PlayerMeleeWeapon;
|
||||
|
||||
// Relies on mask item actions to be contiguous
|
||||
#define GET_MASK_FROM_IA(itemAction) ((itemAction) - (PLAYER_IA_MASK_MIN - 1))
|
||||
#define GET_IA_FROM_MASK(mask) ((mask) + (PLAYER_IA_MASK_MIN - 1))
|
||||
|
||||
typedef enum PlayerMask {
|
||||
/* 0x00 */ PLAYER_MASK_NONE,
|
||||
/* 0x01 */ PLAYER_MASK_TRUTH = GET_MASK_FROM_IA(PLAYER_IA_MASK_TRUTH),
|
||||
/* 0x02 */ PLAYER_MASK_KAFEIS_MASK = GET_MASK_FROM_IA(PLAYER_IA_MASK_KAFEIS_MASK),
|
||||
/* 0x03 */ PLAYER_MASK_ALL_NIGHT = GET_MASK_FROM_IA(PLAYER_IA_MASK_ALL_NIGHT),
|
||||
/* 0x04 */ PLAYER_MASK_BUNNY = GET_MASK_FROM_IA(PLAYER_IA_MASK_BUNNY),
|
||||
/* 0x05 */ PLAYER_MASK_KEATON = GET_MASK_FROM_IA(PLAYER_IA_MASK_KEATON),
|
||||
/* 0x06 */ PLAYER_MASK_GARO = GET_MASK_FROM_IA(PLAYER_IA_MASK_GARO),
|
||||
/* 0x07 */ PLAYER_MASK_ROMANI = GET_MASK_FROM_IA(PLAYER_IA_MASK_ROMANI),
|
||||
/* 0x08 */ PLAYER_MASK_CIRCUS_LEADER = GET_MASK_FROM_IA(PLAYER_IA_MASK_CIRCUS_LEADER),
|
||||
/* 0x09 */ PLAYER_MASK_POSTMAN = GET_MASK_FROM_IA(PLAYER_IA_MASK_POSTMAN),
|
||||
/* 0x0A */ PLAYER_MASK_COUPLE = GET_MASK_FROM_IA(PLAYER_IA_MASK_COUPLE),
|
||||
/* 0x0B */ PLAYER_MASK_GREAT_FAIRY = GET_MASK_FROM_IA(PLAYER_IA_MASK_GREAT_FAIRY),
|
||||
/* 0x0C */ PLAYER_MASK_GIBDO = GET_MASK_FROM_IA(PLAYER_IA_MASK_GIBDO),
|
||||
/* 0x0D */ PLAYER_MASK_DON_GERO = GET_MASK_FROM_IA(PLAYER_IA_MASK_DON_GERO),
|
||||
/* 0x0E */ PLAYER_MASK_KAMARO = GET_MASK_FROM_IA(PLAYER_IA_MASK_KAMARO),
|
||||
/* 0x0F */ PLAYER_MASK_CAPTAIN = GET_MASK_FROM_IA(PLAYER_IA_MASK_CAPTAIN),
|
||||
/* 0x10 */ PLAYER_MASK_STONE = GET_MASK_FROM_IA(PLAYER_IA_MASK_STONE),
|
||||
/* 0x11 */ PLAYER_MASK_BREMEN = GET_MASK_FROM_IA(PLAYER_IA_MASK_BREMEN),
|
||||
/* 0x12 */ PLAYER_MASK_BLAST = GET_MASK_FROM_IA(PLAYER_IA_MASK_BLAST),
|
||||
/* 0x13 */ PLAYER_MASK_SCENTS = GET_MASK_FROM_IA(PLAYER_IA_MASK_SCENTS),
|
||||
/* 0x14 */ PLAYER_MASK_GIANT = GET_MASK_FROM_IA(PLAYER_IA_MASK_GIANT),
|
||||
/* 0x15 */ PLAYER_MASK_FIERCE_DEITY = GET_MASK_FROM_IA(PLAYER_IA_MASK_FIERCE_DEITY),
|
||||
/* 0x16 */ PLAYER_MASK_GORON = GET_MASK_FROM_IA(PLAYER_IA_MASK_GORON),
|
||||
/* 0x17 */ PLAYER_MASK_ZORA = GET_MASK_FROM_IA(PLAYER_IA_MASK_ZORA),
|
||||
/* 0x18 */ PLAYER_MASK_DEKU = GET_MASK_FROM_IA(PLAYER_IA_MASK_DEKU),
|
||||
/* 0x19 */ PLAYER_MASK_MAX
|
||||
} PlayerMask;
|
||||
|
||||
// Relies on bottle-related item actions to be contiguous
|
||||
#define GET_BOTTLE_FROM_IA(itemAction) ((itemAction) - PLAYER_IA_BOTTLE_MIN)
|
||||
|
||||
@@ -244,7 +251,7 @@ typedef enum PlayerSword {
|
||||
/* 0 */ PLAYER_SWORD_KOKIRI = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_KOKIRI),
|
||||
/* 1 */ PLAYER_SWORD_RAZOR = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_RAZOR),
|
||||
/* 2 */ PLAYER_SWORD_GILDED = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_GILDED),
|
||||
/* 3 */ PLAYER_SWORD_GREAT_FAIRY = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_GREAT_FAIRY),
|
||||
/* 3 */ PLAYER_SWORD_TWO_HANDED = GET_SWORD_FROM_IA(PLAYER_IA_SWORD_TWO_HANDED),
|
||||
/* 4 */ PLAYER_SWORD_MAX
|
||||
} PlayerSword;
|
||||
|
||||
@@ -287,6 +294,12 @@ typedef enum PlayerMeleeWeaponAnimation {
|
||||
/* 34 */ PLAYER_MWA_MAX
|
||||
} PlayerMeleeWeaponAnimation;
|
||||
|
||||
typedef enum PlayerMeleeWeaponState {
|
||||
/* -1 */ PLAYER_MELEE_WEAPON_STATE_MINUS_1 = -1,
|
||||
/* 0 */ PLAYER_MELEE_WEAPON_STATE_0,
|
||||
/* 1 */ PLAYER_MELEE_WEAPON_STATE_1
|
||||
} PlayerMeleeWeaponState;
|
||||
|
||||
typedef enum PlayerDoorType {
|
||||
/* -1 */ PLAYER_DOORTYPE_TALKING = -1, // Displays a message instead of opening
|
||||
/* 0 */ PLAYER_DOORTYPE_NONE,
|
||||
@@ -300,13 +313,61 @@ typedef enum PlayerDoorType {
|
||||
typedef enum PlayerAnimType {
|
||||
/* 0 */ PLAYER_ANIMTYPE_DEFAULT, // DEFAULT
|
||||
/* 1 */ PLAYER_ANIMTYPE_1,
|
||||
/* 2 */ PLAYER_ANIMTYPE_2,
|
||||
/* 2 */ PLAYER_ANIMTYPE_2, // Shield but no sword?
|
||||
/* 3 */ PLAYER_ANIMTYPE_3, // Two hand weapon
|
||||
/* 4 */ PLAYER_ANIMTYPE_4,
|
||||
/* 5 */ PLAYER_ANIMTYPE_5,
|
||||
/* 6 */ PLAYER_ANIMTYPE_MAX
|
||||
} PlayerAnimType;
|
||||
|
||||
typedef enum PlayerAnimGroup {
|
||||
/* 0 */ PLAYER_ANIMGROUP_0, // STANDING_IDLE
|
||||
/* 1 */ PLAYER_ANIMGROUP_1, // WALKING
|
||||
/* 2 */ PLAYER_ANIMGROUP_2, // RUNNING
|
||||
/* 3 */ PLAYER_ANIMGROUP_3,
|
||||
/* 4 */ PLAYER_ANIMGROUP_4,
|
||||
/* 5 */ PLAYER_ANIMGROUP_5, // Z-Targeting ?
|
||||
/* 6 */ PLAYER_ANIMGROUP_6, // Start or finishing some animation
|
||||
/* 7 */ PLAYER_ANIMGROUP_7, // DRAW_MELEE_WEAPON
|
||||
/* 8 */ PLAYER_ANIMGROUP_8, // OPEN_DOOR_LEFT_FIERCE_DEITY
|
||||
/* 9 */ PLAYER_ANIMGROUP_9, // OPEN_DOOR_LEFT_HUMAN
|
||||
/* 10 */ PLAYER_ANIMGROUP_10, // OPEN_DOOR_RIGHT_FIERCE_DEITY
|
||||
/* 11 */ PLAYER_ANIMGROUP_11, // OPEN_DOOR_RIGHT_HUMAN
|
||||
/* 12 */ PLAYER_ANIMGROUP_12, // GRABBING
|
||||
/* 13 */ PLAYER_ANIMGROUP_13, // FALLING/LANDING?
|
||||
/* 14 */ PLAYER_ANIMGROUP_14, // landing from short distances?
|
||||
/* 15 */ PLAYER_ANIMGROUP_15, // ROLLING
|
||||
/* 16 */ PLAYER_ANIMGROUP_16, // BONK/BONKING
|
||||
/* 17 */ PLAYER_ANIMGROUP_17,
|
||||
/* 18 */ PLAYER_ANIMGROUP_18,
|
||||
/* 19 */ PLAYER_ANIMGROUP_19, // START_SHIELDING
|
||||
/* 20 */ PLAYER_ANIMGROUP_20, // SHIELDING
|
||||
/* 21 */ PLAYER_ANIMGROUP_21, // STOP_SHIELDING/END_SHIELDING
|
||||
/* 22 */ PLAYER_ANIMGROUP_22, // SLOW_SIDE_WALK?
|
||||
/* 23 */ PLAYER_ANIMGROUP_23, // SIDE_WALK
|
||||
/* 24 */ PLAYER_ANIMGROUP_24, // SIDE_WALK_RIGHT
|
||||
/* 25 */ PLAYER_ANIMGROUP_25,
|
||||
/* 26 */ PLAYER_ANIMGROUP_26,
|
||||
/* 27 */ PLAYER_ANIMGROUP_27,
|
||||
/* 28 */ PLAYER_ANIMGROUP_28, // THROWING
|
||||
/* 29 */ PLAYER_ANIMGROUP_29, // PUT_DOWN_OBJECT?
|
||||
/* 30 */ PLAYER_ANIMGROUP_30, // back walking slow?
|
||||
/* 31 */ PLAYER_ANIMGROUP_31,
|
||||
/* 32 */ PLAYER_ANIMGROUP_32,
|
||||
/* 33 */ PLAYER_ANIMGROUP_33,
|
||||
/* 34 */ PLAYER_ANIMGROUP_34, // PULLING_START
|
||||
/* 35 */ PLAYER_ANIMGROUP_35, // PULLING
|
||||
/* 36 */ PLAYER_ANIMGROUP_36, // PULLING_END
|
||||
/* 37 */ PLAYER_ANIMGROUP_37, // climbing from a ledge?
|
||||
/* 38 */ PLAYER_ANIMGROUP_38, // ledge
|
||||
/* 39 */ PLAYER_ANIMGROUP_39, // ledge
|
||||
/* 40 */ PLAYER_ANIMGROUP_40, // climbing from a ledge
|
||||
/* 41 */ PLAYER_ANIMGROUP_41,
|
||||
/* 42 */ PLAYER_ANIMGROUP_42,
|
||||
/* 43 */ PLAYER_ANIMGROUP_43,
|
||||
/* 44 */ PLAYER_ANIMGROUP_MAX
|
||||
} PlayerAnimGroup;
|
||||
|
||||
typedef enum PlayerModelType {
|
||||
// left hand
|
||||
/* 0 */ PLAYER_MODELTYPE_LH_OPEN,
|
||||
@@ -464,7 +525,7 @@ typedef struct PlayerAnimationFrame {
|
||||
#define GET_RIGHT_HAND_INDEX_FROM_JOINT_TABLE(jointTable) (GET_APPEARANCE_FROM_JOINT_TABLE(jointTable) & 0x0F00)
|
||||
|
||||
typedef struct PlayerAgeProperties {
|
||||
/* 0x00 */ f32 unk_00; // ceilingCheckHeight?
|
||||
/* 0x00 */ f32 unk_00; // ceilingCheckHeight
|
||||
/* 0x04 */ f32 shadowScale;
|
||||
/* 0x08 */ f32 unk_08;
|
||||
/* 0x0C */ f32 unk_0C;
|
||||
@@ -478,7 +539,7 @@ typedef struct PlayerAgeProperties {
|
||||
/* 0x2C */ f32 unk_2C; // water stuff // depthInWater
|
||||
/* 0x30 */ f32 unk_30; // water stuff // depthInWater
|
||||
/* 0x34 */ f32 unk_34;
|
||||
/* 0x38 */ f32 unk_38; // wallCheckHeight?
|
||||
/* 0x38 */ f32 unk_38; // wallCheckHeight
|
||||
/* 0x3C */ f32 unk_3C;
|
||||
/* 0x40 */ f32 unk_40;
|
||||
/* 0x44 */ Vec3s unk_44;
|
||||
@@ -489,9 +550,9 @@ typedef struct PlayerAgeProperties {
|
||||
/* 0x94 */ u16 surfaceSfxIdOffset;
|
||||
/* 0x98 */ f32 unk_98;
|
||||
/* 0x9C */ f32 unk_9C;
|
||||
/* 0xA0 */ PlayerAnimationHeader* unk_A0;
|
||||
/* 0xA4 */ PlayerAnimationHeader* unk_A4;
|
||||
/* 0xA8 */ PlayerAnimationHeader* unk_A8;
|
||||
/* 0xA0 */ PlayerAnimationHeader* openChestAnim;
|
||||
/* 0xA4 */ PlayerAnimationHeader* unk_A4; // OoT leftovers to interact with the Master Sword
|
||||
/* 0xA8 */ PlayerAnimationHeader* unk_A8; // OoT leftovers to interact with the Master Sword
|
||||
/* 0xAC */ PlayerAnimationHeader* unk_AC;
|
||||
/* 0xB0 */ PlayerAnimationHeader* unk_B0;
|
||||
/* 0xB4 */ PlayerAnimationHeader* unk_B4[4];
|
||||
@@ -547,7 +608,7 @@ typedef enum PlayerCsMode {
|
||||
/* 0x0F */ PLAYER_CSMODE_15,
|
||||
/* 0x10 */ PLAYER_CSMODE_16,
|
||||
/* 0x11 */ PLAYER_CSMODE_17,
|
||||
/* 0x12 */ PLAYER_CSMODE_18,
|
||||
/* 0x12 */ PLAYER_CSMODE_18, // Strangled by Wallmaster
|
||||
/* 0x13 */ PLAYER_CSMODE_19,
|
||||
/* 0x14 */ PLAYER_CSMODE_20,
|
||||
/* 0x15 */ PLAYER_CSMODE_21,
|
||||
@@ -555,7 +616,7 @@ typedef enum PlayerCsMode {
|
||||
/* 0x17 */ PLAYER_CSMODE_23,
|
||||
/* 0x18 */ PLAYER_CSMODE_24,
|
||||
/* 0x19 */ PLAYER_CSMODE_25,
|
||||
/* 0x1A */ PLAYER_CSMODE_26,
|
||||
/* 0x1A */ PLAYER_CSMODE_26, // Halt!
|
||||
/* 0x1B */ PLAYER_CSMODE_27,
|
||||
/* 0x1C */ PLAYER_CSMODE_28,
|
||||
/* 0x1D */ PLAYER_CSMODE_29,
|
||||
@@ -613,7 +674,7 @@ typedef enum PlayerCsMode {
|
||||
/* 0x51 */ PLAYER_CSMODE_81,
|
||||
/* 0x52 */ PLAYER_CSMODE_82,
|
||||
/* 0x53 */ PLAYER_CSMODE_83,
|
||||
/* 0x54 */ PLAYER_CSMODE_84,
|
||||
/* 0x54 */ PLAYER_CSMODE_84, // Sucked by the moon
|
||||
/* 0x55 */ PLAYER_CSMODE_85,
|
||||
/* 0x56 */ PLAYER_CSMODE_86,
|
||||
/* 0x57 */ PLAYER_CSMODE_87,
|
||||
@@ -867,10 +928,11 @@ typedef enum PlayerCsMode {
|
||||
#define PLAYER_STATE3_20000000 (1 << 29)
|
||||
//
|
||||
#define PLAYER_STATE3_40000000 (1 << 30)
|
||||
//
|
||||
// TARGETING_HOSTILE?
|
||||
#define PLAYER_STATE3_80000000 (1 << 31)
|
||||
|
||||
|
||||
#define PLAYER_GET_BG_CAM_INDEX(thisx) ((thisx)->params & 0xFF)
|
||||
#define PLAYER_GET_INITMODE(thisx) (((thisx)->params & 0xF00) >> 8)
|
||||
|
||||
typedef enum PlayerInitMode {
|
||||
@@ -894,6 +956,15 @@ typedef enum PlayerInitMode {
|
||||
|
||||
#define PLAYER_PARAMS(startBgCamIndex, initMode) ((startBgCamIndex & 0xFF) | ((initMode & 0xF) << 8))
|
||||
|
||||
typedef enum PlayerUnkAA5 {
|
||||
/* 0 */ PLAYER_UNKAA5_0,
|
||||
/* 1 */ PLAYER_UNKAA5_1,
|
||||
/* 2 */ PLAYER_UNKAA5_2,
|
||||
/* 3 */ PLAYER_UNKAA5_3,
|
||||
/* 4 */ PLAYER_UNKAA5_4,
|
||||
/* 5 */ PLAYER_UNKAA5_5,
|
||||
} PlayerUnkAA5;
|
||||
|
||||
typedef void (*PlayerActionFunc)(struct Player* this, struct PlayState* play);
|
||||
typedef s32 (*PlayerFuncAC4)(struct Player* this, struct PlayState* play);
|
||||
typedef void (*PlayerFuncD58)(struct PlayState* play, struct Player* this);
|
||||
@@ -917,31 +988,13 @@ typedef struct Player {
|
||||
/* 0x151 */ u8 rightHandType;
|
||||
/* 0x152 */ u8 sheathType;
|
||||
/* 0x153 */ u8 currentMask; // PlayerMask enum
|
||||
/* 0x154 */ s8 unk_154;
|
||||
/* 0x154 */ s8 unk_154; // EquipSlot enum // Last pressed equip slot?
|
||||
/* 0x155 */ u8 prevMask;
|
||||
/* 0x158 */ Gfx** rightHandDLists;
|
||||
/* 0x15C */ Gfx** leftHandDLists;
|
||||
/* 0x160 */ Gfx** sheathDLists;
|
||||
/* 0x164 */ Gfx** waistDLists;
|
||||
/* 0x168 */ f32 unk_168;
|
||||
/* 0x16C */ f32 unk_16C;
|
||||
/* 0x170 */ f32 unk_170;
|
||||
/* 0x174 */ f32 unk_174;
|
||||
/* 0x178 */ f32 unk_178;
|
||||
/* 0x17C */ f32 unk_17C;
|
||||
/* 0x180 */ f32 unk_180;
|
||||
/* 0x184 */ f32 unk_184;
|
||||
/* 0x188 */ f32 unk_188;
|
||||
/* 0x18C */ f32 unk_18C;
|
||||
/* 0x190 */ f32 unk_190;
|
||||
/* 0x194 */ f32 unk_194;
|
||||
/* 0x198 */ f32 unk_198;
|
||||
/* 0x19C */ f32 unk_19C;
|
||||
/* 0x1A0 */ f32 unk_1A0;
|
||||
/* 0x1A4 */ f32 unk_1A4;
|
||||
/* 0x1A8 */ f32 unk_1A8;
|
||||
/* 0x1AC */ f32 unk_1AC;
|
||||
/* 0x1B0 */ f32 unk_1B0;
|
||||
/* 0x168 */ UNK_TYPE1 unk_168[0x4C];
|
||||
/* 0x1B4 */ s16 unk_1B4;
|
||||
/* 0x1B6 */ char unk_1B6[2];
|
||||
/* 0x1B8 */ u8 giObjectLoading;
|
||||
@@ -960,8 +1013,7 @@ typedef struct Player {
|
||||
/* 0x2C8 */ SkelAnime unk_2C8;
|
||||
/* 0x30C */ Vec3s jointTable[5];
|
||||
/* 0x32A */ Vec3s morphTable[5];
|
||||
/* 0x348 */ s16 eyeTexId;
|
||||
/* 0x34A */ s16 eyeAnimTimer;
|
||||
/* 0x348 */ BlinkInfo blinkInfo;
|
||||
/* 0x34C */ Actor* heldActor;
|
||||
/* 0x350 */ PosRot leftHandWorld;
|
||||
/* 0x364 */ Actor* rightHandActor;
|
||||
@@ -980,12 +1032,12 @@ typedef struct Player {
|
||||
/* 0x395 */ u8 prevCsMode; // PlayerCsMode enum
|
||||
/* 0x396 */ u8 unk_396; // currentActorActionId?
|
||||
/* 0x397 */ u8 unk_397; // PlayerDoorType enum
|
||||
/* 0x398 */ Actor* unk_398;
|
||||
/* 0x398 */ Actor* unk_398; // csActor?
|
||||
/* 0x39C */ UNK_TYPE1 unk_39C[0x4];
|
||||
/* 0x3A0 */ Vec3f unk_3A0;
|
||||
/* 0x3AC */ Vec3f unk_3AC;
|
||||
/* 0x3B8 */ u16 unk_3B8;
|
||||
/* 0x3BA */ s16 unk_3BA;
|
||||
/* 0x3BA */ s16 doorBgCamIndex;
|
||||
/* 0x3BC */ s16 subCamId;
|
||||
/* 0x3BE */ char unk_3BE[2];
|
||||
/* 0x3C0 */ Vec3f unk_3C0;
|
||||
@@ -1028,7 +1080,7 @@ typedef struct Player {
|
||||
/* 0xA9C */ f32 secretRumbleCharge; // builds per frame until discharges with a rumble request
|
||||
/* 0xAA0 */ f32 closestSecretDistSq; // Used to augment `secretRumbleCharge`. Cleared every frame
|
||||
/* 0xAA4 */ s8 unk_AA4;
|
||||
/* 0xAA5 */ u8 unk_AA5;
|
||||
/* 0xAA5 */ u8 unk_AA5; // PlayerUnkAA5 enum
|
||||
/* 0xAA6 */ u16 unk_AA6; // flags of some kind
|
||||
/* 0xAA8 */ s16 unk_AA8;
|
||||
/* 0xAAA */ s16 unk_AAA;
|
||||
@@ -1049,20 +1101,21 @@ typedef struct Player {
|
||||
/* 0xADA */ s8 meleeWeaponAnimation;
|
||||
/* 0xADB */ s8 meleeWeaponState;
|
||||
/* 0xADC */ s8 unk_ADC;
|
||||
/* 0xADD */ s8 unk_ADD;
|
||||
/* 0xADD */ s8 unk_ADD; // Some sort of combo counter
|
||||
/* 0xADE */ u8 unk_ADE;
|
||||
/* 0xADF */ s8 unk_ADF[4]; // Circular buffer used for testing for triggering a quickspin
|
||||
/* 0xAE3 */ s8 unk_AE3[4]; // Circular buffer used for ?
|
||||
/* 0xAE7 */ s8 unk_AE7; // a timer
|
||||
/* 0xAE7 */ s8 unk_AE7; // a timer, used as an index for multiple kinds of animations too, room index?, etc
|
||||
/* 0xAE8 */ s16 unk_AE8; // multipurpose timer
|
||||
/* 0xAEC */ f32 unk_AEC;
|
||||
/* 0xAF0 */ union { // TODO: this may be an union of two structs
|
||||
/* 0xAF0 */ union {
|
||||
Vec3f unk_AF0[2];
|
||||
f32 arr_AF0[6];
|
||||
};
|
||||
/* 0xB08 */ f32 unk_B08[2]; // TODO: Investigate if this member actually is an array
|
||||
/* 0xB08 */ f32 unk_B08;
|
||||
/* 0xB0C */ f32 unk_B0C;
|
||||
/* 0xB10 */ f32 unk_B10[6];
|
||||
/* 0xB28 */ s16 unk_B28; //Burning stick timer?
|
||||
/* 0xB28 */ s16 unk_B28; // Burning stick timer?
|
||||
/* 0xB2A */ s8 getItemDrawIdPlusOne;
|
||||
/* 0xB2B */ s8 unk_B2B;
|
||||
/* 0xB2C */ f32 windSpeed;
|
||||
@@ -1088,7 +1141,7 @@ typedef struct Player {
|
||||
/* 0xB64 */ u8 unk_B64;
|
||||
/* 0xB65 */ u8 shockTimer;
|
||||
/* 0xB66 */ u8 unk_B66;
|
||||
/* 0xB67 */ u8 unk_B67; // deku remaining hops counter
|
||||
/* 0xB67 */ u8 remainingHopsCounter; // Deku hopping on water
|
||||
/* 0xB68 */ s16 fallStartHeight; // last truncated Y position before falling
|
||||
/* 0xB6A */ s16 fallDistance; // truncated Y distance the player has fallen so far (positive is down)
|
||||
/* 0xB6C */ s16 unk_B6C;
|
||||
@@ -1100,8 +1153,8 @@ typedef struct Player {
|
||||
/* 0xB76 */ s16 unk_B76;
|
||||
/* 0xB78 */ f32 unk_B78;
|
||||
/* 0xB7C */ f32 unk_B7C;
|
||||
/* 0xB80 */ f32 unk_B80;
|
||||
/* 0xB84 */ s16 unk_B84;
|
||||
/* 0xB80 */ f32 pushedSpeed; // Pushing player, examples include water currents, floor conveyors, climbing sloped surfaces
|
||||
/* 0xB84 */ s16 pushedYaw; // Yaw of direction in which player is being pushed
|
||||
/* 0xB86 */ s16 unk_B86[2]; // unknown length
|
||||
/* 0xB8A */ s16 unk_B8A;
|
||||
/* 0xB8C */ s16 unk_B8C;
|
||||
@@ -1112,7 +1165,7 @@ typedef struct Player {
|
||||
/* 0xB96 */ s16 unk_B96;
|
||||
/* 0xB98 */ WeaponInfo meleeWeaponInfo[3];
|
||||
/* 0xBEC */ Vec3f bodyPartsPos[PLAYER_BODYPART_MAX];
|
||||
/* 0xCC4 */ MtxF mf_CC4;
|
||||
/* 0xCC4 */ MtxF leftHandMf;
|
||||
/* 0xD04 */ MtxF shieldMf;
|
||||
/* 0xD44 */ u8 isBurning;
|
||||
/* 0xD45 */ u8 flameTimers[PLAYER_BODYPART_MAX]; // one flame per body part
|
||||
@@ -1120,8 +1173,7 @@ typedef struct Player {
|
||||
/* 0xD58 */ PlayerFuncD58 unk_D58;
|
||||
/* 0xD5C */ s8 invincibilityTimer; // prevents damage when nonzero (positive = visible, counts towards zero each frame)
|
||||
/* 0xD5D */ u8 unk_D5D;
|
||||
/* 0xD5E */ u8 unk_D5E;
|
||||
/* 0xD5F */ u8 unk_D5F;
|
||||
/* 0xD5E */ u8 floorProperty; // FloorProperty enum
|
||||
/* 0xD60 */ f32 unk_D60;
|
||||
/* 0xD64 */ s16 unk_D64;
|
||||
/* 0xD66 */ u16 unk_D66; // sfx
|
||||
|
||||
+1
-1
@@ -338,7 +338,7 @@ typedef struct SaveContext {
|
||||
/* 0x3DB8 */ u16 entranceSound; // "player_wipe_door_SE"
|
||||
/* 0x3DBA */ u8 unk_3DBA; // "player_wipe_item"
|
||||
/* 0x3DBB */ u8 unk_3DBB; // "next_walk"
|
||||
/* 0x3DBC */ s16 dogParams; // "dog_flag"
|
||||
/* 0x3DBC */ s16 dogParams; // OoT leftover. "dog_flag"
|
||||
/* 0x3DBE */ u8 envHazardTextTriggerFlags; // "guide_status"
|
||||
/* 0x3DBF */ u8 showTitleCard; // "name_display"
|
||||
/* 0x3DC0 */ s16 unk_3DC0; // "shield_magic_timer"
|
||||
|
||||
@@ -700,9 +700,7 @@ beginseg
|
||||
name "ovl_player_actor"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_player_actor/z_player.o"
|
||||
include "build/data/ovl_player_actor/ovl_player_actor.data.o"
|
||||
include "build/data/ovl_player_actor/ovl_player_actor.bss.o"
|
||||
include "build/data/ovl_player_actor/ovl_player_actor.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_player_actor/ovl_player_actor_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "global.h"
|
||||
#include "stack.h"
|
||||
#include "stackcheck.h"
|
||||
|
||||
+38
-37
@@ -1374,7 +1374,7 @@ s32 func_800B724C(PlayState* play, Actor* actor, u8 csMode) {
|
||||
|
||||
player->csMode = csMode;
|
||||
player->unk_398 = actor;
|
||||
player->unk_3BA = 0;
|
||||
player->doorBgCamIndex = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1382,7 +1382,7 @@ s32 func_800B7298(PlayState* play, Actor* actor, u8 csMode) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (func_800B724C(play, actor, csMode)) {
|
||||
player->unk_3BA = 1;
|
||||
player->doorBgCamIndex = 1;
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -3490,49 +3490,50 @@ void Enemy_StartFinishingBlow(PlayState* play, Actor* actor) {
|
||||
}
|
||||
|
||||
// blinking routine
|
||||
s16 func_800BBAC0(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
s16 func_800BBAC0(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(info->blinkTimer) == 0) {
|
||||
info->blinkTimer = Rand_S16Offset(arg1, arg2);
|
||||
}
|
||||
|
||||
if (arg0[1] - arg3 > 0) {
|
||||
arg0[0] = 0;
|
||||
} else if ((arg0[1] - arg3 >= -1) || (arg0[1] < 2)) {
|
||||
arg0[0] = 1;
|
||||
if (info->blinkTimer - arg3 > 0) {
|
||||
info->eyeTexIndex = 0;
|
||||
} else if ((info->blinkTimer - arg3 >= -1) || (info->blinkTimer < 2)) {
|
||||
info->eyeTexIndex = 1;
|
||||
} else {
|
||||
arg0[0] = 2;
|
||||
info->eyeTexIndex = 2;
|
||||
}
|
||||
|
||||
return arg0[0];
|
||||
return info->eyeTexIndex;
|
||||
}
|
||||
|
||||
// blinking routine
|
||||
s16 func_800BBB74(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
s16 func_800BBB74(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(info->blinkTimer) == 0) {
|
||||
info->blinkTimer = Rand_S16Offset(arg1, arg2);
|
||||
}
|
||||
|
||||
if (arg0[1] - arg3 > 0) {
|
||||
arg0[0] = 0;
|
||||
} else if (arg0[1] - arg3 == 0) {
|
||||
arg0[0] = 1;
|
||||
if (info->blinkTimer - arg3 > 0) {
|
||||
info->eyeTexIndex = 0;
|
||||
} else if (info->blinkTimer - arg3 == 0) {
|
||||
info->eyeTexIndex = 1;
|
||||
} else {
|
||||
arg0[0] = 2;
|
||||
info->eyeTexIndex = 2;
|
||||
}
|
||||
|
||||
return arg0[0];
|
||||
return info->eyeTexIndex;
|
||||
}
|
||||
|
||||
// unused blinking routine
|
||||
s16 func_800BBC20(s16 arg0[2], s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(arg0[1]) == 0) {
|
||||
arg0[1] = Rand_S16Offset(arg1, arg2);
|
||||
arg0[0]++;
|
||||
if ((arg0[0] % 3) == 0) {
|
||||
arg0[0] = (s32)(Rand_ZeroOne() * arg3) * 3;
|
||||
s16 func_800BBC20(BlinkInfo* info, s16 arg1, s16 arg2, s16 arg3) {
|
||||
if (DECR(info->blinkTimer) == 0) {
|
||||
info->blinkTimer = Rand_S16Offset(arg1, arg2);
|
||||
info->eyeTexIndex++;
|
||||
if ((info->eyeTexIndex % 3) == 0) {
|
||||
info->eyeTexIndex = (s32)(Rand_ZeroOne() * arg3) * 3;
|
||||
}
|
||||
}
|
||||
return arg0[0];
|
||||
|
||||
return info->eyeTexIndex;
|
||||
}
|
||||
|
||||
void Actor_SpawnBodyParts(Actor* actor, PlayState* play, s32 partParams, Gfx** dList) {
|
||||
@@ -3614,15 +3615,15 @@ void func_800BC154(PlayState* play, ActorContext* actorCtx, Actor* actor, u8 act
|
||||
|
||||
// Damage flags for EnArrow
|
||||
u32 sArrowDmgFlags[] = {
|
||||
DMG_FIRE_ARROW, // ENARROW_0
|
||||
DMG_NORMAL_ARROW, // ENARROW_1
|
||||
DMG_NORMAL_ARROW, // ENARROW_2
|
||||
DMG_FIRE_ARROW, // ENARROW_3
|
||||
DMG_ICE_ARROW, // ENARROW_4
|
||||
DMG_LIGHT_ARROW, // ENARROW_5
|
||||
DMG_DEKU_NUT, // ENARROW_6
|
||||
DMG_DEKU_BUBBLE, // ENARROW_7
|
||||
DMG_DEKU_NUT, // ENARROW_8
|
||||
DMG_FIRE_ARROW, // ARROW_TYPE_NORMAL_LIT
|
||||
DMG_NORMAL_ARROW, // ARROW_TYPE_NORMAL_HORSE
|
||||
DMG_NORMAL_ARROW, // ARROW_TYPE_NORMAL
|
||||
DMG_FIRE_ARROW, // ARROW_TYPE_FIRE
|
||||
DMG_ICE_ARROW, // ARROW_TYPE_ICE
|
||||
DMG_LIGHT_ARROW, // ARROW_TYPE_LIGHT
|
||||
DMG_DEKU_NUT, // ARROW_TYPE_SLINGSHOT
|
||||
DMG_DEKU_BUBBLE, // ARROW_TYPE_DEKU_BUBBLE
|
||||
DMG_DEKU_NUT, // ARROW_TYPE_DEKU_NUT
|
||||
};
|
||||
|
||||
u32 Actor_GetArrowDmgFlags(s32 params) {
|
||||
@@ -4476,7 +4477,7 @@ s32 func_800BE184(PlayState* play, Actor* actor, f32 xzDist, s16 arg3, s16 arg4,
|
||||
s16 phi_v0 = BINANG_SUB(BINANG_ROT180(actor->yawTowardsPlayer), player->actor.shape.rot.y);
|
||||
s16 temp_t0 = actor->yawTowardsPlayer - arg5;
|
||||
|
||||
if ((actor->xzDistToPlayer <= xzDist) && (player->meleeWeaponState != 0)) {
|
||||
if ((actor->xzDistToPlayer <= xzDist) && (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0)) {
|
||||
if ((arg4 >= ABS_ALT(phi_v0)) && (arg3 >= ABS_ALT(temp_t0))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
+5
-5
@@ -465,13 +465,13 @@ s32 func_800CBA7C(Camera* camera) {
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_800CBAAC(Camera* camera) {
|
||||
PlayerMeleeWeaponState func_800CBAAC(Camera* camera) {
|
||||
Actor* focalActor = camera->focalActor;
|
||||
|
||||
if (camera->focalActor == &GET_PLAYER(camera->play)->actor) {
|
||||
return ((Player*)focalActor)->meleeWeaponState;
|
||||
} else {
|
||||
return 0;
|
||||
return PLAYER_MELEE_WEAPON_STATE_0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,13 +506,13 @@ s32 func_800CBB88(Camera* camera) {
|
||||
Actor* focalActor = camera->focalActor;
|
||||
|
||||
if (camera->focalActor == &GET_PLAYER(camera->play)->actor) {
|
||||
if ((((Player*)focalActor)->meleeWeaponState != 0) &&
|
||||
if ((((Player*)focalActor)->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
(((Player*)focalActor)->meleeWeaponAnimation == PLAYER_MWA_GORON_PUNCH_BUTT)) {
|
||||
return 3;
|
||||
}
|
||||
|
||||
if ((((Player*)focalActor)->stateFlags2 & PLAYER_STATE2_20000) ||
|
||||
((((Player*)focalActor)->meleeWeaponState != 0) &&
|
||||
((((Player*)focalActor)->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
(((Player*)focalActor)->meleeWeaponAnimation == PLAYER_MWA_ZORA_PUNCH_KICK))) {
|
||||
return 1;
|
||||
}
|
||||
@@ -3958,7 +3958,7 @@ s32 Camera_Battle1(Camera* camera) {
|
||||
}
|
||||
|
||||
camera->roll = Camera_ScaledStepToCeilS(sp88, camera->roll, 0.06f, 5);
|
||||
if (func_800CBAAC(camera) != 0) {
|
||||
if (func_800CBAAC(camera) != PLAYER_MELEE_WEAPON_STATE_0) {
|
||||
phi_f12 = ((camera->play->state.frames & 8) != 0) ? roData->unk_20 - (roData->unk_20 * 0.5f) : roData->unk_20;
|
||||
} else {
|
||||
phi_f12 = ((gSaveContext.save.saveInfo.playerData.health <= 16) ? 0.8f : 1.0f) * (sp78 - (sp78 * 0.05f * spEC));
|
||||
|
||||
+36
-48
@@ -114,23 +114,17 @@ void EffectBlure_Init1(void* thisx, void* initParamsx) {
|
||||
EffectBlureInit1* initParams = (EffectBlureInit1*)initParamsx;
|
||||
|
||||
if ((this != NULL) && (initParams != NULL)) {
|
||||
s32 i;
|
||||
|
||||
EffectBlure_InitElements(this);
|
||||
this->p1StartColor.r = initParams->p1StartColor[0];
|
||||
this->p2StartColor.r = initParams->p2StartColor[0];
|
||||
this->p1EndColor.r = initParams->p1EndColor[0];
|
||||
this->p2EndColor.r = initParams->p2EndColor[0];
|
||||
this->p1StartColor.g = initParams->p1StartColor[1];
|
||||
this->p2StartColor.g = initParams->p2StartColor[1];
|
||||
this->p1EndColor.g = initParams->p1EndColor[1];
|
||||
this->p2EndColor.g = initParams->p2EndColor[1];
|
||||
this->p1StartColor.b = initParams->p1StartColor[2];
|
||||
this->p2StartColor.b = initParams->p2StartColor[2];
|
||||
this->p1EndColor.b = initParams->p1EndColor[2];
|
||||
this->p2EndColor.b = initParams->p2EndColor[2];
|
||||
this->p1StartColor.a = initParams->p1StartColor[3];
|
||||
this->p2StartColor.a = initParams->p2StartColor[3];
|
||||
this->p1EndColor.a = initParams->p1EndColor[3];
|
||||
this->p2EndColor.a = initParams->p2EndColor[3];
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
this->p1StartColor[i] = initParams->p1StartColor[i];
|
||||
this->p2StartColor[i] = initParams->p2StartColor[i];
|
||||
this->p1EndColor[i] = initParams->p1EndColor[i];
|
||||
this->p2EndColor[i] = initParams->p2EndColor[i];
|
||||
}
|
||||
|
||||
this->elemDuration = initParams->elemDuration;
|
||||
this->unkFlag = initParams->unkFlag;
|
||||
this->calcMode = initParams->calcMode;
|
||||
@@ -155,23 +149,17 @@ void EffectBlure_Init2(void* thisx, void* initParamsx) {
|
||||
EffectBlureInit2* initParams = (EffectBlureInit2*)initParamsx;
|
||||
|
||||
if ((this != NULL) && (initParams != NULL)) {
|
||||
s32 i;
|
||||
|
||||
EffectBlure_InitElements(this);
|
||||
this->p1StartColor.r = initParams->p1StartColor[0];
|
||||
this->p2StartColor.r = initParams->p2StartColor[0];
|
||||
this->p1EndColor.r = initParams->p1EndColor[0];
|
||||
this->p2EndColor.r = initParams->p2EndColor[0];
|
||||
this->p1StartColor.g = initParams->p1StartColor[1];
|
||||
this->p2StartColor.g = initParams->p2StartColor[1];
|
||||
this->p1EndColor.g = initParams->p1EndColor[1];
|
||||
this->p2EndColor.g = initParams->p2EndColor[1];
|
||||
this->p1StartColor.b = initParams->p1StartColor[2];
|
||||
this->p2StartColor.b = initParams->p2StartColor[2];
|
||||
this->p1EndColor.b = initParams->p1EndColor[2];
|
||||
this->p2EndColor.b = initParams->p2EndColor[2];
|
||||
this->p1StartColor.a = initParams->p1StartColor[3];
|
||||
this->p2StartColor.a = initParams->p2StartColor[3];
|
||||
this->p1EndColor.a = initParams->p1EndColor[3];
|
||||
this->p2EndColor.a = initParams->p2EndColor[3];
|
||||
|
||||
for (i = 0; i < 4; i++) {
|
||||
this->p1StartColor[i] = initParams->p1StartColor[i];
|
||||
this->p2StartColor[i] = initParams->p2StartColor[i];
|
||||
this->p1EndColor[i] = initParams->p1EndColor[i];
|
||||
this->p2EndColor[i] = initParams->p2EndColor[i];
|
||||
}
|
||||
|
||||
this->elemDuration = initParams->elemDuration;
|
||||
this->unkFlag = initParams->unkFlag;
|
||||
this->calcMode = initParams->calcMode;
|
||||
@@ -372,14 +360,14 @@ void EffectBlure_GetComputedValues(EffectBlure* this, s32 index, f32 ratio, Vec3
|
||||
color1->r = color1->g = color1->b = color1->a = 255;
|
||||
color2->r = color2->g = color2->b = color2->a = 255;
|
||||
} else {
|
||||
color1->r = func_800B0A24(this->p1StartColor.r, this->p1EndColor.r, ratio);
|
||||
color1->g = func_800B0A24(this->p1StartColor.g, this->p1EndColor.g, ratio);
|
||||
color1->b = func_800B0A24(this->p1StartColor.b, this->p1EndColor.b, ratio);
|
||||
color1->a = func_800B0A24(this->p1StartColor.a, this->p1EndColor.a, ratio);
|
||||
color2->r = func_800B0A24(this->p2StartColor.r, this->p2EndColor.r, ratio);
|
||||
color2->g = func_800B0A24(this->p2StartColor.g, this->p2EndColor.g, ratio);
|
||||
color2->b = func_800B0A24(this->p2StartColor.b, this->p2EndColor.b, ratio);
|
||||
color2->a = func_800B0A24(this->p2StartColor.a, this->p2EndColor.a, ratio);
|
||||
color1->r = func_800B0A24(this->p1StartColor[0], this->p1EndColor[0], ratio);
|
||||
color1->g = func_800B0A24(this->p1StartColor[1], this->p1EndColor[1], ratio);
|
||||
color1->b = func_800B0A24(this->p1StartColor[2], this->p1EndColor[2], ratio);
|
||||
color1->a = func_800B0A24(this->p1StartColor[3], this->p1EndColor[3], ratio);
|
||||
color2->r = func_800B0A24(this->p2StartColor[0], this->p2EndColor[0], ratio);
|
||||
color2->g = func_800B0A24(this->p2StartColor[1], this->p2EndColor[1], ratio);
|
||||
color2->b = func_800B0A24(this->p2StartColor[2], this->p2EndColor[2], ratio);
|
||||
color2->a = func_800B0A24(this->p2StartColor[3], this->p2EndColor[3], ratio);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -992,19 +980,19 @@ void EffectBlure_Draw(void* thisx, GraphicsContext* gfxCtx) {
|
||||
vtx[j].v.flag = 0;
|
||||
vtx[j].v.tc[0] = 0;
|
||||
vtx[j].v.tc[1] = 0;
|
||||
vtx[j].v.cn[0] = func_800B0A24(this->p1StartColor.r, this->p1EndColor.r, ratio);
|
||||
vtx[j].v.cn[1] = func_800B0A24(this->p1StartColor.g, this->p1EndColor.g, ratio);
|
||||
vtx[j].v.cn[2] = func_800B0A24(this->p1StartColor.b, this->p1EndColor.b, ratio);
|
||||
vtx[j].v.cn[3] = func_800B0A24(this->p1StartColor.a, this->p1EndColor.a, ratio);
|
||||
vtx[j].v.cn[0] = func_800B0A24(this->p1StartColor[0], this->p1EndColor[0], ratio);
|
||||
vtx[j].v.cn[1] = func_800B0A24(this->p1StartColor[1], this->p1EndColor[1], ratio);
|
||||
vtx[j].v.cn[2] = func_800B0A24(this->p1StartColor[2], this->p1EndColor[2], ratio);
|
||||
vtx[j].v.cn[3] = func_800B0A24(this->p1StartColor[3], this->p1EndColor[3], ratio);
|
||||
j++;
|
||||
|
||||
vtx[j].v.flag = 0;
|
||||
vtx[j].v.tc[0] = 0;
|
||||
vtx[j].v.tc[1] = 0;
|
||||
vtx[j].v.cn[0] = func_800B0A24(this->p2StartColor.r, this->p2EndColor.r, ratio);
|
||||
vtx[j].v.cn[1] = func_800B0A24(this->p2StartColor.g, this->p2EndColor.g, ratio);
|
||||
vtx[j].v.cn[2] = func_800B0A24(this->p2StartColor.b, this->p2EndColor.b, ratio);
|
||||
vtx[j].v.cn[3] = func_800B0A24(this->p2StartColor.a, this->p2EndColor.a, ratio);
|
||||
vtx[j].v.cn[0] = func_800B0A24(this->p2StartColor[0], this->p2EndColor[0], ratio);
|
||||
vtx[j].v.cn[1] = func_800B0A24(this->p2StartColor[1], this->p2EndColor[1], ratio);
|
||||
vtx[j].v.cn[2] = func_800B0A24(this->p2StartColor[2], this->p2EndColor[2], ratio);
|
||||
vtx[j].v.cn[3] = func_800B0A24(this->p2StartColor[3], this->p2EndColor[3], ratio);
|
||||
j++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,13 +69,13 @@ EnDoor* EnHy_FindNearestDoor(Actor* actor, PlayState* play) {
|
||||
do {
|
||||
doorIter = SubS_FindActor(play, doorIter, ACTORCAT_DOOR, ACTOR_EN_DOOR);
|
||||
door = (EnDoor*)doorIter;
|
||||
dist = Actor_WorldDistXYZToActor(actor, &door->dyna.actor);
|
||||
dist = Actor_WorldDistXYZToActor(actor, &door->knobDoor.dyna.actor);
|
||||
if (!isSetup || (dist < minDist)) {
|
||||
nearestDoor = door;
|
||||
minDist = dist;
|
||||
isSetup = true;
|
||||
}
|
||||
doorIter = door->dyna.actor.next;
|
||||
doorIter = door->knobDoor.dyna.actor.next;
|
||||
} while (doorIter != NULL);
|
||||
|
||||
if (1) {}
|
||||
@@ -134,16 +134,16 @@ void func_800F0BB4(EnHy* enHy, PlayState* play, EnDoor* door, s16 arg3, s16 arg4
|
||||
Vec3f offset;
|
||||
f32 phi_f0;
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&door->dyna.actor, &offset, &enHy->actor.world.pos);
|
||||
Actor_OffsetOfPointInActorCoords(&door->knobDoor.dyna.actor, &offset, &enHy->actor.world.pos);
|
||||
phi_f0 = (offset.z >= 0.0f) ? 1.0f : -1.0f;
|
||||
animIndex = ((s8)phi_f0 < 0) ? 0 : 2;
|
||||
EnHy_ChangeObjectAndAnim(enHy, play, (animIndex == 0) ? arg3 : arg4);
|
||||
enHy->skelAnime.baseTransl = *enHy->skelAnime.jointTable;
|
||||
enHy->skelAnime.prevTransl = *enHy->skelAnime.jointTable;
|
||||
enHy->skelAnime.moveFlags |= (ANIM_FLAG_UPDATEY | ANIM_FLAG_1);
|
||||
enHy->skelAnime.moveFlags |= (ANIM_FLAG_UPDATE_Y | ANIM_FLAG_1);
|
||||
AnimationContext_SetMoveActor(play, &enHy->actor, &enHy->skelAnime, 1.0f);
|
||||
door->unk_1A1 = 1;
|
||||
door->animIndex = animIndex;
|
||||
door->knobDoor.playOpenAnim = true;
|
||||
door->knobDoor.animIndex = animIndex;
|
||||
}
|
||||
|
||||
s32 func_800F0CE4(EnHy* enHy, PlayState* play, ActorFunc draw, s16 arg3, s16 arg4, f32 arg5) {
|
||||
@@ -157,7 +157,7 @@ s32 func_800F0CE4(EnHy* enHy, PlayState* play, ActorFunc draw, s16 arg3, s16 arg
|
||||
if (door != NULL) {
|
||||
ret = true;
|
||||
func_800F0BB4(enHy, play, door, arg3, arg4);
|
||||
yaw = Math_Vec3f_Yaw(&enHy->actor.world.pos, &door->dyna.actor.world.pos);
|
||||
yaw = Math_Vec3f_Yaw(&enHy->actor.world.pos, &door->knobDoor.dyna.actor.world.pos);
|
||||
enHy->actor.world.pos.x += arg5 * Math_SinS(yaw);
|
||||
enHy->actor.world.pos.z += arg5 * Math_CosS(yaw);
|
||||
enHy->actor.world.rot.y = -yaw;
|
||||
@@ -179,7 +179,7 @@ s32 func_800F0DD4(EnHy* enHy, PlayState* play, s16 arg2, s16 arg3) {
|
||||
if (door != NULL) {
|
||||
ret = true;
|
||||
func_800F0BB4(enHy, play, door, arg2, arg3);
|
||||
enHy->actor.shape.rot.y = Math_Vec3f_Yaw(&enHy->actor.world.pos, &door->dyna.actor.world.pos);
|
||||
enHy->actor.shape.rot.y = Math_Vec3f_Yaw(&enHy->actor.world.pos, &door->knobDoor.dyna.actor.world.pos);
|
||||
enHy->actor.world.rot.y = enHy->actor.shape.rot.y;
|
||||
enHy->actor.gravity = 0.0f;
|
||||
enHy->actor.flags &= ~ACTOR_FLAG_1;
|
||||
|
||||
+2
-2
@@ -2327,8 +2327,8 @@ void Play_Init(GameState* thisx) {
|
||||
Camera_InitFocalActorSettings(&this->mainCamera, &player->actor);
|
||||
gDbgCamEnabled = false;
|
||||
|
||||
if ((player->actor.params & 0xFF) != 0xFF) {
|
||||
Camera_ChangeActorCsCamIndex(&this->mainCamera, player->actor.params & 0xFF);
|
||||
if (PLAYER_GET_BG_CAM_INDEX(&player->actor) != 0xFF) {
|
||||
Camera_ChangeActorCsCamIndex(&this->mainCamera, PLAYER_GET_BG_CAM_INDEX(&player->actor));
|
||||
}
|
||||
|
||||
CutsceneManager_StoreCamera(&this->mainCamera);
|
||||
|
||||
+31
-27
@@ -472,7 +472,7 @@ void func_80123140(PlayState* play, Player* player) {
|
||||
REG(39) = bootRegs[8];
|
||||
REG(43) = bootRegs[9];
|
||||
R_RUN_SPEED_LIMIT = bootRegs[10];
|
||||
REG(68) = bootRegs[11];
|
||||
REG(68) = bootRegs[11]; // gravity
|
||||
REG(69) = bootRegs[12];
|
||||
IREG(66) = bootRegs[13];
|
||||
IREG(67) = bootRegs[14];
|
||||
@@ -503,7 +503,7 @@ s32 Player_InBlockingCsMode(PlayState* play, Player* player) {
|
||||
s32 Player_InCsMode(PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
return Player_InBlockingCsMode(play, player) || player->unk_AA5 == 5;
|
||||
return Player_InBlockingCsMode(play, player) || (player->unk_AA5 == PLAYER_UNKAA5_5);
|
||||
}
|
||||
|
||||
s32 func_80123420(Player* player) {
|
||||
@@ -556,8 +556,8 @@ s32 func_801235DC(PlayState* play, f32 arg1, s16 arg2) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (player->stateFlags3 & PLAYER_STATE3_1000) {
|
||||
player->unk_B08[0] = arg1;
|
||||
player->unk_B08[1] += arg1 * 0.05f;
|
||||
player->unk_B08 = arg1;
|
||||
player->unk_B0C += arg1 * 0.05f;
|
||||
player->currentYaw = arg2;
|
||||
player->actor.home.rot.y = arg2;
|
||||
player->actor.shape.rot.y = arg2;
|
||||
@@ -659,7 +659,7 @@ u8 sActionModelGroups[PLAYER_IA_MAX] = {
|
||||
PLAYER_MODELGROUP_ONE_HAND_SWORD, // PLAYER_IA_SWORD_KOKIRI
|
||||
PLAYER_MODELGROUP_ONE_HAND_SWORD, // PLAYER_IA_SWORD_RAZOR
|
||||
PLAYER_MODELGROUP_ONE_HAND_SWORD, // PLAYER_IA_SWORD_GILDED
|
||||
PLAYER_MODELGROUP_TWO_HAND_SWORD, // PLAYER_IA_SWORD_GREAT_FAIRY
|
||||
PLAYER_MODELGROUP_TWO_HAND_SWORD, // PLAYER_IA_SWORD_TWO_HANDED
|
||||
PLAYER_MODELGROUP_STICK, // PLAYER_IA_STICK
|
||||
PLAYER_MODELGROUP_ZORA_FINS, // PLAYER_IA_ZORA_FINS
|
||||
PLAYER_MODELGROUP_BOW, // PLAYER_IA_BOW
|
||||
@@ -1316,6 +1316,7 @@ void Player_UpdateBottleHeld(PlayState* play, Player* player, ItemId itemId, Pla
|
||||
player->itemAction = itemAction;
|
||||
}
|
||||
|
||||
// Player_Untarget / Player_StopTargeting?
|
||||
void func_80123DA4(Player* player) {
|
||||
player->targetedActor = NULL;
|
||||
player->stateFlags2 &= ~PLAYER_STATE2_2000;
|
||||
@@ -1445,7 +1446,7 @@ PlayerMeleeWeapon Player_GetMeleeWeaponHeld(Player* player) {
|
||||
|
||||
s32 Player_IsHoldingTwoHandedWeapon(Player* player) {
|
||||
// Relies on the itemActions for two-handed weapons being contiguous.
|
||||
if ((player->heldItemAction >= PLAYER_IA_SWORD_GREAT_FAIRY) && (player->heldItemAction <= PLAYER_IA_STICK)) {
|
||||
if ((player->heldItemAction >= PLAYER_IA_SWORD_TWO_HANDED) && (player->heldItemAction <= PLAYER_IA_STICK)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2038,7 +2039,7 @@ s32 Player_OverrideLimbDrawGameplayCommon(PlayState* play, s32 limbIndex, Gfx**
|
||||
pos->x *= player->ageProperties->unk_08;
|
||||
pos->z *= player->ageProperties->unk_08;
|
||||
}
|
||||
if (!(player->skelAnime.moveFlags & ANIM_FLAG_4) || (player->skelAnime.moveFlags & ANIM_FLAG_UPDATEY)) {
|
||||
if (!(player->skelAnime.moveFlags & ANIM_FLAG_4) || (player->skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y)) {
|
||||
pos->y *= player->ageProperties->unk_08;
|
||||
}
|
||||
}
|
||||
@@ -2552,14 +2553,16 @@ void func_8012669C(PlayState* play, Player* player, Vec3f* arg2, Vec3f* arg3) {
|
||||
Matrix_MultVec3f(arg2, &sp3C);
|
||||
Matrix_MultVec3f(arg3, &sp30);
|
||||
|
||||
if (player->meleeWeaponState != 0) {
|
||||
if (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) {
|
||||
if (func_80126440(play, NULL, &player->meleeWeaponInfo[0], &sp3C, &sp30) &&
|
||||
(player->transformation != PLAYER_FORM_GORON) && (!(player->stateFlags1 & PLAYER_STATE1_400000))) {
|
||||
EffectBlure_AddVertex(Effect_GetByIndex(player->meleeWeaponEffectIndex[0]), &player->meleeWeaponInfo[0].tip,
|
||||
&player->meleeWeaponInfo[0].base);
|
||||
}
|
||||
if ((player->meleeWeaponState > 0) && ((player->meleeWeaponAnimation < PLAYER_MWA_SPIN_ATTACK_1H) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_20000))) {
|
||||
|
||||
if ((player->meleeWeaponState >= PLAYER_MELEE_WEAPON_STATE_1) &&
|
||||
((player->meleeWeaponAnimation < PLAYER_MWA_SPIN_ATTACK_1H) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_20000))) {
|
||||
Matrix_MultVec3f(&arg2[1], &sp3C);
|
||||
Matrix_MultVec3f(&arg3[1], &sp30);
|
||||
func_80126440(play, &player->meleeWeaponQuads[0], &player->meleeWeaponInfo[1], &sp3C, &sp30);
|
||||
@@ -2714,7 +2717,7 @@ void func_80126BD0(PlayState* play, Player* player, s32 arg2) {
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_801C0AB4[arg2]);
|
||||
|
||||
if (player->meleeWeaponState != 0) {
|
||||
if (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) {
|
||||
if ((((player->meleeWeaponAnimation == PLAYER_MWA_ZORA_PUNCH_LEFT)) && (arg2 == 0)) ||
|
||||
((player->meleeWeaponAnimation == PLAYER_MWA_ZORA_PUNCH_COMBO) && (arg2 != 0))) {
|
||||
func_8012669C(play, player, D_801C0A00, D_801C09DC);
|
||||
@@ -3296,7 +3299,7 @@ s32 func_80128640(PlayState* play, Player* player, Gfx* dlist) {
|
||||
Matrix_Push();
|
||||
Matrix_Translate(-428.26f, 267.2f, -33.82f, MTXMODE_APPLY);
|
||||
Matrix_RotateZYX(-0x8000, 0, 0x4000, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, player->unk_B08[1], 1.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, player->unk_B0C, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gDekuStickDL);
|
||||
@@ -3413,7 +3416,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
3000.0f, // PLAYER_MELEEWEAPON_SWORD_KOKIRI
|
||||
3000.0f, // PLAYER_MELEEWEAPON_SWORD_RAZOR
|
||||
4000.0f, // PLAYER_MELEEWEAPON_SWORD_GILDED
|
||||
5500.0f, // PLAYER_MELEEWEAPON_SWORD_GREAT_FAIRY
|
||||
5500.0f, // PLAYER_MELEEWEAPON_SWORD_TWO_HANDED
|
||||
-1.0f, // PLAYER_MELEEWEAPON_STICK
|
||||
2500.0f, // PLAYER_MELEEWEAPON_ZORA_FINS
|
||||
};
|
||||
@@ -3421,19 +3424,19 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
if ((player->transformation == PLAYER_FORM_FIERCE_DEITY) ||
|
||||
((player->transformation != PLAYER_FORM_ZORA) &&
|
||||
((player->itemAction == PLAYER_IA_STICK) ||
|
||||
((player->meleeWeaponState != 0) &&
|
||||
((player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
(player->meleeWeaponAnimation != PLAYER_MWA_GORON_PUNCH_RIGHT) &&
|
||||
(player->meleeWeaponAnimation != PLAYER_MWA_GORON_PUNCH_BUTT))))) {
|
||||
if (player->itemAction == PLAYER_IA_STICK) {
|
||||
D_801C0994->x = player->unk_B08[1] * 5000.0f;
|
||||
D_801C0994->x = player->unk_B0C * 5000.0f;
|
||||
} else {
|
||||
D_801C0994->x = sMeleeWeaponLengths[Player_GetMeleeWeaponHeld(player)];
|
||||
}
|
||||
func_80126B8C(play, player);
|
||||
}
|
||||
|
||||
Matrix_Get(&player->mf_CC4);
|
||||
Matrix_MtxFToYXZRot(&player->mf_CC4, &player->leftHandWorld.rot, false);
|
||||
Matrix_Get(&player->leftHandMf);
|
||||
Matrix_MtxFToYXZRot(&player->leftHandMf, &player->leftHandWorld.rot, false);
|
||||
}
|
||||
}
|
||||
} else if (limbIndex == PLAYER_LIMB_RIGHT_HAND) {
|
||||
@@ -3458,18 +3461,18 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
|
||||
Matrix_MultZero(&sp20C);
|
||||
temp_fv0 = Math_Vec3f_DistXYZ(sPlayerCurBodyPartPos, &sp20C);
|
||||
player->unk_B08[0] = temp_fv0 - 3.0f;
|
||||
player->unk_B08 = temp_fv0 - 3.0f;
|
||||
if (temp_fv0 < 3.0f) {
|
||||
player->unk_B08[0] = 0.0f;
|
||||
player->unk_B08 = 0.0f;
|
||||
} else {
|
||||
player->unk_B08[0] *= 1.6f;
|
||||
if (player->unk_B08[0] > 1.0f) {
|
||||
player->unk_B08[0] = 1.0f;
|
||||
player->unk_B08 *= 1.6f;
|
||||
if (player->unk_B08 > 1.0f) {
|
||||
player->unk_B08 = 1.0f;
|
||||
}
|
||||
}
|
||||
player->unk_B08[1] = -0.5f;
|
||||
player->unk_B0C = -0.5f;
|
||||
}
|
||||
Matrix_Scale(1.0f, player->unk_B08[0], 1.0f, MTXMODE_APPLY);
|
||||
Matrix_Scale(1.0f, player->unk_B08, 1.0f, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
@@ -3518,7 +3521,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
Player_DrawHookshotReticle(play, player, 77600.0f);
|
||||
}
|
||||
}
|
||||
} else if (player->meleeWeaponState != 0) {
|
||||
} else if (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_GORON_PUNCH_RIGHT) {
|
||||
func_80126B8C(play, player);
|
||||
}
|
||||
@@ -3590,6 +3593,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
for (i = 0; i < ARRAY_COUNT(sp178); i++) {
|
||||
Matrix_Push();
|
||||
Matrix_Scale(sp178[i].x, sp178[i].y, sp178[i].z, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -3811,7 +3815,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
&player->meleeWeaponInfo[0].base);
|
||||
}
|
||||
} else if (limbIndex == PLAYER_LIMB_RIGHT_SHIN) {
|
||||
if (player->meleeWeaponState != 0) {
|
||||
if (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) {
|
||||
if ((player->meleeWeaponAnimation == PLAYER_MWA_ZORA_PUNCH_KICK) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_ZORA_JUMPKICK_START) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_ZORA_JUMPKICK_FINISH)) {
|
||||
@@ -3819,7 +3823,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList1, G
|
||||
}
|
||||
}
|
||||
} else if (limbIndex == PLAYER_LIMB_WAIST) {
|
||||
if (player->meleeWeaponState != 0) {
|
||||
if (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) {
|
||||
if (player->meleeWeaponAnimation == PLAYER_MWA_GORON_PUNCH_BUTT) {
|
||||
Math_Vec3f_Copy(&player->unk_AF0[1], &player->meleeWeaponInfo[0].base);
|
||||
func_8012669C(play, player, D_801C0A90, D_801C0A6C);
|
||||
|
||||
@@ -1944,7 +1944,7 @@ void SkelAnime_UpdateTranslation(SkelAnime* skelAnime, Vec3f* diff, s16 angle) {
|
||||
skelAnime->jointTable->x = skelAnime->baseTransl.x;
|
||||
skelAnime->prevTransl.z = skelAnime->jointTable->z;
|
||||
skelAnime->jointTable->z = skelAnime->baseTransl.z;
|
||||
if (skelAnime->moveFlags & ANIM_FLAG_UPDATEY) {
|
||||
if (skelAnime->moveFlags & ANIM_FLAG_UPDATE_Y) {
|
||||
if (skelAnime->moveFlags & ANIM_FLAG_NOMOVE) {
|
||||
diff->y = 0.0f;
|
||||
} else {
|
||||
|
||||
+2
-2
@@ -15,7 +15,7 @@ Vec3f gOneVec3f = { 1.0f, 1.0f, 1.0f };
|
||||
s32 D_801C5DBC[] = { 0, 1 }; // Unused
|
||||
|
||||
/**
|
||||
* Finds the first EnDoor instance with unk_1A4 == 5 and the specified switchFlag.
|
||||
* Finds the first EnDoor instance with doorType == ENDOOR_TYPE_5 and the specified switchFlag.
|
||||
*/
|
||||
EnDoor* SubS_FindDoor(PlayState* play, s32 switchFlag) {
|
||||
Actor* actor = NULL;
|
||||
@@ -29,7 +29,7 @@ EnDoor* SubS_FindDoor(PlayState* play, s32 switchFlag) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((door->unk_1A4 == 5) && (door->switchFlag == (u8)switchFlag)) {
|
||||
if ((door->doorType == ENDOOR_TYPE_5) && (door->switchFlag == (u8)switchFlag)) {
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -141,6 +141,7 @@ void ArmsHook_Shoot(ArmsHook* this, PlayState* play) {
|
||||
if (this->timer != 0 && (this->collider.base.atFlags & AT_HIT) &&
|
||||
(this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4)) {
|
||||
Actor* touchedActor = this->collider.base.at;
|
||||
|
||||
if ((touchedActor->update != NULL) && (touchedActor->flags & (ACTOR_FLAG_200 | ACTOR_FLAG_400))) {
|
||||
if (this->collider.info.atHitInfo->bumperFlags & BUMP_HOOKABLE) {
|
||||
ArmsHook_AttachHookToActor(this, touchedActor);
|
||||
|
||||
@@ -15,7 +15,7 @@ typedef struct ArmsHook {
|
||||
/* 0x1EC */ Vec3f unk1EC;
|
||||
/* 0x1F8 */ Actor* grabbed;
|
||||
/* 0x1FC */ Vec3f unk1FC;
|
||||
/* 0x208 */ UNK_TYPE1 unk208[0x2];
|
||||
/* 0x208 */ s8 unk_208;
|
||||
/* 0x20A */ s16 timer;
|
||||
/* 0x20C */ ArmsHookActionFunc actionFunc;
|
||||
} ArmsHook; // size = 0x210
|
||||
|
||||
@@ -321,8 +321,8 @@ void func_80B84610(BgDblueWaterfall* this, PlayState* play) {
|
||||
player->actor.world.pos.x += sp34.x;
|
||||
player->actor.world.pos.z += sp34.z;
|
||||
if (this && this && this) {}
|
||||
player->unk_B80 = 8.0f;
|
||||
player->unk_B84 = this->actor.yawTowardsPlayer;
|
||||
player->pushedSpeed = 8.0f;
|
||||
player->pushedYaw = this->actor.yawTowardsPlayer;
|
||||
}
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
|
||||
@@ -68,10 +68,10 @@ s8 func_80ACABA8(BgOpenShutter* this, PlayState* play) {
|
||||
f32 temp_fv0;
|
||||
s16 temp_v0;
|
||||
|
||||
if (!Player_InCsMode(play) && (this->dyna.actor.xzDistToPlayer < 100.0f)) {
|
||||
temp_fv0 = func_80ACAB10(play, &this->dyna.actor, 0.0f, 65.0f, 15.0f);
|
||||
if (!Player_InCsMode(play) && (this->slidingDoor.dyna.actor.xzDistToPlayer < 100.0f)) {
|
||||
temp_fv0 = func_80ACAB10(play, &this->slidingDoor.dyna.actor, 0.0f, 65.0f, 15.0f);
|
||||
if (fabsf(temp_fv0) < 50.0f) {
|
||||
temp_v0 = player->actor.shape.rot.y - this->dyna.actor.shape.rot.y;
|
||||
temp_v0 = player->actor.shape.rot.y - this->slidingDoor.dyna.actor.shape.rot.y;
|
||||
if (temp_fv0 > 0.0f) {
|
||||
temp_v0 = (0x8000 - temp_v0);
|
||||
}
|
||||
@@ -91,31 +91,32 @@ s8 func_80ACABA8(BgOpenShutter* this, PlayState* play) {
|
||||
void BgOpenShutter_Init(Actor* thisx, PlayState* play) {
|
||||
BgOpenShutter* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, DYNA_TRANSFORM_POS);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &object_open_obj_Colheader_001640);
|
||||
Actor_ProcessInitChain(&this->slidingDoor.dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->slidingDoor.dyna, DYNA_TRANSFORM_POS);
|
||||
DynaPolyActor_LoadMesh(play, &this->slidingDoor.dyna, &object_open_obj_Colheader_001640);
|
||||
this->actionFunc = func_80ACAD88;
|
||||
}
|
||||
|
||||
void BgOpenShutter_Destroy(Actor* thisx, PlayState* play) {
|
||||
BgOpenShutter* this = THIS;
|
||||
s32 params = BGOPENSHUTTER_GET_A(thisx);
|
||||
s32 transition = DOOR_GET_TRANSITION_ID(thisx);
|
||||
|
||||
play->doorCtx.transitionActorList[params].id = -play->doorCtx.transitionActorList[params].id;
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
play->doorCtx.transitionActorList[transition].id = -play->doorCtx.transitionActorList[transition].id;
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->slidingDoor.dyna.bgId);
|
||||
}
|
||||
|
||||
void func_80ACAD88(BgOpenShutter* this, PlayState* play) {
|
||||
s32 doorDirection;
|
||||
|
||||
if (this->unk_15C != 0) {
|
||||
if (this->slidingDoor.unk_15C != 0) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->dyna.actor, player->unk_3BA, 0.0f, 12, 15, 10);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->slidingDoor.dyna.actor, player->doorBgCamIndex, 0.0f,
|
||||
12, 15, 10);
|
||||
this->unk_164 = 0;
|
||||
this->actionFunc = func_80ACAE5C;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
this->slidingDoor.dyna.actor.velocity.y = 0.0f;
|
||||
} else {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
@@ -123,20 +124,20 @@ void func_80ACAD88(BgOpenShutter* this, PlayState* play) {
|
||||
if (doorDirection > 0) {
|
||||
player->doorType = PLAYER_DOORTYPE_SLIDING;
|
||||
player->doorDirection = doorDirection;
|
||||
player->doorActor = &this->dyna.actor;
|
||||
player->doorActor = &this->slidingDoor.dyna.actor;
|
||||
func_80122F28(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_80ACAE5C(BgOpenShutter* this, PlayState* play) {
|
||||
Math_StepToF(&this->dyna.actor.velocity.y, 15.0f, 3.0f);
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y + 120.0f,
|
||||
this->dyna.actor.velocity.y)) {
|
||||
Math_StepToF(&this->slidingDoor.dyna.actor.velocity.y, 15.0f, 3.0f);
|
||||
if (Math_StepToF(&this->slidingDoor.dyna.actor.world.pos.y, this->slidingDoor.dyna.actor.home.pos.y + 120.0f,
|
||||
this->slidingDoor.dyna.actor.velocity.y)) {
|
||||
this->unk_164++;
|
||||
}
|
||||
if (this->unk_164 >= 10) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
|
||||
this->actionFunc = func_80ACAEF0;
|
||||
}
|
||||
}
|
||||
@@ -145,20 +146,22 @@ void func_80ACAEF0(BgOpenShutter* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s16 quakeIndex;
|
||||
|
||||
Math_StepToF(&this->dyna.actor.velocity.y, 20.0f, 8.0f);
|
||||
if (Math_StepToF(&this->dyna.actor.world.pos.y, this->dyna.actor.home.pos.y, this->dyna.actor.velocity.y)) {
|
||||
this->dyna.actor.floorHeight = this->dyna.actor.home.pos.y;
|
||||
Actor_SpawnFloorDustRing(play, &this->dyna.actor, &this->dyna.actor.world.pos, 60.0f, 10, 8.0f, 500, 10, true);
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_BIGWALL_BOUND);
|
||||
Math_StepToF(&this->slidingDoor.dyna.actor.velocity.y, 20.0f, 8.0f);
|
||||
if (Math_StepToF(&this->slidingDoor.dyna.actor.world.pos.y, this->slidingDoor.dyna.actor.home.pos.y,
|
||||
this->slidingDoor.dyna.actor.velocity.y)) {
|
||||
this->slidingDoor.dyna.actor.floorHeight = this->slidingDoor.dyna.actor.home.pos.y;
|
||||
Actor_SpawnFloorDustRing(play, &this->slidingDoor.dyna.actor, &this->slidingDoor.dyna.actor.world.pos, 60.0f,
|
||||
10, 8.0f, 500, 10, true);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_BIGWALL_BOUND);
|
||||
|
||||
quakeIndex = Quake_Request(Play_GetCamera(play, CAM_ID_MAIN), QUAKE_TYPE_3);
|
||||
Quake_SetSpeed(quakeIndex, -32536);
|
||||
Quake_SetPerturbations(quakeIndex, 2, 0, 0, 0);
|
||||
Quake_SetDuration(quakeIndex, 10);
|
||||
|
||||
Rumble_Request(this->dyna.actor.xyzDistToPlayerSq, 180, 20, 100);
|
||||
Rumble_Request(this->slidingDoor.dyna.actor.xyzDistToPlayerSq, 180, 20, 100);
|
||||
|
||||
this->unk_15C = 0;
|
||||
this->slidingDoor.unk_15C = 0;
|
||||
this->actionFunc = func_80ACAD88;
|
||||
}
|
||||
}
|
||||
@@ -172,14 +175,14 @@ void BgOpenShutter_Update(Actor* thisx, PlayState* play2) {
|
||||
cueChannel = Cutscene_GetCueChannel(play, CS_CMD_ACTOR_CUE_124);
|
||||
if (play->csCtx.actorCues[cueChannel]->id == BGOPENSHUTTER_DOOR_OPEN) {
|
||||
if (this->actionFunc == func_80ACAD88) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
this->actionFunc = func_80ACAE5C;
|
||||
this->dyna.actor.velocity.y = 0.0f;
|
||||
this->slidingDoor.dyna.actor.velocity.y = 0.0f;
|
||||
}
|
||||
this->unk_164 = 0;
|
||||
} else if (play->csCtx.actorCues[cueChannel]->id == BGOPENSHUTTER_DOOR_CLOSED) {
|
||||
if (this->actionFunc == func_80ACAE5C) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
|
||||
this->actionFunc = func_80ACAEF0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,16 +2,14 @@
|
||||
#define Z_BG_OPEN_SHUTTER_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
#define BGOPENSHUTTER_GET_A(thisx) ((u16)((thisx)->params) >> 0xA)
|
||||
#include "z64door.h"
|
||||
|
||||
struct BgOpenShutter;
|
||||
|
||||
typedef void (*BgOpenShutterActionFunc)(struct BgOpenShutter*, PlayState*);
|
||||
|
||||
typedef struct BgOpenShutter {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ s16 unk_15C;
|
||||
/* 0x000 */ SlidingDoorActor slidingDoor;
|
||||
/* 0x160 */ BgOpenShutterActionFunc actionFunc;
|
||||
/* 0x164 */ s32 unk_164;
|
||||
} BgOpenShutter; // size = 0x168
|
||||
|
||||
@@ -1842,16 +1842,16 @@ void Boss03_UpdateCollision(Boss03* this, PlayState* play) {
|
||||
for (i = 0; i < ARRAY_COUNT(sHeadJntSphElementsInit); i++) {
|
||||
if (this->headCollider.elements[i].info.toucherFlags & TOUCH_HIT) {
|
||||
this->headCollider.elements[i].info.toucherFlags &= ~TOUCH_HIT;
|
||||
player->unk_B84 = this->actor.shape.rot.y;
|
||||
player->unk_B80 = 20.0f;
|
||||
player->pushedYaw = this->actor.shape.rot.y;
|
||||
player->pushedSpeed = 20.0f;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_COUNT(sBodyJntSphElementsInit); i++) {
|
||||
if (this->bodyCollider.elements[i].info.toucherFlags & TOUCH_HIT) {
|
||||
this->bodyCollider.elements[i].info.toucherFlags &= ~TOUCH_HIT;
|
||||
player->unk_B84 = this->actor.shape.rot.y;
|
||||
player->unk_B80 = 20.0f;
|
||||
player->pushedYaw = this->actor.shape.rot.y;
|
||||
player->pushedSpeed = 20.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -139,15 +139,17 @@ void DoorShutter_SetupAction(DoorShutter* this, DoorShutterActionFunc actionFunc
|
||||
}
|
||||
|
||||
s32 func_808A0900(DoorShutter* this, PlayState* play) {
|
||||
TransitionActorEntry* transitionEntry = &play->doorCtx.transitionActorList[DOORSHUTTER_GET_FC00(&this->actor)];
|
||||
TransitionActorEntry* transitionEntry =
|
||||
&play->doorCtx.transitionActorList[DOOR_GET_TRANSITION_ID(&this->slidingDoor.dyna.actor)];
|
||||
s8 frontRoom = transitionEntry->sides[0].room;
|
||||
|
||||
if (frontRoom == transitionEntry->sides[1].room) {
|
||||
if (ABS_ALT(BINANG_SUB(this->actor.shape.rot.y, this->actor.yawTowardsPlayer)) < 0x4000) {
|
||||
if (ABS_ALT(BINANG_SUB(this->slidingDoor.dyna.actor.shape.rot.y,
|
||||
this->slidingDoor.dyna.actor.yawTowardsPlayer)) < 0x4000) {
|
||||
frontRoom = -1;
|
||||
}
|
||||
}
|
||||
return frontRoom == this->actor.room;
|
||||
return frontRoom == this->slidingDoor.dyna.actor.room;
|
||||
}
|
||||
|
||||
s32 DoorShutter_SetupDoor(DoorShutter* this, PlayState* play) {
|
||||
@@ -173,13 +175,13 @@ s32 DoorShutter_SetupDoor(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (doorType == 1) {
|
||||
if (!Flags_GetClear(play, this->actor.room)) {
|
||||
if (!Flags_GetClear(play, this->slidingDoor.dyna.actor.room)) {
|
||||
DoorShutter_SetupAction(this, func_808A0F88);
|
||||
this->unk_168 = 1.0f;
|
||||
return true;
|
||||
}
|
||||
} else if ((doorType == 2) || (doorType == 7)) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->actor))) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
DoorShutter_SetupAction(this, func_808A1548);
|
||||
this->unk_168 = 1.0f;
|
||||
return true;
|
||||
@@ -201,8 +203,8 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
||||
s32 sp24;
|
||||
s32 i;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
this->doorType = DOORSHUTTER_GET_380(&this->actor);
|
||||
Actor_ProcessInitChain(&this->slidingDoor.dyna.actor, sInitChain);
|
||||
this->doorType = DOORSHUTTER_GET_380(&this->slidingDoor.dyna.actor);
|
||||
sp24 = D_808A2240[this->doorType];
|
||||
|
||||
if (sp24 < 0) {
|
||||
@@ -216,7 +218,7 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
||||
|
||||
sp24 = shutterSceneInfo->index;
|
||||
if (sp24 == 6) {
|
||||
this->actor.flags |= ACTOR_FLAG_10000000;
|
||||
this->slidingDoor.dyna.actor.flags |= ACTOR_FLAG_10000000;
|
||||
}
|
||||
} else if (sp24 == 0) {
|
||||
BossDoorInfo* bossDoorInfo = &D_808A22A0[0];
|
||||
@@ -227,13 +229,13 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
|
||||
this->unk_15E = bossDoorInfo->index;
|
||||
this->slidingDoor.unk_15E = bossDoorInfo->index;
|
||||
} else {
|
||||
this->actor.room = -1;
|
||||
this->slidingDoor.dyna.actor.room = -1;
|
||||
}
|
||||
|
||||
if ((this->requiredObjBankIndex = Object_GetIndex(&play->objectCtx, D_808A2180[sp24].objectId)) < 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_Kill(&this->slidingDoor.dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -241,19 +243,19 @@ void DoorShutter_Init(Actor* thisx, PlayState* play2) {
|
||||
this->unk_163 = sp24;
|
||||
|
||||
if ((this->doorType == 4) || (this->doorType == 5)) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->actor))) {
|
||||
if (!Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
this->unk_166 = 10;
|
||||
}
|
||||
}
|
||||
|
||||
Actor_SetFocus(&this->actor, 60.0f);
|
||||
Actor_SetFocus(&this->slidingDoor.dyna.actor, 60.0f);
|
||||
}
|
||||
|
||||
void DoorShutter_Destroy(Actor* thisx, PlayState* play) {
|
||||
DoorShutter* this = THIS;
|
||||
|
||||
if (this->actor.room >= 0) {
|
||||
s32 transitionActorId = DOORSHUTTER_GET_FC00(&this->actor);
|
||||
if (this->slidingDoor.dyna.actor.room >= 0) {
|
||||
s32 transitionActorId = DOOR_GET_TRANSITION_ID(&this->slidingDoor.dyna.actor);
|
||||
|
||||
play->doorCtx.transitionActorList[transitionActorId].id =
|
||||
-play->doorCtx.transitionActorList[transitionActorId].id;
|
||||
@@ -263,8 +265,8 @@ void DoorShutter_Destroy(Actor* thisx, PlayState* play) {
|
||||
void DoorShutter_SetupType(DoorShutter* this, PlayState* play) {
|
||||
if (Object_IsLoaded(&play->objectCtx, this->requiredObjBankIndex) &&
|
||||
(!R_PLAY_FILL_SCREEN_ON || (R_PLAY_FILL_SCREEN_ALPHA == 0))) {
|
||||
this->actor.objBankIndex = this->requiredObjBankIndex;
|
||||
this->actor.draw = DoorShutter_Draw;
|
||||
this->slidingDoor.dyna.actor.objBankIndex = this->requiredObjBankIndex;
|
||||
this->slidingDoor.dyna.actor.draw = DoorShutter_Draw;
|
||||
DoorShutter_SetupDoor(this, play);
|
||||
}
|
||||
}
|
||||
@@ -278,7 +280,7 @@ f32 func_808A0D90(PlayState* play, DoorShutter* this, f32 arg2, f32 arg3, f32 ar
|
||||
sp28.y = player->actor.world.pos.y + arg2;
|
||||
sp28.z = player->actor.world.pos.z;
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&this->actor, &sp1C, &sp28);
|
||||
Actor_OffsetOfPointInActorCoords(&this->slidingDoor.dyna.actor, &sp1C, &sp28);
|
||||
|
||||
if ((arg3 < fabsf(sp1C.x)) || (arg4 < fabsf(sp1C.y))) {
|
||||
return FLT_MAX;
|
||||
@@ -294,7 +296,7 @@ s32 func_808A0E28(DoorShutter* this, PlayState* play) {
|
||||
f32 temp_f0 = func_808A0D90(play, this, 0.0f, shutterInfo->unk_0A, shutterInfo->unk_0B);
|
||||
|
||||
if (fabsf(temp_f0) < 50.0f) {
|
||||
s16 temp_v0_2 = BINANG_SUB(player->actor.shape.rot.y, this->actor.shape.rot.y);
|
||||
s16 temp_v0_2 = BINANG_SUB(player->actor.shape.rot.y, this->slidingDoor.dyna.actor.shape.rot.y);
|
||||
|
||||
if (temp_f0 > 0.0f) {
|
||||
temp_v0_2 = 0x8000 - temp_v0_2;
|
||||
@@ -309,8 +311,9 @@ s32 func_808A0E28(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808A0F88(DoorShutter* this, PlayState* play) {
|
||||
if (Flags_GetClear(play, this->actor.room) || Flags_GetClearTemp(play, this->actor.room)) {
|
||||
this->csId = this->actor.csId;
|
||||
if (Flags_GetClear(play, this->slidingDoor.dyna.actor.room) ||
|
||||
Flags_GetClearTemp(play, this->slidingDoor.dyna.actor.room)) {
|
||||
this->csId = this->slidingDoor.dyna.actor.csId;
|
||||
if (this->doorType == 7) {
|
||||
if (this->csId != CS_ID_NONE) {
|
||||
this->csId = CutsceneManager_GetAdditionalCsId(this->csId);
|
||||
@@ -318,8 +321,8 @@ void func_808A0F88(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (CutsceneManager_IsNext(this->csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->actor);
|
||||
Flags_SetClear(play, this->actor.room);
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->slidingDoor.dyna.actor);
|
||||
Flags_SetClear(play, this->slidingDoor.dyna.actor.room);
|
||||
DoorShutter_SetupAction(this, func_808A1784);
|
||||
this->unk_167 = -1;
|
||||
} else {
|
||||
@@ -329,8 +332,8 @@ void func_808A0F88(DoorShutter* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
player->doorActor = &this->actor;
|
||||
this->actor.textId = 0x1801;
|
||||
player->doorActor = &this->slidingDoor.dyna.actor;
|
||||
this->slidingDoor.dyna.actor.textId = 0x1801;
|
||||
func_80122F28(player);
|
||||
}
|
||||
}
|
||||
@@ -339,16 +342,16 @@ void func_808A1080(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808A1090(DoorShutter* this, PlayState* play) {
|
||||
if (this->unk_15C != 0) {
|
||||
if (this->slidingDoor.unk_15C != 0) {
|
||||
DoorShutter_SetupAction(this, func_808A1684);
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->slidingDoor.dyna.actor.velocity.y = 0.0f;
|
||||
if (this->unk_166 != 0) {
|
||||
Flags_SetSwitch(play, DOORSHUTTER_GET_7F(&this->actor));
|
||||
Flags_SetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor));
|
||||
if (this->doorType != 5) {
|
||||
gSaveContext.save.saveInfo.inventory.dungeonKeys[gSaveContext.mapIndex]--;
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
|
||||
} else {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_CHAIN_KEY_UNLOCK_B);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK_B);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -359,7 +362,7 @@ void func_808A1090(DoorShutter* this, PlayState* play) {
|
||||
|
||||
player->doorType = PLAYER_DOORTYPE_SLIDING;
|
||||
player->doorDirection = doorDirection;
|
||||
player->doorActor = &this->actor;
|
||||
player->doorActor = &this->slidingDoor.dyna.actor;
|
||||
|
||||
if (this->unk_163 == 7) {
|
||||
player->doorTimer = 12;
|
||||
@@ -368,20 +371,21 @@ void func_808A1090(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->doorType == 6) {
|
||||
if (gSaveContext.save.saveInfo.playerData.healthCapacity < (DOORSHUTTER_GET_1F(&this->actor) * 0x10)) {
|
||||
if (gSaveContext.save.saveInfo.playerData.healthCapacity <
|
||||
(DOORSHUTTER_GET_1F(&this->slidingDoor.dyna.actor) * 0x10)) {
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->actor.textId = 0x14FC;
|
||||
this->slidingDoor.dyna.actor.textId = 0x14FC;
|
||||
}
|
||||
} else if (this->unk_166 != 0) {
|
||||
if (this->doorType == 5) {
|
||||
if (!CHECK_DUNGEON_ITEM(DUNGEON_BOSS_KEY, gSaveContext.mapIndex)) {
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->actor.textId = 0x1803;
|
||||
this->slidingDoor.dyna.actor.textId = 0x1803;
|
||||
}
|
||||
player->doorTimer += 10;
|
||||
} else if (DUNGEON_KEY_COUNT(gSaveContext.mapIndex) <= 0) {
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->actor.textId = 0x1802;
|
||||
this->slidingDoor.dyna.actor.textId = 0x1802;
|
||||
} else {
|
||||
player->doorTimer += 10;
|
||||
}
|
||||
@@ -392,7 +396,7 @@ void func_808A1090(DoorShutter* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808A1288(DoorShutter* this, PlayState* play) {
|
||||
if (this->actor.category == ACTORCAT_DOOR) {
|
||||
if (this->slidingDoor.dyna.actor.category == ACTORCAT_DOOR) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 sp38 = this->unk_164;
|
||||
s32 sp34 = 0xF;
|
||||
@@ -406,17 +410,18 @@ void func_808A1288(DoorShutter* this, PlayState* play) {
|
||||
this->unk_164 = sp38;
|
||||
this->unk_168 = 0.0f;
|
||||
|
||||
Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->actor, player->unk_3BA, this->unk_168, 12, sp34, 10);
|
||||
Camera_ChangeDoorCam(play->cameraPtrs[CAM_ID_MAIN], &this->slidingDoor.dyna.actor, player->doorBgCamIndex,
|
||||
this->unk_168, 12, sp34, 10);
|
||||
}
|
||||
}
|
||||
|
||||
s32 func_808A1340(DoorShutter* this, PlayState* play) {
|
||||
Vec3f sp2C;
|
||||
|
||||
if (this->actor.velocity.y == 0.0f) {
|
||||
if (this->slidingDoor.dyna.actor.velocity.y == 0.0f) {
|
||||
func_808A1288(this, play);
|
||||
if (this->unk_163 != 7) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_SLIDE_DOOR_OPEN);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -424,20 +429,22 @@ s32 func_808A1340(DoorShutter* this, PlayState* play) {
|
||||
s32 pad;
|
||||
|
||||
if (this->unk_163 == 7) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_IKANA_DOOR_OPEN - SFX_FLAG);
|
||||
func_800B9010(&this->slidingDoor.dyna.actor, NA_SE_EV_IKANA_DOOR_OPEN - SFX_FLAG);
|
||||
}
|
||||
|
||||
Lib_Vec3f_TranslateAndRotateY(&this->actor.home.pos, this->actor.shape.rot.y,
|
||||
Lib_Vec3f_TranslateAndRotateY(&this->slidingDoor.dyna.actor.home.pos, this->slidingDoor.dyna.actor.shape.rot.y,
|
||||
(this->unk_163 == 7) ? &D_808A22C4 : &D_808A22D0, &sp2C);
|
||||
Math_StepToF(&this->actor.velocity.y, 5.0f, 0.5f);
|
||||
Math_StepToF(&this->slidingDoor.dyna.actor.velocity.y, 5.0f, 0.5f);
|
||||
|
||||
if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &sp2C, this->actor.velocity.y) == 0.0f) {
|
||||
if (Math_Vec3f_StepToXZ(&this->slidingDoor.dyna.actor.world.pos, &sp2C,
|
||||
this->slidingDoor.dyna.actor.velocity.y) == 0.0f) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
Math_StepToF(&this->actor.velocity.y, 15.0f, 3.0f);
|
||||
Math_StepToF(&this->slidingDoor.dyna.actor.velocity.y, 15.0f, 3.0f);
|
||||
|
||||
if (Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y + 200.0f, this->actor.velocity.y)) {
|
||||
if (Math_StepToF(&this->slidingDoor.dyna.actor.world.pos.y, this->slidingDoor.dyna.actor.home.pos.y + 200.0f,
|
||||
this->slidingDoor.dyna.actor.velocity.y)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -449,13 +456,13 @@ s32 func_808A1478(DoorShutter* this, PlayState* play, f32 arg2) {
|
||||
|
||||
if (temp == this->unk_168) {
|
||||
if (arg2 == 1.0f) {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_METALDOOR_CLOSE);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_METALDOOR_CLOSE);
|
||||
} else {
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_METALDOOR_OPEN);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_METALDOOR_OPEN);
|
||||
}
|
||||
|
||||
if ((this->csId != CS_ID_NONE) && (CutsceneManager_GetCurrentCsId() == this->csId)) {
|
||||
func_800B724C(play, &this->actor, PLAYER_CSMODE_1);
|
||||
func_800B724C(play, &this->slidingDoor.dyna.actor, PLAYER_CSMODE_1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -467,10 +474,10 @@ s32 func_808A1478(DoorShutter* this, PlayState* play, f32 arg2) {
|
||||
|
||||
void func_808A1548(DoorShutter* this, PlayState* play) {
|
||||
if (func_808A1478(this, play, 1.0f)) {
|
||||
if (Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->actor))) {
|
||||
this->csId = this->actor.csId;
|
||||
if (Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
this->csId = this->slidingDoor.dyna.actor.csId;
|
||||
if (CutsceneManager_IsNext(this->csId)) {
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->actor);
|
||||
CutsceneManager_StartWithPlayerCs(this->csId, &this->slidingDoor.dyna.actor);
|
||||
DoorShutter_SetupAction(this, func_808A1784);
|
||||
this->unk_167 = -1;
|
||||
} else {
|
||||
@@ -480,15 +487,15 @@ void func_808A1548(DoorShutter* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
player->doorActor = &this->actor;
|
||||
this->actor.textId = 0x1800;
|
||||
player->doorActor = &this->slidingDoor.dyna.actor;
|
||||
this->slidingDoor.dyna.actor.textId = 0x1800;
|
||||
func_80122F28(player);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_808A1618(DoorShutter* this, PlayState* play) {
|
||||
if ((this->unk_15C == 0) && !Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->actor))) {
|
||||
if ((this->slidingDoor.unk_15C == 0) && !Flags_GetSwitch(play, DOORSHUTTER_GET_7F(&this->slidingDoor.dyna.actor))) {
|
||||
DoorShutter_SetupAction(this, func_808A1548);
|
||||
} else {
|
||||
func_808A1090(this, play);
|
||||
@@ -505,14 +512,14 @@ void func_808A1684(DoorShutter* this, PlayState* play) {
|
||||
phi_f0 = 50.0f;
|
||||
}
|
||||
|
||||
if (phi_f0 < this->actor.xzDistToPlayer) {
|
||||
if (phi_f0 < this->slidingDoor.dyna.actor.xzDistToPlayer) {
|
||||
if (this->unk_163 == 7) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->slidingDoor.dyna.actor.velocity.y = 0.0f;
|
||||
} else {
|
||||
if (DoorShutter_SetupDoor(this, play)) {
|
||||
this->actor.velocity.y = 30.0f;
|
||||
this->slidingDoor.dyna.actor.velocity.y = 30.0f;
|
||||
}
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_SLIDE_DOOR_CLOSE);
|
||||
}
|
||||
DoorShutter_SetupAction(this, func_808A1B48);
|
||||
}
|
||||
@@ -521,7 +528,7 @@ void func_808A1684(DoorShutter* this, PlayState* play) {
|
||||
|
||||
void func_808A1784(DoorShutter* this, PlayState* play) {
|
||||
if (this->unk_167 != 0) {
|
||||
if (func_800F22C4(this->csId, &this->actor) != 0) {
|
||||
if (func_800F22C4(this->csId, &this->slidingDoor.dyna.actor) != 0) {
|
||||
if (this->unk_167 < 0) {
|
||||
if ((play->state.frames % 2) != 0) {
|
||||
this->unk_167++;
|
||||
@@ -545,16 +552,18 @@ void func_808A1784(DoorShutter* this, PlayState* play) {
|
||||
|
||||
void func_808A1884(DoorShutter* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
s8 room = this->actor.room;
|
||||
s8 room = this->slidingDoor.dyna.actor.room;
|
||||
Vec3f sp44;
|
||||
|
||||
if (this->actor.room >= 0) {
|
||||
Actor_OffsetOfPointInActorCoords(&this->actor, &sp44, &player->actor.world.pos);
|
||||
if (this->slidingDoor.dyna.actor.room >= 0) {
|
||||
Actor_OffsetOfPointInActorCoords(&this->slidingDoor.dyna.actor, &sp44, &player->actor.world.pos);
|
||||
|
||||
this->actor.room =
|
||||
play->doorCtx.transitionActorList[DOORSHUTTER_GET_FC00(&this->actor)].sides[(sp44.z < 0.0f) ? 0 : 1].room;
|
||||
this->slidingDoor.dyna.actor.room =
|
||||
play->doorCtx.transitionActorList[DOOR_GET_TRANSITION_ID(&this->slidingDoor.dyna.actor)]
|
||||
.sides[(sp44.z < 0.0f) ? 0 : 1]
|
||||
.room;
|
||||
|
||||
if (room != this->actor.room) {
|
||||
if (room != this->slidingDoor.dyna.actor.room) {
|
||||
Room temp = play->roomCtx.curRoom;
|
||||
|
||||
play->roomCtx.curRoom = play->roomCtx.prevRoom;
|
||||
@@ -564,8 +573,8 @@ void func_808A1884(DoorShutter* this, PlayState* play) {
|
||||
func_8012EBF8(play, &play->roomCtx);
|
||||
}
|
||||
|
||||
this->unk_15C = 0;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->slidingDoor.unk_15C = 0;
|
||||
this->slidingDoor.dyna.actor.velocity.y = 0.0f;
|
||||
|
||||
if (DoorShutter_SetupDoor(this, play) && !(player->stateFlags1 & PLAYER_STATE1_800)) {
|
||||
DoorShutter_SetupAction(this, func_808A1C50);
|
||||
@@ -580,20 +589,22 @@ void func_808A1884(DoorShutter* this, PlayState* play) {
|
||||
s32 func_808A1A70(DoorShutter* this) {
|
||||
if (this->unk_163 == 7) {
|
||||
if (this->unk_163 == 7) {
|
||||
func_800B9010(&this->actor, NA_SE_EV_IKANA_DOOR_CLOSE - SFX_FLAG);
|
||||
func_800B9010(&this->slidingDoor.dyna.actor, NA_SE_EV_IKANA_DOOR_CLOSE - SFX_FLAG);
|
||||
}
|
||||
|
||||
Math_StepToF(&this->actor.velocity.y, 5.0f, 0.5f);
|
||||
Math_StepToF(&this->slidingDoor.dyna.actor.velocity.y, 5.0f, 0.5f);
|
||||
|
||||
if (Math_Vec3f_StepToXZ(&this->actor.world.pos, &this->actor.home.pos, this->actor.velocity.y) == 0.0f) {
|
||||
if (Math_Vec3f_StepToXZ(&this->slidingDoor.dyna.actor.world.pos, &this->slidingDoor.dyna.actor.home.pos,
|
||||
this->slidingDoor.dyna.actor.velocity.y) == 0.0f) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
if (this->actor.velocity.y < 20.0f) {
|
||||
Math_StepToF(&this->actor.velocity.y, 20.0f, 8.0f);
|
||||
if (this->slidingDoor.dyna.actor.velocity.y < 20.0f) {
|
||||
Math_StepToF(&this->slidingDoor.dyna.actor.velocity.y, 20.0f, 8.0f);
|
||||
}
|
||||
|
||||
if (Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y, this->actor.velocity.y)) {
|
||||
if (Math_StepToF(&this->slidingDoor.dyna.actor.world.pos.y, this->slidingDoor.dyna.actor.home.pos.y,
|
||||
this->slidingDoor.dyna.actor.velocity.y)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -604,18 +615,19 @@ void func_808A1B48(DoorShutter* this, PlayState* play) {
|
||||
s16 quakeIndex;
|
||||
|
||||
if (func_808A1A70(this)) {
|
||||
if (this->actor.velocity.y > 20.0f) {
|
||||
this->actor.floorHeight = this->actor.home.pos.y;
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 45.0f, 10, 8.0f, 500, 10, 0);
|
||||
if (this->slidingDoor.dyna.actor.velocity.y > 20.0f) {
|
||||
this->slidingDoor.dyna.actor.floorHeight = this->slidingDoor.dyna.actor.home.pos.y;
|
||||
Actor_SpawnFloorDustRing(play, &this->slidingDoor.dyna.actor, &this->slidingDoor.dyna.actor.world.pos,
|
||||
45.0f, 10, 8.0f, 500, 10, 0);
|
||||
}
|
||||
Actor_PlaySfx(&this->actor, NA_SE_EV_BIGWALL_BOUND);
|
||||
Actor_PlaySfx(&this->slidingDoor.dyna.actor, NA_SE_EV_BIGWALL_BOUND);
|
||||
|
||||
quakeIndex = Quake_Request(Play_GetCamera(play, CAM_ID_MAIN), QUAKE_TYPE_3);
|
||||
Quake_SetSpeed(quakeIndex, -32536);
|
||||
Quake_SetPerturbations(quakeIndex, 2, 0, 0, 0);
|
||||
Quake_SetDuration(quakeIndex, 10);
|
||||
|
||||
Rumble_Request(this->actor.xyzDistToPlayerSq, 180, 20, 100);
|
||||
Rumble_Request(this->slidingDoor.dyna.actor.xyzDistToPlayerSq, 180, 20, 100);
|
||||
|
||||
func_808A1884(this, play);
|
||||
}
|
||||
@@ -639,7 +651,9 @@ void DoorShutter_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
|
||||
if (this->unk_163 == 7) {
|
||||
this->actor.home.rot.z = Math_Vec3f_DistXZ(&this->actor.home.pos, &this->actor.world.pos) * -100.0f;
|
||||
this->slidingDoor.dyna.actor.home.rot.z =
|
||||
Math_Vec3f_DistXZ(&this->slidingDoor.dyna.actor.home.pos, &this->slidingDoor.dyna.actor.world.pos) *
|
||||
-100.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -652,8 +666,9 @@ s32 func_808A1D68(DoorShutter* this, PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
temp_a0 = BINANG_SUB(Actor_WorldYawTowardPoint(&this->actor, &play->view.eye), this->actor.shape.rot.y);
|
||||
temp_a1 = BINANG_SUB(this->actor.yawTowardsPlayer, this->actor.shape.rot.y);
|
||||
temp_a0 = BINANG_SUB(Actor_WorldYawTowardPoint(&this->slidingDoor.dyna.actor, &play->view.eye),
|
||||
this->slidingDoor.dyna.actor.shape.rot.y);
|
||||
temp_a1 = BINANG_SUB(this->slidingDoor.dyna.actor.yawTowardsPlayer, this->slidingDoor.dyna.actor.shape.rot.y);
|
||||
|
||||
temp_a0 = ABS_ALT(temp_a0);
|
||||
temp_a1 = ABS_ALT(temp_a1);
|
||||
@@ -678,26 +693,27 @@ void DoorShutter_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
if (this->unk_164 == 7) {
|
||||
Matrix_Translate(0.0f, 64.96f, 0.0f, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_RotateZS(this->slidingDoor.dyna.actor.home.rot.z, MTXMODE_APPLY);
|
||||
Matrix_Translate(0.0f, -64.96f, 0.0f, MTXMODE_APPLY);
|
||||
}
|
||||
|
||||
if (sp44->unk_04 != 0) {
|
||||
TransitionActorEntry* transitionEntry =
|
||||
&play->doorCtx.transitionActorList[DOORSHUTTER_GET_FC00(&this->actor)];
|
||||
&play->doorCtx.transitionActorList[DOOR_GET_TRANSITION_ID(&this->slidingDoor.dyna.actor)];
|
||||
|
||||
if ((play->roomCtx.prevRoom.num >= 0) ||
|
||||
(transitionEntry->sides[0].room == transitionEntry->sides[1].room)) {
|
||||
s16 yaw = this->actor.shape.rot.y - Math_Vec3f_Yaw(&play->view.eye, &this->actor.world.pos);
|
||||
s16 yaw = this->slidingDoor.dyna.actor.shape.rot.y -
|
||||
Math_Vec3f_Yaw(&play->view.eye, &this->slidingDoor.dyna.actor.world.pos);
|
||||
|
||||
if (ABS_ALT(yaw) < 0x4000) {
|
||||
Matrix_RotateYF(M_PI, MTXMODE_APPLY);
|
||||
}
|
||||
} else if (this->actor.room == transitionEntry->sides[0].room) {
|
||||
} else if (this->slidingDoor.dyna.actor.room == transitionEntry->sides[0].room) {
|
||||
Matrix_RotateYF(M_PI, MTXMODE_APPLY);
|
||||
}
|
||||
} else if (this->doorType == 5) {
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_808A22DC[this->unk_15E]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_808A22DC[this->slidingDoor.unk_15E]));
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_DOOR_SHUTTER_H
|
||||
|
||||
#include "global.h"
|
||||
#include "z64door.h"
|
||||
|
||||
struct DoorShutter;
|
||||
|
||||
@@ -10,14 +11,10 @@ typedef void (*DoorShutterActionFunc)(struct DoorShutter*, PlayState*);
|
||||
#define DOORSHUTTER_GET_1F(thisx) ((thisx)->params & 0x1F)
|
||||
#define DOORSHUTTER_GET_7F(thisx) ((thisx)->params & 0x7F)
|
||||
#define DOORSHUTTER_GET_380(thisx) (((thisx)->params >> 7) & 7)
|
||||
#define DOORSHUTTER_GET_FC00(thisx) ((u16)(thisx)->params >> 0xA)
|
||||
|
||||
typedef struct DoorShutter {
|
||||
/* 0x0000 */ Actor actor;
|
||||
/* 0x0144 */ UNK_TYPE1 unk144[0x18];
|
||||
/* 0x015C */ s16 unk_15C;
|
||||
/* 0x015E */ s16 unk_15E;
|
||||
/* 0x0160 */ s16 csId;
|
||||
/* 0x000 */ SlidingDoorActor slidingDoor;
|
||||
/* 0x160 */ s16 csId;
|
||||
/* 0x0162 */ u8 doorType;
|
||||
/* 0x0163 */ u8 unk_163;
|
||||
/* 0x0164 */ u8 unk_164;
|
||||
|
||||
@@ -7,7 +7,8 @@ struct DoorSpiral;
|
||||
|
||||
typedef struct DoorSpiral {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0xC];
|
||||
/* 0x144 */ u8 shouldClimb;
|
||||
/* 0x145 */ UNK_TYPE1 unk_145[0xB];
|
||||
} DoorSpiral; // size = 0x150
|
||||
|
||||
#endif // Z_DOOR_SPIRAL_H
|
||||
|
||||
@@ -326,7 +326,7 @@ void func_809199FC(Actor* thisx, PlayState* play2) {
|
||||
distanceTraveled = this->distanceTraveled;
|
||||
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
if (player->unk_B08[0] >= 0.85f) {
|
||||
if (player->unk_B08 >= 0.85f) {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
} else {
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 0, 255, 0);
|
||||
@@ -339,7 +339,7 @@ void func_809199FC(Actor* thisx, PlayState* play2) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, (*distanceTraveled * 255.0f));
|
||||
|
||||
aux = 1.0f - SQ(*distanceTraveled);
|
||||
Matrix_Mult(&player->mf_CC4, MTXMODE_NEW);
|
||||
Matrix_Mult(&player->leftHandMf, MTXMODE_NEW);
|
||||
Matrix_Translate(initialPositions->x * ((this->dx * aux) + (1.0f - this->dx)),
|
||||
(initialPositions->y * (1.0f - *distanceTraveled)) + 320.0f,
|
||||
(initialPositions->z * (1.0f - *distanceTraveled)) + -20.0f, MTXMODE_APPLY);
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
* Description: Wave Created by Turtle Awakening
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_eff_kamejima_wave.h"
|
||||
#include "objects/object_kamejima/object_kamejima.h"
|
||||
|
||||
|
||||
@@ -422,8 +422,9 @@ void func_808B0894(EnAm* this, PlayState* play) {
|
||||
this->armosYaw = this->actor.yawTowardsPlayer;
|
||||
func_808B0208(this, play);
|
||||
if (this->explodeTimer == 1) {
|
||||
EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 2, 0);
|
||||
EnBom* bomb =
|
||||
(EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, BOMB_EXPLOSIVE_TYPE_BOMB, 0, 2, BOMB_TYPE_BODY);
|
||||
if (bomb != NULL) {
|
||||
bomb->timer = 0;
|
||||
}
|
||||
|
||||
@@ -78,26 +78,26 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
||||
EnArrow* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
if (this->actor.params == -ENARROW_8) {
|
||||
if (this->actor.params == -ARROW_TYPE_DEKU_NUT) {
|
||||
this->unk_263 = 1;
|
||||
this->actor.params = ENARROW_8;
|
||||
this->actor.params = ARROW_TYPE_DEKU_NUT;
|
||||
}
|
||||
|
||||
if (this->actor.params < ENARROW_6) {
|
||||
if (ARROW_IS_ARROW(this->actor.params)) {
|
||||
SkelAnime_Init(play, &this->arrow.skelAnime, &gameplay_keep_Skel_014560, &gameplay_keep_Anim_0128BC,
|
||||
this->arrow.jointTable, this->arrow.jointTable, 5);
|
||||
if (this->actor.params < ENARROW_3) {
|
||||
if (this->actor.params == ENARROW_1) {
|
||||
if (this->actor.params < ARROW_TYPE_FIRE) {
|
||||
if (this->actor.params == ARROW_TYPE_NORMAL_HORSE) {
|
||||
D_8088C234.elemDuration = 4;
|
||||
} else {
|
||||
D_8088C234.elemDuration = 16;
|
||||
}
|
||||
Effect_Add(play, &this->unk_240, EFFECT_BLURE2, 0, 0, &D_8088C234);
|
||||
} else if (this->actor.params == ENARROW_3) {
|
||||
} else if (this->actor.params == ARROW_TYPE_FIRE) {
|
||||
Effect_Add(play, &this->unk_240, EFFECT_BLURE2, 0, 0, &D_8088C258);
|
||||
} else if (this->actor.params == ENARROW_4) {
|
||||
} else if (this->actor.params == ARROW_TYPE_ICE) {
|
||||
Effect_Add(play, &this->unk_240, EFFECT_BLURE2, 0, 0, &D_8088C27C);
|
||||
} else if (this->actor.params == ENARROW_5) {
|
||||
} else if (this->actor.params == ARROW_TYPE_LIGHT) {
|
||||
Effect_Add(play, &this->unk_240, EFFECT_BLURE2, 0, 0, &D_8088C2A0);
|
||||
}
|
||||
}
|
||||
@@ -105,20 +105,20 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
||||
Collider_InitQuad(play, &this->collider);
|
||||
Collider_SetQuad(play, &this->collider, &this->actor, &sQuadInit);
|
||||
|
||||
if (this->actor.params < ENARROW_6) {
|
||||
if (ARROW_IS_ARROW(this->actor.params)) {
|
||||
this->collider.info.toucherFlags &= ~(TOUCH_SFX_WOOD | TOUCH_SFX_HARD);
|
||||
this->collider.info.toucherFlags |= 0;
|
||||
}
|
||||
|
||||
if (this->actor.params < ENARROW_0) {
|
||||
if (this->actor.params < ARROW_TYPE_NORMAL_LIT) {
|
||||
this->collider.base.atFlags = (AT_TYPE_ENEMY | AT_ON);
|
||||
} else {
|
||||
this->collider.info.toucher.dmgFlags = Actor_GetArrowDmgFlags(this->actor.params);
|
||||
if (this->actor.params == ENARROW_8) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_NUT) {
|
||||
this->collider.info.toucher.damage = 1;
|
||||
}
|
||||
|
||||
if (this->actor.params == ENARROW_7) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
Actor_SetScale(&this->actor, 1.0f);
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ void EnArrow_Init(Actor* thisx, PlayState* play) {
|
||||
void EnArrow_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnArrow* this = THIS;
|
||||
|
||||
if (this->actor.params < ENARROW_6) {
|
||||
if (ARROW_IS_ARROW(this->actor.params)) {
|
||||
Effect_Destroy(play, this->unk_240);
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@ void EnArrow_Destroy(Actor* thisx, PlayState* play) {
|
||||
this->unk_264->flags &= ~ACTOR_FLAG_8000;
|
||||
}
|
||||
|
||||
if ((this->actor.params >= ENARROW_3) && (this->actor.params < ENARROW_6) && (this->actor.child == NULL)) {
|
||||
if (ARROW_IS_MAGICAL(this->actor.params) && (this->actor.child == NULL)) {
|
||||
Magic_Reset(play);
|
||||
}
|
||||
}
|
||||
@@ -153,7 +153,7 @@ void func_8088A594(EnArrow* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->actor.parent != NULL) {
|
||||
if (this->actor.params == ENARROW_7) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
if (Math_SmoothStepToF(&this->bubble.unk_144, 16.0f, 0.07f, 1.8f, 0.0f) > 0.5f) {
|
||||
func_800B9010(&this->actor, NA_SE_PL_DEKUNUTS_BUBLE_BREATH - SFX_FLAG);
|
||||
return;
|
||||
@@ -166,8 +166,8 @@ void func_8088A594(EnArrow* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((this->actor.params != ENARROW_8) && (player->unk_D57 == 0)) {
|
||||
if (this->actor.params == ENARROW_7) {
|
||||
if ((this->actor.params != ARROW_TYPE_DEKU_NUT) && (player->unk_D57 == 0)) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
Magic_Reset(play);
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
@@ -175,22 +175,22 @@ void func_8088A594(EnArrow* this, PlayState* play) {
|
||||
}
|
||||
|
||||
switch (this->actor.params) {
|
||||
case ENARROW_6:
|
||||
case ARROW_TYPE_SLINGSHOT:
|
||||
Player_PlaySfx(player, NA_SE_IT_SLING_SHOT);
|
||||
break;
|
||||
|
||||
case ENARROW_0:
|
||||
case ENARROW_1:
|
||||
case ENARROW_2:
|
||||
case ARROW_TYPE_NORMAL_LIT:
|
||||
case ARROW_TYPE_NORMAL_HORSE:
|
||||
case ARROW_TYPE_NORMAL:
|
||||
Player_PlaySfx(player, NA_SE_IT_ARROW_SHOT);
|
||||
break;
|
||||
|
||||
case ENARROW_3:
|
||||
case ENARROW_4:
|
||||
case ENARROW_5:
|
||||
case ARROW_TYPE_FIRE:
|
||||
case ARROW_TYPE_ICE:
|
||||
case ARROW_TYPE_LIGHT:
|
||||
Player_PlaySfx(player, NA_SE_IT_MAGIC_ARROW_SHOT);
|
||||
|
||||
case ENARROW_7:
|
||||
case ARROW_TYPE_DEKU_BUBBLE:
|
||||
Player_PlaySfx(player, NA_SE_PL_DEKUNUTS_FIRE);
|
||||
break;
|
||||
}
|
||||
@@ -198,13 +198,13 @@ void func_8088A594(EnArrow* this, PlayState* play) {
|
||||
this->actionFunc = func_8088ACE0;
|
||||
Math_Vec3f_Copy(&this->unk_228, &this->actor.world.pos);
|
||||
|
||||
if (this->actor.params == ENARROW_7) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
this->bubble.unk_144 = CLAMP_MIN(this->bubble.unk_144, 3.5f);
|
||||
func_8088A514(this);
|
||||
this->unk_260 = 99;
|
||||
Magic_Reset(play);
|
||||
} else if (this->actor.params >= ENARROW_6) {
|
||||
if ((this->actor.params == ENARROW_8) && (this->actor.world.rot.x < 0)) {
|
||||
} else if (!ARROW_IS_ARROW(this->actor.params)) {
|
||||
if ((this->actor.params == ARROW_TYPE_DEKU_NUT) && (this->actor.world.rot.x < 0)) {
|
||||
Actor_SetScale(&this->actor, 0.009f);
|
||||
this->unk_260 = 40;
|
||||
} else {
|
||||
@@ -295,14 +295,14 @@ void func_8088AA98(EnArrow* this, PlayState* play) {
|
||||
EffectSsGRipple_Spawn(play, &sp44, 100, 500, 4);
|
||||
EffectSsGRipple_Spawn(play, &sp44, 100, 500, 8);
|
||||
|
||||
if ((this->actor.params == ENARROW_4) || (this->actor.params == ENARROW_3)) {
|
||||
if ((this->actor.params == ENARROW_4) && (func_8088B6B0 != this->actionFunc)) {
|
||||
if ((this->actor.params == ARROW_TYPE_ICE) || (this->actor.params == ARROW_TYPE_FIRE)) {
|
||||
if ((this->actor.params == ARROW_TYPE_ICE) && (func_8088B6B0 != this->actionFunc)) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_BG_ICEFLOE, sp44.x, sp44.y, sp44.z, 0, 0, 0, 300);
|
||||
Actor_Kill(&this->actor);
|
||||
return;
|
||||
}
|
||||
|
||||
this->actor.params = ENARROW_2;
|
||||
this->actor.params = ARROW_TYPE_NORMAL;
|
||||
this->collider.info.toucher.dmgFlags = 0x20;
|
||||
|
||||
if (this->actor.child != NULL) {
|
||||
@@ -329,9 +329,9 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
||||
s32 sp50;
|
||||
|
||||
if ((DECR(this->unk_260) == 0) ||
|
||||
((this->actor.params == ENARROW_7) &&
|
||||
((this->actor.params == ARROW_TYPE_DEKU_BUBBLE) &&
|
||||
((this->unk_262 != 0) || (phi_a2 = (this->collider.base.atFlags & AT_HIT) != 0)))) {
|
||||
if (this->actor.params == ENARROW_7) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
if (phi_a2 && (this->collider.info.atHitInfo->elemType != ELEMTYPE_UNK4) &&
|
||||
(this->collider.base.atFlags & AT_BOUNCED)) {
|
||||
if ((this->collider.base.at != NULL) && (this->collider.base.at->id != ACTOR_OBJ_SYOKUDAI)) {
|
||||
@@ -361,18 +361,18 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
sp50 =
|
||||
(this->actor.params != ENARROW_0) && (this->actor.params < ENARROW_8) && (this->collider.base.atFlags & AT_HIT);
|
||||
sp50 = (this->actor.params != ARROW_TYPE_NORMAL_LIT) && (this->actor.params < ARROW_TYPE_DEKU_NUT) &&
|
||||
(this->collider.base.atFlags & AT_HIT);
|
||||
|
||||
if (sp50 || (this->unk_262 != 0)) {
|
||||
if (this->actor.params >= ENARROW_6) {
|
||||
if (!ARROW_IS_ARROW(this->actor.params)) {
|
||||
if (sp50) {
|
||||
this->actor.world.pos.x = (this->actor.world.pos.x + this->actor.prevPos.x) * 0.5f;
|
||||
this->actor.world.pos.y = (this->actor.world.pos.y + this->actor.prevPos.y) * 0.5f;
|
||||
this->actor.world.pos.z = (this->actor.world.pos.z + this->actor.prevPos.z) * 0.5f;
|
||||
}
|
||||
|
||||
if (this->actor.params == ENARROW_8) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_NUT) {
|
||||
R_TRANS_FADE_FLASH_ALPHA_STEP = -1;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_M_FIRE1, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, 0, 0, this->actor.speed == 0.0f);
|
||||
@@ -408,12 +408,12 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
||||
} else if (this->unk_262 != 0) {
|
||||
this->actionFunc = func_8088B630;
|
||||
Animation_PlayOnce(&this->arrow.skelAnime, &gameplay_keep_Anim_0128BC);
|
||||
if (this->actor.params >= ENARROW_0) {
|
||||
if (this->actor.params >= ARROW_TYPE_NORMAL_LIT) {
|
||||
this->unk_260 = 60;
|
||||
} else {
|
||||
this->unk_260 = 20;
|
||||
}
|
||||
if ((this->actor.params >= ENARROW_3) && (this->actor.params < ENARROW_6)) {
|
||||
if (ARROW_IS_MAGICAL(this->actor.params)) {
|
||||
this->actor.draw = NULL;
|
||||
}
|
||||
Actor_PlaySfx(&this->actor, NA_SE_IT_ARROW_STICK_OBJ);
|
||||
@@ -422,7 +422,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
||||
}
|
||||
} else {
|
||||
func_8088AA98(this, play);
|
||||
if (this->actor.params == ENARROW_7) {
|
||||
if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
if (this->bubble.unk_149 == 0) {
|
||||
sp78 = sqrtf(SQ(this->actor.speed) + SQ(this->actor.velocity.y));
|
||||
sp74 = Math_SinS(this->actor.world.rot.y) * this->actor.speed;
|
||||
@@ -473,7 +473,7 @@ void func_8088ACE0(EnArrow* this, PlayState* play) {
|
||||
this->actor.wallBgId = spA8;
|
||||
}
|
||||
|
||||
if (this->actor.params < ENARROW_6) {
|
||||
if (ARROW_IS_ARROW(this->actor.params)) {
|
||||
this->actor.shape.rot.x = Math_Atan2S_XY(this->actor.speed, -this->actor.velocity.y);
|
||||
}
|
||||
}
|
||||
@@ -540,21 +540,27 @@ void EnArrow_Update(Actor* thisx, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if ((this->unk_263 != 0) ||
|
||||
((this->actor.params >= ENARROW_0) && ((this->actor.params == ENARROW_7) || (player->unk_D57 != 0))) ||
|
||||
((this->actor.params >= ARROW_TYPE_NORMAL_LIT) &&
|
||||
((this->actor.params == ARROW_TYPE_DEKU_BUBBLE) || (player->unk_D57 != 0))) ||
|
||||
!Player_InBlockingCsMode(play, player)) {
|
||||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
if ((this->actor.params >= ENARROW_3) && (this->actor.params < ENARROW_6)) {
|
||||
s16 sp44[] = { ACTOR_ARROW_FIRE, ACTOR_ARROW_ICE, ACTOR_ARROW_LIGHT };
|
||||
if (ARROW_IS_MAGICAL(this->actor.params)) {
|
||||
s16 sp44[] = {
|
||||
ACTOR_ARROW_FIRE, // ARROW_MAGIC_FIRE
|
||||
ACTOR_ARROW_ICE, // ARROW_MAGIC_ICE
|
||||
ACTOR_ARROW_LIGHT, // ARROW_MAGIC_LIGHT
|
||||
};
|
||||
|
||||
if (this->actor.child == NULL) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, sp44[this->actor.params - ENARROW_3],
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, sp44[ARROW_GET_MAGIC_FROM_TYPE(this->actor.params)],
|
||||
this->actor.world.pos.x, this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
}
|
||||
} else if (this->actor.params == ENARROW_0) {
|
||||
} else if (this->actor.params == ARROW_TYPE_NORMAL_LIT) {
|
||||
func_800B0EB0(play, &this->unk_234, &D_8088C2CC, &D_8088C2D8, &D_8088C2E4, &D_8088C2E8, 100, 0, 8);
|
||||
}
|
||||
|
||||
Math_Vec3f_Copy(&this->actor.home.pos, &this->actor.prevPos);
|
||||
}
|
||||
|
||||
@@ -579,8 +585,8 @@ void func_8088B88C(PlayState* play, EnArrow* this, EnArrowUnkStruct* arg2) {
|
||||
}
|
||||
Matrix_MultVec3f(&sp4C[0], &sp40);
|
||||
Matrix_MultVec3f(&sp4C[1], &sp34);
|
||||
if (this->actor.params < ENARROW_8) {
|
||||
sp30 = this->actor.params < ENARROW_6;
|
||||
if (this->actor.params < ARROW_TYPE_DEKU_NUT) {
|
||||
sp30 = ARROW_IS_ARROW(this->actor.params);
|
||||
if (this->unk_264 == NULL) {
|
||||
sp30 &= func_80126440(play, &this->collider, &this->unk_244, &sp40, &sp34);
|
||||
} else if (sp30 && (sp40.x == this->unk_244.tip.x) && (sp40.y == this->unk_244.tip.y) &&
|
||||
@@ -635,11 +641,11 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) {
|
||||
EnArrow* this = THIS;
|
||||
s32 phi_v0;
|
||||
|
||||
if (this->actor.params < ENARROW_6) {
|
||||
if (ARROW_IS_ARROW(this->actor.params)) {
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
SkelAnime_DrawLod(play, this->arrow.skelAnime.skeleton, this->arrow.skelAnime.jointTable, NULL, NULL,
|
||||
&this->actor, this->actor.projectedPos.z < 160.0f ? 0 : 1);
|
||||
} else if (this->actor.params == ENARROW_7) {
|
||||
} else if (this->actor.params == ARROW_TYPE_DEKU_BUBBLE) {
|
||||
s32 spA4 = 255 - (s32)(this->bubble.unk_144 * 4.0f);
|
||||
f32 spA0 = (this->actor.speed * 0.1f) + 1.0f;
|
||||
f32 sp9C = (1.0f / spA0);
|
||||
@@ -697,7 +703,7 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
gSPClearGeometryMode(POLY_XLU_DISP++, G_FOG | G_LIGHTING);
|
||||
|
||||
if (this->actor.params == ENARROW_6) {
|
||||
if (this->actor.params == ARROW_TYPE_SLINGSHOT) {
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, 255, 255, 255, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 0, 255, 255, sp63);
|
||||
sp5C = 50.0f;
|
||||
@@ -737,5 +743,6 @@ void EnArrow_Draw(Actor* thisx, PlayState* play) {
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
func_8088B88C(play, this, &D_8088C2EC[0]);
|
||||
}
|
||||
|
||||
@@ -7,17 +7,30 @@ struct EnArrow;
|
||||
|
||||
typedef void (*EnArrowActionFunc)(struct EnArrow*, PlayState*);
|
||||
|
||||
enum {
|
||||
/* 0 */ ENARROW_0, // Lit arrow
|
||||
/* 1 */ ENARROW_1, // Horse arrow
|
||||
/* 2 */ ENARROW_2, // Normal arrow
|
||||
/* 3 */ ENARROW_3, // Fire arrow
|
||||
/* 4 */ ENARROW_4, // Ice arrow
|
||||
/* 5 */ ENARROW_5, // Light arrow
|
||||
/* 6 */ ENARROW_6, // ?
|
||||
/* 7 */ ENARROW_7, // Deku bubble
|
||||
/* 8 */ ENARROW_8, // Deku Nut
|
||||
};
|
||||
typedef enum ArrowType {
|
||||
/* 0 */ ARROW_TYPE_NORMAL_LIT, // Normal arrow lit on fire
|
||||
/* 1 */ ARROW_TYPE_NORMAL_HORSE, // Normal arrow shot while riding a horse
|
||||
/* 2 */ ARROW_TYPE_NORMAL,
|
||||
/* 3 */ ARROW_TYPE_FIRE,
|
||||
/* 4 */ ARROW_TYPE_ICE,
|
||||
/* 5 */ ARROW_TYPE_LIGHT,
|
||||
/* 6 */ ARROW_TYPE_SLINGSHOT,
|
||||
/* 7 */ ARROW_TYPE_DEKU_BUBBLE,
|
||||
/* 8 */ ARROW_TYPE_DEKU_NUT
|
||||
} ArrowType;
|
||||
|
||||
#define ARROW_IS_MAGICAL(arrowType) (((arrowType) >= ARROW_TYPE_FIRE) && ((arrowType) <= ARROW_TYPE_LIGHT))
|
||||
#define ARROW_GET_MAGIC_FROM_TYPE(arrowType) (s32)((arrowType) - ARROW_TYPE_FIRE)
|
||||
#define ARROW_IS_ARROW(arrowType) ((arrowType) < ARROW_TYPE_SLINGSHOT)
|
||||
|
||||
typedef enum ArrowMagic {
|
||||
/* -1 */ ARROW_MAGIC_INVALID = -1,
|
||||
/* 0 */ ARROW_MAGIC_FIRE = ARROW_GET_MAGIC_FROM_TYPE(ARROW_TYPE_FIRE),
|
||||
/* 1 */ ARROW_MAGIC_ICE = ARROW_GET_MAGIC_FROM_TYPE(ARROW_TYPE_ICE),
|
||||
/* 2 */ ARROW_MAGIC_LIGHT = ARROW_GET_MAGIC_FROM_TYPE(ARROW_TYPE_LIGHT),
|
||||
/* 3 */ ARROW_MAGIC_DEKU_BUBBLE // Only used in Player. Does not map to ARROW_TYPE_SLINGSHOT
|
||||
} ArrowMagic;
|
||||
|
||||
|
||||
typedef struct {
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
|
||||
@@ -348,7 +348,7 @@ void EnBom_Explode(EnBom* this, PlayState* play) {
|
||||
|
||||
this->collider2.elements->dim.worldSphere.radius = D_80872E8C[this->isPowderKeg];
|
||||
if (this->timer == 7) {
|
||||
this->collider2.base.atFlags &= ~OC1_TYPE_1;
|
||||
this->collider2.base.atFlags &= ~AT_TYPE_ENEMY;
|
||||
}
|
||||
|
||||
if (this->actor.params == BOMB_TYPE_EXPLOSION) {
|
||||
|
||||
@@ -11,11 +11,17 @@ typedef void (*EnBomActionFunc)(struct EnBom*, PlayState*);
|
||||
#define ENBOM_GETZ_80(thisx) ((thisx)->shape.rot.z & 0x80)
|
||||
#define ENBOM_GETZ_FF00(thisx) (((thisx)->shape.rot.z & 0xFF00) >> 8)
|
||||
|
||||
typedef enum {
|
||||
typedef enum BombType {
|
||||
/* 0 */ BOMB_TYPE_BODY,
|
||||
/* 1 */ BOMB_TYPE_EXPLOSION,
|
||||
} BombType;
|
||||
|
||||
// Passed via x rotation
|
||||
typedef enum EnBomExplosiveType {
|
||||
/* 0 */ BOMB_EXPLOSIVE_TYPE_BOMB,
|
||||
/* 1 */ BOMB_EXPLOSIVE_TYPE_POWDER_KEG,
|
||||
} EnBomExplosiveType;
|
||||
|
||||
typedef struct EnBom {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ ColliderCylinder collider1;
|
||||
|
||||
@@ -326,7 +326,7 @@ void EnBomChu_Explode(EnBomChu* this, PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
this->actor.world.pos.z, BOMB_EXPLOSIVE_TYPE_BOMB, 0, 0, BOMB_TYPE_BODY);
|
||||
|
||||
this->shouldTimerCountDown = true;
|
||||
this->isMoving = false;
|
||||
|
||||
@@ -164,7 +164,7 @@ void EnBoom_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_808A2918(EnBoom* this, PlayState* play) {
|
||||
Actor* sp7C;
|
||||
Actor* targetActor;
|
||||
Player* player = GET_PLAYER(play);
|
||||
s32 sp74;
|
||||
s16 sp72;
|
||||
@@ -175,25 +175,26 @@ void func_808A2918(EnBoom* this, PlayState* play) {
|
||||
f32 sp64;
|
||||
f32 distXYZ;
|
||||
|
||||
sp7C = this->player;
|
||||
targetActor = this->moveTo;
|
||||
|
||||
if (sp7C != NULL) {
|
||||
sp72 = Actor_WorldYawTowardPoint(&this->actor, &sp7C->focus.pos);
|
||||
if (targetActor != NULL) {
|
||||
sp72 = Actor_WorldYawTowardPoint(&this->actor, &targetActor->focus.pos);
|
||||
sp70 = this->actor.world.rot.y - sp72;
|
||||
sp6E = Actor_WorldPitchTowardPoint(&this->actor, &sp7C->focus.pos);
|
||||
sp6E = Actor_WorldPitchTowardPoint(&this->actor, &targetActor->focus.pos);
|
||||
sp6C = this->actor.world.rot.x - sp6E;
|
||||
|
||||
sp64 = (200.0f - Math_Vec3f_DistXYZ(&this->actor.world.pos, &sp7C->focus.pos)) * 0.005f;
|
||||
sp64 = (200.0f - Math_Vec3f_DistXYZ(&this->actor.world.pos, &targetActor->focus.pos)) * 0.005f;
|
||||
if (sp64 < 0.12f) {
|
||||
sp64 = 0.12f;
|
||||
}
|
||||
|
||||
if ((&player->actor != sp7C) && ((sp7C->update == NULL) || ((this->unk_1CF < 0) && (ABS_ALT(sp70) > 0x4000)))) {
|
||||
this->player = NULL;
|
||||
if ((&player->actor != targetActor) &&
|
||||
((targetActor->update == NULL) || ((this->unk_1CF < 0) && (ABS_ALT(sp70) > 0x4000)))) {
|
||||
this->moveTo = NULL;
|
||||
} else {
|
||||
if (this->unk_1CE != 0) {
|
||||
this->unk_1CE--;
|
||||
this->actor.world.rot.y += (this->actor.params == 0) ? 0x190 : -0x190;
|
||||
this->actor.world.rot.y += (this->actor.params == ZORA_BOOMERANG_LEFT) ? 0x190 : -0x190;
|
||||
} else {
|
||||
if (this->unk_1CF > 0) {
|
||||
this->unk_1CF--;
|
||||
@@ -242,7 +243,7 @@ void func_808A2918(EnBoom* this, PlayState* play) {
|
||||
if (sp74 != 0) {
|
||||
this->actor.world.rot.x = -this->actor.world.rot.x;
|
||||
this->actor.world.rot.y += 0x8000;
|
||||
this->player = &player->actor;
|
||||
this->moveTo = &player->actor;
|
||||
this->unk_1CC = 0;
|
||||
}
|
||||
}
|
||||
@@ -250,34 +251,34 @@ void func_808A2918(EnBoom* this, PlayState* play) {
|
||||
if (this->unk_1CC <= 16) {
|
||||
distXYZ = Math_Vec3f_DistXYZ(&this->actor.world.pos, &player->actor.focus.pos);
|
||||
|
||||
if (&player->actor != this->player) {
|
||||
if (this->player == 0) {
|
||||
if (&player->actor != this->moveTo) {
|
||||
if (this->moveTo == 0) {
|
||||
this->unk_1CE = 8;
|
||||
}
|
||||
this->player = &player->actor;
|
||||
this->moveTo = &player->actor;
|
||||
}
|
||||
|
||||
if (distXYZ < 40.0f) {
|
||||
sp7C = this->unk_1C8;
|
||||
if (sp7C != NULL) {
|
||||
Math_Vec3f_Copy(&sp7C->world.pos, &player->actor.world.pos);
|
||||
if (sp7C->id == ACTOR_EN_ITEM00) {
|
||||
sp7C->gravity = -0.9f;
|
||||
sp7C->bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH);
|
||||
targetActor = this->unk_1C8;
|
||||
if (targetActor != NULL) {
|
||||
Math_Vec3f_Copy(&targetActor->world.pos, &player->actor.world.pos);
|
||||
if (targetActor->id == ACTOR_EN_ITEM00) {
|
||||
targetActor->gravity = -0.9f;
|
||||
targetActor->bgCheckFlags &= ~(BGCHECKFLAG_GROUND | BGCHECKFLAG_GROUND_TOUCH);
|
||||
} else {
|
||||
sp7C->flags &= ~ACTOR_FLAG_2000;
|
||||
targetActor->flags &= ~ACTOR_FLAG_2000;
|
||||
}
|
||||
}
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
sp7C = this->unk_1C8;
|
||||
if (sp7C != NULL) {
|
||||
if (sp7C->update == NULL) {
|
||||
targetActor = this->unk_1C8;
|
||||
if (targetActor != NULL) {
|
||||
if (targetActor->update == NULL) {
|
||||
this->unk_1C8 = NULL;
|
||||
} else {
|
||||
Math_Vec3f_Copy(&sp7C->world.pos, &this->actor.world.pos);
|
||||
Math_Vec3f_Copy(&targetActor->world.pos, &this->actor.world.pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -298,7 +299,7 @@ void EnBoom_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_SetFocus(&this->actor, 0.0f);
|
||||
}
|
||||
|
||||
if (this->actor.params != 0) {
|
||||
if (this->actor.params != ZORA_BOOMERANG_LEFT) {
|
||||
this->unk_1CD--;
|
||||
} else {
|
||||
this->unk_1CD++;
|
||||
@@ -326,7 +327,7 @@ void EnBoom_Draw(Actor* thisx, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
Matrix_RotateYS(this->actor.world.rot.y, MTXMODE_APPLY);
|
||||
Matrix_RotateZS((this->actor.params != 0) ? 0x1F40 : -0x1F40, MTXMODE_APPLY);
|
||||
Matrix_RotateZS((this->actor.params != ZORA_BOOMERANG_LEFT) ? 0x1F40 : -0x1F40, MTXMODE_APPLY);
|
||||
Matrix_RotateXS(this->actor.world.rot.x, MTXMODE_APPLY);
|
||||
Matrix_MultVec3f(&sp58->unk_04, &sp4C);
|
||||
Matrix_MultVec3f(&sp58->unk_10, &sp40);
|
||||
|
||||
@@ -3,6 +3,11 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ZORA_BOOMERANG_LEFT,
|
||||
/* 1 */ ZORA_BOOMERANG_RIGHT
|
||||
} EnBoomType;
|
||||
|
||||
struct EnBoom;
|
||||
|
||||
typedef void (*EnBoomActionFunc)(struct EnBoom*, PlayState*);
|
||||
@@ -10,7 +15,7 @@ typedef void (*EnBoomActionFunc)(struct EnBoom*, PlayState*);
|
||||
typedef struct EnBoom {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ ColliderQuad collider;
|
||||
/* 0x1C4 */ Actor* player;
|
||||
/* 0x1C4 */ Actor* moveTo;
|
||||
/* 0x1C8 */ Actor* unk_1C8;
|
||||
/* 0x1CC */ u8 unk_1CC;
|
||||
/* 0x1CD */ u8 unk_1CD;
|
||||
|
||||
@@ -416,7 +416,7 @@ void EnButte_Update(Actor* thisx, PlayState* play) {
|
||||
this->unk_258 += 0x600;
|
||||
|
||||
if (ENBUTTE_GET_1(&this->actor) == ENBUTTE_1) {
|
||||
if (GET_PLAYER(play)->meleeWeaponState == 0) {
|
||||
if (GET_PLAYER(play)->meleeWeaponState == PLAYER_MELEE_WEAPON_STATE_0) {
|
||||
if (this->unk_252 > 0) {
|
||||
this->unk_252--;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,8 @@ void func_80AFE25C(EnColMan* this, PlayState* play) {
|
||||
CLEAR_TAG_SMALL_EXPLOSION);
|
||||
} else {
|
||||
EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
BOMB_EXPLOSIVE_TYPE_BOMB, 0, 0, BOMB_TYPE_BODY);
|
||||
|
||||
if (bomb != NULL) {
|
||||
bomb->timer = 0;
|
||||
|
||||
@@ -438,8 +438,9 @@ s32 func_8089AE00(EnDinofos* this, PlayState* play) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != 0) && this->actor.isTargeted &&
|
||||
(Rand_ZeroOne() < 0.5f) && func_8089A968(this) && Player_IsFacingActor(&this->actor, 0x2000, play)) {
|
||||
if ((this->actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
this->actor.isTargeted && (Rand_ZeroOne() < 0.5f) && func_8089A968(this) &&
|
||||
Player_IsFacingActor(&this->actor, 0x2000, play)) {
|
||||
if (Rand_ZeroOne() < 0.5f) {
|
||||
func_8089C024(this, 2);
|
||||
} else {
|
||||
|
||||
@@ -914,7 +914,8 @@ void func_808787B0(EnDodongo* this, PlayState* play) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
if (this->timer == 0) {
|
||||
EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, 0);
|
||||
this->actor.world.pos.y, this->actor.world.pos.z,
|
||||
BOMB_EXPLOSIVE_TYPE_BOMB, 0, 0, BOMB_TYPE_BODY);
|
||||
if (bomb != NULL) {
|
||||
bomb->timer = 0;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#include "objects/object_wdor03/object_wdor03.h"
|
||||
#include "objects/object_wdor04/object_wdor04.h"
|
||||
#include "objects/object_wdor05/object_wdor05.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/object_numa_obj/object_numa_obj.h"
|
||||
#include "objects/object_kaizoku_obj/object_kaizoku_obj.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
@@ -387,21 +386,22 @@ static Gfx* D_808679A4[14][2] = {
|
||||
void EnDoor_Init(Actor* thisx, PlayState* play2) {
|
||||
PlayState* play = play2;
|
||||
s32 objectBankIndex;
|
||||
EnDoorInfo* objectInfo = sObjInfo;
|
||||
EnDoorInfo* objectInfo = &sObjInfo[0];
|
||||
EnDoor* this = THIS;
|
||||
s32 i;
|
||||
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
Actor_ProcessInitChain(&this->knobDoor.dyna.actor, sInitChain);
|
||||
|
||||
this->unk_1A4 = ENDOOR_GET_PARAMS_7(thisx);
|
||||
this->doorType = ENDOOR_GET_TYPE(thisx);
|
||||
|
||||
this->switchFlag = ENDOOR_GET_PARAMS_7F(thisx);
|
||||
if ((this->unk_1A4 == 7) && (this->switchFlag == 0)) {
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
DynaPolyActor_LoadMesh(play, &this->dyna, &gDoorCol);
|
||||
if ((this->doorType == ENDOOR_TYPE_7) && (this->switchFlag == 0)) {
|
||||
DynaPolyActor_Init(&this->knobDoor.dyna, 0);
|
||||
DynaPolyActor_LoadMesh(play, &this->knobDoor.dyna, &gDoorCol);
|
||||
}
|
||||
SkelAnime_Init(play, &this->skelAnime, &gDoorSkel, &gameplay_keep_Anim_020658, this->limbTable, this->limbTable, 5);
|
||||
if (this->unk_1A4 == 5) {
|
||||
SkelAnime_Init(play, &this->knobDoor.skelAnime, &gDoorSkel, &gameplay_keep_Anim_020658, this->limbTable,
|
||||
this->limbTable, DOOR_LIMB_MAX);
|
||||
if (this->doorType == ENDOOR_TYPE_5) {
|
||||
objectInfo = &sObjInfo[17 + this->switchFlag];
|
||||
} else {
|
||||
for (i = 0; i < ARRAY_COUNT(sObjInfo) - 34; i++, objectInfo++) {
|
||||
@@ -414,52 +414,53 @@ void EnDoor_Init(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
}
|
||||
|
||||
this->dlIndex = objectInfo->dListIndex;
|
||||
this->knobDoor.dlIndex = objectInfo->dListIndex;
|
||||
objectBankIndex = Object_GetIndex(&play->objectCtx, objectInfo->objectId);
|
||||
if (objectBankIndex < 0) {
|
||||
objectInfo = &sObjInfo[15];
|
||||
objectBankIndex = Object_GetIndex(&play->objectCtx, objectInfo->objectId);
|
||||
if (objectBankIndex != 0) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
Actor_Kill(&this->knobDoor.dyna.actor);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->requiredObjBankIndex = objectBankIndex;
|
||||
this->dlIndex = objectInfo->dListIndex; // Set twice?
|
||||
if (this->dyna.actor.objBankIndex == this->requiredObjBankIndex) {
|
||||
this->knobDoor.requiredObjBankIndex = objectBankIndex;
|
||||
this->knobDoor.dlIndex = objectInfo->dListIndex; // Set twice?
|
||||
if (this->knobDoor.dyna.actor.objBankIndex == this->knobDoor.requiredObjBankIndex) {
|
||||
func_80866A5C(this, play);
|
||||
} else {
|
||||
this->actionFunc = func_80866A5C;
|
||||
}
|
||||
Actor_SetFocus(&this->dyna.actor, 35.0f);
|
||||
Actor_SetFocus(&this->knobDoor.dyna.actor, 35.0f);
|
||||
}
|
||||
|
||||
void EnDoor_Destroy(Actor* thisx, PlayState* play) {
|
||||
EnDoor* this = (EnDoor*)thisx;
|
||||
|
||||
if (this->unk_1A4 != 7) {
|
||||
TransitionActorEntry* transitionEntry = &play->doorCtx.transitionActorList[(u16)this->dyna.actor.params >> 0xA];
|
||||
if (this->doorType != ENDOOR_TYPE_7) {
|
||||
TransitionActorEntry* transitionEntry =
|
||||
&play->doorCtx.transitionActorList[DOOR_GET_TRANSITION_ID(&this->knobDoor.dyna.actor)];
|
||||
if (transitionEntry->id < 0) {
|
||||
transitionEntry->id = -transitionEntry->id;
|
||||
}
|
||||
} else if (this->switchFlag == 0) {
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->dyna.bgId);
|
||||
DynaPoly_DeleteBgActor(play, &play->colCtx.dyna, this->knobDoor.dyna.bgId);
|
||||
}
|
||||
}
|
||||
|
||||
void func_80866A5C(EnDoor* this, PlayState* play) {
|
||||
if (Object_IsLoaded(&play->objectCtx, this->requiredObjBankIndex)) {
|
||||
this->dyna.actor.objBankIndex = this->requiredObjBankIndex;
|
||||
if (Object_IsLoaded(&play->objectCtx, this->knobDoor.requiredObjBankIndex)) {
|
||||
this->knobDoor.dyna.actor.objBankIndex = this->knobDoor.requiredObjBankIndex;
|
||||
this->actionFunc = func_80866B20;
|
||||
this->dyna.actor.world.rot.y = 0;
|
||||
if (this->unk_1A4 == 1) {
|
||||
this->knobDoor.dyna.actor.world.rot.y = 0;
|
||||
if (this->doorType == ENDOOR_TYPE_1) {
|
||||
if (!Flags_GetSwitch(play, this->switchFlag)) {
|
||||
this->unk_1A6 = 10;
|
||||
}
|
||||
} else if ((this->unk_1A4 == 4) &&
|
||||
(Actor_WorldDistXZToActor(&this->dyna.actor, &GET_PLAYER(play)->actor) > 120.0f)) {
|
||||
} else if ((this->doorType == ENDOOR_TYPE_4) &&
|
||||
(Actor_WorldDistXZToActor(&this->knobDoor.dyna.actor, &GET_PLAYER(play)->actor) > 120.0f)) {
|
||||
this->actionFunc = func_8086704C;
|
||||
this->dyna.actor.world.rot.y = -0x1800;
|
||||
this->knobDoor.dyna.actor.world.rot.y = -0x1800;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -468,28 +469,29 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
||||
static s32 D_80867BC0;
|
||||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (Actor_ProcessTalkRequest(&this->dyna.actor, &play->state) && (this->dyna.actor.textId == 0x1821)) {
|
||||
if (Actor_ProcessTalkRequest(&this->knobDoor.dyna.actor, &play->state) &&
|
||||
(this->knobDoor.dyna.actor.textId == 0x1821)) {
|
||||
D_80867BC0 = true;
|
||||
}
|
||||
if (this->unk_1A1 != 0) {
|
||||
if (this->knobDoor.playOpenAnim) {
|
||||
this->actionFunc = func_80867144;
|
||||
Animation_PlayOnceSetSpeed(&this->skelAnime, sAnimations[this->animIndex],
|
||||
Animation_PlayOnceSetSpeed(&this->knobDoor.skelAnime, sAnimations[this->knobDoor.animIndex],
|
||||
(player->stateFlags1 & PLAYER_STATE1_8000000) ? 0.75f : 1.5f);
|
||||
if (this->unk_1A6 != 0) {
|
||||
gSaveContext.save.saveInfo.inventory.dungeonKeys[gSaveContext.mapIndex]--;
|
||||
Flags_SetSwitch(play, this->switchFlag);
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_EV_CHAIN_KEY_UNLOCK);
|
||||
}
|
||||
} else if (this->unk_1A7 != 0) {
|
||||
this->actionFunc = func_80866F94;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_DOOR_OPEN);
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_EV_DOOR_OPEN);
|
||||
} else if (!Player_InCsMode(play)) {
|
||||
Vec3f playerPosRelToDoor;
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&this->dyna.actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
Actor_OffsetOfPointInActorCoords(&this->knobDoor.dyna.actor, &playerPosRelToDoor, &player->actor.world.pos);
|
||||
if (D_80867BC0 || ((fabsf(playerPosRelToDoor.y) < 20.0f) && (fabsf(playerPosRelToDoor.x) < 20.0f) &&
|
||||
(fabsf(playerPosRelToDoor.z) < 50.0f))) {
|
||||
s16 yawDiff = player->actor.shape.rot.y - this->dyna.actor.shape.rot.y;
|
||||
s16 yawDiff = player->actor.shape.rot.y - this->knobDoor.dyna.actor.shape.rot.y;
|
||||
|
||||
if (playerPosRelToDoor.z > 0.0f) {
|
||||
yawDiff = (0x8000 - yawDiff);
|
||||
@@ -497,51 +499,52 @@ void func_80866B20(EnDoor* this, PlayState* play) {
|
||||
if (ABS_ALT(yawDiff) < 0x3000) {
|
||||
player->doorType = PLAYER_DOORTYPE_HANDLE;
|
||||
player->doorDirection = playerPosRelToDoor.z >= 0.0f ? 1.0f : -1.0f;
|
||||
player->doorActor = &this->dyna.actor;
|
||||
player->doorActor = &this->knobDoor.dyna.actor;
|
||||
if (this->unk_1A6 != 0) {
|
||||
if (gSaveContext.save.saveInfo.inventory.dungeonKeys[((void)0, gSaveContext.mapIndex)] <= 0) {
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->dyna.actor.textId = 0x1802;
|
||||
this->knobDoor.dyna.actor.textId = 0x1802;
|
||||
} else {
|
||||
player->doorTimer = 10;
|
||||
}
|
||||
} else if (this->unk_1A4 == 4) {
|
||||
} else if (this->doorType == ENDOOR_TYPE_4) {
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->dyna.actor.textId = 0x1800;
|
||||
} else if ((this->unk_1A4 == 0) || (this->unk_1A4 == 2) || (this->unk_1A4 == 3)) {
|
||||
this->knobDoor.dyna.actor.textId = 0x1800;
|
||||
} else if ((this->doorType == ENDOOR_TYPE_0) || (this->doorType == ENDOOR_TYPE_2) ||
|
||||
(this->doorType == ENDOOR_TYPE_3)) {
|
||||
s32 halfDaysDayBit = (play->actorCtx.halfDaysBit & HALFDAYBIT_DAWNS) >> 1;
|
||||
s32 halfDaysNightBit = play->actorCtx.halfDaysBit & HALFDAYBIT_NIGHTS;
|
||||
s16 temp_a2 = D_801AED48[this->switchFlag & 7];
|
||||
s32 textIdOffset = (this->switchFlag >> 3) & 0xF;
|
||||
|
||||
if (((this->unk_1A4 == 0) && !((halfDaysDayBit | halfDaysNightBit) & temp_a2)) ||
|
||||
((this->unk_1A4 == 2) && !(halfDaysNightBit & temp_a2)) ||
|
||||
((this->unk_1A4 == 3) && !(halfDaysDayBit & temp_a2))) {
|
||||
if (((this->doorType == ENDOOR_TYPE_0) && !((halfDaysDayBit | halfDaysNightBit) & temp_a2)) ||
|
||||
((this->doorType == ENDOOR_TYPE_2) && !(halfDaysNightBit & temp_a2)) ||
|
||||
((this->doorType == ENDOOR_TYPE_3) && !(halfDaysDayBit & temp_a2))) {
|
||||
s16 baseTextId = 0x182D;
|
||||
|
||||
if (this->unk_1A4 == 3) {
|
||||
if (this->doorType == ENDOOR_TYPE_3) {
|
||||
baseTextId = 0x180D;
|
||||
} else if (this->unk_1A4 == 2) {
|
||||
} else if (this->doorType == ENDOOR_TYPE_2) {
|
||||
baseTextId = 0x181D;
|
||||
}
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
this->dyna.actor.textId = baseTextId + textIdOffset;
|
||||
this->knobDoor.dyna.actor.textId = baseTextId + textIdOffset;
|
||||
}
|
||||
} else if ((this->unk_1A4 == 5) && (playerPosRelToDoor.z > 0.0f)) {
|
||||
} else if ((this->doorType == ENDOOR_TYPE_5) && (playerPosRelToDoor.z > 0.0f)) {
|
||||
ScheduleOutput scheduleOutput;
|
||||
|
||||
if (Schedule_RunScript(play, D_8086778C[this->switchFlag], &scheduleOutput)) {
|
||||
this->dyna.actor.textId = scheduleOutput.result + 0x1800;
|
||||
this->knobDoor.dyna.actor.textId = scheduleOutput.result + 0x1800;
|
||||
|
||||
player->doorType = ((this->dyna.actor.textId == 0x1821) && D_80867BC0)
|
||||
player->doorType = ((this->knobDoor.dyna.actor.textId == 0x1821) && D_80867BC0)
|
||||
? PLAYER_DOORTYPE_PROXIMITY
|
||||
: PLAYER_DOORTYPE_TALKING;
|
||||
}
|
||||
}
|
||||
func_80122F28(player);
|
||||
}
|
||||
} else if ((this->unk_1A4 == 4) && (this->dyna.actor.xzDistToPlayer > 240.0f)) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_DOOR_OPEN);
|
||||
} else if ((this->doorType == ENDOOR_TYPE_4) && (this->knobDoor.dyna.actor.xzDistToPlayer > 240.0f)) {
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_EV_DOOR_OPEN);
|
||||
this->actionFunc = func_80867080;
|
||||
}
|
||||
}
|
||||
@@ -556,34 +559,34 @@ void func_80866F94(EnDoor* this, PlayState* play) {
|
||||
} else {
|
||||
direction = -1;
|
||||
}
|
||||
if (Math_ScaledStepToS(&this->dyna.actor.world.rot.y, direction * 0x3E80, 0x7D0)) {
|
||||
if (Math_ScaledStepToS(&this->knobDoor.dyna.actor.world.rot.y, direction * 0x3E80, 0x7D0)) {
|
||||
Math_StepToC(&this->unk_1A7, 0, 1);
|
||||
}
|
||||
} else {
|
||||
if (Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0, 0x7D0)) {
|
||||
if (Math_ScaledStepToS(&this->knobDoor.dyna.actor.world.rot.y, 0, 0x7D0)) {
|
||||
this->actionFunc = func_80866B20;
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_AUTO_DOOR_CLOSE);
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_EV_AUTO_DOOR_CLOSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void func_8086704C(EnDoor* this, PlayState* play) {
|
||||
if (this->dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
if (this->knobDoor.dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
this->actionFunc = func_808670F0;
|
||||
}
|
||||
}
|
||||
|
||||
void func_80867080(EnDoor* this, PlayState* play) {
|
||||
if (this->dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
if (this->knobDoor.dyna.actor.xzDistToPlayer < 120.0f) {
|
||||
this->actionFunc = func_808670F0;
|
||||
} else if (Math_ScaledStepToS(&this->dyna.actor.world.rot.y, -0x1800, 0x100)) {
|
||||
} else if (Math_ScaledStepToS(&this->knobDoor.dyna.actor.world.rot.y, -0x1800, 0x100)) {
|
||||
this->actionFunc = func_8086704C;
|
||||
}
|
||||
}
|
||||
|
||||
void func_808670F0(EnDoor* this, PlayState* play) {
|
||||
if (Math_ScaledStepToS(&this->dyna.actor.world.rot.y, 0, 0x700)) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_DOOR_CLOSE);
|
||||
if (Math_ScaledStepToS(&this->knobDoor.dyna.actor.world.rot.y, 0, 0x700)) {
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_EV_DOOR_CLOSE);
|
||||
this->actionFunc = func_80866B20;
|
||||
}
|
||||
}
|
||||
@@ -593,19 +596,19 @@ void func_80867144(EnDoor* this, PlayState* play) {
|
||||
s32 i;
|
||||
|
||||
if (DECR(this->unk_1A6) == 0) {
|
||||
if (SkelAnime_Update(&this->skelAnime) != 0) {
|
||||
if (SkelAnime_Update(&this->knobDoor.skelAnime)) {
|
||||
this->actionFunc = func_80866B20;
|
||||
this->unk_1A1 = 0;
|
||||
} else if (Animation_OnFrame(&this->skelAnime, sAnimOpenFrames[this->animIndex])) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_OC_DOOR_OPEN);
|
||||
if (this->skelAnime.playSpeed < 1.5f) {
|
||||
this->knobDoor.playOpenAnim = false;
|
||||
} else if (Animation_OnFrame(&this->knobDoor.skelAnime, sAnimOpenFrames[this->knobDoor.animIndex])) {
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_OC_DOOR_OPEN);
|
||||
if (this->knobDoor.skelAnime.playSpeed < 1.5f) {
|
||||
numEffects = (s32)(Rand_ZeroOne() * 30.0f) + 50;
|
||||
for (i = 0; i < numEffects; i++) {
|
||||
EffectSsBubble_Spawn(play, &this->dyna.actor.world.pos, 60.0, 100.0f, 50.0f, 0.15f);
|
||||
EffectSsBubble_Spawn(play, &this->knobDoor.dyna.actor.world.pos, 60.0, 100.0f, 50.0f, 0.15f);
|
||||
}
|
||||
}
|
||||
} else if (Animation_OnFrame(&this->skelAnime, sAnimCloseFrames[this->animIndex])) {
|
||||
Actor_PlaySfx(&this->dyna.actor, NA_SE_EV_DOOR_CLOSE);
|
||||
} else if (Animation_OnFrame(&this->knobDoor.skelAnime, sAnimCloseFrames[this->knobDoor.animIndex])) {
|
||||
Actor_PlaySfx(&this->knobDoor.dyna.actor, NA_SE_EV_DOOR_CLOSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -620,28 +623,28 @@ s32 EnDoor_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
||||
TransitionActorEntry* transitionEntry;
|
||||
EnDoor* this = THIS;
|
||||
|
||||
if (limbIndex == 4) {
|
||||
Gfx** dl = D_808679A4[this->dlIndex];
|
||||
if (limbIndex == DOOR_LIMB_4) {
|
||||
Gfx** dl = D_808679A4[this->knobDoor.dlIndex];
|
||||
s16 temp;
|
||||
s32 dlIndex;
|
||||
|
||||
transitionEntry = NULL;
|
||||
|
||||
if (this->unk_1A4 != 7) {
|
||||
transitionEntry = &play->doorCtx.transitionActorList[(u16)this->dyna.actor.params >> 0xA];
|
||||
if (this->doorType != ENDOOR_TYPE_7) {
|
||||
transitionEntry = &play->doorCtx.transitionActorList[DOOR_GET_TRANSITION_ID(&this->knobDoor.dyna.actor)];
|
||||
}
|
||||
rot->z += this->dyna.actor.world.rot.y;
|
||||
if ((this->unk_1A4 == 7) || (play->roomCtx.prevRoom.num >= 0) ||
|
||||
rot->z += this->knobDoor.dyna.actor.world.rot.y;
|
||||
if ((this->doorType == ENDOOR_TYPE_7) || (play->roomCtx.prevRoom.num >= 0) ||
|
||||
(transitionEntry->sides[0].room == transitionEntry->sides[1].room)) {
|
||||
s32 pad;
|
||||
|
||||
temp = (this->dyna.actor.shape.rot.y + this->skelAnime.jointTable[3].z + rot->z) -
|
||||
Math_Vec3f_Yaw(&play->view.eye, &this->dyna.actor.world.pos);
|
||||
temp = (this->knobDoor.dyna.actor.shape.rot.y + this->knobDoor.skelAnime.jointTable[3].z + rot->z) -
|
||||
Math_Vec3f_Yaw(&play->view.eye, &this->knobDoor.dyna.actor.world.pos);
|
||||
*dList = (ABS_ALT(temp) < 0x4000) ? dl[0] : dl[1];
|
||||
|
||||
} else {
|
||||
dlIndex = 0;
|
||||
if (transitionEntry->sides[0].room != this->dyna.actor.room) {
|
||||
if (transitionEntry->sides[0].room != this->knobDoor.dyna.actor.room) {
|
||||
dlIndex = 1;
|
||||
}
|
||||
*dList = dl[dlIndex];
|
||||
@@ -653,17 +656,17 @@ s32 EnDoor_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
||||
void EnDoor_Draw(Actor* thisx, PlayState* play) {
|
||||
EnDoor* this = THIS;
|
||||
|
||||
if (this->dyna.actor.objBankIndex == this->requiredObjBankIndex) {
|
||||
if (this->knobDoor.dyna.actor.objBankIndex == this->knobDoor.requiredObjBankIndex) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
if ((this->unk_1A4 == 7) && (this->switchFlag == 0)) {
|
||||
if ((this->doorType == ENDOOR_TYPE_7) && (this->switchFlag == 0)) {
|
||||
Gfx_DrawDListOpa(play, gameplay_keep_DL_0221B8);
|
||||
} else {
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
}
|
||||
SkelAnime_DrawOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, EnDoor_OverrideLimbDraw, NULL,
|
||||
&this->dyna.actor);
|
||||
if (this->dyna.actor.world.rot.y != 0) {
|
||||
if (this->dyna.actor.world.rot.y > 0) {
|
||||
SkelAnime_DrawOpa(play, this->knobDoor.skelAnime.skeleton, this->knobDoor.skelAnime.jointTable,
|
||||
EnDoor_OverrideLimbDraw, NULL, &this->knobDoor.dyna.actor);
|
||||
if (this->knobDoor.dyna.actor.world.rot.y != 0) {
|
||||
if (this->knobDoor.dyna.actor.world.rot.y > 0) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gDoorRightDL);
|
||||
} else {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gDoorLeftDL);
|
||||
|
||||
@@ -2,27 +2,34 @@
|
||||
#define Z_EN_DOOR_H
|
||||
|
||||
#include "global.h"
|
||||
#include "z64door.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
struct EnDoor;
|
||||
|
||||
typedef void (*EnDoorActionFunc)(struct EnDoor*, PlayState*);
|
||||
|
||||
#define ENDOOR_GET_PARAMS_7(thisx) (((thisx)->params >> 7) & 7)
|
||||
#define ENDOOR_GET_TYPE(thisx) (((thisx)->params >> 7) & 7)
|
||||
#define ENDOOR_GET_PARAMS_7F(thisx) (((thisx)->params) & 0x7F)
|
||||
|
||||
typedef enum EnDoorType {
|
||||
/* 0 */ ENDOOR_TYPE_0,
|
||||
/* 1 */ ENDOOR_TYPE_1,
|
||||
/* 2 */ ENDOOR_TYPE_2,
|
||||
/* 3 */ ENDOOR_TYPE_3,
|
||||
/* 4 */ ENDOOR_TYPE_4,
|
||||
/* 5 */ ENDOOR_TYPE_5,
|
||||
/* 6 */ ENDOOR_TYPE_6,
|
||||
/* 7 */ ENDOOR_TYPE_7
|
||||
} EnDoorType;
|
||||
|
||||
typedef struct EnDoor {
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
/* 0x15C */ SkelAnime skelAnime;
|
||||
/* 0x1A0 */ u8 animIndex;
|
||||
/* 0x1A1 */ u8 unk_1A1;
|
||||
/* 0x1A2 */ s8 requiredObjBankIndex;
|
||||
/* 0x1A3 */ s8 dlIndex;
|
||||
/* 0x1A4 */ u8 unk_1A4;
|
||||
/* 0x000 */ KnobDoorActor knobDoor;
|
||||
/* 0x1A4 */ u8 doorType;
|
||||
/* 0x1A5 */ u8 switchFlag;
|
||||
/* 0x1A6 */ u8 unk_1A6;
|
||||
/* 0x1A7 */ s8 unk_1A7;
|
||||
/* 0x1A8 */ Vec3s limbTable[5];
|
||||
/* 0x1A8 */ Vec3s limbTable[DOOR_LIMB_MAX];
|
||||
/* 0x1C8 */ EnDoorActionFunc actionFunc;
|
||||
} EnDoor;
|
||||
|
||||
|
||||
@@ -92,9 +92,9 @@ void EnDoorEtc_Init(Actor* thisx, PlayState* play2) {
|
||||
s32 i;
|
||||
EnDoorEtc* this = THIS;
|
||||
|
||||
Actor_ProcessInitChain(&this->actor, sInitChain);
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->actor.shape.rot.x = -0x4000;
|
||||
Actor_ProcessInitChain(&this->knobDoor.dyna.actor, sInitChain);
|
||||
Actor_SetScale(&this->knobDoor.dyna.actor, 0.01f);
|
||||
this->knobDoor.dyna.actor.shape.rot.x = -0x4000;
|
||||
this->angle = 0;
|
||||
for (i = 0; i < 15; i++, objectInfo++) {
|
||||
if (play->sceneId == objectInfo->sceneId) {
|
||||
@@ -106,19 +106,19 @@ void EnDoorEtc_Init(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
objectIndex = Object_GetIndex(&play->objectCtx, objectInfo->objectId);
|
||||
if (objectIndex < 0) {
|
||||
Actor_Kill(&this->actor);
|
||||
Actor_Kill(&this->knobDoor.dyna.actor);
|
||||
} else {
|
||||
this->objectIndex = objectIndex;
|
||||
this->dListIndex = objectInfo->dListIndex;
|
||||
if (this->actor.objBankIndex == this->objectIndex) {
|
||||
this->knobDoor.requiredObjBankIndex = objectIndex;
|
||||
this->knobDoor.dlIndex = objectInfo->dListIndex;
|
||||
if (this->knobDoor.dyna.actor.objBankIndex == this->knobDoor.requiredObjBankIndex) {
|
||||
EnDoorEtc_WaitForObject(this, play);
|
||||
} else {
|
||||
this->actionFunc = EnDoorEtc_WaitForObject;
|
||||
}
|
||||
}
|
||||
Collider_InitCylinder(play, &this->collider);
|
||||
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
|
||||
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
Collider_SetCylinder(play, &this->collider, &this->knobDoor.dyna.actor, &sCylinderInit);
|
||||
this->knobDoor.dyna.actor.colChkInfo.mass = MASS_IMMOVABLE;
|
||||
}
|
||||
|
||||
void EnDoorEtc_Destroy(Actor* thisx, PlayState* play) {
|
||||
@@ -139,11 +139,11 @@ s32 EnDoorEtc_IsDistanceGreater(Vec3f* a, Vec3f* b, f32 c) {
|
||||
}
|
||||
|
||||
void EnDoorEtc_WaitForObject(EnDoorEtc* this, PlayState* play) {
|
||||
if (Object_IsLoaded(&play->objectCtx, this->objectIndex)) {
|
||||
this->actor.flags &= ~ACTOR_FLAG_10;
|
||||
this->actor.objBankIndex = this->objectIndex;
|
||||
if (Object_IsLoaded(&play->objectCtx, this->knobDoor.requiredObjBankIndex)) {
|
||||
this->knobDoor.dyna.actor.flags &= ~ACTOR_FLAG_10;
|
||||
this->knobDoor.dyna.actor.objBankIndex = this->knobDoor.requiredObjBankIndex;
|
||||
this->actionFunc = func_80AC2354;
|
||||
this->actor.draw = EnDoorEtc_Draw;
|
||||
this->knobDoor.dyna.actor.draw = EnDoorEtc_Draw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -175,27 +175,28 @@ void func_80AC21A0(EnDoorEtc* this, PlayState* play) {
|
||||
s16 yawDiff;
|
||||
s32 yawDiffAbs;
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&this->actor, &playerOffsetFromDoor, &player->actor.world.pos);
|
||||
if (this->unk_1A1 == 0) {
|
||||
Actor_OffsetOfPointInActorCoords(&this->knobDoor.dyna.actor, &playerOffsetFromDoor, &player->actor.world.pos);
|
||||
if (!this->knobDoor.playOpenAnim) {
|
||||
if ((!Player_InCsMode(play)) &&
|
||||
((fabsf(playerOffsetFromDoor.y) < 20.0f) && fabsf(playerOffsetFromDoor.x) < 20.0f) &&
|
||||
(fabsf(playerOffsetFromDoor.z) < 50.0f)) {
|
||||
yawDiff = player->actor.shape.rot.y - this->actor.shape.rot.y;
|
||||
yawDiff = player->actor.shape.rot.y - this->knobDoor.dyna.actor.shape.rot.y;
|
||||
if (playerOffsetFromDoor.z > 0.0f) {
|
||||
yawDiff = 0x8000 - yawDiff;
|
||||
}
|
||||
yawDiffAbs = ABS_ALT(yawDiff);
|
||||
if (yawDiffAbs < 0x3000) {
|
||||
player->doorDirection = (playerOffsetFromDoor.z >= 0.0f) ? 1.0f : -1.0f;
|
||||
player->doorActor = &this->actor;
|
||||
player->doorType = -1;
|
||||
player->doorActor = &this->knobDoor.dyna.actor;
|
||||
player->doorType = PLAYER_DOORTYPE_TALKING;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((this->actor.textId == 0x239B) && Flags_GetSwitch(play, ENDOORETC_GET_SWITCHFLAG(&this->actor))) {
|
||||
Flags_UnsetSwitch(play, ENDOORETC_GET_SWITCHFLAG(&this->actor));
|
||||
if ((this->knobDoor.dyna.actor.textId == 0x239B) &&
|
||||
Flags_GetSwitch(play, ENDOORETC_GET_SWITCHFLAG(&this->knobDoor.dyna.actor))) {
|
||||
Flags_UnsetSwitch(play, ENDOORETC_GET_SWITCHFLAG(&this->knobDoor.dyna.actor));
|
||||
this->actionFunc = func_80AC2154;
|
||||
this->actor.textId = 0x1800; // "It won't budge!"
|
||||
this->knobDoor.dyna.actor.textId = 0x1800; // "It won't budge!"
|
||||
this->unk_1F4 |= 1;
|
||||
this->timer = 0x5A;
|
||||
}
|
||||
@@ -206,18 +207,18 @@ void func_80AC2354(EnDoorEtc* this, PlayState* play) {
|
||||
|
||||
while (door != NULL) {
|
||||
if ((door->id != ACTOR_EN_DOOR) ||
|
||||
!EnDoorEtc_IsDistanceGreater(&door->world.pos, &this->actor.world.pos, 10.0f)) {
|
||||
!EnDoorEtc_IsDistanceGreater(&door->world.pos, &this->knobDoor.dyna.actor.world.pos, 10.0f)) {
|
||||
door = door->next;
|
||||
} else {
|
||||
this->actor.world.pos.x = door->world.pos.x;
|
||||
this->actor.world.pos.y = door->world.pos.y;
|
||||
this->actor.world.pos.z = door->world.pos.z;
|
||||
this->actor.shape.rot.y = door->shape.rot.y;
|
||||
this->actor.world.rot.y = door->world.rot.y;
|
||||
this->knobDoor.dyna.actor.world.pos.x = door->world.pos.x;
|
||||
this->knobDoor.dyna.actor.world.pos.y = door->world.pos.y;
|
||||
this->knobDoor.dyna.actor.world.pos.z = door->world.pos.z;
|
||||
this->knobDoor.dyna.actor.shape.rot.y = door->shape.rot.y;
|
||||
this->knobDoor.dyna.actor.world.rot.y = door->world.rot.y;
|
||||
Actor_Kill(door);
|
||||
this->actionFunc = func_80AC21A0;
|
||||
this->actor.textId = 0x239B;
|
||||
Actor_SetFocus(&this->actor, 70.0f);
|
||||
this->knobDoor.dyna.actor.textId = 0x239B;
|
||||
Actor_SetFocus(&this->knobDoor.dyna.actor, 70.0f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -229,7 +230,7 @@ void EnDoorEtc_Update(Actor* thisx, PlayState* play) {
|
||||
|
||||
this->actionFunc(this, play);
|
||||
if (this->unk_1F4 & 1) {
|
||||
Collider_UpdateCylinder(&this->actor, &this->collider);
|
||||
Collider_UpdateCylinder(&this->knobDoor.dyna.actor, &this->collider);
|
||||
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define Z_EN_DOOR_ETC_H
|
||||
|
||||
#include "global.h"
|
||||
#include "z64door.h"
|
||||
|
||||
struct EnDoorEtc;
|
||||
|
||||
@@ -10,11 +11,7 @@ struct EnDoorEtc;
|
||||
typedef void (*EnDoorEtcActionFunc)(struct EnDoorEtc*, PlayState*);
|
||||
|
||||
typedef struct EnDoorEtc {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char pad_144[0x5D];
|
||||
/* 0x1A1 */ u8 unk_1A1;
|
||||
/* 0x1A2 */ s8 objectIndex;
|
||||
/* 0x1A3 */ u8 dListIndex; // Never read, inferred from ovl_En_Door
|
||||
/* 0x000 */ KnobDoorActor knobDoor;
|
||||
/* 0x1A4 */ s16 angle;
|
||||
/* 0x1A6 */ s16 timer;
|
||||
/* 0x1A8 */ ColliderCylinder collider;
|
||||
|
||||
@@ -1268,7 +1268,8 @@ void EnEgol_Update(Actor* thisx, PlayState* play) {
|
||||
// last argument is DMG_ZORA_BOOMERANG | DMG_HOOKSHOT | DMG_NORMAL_ARROW | DMG_FIRE_ARROW | DMG_ICE_ARROW |
|
||||
// DMG_LIGHT_ARROW | DMG_DEKU_BUBBLE
|
||||
|
||||
if ((projectile != NULL) && !((projectile->id == ACTOR_EN_ARROW) && (projectile->params == ENARROW_5))) {
|
||||
if ((projectile != NULL) &&
|
||||
!((projectile->id == ACTOR_EN_ARROW) && (projectile->params == ARROW_TYPE_LIGHT))) {
|
||||
this->eyelidRotTarget = 0xFA0;
|
||||
this->eyeShutTimer = 20;
|
||||
if (this->action == EYEGORE_ACTION_LASER) {
|
||||
|
||||
@@ -489,7 +489,7 @@ void EnFamos_SetupChase(EnFamos* this) {
|
||||
void EnFamos_Chase(EnFamos* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
Vec3f abovePlayerPos;
|
||||
u32 surfaceType;
|
||||
FloorProperty surfaceType;
|
||||
|
||||
EnFamos_UpdateBobbingHeight(this);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 0x800);
|
||||
@@ -502,7 +502,7 @@ void EnFamos_Chase(EnFamos* this, PlayState* play) {
|
||||
|
||||
surfaceType = SurfaceType_GetFloorProperty2(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
if ((this->actor.xzDistToPlayer < 30.0f) && (this->actor.floorHeight > BGCHECK_Y_MIN) && // close enough
|
||||
(surfaceType != 0xC && surfaceType != 0xD)) {
|
||||
(surfaceType != FLOOR_PROPERTY_12 && surfaceType != FLOOR_PROPERTY_13)) {
|
||||
EnFamos_SetupAttackAim(this);
|
||||
|
||||
} else if ((Player_GetMask(play) == PLAYER_MASK_STONE) ||
|
||||
@@ -689,9 +689,9 @@ void EnFamos_DeathExplosion(EnFamos* this, PlayState* play) {
|
||||
this->actor.world.pos.x = randPlusMinusPoint5Scaled(5.0f) + this->targetDest.x;
|
||||
this->actor.world.pos.z = randPlusMinusPoint5Scaled(5.0f) + this->targetDest.z;
|
||||
if (this->stateTimer == 1) {
|
||||
EnBom* explosion =
|
||||
(EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + 40.0f, this->actor.world.pos.z, 0, 0, 0, BOMB_TYPE_BODY);
|
||||
EnBom* explosion = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y + 40.0f, this->actor.world.pos.z,
|
||||
BOMB_EXPLOSIVE_TYPE_BOMB, 0, 0, BOMB_TYPE_BODY);
|
||||
if (explosion != NULL) {
|
||||
explosion->timer = 0; // instant explosion
|
||||
}
|
||||
|
||||
@@ -1949,25 +1949,25 @@ void EnFishing_DrawRod(PlayState* play) {
|
||||
D_8090CD34 = 0.0f;
|
||||
}
|
||||
|
||||
spC8 = player->unk_B08[1];
|
||||
Math_SmoothStepToF(&player->unk_B08[1], input->rel.stick_y * 0.02f, 0.3f, 5.0f, 0.0f);
|
||||
spC8 = player->unk_B08[1] - spC8;
|
||||
spC8 = player->unk_B0C;
|
||||
Math_SmoothStepToF(&player->unk_B0C, input->rel.stick_y * 0.02f, 0.3f, 5.0f, 0.0f);
|
||||
spC8 = player->unk_B0C - spC8;
|
||||
|
||||
spC4 = player->unk_B08[0];
|
||||
Math_SmoothStepToF(&player->unk_B08[0], input->rel.stick_x * 0.02f, 0.3f, 5.0f, 0.0f);
|
||||
spC4 = player->unk_B08[0] - spC4;
|
||||
spC4 = player->unk_B08;
|
||||
Math_SmoothStepToF(&player->unk_B08, input->rel.stick_x * 0.02f, 0.3f, 5.0f, 0.0f);
|
||||
spC4 = player->unk_B08 - spC4;
|
||||
|
||||
if (player->unk_B08[0] > 1.0f) {
|
||||
player->unk_B08[0] = 1.0f;
|
||||
if (player->unk_B08 > 1.0f) {
|
||||
player->unk_B08 = 1.0f;
|
||||
}
|
||||
if (player->unk_B08[1] > 1.0f) {
|
||||
player->unk_B08[1] = 1.0f;
|
||||
if (player->unk_B0C > 1.0f) {
|
||||
player->unk_B0C = 1.0f;
|
||||
}
|
||||
if (player->unk_B08[0] < -1.0f) {
|
||||
player->unk_B08[0] = -1.0f;
|
||||
if (player->unk_B08 < -1.0f) {
|
||||
player->unk_B08 = -1.0f;
|
||||
}
|
||||
if (player->unk_B08[1] < -1.0f) {
|
||||
player->unk_B08[1] = -1.0f;
|
||||
if (player->unk_B0C < -1.0f) {
|
||||
player->unk_B0C = -1.0f;
|
||||
}
|
||||
|
||||
Math_ApproachF(&D_8090CD28, spC4 * 70.0f * -0.01f, 1.0f, D_8090CD30);
|
||||
@@ -1976,8 +1976,8 @@ void EnFishing_DrawRod(PlayState* play) {
|
||||
Math_ApproachF(&D_8090CD34, 1.0f, 1.0f, 0.1f);
|
||||
Math_ApproachZeroF(&D_8090CD38, 1.0f, 0.05f);
|
||||
} else {
|
||||
Math_ApproachZeroF(&player->unk_B08[1], 1.0f, 0.1f);
|
||||
Math_ApproachZeroF(&player->unk_B08[0], 1.0f, 0.1f);
|
||||
Math_ApproachZeroF(&player->unk_B0C, 1.0f, 0.1f);
|
||||
Math_ApproachZeroF(&player->unk_B08, 1.0f, 0.1f);
|
||||
Math_ApproachF(&D_8090CD2C, (Math_SinS(D_809171FE * 3000) * 0.025f) + -0.03f, 1.0f, 0.05f);
|
||||
Math_ApproachZeroF(&D_8090CD28, 1.0f, 0.05f);
|
||||
|
||||
@@ -1994,7 +1994,7 @@ void EnFishing_DrawRod(PlayState* play) {
|
||||
|
||||
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 155, 0, 255);
|
||||
|
||||
Matrix_Mult(&player->mf_CC4, MTXMODE_NEW);
|
||||
Matrix_Mult(&player->leftHandMf, MTXMODE_NEW);
|
||||
|
||||
if (sLinkAge != 1) {
|
||||
Matrix_Translate(0.0f, 400.0f, 0.0f, MTXMODE_APPLY);
|
||||
@@ -2009,11 +2009,11 @@ void EnFishing_DrawRod(PlayState* play) {
|
||||
}
|
||||
|
||||
Matrix_RotateXFApply(-0.6283185f);
|
||||
Matrix_RotateZF((player->unk_B08[0] * 0.5f) + 0.4712389f, MTXMODE_APPLY);
|
||||
Matrix_RotateZF((player->unk_B08 * 0.5f) + 0.4712389f, MTXMODE_APPLY);
|
||||
Matrix_RotateXFApply((D_8090CD40 + 20.0f) * 0.01f * M_PI);
|
||||
Matrix_Scale(0.70000005f, 0.70000005f, 0.70000005f, MTXMODE_APPLY);
|
||||
|
||||
spC0 = (D_8090CD3C * (((player->unk_B08[1] - 1.0f) * -0.25f) + 0.5f)) + (D_8090CD2C + D_8090CD38);
|
||||
spC0 = (D_8090CD3C * (((player->unk_B0C - 1.0f) * -0.25f) + 0.5f)) + (D_8090CD2C + D_8090CD38);
|
||||
|
||||
Matrix_Translate(0.0f, 0.0f, -1300.0f, MTXMODE_APPLY);
|
||||
|
||||
|
||||
@@ -1019,7 +1019,7 @@ s32 func_8094F904(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp55, D_80951A0C[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
if ((door != NULL) && (door->knobDoor.dyna.actor.update != NULL)) {
|
||||
if (this->timePath != NULL) {
|
||||
sp4C = Lib_SegmentedToVirtual(this->timePath->points);
|
||||
Math_Vec3s_ToVec3f(&sp40, &sp4C[0]);
|
||||
@@ -1029,7 +1029,7 @@ s32 func_8094F904(EnGm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->actor.world.rot.y = Math_Vec3f_Yaw(&sp40, &sp34);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp40);
|
||||
|
||||
if (ABS_ALT(BINANG_SUB(this->actor.world.rot.y, door->dyna.actor.shape.rot.y)) <= 0x4000) {
|
||||
if (ABS_ALT(BINANG_SUB(this->actor.world.rot.y, door->knobDoor.dyna.actor.shape.rot.y)) <= 0x4000) {
|
||||
this->unk_261 = -75;
|
||||
} else {
|
||||
this->unk_261 = 75;
|
||||
@@ -1450,7 +1450,7 @@ s32 func_80950804(EnGm* this, PlayState* play) {
|
||||
|
||||
door = func_8094DF90(play, this->unk_258);
|
||||
if (!SubS_InCsMode(play) && (this->timePathTimeSpeed != 0)) {
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
if ((door != NULL) && (door->knobDoor.dyna.actor.update != NULL)) {
|
||||
if ((this->unk_3BA / (f32)this->unk_3B8) <= 0.9f) {
|
||||
door->unk_1A7 = this->unk_261;
|
||||
} else {
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "z_en_go.h"
|
||||
#include "z64quake.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "objects/object_oF1d_map/object_oF1d_map.h"
|
||||
#include "objects/object_hakugin_demo/object_hakugin_demo.h"
|
||||
#include "objects/object_taisou/object_taisou.h"
|
||||
@@ -1249,7 +1250,8 @@ s32 func_80A13E80(EnGo* this, PlayState* play) {
|
||||
func_80A12C48(this, play, 1);
|
||||
Lib_Vec3f_TranslateAndRotateY(&this->actor.world.pos, this->actor.shape.rot.y, &D_80A166A4, &sp48);
|
||||
gSaveContext.powderKegTimer = 2400;
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, sp48.x, sp48.y, sp48.z, 1, 0, 0, 0);
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, sp48.x, sp48.y, sp48.z, BOMB_EXPLOSIVE_TYPE_POWDER_KEG,
|
||||
0, 0, BOMB_TYPE_BODY);
|
||||
func_80A134B0(this, play, 1);
|
||||
this->unk_3C2 = 0;
|
||||
this->unk_3C0++;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
|
||||
#include "z_en_gs.h"
|
||||
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
|
||||
#include "objects/object_gs/object_gs.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
@@ -871,7 +872,7 @@ s32 func_809995A4(EnGs* this, PlayState* play) {
|
||||
|
||||
if (this->actor.playerHeightRel < -12000.0f) {
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, 0, this->actor.world.rot.y, 0, 0);
|
||||
this->actor.world.pos.z, BOMB_EXPLOSIVE_TYPE_BOMB, this->actor.world.rot.y, 0, BOMB_TYPE_BODY);
|
||||
Actor_Kill(&this->actor);
|
||||
sp7C = 0;
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ void func_80B22500(EnHakurock* this, PlayState* play) {
|
||||
} else if ((&player->actor == this->collider.base.oc) &&
|
||||
(player->stateFlags3 & (PLAYER_STATE3_1000 | PLAYER_STATE3_80000)) &&
|
||||
(player->linearVelocity > 8.0f)) {
|
||||
player->unk_B08[0] = player->linearVelocity = -5.0f;
|
||||
player->unk_B08[1] += (player->linearVelocity * 0.05f);
|
||||
player->unk_B08 = player->linearVelocity = -5.0f;
|
||||
player->unk_B0C += (player->linearVelocity * 0.05f);
|
||||
player->actor.velocity.y = 5.0f;
|
||||
player->currentYaw = player->actor.world.rot.y;
|
||||
player->actor.home.rot.y = player->actor.world.rot.y;
|
||||
|
||||
@@ -108,18 +108,6 @@ typedef struct {
|
||||
RaceWaypoint* waypoints;
|
||||
} RaceInfo;
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ ENHORSE_ANIM_IDLE,
|
||||
/* 1 */ ENHORSE_ANIM_WHINNY,
|
||||
/* 2 */ ENHORSE_ANIM_STOPPING,
|
||||
/* 3 */ ENHORSE_ANIM_REARING,
|
||||
/* 4 */ ENHORSE_ANIM_WALK,
|
||||
/* 5 */ ENHORSE_ANIM_TROT,
|
||||
/* 6 */ ENHORSE_ANIM_GALLOP,
|
||||
/* 7 */ ENHORSE_ANIM_LOW_JUMP,
|
||||
/* 8 */ ENHORSE_ANIM_HIGH_JUMP
|
||||
} EnHorseAnimation;
|
||||
|
||||
static AnimationHeader* sEponaAnimations[] = {
|
||||
&object_horse_link_child_Anim_006D44, &object_horse_link_child_Anim_007468, &object_horse_link_child_Anim_005F64,
|
||||
&object_horse_link_child_Anim_004DE8, &object_horse_link_child_Anim_007D50, &object_horse_link_child_Anim_0043AC,
|
||||
|
||||
@@ -75,7 +75,7 @@ typedef enum EnHorseAction {
|
||||
/* 25 */ ENHORSE_ACTION_25
|
||||
} EnHorseAction;
|
||||
|
||||
typedef enum {
|
||||
typedef enum EnHorsePlayerDir {
|
||||
/* 0 */ PLAYER_DIR_FRONT_R,
|
||||
/* 1 */ PLAYER_DIR_FRONT_L,
|
||||
/* 2 */ PLAYER_DIR_BACK_R,
|
||||
@@ -84,7 +84,19 @@ typedef enum {
|
||||
/* 5 */ PLAYER_DIR_SIDE_L
|
||||
} EnHorsePlayerDir;
|
||||
|
||||
typedef enum {
|
||||
typedef enum EnHorseAnimation {
|
||||
/* 0 */ ENHORSE_ANIM_IDLE,
|
||||
/* 1 */ ENHORSE_ANIM_WHINNY,
|
||||
/* 2 */ ENHORSE_ANIM_STOPPING,
|
||||
/* 3 */ ENHORSE_ANIM_REARING,
|
||||
/* 4 */ ENHORSE_ANIM_WALK,
|
||||
/* 5 */ ENHORSE_ANIM_TROT,
|
||||
/* 6 */ ENHORSE_ANIM_GALLOP,
|
||||
/* 7 */ ENHORSE_ANIM_LOW_JUMP,
|
||||
/* 8 */ ENHORSE_ANIM_HIGH_JUMP
|
||||
} EnHorseAnimation;
|
||||
|
||||
typedef enum HorseType {
|
||||
/* 0 */ HORSE_TYPE_EPONA,
|
||||
/* 1 */ HORSE_TYPE_HNI,
|
||||
/* 2 */ HORSE_TYPE_2,
|
||||
|
||||
@@ -556,7 +556,7 @@ s32 func_80BF1DF4(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp55, D_80BF3318[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
if ((door != NULL) && (door->knobDoor.dyna.actor.update != NULL)) {
|
||||
if (this->timePath != NULL) {
|
||||
sp4C = Lib_SegmentedToVirtual(this->timePath->points);
|
||||
Math_Vec3s_ToVec3f(&sp40, &sp4C[0]);
|
||||
@@ -566,7 +566,7 @@ s32 func_80BF1DF4(EnIg* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->actor.world.rot.y = Math_Vec3f_Yaw(&sp40, &sp34);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp40);
|
||||
|
||||
if (ABS_ALT(BINANG_SUB(this->actor.world.rot.y, door->dyna.actor.shape.rot.y)) <= 0x4000) {
|
||||
if (ABS_ALT(BINANG_SUB(this->actor.world.rot.y, door->knobDoor.dyna.actor.shape.rot.y)) <= 0x4000) {
|
||||
this->unk_2A4 = -75;
|
||||
} else {
|
||||
this->unk_2A4 = 75;
|
||||
@@ -735,7 +735,7 @@ s32 func_80BF2470(EnIg* this, PlayState* play) {
|
||||
s32 pad;
|
||||
|
||||
if (!SubS_InCsMode(play) && (this->timePathTimeSpeed != 0)) {
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
if ((door != NULL) && (door->knobDoor.dyna.actor.update != NULL)) {
|
||||
if (((f32)this->unk_3E2 / this->unk_3E0) <= 0.9f) {
|
||||
door->unk_1A7 = this->unk_2A4;
|
||||
} else {
|
||||
|
||||
@@ -377,7 +377,7 @@ void EnJs_TakeMask(s32 itemActions, s32 childType) {
|
||||
s32 temp = 0;
|
||||
|
||||
if ((childType >= 0) && (childType < 9)) {
|
||||
itemActions -= PLAYER_IA_MASK_TRUTH;
|
||||
itemActions -= PLAYER_IA_MASK_MIN;
|
||||
childType *= 3;
|
||||
if (itemActions < 8) {
|
||||
masksGivenOnMoon[childType] |= 1 << itemActions;
|
||||
@@ -543,7 +543,7 @@ void func_80969748(EnJs* this, PlayState* play) {
|
||||
}
|
||||
if (itemAction > PLAYER_IA_NONE) {
|
||||
Message_CloseTextbox(play);
|
||||
if ((itemAction >= PLAYER_IA_MASK_TRUTH) && (itemAction <= PLAYER_IA_MASK_GIANT)) {
|
||||
if ((itemAction >= PLAYER_IA_MASK_MIN) && (itemAction < PLAYER_IA_MASK_TRANSFORMATION_MIN)) {
|
||||
EnJs_TakeMask(itemAction, ENJS_GET_TYPE(&this->actor));
|
||||
Inventory_UnequipItem(itemAction - 4);
|
||||
if (!func_809692A8(ENJS_GET_TYPE(&this->actor))) {
|
||||
@@ -551,7 +551,7 @@ void func_80969748(EnJs* this, PlayState* play) {
|
||||
} else {
|
||||
player->actor.textId = 0x2213;
|
||||
}
|
||||
} else if ((itemAction >= PLAYER_IA_MASK_FIERCE_DEITY) && (itemAction <= PLAYER_IA_MASK_DEKU)) {
|
||||
} else if ((itemAction >= PLAYER_IA_MASK_TRANSFORMATION_MIN) && (itemAction <= PLAYER_IA_MASK_MAX)) {
|
||||
player->actor.textId = 0x2211;
|
||||
} else {
|
||||
player->actor.textId = 0x2210;
|
||||
@@ -692,7 +692,7 @@ void func_80969C54(EnJs* this, PlayState* play) {
|
||||
|
||||
if (itemAction > PLAYER_IA_NONE) {
|
||||
Message_CloseTextbox(play);
|
||||
if ((itemAction >= PLAYER_IA_MASK_TRUTH) && (itemAction <= PLAYER_IA_MASK_GIANT)) {
|
||||
if ((itemAction >= PLAYER_IA_MASK_MIN) && (itemAction < PLAYER_IA_MASK_TRANSFORMATION_MIN)) {
|
||||
EnJs_TakeMask(itemAction, ENJS_GET_TYPE(&this->actor));
|
||||
Inventory_UnequipItem(itemAction - 4);
|
||||
if (!func_809692A8(ENJS_GET_TYPE(&this->actor))) {
|
||||
@@ -700,7 +700,7 @@ void func_80969C54(EnJs* this, PlayState* play) {
|
||||
} else {
|
||||
player->actor.textId = 0x2222;
|
||||
}
|
||||
} else if ((itemAction >= PLAYER_IA_MASK_FIERCE_DEITY) && (itemAction <= PLAYER_IA_MASK_DEKU)) {
|
||||
} else if ((itemAction >= PLAYER_IA_MASK_TRANSFORMATION_MIN) && (itemAction <= PLAYER_IA_MASK_MAX)) {
|
||||
player->actor.textId = 0x2220;
|
||||
} else {
|
||||
player->actor.textId = 0x221D;
|
||||
|
||||
@@ -902,7 +902,8 @@ void func_80B872F4(EnKaizoku* this, PlayState* play) {
|
||||
if ((this->lookTimer == 0) && !func_80B85858(this, play) && !func_80B85A00(this, play, false)) {
|
||||
s16 yawDiff = this->picto.actor.yawTowardsPlayer - this->picto.actor.shape.rot.y;
|
||||
|
||||
if ((this->picto.actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != 0) && (yawDiff >= 0x1F40)) {
|
||||
if ((this->picto.actor.xzDistToPlayer < 100.0f) && (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
(yawDiff >= 0x1F40)) {
|
||||
this->picto.actor.shape.rot.y = this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer;
|
||||
func_80B88CD8(this);
|
||||
} else if (Actor_IsFacingPlayer(&this->picto.actor, 0xBB8)) {
|
||||
@@ -1285,7 +1286,8 @@ void func_80B88378(EnKaizoku* this, PlayState* play) {
|
||||
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
sp2A = ABS_ALT(player->actor.shape.rot.y - this->picto.actor.shape.rot.y);
|
||||
if (this->picto.actor.xzDistToPlayer < 150.0f && player->meleeWeaponState != 0 && sp2A >= 0x2000) {
|
||||
if ((this->picto.actor.xzDistToPlayer < 150.0f) && (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
(sp2A >= 0x2000)) {
|
||||
this->picto.actor.shape.rot.y = this->picto.actor.world.rot.y = this->picto.actor.yawTowardsPlayer;
|
||||
if (Rand_ZeroOne() > 0.7f) {
|
||||
func_80B88CD8(this);
|
||||
@@ -1938,8 +1940,8 @@ void func_80B89A08(EnKaizoku* this, PlayState* play) {
|
||||
pos.z = this->bodyCollider.info.bumper.hitPos.z;
|
||||
|
||||
if (player->transformation != PLAYER_FORM_HUMAN) {
|
||||
player->unk_B84 = this->picto.actor.yawTowardsPlayer;
|
||||
player->unk_B80 = 15.0f;
|
||||
player->pushedYaw = this->picto.actor.yawTowardsPlayer;
|
||||
player->pushedSpeed = 15.0f;
|
||||
}
|
||||
|
||||
this->bodyCollider.base.acFlags &= ~AC_HIT;
|
||||
|
||||
@@ -359,8 +359,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((player->meleeWeaponState != 0) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
|
||||
if ((player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) ||
|
||||
(player->stateFlags3 & PLAYER_STATE3_8000000) || (player->stateFlags2 & PLAYER_STATE2_80000)) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
@@ -370,7 +370,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((player->meleeWeaponState != 0) || (player->stateFlags2 & PLAYER_STATE2_80000)) {
|
||||
if ((player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
|
||||
return 1;
|
||||
}
|
||||
break;
|
||||
@@ -380,8 +381,8 @@ s32 func_80B26BF8(EnKendoJs* this, PlayState* play) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((player->meleeWeaponState != 0) || (player->stateFlags3 & PLAYER_STATE3_8000000) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_80000)) {
|
||||
if ((player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) ||
|
||||
(player->stateFlags3 & PLAYER_STATE3_8000000) || (player->stateFlags2 & PLAYER_STATE2_80000)) {
|
||||
return 1;
|
||||
}
|
||||
this->unk_28E = 0;
|
||||
|
||||
@@ -144,7 +144,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play) {
|
||||
this->isCharging = false;
|
||||
|
||||
if (CHECK_WEEKEVENTREG(WEEKEVENTREG_23_02)) {
|
||||
player->unk_B08[0] = 1.0f;
|
||||
player->unk_B08 = 1.0f;
|
||||
this->collider.info.toucher.damage = sDamages[this->type + ENMTHUNDER_TYPE_MAX];
|
||||
this->subtype = ENMTHUNDER_SUBTYPE_SPIN_GREAT;
|
||||
if (this->type == ENMTHUNDER_TYPE_GREAT_FAIRY_SWORD) {
|
||||
@@ -155,7 +155,7 @@ void EnMThunder_Init(Actor* thisx, PlayState* play) {
|
||||
this->scaleTarget = 3;
|
||||
}
|
||||
} else {
|
||||
player->unk_B08[0] = 0.5f;
|
||||
player->unk_B08 = 0.5f;
|
||||
this->collider.info.toucher.damage = sDamages[this->type];
|
||||
this->subtype = ENMTHUNDER_SUBTYPE_SPIN_REGULAR;
|
||||
if (this->type == ENMTHUNDER_TYPE_GREAT_FAIRY_SWORD) {
|
||||
@@ -229,11 +229,11 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) {
|
||||
Player* player = GET_PLAYER(play);
|
||||
Actor* child = this->actor.child;
|
||||
|
||||
this->unk1B0 = player->unk_B08[0];
|
||||
this->unk1B0 = player->unk_B08;
|
||||
this->actor.world.pos = player->bodyPartsPos[0];
|
||||
this->actor.shape.rot.y = player->actor.shape.rot.y + 0x8000;
|
||||
|
||||
if (!this->isCharging && (player->unk_B08[0] >= 0.1f)) {
|
||||
if (!this->isCharging && (player->unk_B08 >= 0.1f)) {
|
||||
if ((gSaveContext.magicState != MAGIC_STATE_IDLE) ||
|
||||
((ENMTHUNDER_GET_MAGIC_COST(&this->actor) != 0) &&
|
||||
!Magic_Consume(play, ENMTHUNDER_GET_MAGIC_COST(&this->actor), MAGIC_CONSUME_WAIT_PREVIEW))) {
|
||||
@@ -247,8 +247,8 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) {
|
||||
this->isCharging = true;
|
||||
}
|
||||
|
||||
if (player->unk_B08[0] >= 0.1f) {
|
||||
Rumble_Request(0.0f, (s32)(player->unk_B08[0] * 150.0f), 2, (s32)(player->unk_B08[0] * 150.0f));
|
||||
if (player->unk_B08 >= 0.1f) {
|
||||
Rumble_Request(0.0f, (s32)(player->unk_B08 * 150.0f), 2, (s32)(player->unk_B08 * 150.0f));
|
||||
}
|
||||
|
||||
if (player->stateFlags2 & PLAYER_STATE2_20000) {
|
||||
@@ -256,8 +256,8 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) {
|
||||
child->parent = NULL;
|
||||
}
|
||||
|
||||
if (player->unk_B08[0] <= 0.15f) {
|
||||
if ((player->unk_B08[0] >= 0.1f) && (player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H)) {
|
||||
if (player->unk_B08 <= 0.15f) {
|
||||
if ((player->unk_B08 >= 0.1f) && (player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H)) {
|
||||
AudioSfx_PlaySfx(NA_SE_IT_ROLLING_CUT, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
AudioSfx_PlaySfx(NA_SE_IT_SWORD_SWING_HARD, &player->actor.projectedPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
@@ -273,7 +273,7 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) {
|
||||
gSaveContext.magicState = MAGIC_STATE_CONSUME_SETUP;
|
||||
}
|
||||
|
||||
if (player->unk_B08[0] < 0.85f) {
|
||||
if (player->unk_B08 < 0.85f) {
|
||||
this->collider.info.toucher.damage = sDamages[this->type];
|
||||
this->subtype = ENMTHUNDER_SUBTYPE_SPIN_REGULAR;
|
||||
if (this->type == ENMTHUNDER_TYPE_GREAT_FAIRY_SWORD) {
|
||||
@@ -320,26 +320,26 @@ void EnMThunder_Charge(EnMThunder* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (player->unk_B08[0] > 0.15f) {
|
||||
if (player->unk_B08 > 0.15f) {
|
||||
this->chargingAlpha = 255;
|
||||
if (this->actor.child == NULL) {
|
||||
Actor_SpawnAsChild(&play->actorCtx, &this->actor, play, ACTOR_EFF_DUST, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, this->actor.shape.rot.y, 0,
|
||||
EFF_DUST_TYPE_SPIN_ATTACK_CHARGE);
|
||||
}
|
||||
this->adjustLightsArg1 += (((player->unk_B08[0] - 0.15f) * 1.5f) - this->adjustLightsArg1) * 0.5f;
|
||||
} else if (player->unk_B08[0] > .1f) {
|
||||
this->chargingAlpha = (s32)((player->unk_B08[0] - .1f) * 255.0f * 20.0f);
|
||||
this->lightColorFrac = (player->unk_B08[0] - .1f) * 10.0f;
|
||||
this->adjustLightsArg1 += (((player->unk_B08 - 0.15f) * 1.5f) - this->adjustLightsArg1) * 0.5f;
|
||||
} else if (player->unk_B08 > .1f) {
|
||||
this->chargingAlpha = (s32)((player->unk_B08 - .1f) * 255.0f * 20.0f);
|
||||
this->lightColorFrac = (player->unk_B08 - .1f) * 10.0f;
|
||||
} else {
|
||||
this->chargingAlpha = 0;
|
||||
}
|
||||
|
||||
if (player->unk_B08[0] > 0.85f) {
|
||||
if (player->unk_B08 > 0.85f) {
|
||||
func_8019F900(&player->actor.projectedPos, 2);
|
||||
} else if (player->unk_B08[0] > 0.15f) {
|
||||
} else if (player->unk_B08 > 0.15f) {
|
||||
func_8019F900(&player->actor.projectedPos, 1);
|
||||
} else if (player->unk_B08[0] > 0.1f) {
|
||||
} else if (player->unk_B08 > 0.1f) {
|
||||
func_8019F900(&player->actor.projectedPos, 0);
|
||||
}
|
||||
|
||||
@@ -540,7 +540,7 @@ void EnMThunder_Draw(Actor* thisx, PlayState* play2) {
|
||||
break;
|
||||
}
|
||||
|
||||
Matrix_Mult(&player->mf_CC4, MTXMODE_NEW);
|
||||
Matrix_Mult(&player->leftHandMf, MTXMODE_NEW);
|
||||
|
||||
if (this->type == ENMTHUNDER_TYPE_GILDED_SWORD) {
|
||||
Matrix_Translate(0.0f, 220.0f, 0.0f, MTXMODE_APPLY);
|
||||
|
||||
@@ -491,11 +491,11 @@ s32 func_80B37B78(EnMaruta* this, PlayState* play) {
|
||||
s16 temp_v1 = BINANG_SUB(this->actor.yawTowardsPlayer, 0x8000);
|
||||
|
||||
temp_v1 = BINANG_SUB(temp_v1, player->actor.shape.rot.y);
|
||||
if ((ABS_ALT(temp_v1) < 0x1555) ||
|
||||
((player->meleeWeaponState != 0) && ((player->meleeWeaponAnimation == PLAYER_MWA_RIGHT_SLASH_1H) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_RIGHT_COMBO_1H) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_SPIN_ATTACK_1H) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_BIG_SPIN_1H)))) {
|
||||
if ((ABS_ALT(temp_v1) < 0x1555) || ((player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
((player->meleeWeaponAnimation == PLAYER_MWA_RIGHT_SLASH_1H) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_RIGHT_COMBO_1H) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_SPIN_ATTACK_1H) ||
|
||||
(player->meleeWeaponAnimation == PLAYER_MWA_BIG_SPIN_1H)))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
* Description: Seahorse
|
||||
*/
|
||||
|
||||
#include "prevent_bss_reordering.h"
|
||||
#include "z_en_ot.h"
|
||||
#include "objects/object_ot/object_ot.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
@@ -660,8 +660,9 @@ void func_80898654(EnPeehat* this) {
|
||||
|
||||
void func_808986A4(EnPeehat* this, PlayState* play) {
|
||||
if (this->unk_2B0 == 5) {
|
||||
EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x602, 0);
|
||||
EnBom* bomb =
|
||||
(EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, BOMB_EXPLOSIVE_TYPE_BOMB, 0, 0x602, BOMB_TYPE_BODY);
|
||||
|
||||
if (bomb != NULL) {
|
||||
bomb->timer = 0;
|
||||
|
||||
@@ -1242,7 +1242,7 @@ s32 func_80AF9008(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
this->timePath = SubS_GetAdditionalPath(play, sp55, D_80AFB430[scheduleOutput->result]);
|
||||
}
|
||||
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
if ((door != NULL) && (door->knobDoor.dyna.actor.update != NULL)) {
|
||||
if (this->timePath != 0) {
|
||||
sp4C = Lib_SegmentedToVirtual(this->timePath->points);
|
||||
Math_Vec3s_ToVec3f(&sp40, &sp4C[0]);
|
||||
@@ -1251,7 +1251,7 @@ s32 func_80AF9008(EnPm* this, PlayState* play, ScheduleOutput* scheduleOutput) {
|
||||
Math_Vec3f_Copy(&this->unk_278, &sp34);
|
||||
this->actor.world.rot.y = Math_Vec3f_Yaw(&sp40, &sp34);
|
||||
Math_Vec3f_Copy(&this->actor.world.pos, &sp40);
|
||||
temp = this->actor.world.rot.y - door->dyna.actor.shape.rot.y;
|
||||
temp = this->actor.world.rot.y - door->knobDoor.dyna.actor.shape.rot.y;
|
||||
if (ABS_ALT(temp) <= 0x4000) {
|
||||
this->unk_260 = -0x4B;
|
||||
} else {
|
||||
@@ -1704,7 +1704,7 @@ s32 func_80AF9D04(EnPm* this, PlayState* play) {
|
||||
f32 temp;
|
||||
|
||||
if (!SubS_InCsMode(play) && (this->timePathTimeSpeed != 0)) {
|
||||
if ((door != NULL) && (door->dyna.actor.update != NULL)) {
|
||||
if ((door != NULL) && (door->knobDoor.dyna.actor.update != NULL)) {
|
||||
if (((f32)this->unk_36E / this->unk_36C) <= 0.9f) {
|
||||
door->unk_1A7 = this->unk_260;
|
||||
} else {
|
||||
|
||||
@@ -243,7 +243,8 @@ void EnPoSisters_MatchPlayerXZ(EnPoSisters* this, PlayState* play) {
|
||||
f32 dist;
|
||||
|
||||
if (this->megCloneId == POE_SISTERS_MEG_REAL || this->actionFunc != EnPoSisters_DamageFlinch) {
|
||||
if ((player->meleeWeaponState == 0 || player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) &&
|
||||
if ((player->meleeWeaponState == PLAYER_MELEE_WEAPON_STATE_0 ||
|
||||
player->meleeWeaponAnimation >= PLAYER_MWA_SPIN_ATTACK_1H) &&
|
||||
((player->actor.world.pos.y - player->actor.floorHeight) < 1.0f)) {
|
||||
Math_StepToF(&this->megDistToPlayer, 110.0f, 3.0f);
|
||||
} else {
|
||||
|
||||
@@ -740,8 +740,9 @@ void EnRat_Bounced(EnRat* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnRat_Explode(EnRat* this, PlayState* play) {
|
||||
EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0, BOMB_TYPE_BODY);
|
||||
EnBom* bomb =
|
||||
(EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, BOMB_EXPLOSIVE_TYPE_BOMB, 0, 0, BOMB_TYPE_BODY);
|
||||
|
||||
if (bomb != NULL) {
|
||||
bomb->timer = 0;
|
||||
|
||||
@@ -589,8 +589,8 @@ void func_80BF4AB8(EnRg* this, PlayState* play) {
|
||||
this->unk_326 = 0x28;
|
||||
if (player->stateFlags3 & PLAYER_STATE3_1000) {
|
||||
player->linearVelocity *= 0.5f;
|
||||
player->unk_B08[0] = player->linearVelocity;
|
||||
player->unk_B08[1] += player->linearVelocity * 0.05f;
|
||||
player->unk_B08 = player->linearVelocity;
|
||||
player->unk_B0C += player->linearVelocity * 0.05f;
|
||||
if (BINANG_SUB(this->actor.yawTowardsPlayer, player->currentYaw) > 0) {
|
||||
player->currentYaw += 0x2000;
|
||||
} else {
|
||||
|
||||
@@ -93,11 +93,11 @@ void EnStream_SuckPlayer(EnStream* this, PlayState* play) {
|
||||
this->actor.scale.y) != EN_STREAM_PLAYER_OUTSIDE_RANGE) {
|
||||
xzDist = sqrtf(SQ(posDifference.x) + SQ(posDifference.z));
|
||||
yDistWithOffset = player->actor.world.pos.y - (this->actor.world.pos.y - 90.0f);
|
||||
player->unk_B84 = Math_Atan2S(-posDifference.x, -posDifference.z);
|
||||
player->pushedYaw = Math_Atan2S(-posDifference.x, -posDifference.z);
|
||||
if (xzDist > 3.0f) {
|
||||
Math_SmoothStepToF(&player->unk_B80, 3.0f, 0.5f, xzDist, 0.0f);
|
||||
Math_SmoothStepToF(&player->pushedSpeed, 3.0f, 0.5f, xzDist, 0.0f);
|
||||
} else {
|
||||
player->unk_B80 = 0.0f;
|
||||
player->pushedSpeed = 0.0f;
|
||||
Math_SmoothStepToF(&player->actor.world.pos.x, this->actor.world.pos.x, 0.5f, 3.0f, 0.0f);
|
||||
Math_SmoothStepToF(&player->actor.world.pos.z, this->actor.world.pos.z, 0.5f, 3.0f, 0.0f);
|
||||
}
|
||||
|
||||
@@ -589,13 +589,13 @@ s32 func_80A3F384(EnTest3* this, PlayState* play) {
|
||||
EnDoor* door = (EnDoor*)func_80A3F2BC(play, this, ACTOR_EN_DOOR, ACTORCAT_DOOR, 55.0f, 20.0f);
|
||||
Vec3f offset;
|
||||
|
||||
if ((door != NULL) && (door->unk_1A1 == 0) &&
|
||||
((player->doorType == 0) || (&door->dyna.actor != player->doorActor)) &&
|
||||
Actor_ActorAIsFacingActorB(&this->player.actor, &door->dyna.actor, 0x3000)) {
|
||||
Actor_OffsetOfPointInActorCoords(&door->dyna.actor, &offset, &this->player.actor.world.pos);
|
||||
this->player.doorType = 1;
|
||||
if ((door != NULL) && !door->knobDoor.playOpenAnim &&
|
||||
((player->doorType == PLAYER_DOORTYPE_NONE) || (&door->knobDoor.dyna.actor != player->doorActor)) &&
|
||||
Actor_ActorAIsFacingActorB(&this->player.actor, &door->knobDoor.dyna.actor, 0x3000)) {
|
||||
Actor_OffsetOfPointInActorCoords(&door->knobDoor.dyna.actor, &offset, &this->player.actor.world.pos);
|
||||
this->player.doorType = PLAYER_DOORTYPE_HANDLE;
|
||||
this->player.doorDirection = (offset.z >= 0.0f) ? 1.0f : -1.0f;
|
||||
this->player.doorActor = &door->dyna.actor;
|
||||
this->player.doorActor = &door->knobDoor.dyna.actor;
|
||||
this->player.csId = CS_ID_NONE;
|
||||
return true;
|
||||
}
|
||||
@@ -1103,7 +1103,7 @@ s32 EnTest3_OverrideLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList, Vec3f*
|
||||
pos->z *= this->player.ageProperties->unk_08;
|
||||
}
|
||||
if (!(this->player.skelAnime.moveFlags & ANIM_FLAG_4) ||
|
||||
(this->player.skelAnime.moveFlags & ANIM_FLAG_UPDATEY)) {
|
||||
(this->player.skelAnime.moveFlags & ANIM_FLAG_UPDATE_Y)) {
|
||||
pos->y *= this->player.ageProperties->unk_08;
|
||||
}
|
||||
pos->y -= this->player.unk_AB8;
|
||||
@@ -1176,8 +1176,8 @@ void EnTest3_PostLimbDraw(PlayState* play, s32 limbIndex, Gfx** dList1, Gfx** dL
|
||||
leftHandActor->world.rot.y = this->player.actor.shape.rot.y + this->player.leftHandWorld.rot.y;
|
||||
leftHandActor->shape.rot.y = leftHandActor->world.rot.y;
|
||||
} else {
|
||||
Matrix_Get(&this->player.mf_CC4);
|
||||
Matrix_MtxFToYXZRot(&this->player.mf_CC4, &this->player.leftHandWorld.rot, false);
|
||||
Matrix_Get(&this->player.leftHandMf);
|
||||
Matrix_MtxFToYXZRot(&this->player.leftHandMf, &this->player.leftHandWorld.rot, false);
|
||||
func_80126B8C(play, &this->player);
|
||||
}
|
||||
|
||||
|
||||
@@ -471,7 +471,7 @@ s32 func_80AECE60(EnTk* this, PlayState* play) {
|
||||
if ((door != NULL) && (this->unk_2CA & 0x400)) {
|
||||
Vec3f sp5C;
|
||||
|
||||
Actor_OffsetOfPointInActorCoords(&this->actor, &sp5C, &door->dyna.actor.world.pos);
|
||||
Actor_OffsetOfPointInActorCoords(&this->actor, &sp5C, &door->knobDoor.dyna.actor.world.pos);
|
||||
door->unk_1A7 = 2;
|
||||
if (sp5C.z < -20.0f) {
|
||||
this->unk_2CA &= ~0x400;
|
||||
|
||||
@@ -214,7 +214,7 @@ void func_80BA383C(EnToto* this, PlayState* play) {
|
||||
}
|
||||
Animation_PlayOnce(&this->skelAnime, D_80BA5078[this->unk2B4]);
|
||||
}
|
||||
func_800BBB74(this->unk260, 0x14, 0x50, 3);
|
||||
func_800BBB74(&this->blinkInfo, 20, 80, 3);
|
||||
}
|
||||
|
||||
void func_80BA3930(EnToto* this, PlayState* play) {
|
||||
@@ -316,7 +316,7 @@ void func_80BA3D38(EnToto* this, PlayState* play) {
|
||||
this->text = ENTOTO_WEEK_EVENT_FLAGS ? D_80BA50BC : D_80BA5088;
|
||||
func_80BA4C0C(this, play);
|
||||
play->actorCtx.flags |= ACTORCTX_FLAG_5;
|
||||
this->unk260[0] = 0;
|
||||
this->blinkInfo.eyeTexIndex = 0;
|
||||
}
|
||||
|
||||
void func_80BA3DBC(EnToto* this, PlayState* play) {
|
||||
@@ -586,6 +586,7 @@ s32 func_80BA47E0(EnToto* this, PlayState* play) {
|
||||
for (i = 0; i < ARRAY_COUNT(D_80BA50DC); i++) {
|
||||
if (gSaveContext.save.playerForm != (i + 1) && (D_80BA5128[i] & this->unk2B3)) {
|
||||
Math_Vec3s_ToVec3f(&spawnPos, &D_80BA50DC[i].unk6);
|
||||
|
||||
Actor_Spawn(&play->actorCtx, play, ACTOR_PLAYER, spawnPos.x, spawnPos.y, spawnPos.z, i + 2, 0, 0,
|
||||
PLAYER_PARAMS(0xFF, PLAYER_INITMODE_F) | 0xFFFFF000);
|
||||
}
|
||||
@@ -728,7 +729,7 @@ void EnToto_Draw(Actor* thisx, PlayState* play) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sp4C[this->unk260[0]]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sp4C[this->blinkInfo.eyeTexIndex]));
|
||||
Scene_SetRenderModeXlu(play, 0, 1);
|
||||
SkelAnime_DrawFlexOpa(play, this->skelAnime.skeleton, this->skelAnime.jointTable, this->skelAnime.dListCount, NULL,
|
||||
NULL, &this->actor);
|
||||
|
||||
@@ -26,7 +26,7 @@ typedef struct EnToto {
|
||||
/* 0x144 */ SkelAnime skelAnime;
|
||||
/* 0x188 */ Vec3s jointTable[18];
|
||||
/* 0x1F4 */ Vec3s morphTable[18];
|
||||
/* 0x260 */ s16 unk260[2];
|
||||
/* 0x260 */ BlinkInfo blinkInfo;
|
||||
/* 0x264 */ ColliderCylinder collider;
|
||||
/* 0x2B0 */ u8 actionFuncIndex;
|
||||
/* 0x2B1 */ u8 unk2B1;
|
||||
|
||||
@@ -391,8 +391,9 @@ void func_808CCCF0(EnVm* this, PlayState* play) {
|
||||
|
||||
this->unk_214--;
|
||||
if (this->unk_214 == 1) {
|
||||
EnBom* bomb = (EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x,
|
||||
this->actor.world.pos.y, this->actor.world.pos.z, 0, 0, 0x6FF, 0);
|
||||
EnBom* bomb =
|
||||
(EnBom*)Actor_Spawn(&play->actorCtx, play, ACTOR_EN_BOM, this->actor.world.pos.x, this->actor.world.pos.y,
|
||||
this->actor.world.pos.z, BOMB_EXPLOSIVE_TYPE_BOMB, 0, 0x6FF, BOMB_TYPE_BODY);
|
||||
|
||||
if (bomb != NULL) {
|
||||
bomb->timer = 0;
|
||||
|
||||
@@ -616,7 +616,8 @@ void func_80991280(EnWf* this, PlayState* play) {
|
||||
|
||||
if (!func_8099408C(play, this) && !func_80990948(play, this, 0)) {
|
||||
phi_v1 = ABS_ALT(BINANG_SUB(player->actor.shape.rot.y, this->actor.shape.rot.y));
|
||||
if ((this->actor.xzDistToPlayer < 80.0f) && (player->meleeWeaponState != 0) && (phi_v1 >= 0x1F40)) {
|
||||
if ((this->actor.xzDistToPlayer < 80.0f) && (player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) &&
|
||||
(phi_v1 >= 0x1F40)) {
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
func_80991948(this);
|
||||
@@ -666,7 +667,8 @@ void func_8099149C(EnWf* this, PlayState* play) {
|
||||
|
||||
sp28 = ABS_ALT(BINANG_SUB(player->actor.shape.rot.y, this->actor.shape.rot.y));
|
||||
|
||||
if ((this->actor.xzDistToPlayer < (150.0f + sp2C)) && (player->meleeWeaponState != 0) && (sp28 >= 0x1F40)) {
|
||||
if ((this->actor.xzDistToPlayer < (150.0f + sp2C)) &&
|
||||
(player->meleeWeaponState != PLAYER_MELEE_WEAPON_STATE_0) && (sp28 >= 0x1F40)) {
|
||||
this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
if (Rand_ZeroOne() > 0.7f) {
|
||||
|
||||
@@ -184,8 +184,8 @@ void func_80B9C5E8(ObjHunsui* this, PlayState* play) {
|
||||
Math_ApproachF(&this->unk_1A0, 3.0f, 1.0f, 1.0f);
|
||||
Math_ApproachF(&this->unk_19C, this->unk_1A0, 1.0f, 0.1f);
|
||||
}
|
||||
player->unk_B84 = this->unk_1A4;
|
||||
player->unk_B80 = this->unk_19C;
|
||||
player->pushedYaw = this->unk_1A4;
|
||||
player->pushedSpeed = this->unk_19C;
|
||||
}
|
||||
} else {
|
||||
if (this->unk_172 & 8) {
|
||||
|
||||
+20188
-1287
File diff suppressed because it is too large
Load Diff
@@ -58,7 +58,7 @@ u32 EffectSsGSplash_Init(PlayState* play, u32 index, EffectSs* this, void* initP
|
||||
this->rType = initParams->type;
|
||||
} else {
|
||||
switch (initParams->type) {
|
||||
case 0:
|
||||
case EFFSSGSPLASH_TYPE_0:
|
||||
this->rgPrimColorR = 255;
|
||||
this->rgPrimColorG = 255;
|
||||
this->rgPrimColorB = 255;
|
||||
@@ -67,9 +67,9 @@ u32 EffectSsGSplash_Init(PlayState* play, u32 index, EffectSs* this, void* initP
|
||||
this->rgEnvColorG = 255;
|
||||
this->rgEnvColorB = 255;
|
||||
this->rgEnvColorA = 200;
|
||||
this->rType = 0;
|
||||
this->rType = EFFSSGSPLASH_TYPE_0;
|
||||
break;
|
||||
case 1:
|
||||
case EFFSSGSPLASH_TYPE_1:
|
||||
this->rgPrimColorR = 255;
|
||||
this->rgPrimColorG = 255;
|
||||
this->rgPrimColorB = 255;
|
||||
@@ -78,9 +78,9 @@ u32 EffectSsGSplash_Init(PlayState* play, u32 index, EffectSs* this, void* initP
|
||||
this->rgEnvColorG = 255;
|
||||
this->rgEnvColorB = 255;
|
||||
this->rgEnvColorA = 255;
|
||||
this->rType = 1;
|
||||
this->rType = EFFSSGSPLASH_TYPE_1;
|
||||
break;
|
||||
case 2:
|
||||
case EFFSSGSPLASH_TYPE_2:
|
||||
this->rgPrimColorR = 255;
|
||||
this->rgPrimColorG = 255;
|
||||
this->rgPrimColorB = 255;
|
||||
@@ -89,7 +89,7 @@ u32 EffectSsGSplash_Init(PlayState* play, u32 index, EffectSs* this, void* initP
|
||||
this->rgEnvColorG = 255;
|
||||
this->rgEnvColorB = 255;
|
||||
this->rgEnvColorA = 200;
|
||||
this->rType = 2;
|
||||
this->rType = EFFSSGSPLASH_TYPE_2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -100,7 +100,7 @@ void EffectSsGSplash_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
s16 texIndex;
|
||||
|
||||
switch (this->rType) {
|
||||
case 0:
|
||||
case EFFSSGSPLASH_TYPE_0:
|
||||
texIndex = this->rgTexIndex / 100;
|
||||
if (texIndex > 7) {
|
||||
texIndex = 7;
|
||||
@@ -108,7 +108,7 @@ void EffectSsGSplash_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
EffectSs_DrawGEffect(play, this, waterSplashTextures[texIndex]);
|
||||
break;
|
||||
|
||||
case 1:
|
||||
case EFFSSGSPLASH_TYPE_1:
|
||||
texIndex = this->rgTexIndex / 100;
|
||||
if (texIndex > 7) {
|
||||
texIndex = 7;
|
||||
@@ -116,7 +116,7 @@ void EffectSsGSplash_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
EffectSs_DrawGEffect(play, this, waterSplashTextures[texIndex]);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
case EFFSSGSPLASH_TYPE_2:
|
||||
texIndex = this->rgTexIndex / 100;
|
||||
if (texIndex > 7) {
|
||||
texIndex = 7;
|
||||
@@ -129,7 +129,7 @@ void EffectSsGSplash_Draw(PlayState* play, u32 index, EffectSs* this) {
|
||||
void EffectSsGSplash_Update(PlayState* play, u32 index, EffectSs* this) {
|
||||
Vec3f newSplashPos;
|
||||
|
||||
if ((this->rType == 1) && (this->life == 5)) {
|
||||
if ((this->rType == EFFSSGSPLASH_TYPE_1) && (this->life == 5)) {
|
||||
newSplashPos = this->pos;
|
||||
newSplashPos.y += ((this->rgScale * 20) * 0.002f);
|
||||
EffectSsGSplash_Spawn(play, &newSplashPos, 0, 0, 2, this->rgScale / 2);
|
||||
|
||||
@@ -3,6 +3,12 @@
|
||||
|
||||
#include "global.h"
|
||||
|
||||
typedef enum EffSsGSplashType {
|
||||
/* 0 */ EFFSSGSPLASH_TYPE_0,
|
||||
/* 1 */ EFFSSGSPLASH_TYPE_1,
|
||||
/* 2 */ EFFSSGSPLASH_TYPE_2
|
||||
} EffSsGSplashType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
/* 0x0C */ u8 type;
|
||||
|
||||
@@ -186,9 +186,9 @@ def proper_name(symbol, in_data=False, is_symbol=True):
|
||||
# bg_ikana_mirror symbol with large addend folded into %lo
|
||||
elif symbol == 0x80B80248:
|
||||
return variables_ast[0x80B801A8][0] + f" + 0x{0x80B80248 - 0x80B801A8:X}"
|
||||
# player symbol with very large addend folded into %lo, since we don't know the real symbol just use the first data symbol for now
|
||||
# player symbol with very large addend folded into %lo
|
||||
elif symbol == 0x8084D2FC:
|
||||
return variables_ast[0x8085B9F0][0] + f" - 0x{0x8085B9F0 - 0x8084D2FC:X}"
|
||||
return variables_ast[0x8085D0FA][0] + f" - 0x{0x8085D0FA - 0x8084D2FC:X}"
|
||||
# OS_K0_TO_PHYSICAL on rspS2DEX text and data symbols
|
||||
elif symbol == 0x001ABAB0 or symbol == 0x001E3BB0:
|
||||
return variables_ast[symbol + 0x80000000][0] + " - 0x80000000"
|
||||
|
||||
+70
-70
@@ -4245,14 +4245,14 @@
|
||||
0x80828788:("KaleidoScope_UpdateOpening",),
|
||||
0x8082895C:("KaleidoScope_Update",),
|
||||
0x8082DA90:("func_8082DA90",),
|
||||
0x8082DABC:("func_8082DABC",),
|
||||
0x8082DABC:("Player_StopHorizontalMovement",),
|
||||
0x8082DAD4:("func_8082DAD4",),
|
||||
0x8082DAFC:("func_8082DAFC",),
|
||||
0x8082DB18:("func_8082DB18",),
|
||||
0x8082DB3C:("func_8082DB3C",),
|
||||
0x8082DB18:("Player_AnimationPlayOnce",),
|
||||
0x8082DB3C:("Player_AnimationPlayLoop",),
|
||||
0x8082DB60:("func_8082DB60",),
|
||||
0x8082DB90:("func_8082DB90",),
|
||||
0x8082DBC0:("func_8082DBC0",),
|
||||
0x8082DBC0:("Player_AnimationPlayOnceReverse",),
|
||||
0x8082DC28:("func_8082DC28",),
|
||||
0x8082DC38:("func_8082DC38",),
|
||||
0x8082DC64:("func_8082DC64",),
|
||||
@@ -4262,18 +4262,18 @@
|
||||
0x8082DE50:("func_8082DE50",),
|
||||
0x8082DE88:("func_8082DE88",),
|
||||
0x8082DF2C:("func_8082DF2C",),
|
||||
0x8082DF48:("func_8082DF48",),
|
||||
0x8082DF8C:("func_8082DF8C",),
|
||||
0x8082DF48:("Player_RequestRumble",),
|
||||
0x8082DF8C:("Player_AnimSfx_PlayVoice",),
|
||||
0x8082E00C:("func_8082E00C",),
|
||||
0x8082E078:("func_8082E078",),
|
||||
0x8082E094:("func_8082E094",),
|
||||
0x8082E0CC:("func_8082E0CC",),
|
||||
0x8082E0F4:("func_8082E0F4",),
|
||||
0x8082E12C:("func_8082E12C",),
|
||||
0x8082E188:("func_8082E188",),
|
||||
0x8082E1BC:("func_8082E1BC",),
|
||||
0x8082E078:("Player_GetFloorSfx",),
|
||||
0x8082E094:("Player_AnimSfx_PlayFloor",),
|
||||
0x8082E0CC:("Player_GetFloorSfxByAge",),
|
||||
0x8082E0F4:("Player_AnimSfx_PlayFloorByAge",),
|
||||
0x8082E12C:("Player_AnimSfx_PlayFloorWalk",),
|
||||
0x8082E188:("Player_AnimSfx_PlayFloorJump",),
|
||||
0x8082E1BC:("Player_AnimSfx_PlayFloorLand",),
|
||||
0x8082E1F0:("func_8082E1F0",),
|
||||
0x8082E224:("func_8082E224",),
|
||||
0x8082E224:("Player_PlayAnimSfx",),
|
||||
0x8082E438:("func_8082E438",),
|
||||
0x8082E4A4:("func_8082E4A4",),
|
||||
0x8082E514:("func_8082E514",),
|
||||
@@ -4309,22 +4309,22 @@
|
||||
0x8082EF9C:("func_8082EF9C",),
|
||||
0x8082EFE4:("func_8082EFE4",),
|
||||
0x8082F02C:("func_8082F02C",),
|
||||
0x8082F09C:("func_8082F09C",),
|
||||
0x8082F0E4:("func_8082F0E4",),
|
||||
0x8082F09C:("Player_ResetCylinder",),
|
||||
0x8082F0E4:("Player_SetCylinderForAttack",),
|
||||
0x8082F164:("func_8082F164",),
|
||||
0x8082F1AC:("func_8082F1AC",),
|
||||
0x8082F43C:("func_8082F43C",),
|
||||
0x8082F470:("func_8082F470",),
|
||||
0x8082F524:("func_8082F524",),
|
||||
0x8082F524:("Player_ItemToItemAction",),
|
||||
0x8082F594:("func_8082F594",),
|
||||
0x8082F5A4:("func_8082F5A4",),
|
||||
0x8082F5C0:("func_8082F5C0",),
|
||||
0x8082F5FC:("func_8082F5FC",),
|
||||
0x8082F62C:("func_8082F62C",),
|
||||
0x8082F62C:("Player_SpawnExplosive",),
|
||||
0x8082F7F4:("func_8082F7F4",),
|
||||
0x8082F8A0:("func_8082F8A0",),
|
||||
0x8082F8BC:("func_8082F8BC",),
|
||||
0x8082F938:("func_8082F938",),
|
||||
0x8082F938:("Player_OverrideBlureColors",),
|
||||
0x8082FA5C:("func_8082FA5C",),
|
||||
0x8082FB68:("func_8082FB68",),
|
||||
0x8082FBE8:("func_8082FBE8",),
|
||||
@@ -4359,7 +4359,7 @@
|
||||
0x808313A8:("func_808313A8",),
|
||||
0x808313F0:("func_808313F0",),
|
||||
0x80831454:("func_80831454",),
|
||||
0x80831494:("func_80831494",),
|
||||
0x80831494:("Player_SetAction",),
|
||||
0x8083172C:("func_8083172C",),
|
||||
0x80831760:("func_80831760",),
|
||||
0x808317C4:("func_808317C4",),
|
||||
@@ -4420,16 +4420,16 @@
|
||||
0x808354A4:("func_808354A4",),
|
||||
0x808355D8:("func_808355D8",),
|
||||
0x8083562C:("func_8083562C",),
|
||||
0x80835BC8:("func_80835BC8",),
|
||||
0x80835BC8:("Player_TranslateAndRotateY",),
|
||||
0x80835BF8:("func_80835BF8",),
|
||||
0x80835C64:("func_80835C64",),
|
||||
0x80835C64:("Player_SpawnFairy",),
|
||||
0x80835CD8:("func_80835CD8",),
|
||||
0x80835D2C:("func_80835D2C",),
|
||||
0x80835D58:("func_80835D58",),
|
||||
0x80835DF8:("func_80835DF8",),
|
||||
0x80835EAC:("func_80835EAC",),
|
||||
0x8083604C:("func_8083604C",),
|
||||
0x80836258:("func_80836258",),
|
||||
0x80835EAC:("Player_Door_Staircase",),
|
||||
0x8083604C:("Player_Door_Sliding",),
|
||||
0x80836258:("Player_Door_Knob",),
|
||||
0x808365DC:("func_808365DC",),
|
||||
0x80836888:("func_80836888",),
|
||||
0x8083692C:("func_8083692C",),
|
||||
@@ -4442,7 +4442,7 @@
|
||||
0x80836C70:("func_80836C70",),
|
||||
0x80836D8C:("func_80836D8C",),
|
||||
0x80836DC0:("func_80836DC0",),
|
||||
0x80836EA0:("func_80836EA0",),
|
||||
0x80836EA0:("Player_RequestQuake",),
|
||||
0x80836F10:("func_80836F10",),
|
||||
0x808370D4:("func_808370D4",),
|
||||
0x80837134:("func_80837134",),
|
||||
@@ -4464,7 +4464,7 @@
|
||||
0x808381F8:("func_808381F8",),
|
||||
0x8083827C:("func_8083827C",),
|
||||
0x8083868C:("func_8083868C",),
|
||||
0x80838760:("func_80838760",),
|
||||
0x80838760:("Player_StopCutscene",),
|
||||
0x808387A0:("func_808387A0",),
|
||||
0x80838830:("func_80838830",),
|
||||
0x808388B8:("func_808388B8",),
|
||||
@@ -4500,11 +4500,11 @@
|
||||
0x8083A844:("func_8083A844",),
|
||||
0x8083A878:("func_8083A878",),
|
||||
0x8083A98C:("func_8083A98C",),
|
||||
0x8083AD04:("func_8083AD04",),
|
||||
0x8083AD8C:("func_8083AD8C",),
|
||||
0x8083ADB8:("func_8083ADB8",),
|
||||
0x8083AD04:("Player_InitMode_Telescope",),
|
||||
0x8083AD8C:("Player_InitMode_B",),
|
||||
0x8083ADB8:("Player_InitMode_D",),
|
||||
0x8083ADF0:("func_8083ADF0",),
|
||||
0x8083AE38:("func_8083AE38",),
|
||||
0x8083AE38:("Player_InitMode_F",),
|
||||
0x8083AECC:("func_8083AECC",),
|
||||
0x8083AF30:("func_8083AF30",),
|
||||
0x8083AF8C:("func_8083AF8C",),
|
||||
@@ -4557,7 +4557,7 @@
|
||||
0x8083E958:("func_8083E958",),
|
||||
0x8083E9C4:("func_8083E9C4",),
|
||||
0x8083EA44:("func_8083EA44",),
|
||||
0x8083EBD0:("func_8083EBD0",),
|
||||
0x8083EBD0:("Player_ChooseIdleAnim",),
|
||||
0x8083EE60:("func_8083EE60",),
|
||||
0x8083F144:("func_8083F144",),
|
||||
0x8083F190:("func_8083F190",),
|
||||
@@ -4571,7 +4571,7 @@
|
||||
0x8083FCF0:("func_8083FCF0",),
|
||||
0x8083FD80:("func_8083FD80",),
|
||||
0x8083FE38:("func_8083FE38",),
|
||||
0x8083FE90:("func_8083FE90",),
|
||||
0x8083FE90:("Player_RequestQuakeAndRumble",),
|
||||
0x8083FEF4:("func_8083FEF4",),
|
||||
0x8083FF30:("func_8083FF30",),
|
||||
0x8083FFEC:("func_8083FFEC",),
|
||||
@@ -4590,33 +4590,33 @@
|
||||
0x80840F34:("func_80840F34",),
|
||||
0x80840F90:("func_80840F90",),
|
||||
0x808411D4:("func_808411D4",),
|
||||
0x808412A0:("func_808412A0",),
|
||||
0x808412BC:("func_808412BC",),
|
||||
0x808412A0:("Player_InitMode_0",),
|
||||
0x808412BC:("Player_InitMode_2",),
|
||||
0x80841358:("func_80841358",),
|
||||
0x80841408:("func_80841408",),
|
||||
0x808414E0:("func_808414E0",),
|
||||
0x80841528:("func_80841528",),
|
||||
0x808415A0:("func_808415A0",),
|
||||
0x808415E4:("func_808415E4",),
|
||||
0x80841624:("func_80841624",),
|
||||
0x80841408:("Player_InitMode_1",),
|
||||
0x808414E0:("Player_InitMode_3",),
|
||||
0x80841528:("Player_InitMode_4",),
|
||||
0x808415A0:("Player_InitMode_7",),
|
||||
0x808415E4:("Player_InitMode_5",),
|
||||
0x80841624:("Player_InitMode_6",),
|
||||
0x80841744:("func_80841744",),
|
||||
0x8084182C:("func_8084182C",),
|
||||
0x8084182C:("Player_InitCommon",),
|
||||
0x80841A50:("func_80841A50",),
|
||||
0x80841AC4:("Player_Init",),
|
||||
0x80842510:("func_80842510",),
|
||||
0x808425B4:("func_808425B4",),
|
||||
0x808426F0:("func_808426F0",),
|
||||
0x808426F0:("Player_SetDoAction",),
|
||||
0x808430E0:("func_808430E0",),
|
||||
0x80843178:("func_80843178",),
|
||||
0x80843EC0:("func_80843EC0",),
|
||||
0x80843EC0:("Player_UpdateCamAndSeqModes",),
|
||||
0x808442D8:("func_808442D8",),
|
||||
0x808445C4:("func_808445C4",),
|
||||
0x808446F4:("func_808446F4",),
|
||||
0x808446F4:("Player_DetectSecrets",),
|
||||
0x80844784:("func_80844784",),
|
||||
0x80844D80:("func_80844D80",),
|
||||
0x80844EF8:("func_80844EF8",),
|
||||
0x80844EF8:("Player_UpdateCommon",),
|
||||
0x808460B8:("Player_Update",),
|
||||
0x808463C0:("func_808463C0",),
|
||||
0x808463C0:("Player_DrawGameplay",),
|
||||
0x80846460:("func_80846460",),
|
||||
0x80846528:("Player_Draw",),
|
||||
0x808470D4:("Player_Destroy",),
|
||||
@@ -4834,7 +4834,7 @@
|
||||
0x80859AF8:("func_80859AF8",),
|
||||
0x80859B28:("func_80859B28",),
|
||||
0x80859B54:("func_80859B54",),
|
||||
0x80859BA8:("func_80859BA8",),
|
||||
0x80859BA8:("Player_Cutscene_Translate",),
|
||||
0x80859C60:("func_80859C60",),
|
||||
0x80859CA0:("func_80859CA0",),
|
||||
0x80859CE0:("func_80859CE0",),
|
||||
@@ -4845,7 +4845,7 @@
|
||||
0x80859F4C:("func_80859F4C",),
|
||||
0x80859FCC:("func_80859FCC",),
|
||||
0x80859FF4:("func_80859FF4",),
|
||||
0x8085A04C:("func_8085A04C",),
|
||||
0x8085A04C:("Player_Cutscene_TranslateReverse",),
|
||||
0x8085A120:("func_8085A120",),
|
||||
0x8085A144:("func_8085A144",),
|
||||
0x8085A19C:("func_8085A19C",),
|
||||
@@ -4869,19 +4869,19 @@
|
||||
0x8085AA60:("func_8085AA60",),
|
||||
0x8085AA84:("func_8085AA84",),
|
||||
0x8085AACC:("func_8085AACC",),
|
||||
0x8085AB58:("func_8085AB58",),
|
||||
0x8085ABA8:("func_8085ABA8",),
|
||||
0x8085AB58:("Player_Cutscene_SetPosAndYawToStart",),
|
||||
0x8085ABA8:("Player_Cutscene_8085ABA8",),
|
||||
0x8085AC9C:("func_8085AC9C",),
|
||||
0x8085AD5C:("func_8085AD5C",),
|
||||
0x8085ADA0:("func_8085ADA0",),
|
||||
0x8085B08C:("func_8085B08C",),
|
||||
0x8085B134:("func_8085B134",),
|
||||
0x8085B134:("Player_StartFishing",),
|
||||
0x8085B170:("func_8085B170",),
|
||||
0x8085B1F0:("func_8085B1F0",),
|
||||
0x8085B1F0:("Player_GrabPlayer",),
|
||||
0x8085B28C:("func_8085B28C",),
|
||||
0x8085B384:("func_8085B384",),
|
||||
0x8085B3E0:("func_8085B3E0",),
|
||||
0x8085B460:("func_8085B460",),
|
||||
0x8085B3E0:("Player_InflictDamage",),
|
||||
0x8085B460:("Player_TalkWithPlayer",),
|
||||
0x8085B74C:("func_8085B74C",),
|
||||
0x8085B820:("func_8085B820",),
|
||||
0x8085B854:("func_8085B854",),
|
||||
@@ -8591,24 +8591,24 @@
|
||||
0x8099BE48:("EnCrow_OverrideLimbDraw",),
|
||||
0x8099BF20:("EnCrow_PostLimbDraw",),
|
||||
0x8099BFA4:("EnCrow_Draw",),
|
||||
0x8099C290:("func_8099C290",),
|
||||
0x8099C328:("func_8099C328",),
|
||||
0x8099C41C:("func_8099C41C",),
|
||||
0x8099C290:("EnCow_RotatePoint",),
|
||||
0x8099C328:("EnCow_SetColliderPos",),
|
||||
0x8099C41C:("EnCow_SetTailPos",),
|
||||
0x8099C498:("EnCow_Init",),
|
||||
0x8099C834:("EnCow_Destroy",),
|
||||
0x8099C880:("func_8099C880",),
|
||||
0x8099CAA8:("func_8099CAA8",),
|
||||
0x8099CB20:("func_8099CB20",),
|
||||
0x8099CB68:("func_8099CB68",),
|
||||
0x8099CBCC:("func_8099CBCC",),
|
||||
0x8099CC68:("func_8099CC68",),
|
||||
0x8099CCF8:("func_8099CCF8",),
|
||||
0x8099CDA0:("func_8099CDA0",),
|
||||
0x8099CFAC:("func_8099CFAC",),
|
||||
0x8099C880:("EnCow_UpdateAnimation",),
|
||||
0x8099CAA8:("EnCow_TalkEnd",),
|
||||
0x8099CB20:("EnCow_GiveMilkEnd",),
|
||||
0x8099CB68:("EnCow_GiveMilkWait",),
|
||||
0x8099CBCC:("EnCow_GiveMilk",),
|
||||
0x8099CC68:("EnCow_CheckForEmptyBottle",),
|
||||
0x8099CCF8:("EnCow_Talk",),
|
||||
0x8099CDA0:("EnCow_Idle",),
|
||||
0x8099CFAC:("EnCow_DoTail",),
|
||||
0x8099D144:("EnCow_Update",),
|
||||
0x8099D3C0:("func_8099D3C0",),
|
||||
0x8099D4AC:("func_8099D4AC",),
|
||||
0x8099D4FC:("func_8099D4FC",),
|
||||
0x8099D3C0:("EnCow_UpdateTail",),
|
||||
0x8099D4AC:("EnCow_OverrideLimbDraw",),
|
||||
0x8099D4FC:("EnCow_PostLimbDraw",),
|
||||
0x8099D53C:("EnCow_Draw",),
|
||||
0x8099D59C:("func_8099D59C",),
|
||||
0x8099D780:("OceffWipe4_Init",),
|
||||
|
||||
+60
-125
@@ -4941,52 +4941,9 @@
|
||||
0x8085B9F0:("D_8085B9F0","UNK_TYPE1","",0x1),
|
||||
0x8085BA08:("D_8085BA08","UNK_TYPE1","",0x1),
|
||||
0x8085BA20:("D_8085BA20","UNK_TYPE1","",0x1),
|
||||
0x8085BA38:("D_8085BA38","UNK_TYPE1","",0x1),
|
||||
0x8085BE84:("D_8085BE84","UNK_TYPE1","",0x1),
|
||||
0x8085BE9C:("D_8085BE9C","UNK_TYPE1","",0x1),
|
||||
0x8085BEB4:("D_8085BEB4","UNK_TYPE1","",0x1),
|
||||
0x8085BECC:("D_8085BECC","UNK_TYPE1","",0x1),
|
||||
0x8085BEE4:("D_8085BEE4","UNK_TYPE1","",0x1),
|
||||
0x8085BEFC:("D_8085BEFC","UNK_TYPE1","",0x1),
|
||||
0x8085BF14:("D_8085BF14","UNK_TYPE1","",0x1),
|
||||
0x8085BF44:("D_8085BF44","UNK_TYPE1","",0x1),
|
||||
0x8085BF5C:("D_8085BF5C","UNK_TYPE1","",0x1),
|
||||
0x8085BF74:("D_8085BF74","UNK_TYPE1","",0x1),
|
||||
0x8085BF8C:("D_8085BF8C","UNK_TYPE1","",0x1),
|
||||
0x8085BFA4:("D_8085BFA4","UNK_TYPE1","",0x1),
|
||||
0x8085BFBC:("D_8085BFBC","UNK_TYPE1","",0x1),
|
||||
0x8085BFD4:("D_8085BFD4","UNK_TYPE1","",0x1),
|
||||
0x8085BFEC:("D_8085BFEC","UNK_TYPE1","",0x1),
|
||||
0x8085C004:("D_8085C004","UNK_TYPE1","",0x1),
|
||||
0x8085C01C:("D_8085C01C","UNK_TYPE1","",0x1),
|
||||
0x8085C034:("D_8085C034","UNK_TYPE1","",0x1),
|
||||
0x8085C04C:("D_8085C04C","UNK_TYPE1","",0x1),
|
||||
0x8085C064:("D_8085C064","UNK_TYPE1","",0x1),
|
||||
0x8085C07C:("D_8085C07C","UNK_TYPE1","",0x1),
|
||||
0x8085C094:("D_8085C094","UNK_TYPE1","",0x1),
|
||||
0x8085C0C4:("D_8085C0C4","UNK_TYPE1","",0x1),
|
||||
0x8085C0DC:("D_8085C0DC","UNK_TYPE1","",0x1),
|
||||
0x8085C0F4:("D_8085C0F4","UNK_TYPE1","",0x1),
|
||||
0x8085C10C:("D_8085C10C","UNK_TYPE1","",0x1),
|
||||
0x8085C124:("D_8085C124","UNK_TYPE1","",0x1),
|
||||
0x8085C13C:("D_8085C13C","UNK_TYPE1","",0x1),
|
||||
0x8085C154:("D_8085C154","UNK_TYPE1","",0x1),
|
||||
0x8085C16C:("D_8085C16C","UNK_TYPE1","",0x1),
|
||||
0x8085C184:("D_8085C184","UNK_TYPE1","",0x1),
|
||||
0x8085C19C:("D_8085C19C","UNK_TYPE1","",0x1),
|
||||
0x8085C1B4:("D_8085C1B4","UNK_TYPE1","",0x1),
|
||||
0x8085C1CC:("D_8085C1CC","UNK_TYPE1","",0x1),
|
||||
0x8085C1E4:("D_8085C1E4","UNK_TYPE1","",0x1),
|
||||
0x8085C1FC:("D_8085C1FC","UNK_TYPE1","",0x1),
|
||||
0x8085C214:("D_8085C214","UNK_TYPE1","",0x1),
|
||||
0x8085C22C:("D_8085C22C","UNK_TYPE1","",0x1),
|
||||
0x8085C244:("D_8085C244","UNK_TYPE1","",0x1),
|
||||
0x8085C25C:("D_8085C25C","UNK_TYPE1","",0x1),
|
||||
0x8085C274:("D_8085C274","UNK_TYPE1","",0x1),
|
||||
0x8085C28C:("D_8085C28C","UNK_TYPE1","",0x1),
|
||||
0x8085C2A4:("D_8085C2A4","UNK_TYPE4","",0x4),
|
||||
0x8085C2A8:("D_8085C2A8","UNK_TYPE4","",0x4),
|
||||
0x8085C2AC:("D_8085C2AC","UNK_TYPE4","",0x4),
|
||||
0x8085BA38:("sPlayerAgeProperties","UNK_TYPE1","",0x1),
|
||||
0x8085BE84:("D_8085BE84","LinkAnimationHeader*","[264]",0x420),
|
||||
0x8085C2A4:("D_8085C2A4","struct_8085C2A4","[6]",0x48),
|
||||
0x8085C2EC:("D_8085C2EC","UNK_TYPE1","",0x1),
|
||||
0x8085C318:("D_8085C318","UNK_TYPE1","",0x1),
|
||||
0x8085C344:("D_8085C344","UNK_TYPE1","",0x1),
|
||||
@@ -4994,9 +4951,8 @@
|
||||
0x8085C3E4:("D_8085C3E4","f32","",0x4),
|
||||
0x8085C3E8:("D_8085C3E8","f32","",0x4),
|
||||
0x8085C3EC:("D_8085C3EC","UNK_TYPE2","",0x2),
|
||||
0x8085C3F4:("D_8085C3F4","UNK_TYPE1","",0x1),
|
||||
0x8085C84C:("D_8085C84C","UNK_TYPE4","",0x4),
|
||||
0x8085C850:("D_8085C850","UNK_TYPE4","",0x4),
|
||||
0x8085C3F4:("sGetItemTable","GetItemEntry","[0xB9]",0x456),
|
||||
0x8085C84C:("sPlayerIdleAnimations","UNK_TYPE4","",0x78),
|
||||
0x8085C8C4:("D_8085C8C4","UNK_TYPE1","",0x1),
|
||||
0x8085C8C8:("D_8085C8C8","UNK_TYPE1","",0x1),
|
||||
0x8085C8CC:("D_8085C8CC","UNK_TYPE1","",0x1),
|
||||
@@ -5007,19 +4963,17 @@
|
||||
0x8085C90C:("D_8085C90C","UNK_TYPE1","",0x1),
|
||||
0x8085C91C:("D_8085C91C","UNK_TYPE1","",0x1),
|
||||
0x8085C924:("D_8085C924","UNK_TYPE1","",0x1),
|
||||
0x8085C928:("D_8085C928","UNK_TYPE1","",0x1),
|
||||
0x8085C938:("D_8085C938","UNK_TYPE1","",0x1),
|
||||
0x8085C928:("D_8085C928","UNK_TYPE1","",0x14),
|
||||
0x8085C93C:("D_8085C93C","UNK_TYPE1","",0x1),
|
||||
0x8085C96C:("D_8085C96C","UNK_TYPE1","",0x1),
|
||||
0x8085C98C:("D_8085C98C","UNK_TYPE1","",0x1),
|
||||
0x8085C99C:("D_8085C99C","UNK_TYPE1","",0x1),
|
||||
0x8085C99C:("sItemActionParams","UNK_TYPE1","",0x1),
|
||||
0x8085C9F0:("D_8085C9F0","UNK_PTR","",0x4),
|
||||
0x8085CB3C:("D_8085CB3C","UNK_PTR","",0x4),
|
||||
0x8085CC88:("D_8085CC88","UNK_TYPE1","",0x1),
|
||||
0x8085CD00:("D_8085CD00","UNK_TYPE1","",0x1),
|
||||
0x8085CD24:("D_8085CD24","UNK_TYPE1","",0x1),
|
||||
0x8085CD30:("D_8085CD30","UNK_TYPE1","",0x1),
|
||||
0x8085CE30:("D_8085CE30","UNK_TYPE1","",0x1),
|
||||
0x8085CE60:("D_8085CE60","UNK_TYPE1","",0x1),
|
||||
0x8085CD00:("D_8085CD00","s8","[36]",0x24),
|
||||
0x8085CD24:("sPlayerExplosiveInfo","UNK_TYPE1","",0x1),
|
||||
0x8085CD30:("sMeleeAttackAnimInfo","UNK_TYPE1","",0x220),
|
||||
0x8085CF50:("D_8085CF50","UNK_TYPE1","",0x1),
|
||||
0x8085CF58:("D_8085CF58","UNK_TYPE1","",0x1),
|
||||
0x8085CF60:("D_8085CF60","UNK_TYPE1","",0x1),
|
||||
@@ -5028,10 +4982,10 @@
|
||||
0x8085CF78:("D_8085CF78","UNK_TYPE1","",0x1),
|
||||
0x8085CF80:("D_8085CF80","UNK_TYPE1","",0x1),
|
||||
0x8085CF84:("D_8085CF84","UNK_TYPE1","",0x1),
|
||||
0x8085CF88:("D_8085CF88","UNK_TYPE1","",0x1),
|
||||
0x8085CFA8:("D_8085CFA8","UNK_TYPE2","",0x2),
|
||||
0x8085CFAE:("D_8085CFAE","UNK_TYPE1","",0x1),
|
||||
0x8085CFB8:("D_8085CFB8","UNK_TYPE1","",0x1),
|
||||
0x8085CF88:("D_8085CF88","BlureColors","[2]",0x20),
|
||||
0x8085CFA8:("D_8085CFA8","u16","[4]",0x8),
|
||||
0x8085CFB0:("D_8085CFB0","UNK_TYPE1","",0x1),
|
||||
0x8085CFB8:("sMagicArrowCosts","u8","[4]",0x4),
|
||||
0x8085CFBC:("D_8085CFBC","UNK_TYPE1","",0x1),
|
||||
0x8085CFC4:("D_8085CFC4","UNK_TYPE1","",0x1),
|
||||
0x8085CFCC:("D_8085CFCC","UNK_TYPE1","",0x1),
|
||||
@@ -5051,47 +5005,42 @@
|
||||
0x8085D050:("D_8085D050","UNK_TYPE1","",0x1),
|
||||
0x8085D054:("D_8085D054","UNK_PTR","",0x4),
|
||||
0x8085D090:("D_8085D090","UNK_TYPE1","",0x1),
|
||||
0x8085D094:("D_8085D094","UNK_TYPE1","",0x1),
|
||||
0x8085D097:("D_8085D097","UNK_TYPE1","",0x1),
|
||||
0x8085D094:("D_8085D094","UNK_TYPE1","",0x6),
|
||||
0x8085D09C:("D_8085D09C","UNK_TYPE4","",0x4),
|
||||
0x8085D0D4:("D_8085D0D4","UNK_TYPE1","",0x1),
|
||||
0x8085D0E4:("D_8085D0E4","UNK_TYPE1","",0x1),
|
||||
0x8085D0F4:("D_8085D0F4","UNK_TYPE4","",0x4),
|
||||
0x8085D0F8:("D_8085D0F8","UNK_TYPE1","",0x1),
|
||||
0x8085D0F8:("sReturnEntranceGroupData","s16","[1]",0x2),
|
||||
0x8085D0FA:("sReturnEntranceGroupIndices","u8","[1]",0x1),
|
||||
0x8085D100:("D_8085D100","UNK_TYPE1","",0x1),
|
||||
0x8085D10C:("D_8085D10C","f32","",0x4),
|
||||
0x8085D114:("D_8085D114","f32","",0x4),
|
||||
0x8085D10C:("D_8085D10C","Vec3f","",0xC),
|
||||
0x8085D118:("D_8085D118","UNK_TYPE1","",0x1),
|
||||
0x8085D124:("D_8085D124","UNK_TYPE1","",0x1),
|
||||
0x8085D130:("D_8085D130","UNK_TYPE1","",0x1),
|
||||
0x8085D134:("D_8085D134","f32","",0x4),
|
||||
0x8085D13C:("D_8085D13C","UNK_TYPE1","",0x1),
|
||||
0x8085D130:("D_8085D130","Vec3f","",0xC),
|
||||
0x8085D13C:("sFallImpactInfos","UNK_TYPE1","",0x1),
|
||||
0x8085D148:("D_8085D148","UNK_TYPE1","",0x1),
|
||||
0x8085D154:("D_8085D154","UNK_TYPE1","",0x1),
|
||||
0x8085D160:("D_8085D160","UNK_TYPE1","",0x1),
|
||||
0x8085D174:("D_8085D174","UNK_TYPE1","",0x1),
|
||||
0x8085D174:("sPlayerMass","u8","[5]",0x5),
|
||||
0x8085D17C:("D_8085D17C","UNK_TYPE1","",0x1),
|
||||
0x8085D190:("D_8085D190","UNK_TYPE1","",0x1),
|
||||
0x8085D1A4:("D_8085D1A4","UNK_TYPE1","",0x1),
|
||||
0x8085D1F8:("D_8085D1F8","UNK_TYPE1","",0x1),
|
||||
0x8085D200:("D_8085D200","UNK_TYPE4","",0x4),
|
||||
0x8085D218:("D_8085D218","UNK_TYPE1","",0x1),
|
||||
0x8085D224:("D_8085D224","UNK_TYPE1","",0x1),
|
||||
0x8085D23C:("D_8085D23C","UNK_TYPE1","",0x1),
|
||||
0x8085D252:("D_8085D252","UNK_TYPE1","",0x1),
|
||||
0x8085D224:("D_8085D224","UNK_TYPE1","",0x30),
|
||||
0x8085D254:("D_8085D254","u16","[4]",0x8),
|
||||
0x8085D25C:("D_8085D25C","UNK_TYPE1","",0x1),
|
||||
0x8085D264:("D_8085D264","UNK_TYPE1","",0x1),
|
||||
0x8085D26C:("D_8085D26C","UNK_TYPE1","",0x1),
|
||||
0x8085D270:("D_8085D270","UNK_TYPE1","",0x1),
|
||||
0x8085D27C:("D_8085D27C","f32","",0x4),
|
||||
0x8085D284:("D_8085D284","f32","",0x4),
|
||||
0x8085D288:("D_8085D288","UNK_TYPE1","",0x1),
|
||||
0x8085D28C:("D_8085D28C","f32","",0x4),
|
||||
0x8085D27C:("D_8085D27C","Vec3f","",0xC),
|
||||
0x8085D288:("D_8085D288","Vec3f","",0xC),
|
||||
0x8085D294:("D_8085D294","UNK_TYPE1","",0x1),
|
||||
0x8085D2A4:("D_8085D2A4","UNK_TYPE1","",0x1),
|
||||
0x8085D2B0:("D_8085D2B0","UNK_TYPE1","",0x1),
|
||||
0x8085D2B4:("D_8085D2B4","UNK_TYPE1","",0x1),
|
||||
0x8085D2C0:("D_8085D2C0","ActorInitVar","",0x4),
|
||||
0x8085D2C0:("sInitChain","ActorInitVar","",0x4),
|
||||
0x8085D2C4:("D_8085D2C4","UNK_TYPE4","",0x4),
|
||||
0x8085D2CC:("D_8085D2CC","UNK_PTR","",0x4),
|
||||
0x8085D30C:("D_8085D30C","EffectBlureInit2","",0x24),
|
||||
@@ -5101,9 +5050,7 @@
|
||||
0x8085D340:("D_8085D340","UNK_TYPE1","",0x1),
|
||||
0x8085D34C:("D_8085D34C","UNK_TYPE1","",0x1),
|
||||
0x8085D354:("D_8085D354","UNK_TYPE1","",0x1),
|
||||
0x8085D358:("D_8085D358","UNK_TYPE1","",0x1),
|
||||
0x8085D35C:("D_8085D35C","f32","",0x4),
|
||||
0x8085D360:("D_8085D360","f32","",0x4),
|
||||
0x8085D358:("D_8085D358","Vec3f","",0xC),
|
||||
0x8085D364:("D_8085D364","UNK_TYPE1","",0x1),
|
||||
0x8085D370:("D_8085D370","UNK_TYPE1","",0x1),
|
||||
0x8085D37C:("D_8085D37C","UNK_TYPE1","",0x1),
|
||||
@@ -5113,8 +5060,8 @@
|
||||
0x8085D3F4:("D_8085D3F4","UNK_TYPE1","",0x1),
|
||||
0x8085D3F8:("D_8085D3F8","UNK_TYPE1","",0x1),
|
||||
0x8085D3FC:("D_8085D3FC","UNK_TYPE4","",0x4),
|
||||
0x8085D404:("D_8085D404","UNK_TYPE1","",0x1),
|
||||
0x8085D410:("D_8085D410","UNK_TYPE1","",0x1),
|
||||
0x8085D404:("sWaterConveyorSpeeds","UNK_TYPE1","",0x1),
|
||||
0x8085D410:("sFloorConveyorSpeeds","UNK_TYPE1","",0x1),
|
||||
0x8085D41C:("D_8085D41C","UNK_TYPE1","",0x1),
|
||||
0x8085D428:("D_8085D428","UNK_TYPE1","",0x1),
|
||||
0x8085D450:("D_8085D450","UNK_TYPE1","",0x1),
|
||||
@@ -5132,32 +5079,28 @@
|
||||
0x8085D574:("D_8085D574","UNK_TYPE4","",0x4),
|
||||
0x8085D580:("D_8085D580","UNK_TYPE1","",0x1),
|
||||
0x8085D584:("D_8085D584","UNK_TYPE1","",0x1),
|
||||
0x8085D588:("D_8085D588","UNK_TYPE1","",0x1),
|
||||
0x8085D5A0:("D_8085D5A0","UNK_TYPE1","",0x1),
|
||||
0x8085D5B8:("D_8085D5B8","UNK_TYPE1","",0x1),
|
||||
0x8085D588:("D_8085D588","Vec3f","[2]",0x18),
|
||||
0x8085D5A0:("D_8085D5A0","Vec3f","[2]",0x18),
|
||||
0x8085D5B8:("D_8085D5B8","Vec3f","[2]",0x18),
|
||||
0x8085D5D0:("D_8085D5D0","UNK_TYPE1","",0x1),
|
||||
0x8085D5DC:("D_8085D5DC","UNK_TYPE1","",0x1),
|
||||
0x8085D5E0:("D_8085D5E0","UNK_TYPE1","",0x1),
|
||||
0x8085D5E4:("D_8085D5E4","UNK_TYPE1","",0x1),
|
||||
0x8085D5F0:("D_8085D5F0","UNK_TYPE1","",0x1),
|
||||
0x8085D5FA:("D_8085D5FA","UNK_TYPE1","",0x1),
|
||||
0x8085D604:("D_8085D604","UNK_TYPE1","",0x1),
|
||||
0x8085D60C:("D_8085D60C","UNK_TYPE1","",0x1),
|
||||
0x8085D61C:("D_8085D61C","UNK_TYPE1","",0x1),
|
||||
0x8085D62C:("D_8085D62C","f32","",0x4),
|
||||
0x8085D630:("D_8085D630","f32","",0x4),
|
||||
0x8085D634:("D_8085D634","f32","",0x4),
|
||||
0x8085D638:("D_8085D638","f32","",0x4),
|
||||
0x8085D640:("D_8085D640","f32","",0x4),
|
||||
0x8085D644:("D_8085D644","UNK_TYPE1","",0x1),
|
||||
0x8085D64C:("D_8085D64C","f32","",0x4),
|
||||
0x8085D5F0:("D_8085D5F0","UNK_TYPE1","",0xC),
|
||||
0x8085D5FC:("D_8085D5FC","UNK_TYPE1","",0x1),
|
||||
0x8085D604:("D_8085D604","UNK_TYPE1","",0x8),
|
||||
0x8085D60C:("D_8085D60C","UNK_TYPE1","",0x10),
|
||||
0x8085D61C:("D_8085D61C","UNK_TYPE1","",0x10),
|
||||
0x8085D62C:("D_8085D62C","Vec3f","",0xC),
|
||||
0x8085D638:("D_8085D638","Vec3f","",0xC),
|
||||
0x8085D644:("D_8085D644","Vec3f","",0xC),
|
||||
0x8085D650:("D_8085D650","UNK_TYPE1","",0x1),
|
||||
0x8085D658:("D_8085D658","UNK_TYPE1","",0x1),
|
||||
0x8085D660:("D_8085D660","UNK_TYPE1","",0x1),
|
||||
0x8085D66C:("D_8085D66C","UNK_TYPE4","",0x4),
|
||||
0x8085D674:("D_8085D674","UNK_TYPE4","",0x4),
|
||||
0x8085D67C:("D_8085D67C","UNK_TYPE1","",0x1),
|
||||
0x8085D680:("D_8085D680","UNK_TYPE1","",0x1),
|
||||
0x8085D67C:("D_8085D67C","UNK_TYPE1","",0xC),
|
||||
0x8085D688:("D_8085D688","UNK_TYPE1","",0x1),
|
||||
0x8085D6A4:("D_8085D6A4","UNK_TYPE1","",0x1),
|
||||
0x8085D6D0:("D_8085D6D0","UNK_PTR","",0x4),
|
||||
0x8085D6DC:("D_8085D6DC","UNK_TYPE1","",0x1),
|
||||
@@ -5168,18 +5111,16 @@
|
||||
0x8085D73C:("D_8085D73C","UNK_TYPE1","",0x1),
|
||||
0x8085D74C:("D_8085D74C","UNK_TYPE1","",0x1),
|
||||
0x8085D75C:("D_8085D75C","UNK_TYPE1","",0x1),
|
||||
0x8085D764:("D_8085D764","UNK_TYPE1","",0x1),
|
||||
0x8085D76D:("D_8085D76D","UNK_TYPE1","",0x1),
|
||||
0x8085D764:("D_8085D764","Vec3f","",0xC),
|
||||
0x8085D770:("D_8085D770","UNK_TYPE1","",0x1),
|
||||
0x8085D77C:("D_8085D77C","UNK_TYPE1","",0x1),
|
||||
0x8085D788:("D_8085D788","UNK_TYPE1","",0x1),
|
||||
0x8085D78C:("D_8085D78C","UNK_TYPE1","",0x1),
|
||||
0x8085D797:("D_8085D797","UNK_TYPE1","",0x1),
|
||||
0x8085D78C:("D_8085D78C","Color_RGBA8","",0x4),
|
||||
0x8085D790:("D_8085D790","u8","[6]",0x6),
|
||||
0x8085D798:("D_8085D798","UNK_TYPE2","",0x2),
|
||||
0x8085D7EC:("D_8085D7EC","UNK_TYPE1","",0x1),
|
||||
0x8085D7F8:("D_8085D7F8","UNK_TYPE1","",0x1),
|
||||
0x8085D800:("D_8085D800","f32","",0x4),
|
||||
0x8085D804:("D_8085D804","UNK_TYPE1","",0x1),
|
||||
0x8085D7EC:("D_8085D7EC","Vec3f","",0xC),
|
||||
0x8085D7F8:("D_8085D7F8","Vec3f","",0xC),
|
||||
0x8085D804:("D_8085D804","s8","[5]",0x5),
|
||||
0x8085D80C:("D_8085D80C","UNK_TYPE1","",0x1),
|
||||
0x8085D838:("D_8085D838","UNK_TYPE1","",0x1),
|
||||
0x8085D840:("D_8085D840","UNK_TYPE1","",0x1),
|
||||
@@ -5189,18 +5130,14 @@
|
||||
0x8085D904:("D_8085D904","UNK_TYPE1","",0x1),
|
||||
0x8085D908:("D_8085D908","UNK_TYPE1","",0x1),
|
||||
0x8085D910:("D_8085D910","UNK_TYPE1","",0x1),
|
||||
0x8085D918:("D_8085D918","UNK_TYPE1","",0x1),
|
||||
0x8085D91C:("D_8085D91C","f32","",0x4),
|
||||
0x8085D924:("D_8085D924","UNK_TYPE1","",0x1),
|
||||
0x8085D928:("D_8085D928","f32","",0x4),
|
||||
0x8085D918:("D_8085D918","Vec3f","",0xC),
|
||||
0x8085D924:("D_8085D924","Vec3f","",0xC),
|
||||
0x8085D930:("D_8085D930","UNK_TYPE1","",0x1),
|
||||
0x8085D934:("D_8085D934","UNK_TYPE1","",0x1),
|
||||
0x8085D938:("D_8085D938","UNK_TYPE4","",0x4),
|
||||
0x8085D93C:("D_8085D93C","UNK_TYPE4","",0x4),
|
||||
0x8085D940:("D_8085D940","f32","",0x4),
|
||||
0x8085D948:("D_8085D948","f32","",0x4),
|
||||
0x8085D94C:("D_8085D94C","f32","",0x4),
|
||||
0x8085D954:("D_8085D954","f32","",0x4),
|
||||
0x8085D940:("D_8085D940","Vec3f","",0xC),
|
||||
0x8085D94C:("D_8085D94C","Vec3f","",0xC),
|
||||
0x8085D958:("D_8085D958","UNK_TYPE1","",0x1),
|
||||
0x8085D960:("D_8085D960","UNK_TYPE1","",0x1),
|
||||
0x8085D96C:("D_8085D96C","UNK_TYPE1","",0x1),
|
||||
@@ -5444,20 +5381,18 @@
|
||||
0x8085E6EC:("D_8085E6EC","f32","",0x4),
|
||||
0x8085E6F0:("D_8085E6F0","f32","",0x4),
|
||||
0x8085E6F4:("D_8085E6F4","f32","",0x4),
|
||||
0x80862AF0:("D_80862AF0","UNK_TYPE1","",0x1),
|
||||
0x80862AF4:("D_80862AF4","f32","",0x4),
|
||||
0x80862AF8:("D_80862AF8","f32","",0x4),
|
||||
0x80862AF0:("sDogSpawnPos","Vec3f","",0xC),
|
||||
0x80862AFC:("D_80862AFC","f32","",0x4),
|
||||
0x80862B00:("D_80862B00","UNK_TYPE1","",0x1),
|
||||
0x80862B02:("D_80862B02","UNK_TYPE1","",0x1),
|
||||
0x80862B04:("D_80862B04","UNK_TYPE1","",0x1),
|
||||
0x80862B08:("D_80862B08","UNK_TYPE1","",0x1),
|
||||
0x80862B0C:("D_80862B0C","UNK_TYPE1","",0x1),
|
||||
0x80862B10:("D_80862B10","UNK_TYPE1","",0x1),
|
||||
0x80862B14:("D_80862B14","UNK_TYPE1","",0x1),
|
||||
0x80862B08:("sPlayerCurrentFloorType","UNK_TYPE1","",0x1),
|
||||
0x80862B0C:("sPlayerCurrentWallFlags","UNK_TYPE1","",0x1),
|
||||
0x80862B10:("sPlayerConveyorSpeedIndex","UNK_TYPE1","",0x1),
|
||||
0x80862B14:("sPlayerIsOnFloorConveyor","UNK_TYPE1","",0x1),
|
||||
0x80862B16:("D_80862B16","UNK_TYPE1","",0x1),
|
||||
0x80862B18:("D_80862B18","f32","",0x4),
|
||||
0x80862B1C:("D_80862B1C","UNK_TYPE1","",0x1),
|
||||
0x80862B1C:("sPlayerPrevFloorProperty","UNK_TYPE1","",0x1),
|
||||
0x80862B20:("D_80862B20","UNK_TYPE1","",0x1),
|
||||
0x80862B24:("D_80862B24","UNK_TYPE1","",0x1),
|
||||
0x80862B28:("D_80862B28","UNK_TYPE1","",0x1),
|
||||
@@ -5465,7 +5400,7 @@
|
||||
0x80862B30:("D_80862B30","UNK_TYPE1","",0x1),
|
||||
0x80862B3C:("D_80862B3C","f32","",0x4),
|
||||
0x80862B40:("D_80862B40","UNK_TYPE1","",0x1),
|
||||
0x80862B44:("D_80862B44","UNK_TYPE1","",0x1),
|
||||
0x80862B44:("sPlayerControlInput","UNK_TYPE1","",0x1),
|
||||
0x80862B48:("D_80862B48","UNK_TYPE1","",0x1),
|
||||
0x80862B4C:("D_80862B4C","UNK_TYPE1","",0x1),
|
||||
0x80862B50:("D_80862B50","UNK_TYPE1","",0x1),
|
||||
|
||||
Executable
+1171
File diff suppressed because it is too large
Load Diff
@@ -222,6 +222,7 @@ wordReplace = {
|
||||
"SkelAnime_InitLink": "SkelAnime_InitPlayer",
|
||||
"LinkAnimation_SetUpdateFunction": "PlayerAnimation_SetUpdateFunction",
|
||||
"LinkAnimation_Update": "PlayerAnimation_Update",
|
||||
"LinkAnimation_AnimateFrame": "PlayerAnimation_AnimateFrame",
|
||||
"SkelAnime_SetTransition": "Animation_SetMorph",
|
||||
"LinkAnimation_Change": "PlayerAnimation_Change",
|
||||
"LinkAnimation_PlayOnce": "PlayerAnimation_PlayOnce",
|
||||
@@ -903,6 +904,7 @@ wordReplace = {
|
||||
"player->swordInfo": "player->meleeWeaponInfo",
|
||||
"player->itemActionParam": "player->heldItemAction",
|
||||
"player->heldItemActionParam": "player->itemAction",
|
||||
"player->unk_A86": "player->currentActorCsIndex",
|
||||
"player->unk_A9C": "player->secretRumbleCharge",
|
||||
"player->unk_AA0": "player->closestSecretDistSq",
|
||||
"player->unk_AAC": "player->headLimbRot",
|
||||
@@ -911,6 +913,8 @@ wordReplace = {
|
||||
"player->getItemDrawId": "player->getItemDrawIdPlusOne",
|
||||
"player->unk_B68": "player->fallStartHeight",
|
||||
"player->unk_B6A": "player->fallDistance",
|
||||
"player->unk_B80": "player->pushedSpeed",
|
||||
"player->unk_B84": "player->pushedYaw",
|
||||
"player->targetActor": "player->talkActor",
|
||||
"player->targetActorDistance": "player->talkActorDistance",
|
||||
"player->unk_730": "player->targetedActor",
|
||||
@@ -991,6 +995,7 @@ wordReplace = {
|
||||
"play->sceneLoadFlag": "play->transitionTrigger",
|
||||
"play->unk_18B4A": "play->transitionMode",
|
||||
"play->unk_1887F": "play->transitionType",
|
||||
"play->roomCtx.currRoom": "play->roomCtx.curRoom",
|
||||
"gSaveContext.nextTransition": "gSaveContext.nextTransitionType",
|
||||
"gSaveContext.unk_3F48": "gSaveContext.cutsceneTransitionControl",
|
||||
"gSaveContext.fadeDuration": "gSaveContext.transFadeDuration",
|
||||
|
||||
@@ -1103,18 +1103,6 @@ D_06002188 = 0x06002188;
|
||||
D_06000B70 = 0x06000B70;
|
||||
D_06000D60 = 0x06000D60;
|
||||
|
||||
// ovl_player_actor
|
||||
|
||||
D_06008860 = 0x06008860;
|
||||
D_0600BDD8 = 0x0600BDD8;
|
||||
D_0600C540 = 0x0600C540;
|
||||
D_060127B0 = 0x060127B0;
|
||||
D_06013138 = 0x06013138;
|
||||
D_060134D0 = 0x060134D0;
|
||||
D_06014684 = 0x06014684;
|
||||
D_060177B8 = 0x060177B8;
|
||||
D_060178D0 = 0x060178D0;
|
||||
|
||||
|
||||
// segment 0x07
|
||||
|
||||
|
||||
Reference in New Issue
Block a user