mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-07-12 15:42:44 -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
|
||||
|
||||
@@ -142,7 +142,7 @@ extern "C" void DisableFixedCamera_SetNormalCamera(PlayState* play) {
|
||||
play->mainCamera.setting = CAM_SET_NORMAL0;
|
||||
play->mainCamera.prevSetting = CAM_SET_NORMAL0;
|
||||
}
|
||||
Camera_ChangeSetting(&play->mainCamera, CAM_SET_NORMAL0);
|
||||
Camera_RequestSetting(&play->mainCamera, CAM_SET_NORMAL0);
|
||||
Camera_ChangeMode(&play->mainCamera, CAM_MODE_NORMAL);
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ extern "C" void DisableFixedCamera_CheckCameraState(PlayState* play) {
|
||||
if (play->mainCamera.camDataIdx >= 0) {
|
||||
sStoreLastCamType = play->mainCamera.camDataIdx;
|
||||
}
|
||||
Camera_ChangeSetting(&play->mainCamera, CAM_SET_TURN_AROUND);
|
||||
Camera_RequestSetting(&play->mainCamera, CAM_SET_TURN_AROUND);
|
||||
Camera_ChangeMode(&play->mainCamera, CAM_MODE_NORMAL);
|
||||
if (sStoreLastCamType >= 0) {
|
||||
play->mainCamera.camDataIdx = sStoreLastCamType;
|
||||
|
||||
@@ -69,7 +69,7 @@ static void PauseWarp_Execute() {
|
||||
}
|
||||
|
||||
static void ActivateWarp(PauseContext* pauseCtx, int song) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Interface_SetDoAction(gPlayState, DO_ACTION_NONE);
|
||||
pauseCtx->state = 0x12;
|
||||
WREG(2) = -6240;
|
||||
|
||||
@@ -67,7 +67,7 @@ void Warp(WarpPoint& warpPoint) {
|
||||
for (int buttonIndex = 0; buttonIndex < ARRAY_COUNT(gSaveContext.buttonStatus); buttonIndex++) {
|
||||
gSaveContext.buttonStatus[buttonIndex] = BTN_ENABLED;
|
||||
}
|
||||
gSaveContext.unk_13E8 = gSaveContext.unk_13EA = gSaveContext.unk_13EC = 0;
|
||||
gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode = gSaveContext.hudVisibilityModeTimer = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = 0;
|
||||
Audio_QueueSeqCmd(SEQ_PLAYER_BGM_MAIN << 24 | NA_BGM_STOP);
|
||||
gSaveContext.entranceIndex = warpPoint.entranceId;
|
||||
|
||||
@@ -238,7 +238,7 @@ void DrawPreviewButton(uint16_t sequenceId, std::string sfxKey, SeqType sequence
|
||||
if (sequenceType == SEQ_SFX || sequenceType == SEQ_VOICE) {
|
||||
Audio_PlaySoundGeneral(sequenceId, &pos, 4, &freqScale, &freqScale, &reverbAdd);
|
||||
} else if (sequenceType == SEQ_INSTRUMENT) {
|
||||
Audio_OcaSetInstrument(sequenceId - INSTRUMENT_OFFSET);
|
||||
AudioOcarina_SetInstrument(sequenceId - INSTRUMENT_OFFSET);
|
||||
Audio_OcaSetSongPlayback(9, 1);
|
||||
} else {
|
||||
// TODO: Cant do both here, so have to click preview button twice
|
||||
|
||||
@@ -401,7 +401,7 @@ void DrawDynapoly(std::vector<Gfx>& dl, CollisionHeader* col, int32_t bgId) {
|
||||
} else if (SurfaceType_GetFloorType(&gPlayState->colCtx, poly, bgId) != 0 ||
|
||||
SurfaceType_IsWallDamage(&gPlayState->colCtx, poly, bgId)) {
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorSpecialSurface.Value"), { 192, 255, 192, 255 });
|
||||
} else if (SurfaceType_GetSlope(&gPlayState->colCtx, poly, bgId) == 0x01) {
|
||||
} else if (SurfaceType_GetFloorEffect(&gPlayState->colCtx, poly, bgId) == 0x01) {
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorSlope.Value"), { 255, 255, 128, 255 });
|
||||
} else {
|
||||
color = CVarGetColor(CVAR_DEVELOPER_TOOLS("ColViewer.ColorNormal.Value"), { 255, 255, 255, 255 });
|
||||
|
||||
@@ -58,7 +58,7 @@ std::array<ValueTableElement, VVE_MAX> valueTable = {{
|
||||
{ "Frame Counter", "play->state.frames", "FRAM:", TYPE_S32, true, []() -> void* { return &gPlayState->state.frames; }},
|
||||
{ "Cutscene Pointer", "play->csCtx.segment", "CSP:", TYPE_PTR, true, []() -> void* { return &gPlayState->csCtx.segment; }},
|
||||
{ "Framerate Divisor", "R_UPDATE_RATE", "FRDV:", TYPE_S16, false, []() -> void* { return &R_UPDATE_RATE; }},
|
||||
{ "Next HUD mode", "gSaveContext.nextHudMode", "HUD:", TYPE_S16, false, []() -> void* { return &gSaveContext.unk_13E8; }},
|
||||
{ "Next HUD mode", "gSaveContext.nextHudMode", "HUD:", TYPE_S16, false, []() -> void* { return &gSaveContext.nextHudVisibilityMode; }},
|
||||
{ "Temp B Value", "gSaveContext.buttonStatus[0]", "TEMPB:", TYPE_U8, false, []() -> void* { return &gSaveContext.buttonStatus[0]; }},
|
||||
{ "Blue Warp Timer", "DoorWarp1->warpTimer", "WARPT:", TYPE_U16, true, []() -> void* { DoorWarp1 *actor = (DoorWarp1 *)Actor_Find(&gPlayState->actorCtx, ACTOR_DOOR_WARP1 ,ACTORCAT_ITEMACTION); if(actor) { return &actor->warpTimer; } else { return nullptr; }}},
|
||||
/* TODO: Find these (from GZ)
|
||||
|
||||
@@ -327,7 +327,7 @@ void GameInteractor::RawAction::GiveOrTakeShield(int32_t shield) {
|
||||
}
|
||||
|
||||
void GameInteractor::RawAction::ForceInterfaceUpdate() {
|
||||
gSaveContext.unk_13E8 = 50;
|
||||
gSaveContext.nextHudVisibilityMode = 50;
|
||||
Interface_Update(gPlayState);
|
||||
}
|
||||
|
||||
|
||||
@@ -2350,7 +2350,7 @@ typedef enum {
|
||||
|
||||
// #### `result`
|
||||
// ```c
|
||||
// SurfaceType_GetSlope(&play->colCtx, poly, bgId) == 2
|
||||
// SurfaceType_GetFloorEffect(&play->colCtx, poly, bgId) == 2
|
||||
// ```
|
||||
// #### `args`
|
||||
// - `*int16_t` - original next entrance index (`play->setupExitList[exitIndex - 1]`)
|
||||
|
||||
@@ -1382,8 +1382,8 @@ void RandomizerOnVanillaBehaviorHandler(GIVanillaBehavior id, bool* should, va_l
|
||||
|
||||
// This is typically called when you close the text box after getting an item, in case a previous
|
||||
// function hid the interface.
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(0x32);
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_ChangeHudVisibilityMode(0x32);
|
||||
// EnItem00_SetupAction(item00, func_8001E5C8);
|
||||
// *should = false;
|
||||
} else if (item00->actor.params == ITEM00_SOH_GIVE_ITEM_ENTRY_GI) {
|
||||
|
||||
@@ -24,14 +24,14 @@ static DamageTable DummyPlayerDamageTable = {
|
||||
/* Master sword */ DMG_ENTRY(2, DUMMY_PLAYER_HIT_RESPONSE_NORMAL),
|
||||
/* Giant's Knife */ DMG_ENTRY(4, DUMMY_PLAYER_HIT_RESPONSE_NORMAL),
|
||||
/* Fire arrow */ DMG_ENTRY(2, DUMMY_PLAYER_HIT_RESPONSE_FIRE),
|
||||
/* Ice arrow */ DMG_ENTRY(4, PLAYER_HIT_RESPONSE_ICE_TRAP),
|
||||
/* Light arrow */ DMG_ENTRY(2, PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK),
|
||||
/* Ice arrow */ DMG_ENTRY(4, PLAYER_HIT_RESPONSE_FROZEN),
|
||||
/* Light arrow */ DMG_ENTRY(2, PLAYER_HIT_RESPONSE_ELECTRIFIED),
|
||||
/* Unk arrow 1 */ DMG_ENTRY(2, PLAYER_HIT_RESPONSE_NONE),
|
||||
/* Unk arrow 2 */ DMG_ENTRY(2, PLAYER_HIT_RESPONSE_NONE),
|
||||
/* Unk arrow 3 */ DMG_ENTRY(2, PLAYER_HIT_RESPONSE_NONE),
|
||||
/* Fire magic */ DMG_ENTRY(0, DUMMY_PLAYER_HIT_RESPONSE_FIRE),
|
||||
/* Ice magic */ DMG_ENTRY(3, PLAYER_HIT_RESPONSE_ICE_TRAP),
|
||||
/* Light magic */ DMG_ENTRY(0, PLAYER_HIT_RESPONSE_ELECTRIC_SHOCK),
|
||||
/* Ice magic */ DMG_ENTRY(3, PLAYER_HIT_RESPONSE_FROZEN),
|
||||
/* Light magic */ DMG_ENTRY(0, PLAYER_HIT_RESPONSE_ELECTRIFIED),
|
||||
/* Shield */ DMG_ENTRY(0, PLAYER_HIT_RESPONSE_NONE),
|
||||
/* Mirror Ray */ DMG_ENTRY(0, PLAYER_HIT_RESPONSE_NONE),
|
||||
/* Kokiri spin */ DMG_ENTRY(1, DUMMY_PLAYER_HIT_RESPONSE_NORMAL),
|
||||
|
||||
@@ -1694,7 +1694,7 @@ void func_800ED848(u8 inputEnabled) {
|
||||
sOcarinaInpEnabled = inputEnabled;
|
||||
}
|
||||
|
||||
void Audio_OcaSetInstrument(u8 arg0) {
|
||||
void AudioOcarina_SetInstrument(u8 arg0) {
|
||||
if (D_80130F10 == arg0) {
|
||||
return;
|
||||
}
|
||||
@@ -2191,14 +2191,14 @@ void func_800EE824(void) {
|
||||
D_80131C80++;
|
||||
} else {
|
||||
D_80131C80 = 3;
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
}
|
||||
D_80131C88 = 1200;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
Audio_SetSoundBanksMute(0);
|
||||
Audio_OcaSetInstrument(D_80131C84);
|
||||
AudioOcarina_SetInstrument(D_80131C84);
|
||||
Audio_OcaSetSongPlayback(OCARINA_SONG_SCARECROW_LONG + 1, 1);
|
||||
D_80131C84++;
|
||||
D_80131C80++;
|
||||
@@ -4223,12 +4223,12 @@ void Audio_StepFreqLerp(FreqLerp* lerp) {
|
||||
}
|
||||
}
|
||||
|
||||
void func_800F47BC(void) {
|
||||
void Audio_SetBgmVolumeOffDuringFanfare(void) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0, 10);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0, 10);
|
||||
}
|
||||
|
||||
void func_800F47FC(void) {
|
||||
void Audio_SetBgmVolumeOnDuringFanfare(void) {
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_MAIN, 1, 0x7F, 3);
|
||||
Audio_SetVolScale(SEQ_PLAYER_BGM_SUB, 1, 0x7F, 3);
|
||||
}
|
||||
@@ -5122,7 +5122,7 @@ void func_800F6C34(void) {
|
||||
sAudioExtraFilter = 0;
|
||||
sAudioBaseFilter2 = 0;
|
||||
sAudioExtraFilter2 = 0;
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
sRiverFreqScaleLerp.remainingFrames = 0;
|
||||
sWaterfallFreqScaleLerp.remainingFrames = 0;
|
||||
sRiverFreqScaleLerp.value = 1.0f;
|
||||
|
||||
@@ -2065,15 +2065,15 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
sDbCamAnim.unk_04 = 0;
|
||||
} else if (CHECK_BTN_ALL(sPlayState->state.input[2].press.button, BTN_CLEFT)) {
|
||||
sDbCamAnim.unk_0A = 0;
|
||||
Interface_ChangeAlpha(2);
|
||||
ShrinkWindow_SetVal(0);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
D_8016110C = 0;
|
||||
return 2;
|
||||
}
|
||||
|
||||
if (func_800B91B0(cam, dbCamera) == 0) {
|
||||
Interface_ChangeAlpha(2);
|
||||
ShrinkWindow_SetVal(0);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_GET_RUPY, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
@@ -2230,8 +2230,8 @@ s32 DbCamera_UpdateDemoControl(DbCamera* dbCamera, Camera* cam) {
|
||||
sDbCamAnim.unk_04 = 0.0f;
|
||||
sDbCamAnim.unk_0A = 1;
|
||||
sDbCamAnim.unk_0C = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
D_8016110C = 0;
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_HP_RECOVER, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
|
||||
@@ -5,7 +5,7 @@ s32 D_8012CED0 = 0;
|
||||
s32 sShrinkWindowVal = 0;
|
||||
s32 sShrinkWindowCurrentVal = 0;
|
||||
|
||||
void ShrinkWindow_SetVal(s32 value) {
|
||||
void Letterbox_SetSizeTarget(s32 value) {
|
||||
if (CVarGetInteger(CVAR_ENHANCEMENT("DisableBlackBars"), 0)) {
|
||||
sShrinkWindowVal = 0;
|
||||
return;
|
||||
|
||||
@@ -1456,8 +1456,8 @@ void Actor_SwapHookshotAttachment(PlayState* play, Actor* actorA, Actor* actorB)
|
||||
}
|
||||
|
||||
void Actor_RequestHorseCameraSetting(PlayState* play, Player* player) {
|
||||
if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && func_800C0CB8(play)) {
|
||||
Camera_ChangeSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
|
||||
if ((play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_4) && Play_CamIsNotFixed(play)) {
|
||||
Camera_RequestSetting(Play_GetCamera(play, CAM_ID_MAIN), CAM_SET_HORSE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4087,7 +4087,7 @@ u16 SurfaceType_GetSfx(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId)
|
||||
/**
|
||||
* SurfaceType get terrain slope surface
|
||||
*/
|
||||
u32 SurfaceType_GetSlope(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
u32 SurfaceType_GetFloorEffect(CollisionContext* colCtx, CollisionPoly* poly, s32 bgId) {
|
||||
return SurfaceType_GetData(colCtx, poly, bgId, 1) >> 4 & 3;
|
||||
}
|
||||
|
||||
|
||||
@@ -775,7 +775,7 @@ void Camera_UpdateInterface(s16 flags) {
|
||||
if (flags & SHRINKWIN_CURVAL) {
|
||||
ShrinkWindow_SetCurrentVal(sCameraShrinkWindowVal);
|
||||
} else {
|
||||
ShrinkWindow_SetVal(sCameraShrinkWindowVal);
|
||||
Letterbox_SetSizeTarget(sCameraShrinkWindowVal);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -786,7 +786,7 @@ void Camera_UpdateInterface(s16 flags) {
|
||||
}
|
||||
if (interfaceAlpha != sCameraInterfaceAlpha) {
|
||||
sCameraInterfaceAlpha = interfaceAlpha;
|
||||
Interface_ChangeAlpha(sCameraInterfaceAlpha);
|
||||
Interface_ChangeHudVisibilityMode(sCameraInterfaceAlpha);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7416,7 +7416,7 @@ s32 Camera_DbgChangeMode(Camera* camera) {
|
||||
}
|
||||
if (changeDir != 0) {
|
||||
sDbgModeIdx = (sDbgModeIdx + changeDir) % 6;
|
||||
if (Camera_ChangeSetting(camera, D_8011DAFC[sDbgModeIdx]) > 0) {
|
||||
if (Camera_RequestSetting(camera, D_8011DAFC[sDbgModeIdx]) > 0) {
|
||||
osSyncPrintf("camera: force change SET to %s!\n", sCameraSettingNames[D_8011DAFC[sDbgModeIdx]]);
|
||||
}
|
||||
}
|
||||
@@ -8023,7 +8023,7 @@ s16 Camera_ChangeSettingFlags(Camera* camera, s16 setting, s16 flags) {
|
||||
return setting;
|
||||
}
|
||||
|
||||
s32 Camera_ChangeSetting(Camera* camera, s16 setting) {
|
||||
s32 Camera_RequestSetting(Camera* camera, s16 setting) {
|
||||
return Camera_ChangeSettingFlags(camera, setting, 0);
|
||||
}
|
||||
|
||||
@@ -8225,14 +8225,14 @@ s32 Camera_ChangeDoorCam(Camera* camera, Actor* doorActor, s16 camDataIdx, f32 a
|
||||
}
|
||||
|
||||
if (camDataIdx == -1) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_DOORC);
|
||||
Camera_RequestSetting(camera, CAM_SET_DOORC);
|
||||
osSyncPrintf(".... change default door camera (set %d)\n", CAM_SET_DOORC);
|
||||
} else {
|
||||
s32 setting = Camera_GetCamDataSetting(camera, camDataIdx);
|
||||
|
||||
camera->unk_14A |= 0x40;
|
||||
|
||||
if (Camera_ChangeSetting(camera, setting) >= 0) {
|
||||
if (Camera_RequestSetting(camera, setting) >= 0) {
|
||||
camera->camDataIdx = camDataIdx;
|
||||
camera->unk_14A |= 4;
|
||||
}
|
||||
|
||||
@@ -15,5 +15,5 @@ void SaveContext_Init(void) {
|
||||
gSaveContext.skyboxTime = 0;
|
||||
gSaveContext.dogIsLost = true;
|
||||
gSaveContext.nextTransitionType = TRANS_NEXT_TYPE_DEFAULT;
|
||||
gSaveContext.unk_13EE = 50;
|
||||
gSaveContext.prevHudVisibilityMode = 50;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ void func_801109B0(PlayState* play) {
|
||||
u8 timerId;
|
||||
|
||||
gSaveContext.sunsSongState = SUNSSONG_INACTIVE;
|
||||
gSaveContext.unk_13E8 = gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode = 0;
|
||||
|
||||
View_Init(&interfaceCtx->view, play->state.gfxCtx);
|
||||
|
||||
|
||||
@@ -195,8 +195,8 @@ u32 func_8006472C(PlayState* play, CutsceneContext* csCtx, f32 target) {
|
||||
}
|
||||
|
||||
void func_80064760(PlayState* play, CutsceneContext* csCtx) {
|
||||
Interface_ChangeAlpha(1);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
|
||||
if (func_8006472C(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(1);
|
||||
@@ -206,8 +206,8 @@ void func_80064760(PlayState* play, CutsceneContext* csCtx) {
|
||||
|
||||
void func_800647C0(PlayState* play, CutsceneContext* csCtx) {
|
||||
func_80068C3C(play, csCtx);
|
||||
Interface_ChangeAlpha(1);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
|
||||
if (func_8006472C(play, csCtx, 1.0f)) {
|
||||
Audio_SetCutsceneFlag(1);
|
||||
@@ -399,10 +399,10 @@ void func_80064824(PlayState* play, CutsceneContext* csCtx, CsCmdBase* cmd) {
|
||||
}
|
||||
break;
|
||||
case 28:
|
||||
play->unk_11DE9 = 1;
|
||||
play->haltAllActors = 1;
|
||||
break;
|
||||
case 29:
|
||||
play->unk_11DE9 = 0;
|
||||
play->haltAllActors = 0;
|
||||
break;
|
||||
case 30:
|
||||
Flags_SetEnv(play, 3);
|
||||
@@ -1698,7 +1698,7 @@ void Cutscene_Command_Textbox(PlayState* play, CutsceneContext* csCtx, CsCmdText
|
||||
}
|
||||
|
||||
if (csCtx->frames == originalCsFrames) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
D_8011E1C0 = 0;
|
||||
D_8011E1C4 = 0;
|
||||
}
|
||||
@@ -2165,8 +2165,8 @@ void func_80068ECC(PlayState* play, CutsceneContext* csCtx) {
|
||||
}
|
||||
|
||||
if (gSaveContext.cutsceneTrigger == 0) {
|
||||
Interface_ChangeAlpha(1);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
ShrinkWindow_SetCurrentVal(0x20);
|
||||
csCtx->state++;
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ void GameOver_Update(PlayState* play) {
|
||||
for (int buttonIndex = 0; buttonIndex < ARRAY_COUNT(gSaveContext.buttonStatus); buttonIndex++) {
|
||||
gSaveContext.buttonStatus[buttonIndex] = BTN_ENABLED;
|
||||
}
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.unk_13E8 = gSaveContext.unk_13EA =
|
||||
gSaveContext.unk_13EC = 0;
|
||||
gSaveContext.forceRisingButtonAlphas = gSaveContext.nextHudVisibilityMode = gSaveContext.hudVisibilityMode =
|
||||
gSaveContext.hudVisibilityModeTimer = 0;
|
||||
|
||||
Environment_InitGameOverLights(play);
|
||||
gGameOverTimer = 20;
|
||||
@@ -109,7 +109,7 @@ void GameOver_Update(PlayState* play) {
|
||||
gameOverCtx->state++;
|
||||
gGameOverTimer = 0;
|
||||
Environment_InitGameOverLights(play);
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
return;
|
||||
|
||||
case GAMEOVER_REVIVE_RUMBLE:
|
||||
|
||||
@@ -25,7 +25,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_START)) {
|
||||
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
gSaveContext.prevHudVisibilityMode = gSaveContext.hudVisibilityMode;
|
||||
|
||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L))
|
||||
CVarSetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 1);
|
||||
@@ -60,7 +60,7 @@ void KaleidoSetup_Update(PlayState* play) {
|
||||
R_UPDATE_RATE = 2;
|
||||
|
||||
if (ShrinkWindow_GetVal()) {
|
||||
ShrinkWindow_SetVal(0);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
}
|
||||
|
||||
func_800F64E0(1);
|
||||
|
||||
@@ -2165,7 +2165,7 @@ void Environment_FadeInGameOverLights(PlayState* play) {
|
||||
sGameOverLightsIntensity += 2;
|
||||
}
|
||||
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
if (play->envCtx.adjAmbientColor[i] > -255) {
|
||||
play->envCtx.adjAmbientColor[i] -= 12;
|
||||
@@ -2212,7 +2212,7 @@ void Environment_FadeOutGameOverLights(PlayState* play) {
|
||||
sGameOverLightsIntensity, sGameOverLightsIntensity, sGameOverLightsIntensity, 255);
|
||||
}
|
||||
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
for (i = 0; i < 3; i++) {
|
||||
Math_SmoothStepToS(&play->envCtx.adjAmbientColor[i], 0, 5, 12, 1);
|
||||
Math_SmoothStepToS(&play->envCtx.adjLight1Color[i], 0, 5, 12, 1);
|
||||
@@ -2440,7 +2440,7 @@ void Environment_AdjustLights(PlayState* play, f32 arg1, f32 arg2, f32 arg3, f32
|
||||
f32 temp;
|
||||
s32 i;
|
||||
|
||||
if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5 && func_800C0CB8(play)) {
|
||||
if (play->roomCtx.curRoom.behaviorType1 != ROOM_BEHAVIOR_TYPE1_5 && Play_CamIsNotFixed(play)) {
|
||||
arg1 = CLAMP_MIN(arg1, 0.0f);
|
||||
arg1 = CLAMP_MAX(arg1, 1.0f);
|
||||
|
||||
|
||||
@@ -142,13 +142,13 @@ void Message_UpdateOcarinaGame(PlayState* play) {
|
||||
play->msgCtx.msgMode++;
|
||||
|
||||
if (play->msgCtx.msgMode == MSGMODE_MEMORY_GAME_PLAYER_PLAYING) {
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
func_800ECC04((1 << OCARINA_SONG_MEMORY_GAME) + 0x8000);
|
||||
msgCtx->textDrawPos = msgCtx->decodedTextLen;
|
||||
} else if (msgCtx->msgMode == MSGMODE_MEMORY_GAME_RIGHT_SKULLKID_PLAYING) {
|
||||
Audio_OcaSetInstrument(6);
|
||||
AudioOcarina_SetInstrument(6);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
Audio_OcaSetSongPlayback(OCARINA_SONG_MEMORY_GAME + 1, 1);
|
||||
@@ -891,8 +891,8 @@ void Message_HandleOcarina(PlayState* play) {
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_SCARECROW_LONG_PLAYBACK) {
|
||||
// "Recording Playback / Recording Playback / Recording Playback / Recording Playback -> "
|
||||
osSyncPrintf("録音再生 録音再生 録音再生 録音再生 -> ");
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
sOcarinaNoteBufPos = sOcarinaNoteBufLen = 0;
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos;
|
||||
@@ -907,8 +907,8 @@ void Message_HandleOcarina(PlayState* play) {
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_SCARECROW_PLAYBACK) {
|
||||
// "8 Note Playback / 8 Note Playback / 8 Note Playback -> "
|
||||
osSyncPrintf("8音再生 8音再生 8音再生 -> ");
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
sOcarinaNoteBufPos = sOcarinaNoteBufLen = 0;
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos;
|
||||
@@ -2694,10 +2694,10 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
sDisplayNextMessageAsEnglish = false;
|
||||
|
||||
if (msgCtx->msgMode == MSGMODE_NONE) {
|
||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||
gSaveContext.prevHudVisibilityMode = gSaveContext.hudVisibilityMode;
|
||||
}
|
||||
if (YREG(15) == 0x10) {
|
||||
Interface_ChangeAlpha(5);
|
||||
Interface_ChangeHudVisibilityMode(5);
|
||||
}
|
||||
|
||||
sMessageHasSetSfx = D_8014B2F4 = sTextboxSkipped = sTextIsCredits = 0;
|
||||
@@ -2744,7 +2744,7 @@ void Message_OpenText(PlayState* play, u16 textId) {
|
||||
textId == 0x2061 || // Learning Epona's Song
|
||||
textId == 0x5035 || // Guru-Guru in Windmill
|
||||
textId == 0x40AC) { // Ocarina Frog Minigame
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
msgCtx->textId = textId;
|
||||
|
||||
@@ -2984,9 +2984,9 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
msgCtx->textboxColorAlphaCurrent = msgCtx->textboxColorAlphaTarget;
|
||||
if (noStop == false) {
|
||||
Interface_LoadActionLabelB(play, DO_ACTION_STOP);
|
||||
noStop = gSaveContext.unk_13EA;
|
||||
Interface_ChangeAlpha(0xA);
|
||||
gSaveContext.unk_13EA = noStop;
|
||||
noStop = gSaveContext.hudVisibilityMode;
|
||||
Interface_ChangeHudVisibilityMode(0xA);
|
||||
gSaveContext.hudVisibilityMode = noStop;
|
||||
}
|
||||
// "Music Performance Start"
|
||||
osSyncPrintf("演奏開始\n");
|
||||
@@ -2997,14 +2997,14 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
msgCtx->msgMode = MSGMODE_FROGS_START;
|
||||
msgCtx->textBoxType = TEXTBOX_TYPE_BLUE;
|
||||
} else if (ocarinaActionId == OCARINA_ACTION_MEMORY_GAME) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
Message_Decode(play);
|
||||
msgCtx->msgMode = MSGMODE_MEMORY_GAME_START;
|
||||
} else if (ocarinaActionId == OCARINA_ACTION_SCARECROW_LONG_PLAYBACK) {
|
||||
// "?????Recording Playback / Recording Playback / Recording Playback / Recording Playback -> "
|
||||
osSyncPrintf("?????録音再生 録音再生 録音再生 録音再生 -> ");
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
sOcarinaNoteBufPos = sOcarinaNoteBufLen = 0;
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos;
|
||||
@@ -3012,8 +3012,8 @@ void Message_StartOcarina(PlayState* play, u16 ocarinaActionId) {
|
||||
msgCtx->stateTimer = 3;
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_LONG_PLAYBACK;
|
||||
Audio_OcaSetSongPlayback(OCARINA_SONG_SCARECROW_LONG + 1, 1);
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(1);
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
for (k = 0, j = 0; j < 48; j++) {
|
||||
Font_LoadCharWide(&play->msgCtx.font, 0x8140, k);
|
||||
@@ -3362,7 +3362,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
case MSGMODE_OCARINA_STARTING:
|
||||
case MSGMODE_SONG_DEMONSTRATION_STARTING:
|
||||
case MSGMODE_SONG_PLAYBACK_STARTING:
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
|
||||
@@ -3430,7 +3430,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_NOWARP) {
|
||||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SARIAS ||
|
||||
msgCtx->ocarinaStaff->state == OCARINA_SONG_SCARECROW) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
@@ -3445,11 +3445,11 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_CHECK_SCARECROW) {
|
||||
if (msgCtx->ocarinaStaff->state < OCARINA_SONG_SCARECROW) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
@@ -3465,7 +3465,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_TRE_BOX_APPEAR, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_FREE_PLAY) {
|
||||
// "Ocarina_Free Correct Example Performance"
|
||||
@@ -3482,21 +3482,21 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
}
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
} else {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_STARTING;
|
||||
}
|
||||
} else if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
msgCtx->msgMode = MSGMODE_OCARINA_FAIL;
|
||||
} else if (isB_Held) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
@@ -3541,7 +3541,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
|
||||
msgCtx->stateTimer--;
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
if (msgCtx->msgMode == MSGMODE_OCARINA_CORRECT_PLAYBACK) {
|
||||
// "Correct Example Performance"
|
||||
osSyncPrintf("正解模範演奏=%x\n", msgCtx->lastPlayedSong);
|
||||
@@ -3615,7 +3615,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
case MSGMODE_SONG_PLAYED:
|
||||
msgCtx->stateTimer--;
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
osSyncPrintf("Na_StopOcarinaMode();\n");
|
||||
osSyncPrintf("Na_StopOcarinaMode();\n");
|
||||
@@ -3645,12 +3645,12 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
} else {
|
||||
Message_DrawText(play, &gfx);
|
||||
}
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
Audio_OcaSetSongPlayback(msgCtx->lastPlayedSong + 1, 1);
|
||||
} else {
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
}
|
||||
if (msgCtx->lastPlayedSong != OCARINA_SONG_SCARECROW) {
|
||||
Audio_PlayFanfare(sOcarinaSongFanfares[msgCtx->lastPlayedSong]);
|
||||
@@ -3672,15 +3672,15 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
// "ocarina_no=%d Song Chosen=%d"
|
||||
osSyncPrintf("ocarina_no=%d 選曲=%d\n", msgCtx->ocarinaAction, 0x16);
|
||||
if (msgCtx->ocarinaAction < OCARINA_ACTION_TEACH_SARIA) {
|
||||
Audio_OcaSetInstrument(4);
|
||||
AudioOcarina_SetInstrument(4);
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_TEACH_EPONA) {
|
||||
Audio_OcaSetInstrument(2);
|
||||
AudioOcarina_SetInstrument(2);
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_TEACH_LULLABY) {
|
||||
Audio_OcaSetInstrument(3);
|
||||
AudioOcarina_SetInstrument(3);
|
||||
} else if (msgCtx->ocarinaAction == OCARINA_ACTION_TEACH_STORMS) {
|
||||
Audio_OcaSetInstrument(5);
|
||||
AudioOcarina_SetInstrument(5);
|
||||
} else {
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
}
|
||||
// "Example Performance"
|
||||
osSyncPrintf("模範演奏=%x\n", msgCtx->ocarinaAction - OCARINA_ACTION_TEACH_MINUET);
|
||||
@@ -3726,7 +3726,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
}
|
||||
break;
|
||||
case MSGMODE_SONG_PLAYED_ACT_BEGIN:
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Message_ResetOcarinaNoteState();
|
||||
msgCtx->msgMode = MSGMODE_SONG_PLAYED_ACT;
|
||||
msgCtx->stateTimer = 2;
|
||||
@@ -3871,7 +3871,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
// "Scarecrow Recording Initialization"
|
||||
osSyncPrintf("案山子録音 初期化\n");
|
||||
Audio_OcaSetRecordingState(1);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetRecordingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
sOcarinaNoteBufLen = 0;
|
||||
@@ -3957,7 +3957,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
if (msgCtx->stateTimer == 0) {
|
||||
if (msgCtx->ocarinaStaff->state == 0) {
|
||||
osSyncPrintf("bbbbbbbbbbb\n");
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_0F;
|
||||
Message_CloseTextbox(play);
|
||||
}
|
||||
@@ -3967,7 +3967,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
break;
|
||||
case MSGMODE_SCARECROW_RECORDING_START:
|
||||
Audio_OcaSetRecordingState(2);
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->msgMode = MSGMODE_SCARECROW_RECORDING_ONGOING;
|
||||
if (gSaveContext.language == LANGUAGE_JPN && !sDisplayNextMessageAsEnglish) {
|
||||
Message_DrawTextJPN(play, &gfx);
|
||||
@@ -4016,13 +4016,13 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
break;
|
||||
case MSGMODE_SCARECROW_RECORDING_FAILED:
|
||||
osSyncPrintf("cccccccccccc\n");
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Message_StartTextbox(play, 0x40AD, NULL); // Bonooru doesn't remember your song
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_04;
|
||||
break;
|
||||
case MSGMODE_MEMORY_GAME_START:
|
||||
Audio_OcaSetInstrument(1);
|
||||
Audio_OcaSetInstrument(6);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
AudioOcarina_SetInstrument(6);
|
||||
Audio_OcaMemoryGameStart(gSaveContext.ocarinaGameRoundNum);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetDisplayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
@@ -4078,7 +4078,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
if (msgCtx->ocarinaStaff->state == 0xFF) {
|
||||
// "Musical round failed!!!!!!!!!"
|
||||
osSyncPrintf("輪唱失敗!!!!!!!!!\n");
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
Audio_PlaySoundGeneral(NA_SE_SY_OCARINA_ERROR, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
msgCtx->stateTimer = 10;
|
||||
@@ -4132,7 +4132,7 @@ void Message_DrawMain(PlayState* play, Gfx** p) {
|
||||
}
|
||||
break;
|
||||
case MSGMODE_FROGS_START:
|
||||
Audio_OcaSetInstrument(1);
|
||||
AudioOcarina_SetInstrument(1);
|
||||
msgCtx->ocarinaStaff = Audio_OcaGetPlayingStaff();
|
||||
msgCtx->ocarinaStaff->pos = sOcarinaNoteBufPos = 0;
|
||||
play->msgCtx.ocarinaMode = OCARINA_MODE_01;
|
||||
@@ -4534,7 +4534,7 @@ void Message_Update(PlayState* play) {
|
||||
case MSGMODE_TEXT_NEXT_MSG:
|
||||
Message_Decode(play);
|
||||
if (sTextFade) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
if (D_80153D74 != 0) {
|
||||
msgCtx->textDrawPos = msgCtx->decodedTextLen;
|
||||
@@ -4620,7 +4620,7 @@ void Message_Update(PlayState* play) {
|
||||
if (msgCtx->textId == 0x301F || msgCtx->textId == 0xA || msgCtx->textId == 0xC || msgCtx->textId == 0xCF ||
|
||||
msgCtx->textId == 0x21C || msgCtx->textId == 9 || msgCtx->textId == 0x4078 ||
|
||||
msgCtx->textId == 0x2015 || msgCtx->textId == 0x3040) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
gSaveContext.prevHudVisibilityMode = 0x32;
|
||||
}
|
||||
if (play->csCtx.state == 0) {
|
||||
osSyncPrintf(VT_FGCOL(GREEN));
|
||||
@@ -4631,11 +4631,12 @@ void Message_Update(PlayState* play) {
|
||||
(msgCtx->textId != 0x3055 && gSaveContext.cutsceneIndex < 0xFFF0)) {
|
||||
osSyncPrintf("=== day_time=%x ", ((void)0, gSaveContext.cutsceneIndex));
|
||||
if (play->activeCamera == CAM_ID_MAIN) {
|
||||
if (gSaveContext.unk_13EE == 0 || gSaveContext.unk_13EE == 1 || gSaveContext.unk_13EE == 2) {
|
||||
gSaveContext.unk_13EE = 0x32;
|
||||
if (gSaveContext.prevHudVisibilityMode == 0 || gSaveContext.prevHudVisibilityMode == 1 ||
|
||||
gSaveContext.prevHudVisibilityMode == 2) {
|
||||
gSaveContext.prevHudVisibilityMode = 0x32;
|
||||
}
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(gSaveContext.unk_13EE);
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_ChangeHudVisibilityMode(gSaveContext.prevHudVisibilityMode);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -962,7 +962,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
} break;
|
||||
case 9806:
|
||||
csCam->timer = -99;
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
func_800C0808(play, camIdx, player, CAM_SET_TURN_AROUND);
|
||||
csCam->data2 = 0xC;
|
||||
} else {
|
||||
@@ -971,7 +971,7 @@ s32 OnePointCutscene_SetInfo(PlayState* play, s16 camIdx, s16 csId, Actor* actor
|
||||
}
|
||||
break;
|
||||
case 9908:
|
||||
if (func_800C0CB8(play)) {
|
||||
if (Play_CamIsNotFixed(play)) {
|
||||
D_801231B4[0].eyeTargetInit.z = D_801231B4[1].eyeTargetInit.z = !LINK_IS_ADULT ? 100.0f : 120.0f;
|
||||
|
||||
if (player->stateFlags1 & PLAYER_STATE1_IN_WATER) {
|
||||
@@ -1187,7 +1187,7 @@ s16 OnePointCutscene_Init(PlayState* play, s16 csId, s16 timer, Actor* actor, s1
|
||||
OnePointCutscene_SetAsChild(play, vChildCamIdx, csCamIdx);
|
||||
vCsStatus = CAM_STAT_WAIT;
|
||||
} else {
|
||||
Interface_ChangeAlpha(2);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
}
|
||||
OnePointCutscene_SetAsChild(play, csCamIdx, parentCamIdx);
|
||||
|
||||
|
||||
+46
-44
@@ -196,11 +196,12 @@ static const char* actionsTbl[] = {
|
||||
};
|
||||
|
||||
// original name: "alpha_change"
|
||||
void Interface_ChangeAlpha(u16 alphaType) {
|
||||
if (alphaType != gSaveContext.unk_13EA) {
|
||||
osSyncPrintf("ALPHAーTYPE=%d LAST_TIME_TYPE=%d\n", alphaType, gSaveContext.unk_13EE);
|
||||
gSaveContext.unk_13EA = gSaveContext.unk_13E8 = alphaType;
|
||||
gSaveContext.unk_13EC = 1;
|
||||
void Interface_ChangeHudVisibilityMode(u16 hudVisibilityMode) {
|
||||
if (hudVisibilityMode != gSaveContext.hudVisibilityMode) {
|
||||
osSyncPrintf("ALPHAーTYPE=%d LAST_TIME_TYPE=%d\n", hudVisibilityMode,
|
||||
gSaveContext.prevHudVisibilityMode);
|
||||
gSaveContext.hudVisibilityMode = gSaveContext.nextHudVisibilityMode = hudVisibilityMode;
|
||||
gSaveContext.hudVisibilityModeTimer = 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -347,13 +348,13 @@ void func_80082850(PlayState* play, s16 maxAlpha) {
|
||||
InterfaceContext* interfaceCtx = &play->interfaceCtx;
|
||||
s16 alpha = 255 - maxAlpha;
|
||||
|
||||
switch (gSaveContext.unk_13E8) {
|
||||
switch (gSaveContext.nextHudVisibilityMode) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 8:
|
||||
osSyncPrintf("a_alpha=%d, c_alpha=%d → ", interfaceCtx->aAlpha, interfaceCtx->cLeftAlpha);
|
||||
|
||||
if (gSaveContext.unk_13E8 == 8) {
|
||||
if (gSaveContext.nextHudVisibilityMode == 8) {
|
||||
if (interfaceCtx->bAlpha != 255) {
|
||||
interfaceCtx->bAlpha = alpha;
|
||||
}
|
||||
@@ -852,28 +853,28 @@ void func_80083108(PlayState* play) {
|
||||
BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(6);
|
||||
Interface_ChangeHudVisibilityMode(6);
|
||||
}
|
||||
|
||||
if (play->transitionMode != TRANS_MODE_OFF) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
} else if (gSaveContext.minigameState == 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(8);
|
||||
} else if (play->shootingGalleryStatus > 1) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(8);
|
||||
} else if ((play->sceneNum == SCENE_BOMBCHU_BOWLING_ALLEY) && Flags_GetSwitch(play, 0x38)) {
|
||||
Interface_ChangeAlpha(8);
|
||||
Interface_ChangeHudVisibilityMode(8);
|
||||
} else if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
} else {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
}
|
||||
// Don't hide the HUD in the Chamber of Sages when in Boss Rush.
|
||||
} else if (play->sceneNum == SCENE_CHAMBER_OF_THE_SAGES && !IS_BOSS_RUSH) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
} else if (play->sceneNum == SCENE_FISHING_POND) {
|
||||
gSaveContext.forceRisingButtonAlphas = 2;
|
||||
if (play->interfaceCtx.unk_260 != 0) {
|
||||
@@ -881,17 +882,17 @@ void func_80083108(PlayState* play) {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.equips.buttonItems[0];
|
||||
GameInteractor_Should(VB_TEMP_B_STASH_SWORDLESS, true, play);
|
||||
gSaveContext.equips.buttonItems[0] = ITEM_FISHING_POLE;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_LoadItemIcon1(play, 0);
|
||||
Interface_ChangeAlpha(12);
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
|
||||
if (gSaveContext.unk_13EA != 12) {
|
||||
Interface_ChangeAlpha(12);
|
||||
if (gSaveContext.hudVisibilityMode != 12) {
|
||||
Interface_ChangeHudVisibilityMode(12);
|
||||
}
|
||||
} else if (gSaveContext.equips.buttonItems[0] == ITEM_FISHING_POLE) {
|
||||
gSaveContext.equips.buttonItems[0] = gSaveContext.buttonStatus[0];
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
|
||||
GameInteractor_Should(VB_TEMP_B_RESTORE_SWORDLESS, true);
|
||||
|
||||
@@ -903,17 +904,17 @@ void func_80083108(PlayState* play) {
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
} else {
|
||||
if (gSaveContext.buttonStatus[0] == BTN_ENABLED) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
}
|
||||
} else if (msgCtx->msgMode == MSGMODE_NONE) {
|
||||
if (GameInteractor_PacifistModeActive()) {
|
||||
@@ -961,10 +962,10 @@ void func_80083108(PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) ||
|
||||
(player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
|
||||
if (gSaveContext.buttonStatus[0] != BTN_DISABLED) {
|
||||
@@ -976,8 +977,8 @@ void func_80083108(PlayState* play) {
|
||||
gSaveContext.buttonStatus[6] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[7] = BTN_DISABLED;
|
||||
gSaveContext.buttonStatus[8] = BTN_DISABLED;
|
||||
gSaveContext.unk_13EA = 0;
|
||||
Interface_ChangeAlpha(50);
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
}
|
||||
} else if ((gSaveContext.eventInf[0] & 0xF) == 1) {
|
||||
if (player->stateFlags1 & PLAYER_STATE1_ON_HORSE) {
|
||||
@@ -1032,10 +1033,10 @@ void func_80083108(PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
} else {
|
||||
if (interfaceCtx->restrictions.bButton == 0) {
|
||||
if ((gSaveContext.equips.buttonItems[0] == ITEM_SLINGSHOT) ||
|
||||
@@ -1305,9 +1306,9 @@ void func_80083108(PlayState* play) {
|
||||
}
|
||||
|
||||
if (sp28) {
|
||||
gSaveContext.unk_13EA = 0;
|
||||
gSaveContext.hudVisibilityMode = 0;
|
||||
if ((play->transitionTrigger == TRANS_TRIGGER_OFF) && (play->transitionMode == TRANS_MODE_OFF)) {
|
||||
Interface_ChangeAlpha(50);
|
||||
Interface_ChangeHudVisibilityMode(50);
|
||||
osSyncPrintf("???????? alpha_change( 50 ); ?????\n");
|
||||
} else {
|
||||
osSyncPrintf("game_play->fade_direction || game_play->fbdemo_wipe_modem");
|
||||
@@ -1751,7 +1752,7 @@ void func_80084BF4(PlayState* play, u16 flag) {
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
gSaveContext.buttonStatus[5] = gSaveContext.buttonStatus[6] = gSaveContext.buttonStatus[7] =
|
||||
gSaveContext.buttonStatus[8] = BTN_ENABLED;
|
||||
Interface_ChangeAlpha(7);
|
||||
Interface_ChangeHudVisibilityMode(7);
|
||||
} else {
|
||||
gSaveContext.buttonStatus[0] = gSaveContext.buttonStatus[1] = gSaveContext.buttonStatus[2] =
|
||||
gSaveContext.buttonStatus[3] = BTN_ENABLED;
|
||||
@@ -4198,7 +4199,8 @@ void Interface_DrawItemButtons(PlayState* play) {
|
||||
// C-Up Button Texture, Color & Label (Navi Text)
|
||||
gDPPipeSync(OVERLAY_DISP++);
|
||||
|
||||
if ((gSaveContext.unk_13EA == 1) || (gSaveContext.unk_13EA == 2) || (gSaveContext.unk_13EA == 5)) {
|
||||
if ((gSaveContext.hudVisibilityMode == 1) || (gSaveContext.hudVisibilityMode == 2) ||
|
||||
(gSaveContext.hudVisibilityMode == 5)) {
|
||||
temp = 0;
|
||||
} else if ((player->stateFlags1 & PLAYER_STATE1_CLIMBING_LADDER) ||
|
||||
(Player_GetEnvironmentalHazard(play) == 4) || (player->stateFlags2 & PLAYER_STATE2_CRAWLING)) {
|
||||
@@ -6520,7 +6522,7 @@ void Interface_Update(PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
switch (gSaveContext.unk_13E8) {
|
||||
switch (gSaveContext.nextHudVisibilityMode) {
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
@@ -6534,20 +6536,20 @@ void Interface_Update(PlayState* play) {
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
alpha = 255 - (gSaveContext.unk_13EC << 5);
|
||||
alpha = 255 - (gSaveContext.hudVisibilityModeTimer << 5);
|
||||
if (alpha < 0) {
|
||||
alpha = 0;
|
||||
}
|
||||
|
||||
func_80082850(play, alpha);
|
||||
gSaveContext.unk_13EC++;
|
||||
gSaveContext.hudVisibilityModeTimer++;
|
||||
|
||||
if (alpha == 0) {
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
gSaveContext.nextHudVisibilityMode = 0;
|
||||
}
|
||||
break;
|
||||
case 50:
|
||||
alpha = 255 - (gSaveContext.unk_13EC << 5);
|
||||
alpha = 255 - (gSaveContext.hudVisibilityModeTimer << 5);
|
||||
if (alpha < 0) {
|
||||
alpha = 0;
|
||||
}
|
||||
@@ -6602,16 +6604,16 @@ void Interface_Update(PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
gSaveContext.unk_13EC++;
|
||||
gSaveContext.hudVisibilityModeTimer++;
|
||||
if (alpha1 == 0xFF) {
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
gSaveContext.nextHudVisibilityMode = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
case 52:
|
||||
gSaveContext.unk_13E8 = 1;
|
||||
gSaveContext.nextHudVisibilityMode = 1;
|
||||
func_80082850(play, 0);
|
||||
gSaveContext.unk_13E8 = 0;
|
||||
gSaveContext.nextHudVisibilityMode = 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -6862,12 +6864,12 @@ void Interface_Update(PlayState* play) {
|
||||
gSaveContext.nextDayTime = 0;
|
||||
play->transitionType = TRANS_TYPE_FADE_BLACK_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_BLACK;
|
||||
play->unk_11DE9 = 1;
|
||||
play->haltAllActors = 1;
|
||||
} else {
|
||||
gSaveContext.nextDayTime = 0x8001;
|
||||
play->transitionType = TRANS_TYPE_FADE_WHITE_FAST;
|
||||
gSaveContext.nextTransitionType = TRANS_TYPE_FADE_WHITE;
|
||||
play->unk_11DE9 = 1;
|
||||
play->haltAllActors = 1;
|
||||
}
|
||||
|
||||
if (play->sceneNum == SCENE_HAUNTED_WASTELAND) {
|
||||
|
||||
@@ -526,7 +526,7 @@ void Play_Init(GameState* thisx) {
|
||||
play->transitionTrigger = TRANS_TRIGGER_END;
|
||||
play->unk_11E16 = 0xFF;
|
||||
play->bgCoverAlpha = 0;
|
||||
play->unk_11DE9 = false;
|
||||
play->haltAllActors = false;
|
||||
|
||||
if (gSaveContext.gameMode != GAMEMODE_TITLE_SCREEN) {
|
||||
if (gSaveContext.nextTransitionType == TRANS_NEXT_TYPE_DEFAULT) {
|
||||
@@ -793,7 +793,7 @@ void Play_Update(PlayState* play) {
|
||||
case TRANS_MODE_SETUP:
|
||||
if (play->transitionTrigger != TRANS_TRIGGER_END) {
|
||||
s16 sceneLayer = 0;
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
|
||||
if (gSaveContext.cutsceneIndex >= 0xFFF0) {
|
||||
sceneLayer = SCENE_LAYER_CUTSCENE_FIRST + (gSaveContext.cutsceneIndex & 0xF);
|
||||
@@ -1191,7 +1191,7 @@ void Play_Update(PlayState* play) {
|
||||
|
||||
PLAY_LOG(3637);
|
||||
|
||||
if (!play->unk_11DE9) {
|
||||
if (!play->haltAllActors) {
|
||||
Actor_UpdateAll(play, &play->actorCtx);
|
||||
}
|
||||
|
||||
@@ -2017,11 +2017,11 @@ s32 func_800C0808(PlayState* play, s16 camId, Player* player, s16 setting) {
|
||||
|
||||
camera = play->cameraPtrs[camIdx];
|
||||
Camera_InitPlayerSettings(camera, player);
|
||||
return Camera_ChangeSetting(camera, setting);
|
||||
return Camera_RequestSetting(camera, setting);
|
||||
}
|
||||
|
||||
s32 Play_CameraChangeSetting(PlayState* play, s16 camId, s16 setting) {
|
||||
return Camera_ChangeSetting(Play_GetCamera(play, camId), setting);
|
||||
return Camera_RequestSetting(Play_GetCamera(play, camId), setting);
|
||||
}
|
||||
|
||||
void func_800C08AC(PlayState* play, s16 camId, s16 arg2) {
|
||||
@@ -2141,7 +2141,7 @@ void Play_TriggerRespawn(PlayState* play) {
|
||||
Play_LoadToLastEntrance(play);
|
||||
}
|
||||
|
||||
s32 func_800C0CB8(PlayState* play) {
|
||||
s32 Play_CamIsNotFixed(PlayState* play) {
|
||||
return (play->roomCtx.curRoom.meshHeader->base.type != 1) && (YREG(15) != 0x20) && (YREG(15) != 0x30) &&
|
||||
(YREG(15) != 0x40) && (play->sceneNum != SCENE_CASTLE_COURTYARD_GUARDS_DAY);
|
||||
}
|
||||
|
||||
@@ -710,7 +710,7 @@ void Player_ReleaseLockOn(Player* this) {
|
||||
* TODO: Learn more about this and give a name to PLAYER_STATE1_19
|
||||
*/
|
||||
void Player_ClearZTargeting(Player* this) {
|
||||
if ((this->actor.bgCheckFlags & 1) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) ||
|
||||
(this->stateFlags1 & (PLAYER_STATE1_CLIMBING_LADDER | PLAYER_STATE1_ON_HORSE | PLAYER_STATE1_IN_WATER)) ||
|
||||
(!(this->stateFlags1 & (PLAYER_STATE1_JUMPING | PLAYER_STATE1_FREEFALL)) &&
|
||||
((this->actor.world.pos.y - this->actor.floorHeight) < 100.0f))) {
|
||||
@@ -930,7 +930,7 @@ s32 Player_GetEnvironmentalHazard(PlayState* play) {
|
||||
envHazard = PLAYER_ENV_HAZARD_HOTROOM - 1;
|
||||
} else if ((this->underwaterTimer > 80) &&
|
||||
((this->currentBoots == PLAYER_BOOTS_IRON) || (this->underwaterTimer >= 300))) { // Deep underwater
|
||||
envHazard = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & 1))
|
||||
envHazard = ((this->currentBoots == PLAYER_BOOTS_IRON) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND))
|
||||
? (PLAYER_ENV_HAZARD_UNDERWATER_FLOOR - 1)
|
||||
: (PLAYER_ENV_HAZARD_UNDERWATER_FREE - 1);
|
||||
} else if (this->stateFlags1 & PLAYER_STATE1_IN_WATER) { // Swimming
|
||||
|
||||
@@ -354,19 +354,19 @@ void BgBdanObjects_ElevatorOscillate(BgBdanObjects* this, PlayState* play) {
|
||||
if (this->switchFlag == 0) {
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
this->cameraSetting = play->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
func_8005AD1C(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
this->switchFlag = 10;
|
||||
}
|
||||
} else {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_NORMAL2);
|
||||
if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->switchFlag != 0) {
|
||||
this->switchFlag--;
|
||||
}
|
||||
}
|
||||
if (this->switchFlag == 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], this->cameraSetting);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], this->cameraSetting);
|
||||
func_8005ACFC(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -404,7 +404,7 @@ void BgDyYoseizo_GreetPlayer_NoReward(BgDyYoseizo* this, PlayState* play) {
|
||||
|
||||
if ((this->dialogState == Message_GetState(&play->msgCtx)) && Message_ShouldAdvance(play)) {
|
||||
Message_CloseTextbox(play);
|
||||
Interface_ChangeAlpha(5);
|
||||
Interface_ChangeHudVisibilityMode(5);
|
||||
this->actionFunc = BgDyYoseizo_SetupHealPlayer_NoReward;
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
||||
case FAIRY_UPGRADE_MAGIC:
|
||||
gSaveContext.isMagicAcquired = true;
|
||||
gSaveContext.magicFillTarget = MAGIC_NORMAL_METER;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
break;
|
||||
case FAIRY_UPGRADE_DOUBLE_MAGIC:
|
||||
if (!gSaveContext.isMagicAcquired) {
|
||||
@@ -733,11 +733,11 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
||||
gSaveContext.isDoubleMagicAcquired = true;
|
||||
gSaveContext.magicFillTarget = MAGIC_DOUBLE_METER;
|
||||
gSaveContext.magicLevel = 0;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
break;
|
||||
case FAIRY_UPGRADE_HALF_DAMAGE:
|
||||
gSaveContext.isDoubleDefenseAcquired = true;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -771,7 +771,7 @@ void BgDyYoseizo_Give_Reward(BgDyYoseizo* this, PlayState* play) {
|
||||
|
||||
this->itemSpawned = true;
|
||||
gSaveContext.healthAccumulator = MAX_HEALTH;
|
||||
Interface_ChangeAlpha(9);
|
||||
Interface_ChangeHudVisibilityMode(9);
|
||||
gSaveContext.itemGetInf[1] |= sItemGetFlags[actionIndex];
|
||||
Item_Give(play, sItemIds[actionIndex]);
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ void BgHidanFslift_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->cameraSetting == 0) {
|
||||
this->cameraSetting = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->cameraSetting != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->cameraSetting = 0;
|
||||
}
|
||||
|
||||
@@ -268,10 +268,10 @@ void func_8088B79C(BgHidanRock* this, PlayState* play) {
|
||||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_169 = 0;
|
||||
}
|
||||
@@ -321,10 +321,10 @@ void func_8088B990(BgHidanRock* this, PlayState* play) {
|
||||
if (this->unk_169 == 0) {
|
||||
this->unk_169 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_169 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_169 = 0;
|
||||
}
|
||||
|
||||
@@ -113,10 +113,10 @@ void BgHidanSyoku_Update(Actor* thisx, PlayState* play) {
|
||||
if (this->unk_168 == 0) {
|
||||
this->unk_168 = 3;
|
||||
}
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!DynaPolyActor_IsPlayerOnTop(&this->dyna)) {
|
||||
if (this->unk_168 != 0) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_168 = 0;
|
||||
}
|
||||
|
||||
@@ -190,9 +190,9 @@ void BgJya1flift_Update(Actor* thisx, PlayState* play2) {
|
||||
tempIsRiding = DynaPolyActor_IsPlayerOnTop(&this->dyna) ? true : false;
|
||||
if ((this->actionFunc == BgJya1flift_Move) || (this->actionFunc == BgJya1flift_DelayMove)) {
|
||||
if (tempIsRiding) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FIRE_PLATFORM);
|
||||
} else if (!tempIsRiding && this->isLinkRiding) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
}
|
||||
this->isLinkRiding = tempIsRiding;
|
||||
|
||||
@@ -147,10 +147,10 @@ void BgJyaLift_Update(Actor* thisx, PlayState* play2) {
|
||||
}
|
||||
if ((this->dyna.interactFlags & DYNA_INTERACT_PLAYER_ABOVE) &&
|
||||
((this->unk_16B & DYNA_INTERACT_PLAYER_ABOVE) == 0)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DIRECTED_YAW);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DIRECTED_YAW);
|
||||
} else if (((this->dyna.interactFlags) & 4) == 0 && ((this->unk_16B & 4)) &&
|
||||
(play->cameraPtrs[CAM_ID_MAIN]->setting == CAM_SET_DIRECTED_YAW)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
this->unk_16B = this->dyna.interactFlags;
|
||||
|
||||
|
||||
@@ -183,7 +183,7 @@ void func_808A3C8C(BgMoriHineri* this, PlayState* play) {
|
||||
|
||||
f0 = 1100.0f - (player->actor.world.pos.z - this->dyna.actor.world.pos.z);
|
||||
this->dyna.actor.shape.rot.z = CLAMP(f0, 0.0f, 1000.0f) * 16.384f;
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
if (this->dyna.actor.params != 0) {
|
||||
this->dyna.actor.shape.rot.z = -this->dyna.actor.shape.rot.z;
|
||||
}
|
||||
|
||||
@@ -209,11 +209,11 @@ void BgMoriRakkatenjo_Update(Actor* thisx, PlayState* play) {
|
||||
osSyncPrintf("camera changed (mori rakka tenjyo) ... \n");
|
||||
sCamSetting = play->cameraPtrs[CAM_ID_MAIN]->setting;
|
||||
Camera_SetCameraData(play->cameraPtrs[CAM_ID_MAIN], 1, &this->dyna.actor, NULL, 0, 0, 0);
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FOREST_BIRDS_EYE);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_FOREST_BIRDS_EYE);
|
||||
}
|
||||
} else if (sCamSetting != CAM_SET_NONE) {
|
||||
osSyncPrintf("camera changed (previous) ... \n");
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON1);
|
||||
sCamSetting = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -63,9 +63,9 @@ void BgSstFloor_Update(BgSstFloor* thisx, PlayState* play) {
|
||||
colHeader->vtxList = SEGMENTED_TO_VIRTUAL(colHeader->vtxList);
|
||||
|
||||
if (DynaPolyActor_IsPlayerAbove(&this->dyna) && (this->dyna.actor.yDistToPlayer < 1000.0f)) {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BOSS_BONGO);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BOSS_BONGO);
|
||||
} else {
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
}
|
||||
|
||||
if (DynaPolyActor_IsPlayerOnTop(&this->dyna) && (player->fallDistance > 1000.0f)) {
|
||||
|
||||
@@ -934,7 +934,7 @@ void BossDodongo_Roll(BossDodongo* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->actor.world.pos.z, sp5C->z, 1.0f, this->unk_1E4, 0.0f);
|
||||
this->unk_1C4 += 2000;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->unk_228 = 7700.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_K_ROLL - SFX_FLAG);
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
|
||||
if (this->csTimer == 20) {
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 0x17);
|
||||
Interface_ChangeAlpha(11); // show hearts only
|
||||
Interface_ChangeHudVisibilityMode(11); // show hearts only
|
||||
}
|
||||
|
||||
if (this->csTimer == 25) {
|
||||
@@ -805,7 +805,7 @@ void BossGanon_IntroCutscene(BossGanon* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (this->csTimer == 100) {
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
}
|
||||
|
||||
if (this->csTimer == 120) {
|
||||
@@ -4142,7 +4142,7 @@ void BossGanon_LightBall_Update(Actor* thisx, PlayState* play2) {
|
||||
spBA = 4;
|
||||
}
|
||||
|
||||
if ((spBA != 0) || (this->actor.bgCheckFlags & 1)) {
|
||||
if ((spBA != 0) || (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
f32 sp58;
|
||||
f32 sp54;
|
||||
f32 phi_f20;
|
||||
|
||||
@@ -1076,7 +1076,7 @@ void func_808FFCFC(BossGanon2* this, PlayState* play) {
|
||||
this->unk_311 = false;
|
||||
func_80900580(this, play);
|
||||
Audio_StopSfxById(NA_SE_EN_MGANON_UNARI);
|
||||
} else if ((this->actor.bgCheckFlags & 8) && func_808FFA24(this, play)) {
|
||||
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && func_808FFA24(this, play)) {
|
||||
this->unk_311 = false;
|
||||
func_80900580(this, play);
|
||||
Audio_StopSfxById(NA_SE_EN_MGANON_UNARI);
|
||||
@@ -2057,7 +2057,7 @@ void BossGanon2_Update(Actor* thisx, PlayState* play) {
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
if (this->unk_335 != 0) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 60.0f, 60.0f, 100.0f, 5);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.velocity.y < -5.0f) {
|
||||
Actor_RequestQuakeAndRumble(&this->actor, play, 5, 20);
|
||||
Sfx_PlaySfxCentered(NA_SE_IT_BOMB_EXPLOSION);
|
||||
|
||||
@@ -889,7 +889,7 @@ void BossGoma_Encounter(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor),
|
||||
2, 0x7D0);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actionState = 130;
|
||||
this->actor.velocity.y = 0.0f;
|
||||
Animation_Change(&this->skelanime, &gGohmaInitialLandingAnim, 1.0f, 0.0f,
|
||||
@@ -1441,7 +1441,7 @@ void BossGoma_FallJump(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor), 2,
|
||||
0x7D0);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
BossGoma_SetupFloorLand(this);
|
||||
this->actor.velocity.y = 0.0f;
|
||||
BossGoma_PlayEffectsAndSfx(this, play, 0, 8);
|
||||
@@ -1458,7 +1458,7 @@ void BossGoma_FallStruckDown(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, Actor_WorldYawTowardActor(&this->actor, &GET_PLAYER(play)->actor), 3,
|
||||
0x7D0);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
BossGoma_SetupFloorLandStruckDown(this);
|
||||
this->actor.velocity.y = 0.0f;
|
||||
BossGoma_PlayEffectsAndSfx(this, play, 0, 8);
|
||||
@@ -1651,11 +1651,11 @@ void BossGoma_FloorMain(BossGoma* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
BossGoma_SetupWallClimb(this);
|
||||
}
|
||||
|
||||
@@ -1702,7 +1702,7 @@ void BossGoma_CeilingMoveToCenter(BossGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.shape.rot.x, -0x8000, 3, 0x3E8);
|
||||
|
||||
// avoid walking into a wall?
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
angle = this->actor.shape.rot.y + 0x8000;
|
||||
|
||||
if (angle < this->actor.wallYaw) {
|
||||
|
||||
@@ -817,8 +817,8 @@ void BossMo_Tentacle(BossMo* this, PlayState* play) {
|
||||
tent_shake:
|
||||
case MO_TENT_SHAKE:
|
||||
if (this->timers[0] == 138) {
|
||||
ShrinkWindow_SetVal(0);
|
||||
Interface_ChangeAlpha(0xB);
|
||||
Letterbox_SetSizeTarget(0);
|
||||
Interface_ChangeHudVisibilityMode(0xB);
|
||||
}
|
||||
if ((this->timers[0] % 8) == 0) {
|
||||
play->damagePlayer(play, -1);
|
||||
|
||||
@@ -453,7 +453,7 @@ void BossSst_HeadIntro(BossSst* this, PlayState* play) {
|
||||
}
|
||||
|
||||
Math_Vec3f_Copy(&sCameraAt, &player->actor.world.pos);
|
||||
if (player->actor.bgCheckFlags & 2) {
|
||||
if (player->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (!this->ready) {
|
||||
sFloor->dyna.actor.params = BONGOFLOOR_HIT;
|
||||
this->ready = true;
|
||||
@@ -1652,7 +1652,7 @@ void BossSst_HandPunch(BossSst* this, PlayState* play) {
|
||||
|
||||
this->actor.world.pos.x += this->actor.speedXZ * Math_SinS(this->actor.shape.rot.y);
|
||||
this->actor.world.pos.z += this->actor.speedXZ * Math_CosS(this->actor.shape.rot.y);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
BossSst_HandSetupRetreat(this);
|
||||
} else if (this->colliderJntSph.base.atFlags & AT_HIT) {
|
||||
Player_PlaySfx(&GET_PLAYER(play)->actor, NA_SE_PL_BODY_HIT);
|
||||
|
||||
@@ -1368,7 +1368,7 @@ void BossTw_HitByBeam(BossTw* this, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 4);
|
||||
this->actor.world.pos.y += 50.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
@@ -5333,7 +5333,7 @@ void BossTw_TwinrovaStun(BossTw* this, PlayState* play) {
|
||||
Animation_MorphToLoop(&this->skelAnime, &gTwinrovaStunLoopAnim, 0.0f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
|
||||
|
||||
@@ -1491,7 +1491,7 @@ void BossVa_BodyPhase4(BossVa* this, PlayState* play) {
|
||||
this->unk_1AC += 0xC31;
|
||||
this->unk_1A0 = (Math_CosS(this->unk_1AC) * 0.1f) + 1.0f;
|
||||
this->unk_1A4 = (Math_SinS(this->unk_1AC) * 0.05f) + 1.0f;
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
this->actor.world.rot.y = (s16)Rand_CenteredFloat(30 * (0x10000 / 360)) + this->actor.wallYaw;
|
||||
}
|
||||
|
||||
@@ -724,7 +724,7 @@ void func_8098652C(DemoIm* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_80986570(DemoIm* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 7.0f) && (this->actor.bgCheckFlags & 1)) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 7.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
u32 sfxId = SFX_FLAG;
|
||||
|
||||
sfxId += SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
|
||||
@@ -336,7 +336,7 @@ void DemoKankyo_SetupType(DemoKankyo* this, PlayState* play) {
|
||||
play->csCtx.segment = gAdultWarpInCS;
|
||||
}
|
||||
}
|
||||
if (func_800C0CB8(play) != 0) {
|
||||
if (Play_CamIsNotFixed(play) != 0) {
|
||||
gSaveContext.cutsceneTrigger = 1;
|
||||
}
|
||||
DemoKankyo_SetupAction(this, DemoKankyo_DoNothing);
|
||||
|
||||
@@ -350,7 +350,7 @@ void EnAnubice_Die(EnAnubice* this, PlayState* play) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 128, 0, 8);
|
||||
EffectSsEnFire_SpawnVec3f(play, &this->actor, &fireEffectPos, 100, 0, 0, -1);
|
||||
|
||||
if ((this->animLastFrame <= curFrame) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->animLastFrame <= curFrame) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_ApproachF(&this->actor.shape.yOffset, -4230.0f, 0.5f, 300.0f);
|
||||
if (this->actor.shape.yOffset < -2000.0f) {
|
||||
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xC0);
|
||||
|
||||
@@ -214,7 +214,7 @@ void func_809B5670(EnAttackNiw* this, PlayState* play) {
|
||||
Actor_SetFocus(&this->actor, this->unk_2E4);
|
||||
Actor_GetScreenPos(play, &this->actor, &sp4E, &sp4C);
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->unk_2D4 = this->actor.yawTowardsPlayer;
|
||||
this->unk_2D0 = this->actor.world.rot.x - 3000.0f;
|
||||
this->unk_2DC = 0.0f;
|
||||
@@ -229,7 +229,7 @@ void func_809B5670(EnAttackNiw* this, PlayState* play) {
|
||||
} else if (((this->actor.projectedPos.z > 0.0f) && (fabsf(sp34.x - this->actor.world.pos.x) < 50.0f) &&
|
||||
(fabsf(sp34.y - this->actor.world.pos.y) < 50.0f) &&
|
||||
(fabsf(sp34.z - this->actor.world.pos.z) < 50.0f)) ||
|
||||
(this->actor.bgCheckFlags & 1)) {
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
|
||||
this->unk_2D4 = this->actor.yawTowardsPlayer;
|
||||
this->unk_2D0 = this->actor.world.rot.x - 2000.0f;
|
||||
@@ -255,7 +255,7 @@ void func_809B59B0(EnAttackNiw* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->unk_25A == 0) {
|
||||
this->unk_25A = 3;
|
||||
this->actor.velocity.y = 3.5f;
|
||||
@@ -277,13 +277,13 @@ void func_809B59B0(EnAttackNiw* this, PlayState* play) {
|
||||
Math_ApproachF(&this->unk_2DC, 10000.0f, 1.0f, 1000.0f);
|
||||
Math_ApproachF(&this->actor.speedXZ, this->unk_2E0, 0.9f, 1.0f);
|
||||
if ((this->actor.gravity == -2.0f) && (this->unk_262 == 0) &&
|
||||
((this->actor.bgCheckFlags & 8) || (this->unk_25C == 0))) {
|
||||
((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->unk_25C == 0))) {
|
||||
this->unk_2E0 = 0.0f;
|
||||
this->actor.gravity = 0.0f;
|
||||
this->unk_2DC = 0.0f;
|
||||
this->unk_2D0 = this->actor.world.rot.x - 5000.0f;
|
||||
this->actionFunc = func_809B5C18;
|
||||
} else if (this->actor.bgCheckFlags & 1) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
func_809B5268(this, play, 5);
|
||||
} else {
|
||||
func_809B5268(this, play, 2);
|
||||
|
||||
@@ -207,7 +207,7 @@ void EnBa_SetupFallAsBlob(EnBa* this) {
|
||||
* Action function of the pink fleshy blobs that spawn and fall to the floor when a tentacle dies
|
||||
*/
|
||||
void EnBa_FallAsBlob(EnBa* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.scale.y -= 0.001f;
|
||||
this->actor.scale.x += 0.0005f;
|
||||
this->actor.scale.z += 0.0005f;
|
||||
|
||||
@@ -516,7 +516,7 @@ void EnBb_SetupDamage(EnBb* this) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_BUBLE_DAMAGE);
|
||||
if (this->actor.params > ENBB_GREEN) {
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer;
|
||||
if ((this->actor.bgCheckFlags & 8) == 0) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) == 0) {
|
||||
this->actor.speedXZ = -7.0f;
|
||||
}
|
||||
this->actor.shape.yOffset = 1500.0f;
|
||||
@@ -635,7 +635,7 @@ void EnBb_Blue(EnBb* this, PlayState* play) {
|
||||
}
|
||||
thisYawToWall = this->actor.wallYaw - this->actor.world.rot.y;
|
||||
moveYawToWall = this->actor.wallYaw - this->vMoveAngleY;
|
||||
if ((this->targetActor == NULL) && (this->actor.bgCheckFlags & 8) &&
|
||||
if ((this->targetActor == NULL) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) &&
|
||||
(ABS(thisYawToWall) > 0x4000 || ABS(moveYawToWall) > 0x4000)) {
|
||||
this->vMoveAngleY = this->actor.wallYaw + this->actor.wallYaw - this->actor.world.rot.y - 0x8000;
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, this->vMoveAngleY, 1, 0xBB8, 0);
|
||||
@@ -693,7 +693,7 @@ void EnBb_Down(EnBb* this, PlayState* play) {
|
||||
s16 yawDiff = this->actor.world.rot.y - this->actor.wallYaw;
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (ABS(yawDiff) > 0x4000) {
|
||||
this->actor.world.rot.y = this->actor.wallYaw + this->actor.wallYaw - this->actor.world.rot.y - 0x8000;
|
||||
}
|
||||
@@ -811,7 +811,7 @@ void EnBb_Red(EnBb* this, PlayState* play) {
|
||||
this->bobPhase += Rand_ZeroOne();
|
||||
Math_SmoothStepToF(&this->flameScaleY, 80.0f, 1.0f, 10.0f, 0.0f);
|
||||
Math_SmoothStepToF(&this->flameScaleX, 100.0f, 1.0f, 10.0f, 0.0f);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
yawDiff = this->actor.world.rot.y - this->actor.wallYaw;
|
||||
if (ABS(yawDiff) > 0x4000) {
|
||||
this->actor.world.rot.y =
|
||||
@@ -819,7 +819,7 @@ void EnBb_Red(EnBb* this, PlayState* play) {
|
||||
}
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
floorType = SurfaceType_GetFloorType(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId);
|
||||
if ((floorType == 2) || (floorType == 3) || (floorType == 9)) {
|
||||
this->moveMode = BBMOVE_HIDDEN;
|
||||
@@ -1107,13 +1107,13 @@ void EnBb_SetupStunned(EnBb* this) {
|
||||
void EnBb_Stunned(EnBb* this, PlayState* play) {
|
||||
s16 yawDiff = this->actor.world.rot.y - this->actor.wallYaw;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (ABS(yawDiff) > 0x4000) {
|
||||
this->actor.world.rot.y = this->actor.wallYaw + this->actor.wallYaw - this->actor.world.rot.y - 0x8000;
|
||||
}
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
if (this->actor.velocity.y < -14.0f) {
|
||||
this->actor.velocity.y *= -0.4f;
|
||||
|
||||
@@ -647,7 +647,7 @@ void func_809BE26C(EnBigokuta* this, PlayState* play) {
|
||||
}
|
||||
if (this->unk_198 == 0 && Math_StepToF(&this->actor.scale.y, 0.0f, 0.001f)) {
|
||||
Flags_SetClear(play, this->actor.room);
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_DUNGEON0);
|
||||
func_8005ACFC(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 50, NA_SE_EN_OCTAROCK_BUBLE);
|
||||
Item_DropCollectibleRandom(play, &this->actor, &this->actor.world.pos, 0xB0);
|
||||
@@ -785,7 +785,7 @@ void EnBigokuta_Update(Actor* thisx, PlayState* play2) {
|
||||
this->actionFunc(this, play);
|
||||
func_809BD2E4(this);
|
||||
func_809BE568(this);
|
||||
Camera_ChangeSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BIG_OCTO);
|
||||
Camera_RequestSetting(play->cameraPtrs[CAM_ID_MAIN], CAM_SET_BIG_OCTO);
|
||||
func_8005AD1C(play->cameraPtrs[CAM_ID_MAIN], 4);
|
||||
|
||||
if (this->cylinder[0].base.atFlags & AT_ON) {
|
||||
|
||||
@@ -323,7 +323,7 @@ void EnBili_UpdateFloating(EnBili* this) {
|
||||
this->actor.world.pos.y = this->actor.home.pos.y + (sinf(this->timer * (M_PI / 16)) * 3.0f);
|
||||
|
||||
// Turn around if touching wall
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.world.rot.y = this->actor.wallYaw;
|
||||
}
|
||||
}
|
||||
@@ -525,7 +525,7 @@ void EnBili_Stunned(EnBili* this, PlayState* play) {
|
||||
this->timer--;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
|
||||
@@ -543,7 +543,7 @@ void EnBili_Frozen(EnBili* this, PlayState* play) {
|
||||
this->actor.gravity = -1.0f;
|
||||
}
|
||||
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
this->actor.colorFilterTimer = 0;
|
||||
EnBili_SetupDie(this);
|
||||
} else {
|
||||
|
||||
@@ -156,7 +156,7 @@ void EnBom_Move(EnBom* this, PlayState* play) {
|
||||
}
|
||||
|
||||
// rebound bomb off the wall it hits
|
||||
if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & 8)) {
|
||||
if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
if (ABS((s16)(this->actor.wallYaw - this->actor.world.rot.y)) > 0x4000) {
|
||||
this->actor.world.rot.y = ((this->actor.wallYaw - this->actor.world.rot.y) + this->actor.wallYaw) - 0x8000;
|
||||
}
|
||||
@@ -166,11 +166,11 @@ void EnBom_Move(EnBom* this, PlayState* play) {
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
}
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 0.08f);
|
||||
} else {
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f);
|
||||
if ((this->actor.bgCheckFlags & 2) && (this->actor.velocity.y < -3.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -3.0f)) {
|
||||
Actor_PlaySfx_SurfaceBomb(play, &this->actor);
|
||||
this->actor.velocity.y *= -0.3f;
|
||||
this->actor.bgCheckFlags &= ~2;
|
||||
|
||||
@@ -234,11 +234,11 @@ void EnBombf_Move(EnBombf* this, PlayState* play) {
|
||||
|
||||
this->flowerBombScale = 1.0f;
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.025f, 0.0f);
|
||||
} else {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 1.5f, 0.0f);
|
||||
if ((this->actor.bgCheckFlags & 2) && (this->actor.velocity.y < -6.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) && (this->actor.velocity.y < -6.0f)) {
|
||||
Actor_PlaySfx_SurfaceBomb(play, &this->actor);
|
||||
this->actor.velocity.y *= -0.5f;
|
||||
} else if (this->timer >= 4) {
|
||||
|
||||
@@ -284,7 +284,7 @@ void func_809CEA24(EnBw* this, PlayState* play) {
|
||||
}
|
||||
this->unk_222 = (Rand_ZeroOne() * 200.0f) + 200.0f;
|
||||
}
|
||||
} else if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & 8)) {
|
||||
} else if ((this->actor.speedXZ != 0.0f) && (this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
if (this->unk_236 != this->actor.wallYaw) {
|
||||
sp64 = 1;
|
||||
this->unk_236 = this->actor.wallYaw;
|
||||
@@ -367,7 +367,8 @@ void func_809CEA24(EnBw* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (((sp64 == 0) && !(this->actor.bgCheckFlags & 8)) || Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
|
||||
if (((sp64 == 0) && !(this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) ||
|
||||
Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
|
||||
if (Actor_IsFacingPlayer(&this->actor, 0x1C70)) {
|
||||
this->unk_238 = -this->unk_238;
|
||||
}
|
||||
@@ -495,7 +496,7 @@ void func_809CFC4C(EnBw* this, PlayState* play) {
|
||||
this->unk_221 = 4;
|
||||
this->unk_258 += this->unk_25C;
|
||||
Math_SmoothStepToF(&this->unk_260, 0.075f, 1.0f, 0.005f, 0.0f);
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false);
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
@@ -681,7 +682,7 @@ void func_809D0424(EnBw* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void func_809D0584(EnBw* this, PlayState* play) {
|
||||
if ((this->actor.bgCheckFlags & 0x10) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & 0x10) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->unk_230 = 0;
|
||||
this->actor.scale.y -= 0.009f;
|
||||
Actor_SpawnFloorDustRing(play, &this->actor, &this->actor.world.pos, 30.0f, 11, 4.0f, 0, 0, false);
|
||||
@@ -729,7 +730,8 @@ void func_809D0584(EnBw* this, PlayState* play) {
|
||||
this->unk_248 = 0.0f;
|
||||
}
|
||||
}
|
||||
if ((play->actorCtx.unk_02 != 0) && (this->actor.xzDistToPlayer <= 400.0f) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((play->actorCtx.unk_02 != 0) && (this->actor.xzDistToPlayer <= 400.0f) &&
|
||||
(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
if (this->unk_220 == 5) {
|
||||
this->unk_23C = 0;
|
||||
func_809CFF10(this);
|
||||
|
||||
@@ -241,7 +241,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
|
||||
skelanimeUpdated = Animation_OnFrame(&this->skelAnime, 0.0f);
|
||||
this->actor.speedXZ = (Rand_ZeroOne() * 1.5f) + 3.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->aimRotY = this->actor.wallYaw;
|
||||
} else if (Actor_WorldDistXZToPoint(&this->actor, &this->actor.home.pos) > 300.0f) {
|
||||
this->aimRotY = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
@@ -276,7 +276,7 @@ void EnCrow_FlyIdle(EnCrow* this, PlayState* play) {
|
||||
this->aimRotX = CLAMP(this->aimRotX, -0x1000, 0x1000);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, -0x100, 0x400);
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ void EnCrow_Damaged(EnCrow* this, PlayState* play) {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, 0x4000, 0x200);
|
||||
this->actor.shape.rot.z += 0x1780;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
EffectSsDeadDb_Spawn(play, &this->actor.world.pos, &sZeroVecAccel, &sZeroVecAccel,
|
||||
this->actor.scale.x * 10000.0f, 0, 255, 255, 255, 255, 255, 0, 0, 1, 9, 1);
|
||||
EnCrow_SetupDie(this);
|
||||
@@ -378,7 +378,7 @@ void EnCrow_Die(EnCrow* this, PlayState* play) {
|
||||
void EnCrow_TurnAway(EnCrow* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->aimRotY = this->actor.wallYaw;
|
||||
} else {
|
||||
this->aimRotY = this->actor.yawTowardsPlayer + 0x8000;
|
||||
|
||||
@@ -961,7 +961,8 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* this, PlayState* play) {
|
||||
EffectSsHahen_SpawnBurst(play, &this->actor.world.pos, this->size * 3.0f, 0, this->size * 12.0f,
|
||||
this->size * 5.0f, 1, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
|
||||
if ((this->actor.scale.x > 0.005f) && ((this->actor.bgCheckFlags & 2) || (this->actor.bgCheckFlags & 8))) {
|
||||
if ((this->actor.scale.x > 0.005f) &&
|
||||
((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) || (this->actor.bgCheckFlags & BGCHECKFLAG_WALL))) {
|
||||
this->actor.scale.x = this->actor.scale.y = this->actor.scale.z = 0.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.flags &= ~(ACTOR_FLAG_ATTENTION_ENABLED | ACTOR_FLAG_HOSTILE);
|
||||
@@ -969,7 +970,7 @@ void EnDekubaba_PrunedSomersault(EnDekubaba* this, PlayState* play) {
|
||||
this->size * 5.0f, 15, HAHEN_OBJECT_DEFAULT, 10, NULL);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
this->timer = 1;
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ void EnDekunuts_Run(EnDekunuts* this, PlayState* play) {
|
||||
if (Math_SmoothStepToS(&this->actor.world.rot.y, this->runDirection, 1, 0xE38, 0xB6) == 0) {
|
||||
if (this->actor.bgCheckFlags & 0x20) {
|
||||
this->runDirection = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->runDirection = this->actor.wallYaw;
|
||||
} else if (this->runAwayCount == 0) {
|
||||
diffRotInit = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
|
||||
@@ -406,7 +406,7 @@ void EnDh_Burrow(EnDh* this, PlayState* play) {
|
||||
|
||||
void EnDh_SetupDamage(EnDh* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &object_dh_Anim_003D6C, -6.0f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = -1.0f;
|
||||
}
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DEADHAND_DAMAGE);
|
||||
|
||||
@@ -102,7 +102,7 @@ void EnDntJiji_Destroy(Actor* thisx, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnDntJiji_SetFlower(EnDntJiji* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->flowerPos = this->actor.world.pos;
|
||||
this->actionFunc = EnDntJiji_SetupWait;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ void EnDntJiji_Walk(EnDntJiji* this, PlayState* play) {
|
||||
this->sfxTimer = 5;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 9.0f;
|
||||
this->actor.speedXZ = 3.0f;
|
||||
}
|
||||
@@ -351,7 +351,7 @@ void EnDntJiji_Return(EnDntJiji* this, PlayState* play) {
|
||||
dz = this->flowerPos.z - this->actor.world.pos.z;
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, Math_FAtan2F(dx, dz) * (0x8000 / M_PI), 1, 0xBB8, 0);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
if ((this->actor.bgCheckFlags & 8) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 9.0f;
|
||||
this->actor.speedXZ = 3.0f;
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ void EnDntNomal_WaitForObject(EnDntNomal* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnDntNomal_SetFlower(EnDntNomal* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->flowerPos = this->actor.world.pos;
|
||||
if (this->type == ENDNTNOMAL_TARGET) {
|
||||
this->actionFunc = EnDntNomal_SetupTargetWait;
|
||||
@@ -551,7 +551,7 @@ void EnDntNomal_StageCelebrate(EnDntNomal* this, PlayState* play) {
|
||||
} else if ((this->timer5 & 3) == 0) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 7.5f;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ s32 EnDodojr_UpdateBounces(EnDodojr* this, PlayState* play) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
this->dustPos = this->actor.world.pos;
|
||||
EnDodojr_SpawnLargeDust(this, play, 10);
|
||||
@@ -456,7 +456,7 @@ void EnDodojr_CrawlTowardsTarget(EnDodojr* this, PlayState* play) {
|
||||
this->actionFunc = EnDodojr_JumpAttackBounce;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_DOWN);
|
||||
EnDodojr_SetupDespawn(this);
|
||||
this->actionFunc = EnDodojr_Despawn;
|
||||
|
||||
@@ -775,7 +775,7 @@ void EnDodongo_Update(Actor* thisx, PlayState* play) {
|
||||
this->actionFunc(this, play);
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 75.0f, 60.0f, 70.0f, 0x1D);
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,7 +433,7 @@ void EnEiyer_Glide(EnEiyer* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speedXZ, 1.5f, 0.03f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->targetYaw = this->actor.wallYaw;
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ void EnEiyer_DiveAttack(EnEiyer* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
this->actor.speedXZ *= 1.1f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
EnEiyer_SetupLand(this);
|
||||
}
|
||||
|
||||
@@ -498,11 +498,11 @@ void EnEiyer_Land(EnEiyer* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speedXZ, 7.0f, 1.0f);
|
||||
|
||||
if (this->timer == -1) {
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & 8 || this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->timer = 10;
|
||||
SoundSource_PlaySfxAtFixedWorldPos(play, &this->actor.world.pos, 30, NA_SE_EN_OCTAROCK_SINK);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
EffectSsGSplash_Spawn(play, &this->actor.world.pos, NULL, NULL, 1, 700);
|
||||
}
|
||||
}
|
||||
@@ -529,7 +529,7 @@ void EnEiyer_Hurt(EnEiyer* this, PlayState* play) {
|
||||
Math_ApproachF(&this->basePos.y, this->actor.floorHeight + 80.0f + 5.0f, 0.5f, this->actor.speedXZ);
|
||||
this->actor.world.pos.y = this->basePos.y - 5.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->targetYaw = this->actor.wallYaw;
|
||||
} else {
|
||||
this->targetYaw = this->actor.yawTowardsPlayer + 0x8000;
|
||||
@@ -592,7 +592,7 @@ void EnEiyer_Stunned(EnEiyer* this, PlayState* play) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_EIER_FLUTTER);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_DODO_M_GND);
|
||||
}
|
||||
|
||||
|
||||
@@ -509,7 +509,7 @@ void EnFd_SpinAndGrow(EnFd* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnFd_JumpToGround(EnFd* this, PlayState* play) {
|
||||
if ((this->actor.bgCheckFlags & 1) && !(this->actor.velocity.y > 0.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && !(this->actor.velocity.y > 0.0f)) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y;
|
||||
|
||||
@@ -303,7 +303,7 @@ void EnFhgFire_LightningShock(EnFhgFire* this, PlayState* play) {
|
||||
}
|
||||
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 1);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Actor_Kill(&this->actor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,7 +193,7 @@ void EnFireRock_Fall(EnFireRock* this, PlayState* play) {
|
||||
}
|
||||
break;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) && (this->timer == 0)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && (this->timer == 0)) {
|
||||
switch (this->type) {
|
||||
case FIRE_ROCK_SPAWNED_FALLING1:
|
||||
case FIRE_ROCK_SPAWNED_FALLING2:
|
||||
|
||||
@@ -404,7 +404,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
|
||||
this->targetPitch = 0x2154;
|
||||
}
|
||||
} else {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->targetPitch = 0x954;
|
||||
} else if ((this->actor.bgCheckFlags & 0x10) || (this->maxAltitude < this->actor.world.pos.y)) {
|
||||
this->targetPitch = 0x2154;
|
||||
@@ -412,7 +412,7 @@ void EnFirefly_FlyIdle(EnFirefly* this, PlayState* play) {
|
||||
}
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
}
|
||||
if ((this->timer == 0) && (this->actor.xzDistToPlayer < 200.0f) && (Player_GetMask(play) != PLAYER_MASK_SKULL) &&
|
||||
@@ -437,7 +437,7 @@ void EnFirefly_Fall(EnFirefly* this, PlayState* play) {
|
||||
if (this->timer != 0) {
|
||||
this->timer--;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->timer == 0)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->timer == 0)) {
|
||||
EnFirefly_SetupDie(this);
|
||||
}
|
||||
}
|
||||
@@ -465,7 +465,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
|
||||
this->timer--;
|
||||
}
|
||||
Math_StepToF(&this->actor.speedXZ, 4.0f, 0.5f);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.x, this->targetPitch, 0x100);
|
||||
} else if (Actor_IsFacingPlayer(&this->actor, 0x2800)) {
|
||||
@@ -484,7 +484,7 @@ void EnFirefly_DiveAttack(EnFirefly* this, PlayState* play) {
|
||||
if (this->actor.xzDistToPlayer > 80.0f) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 2, 0xC00, 0x300);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->targetPitch = 0x954;
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 0x10) || (this->maxAltitude < this->actor.world.pos.y)) {
|
||||
@@ -527,14 +527,14 @@ void EnFirefly_FlyAway(EnFirefly* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
Math_StepToF(&this->actor.speedXZ, 3.0f, 0.3f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->targetPitch = 0x954;
|
||||
} else if ((this->actor.bgCheckFlags & 0x10) || (this->maxAltitude < this->actor.world.pos.y)) {
|
||||
this->targetPitch = 0x2154;
|
||||
} else {
|
||||
this->targetPitch = 0x954;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.wallYaw, 2, 0xC00, 0x300);
|
||||
} else {
|
||||
Math_ScaledStepToS(&this->actor.shape.rot.y, Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos),
|
||||
@@ -561,7 +561,7 @@ void EnFirefly_Stunned(EnFirefly* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnFirefly_FrozenFall(EnFirefly* this, PlayState* play) {
|
||||
if ((this->actor.bgCheckFlags & 1) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.floorHeight == BGCHECK_Y_MIN)) {
|
||||
this->actor.colorFilterTimer = 0;
|
||||
EnFirefly_SetupDie(this);
|
||||
} else {
|
||||
|
||||
@@ -381,7 +381,7 @@ void EnFish_Dropped_Fall(EnFish* this, PlayState* play) {
|
||||
this->actor.shape.rot.z = this->actor.world.rot.z;
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) { // On floor
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { // On floor
|
||||
this->timer = 400;
|
||||
EnFish_Dropped_SetupFlopOnGround(this);
|
||||
} else if (this->actor.bgCheckFlags & 0x20) { // In water
|
||||
@@ -470,7 +470,7 @@ void EnFish_Dropped_FlopOnGround(EnFish* this, PlayState* play) {
|
||||
}
|
||||
} else if (this->actor.bgCheckFlags & 0x20) { // In water
|
||||
EnFish_Dropped_SetupSwimAway(this);
|
||||
} else if (this->actor.bgCheckFlags & 1) { // On floor
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { // On floor
|
||||
EnFish_Dropped_SetupFlopOnGround(this);
|
||||
}
|
||||
}
|
||||
@@ -493,7 +493,7 @@ void EnFish_Dropped_SwimAway(EnFish* this, PlayState* play) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 2.8f, 0.1f, 0.4f, 0.0f);
|
||||
|
||||
// If touching wall or not in water, turn back and slow down for one frame.
|
||||
if ((this->actor.bgCheckFlags & 8) || !(this->actor.bgCheckFlags & 0x20)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || !(this->actor.bgCheckFlags & 0x20)) {
|
||||
this->actor.home.rot.y = Math_Vec3f_Yaw(&this->actor.world.pos, &this->actor.home.pos);
|
||||
this->actor.speedXZ *= 0.5f;
|
||||
}
|
||||
@@ -505,7 +505,7 @@ void EnFish_Dropped_SwimAway(EnFish* this, PlayState* play) {
|
||||
this->actor.shape.rot = this->actor.world.rot;
|
||||
|
||||
// Raise if on a floor.
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y - 4.0f, 2.0f);
|
||||
} else {
|
||||
Math_StepToF(&this->actor.world.pos.y, this->actor.home.pos.y - 10.0f, 2.0f);
|
||||
|
||||
@@ -492,7 +492,7 @@ void EnFloormas_BigWalk(EnFloormas* this, PlayState* play) {
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 320.0f) && (Actor_IsFacingPlayer(&this->actor, 0x4000))) {
|
||||
EnFloormas_SetupRun(this);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
// set target rotation to the colliding wall's rotation
|
||||
this->actionTarget = this->actor.wallYaw;
|
||||
EnFloormas_SetupTurn(this);
|
||||
@@ -521,7 +521,7 @@ void EnFloormas_Run(EnFloormas* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 3, 0x71C);
|
||||
|
||||
if ((this->actor.xzDistToPlayer < 280.0f) && Actor_IsFacingPlayer(&this->actor, 0x2000) &&
|
||||
!(this->actor.bgCheckFlags & 8)) {
|
||||
!(this->actor.bgCheckFlags & BGCHECKFLAG_WALL)) {
|
||||
EnFloormas_SetupHover(this, play);
|
||||
} else if (this->actor.xzDistToPlayer > 400.0f) {
|
||||
EnFloormas_SetupBigWalk(this);
|
||||
@@ -612,7 +612,7 @@ void EnFloormas_Charge(EnFloormas* this, PlayState* play) {
|
||||
EnFloormas_Slide(this, play);
|
||||
}
|
||||
|
||||
if ((this->actor.bgCheckFlags & 8) || (this->actionTimer == 0)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->actionTimer == 0)) {
|
||||
EnFloormas_SetupLand(this);
|
||||
}
|
||||
}
|
||||
@@ -621,7 +621,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
|
||||
s32 isOnGround;
|
||||
|
||||
isOnGround = this->actor.bgCheckFlags & 1;
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
if (this->actor.params != MERGE_MASTER) {
|
||||
EnFloormas_MakeVulnerable(this);
|
||||
}
|
||||
@@ -634,7 +634,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
|
||||
@@ -668,7 +668,7 @@ void EnFloormas_Land(EnFloormas* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnFloormas_Split(EnFloormas* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (SkelAnime_Update(&this->skelAnime)) {
|
||||
this->actor.flags |= ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
this->smActionTimer = 50;
|
||||
@@ -677,7 +677,7 @@ void EnFloormas_Split(EnFloormas* this, PlayState* play) {
|
||||
Math_StepToF(&this->actor.speedXZ, 0.0f, 1.0f);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
}
|
||||
}
|
||||
@@ -692,7 +692,7 @@ void EnFloormas_SmWalk(EnFloormas* this, PlayState* play) {
|
||||
|
||||
if (this->smActionTimer == 0) {
|
||||
EnFloormas_SetupSmDecideAction(this);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actionTarget = this->actor.wallYaw;
|
||||
EnFloormas_SetupTurn(this);
|
||||
} else if (this->actor.xzDistToPlayer < 120.0f) {
|
||||
@@ -754,7 +754,7 @@ void EnFloormas_JumpAtLink(EnFloormas* this, PlayState* play) {
|
||||
} else if (Animation_OnFrame(&this->skelAnime, 20.0f)) {
|
||||
this->actor.speedXZ = 5.0f;
|
||||
this->actor.velocity.y = 7.0f;
|
||||
} else if (this->actor.bgCheckFlags & 2) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actionTimer = 0x32;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
@@ -839,7 +839,7 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, PlayState* play) {
|
||||
} else if (this->actor.child->params == MERGE_MASTER) {
|
||||
primFloormas = this->actor.child;
|
||||
} else {
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.params = 0x10;
|
||||
EnFloormas_SetupLand(this);
|
||||
}
|
||||
@@ -855,7 +855,7 @@ void EnFloormas_SmSlaveJumpAtMaster(EnFloormas* this, PlayState* play) {
|
||||
(fabsf(this->actor.world.pos.z - primFloormas->world.pos.z) < 10.0f)) {
|
||||
EnFloormas_SetupSmWait(this);
|
||||
this->collider.base.ocFlags1 |= OC1_ON;
|
||||
} else if (this->actor.bgCheckFlags & 2) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_FLOORMASTER_SM_LAND);
|
||||
EnFloormas_SetupLand(this);
|
||||
|
||||
@@ -877,7 +877,7 @@ void EnFr_OcarinaMistake(EnFr* this, PlayState* play) {
|
||||
Message_CloseTextbox(play);
|
||||
this->reward = GI_NONE;
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_OCARINA_ERROR);
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
sEnFrPointers.flags = 12;
|
||||
EnFr_DeactivateButterfly();
|
||||
this->actionFunc = EnFr_Deactivate;
|
||||
@@ -947,7 +947,7 @@ void EnFr_SetupReward(EnFr* this, PlayState* play, u8 unkCondition) {
|
||||
Sfx_PlaySfxCentered(NA_SE_SY_CORRECT_CHIME);
|
||||
}
|
||||
|
||||
Audio_OcaSetInstrument(0);
|
||||
AudioOcarina_SetInstrument(0);
|
||||
play->msgCtx.msgMode = MSGMODE_PAUSED;
|
||||
this->actionFunc = EnFr_PrintTextBox;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ void EnFu_TeachSong(EnFu* this, PlayState* play) {
|
||||
// if dialog state is 2, start song demonstration
|
||||
if (Message_GetState(&play->msgCtx) == TEXT_STATE_CLOSING) {
|
||||
this->behaviorFlags &= ~FU_WAIT;
|
||||
Audio_OcaSetInstrument(4); // seems to be related to setting instrument type
|
||||
AudioOcarina_SetInstrument(4); // seems to be related to setting instrument type
|
||||
func_8010BD58(play, OCARINA_ACTION_TEACH_STORMS);
|
||||
this->actionFunc = EnFu_WaitForPlayback;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ static AnimationInfo sAnimationInfo[] = {
|
||||
s32 EnFw_DoBounce(EnFw* this, s32 totalBounces, f32 yVelocity) {
|
||||
s16 temp_v1;
|
||||
|
||||
if (!(this->actor.bgCheckFlags & 1) || (this->actor.velocity.y > 0.0f)) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || (this->actor.velocity.y > 0.0f)) {
|
||||
// not on the ground or moving upwards.
|
||||
return false;
|
||||
}
|
||||
@@ -273,7 +273,7 @@ void EnFw_Run(EnFw* this, PlayState* play) {
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (!(this->actor.bgCheckFlags & 1) || this->actor.velocity.y > 0.0f) {
|
||||
if (!(this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) || this->actor.velocity.y > 0.0f) {
|
||||
Actor_SetColorFilter(&this->actor, 0x4000, 0xC8, 0, this->damageTimer);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -326,7 +326,7 @@ void EnFz_SpawnIceSmokeActiveState(EnFz* this) {
|
||||
void EnFz_ApplyDamage(EnFz* this, PlayState* play) {
|
||||
Vec3f vec;
|
||||
|
||||
if (this->isMoving && ((this->actor.bgCheckFlags & 8) ||
|
||||
if (this->isMoving && ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
(Actor_TestFloorInDirection(&this->actor, play, 60.0f, this->actor.world.rot.y) == 0))) {
|
||||
this->actor.bgCheckFlags &= ~8;
|
||||
this->isMoving = false;
|
||||
|
||||
@@ -372,7 +372,7 @@ void EnGeldB_Wait(EnGeldB* this, PlayState* play) {
|
||||
func_800F5ACC(NA_BGM_MINI_BOSS);
|
||||
}
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_RIZA_DOWN);
|
||||
this->skelAnime.playSpeed = 1.0f;
|
||||
this->actor.world.pos.y = this->actor.floorHeight;
|
||||
@@ -676,9 +676,9 @@ void EnGeldB_Circle(EnGeldB* this, PlayState* play) {
|
||||
this->actor.speedXZ = 8.0f;
|
||||
}
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 8) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
!Actor_TestFloorInDirection(&this->actor, play, this->actor.speedXZ, this->actor.shape.rot.y + 0x3E80)) {
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (this->actor.speedXZ >= 0.0f) {
|
||||
phi_v1 = this->actor.shape.rot.y + 0x3E80;
|
||||
} else {
|
||||
@@ -775,9 +775,9 @@ void EnGeldB_SpinDodge(EnGeldB* this, PlayState* play) {
|
||||
s32 nextKeyFrame;
|
||||
|
||||
this->actor.world.rot.y = this->actor.yawTowardsPlayer + 0x3A98;
|
||||
if ((this->actor.bgCheckFlags & 8) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
!Actor_TestFloorInDirection(&this->actor, play, this->actor.speedXZ, this->actor.shape.rot.y + 0x3E80)) {
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (this->actor.speedXZ >= 0.0f) {
|
||||
phi_v1 = this->actor.shape.rot.y + 0x3E80;
|
||||
} else {
|
||||
@@ -1007,7 +1007,7 @@ void EnGeldB_RollBack(EnGeldB* this, PlayState* play) {
|
||||
}
|
||||
|
||||
void EnGeldB_SetupStunned(EnGeldB* this) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if ((this->damageEffect != GELDB_DMG_FREEZE) || (this->action == GELDB_SPIN_ATTACK)) {
|
||||
@@ -1022,16 +1022,16 @@ void EnGeldB_SetupStunned(EnGeldB* this) {
|
||||
}
|
||||
|
||||
void EnGeldB_Stunned(EnGeldB* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.speedXZ < 0.0f) {
|
||||
this->actor.speedXZ += 0.05f;
|
||||
}
|
||||
this->invisible = false;
|
||||
}
|
||||
if ((this->actor.colorFilterTimer == 0) && (this->actor.bgCheckFlags & 1)) {
|
||||
if ((this->actor.colorFilterTimer == 0) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
if (this->actor.colChkInfo.health == 0) {
|
||||
EnGeldB_SetupDefeated(this);
|
||||
} else {
|
||||
@@ -1042,7 +1042,7 @@ void EnGeldB_Stunned(EnGeldB* this, PlayState* play) {
|
||||
|
||||
void EnGeldB_SetupDamaged(EnGeldB* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDamageAnim, -4.0f);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->invisible = false;
|
||||
this->actor.speedXZ = -4.0f;
|
||||
} else {
|
||||
@@ -1058,10 +1058,10 @@ void EnGeldB_SetupDamaged(EnGeldB* this) {
|
||||
void EnGeldB_Damaged(EnGeldB* this, PlayState* play) {
|
||||
s16 angleToWall;
|
||||
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (this->actor.speedXZ < 0.0f) {
|
||||
this->actor.speedXZ += 0.05f;
|
||||
}
|
||||
@@ -1069,9 +1069,10 @@ void EnGeldB_Damaged(EnGeldB* this, PlayState* play) {
|
||||
}
|
||||
Math_SmoothStepToS(&this->actor.shape.rot.y, this->actor.yawTowardsPlayer, 1, 0x1194, 0);
|
||||
if (!EnGeldB_DodgeRanged(play, this) && !EnGeldB_ReactToPlayer(play, this, 0) &&
|
||||
SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & 1)) {
|
||||
SkelAnime_Update(&this->skelAnime) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
angleToWall = this->actor.wallYaw - this->actor.shape.rot.y;
|
||||
if ((this->actor.bgCheckFlags & 8) && (ABS(angleToWall) < 0x2EE0) && (this->actor.xzDistToPlayer < 90.0f)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (ABS(angleToWall) < 0x2EE0) &&
|
||||
(this->actor.xzDistToPlayer < 90.0f)) {
|
||||
EnGeldB_SetupJump(this);
|
||||
} else if (!EnGeldB_DodgeRanged(play, this)) {
|
||||
if ((this->actor.xzDistToPlayer <= 45.0f) && !Actor_OtherIsTargeted(play, &this->actor) &&
|
||||
@@ -1224,9 +1225,9 @@ void EnGeldB_Sidestep(EnGeldB* this, PlayState* play) {
|
||||
this->actor.speedXZ -= 0.125f;
|
||||
}
|
||||
|
||||
if ((this->actor.bgCheckFlags & 8) ||
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
!Actor_TestFloorInDirection(&this->actor, play, this->actor.speedXZ, this->actor.shape.rot.y + 0x3E80)) {
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
if (this->actor.speedXZ >= 0.0f) {
|
||||
phi_v1 = this->actor.shape.rot.y + 0x3E80;
|
||||
} else {
|
||||
@@ -1317,7 +1318,7 @@ void EnGeldB_Sidestep(EnGeldB* this, PlayState* play) {
|
||||
void EnGeldB_SetupDefeated(EnGeldB* this) {
|
||||
Animation_MorphToPlayOnce(&this->skelAnime, &gGerudoRedDefeatAnim, -4.0f);
|
||||
this->actor.world.rot.y = this->actor.shape.rot.y = this->actor.yawTowardsPlayer;
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->invisible = false;
|
||||
this->actor.speedXZ = -6.0f;
|
||||
} else {
|
||||
@@ -1331,10 +1332,10 @@ void EnGeldB_SetupDefeated(EnGeldB* this) {
|
||||
}
|
||||
|
||||
void EnGeldB_Defeated(EnGeldB* this, PlayState* play) {
|
||||
if (this->actor.bgCheckFlags & 2) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND_TOUCH) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, 0.0f, 1.0f, 0.5f, 0.0f);
|
||||
this->invisible = false;
|
||||
}
|
||||
|
||||
@@ -433,13 +433,13 @@ s32 EnGo_IsCameraModified(EnGo* this, PlayState* play) {
|
||||
|
||||
xyzDistSq = (this->actor.scale.x / 0.01f) * SQ(100.0f);
|
||||
if ((this->actor.params & 0xF0) == 0x90) {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_DIRECTED_YAW);
|
||||
Camera_RequestSetting(mainCam, CAM_SET_DIRECTED_YAW);
|
||||
xyzDistSq *= 4.8f;
|
||||
}
|
||||
|
||||
if (fabsf(this->actor.xyzDistToPlayerSq) > xyzDistSq) {
|
||||
if (mainCam->setting == CAM_SET_DIRECTED_YAW) {
|
||||
Camera_ChangeSetting(mainCam, CAM_SET_NORMAL0);
|
||||
Camera_RequestSetting(mainCam, CAM_SET_NORMAL0);
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
@@ -546,7 +546,7 @@ s32 EnGo_SpawnDust(EnGo* this, u8 initialTimer, f32 scale, f32 scaleStep, s32 nu
|
||||
}
|
||||
|
||||
s32 EnGo_IsRollingOnGround(EnGo* this, s16 unkArg1, f32 unkArg2) {
|
||||
if ((this->actor.bgCheckFlags & 1) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
return false;
|
||||
} else if (this->interactInfo.talkState != NPC_TALK_STATE_IDLE) {
|
||||
return true;
|
||||
|
||||
@@ -991,7 +991,7 @@ s32 EnGo2_IsWakingUp(EnGo2* this) {
|
||||
}
|
||||
|
||||
s32 EnGo2_IsRollingOnGround(EnGo2* this, s16 arg1, f32 arg2, s16 arg3) {
|
||||
if ((this->actor.bgCheckFlags & 1) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) == 0 || this->actor.velocity.y > 0.0f) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1167,10 +1167,10 @@ s32 EnGo2_IsCameraModified(EnGo2* this, PlayState* play) {
|
||||
|
||||
if ((this->actor.params & 0x1F) == GORON_DMT_BIGGORON) {
|
||||
if (EnGo2_IsWakingUp(this)) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_DIRECTED_YAW);
|
||||
Camera_RequestSetting(camera, CAM_SET_DIRECTED_YAW);
|
||||
func_8005AD1C(camera, 4);
|
||||
} else if (!EnGo2_IsWakingUp(this) && (camera->setting == CAM_SET_DIRECTED_YAW)) {
|
||||
Camera_ChangeSetting(camera, CAM_SET_DUNGEON1);
|
||||
Camera_RequestSetting(camera, CAM_SET_DUNGEON1);
|
||||
func_8005ACFC(camera, 4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void EnGoma_EggFallToGround(EnGoma* this, PlayState* play) {
|
||||
|
||||
switch (this->hatchState) {
|
||||
case 0:
|
||||
if (this->actor.bgCheckFlags & 1) { // floor
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) { // floor
|
||||
if (this->actor.params < 6) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_BJR_EGG1);
|
||||
} else {
|
||||
@@ -266,7 +266,7 @@ void EnGoma_EggFallToGround(EnGoma* this, PlayState* play) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 0.2f, 0.05f);
|
||||
}
|
||||
this->eggPitch += (this->actor.speedXZ * 0.1f);
|
||||
@@ -348,7 +348,7 @@ void EnGoma_SetupHurt(EnGoma* this, PlayState* play) {
|
||||
void EnGoma_Hurt(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
|
||||
@@ -380,7 +380,7 @@ void EnGoma_SetupDie(EnGoma* this) {
|
||||
void EnGoma_Die(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
|
||||
@@ -485,7 +485,7 @@ void EnGoma_SetupLand(EnGoma* this) {
|
||||
void EnGoma_Land(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 1.0f, 2.0f);
|
||||
}
|
||||
if (this->actionTimer == 0) {
|
||||
@@ -511,7 +511,7 @@ void EnGoma_Jump(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
Math_ApproachF(&this->actor.speedXZ, 10.0f, 0.5f, 5.0f);
|
||||
|
||||
if (this->actor.velocity.y <= 0.0f && (this->actor.bgCheckFlags & 1)) {
|
||||
if (this->actor.velocity.y <= 0.0f && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
EnGoma_SetupLand(this);
|
||||
if (this->actor.params < 6) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_GOMA_BJR_LAND2);
|
||||
@@ -548,7 +548,7 @@ void EnGoma_ChasePlayer(EnGoma* this, PlayState* play) {
|
||||
Math_ApproachS(&this->actor.world.rot.y, this->actor.yawTowardsPlayer, 3, 2000);
|
||||
Math_ApproachS(&this->actor.shape.rot.y, this->actor.world.rot.y, 2, 3000);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
}
|
||||
if (this->actor.xzDistToPlayer <= 150.0f) {
|
||||
@@ -577,7 +577,7 @@ void EnGoma_Stunned(EnGoma* this, PlayState* play) {
|
||||
SkelAnime_Update(&this->skelanime);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
Math_ApproachZeroF(&this->actor.speedXZ, 0.5f, 2.0f);
|
||||
}
|
||||
@@ -885,7 +885,7 @@ void EnGoma_BossLimb(EnGoma* this, PlayState* play) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 50.0f, 50.0f, 100.0f, 4);
|
||||
this->actor.world.pos.y += 5.0f;
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.velocity.y = 0.0f;
|
||||
} else if (this->actionTimer < 250) {
|
||||
this->actor.shape.rot.y += 2000;
|
||||
|
||||
@@ -642,7 +642,7 @@ void EnGoroiwa_SetupMoveAndFallToGround(EnGoroiwa* this) {
|
||||
|
||||
void EnGoroiwa_MoveAndFallToGround(EnGoroiwa* this, PlayState* play) {
|
||||
EnGoroiwa_MoveAndFall(this, play);
|
||||
if ((this->actor.bgCheckFlags & 1) && this->actor.velocity.y < 0.0f) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && this->actor.velocity.y < 0.0f) {
|
||||
if ((this->stateFlags & ENGOROIWA_PLAYER_IN_THE_WAY) && (this->actor.home.rot.z & 1) == 1) {
|
||||
EnGoroiwa_ReverseDirection(this);
|
||||
EnGoroiwa_FaceNextWaypoint(this, play);
|
||||
|
||||
@@ -359,7 +359,7 @@ void EnHintnuts_Run(EnHintnuts* this, PlayState* play) {
|
||||
if (Math_SmoothStepToS(&this->actor.world.rot.y, this->unk_196, 1, 0xE38, 0xB6) == 0) {
|
||||
if (this->actor.bgCheckFlags & 0x20) {
|
||||
this->unk_196 = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->unk_196 = this->actor.wallYaw;
|
||||
} else if (this->animFlagAndTimer == 0) {
|
||||
diffRotInit = Actor_WorldYawTowardPoint(&this->actor, &this->actor.home.pos);
|
||||
@@ -411,7 +411,7 @@ void EnHintnuts_Leave(EnHintnuts* this, PlayState* play) {
|
||||
if (Animation_OnFrame(&this->skelAnime, 0.0f) || Animation_OnFrame(&this->skelAnime, 6.0f)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_NUTS_WALK);
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
temp_a1 = this->actor.wallYaw;
|
||||
} else {
|
||||
temp_a1 = this->actor.yawTowardsPlayer - Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) - 0x8000;
|
||||
|
||||
@@ -431,7 +431,7 @@ void EnHonotrap_FlameChase(EnHonotrap* this, PlayState* play) {
|
||||
this->actor.speedXZ *= 0.1f;
|
||||
this->actor.velocity.y *= 0.1f;
|
||||
EnHonotrap_SetupFlameVanish(this);
|
||||
} else if ((this->actor.bgCheckFlags & 8) || (this->timer <= 0)) {
|
||||
} else if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) || (this->timer <= 0)) {
|
||||
EnHonotrap_SetupFlameVanish(this);
|
||||
} else {
|
||||
EnHonotrap_FlameCollisionCheck(this, play);
|
||||
|
||||
@@ -1755,7 +1755,7 @@ void EnHorse_Inactive(EnHorse* this, PlayState* play2) {
|
||||
|
||||
// Focus the camera on Epona
|
||||
Camera_SetParam(play->cameraPtrs[0], 8, this);
|
||||
Camera_ChangeSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_RequestSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_SetCameraData(play->cameraPtrs[0], 4, NULL, NULL, 0x51, 0, 0);
|
||||
}
|
||||
}
|
||||
@@ -1829,7 +1829,7 @@ void EnHorse_Idle(EnHorse* this, PlayState* play) {
|
||||
this->followTimer = 0;
|
||||
EnHorse_SetFollowAnimation(this, play);
|
||||
Camera_SetParam(play->cameraPtrs[0], 8, this);
|
||||
Camera_ChangeSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_RequestSetting(play->cameraPtrs[0], 0x38);
|
||||
Camera_SetCameraData(play->cameraPtrs[0], 4, NULL, NULL, 0x51, 0, 0);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -398,7 +398,7 @@ void EnHorseNormal_Wander(EnHorseNormal* this, PlayState* play) {
|
||||
this->actor.speedXZ = 8.0f;
|
||||
phi_t0 = 6;
|
||||
}
|
||||
if (Rand_ZeroOne() < 0.1f || (this->unk_21E == 0 && ((this->actor.bgCheckFlags & 8) ||
|
||||
if (Rand_ZeroOne() < 0.1f || (this->unk_21E == 0 && ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) ||
|
||||
(this->bodyCollider.base.ocFlags1 & OC1_HIT) ||
|
||||
(this->headCollider.base.ocFlags1 & OC1_HIT)))) {
|
||||
this->unk_21E += (Rand_ZeroOne() * 30.0f) - 15.0f;
|
||||
|
||||
@@ -385,7 +385,7 @@ void func_80A74BA4(EnIk* this, PlayState* play) {
|
||||
sp2E = 9;
|
||||
}
|
||||
temp_a1 = this->actor.wallYaw - this->actor.shape.rot.y;
|
||||
if ((this->actor.bgCheckFlags & 8) && (ABS(temp_a1) >= 0x4000)) {
|
||||
if ((this->actor.bgCheckFlags & BGCHECKFLAG_WALL) && (ABS(temp_a1) >= 0x4000)) {
|
||||
temp_a1 = (this->actor.yawTowardsPlayer > 0) ? this->actor.wallYaw - 0x4000 : this->actor.wallYaw + 0x4000;
|
||||
Math_SmoothStepToS(&this->actor.world.rot.y, temp_a1, 1, phi_a3, 0);
|
||||
} else {
|
||||
|
||||
@@ -436,7 +436,7 @@ void func_80A79BAC(EnIn* this, PlayState* play, s32 index, u32 transitionType) {
|
||||
play->transitionType = transitionType;
|
||||
play->transitionTrigger = TRANS_TRIGGER_START;
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 8);
|
||||
Interface_ChangeAlpha(1);
|
||||
Interface_ChangeHudVisibilityMode(1);
|
||||
if (index == 0) {
|
||||
AREG(6) = 0;
|
||||
}
|
||||
@@ -473,8 +473,8 @@ void func_80A79C78(EnIn* this, PlayState* play) {
|
||||
}
|
||||
player->actor.freezeTimer = 10;
|
||||
this->actor.flags &= ~ACTOR_FLAG_ATTENTION_ENABLED;
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeAlpha(2);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
}
|
||||
|
||||
static s32 D_80A7B998 = 0;
|
||||
@@ -795,8 +795,8 @@ void func_80A7AA40(EnIn* this, PlayState* play) {
|
||||
this->interactInfo.talkState = NPC_TALK_STATE_TALKING;
|
||||
this->unk_1FC = 0;
|
||||
play->csCtx.frames = 0;
|
||||
ShrinkWindow_SetVal(0x20);
|
||||
Interface_ChangeAlpha(2);
|
||||
Letterbox_SetSizeTarget(0x20);
|
||||
Interface_ChangeHudVisibilityMode(2);
|
||||
this->actionFunc = func_80A7ABD4;
|
||||
}
|
||||
|
||||
@@ -861,7 +861,7 @@ void func_80A7AE84(EnIn* this, PlayState* play) {
|
||||
Play_ChangeCameraStatus(play, this->activeCamId, CAM_STAT_ACTIVE);
|
||||
Play_ClearCamera(play, this->camId);
|
||||
Player_SetCsActionWithHaltedActors(play, &this->actor, 7);
|
||||
Interface_ChangeAlpha(0x32);
|
||||
Interface_ChangeHudVisibilityMode(0x32);
|
||||
this->actionFunc = func_80A7AEF0;
|
||||
}
|
||||
|
||||
|
||||
@@ -265,7 +265,8 @@ void EnInsect_SlowDown(EnInsect* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (((this->insectFlags & 4) && this->lifeTimer <= 0) ||
|
||||
((sp2E == 2 || sp2E == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) {
|
||||
((sp2E == 2 || sp2E == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
D_80A7DEB8 >= 4)) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) {
|
||||
EnInsect_SetupWalkOnWater(this);
|
||||
@@ -308,7 +309,8 @@ void EnInsect_Crawl(EnInsect* this, PlayState* play) {
|
||||
}
|
||||
|
||||
if (((this->insectFlags & 4) && this->lifeTimer <= 0) ||
|
||||
((sp34 == 2 || sp34 == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4)) {
|
||||
((sp34 == 2 || sp34 == 3) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) &&
|
||||
D_80A7DEB8 >= 4)) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else if ((this->insectFlags & 1) && (this->actor.bgCheckFlags & 0x40)) {
|
||||
EnInsect_SetupWalkOnWater(this);
|
||||
@@ -640,7 +642,7 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
|
||||
|
||||
Actor_SetScale(&this->actor, CLAMP_MAX(thisTemp->actor.scale.x + 0.0008f, 0.01f));
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
Math_SmoothStepToF(&this->actor.speedXZ, this->unk_324, 0.1f, 0.5f, 0.0f);
|
||||
Math_ScaledStepToS(&this->actor.world.rot.y, this->unk_328, 2000);
|
||||
sp50 = Math_ScaledStepToS(&this->actor.world.rot.x, 0, 2000);
|
||||
@@ -668,7 +670,7 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
|
||||
}
|
||||
|
||||
SkelAnime_Update(&this->skelAnime);
|
||||
if (!(this->insectFlags & 0x40) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & 1)) {
|
||||
if (!(this->insectFlags & 0x40) && (this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EN_MUSI_LAND);
|
||||
this->insectFlags |= 0x40;
|
||||
}
|
||||
@@ -693,7 +695,7 @@ void EnInsect_Dropped(EnInsect* this, PlayState* play) {
|
||||
if (sp40 < 9.0f) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else if (this->actionTimer <= 0 || this->lifeTimer <= 0 ||
|
||||
((this->insectFlags & 1) && (this->actor.bgCheckFlags & 1) && D_80A7DEB8 >= 4 &&
|
||||
((this->insectFlags & 1) && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) && D_80A7DEB8 >= 4 &&
|
||||
(sp3A == 2 || sp3A == 3))) {
|
||||
EnInsect_SetupDig(this);
|
||||
} else {
|
||||
@@ -742,7 +744,7 @@ void EnInsect_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
if (this->insectFlags & 0x100) {
|
||||
if (this->insectFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
EnInsect_UpdateCrawlSfx(this);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -149,11 +149,11 @@ void EnIshi_SpawnFragmentsSmall(EnIshi* this, PlayState* play) {
|
||||
pos.y = this->actor.world.pos.y + (Rand_ZeroOne() * 5.0f) + 5.0f;
|
||||
pos.z = this->actor.world.pos.z + (Rand_ZeroOne() - 0.5f) * 8.0f;
|
||||
Math_Vec3f_Copy(&velocity, &this->actor.velocity);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
velocity.x *= 0.8f;
|
||||
velocity.y *= -0.8f;
|
||||
velocity.z *= 0.8f;
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
velocity.x *= -0.8f;
|
||||
velocity.y *= 0.8f;
|
||||
velocity.z *= -0.8f;
|
||||
@@ -221,11 +221,11 @@ void EnIshi_SpawnDustSmall(EnIshi* this, PlayState* play) {
|
||||
Vec3f pos;
|
||||
|
||||
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
pos.x += 2.0f * this->actor.velocity.x;
|
||||
pos.y -= 2.0f * this->actor.velocity.y;
|
||||
pos.z += 2.0f * this->actor.velocity.z;
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
pos.x -= 2.0f * this->actor.velocity.x;
|
||||
pos.y += 2.0f * this->actor.velocity.y;
|
||||
pos.z -= 2.0f * this->actor.velocity.z;
|
||||
@@ -237,11 +237,11 @@ void EnIshi_SpawnDustLarge(EnIshi* this, PlayState* play) {
|
||||
Vec3f pos;
|
||||
|
||||
Math_Vec3f_Copy(&pos, &this->actor.world.pos);
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
pos.x += 2.0f * this->actor.velocity.x;
|
||||
pos.y -= 2.0f * this->actor.velocity.y;
|
||||
pos.z += 2.0f * this->actor.velocity.z;
|
||||
} else if (this->actor.bgCheckFlags & 8) {
|
||||
} else if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
pos.x -= 2.0f * this->actor.velocity.x;
|
||||
pos.y += 2.0f * this->actor.velocity.y;
|
||||
pos.z -= 2.0f * this->actor.velocity.z;
|
||||
|
||||
@@ -190,7 +190,7 @@ void EnJs_Update(Actor* thisx, PlayState* play) {
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 0.0f, 0.0f, 0.0f, 4);
|
||||
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
if (SurfaceType_GetSfx(&play->colCtx, this->actor.floorPoly, this->actor.floorBgId) == 1) {
|
||||
Math_ApproachF(&this->actor.shape.yOffset, sREG(80) + -2000.0f, 1.0f, (sREG(81) / 10.0f) + 50.0f);
|
||||
}
|
||||
|
||||
@@ -141,7 +141,7 @@ void func_80A8F320(EnKakasi* this, PlayState* play, s16 arg) {
|
||||
|
||||
if (this->unk_19A != 0) {
|
||||
this->actor.gravity = -1.0f;
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & 1)) {
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 3.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_KAKASHI_JUMP);
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ void func_80A90EBC(EnKakasi3* this, PlayState* play, s32 arg) {
|
||||
|
||||
if (this->unk_19A != 0) {
|
||||
this->actor.gravity = -1.0f;
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & 1)) {
|
||||
if (this->unk_19A == 8 && (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND)) {
|
||||
this->actor.velocity.y = 3.0f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_IT_KAKASHI_JUMP);
|
||||
}
|
||||
|
||||
@@ -446,7 +446,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
|
||||
this->actor.yDistToWater = tempYDistToWater;
|
||||
|
||||
osSyncPrintf(VT_RST);
|
||||
onGround = (this->actor.bgCheckFlags & 1);
|
||||
onGround = (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND);
|
||||
if (this->spinXFlag) {
|
||||
this->spinRot.x += this->spinVel.x;
|
||||
this->spinVel.x -= 0x800;
|
||||
@@ -483,7 +483,7 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
|
||||
if (this->spinVel.z < -0xC00) {
|
||||
this->spinVel.z = -0xC00;
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.speedXZ *= -0.5f;
|
||||
Audio_PlayActorSound2(&this->actor, NA_SE_EV_WOODPLATE_BOUND);
|
||||
}
|
||||
@@ -595,13 +595,13 @@ void EnKanban_Update(Actor* thisx, PlayState* play2) {
|
||||
this->spinVel.y = this->actor.speedXZ * -1000.0f;
|
||||
}
|
||||
}
|
||||
if (this->actor.bgCheckFlags & 1) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_GROUND) {
|
||||
this->actor.speedXZ = 0.0f;
|
||||
}
|
||||
Actor_MoveXZGravity(&this->actor);
|
||||
if (this->actor.speedXZ != 0.0f) {
|
||||
Actor_UpdateBgCheckInfo(play, &this->actor, 10.0f, 10.0f, 50.0f, 5);
|
||||
if (this->actor.bgCheckFlags & 8) {
|
||||
if (this->actor.bgCheckFlags & BGCHECKFLAG_WALL) {
|
||||
this->actor.speedXZ *= -0.5f;
|
||||
if (this->spinVel.y > 0) {
|
||||
this->spinVel.y = -0x7D0;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user