mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-17 05:41:46 -04:00
Decomp pull, some z_player and global changes (#6908)
This commit is contained in:
@@ -691,7 +691,7 @@ u32 func_80041EC8(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_IsHorseBlocked(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 func_80041F10(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u16 SurfaceType_GetSfx(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetSlope(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetFloorEffect(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetLightSettingIndex(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_GetEcho(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
u32 SurfaceType_IsHookshotSurface(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId);
|
||||
@@ -734,7 +734,7 @@ Vec3s Camera_Update(Camera* camera);
|
||||
void Camera_Finish(Camera* camera);
|
||||
s32 Camera_ChangeMode(Camera* camera, s16 mode);
|
||||
s32 Camera_CheckValidMode(Camera* camera, s16 mode);
|
||||
s32 Camera_ChangeSetting(Camera* camera, s16 setting);
|
||||
s32 Camera_RequestSetting(Camera* camera, s16 setting);
|
||||
s32 Camera_ChangeDataIdx(Camera* camera, s32 camDataIdx);
|
||||
s16 Camera_GetInputDirYaw(Camera* camera);
|
||||
Vec3s* Camera_GetCamDir(Vec3s* dir, Camera* camera);
|
||||
@@ -1061,7 +1061,7 @@ void Map_Destroy(PlayState* play);
|
||||
void Map_Init(PlayState* play);
|
||||
void Minimap_Draw(PlayState* play);
|
||||
void Map_Update(PlayState* play);
|
||||
void Interface_ChangeAlpha(u16 alphaType);
|
||||
void Interface_ChangeHudVisibilityMode(u16 alphaType);
|
||||
void Interface_SetSceneRestrictions(PlayState* play);
|
||||
void Inventory_SwapAgeEquipment(void);
|
||||
void Interface_InitHorsebackArchery(PlayState* play);
|
||||
@@ -1468,7 +1468,7 @@ void TransitionFade_Draw(void* this, Gfx** gfxP);
|
||||
s32 TransitionFade_IsDone(void* this);
|
||||
void TransitionFade_SetColor(void* this, u32 color);
|
||||
void TransitionFade_SetType(void* this, s32 type);
|
||||
void ShrinkWindow_SetVal(s32 value);
|
||||
void Letterbox_SetSizeTarget(s32 value);
|
||||
u32 ShrinkWindow_GetVal(void);
|
||||
void ShrinkWindow_SetCurrentVal(s32 nowVal);
|
||||
u32 ShrinkWindow_GetCurrentVal(void);
|
||||
@@ -1563,7 +1563,7 @@ void Play_SaveSceneFlags(PlayState* play);
|
||||
void Play_SetupRespawnPoint(PlayState* play, s32 respawnMode, s32 playerParams);
|
||||
void Play_TriggerVoidOut(PlayState* play);
|
||||
void Play_TriggerRespawn(PlayState* play);
|
||||
s32 func_800C0CB8(PlayState* play);
|
||||
s32 Play_CamIsNotFixed(PlayState* play);
|
||||
s32 FrameAdvance_IsEnabled(PlayState* play);
|
||||
s32 func_800C0D34(PlayState* play, Actor* actor, s16* yaw);
|
||||
s32 func_800C0DB4(PlayState* play, Vec3f* pos);
|
||||
@@ -2051,7 +2051,7 @@ void AudioSeq_ResetSequencePlayer(SequencePlayer* seqPlayer);
|
||||
void AudioSeq_InitSequencePlayerChannels(s32 playerIdx);
|
||||
void AudioSeq_InitSequencePlayers(void);
|
||||
void func_800ECC04(u16);
|
||||
void Audio_OcaSetInstrument(u8);
|
||||
void AudioOcarina_SetInstrument(u8);
|
||||
void Audio_OcaSetSongPlayback(s8 songIdxPlusOne, s8 playbackState);
|
||||
void Audio_OcaSetRecordingState(u8);
|
||||
OcarinaStaff* Audio_OcaGetRecordingStaff(void);
|
||||
@@ -2078,8 +2078,8 @@ void func_800F436C(Vec3f*, u16 sfxId, f32 arg2);
|
||||
void func_800F4414(Vec3f*, u16 sfxId, f32 arg2);
|
||||
void Audio_PlaySoundRiver(Vec3f* pos, f32 freqScale);
|
||||
void Audio_PlaySoundWaterfall(Vec3f* pos, f32 freqScale);
|
||||
void func_800F47BC(void);
|
||||
void func_800F47FC(void);
|
||||
void Audio_SetBgmVolumeOffDuringFanfare(void);
|
||||
void Audio_SetBgmVolumeOnDuringFanfare(void);
|
||||
void func_800F483C(u8 targetVol, u8 volFadeTimer);
|
||||
void func_800F4870(u8);
|
||||
void func_800F4A54(u8);
|
||||
|
||||
+1
-1
@@ -1461,7 +1461,7 @@ typedef struct PlayState {
|
||||
/* 0x11DE0 */ Mtx* billboardMtx;
|
||||
/* 0x11DE4 */ u32 gameplayFrames;
|
||||
/* 0x11DE8 */ u8 linkAgeOnLoad;
|
||||
/* 0x11DE9 */ u8 unk_11DE9;
|
||||
/* 0x11DE9 */ u8 haltAllActors;
|
||||
/* 0x11DEA */ u8 curSpawn;
|
||||
/* 0x11DEB */ u8 numSetupActors;
|
||||
/* 0x11DEC */ u8 numRooms;
|
||||
|
||||
@@ -209,6 +209,17 @@ typedef struct {
|
||||
// Flag controlling the use of `Actor.sfx`. Do not use directly. See Actor_PlaySfx_FlaggedTimer
|
||||
#define ACTOR_FLAG_SFX_TIMER (1 << 28)
|
||||
|
||||
#define BGCHECKFLAG_GROUND (1 << 0) // Standing on the ground
|
||||
#define BGCHECKFLAG_GROUND_TOUCH (1 << 1) // Has touched the ground (only active for 1 frame)
|
||||
#define BGCHECKFLAG_GROUND_LEAVE (1 << 2) // Has left the ground (only active for 1 frame)
|
||||
#define BGCHECKFLAG_WALL (1 << 3) // Touching a wall
|
||||
#define BGCHECKFLAG_CEILING (1 << 4) // Touching a ceiling
|
||||
#define BGCHECKFLAG_WATER (1 << 5) // In water
|
||||
#define BGCHECKFLAG_WATER_TOUCH (1 << 6) // Has touched water (reset when leaving water)
|
||||
#define BGCHECKFLAG_GROUND_STRICT (1 << 7) // Strictly on ground (BGCHECKFLAG_GROUND has some leeway)
|
||||
#define BGCHECKFLAG_CRUSHED (1 << 8) // Crushed between a floor and ceiling (triggers a void for player)
|
||||
#define BGCHECKFLAG_PLAYER_WALL_INTERACT (1 << 9) // Only set/used by player, related to interacting with walls
|
||||
|
||||
typedef struct Actor {
|
||||
/* 0x000 */ s16 id; // Actor ID
|
||||
/* 0x002 */ u8 category; // Actor category. Refer to the corresponding enum for values
|
||||
|
||||
@@ -1115,6 +1115,19 @@ typedef enum {
|
||||
/* -1 */ OCARINA_NOTE_INVALID = 0xFF
|
||||
} OcarinaNoteIdx;
|
||||
|
||||
typedef enum OcarinaInstrumentId {
|
||||
/* 0 */ OCARINA_INSTRUMENT_OFF,
|
||||
/* 1 */ OCARINA_INSTRUMENT_DEFAULT,
|
||||
/* 2 */ OCARINA_INSTRUMENT_MALON,
|
||||
/* 3 */ OCARINA_INSTRUMENT_WHISTLE,
|
||||
/* 4 */ OCARINA_INSTRUMENT_HARP,
|
||||
/* 5 */ OCARINA_INSTRUMENT_GRIND_ORGAN,
|
||||
/* 6 */ OCARINA_INSTRUMENT_FLUTE,
|
||||
/* 7 */ OCARINA_INSTRUMENT_MAX,
|
||||
/* 7 */ OCARINA_INSTRUMENT_DEFAULT_COPY1 = OCARINA_INSTRUMENT_MAX, // Unused but present in Sequence 0 table
|
||||
/* 8 */ OCARINA_INSTRUMENT_DEFAULT_COPY2 = OCARINA_INSTRUMENT_MAX + 1 // Unused but present in Sequence 0 table
|
||||
} OcarinaInstrumentId;
|
||||
|
||||
typedef struct {
|
||||
char* seqData;
|
||||
int32_t seqDataSize;
|
||||
|
||||
@@ -22,6 +22,12 @@
|
||||
#define PARENT_CAM(cam) ((cam)->play->cameraPtrs[(cam)->parentCamIdx])
|
||||
#define CHILD_CAM(cam) ((cam)->play->cameraPtrs[(cam)->childCamIdx])
|
||||
|
||||
#define CAM_DATA_SET_0 (1 << 0)
|
||||
#define CAM_DATA_SET_1 (1 << 1)
|
||||
#define CAM_DATA_SET_2 (1 << 2)
|
||||
#define CAM_DATA_SET_3 (1 << 3)
|
||||
#define CAM_DATA_SET_4 (1 << 4)
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ CAM_SET_NONE,
|
||||
/* 0x01 */ CAM_SET_NORMAL0,
|
||||
@@ -634,6 +640,22 @@ typedef struct {
|
||||
{ yawUpdateRateTarget, CAM_DATA_YAW_UPDATE_RATE_TARGET }, \
|
||||
{ flags, CAM_DATA_FLAGS }
|
||||
|
||||
typedef enum CameraItemType {
|
||||
/* 1 */ CAM_ITEM_TYPE_1 = 1,
|
||||
/* 2 */ CAM_ITEM_TYPE_2,
|
||||
/* 3 */ CAM_ITEM_TYPE_3,
|
||||
/* 4 */ CAM_ITEM_TYPE_4,
|
||||
/* 5 */ CAM_ITEM_TYPE_5,
|
||||
/* 8 */ CAM_ITEM_TYPE_8 = 8,
|
||||
/* 9 */ CAM_ITEM_TYPE_9,
|
||||
/* 10 */ CAM_ITEM_TYPE_10,
|
||||
/* 11 */ CAM_ITEM_TYPE_11,
|
||||
/* 12 */ CAM_ITEM_TYPE_12,
|
||||
/* 81 */ CAM_ITEM_TYPE_81 = 81,
|
||||
/* 90 */ CAM_ITEM_TYPE_90 = 90,
|
||||
/* 91 */ CAM_ITEM_TYPE_91
|
||||
} CameraItemType;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ f32 unk_00;
|
||||
/* 0x04 */ f32 unk_04;
|
||||
|
||||
@@ -47,6 +47,17 @@ typedef struct {
|
||||
/* 0x07 */ u8 shape; // JntSph, Cylinder, Tris, or Quad
|
||||
} ColliderInitToActor; // size = 0x08
|
||||
|
||||
typedef enum HitSpecialEffect {
|
||||
HIT_SPECIAL_EFFECT_NONE,
|
||||
HIT_SPECIAL_EFFECT_FIRE,
|
||||
HIT_SPECIAL_EFFECT_ICE,
|
||||
HIT_SPECIAL_EFFECT_ELECTRIC,
|
||||
HIT_SPECIAL_EFFECT_KNOCKBACK,
|
||||
HIT_SPECIAL_EFFECT_7 = 7, // Same effect as `HIT_SPECIAL_EFFECT_NONE`
|
||||
HIT_SPECIAL_EFFECT_8, // Same effect as `HIT_SPECIAL_EFFECT_NONE`
|
||||
HIT_SPECIAL_EFFECT_9 // Same effect as `HIT_SPECIAL_EFFECT_NONE`
|
||||
} HitSpecialEffect;
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ u32 dmgFlags; // Toucher damage type flags.
|
||||
/* 0x04 */ u8 effect; // Damage Effect (Knockback, Fire, etc.)
|
||||
|
||||
@@ -587,20 +587,20 @@ typedef enum PlayerStickDirection {
|
||||
/* 3 */ PLAYER_STICK_DIR_RIGHT
|
||||
} PlayerStickDirection;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerKnockbackType {
|
||||
/* 0 */ PLAYER_KNOCKBACK_NONE, // No knockback
|
||||
/* 1 */ PLAYER_KNOCKBACK_SMALL, // A small hop, remains standing up
|
||||
/* 2 */ PLAYER_KNOCKBACK_LARGE, // Sent flying in the air and lands laying down on the floor
|
||||
/* 3 */ PLAYER_KNOCKBACK_LARGE_SHOCK // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
|
||||
/* 3 */ PLAYER_KNOCKBACK_LARGE_ELECTRIFIED // Same as`PLAYER_KNOCKBACK_LARGE` with a shock effect
|
||||
} PlayerKnockbackType;
|
||||
|
||||
typedef enum {
|
||||
typedef enum PlayerHitResponseType {
|
||||
/* 0 */ PLAYER_HIT_RESPONSE_NONE,
|
||||
/* 1 */ PLAYER_HIT_RESPONSE_KNOCKBACK_LARGE,
|
||||
/* 2 */ PLAYER_HIT_RESPONSE_KNOCKBACK_SMALL,
|
||||
/* 3 */ PLAYER_HIT_RESPONSE_ICE_TRAP,
|
||||
/* 4 */ PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK
|
||||
} PlayerDamageResponseType;
|
||||
/* 3 */ PLAYER_HIT_RESPONSE_FROZEN,
|
||||
/* 4 */ PLAYER_HIT_RESPONSE_ELECTRIFIED
|
||||
} PlayerHitResponseType;
|
||||
|
||||
typedef struct PlayerAgeProperties {
|
||||
/* 0x00 */ f32 ceilingCheckHeight;
|
||||
|
||||
+26
-4
@@ -13,6 +13,28 @@
|
||||
#define STARTING_HEALTH (3 * FULL_HEART_HEALTH)
|
||||
#define MAX_HEALTH (20 * FULL_HEART_HEALTH)
|
||||
|
||||
// `_FORCE` means that this request will respond to `forceRisingButtonAlphas`.
|
||||
// If set, the buttons will also raise alphas but will also account for disabled buttons
|
||||
|
||||
typedef enum HudVisibilityMode {
|
||||
/* 0 */ HUD_VISIBILITY_NO_CHANGE,
|
||||
/* 1 */ HUD_VISIBILITY_NOTHING,
|
||||
/* 2 */ HUD_VISIBILITY_NOTHING_ALT, // Identical to HUD_VISIBILITY_NOTHING
|
||||
/* 3 */ HUD_VISIBILITY_HEARTS_FORCE, // See above
|
||||
/* 4 */ HUD_VISIBILITY_A,
|
||||
/* 5 */ HUD_VISIBILITY_A_HEARTS_MAGIC_FORCE, // See above
|
||||
/* 6 */ HUD_VISIBILITY_A_HEARTS_MAGIC_MINIMAP_FORCE, // See above
|
||||
/* 7 */ HUD_VISIBILITY_ALL_NO_MINIMAP_BY_BTN_STATUS, // Only raises button alphas if not disabled
|
||||
/* 8 */ HUD_VISIBILITY_B,
|
||||
/* 9 */ HUD_VISIBILITY_HEARTS_MAGIC,
|
||||
/* 10 */ HUD_VISIBILITY_B_ALT, // Identical to HUD_VISIBILITY_B
|
||||
/* 11 */ HUD_VISIBILITY_HEARTS,
|
||||
/* 12 */ HUD_VISIBILITY_A_B_MINIMAP,
|
||||
/* 13 */ HUD_VISIBILITY_HEARTS_MAGIC_FORCE, // See above
|
||||
/* 50 */ HUD_VISIBILITY_ALL = 50, // Only raises button alphas if not disabled
|
||||
/* 52 */ HUD_VISIBILITY_NOTHING_INSTANT = 52
|
||||
} HudVisibilityMode;
|
||||
|
||||
typedef enum {
|
||||
/* 0x0 */ MAGIC_STATE_IDLE, // Regular gameplay
|
||||
/* 0x1 */ MAGIC_STATE_CONSUME_SETUP, // Sets the speed at which magic border flashes
|
||||
@@ -316,10 +338,10 @@ typedef struct {
|
||||
/* 0x13E1 */ u8 natureAmbienceId;
|
||||
/* 0x13E2 */ u8 buttonStatus[9]; // SOH [Enhancements] Changed from 5 to 9 to support Dpad equips
|
||||
/* 0x13E7 */ u8 forceRisingButtonAlphas; // alpha related
|
||||
/* 0x13E8 */ u16 unk_13E8; // alpha type?
|
||||
/* 0x13EA */ u16 unk_13EA; // also alpha type?
|
||||
/* 0x13EC */ u16 unk_13EC; // alpha type counter?
|
||||
/* 0x13EE */ u16 unk_13EE; // previous alpha type?
|
||||
/* 0x13E8 */ u16 nextHudVisibilityMode; // triggers the hud to change visibility mode to the requested value. Reset to HUD_VISIBILITY_NO_CHANGE when target is reached
|
||||
/* 0x13EA */ u16 hudVisibilityMode; // current hud visibility mode
|
||||
/* 0x13EC */ u16 hudVisibilityModeTimer; // number of frames in the transition to a new hud visibility mode. Used to step alpha
|
||||
/* 0x13EE */ u16 prevHudVisibilityMode; // used to store and recover hud visibility mode for pause menu and text boxes
|
||||
/* 0x13F0 */ s16 magicState; // determines magic meter behavior on each frame
|
||||
/* 0x13F2 */ s16 prevMagicState; // used to resume the previous state after adding or filling magic
|
||||
/* 0x13F4 */ s16 magicCapacity; // maximum magic available
|
||||
|
||||
Reference in New Issue
Block a user