File tree Expand file tree Collapse file tree 3 files changed +16
-12
lines changed
Expand file tree Collapse file tree 3 files changed +16
-12
lines changed Original file line number Diff line number Diff 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
6768void setup_loop (void );
6869void journey_credits_done (void );
6970errtype journey_credits_func (uchar draw_stuff );
7071
7172// Globals
72- extern int setup_mode ;
73+ extern SetupMode setup_mode ;
7374
7475#endif // __SETPLOOP_H
Original file line number Diff line number Diff line change @@ -275,7 +275,12 @@ short play_cutscene(int id, bool show_credits)
275275 MacTuneKillCurrentTheme ();
276276
277277 cutscene_filehandle = ResOpenFile (cutscene_files [id ]);
278- if (cutscene_filehandle <= 0 ) return 0 ;
278+ if (cutscene_filehandle <= 0 ) {
279+ // If we failed to play the cutscene, go to setup / credits.
280+ _new_mode = SETUP_LOOP ;
281+ chg_set_flg (GL_CHG_LOOP );
282+ return 0 ;
283+ }
279284
280285 INFO ("Playing Cutscene %i" , id );
281286
Original file line number Diff line number Diff line change @@ -103,8 +103,8 @@ uiSlab setup_slab;
103103LGRegion setup_root_region ;
104104uchar play_intro_anim ;
105105uchar save_game_exists = FALSE;
106- int setup_mode ;
107- int last_setup_mode ;
106+ SetupMode setup_mode ;
107+ SetupMode last_setup_mode ;
108108int intro_num ;
109109int splash_num ;
110110int 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);
You can’t perform that action at this time.
0 commit comments