Skip to content

Commit

Permalink
enum renames
Browse files Browse the repository at this point in the history
  • Loading branch information
z64a committed Sep 12, 2024
1 parent a1f5c06 commit 22cdcea
Show file tree
Hide file tree
Showing 178 changed files with 1,208 additions and 1,197 deletions.
31 changes: 17 additions & 14 deletions include/effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -1259,24 +1259,27 @@ typedef struct SmallGoldSparkleFXData {
/* 0x20 */ s32 unk_20;
} SmallGoldSparkleFXData; // size = 0x24

typedef struct FlashingBoxShockwaveFXData {
/* 0x00 */ s32 unk_00;
enum ShockOverlayFXTypes {
FX_SHOCK_OVERLAY_SHOCK_HIT = 0,
FX_SHOCK_OVERLAY_LIGHTNING_WORLD = 1,
FX_SHOCK_OVERLAY_MEGA_SHOCK = 2,
FX_SHOCK_OVERLAY_LIGHTNING_BATTLE = 3,
};

typedef struct ShockOverlayFXData {
/* 0x00 */ s32 type;
/* 0x04 */ Vec3f pos;
/* 0x10 */ s32 unk_10;
/* 0x14 */ s32 unk_14;
/* 0x18 */ s32 unk_18;
/* 0x1C */ s32 unk_1C;
/* 0x20 */ s32 unk_20;
/* 0x1C */ s32 timeLeft;
/* 0x20 */ s32 lifetime;
/* 0x24 */ f32 unk_24;
/* 0x28 */ f32 unk_28;
/* 0x2C */ f32 unk_2C;
/* 0x30 */ s32 unk_30;
/* 0x34 */ s32 unk_34;
/* 0x38 */ s32 unk_38;
/* 0x3C */ s32 unk_3C;
/* 0x40 */ s32 unk_40;
/* 0x44 */ s32 unk_44;
} FlashingBoxShockwaveFXData; // size = 0x48
/* 0x28 */ f32 scaleX;
/* 0x2C */ f32 scaleY;
/* 0x30 */ Color3i primCol;
/* 0x3C */ Color3i envCol;
} ShockOverlayFXData; // size = 0x48

