Skip to content

Commit 0a191b9

Browse files
Remove redundant SETUP_ANIM setup loop ID.
This type was pointless since the game should be in the cutscene loop if a cutscene is playing. It would also do better as an enum.
1 parent c660220 commit 0a191b9

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

Diff for: src/GameSrc/Headers/setploop.h

+7-6
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
5757
#define SETUP_ANIM_UPDATE LL_CHG_BASE << 0
5858

5959
// loop id's
60-
#define SETUP_ANIM 0
61-
#define SETUP_JOURNEY 1
62-
#define SETUP_DIFFICULTY 2
63-
#define SETUP_CREDITS 3
64-
#define SETUP_CONTINUE 4
60+
typedef enum {
61+
SETUP_JOURNEY,
62+
SETUP_DIFFICULTY,
63+
SETUP_CREDITS,
64+
SETUP_CONTINUE
65+
} SetupMode;
6566

6667
// Prototypes
6768
void setup_loop(void);
6869
void journey_credits_done(void);
6970
errtype journey_credits_func(uchar draw_stuff);
7071

7172
// Globals
72-
extern int setup_mode;
73+
extern SetupMode setup_mode;
7374

7475
#endif // __SETPLOOP_H

Diff for: src/GameSrc/setup.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ uiSlab setup_slab;
103103
LGRegion setup_root_region;
104104
uchar play_intro_anim;
105105
uchar save_game_exists = FALSE;
106-
int setup_mode;
107-
int last_setup_mode;
106+
SetupMode setup_mode;
107+
SetupMode last_setup_mode;
108108
int intro_num;
109109
int splash_num;
110110
int diff_sum = 0;
@@ -1516,7 +1516,6 @@ void setup_loop(void)
15161516
case SETUP_DIFFICULTY: difficulty_draw(draw_stuff); break;
15171517
case SETUP_JOURNEY: journey_draw(draw_stuff); break;
15181518
case SETUP_CONTINUE: journey_continue_func(draw_stuff); break;
1519-
case SETUP_ANIM: break; // FIXME: What should this do?
15201519
case SETUP_CREDITS: journey_credits_func(draw_stuff); break;
15211520
}
15221521
}
@@ -1585,13 +1584,12 @@ void setup_start(void)
15851584
if (!save_game_exists && start_first_time)
15861585
{
15871586
play_intro_anim = TRUE;
1588-
setup_mode = SETUP_ANIM;
15891587
}
15901588
else
15911589
{
15921590
play_intro_anim = FALSE;
1593-
setup_mode = SETUP_JOURNEY;
15941591
}
1592+
setup_mode = SETUP_JOURNEY;
15951593
}
15961594

15971595
if (!start_first_time) closedown_game(TRUE);

0 commit comments

Comments
 (0)