Skip to content

Commit

Permalink
mostly startup stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
HailSanta authored and HailSanta committed Oct 9, 2023
1 parent e2223d8 commit 2209585
Show file tree
Hide file tree
Showing 53 changed files with 839 additions and 788 deletions.
28 changes: 14 additions & 14 deletions include/common_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ typedef struct BattleStatus {
/* 0x092 */ s8 reflectFlags;
/* 0x093 */ s8 unk_93;
/* 0x094 */ s8 unk_94;
/* 0x095 */ s8 unk_95;
/* 0x095 */ s8 waitForState;
/* 0x096 */ s8 hammerCharge;
/* 0x097 */ s8 jumpCharge;
/* 0x098 */ char unk_98;
Expand Down Expand Up @@ -1412,38 +1412,38 @@ typedef struct GameStatus {
/* 0x07A */ b8 musicEnabled;
/* 0x07B */ char unk_7B;
/* 0x07C */ b8 healthBarsEnabled;
/* 0x07D */ s8 keepUsingPartnerOnMapChange;
/* 0x07D */ b8 keepUsingPartnerOnMapChange;
/* 0x07E */ u8 peachFlags; /* (1 = isPeach, 2 = isTransformed, 4 = hasUmbrella) */
/* 0x07F */ s8 peachDisguise; /* (1 = koopatrol, 2 = hammer bros, 3 = clubba) */
/* 0x080 */ u8 peachBakingIngredient; ///< @see enum PeachBakingItems
/* 0x081 */ b8 multiplayerEnabled;
/* 0x082 */ Vec2b unk_82;
/* 0x082 */ Vec2b altViewportOffset;
/* 0x084 */ s8 playerSpriteSet;
/* 0x085 */ char unk_85;
/* 0x086 */ s16 areaID;
/* 0x088 */ s16 prevArea;
/* 0x08A */ s16 didAreaChange;
/* 0x08A */ b16 didAreaChange;
/* 0x08C */ s16 mapID;
/* 0x08E */ s16 entryID;
/* 0x090 */ u16 unk_90;
/* 0x092 */ u16 unk_92;
/* 0x094 */ f32 exitTangent;
/* 0x098 */ Vec3f playerPos;
/* 0x0A4 */ f32 playerYaw;
/* 0x0A8 */ s8 creditsViewportMode;
/* 0x0A8 */ s8 introPart;
/* 0x0A9 */ s8 unk_A9; // selected language?
/* 0x0AA */ s8 demoBattleFlags;
/* 0x0AB */ u8 soundOutputMode;
/* 0x0AC */ s8 introState;
/* 0x0AD */ s8 introCounter;
/* 0x0AE */ s8 bSkipIntro;
/* 0x0AF */ s8 unk_AF;
/* 0x0B0 */ s8 unk_B0;
/* 0x0AC */ s8 startupState; // used for various startup states like logos, title screen, intro, and demo
/* 0x0AD */ s8 logoTime;
/* 0x0AE */ b8 skipLogos;
/* 0x0AF */ s8 titleScreenTimer;
/* 0x0B0 */ s8 titleScreenDismissTime;
/* 0x0B1 */ char unk_B1[0x5];
/* 0x0B6 */ s16 bootAlpha;
/* 0x0B8 */ s16 bootBlue;
/* 0x0BA */ s16 bootGreen;
/* 0x0BC */ s16 bootRed;
/* 0x0B6 */ s16 screenColorA;
/* 0x0B8 */ s16 screenColorR;
/* 0x0BA */ s16 screenColorG;
/* 0x0BC */ s16 screenColorB;
/* 0x0BE */ char unk_BE[94];
/* 0x11C */ Vec3f playerGroundTraceAngles;
/* 0x128 */ Vec3f playerGroundTraceNormal;
Expand Down
2 changes: 1 addition & 1 deletion include/effects.h
Original file line number Diff line number Diff line change
Expand Up @@ -2319,7 +2319,7 @@ typedef struct BuffData {

typedef struct PartnerBuffFXData {
/* 0x00 */ s16 useRandomValues;
/* 0x02 */ s16 unk_02;
/* 0x02 */ s16 visible;
/* 0x04 */ s32 timeLeft;
/* 0x08 */ s32 lifeTime;
/* 0x0C */ BuffData unk_0C[3];
Expand Down
53 changes: 17 additions & 36 deletions include/enums.h
Original file line number Diff line number Diff line change
Expand Up @@ -2365,8 +2365,8 @@ typedef enum ScreenOverlayType {
OVERLAY_WORLD_DARKNESS = 11,
OVERLAY_BLUR = 12,
OVERLAY_BATTLE_DARKNESS = 13,
OVERLAY_UNUSED_1 = 14,
OVERLAY_UNUSED_2 = 15,
OVERLAY_INTRO_1 = 14,
OVERLAY_INTRO_2 = 15,
} ScreenOverlayType;

enum DoorSounds {
Expand Down Expand Up @@ -3487,36 +3487,19 @@ enum DemoFlags {
DEMO_BTL_FLAG_40 = 0x40,
};

enum IntroParts {
INTRO_PART_0 = 0,
INTRO_PART_1 = 1,
INTRO_PART_5 = 5,
INTRO_PART_100 = 100,
INTRO_PART_NONE = -1,
};

enum MapLoadType {
LOAD_FROM_MAP = 0,
LOAD_FROM_FILE_SELECT = 1,
};

enum IntroStates {
INTRO_STATE_0 = 0x00000000,
INTRO_STATE_1 = 0x00000001,
INTRO_STATE_2 = 0x00000002,
INTRO_STATE_3 = 0x00000003,
INTRO_STATE_4 = 0x00000004,
INTRO_STATE_5 = 0x00000005,
INTRO_STATE_6 = 0x00000006,
INTRO_STATE_7 = 0x00000007,
INTRO_STATE_8 = 0x00000008,
INTRO_STATE_9 = 0x00000009,
INTRO_STATE_A = 0x0000000A,
INTRO_STATE_B = 0x0000000B,
INTRO_STATE_C = 0x0000000C,
INTRO_STATE_D = 0x0000000D,
INTRO_STATE_E = 0x0000000E,
INTRO_STATE_F = 0x0000000F,
INTRO_STATE_10 = 0x00000010,
INTRO_STATE_11 = 0x00000011,
INTRO_STATE_12 = 0x00000012,
INTRO_STATE_13 = 0x00000013,
INTRO_STATE_14 = 0x00000014,
INTRO_STATE_15 = 0x00000015,
};

enum BattleStatusFlags1 {
BS_FLAGS1_ACTORS_VISIBLE = 0x00000001,
BS_FLAGS1_MENU_OPEN = 0x00000002,
Expand Down Expand Up @@ -3553,22 +3536,20 @@ enum BattleStatusFlags1 {
};

enum BattleStatusFlags2 {
BS_FLAGS2_1 = 0x00000001,
BS_FLAGS2_2 = 0x00000002,
BS_FLAGS2_4 = 0x00000004,
BS_FLAGS2_AWARDING_STAR_POINTS = 0x00000001, // star points move to the center of the screen
BS_FLAGS2_PLAYER_TURN_USED = 0x00000002, // set after player has used their action for this turn
BS_FLAGS2_PARTNER_TURN_USED = 0x00000004, // set after partner has used their action for this turn
BS_FLAGS2_8 = 0x00000008,
BS_FLAGS2_10 = 0x00000010,
BS_FLAGS2_CANT_FLEE = 0x00000020,
BS_FLAGS2_PEACH_BATTLE = 0x00000040,
BS_FLAGS2_80 = 0x00000080,
BS_FLAGS2_100 = 0x00000100, // dont decrement turbo charge on begin player turn
BS_FLAGS2_200 = 0x00000200,
BS_FLAGS2_STORED_TURBO_CHARGE_TURN = 0x00000100, // prevents turbo charge turns from decrementing on begin player turn
BS_FLAGS2_DOING_JUMP_TUTORIAL = 0x00000200,
BS_FLAGS2_400 = 0x00000400,
BS_FLAGS2_800 = 0x00000800,
BS_FLAGS2_NO_TARGET_AVAILABLE = 0x00001000,
BS_FLAGS2_IGNORE_DARKNESS = 0x00004000,
BS_FLAGS2_10000 = 0x00010000,
BS_FLAGS2_100000 = 0x00100000,
BS_FLAGS2_NO_PLAYER_PAL_ADJUST = 0x00100000,
BS_FLAGS2_IS_FIRST_STRIKE = 0x01000000,
BS_FLAGS2_DONT_STOP_MUSIC = 0x02000000, // don't stop playing the current song when the battle ends
BS_FLAGS2_HAS_DRAINED_HP = 0x04000000,
Expand Down Expand Up @@ -4218,7 +4199,7 @@ enum DebuffTypes {

enum GlobalOverrides {
GLOBAL_OVERRIDES_DISABLE_RENDER_WORLD = 0x00000002,
GLOBAL_OVERRIDES_8 = 0x00000008,
GLOBAL_OVERRIDES_DISABLE_DRAW_FRAME = 0x00000008,
GLOBAL_OVERRIDES_10 = 0x00000010,
GLOBAL_OVERRIDES_ENABLE_TRANSITION_STENCIL = 0x00000020,
GLOBAL_OVERRIDES_40 = 0x00000040,
Expand Down
12 changes: 6 additions & 6 deletions include/functions.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ s32 is_picking_up_item(void);
f32 integrate_gravity(void);
void gravity_use_fall_parms(void);
f32 get_clamped_angle_diff(f32, f32);
s32 intro_logos_fade_in(s16 subtractAlpha);
s32 intro_logos_fade_out(s16 addAlpha);
void intro_logos_update_fade(void);
b32 startup_fade_screen_in(s16 subtractAlpha);
b32 startup_fade_screen_out(s16 addAlpha);
void startup_fade_screen_update(void);

u32 get_entity_type(s32 arg0);
Entity* get_entity_by_index(s32 index);
Expand Down Expand Up @@ -279,8 +279,8 @@ s32 test_ray_entities(f32 startX, f32 startY, f32 startZ, f32 dirX, f32 dirY, f3

void mem_clear(void* data, s32 numBytes);

void intro_logos_set_fade_color(s16 color);
void intro_logos_set_fade_alpha(s16 alpha);
void startup_set_fade_screen_color(s16 color);
void startup_set_fade_screen_alpha(s16 alpha);

f32 get_xz_dist_to_player(f32, f32);
void func_800E06C0(s32);
Expand Down Expand Up @@ -1068,7 +1068,7 @@ void clear_sprite_shading_data(void);
void clear_character_set(void);
void clear_trigger_data(void);
void clear_script_list(void);
void clear_entity_data(s32);
void clear_entity_data(b32);
void clear_effect_data(void);

void clear_saved_variables(void);
Expand Down
2 changes: 1 addition & 1 deletion include/variables.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ extern s32 gEncounterSubState;
extern s32 timeFreezeMode;
extern s32 D_8009A678;

extern u8 D_800779B0;
extern u8 IntroMessageIdx;
extern s32 PartnerIDFromMenuIndex[12]; // partner IDs

// Scripts
Expand Down
Loading

0 comments on commit 2209585

Please sign in to comment.