typedef struct BalloonFXData {
/* 0x00 */ s32 unk_00;
Expand Down Expand Up @@ -2532,7 +2535,7 @@ typedef union {
struct GatherMagicFXData* gatherMagic;
struct AttackResultTextFXData* attackResultText;
struct SmallGoldSparkleFXData* smallGoldSparkle;
struct FlashingBoxShockwaveFXData* flashingBoxShockwave;
struct ShockOverlayFXData* flashingBoxShockwave;
struct BalloonFXData* balloon;
struct FloatingRockFXData* floatingRock;
struct ChompDropFXData* chompDrop;
Expand Down
174 changes: 87 additions & 87 deletions include/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -4783,93 +4783,93 @@ enum CameraControlType {
CAM_CONTROL_CONSTAIN_BETWEEN_POINTS = 6,
};

enum BtlCameraPreset {
BTL_CAM_RESET = 0, // unused?
BTL_CAM_INTERRUPT = 1, // forces camera motion to end
BTL_CAM_DEFAULT = 2,
BTL_CAM_PRESET_03 = 3,
BTL_CAM_PRESET_04 = 4,
BTL_CAM_PRESET_05 = 5,
BTL_CAM_PRESET_06 = 6, // unused?
BTL_CAM_ACTOR_GOAL = 7,
BTL_CAM_PRESET_08 = 8,
BTL_CAM_SLOW_DEFAULT = 9, // unused, same as BTL_CAM_DEFAULT but takes 4x as long
BTL_CAM_PRESET_10 = 10,
BTL_CAM_PRESET_11 = 11,
BTL_CAM_PRESET_12 = 12, // unused?
BTL_CAM_PRESET_13 = 13,
BTL_CAM_PRESET_14 = 14, // FOCUS_ON_TARGET?
BTL_CAM_PRESET_15 = 15,
BTL_CAM_PRESET_16 = 16, // unused?
BTL_CAM_PRESET_17 = 17, // unused?
BTL_CAM_PRESET_18 = 18, // unused?
BTL_CAM_PRESET_19 = 19,
BTL_CAM_PRESET_20 = 20, // unused?
BTL_CAM_PRESET_21 = 21, // unused?
BTL_CAM_PLAYER_ENTRY = 22,
BTL_CAM_VICTORY = 23, // closeup on party while star points are tallied
BTL_CAM_PRESET_24 = 24,
BTL_CAM_PRESET_25 = 25, // closeup on player used when running away or being defeated
BTL_CAM_PLAYER_ATTACK_APPROACH = 26,
BTL_CAM_PRESET_27 = 27,
BTL_CAM_PRESET_28 = 28,
BTL_CAM_PRESET_29 = 29,
BTL_CAM_PLAYER_HIT_SPIKE = 30, // player hurt via spike contact
BTL_CAM_PLAYER_HIT_HAZARD = 31, // player hurt via burn or shock contact
BTL_CAM_PLAYER_CHARGE_UP = 32,
BTL_CAM_PLAYER_STATUS_AFFLICTED = 33,
BTL_CAM_PRESET_34 = 34,
BTL_CAM_PRESET_35 = 35,
BTL_CAM_PRESET_36 = 36, // unused?
BTL_CAM_PRESET_37 = 37,
BTL_CAM_PRESET_38 = 38,
BTL_CAM_PRESET_39 = 39,
BTL_CAM_PRESET_40 = 40,
BTL_CAM_PRESET_41 = 41, // unused?
BTL_CAM_PRESET_42 = 42, // unused?
BTL_CAM_PLAYER_AIM_HAMMER = 43,
BTL_CAM_PLAYER_HAMMER_STRIKE = 44,
BTL_CAM_PRESET_45 = 45, // unused?
BTL_CAM_PRESET_46 = 46,
BTL_CAM_PARTNER_APPROACH = 47, // used by Goombario and Watt (power shock only)
BTL_CAM_PRESET_48 = 48,
BTL_CAM_PRESET_49 = 49, // unused?
BTL_CAM_PRESET_50 = 50,
BTL_CAM_PRESET_51 = 51,
BTL_CAM_PRESET_52 = 52,
BTL_CAM_PRESET_53 = 53,
BTL_CAM_PARTNER_INJURED = 54, // closeup on partner after being injured
BTL_CAM_PRESET_55 = 55,
BTL_CAM_PRESET_56 = 56, // unused?
BTL_CAM_PRESET_57 = 57, // unused?
BTL_CAM_PRESET_58 = 58, // unused?
BTL_CAM_PRESET_59 = 59,
BTL_CAM_PRESET_60 = 60, // unused?
BTL_CAM_PRESET_61 = 61,
BTL_CAM_PRESET_62 = 62,
BTL_CAM_ENEMY_APPROACH = 63, // (very common)
BTL_CAM_PRESET_64 = 64, // unused?
BTL_CAM_DEFAULT_UNUSED = 65, // unused, same as BTL_CAM_DEFAULT but takes slightly longer
BTL_CAM_PRESET_66 = 66,
BTL_CAM_PRESET_67 = 67, // unused?
BTL_CAM_PRESET_68 = 68, // unused?
BTL_CAM_PRESET_69 = 69,
BTL_CAM_PRESET_70 = 70, // unused?
BTL_CAM_PRESET_71 = 71, // unused?
BTL_CAM_PRESET_72 = 72, // unused?
BTL_CAM_PRESET_73 = 73,
};

enum BattleCamXModes {
BTL_CAM_MODEX_0 = 0,
BTL_CAM_MODEX_1 = 1,
};

enum BattleCamYModes {
BTL_CAM_MODEY_MINUS_2 = -2, // below actor
BTL_CAM_MODEY_MINUS_1 = -1, // use target Y?
BTL_CAM_MODEY_0 = 0, // use actor Y?
BTL_CAM_MODEY_1 = 1, // use average
enum BattleCamPreset {
BTL_CAM_RESET = 0x00, // unused?
BTL_CAM_INTERRUPT = 0x01, // forces camera motion to end
BTL_CAM_DEFAULT = 0x02,
BTL_CAM_PRESET_03 = 0x03,
BTL_CAM_PRESET_04 = 0x04,
BTL_CAM_PRESET_05 = 0x05,
BTL_CAM_PRESET_UNUSED_06 = 0x06,
BTL_CAM_ACTOR_GOAL = 0x07,
BTL_CAM_PRESET_08 = 0x08,
BTL_CAM_SLOW_DEFAULT = 0x09, // unused, same as BTL_CAM_DEFAULT but takes 4x as long
BTL_CAM_PRESET_0A = 0x0A,
BTL_CAM_PRESET_0B = 0x0B,
BTL_CAM_PRESET_UNUSED_0C = 0x0C,
BTL_CAM_PRESET_0D = 0x0D,
BTL_CAM_PRESET_0E = 0x0E, // FOCUS_ON_TARGET?
BTL_CAM_PRESET_0F = 0x0F,
BTL_CAM_PRESET_UNUSED_10 = 0x10,
BTL_CAM_PRESET_UNUSED_11 = 0x11,
BTL_CAM_PRESET_UNUSED_12 = 0x12,
BTL_CAM_PRESET_13 = 0x13,
BTL_CAM_PRESET_UNUSED_14 = 0x14,
BTL_CAM_PRESET_UNUSED_15 = 0x15,
BTL_CAM_PLAYER_ENTRY = 0x16,
BTL_CAM_VICTORY = 0x17, // closeup on party while star points are tallied
BTL_CAM_PLAYER_DIES = 0x18, // closeup on player dying
BTL_CAM_PLAYER_FLEE = 0x19, // closeup on player while running away
BTL_CAM_PLAYER_ATTACK_APPROACH = 0x1A,
BTL_CAM_PRESET_1B = 0x1B,
BTL_CAM_PRESET_1C = 0x1C,
BTL_CAM_PRESET_1D = 0x1D,
BTL_CAM_PLAYER_HIT_SPIKE = 0x1E, // player hurt via spike contact
BTL_CAM_PLAYER_HIT_HAZARD = 0x1F, // player hurt via burn or shock contact
BTL_CAM_PLAYER_CHARGE_UP = 0x20,
BTL_CAM_PLAYER_STATUS_AFFLICTED = 0x21,
BTL_CAM_PRESET_22 = 0x22,
BTL_CAM_PRESET_23 = 0x23,
BTL_CAM_PRESET_UNUSED_24 = 0x24,
BTL_CAM_PRESET_25 = 0x25,
BTL_CAM_PRESET_26 = 0x26,
BTL_CAM_PRESET_27 = 0x27,
BTL_CAM_PRESET_28 = 0x28,
BTL_CAM_PRESET_UNUSED_29 = 0x29,
BTL_CAM_PRESET_UNUSED_2A = 0x2A,
BTL_CAM_PLAYER_AIM_HAMMER = 0x2B,
BTL_CAM_PLAYER_HAMMER_STRIKE = 0x2C,
BTL_CAM_PRESET_UNUSED_2D = 0x2D,
BTL_CAM_PRESET_2E = 0x2E,
BTL_CAM_PARTNER_APPROACH = 0x2F, // used by Goombario and Watt (power shock only)
BTL_CAM_CLOSER_PARTNER_APPROACH = 0x30,
BTL_CAM_PRESET_UNUSED_31 = 0x31,
BTL_CAM_PRESET_32 = 0x32, // goombario pre-jump 1
BTL_CAM_PRESET_33 = 0x33,
BTL_CAM_PRESET_34 = 0x34,
BTL_CAM_PRESET_35 = 0x35, // goombario pre-jump 2
BTL_CAM_PARTNER_INJURED = 0x36, // closeup on partner after being injured
BTL_CAM_PRESET_37 = 0x37,
BTL_CAM_PRESET_UNUSED_38 = 0x38,
BTL_CAM_PRESET_UNUSED_39 = 0x39,
BTL_CAM_PRESET_UNUSED_3A = 0x3A,
BTL_CAM_PRESET_3B = 0x3B,
BTL_CAM_PRESET_UNUSED_3C = 0x3C,
BTL_CAM_PARTNER_HIT_SPIKE = 0x3D, // partner hurt via spike contact
BTL_CAM_PARTNER_HIT_HAZARD = 0x3E, // partner hurt via burn or shock contact
BTL_CAM_ENEMY_APPROACH = 0x3F, // (very common)
BTL_CAM_PRESET_UNUSED_40 = 0x40,
BTL_CAM_DEFAULT_UNUSED = 0x41, // unused, same as BTL_CAM_DEFAULT but takes slightly longer
BTL_CAM_PRESET_42 = 0x42, // used just before contact from dive attacks (paragoomba, para jr troopa, etc)
BTL_CAM_PRESET_UNUSED_43 = 0x43,
BTL_CAM_PRESET_UNUSED_44 = 0x44,
BTL_CAM_PRESET_45 = 0x45,
BTL_CAM_PRESET_UNUSED_46 = 0x46,
BTL_CAM_PRESET_UNUSED_47 = 0x47,
BTL_CAM_PRESET_UNUSED_48 = 0x48,
BTL_CAM_STAR_SPIRIT = 0x49,
};

enum BattleCamTargetAdjustX {
BTL_CAM_XADJ_NONE = 0, // use actor X
BTL_CAM_XADJ_AVG = 1, // use average
};

enum BattleCamTargetAdjustY {
BTL_CAM_YADJ_SLIGHT = -2, // target y position is weighted 75% actor and 25% target:
BTL_CAM_YADJ_TARGET = -1, // use target Y
BTL_CAM_YADJ_NONE = 0, // use actor Y
BTL_CAM_YADJ_AVG = 1, // target y position is weighted 66% actor and 33% target:
};

enum ModelAnimatorFlags {
Expand Down
18 changes: 9 additions & 9 deletions include/script_api/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ API_CALLABLE(MoveBattleCamOver);
API_CALLABLE(SetBattleCamZoom);
API_CALLABLE(AddBattleCamZoom);
API_CALLABLE(FreezeBattleCam);
API_CALLABLE(func_8024EDA4);
API_CALLABLE(DisableBattleCamClampX);
API_CALLABLE(ShowMessageBox);
API_CALLABLE(ShowVariableMessageBox);
API_CALLABLE(IsMessageBoxDisplayed);
Expand Down Expand Up @@ -277,7 +277,7 @@ API_CALLABLE(GetPartAnimNotify);
API_CALLABLE(InitAnimatedModels);
API_CALLABLE(SetCamLookTarget);
API_CALLABLE(PartnerYieldTurn); ///< YieldTurn copy
API_CALLABLE(func_8024ECF8);
API_CALLABLE(SetBattleCamTargetingModes);
API_CALLABLE(UseBattleCamPresetImmediately);
API_CALLABLE(UseBattleCamPresetWait);
API_CALLABLE(HideHealthBar);
Expand Down Expand Up @@ -318,8 +318,8 @@ extern EvtScript EVS_StartDefend;
extern EvtScript EVS_RunAwayStart;
extern EvtScript EVS_RunAwayFail;
extern EvtScript EVS_PlayerDies;
extern EvtScript EVS_PlayEatFX;
extern EvtScript EVS_PlayDrinkFX;
extern EvtScript EVS_Unused_EatItem;
extern EvtScript EVS_Unused_DrinkItem;
extern EvtScript EVS_UseLifeShroom;
extern EvtScript EVS_MerleeRunOut;
extern EvtScript EVS_MerleeAttackBonus;
Expand Down Expand Up @@ -382,14 +382,14 @@ extern EvtScript EVS_BattleCam_Interrupt;
extern EvtScript EVS_BattleCam_ResetNeutral;
extern EvtScript EVS_BattleCam_ViewEnemies;
extern EvtScript EVS_BattleCam_ViewEnemies_MaintainY;
extern EvtScript CamPreset_F;
extern EvtScript CamPreset_G;
extern EvtScript EVS_BattleCam_UnkF_Skippable;
extern EvtScript EVS_BattleCam_UnkG_Skippable;
extern EvtScript EVS_BattleCam_FocusGoal;
extern EvtScript EVS_BattleCam_FocusActor;
extern EvtScript CamPreset_J;
extern EvtScript EVS_BattleCam_SimpleLerp_Skippable;
extern EvtScript EVS_BattleCam_FollowActorY;
extern EvtScript EVS_BattleCam_FollowActorPos;
extern EvtScript CamPreset_M;
extern EvtScript EVS_BattleCam_SimpleLerp;
extern EvtScript EVS_BattleCam_UnkM_Skippable;
extern EvtScript EVS_BattleCam_SimpleLerp_Unskippable;

#endif
8 changes: 4 additions & 4 deletions src/battle/actor_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -3273,7 +3273,7 @@ API_CALLABLE(BoostAttack) {
case 1:
if (script->functionTemp[3] == 0) {
fx_radial_shimmer(2, x1, y1, z1, 1.0f, 30);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_19);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_13);
script->functionTemp[3] = 30;
script->functionTemp[0] = 2;
} else {
Expand Down Expand Up @@ -3397,7 +3397,7 @@ API_CALLABLE(BoostDefense) {
case 1:
if (script->functionTemp[3] == 0) {
fx_radial_shimmer(2, x1, y1, z1, 1.0f, 30);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_19);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_13);
script->functionTemp[3] = 30;
script->functionTemp[0] = 2;
} else {
Expand Down Expand Up @@ -3508,7 +3508,7 @@ API_CALLABLE(VanishActor) {
case 1:
if (script->functionTemp[3] == 0) {
fx_radial_shimmer(3, x, y, z, 1.0f, 30);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_19);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_13);
script->functionTemp[3] = 30;
script->functionTemp[0] = 2;
} else {
Expand Down Expand Up @@ -3614,7 +3614,7 @@ API_CALLABLE(ElectrifyActor) {
case 1:
if (script->functionTemp[3] == 0) {
fx_snaking_static(8, x, y, z, 1.0f, 30);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_19);
btl_cam_use_preset_immediately(BTL_CAM_PRESET_13);
script->functionTemp[3] = 30;
script->functionTemp[0] = 2;
} else {
Expand Down
8 changes: 4 additions & 4 deletions src/battle/area/arn/actor/tubba_blubba.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ EvtScript N(EVS_Attack_SlamFist) = {
Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
Call(SetBattleCamZoom, 150)
Call(BattleCamTargetActor, ACTOR_SELF)
Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE)
Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
Set(LVar1, ANIM_BattleTubba_Anim06)
ExecWait(N(EVS_DummyCheck))
Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
Expand Down Expand Up @@ -342,7 +342,7 @@ EvtScript N(EVS_Attack_SlamFist) = {
Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
Call(SetBattleCamZoom, 200)
Call(BattleCamTargetActor, ACTOR_SELF)
Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE)
Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
Call(MoveBattleCamOver, 30)
Switch(LVarF)
CaseOrEq(HIT_RESULT_HIT)
Expand All @@ -366,7 +366,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
Call(SetBattleCamZoom, 150)
Call(BattleCamTargetActor, ACTOR_SELF)
Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE)
Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
Set(LVar1, ANIM_BattleTubba_Anim06)
ExecWait(N(EVS_DummyCheck))
Call(SetAnimation, ACTOR_SELF, PRT_MAIN, LVar1)
Expand Down Expand Up @@ -449,7 +449,7 @@ EvtScript N(EVS_Attack_BodySlam) = {
Call(UseBattleCamPreset, BTL_CAM_ENEMY_APPROACH)
Call(SetBattleCamZoom, 200)
Call(BattleCamTargetActor, ACTOR_SELF)
Call(func_8024ECF8, BTL_CAM_MODEY_MINUS_1, BTL_CAM_MODEX_1, FALSE)
Call(SetBattleCamTargetingModes, BTL_CAM_YADJ_TARGET, BTL_CAM_XADJ_AVG, FALSE)
Call(MoveBattleCamOver, 30)
Switch(LVarF)
CaseOrEq(HIT_RESULT_HIT)
Expand Down
Loading

0 comments on commit 22cdcea

Please sign in to comment.