Add enum for splatpack xmas: they have a different demo screen (splatpack demo has smk, xmas demo has a flic)
This commit is contained in:
parent
4246f66384
commit
71c3c10603
|
|
@ -234,7 +234,11 @@ void DoFullVersionPowerpoint() {
|
|||
|
||||
FadePaletteDown();
|
||||
DRSetPalette(gRender_palette);
|
||||
ShowCutScene(9, 0, 8503, gCut_delay_4);
|
||||
if (harness_game_info.mode == eGame_splatpack_demo) {
|
||||
PlaySmackerFile("DEMOEND.SMK");
|
||||
} else {
|
||||
ShowCutScene(9, 0, 8503, gCut_delay_4);
|
||||
}
|
||||
FadePaletteDown();
|
||||
|
||||
gLast_demo_end_anim = PDGetTotalTime();
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ void InitGame(int pStart_race) {
|
|||
gNo_races_yet = 1;
|
||||
NetPlayerStatusChanged(ePlayer_status_loading);
|
||||
gProgram_state.current_race_index = pStart_race;
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
gProgram_state.current_car.power_up_levels[0] = gDemo_armour;
|
||||
gProgram_state.current_car.power_up_levels[1] = gDemo_power;
|
||||
gProgram_state.current_car.power_up_levels[2] = gDemo_offensive;
|
||||
|
|
|
|||
|
|
@ -2430,11 +2430,11 @@ void LoadRaces(tRace_list_spec* pRace_list, int* pCount, int pRace_type_index) {
|
|||
*pCount = number_of_racers;
|
||||
fclose(f);
|
||||
j = 0;
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
j = 99;
|
||||
}
|
||||
for (i = 0; i < number_of_racers; i++) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
pRace_list[i].suggested_rank = gDemo_rank;
|
||||
pRace_list[i].rank_required = j;
|
||||
j -= 3;
|
||||
|
|
|
|||
|
|
@ -446,7 +446,7 @@ int DoLoadGame() {
|
|||
int result;
|
||||
LOG_TRACE("()");
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
DoFeatureUnavailableInDemo();
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -933,7 +933,7 @@ int SaveGameInterface(int pDefault_choice) {
|
|||
void DoSaveGame(int pSave_allowed) {
|
||||
LOG_TRACE("()");
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
DoFeatureUnavailableInDemo();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
void QuitGame() {
|
||||
LOG_TRACE("()");
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
DoDemoGoodbye();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ void CheckTimer() {
|
|||
RaceCompleted(eRace_over_out_of_time);
|
||||
}
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
if (harness_game_config.demo_timeout != 0) {
|
||||
time_left = harness_game_config.demo_timeout - GetRaceTime();
|
||||
time_in_seconds = (time_left + 500) / 1000;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ char* gPixels_copy__mainmenu; // suffix added to avoid duplicate symbol
|
|||
int MainMenuDone1(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out) {
|
||||
LOG_TRACE("(%d, %d, %d, %d, %d)", pCurrent_choice, pCurrent_mode, pGo_ahead, pEscaped, pTimed_out);
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
if (pCurrent_mode == 0) {
|
||||
if (pCurrent_choice == 7) {
|
||||
PreloadBunchOfFlics(7);
|
||||
|
|
@ -74,7 +74,7 @@ int MainMenuDone1(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEs
|
|||
int MainMenuDone2(int pCurrent_choice, int pCurrent_mode, int pGo_ahead, int pEscaped, int pTimed_out) {
|
||||
LOG_TRACE("(%d, %d, %d, %d, %d)", pCurrent_choice, pCurrent_mode, pGo_ahead, pEscaped, pTimed_out);
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
if (pCurrent_mode == 0) {
|
||||
if (pCurrent_choice == 4) {
|
||||
PreloadBunchOfFlics(7);
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ int DoOnePlayerStart() {
|
|||
memcpy(&gProgram_state, &saved_state, sizeof(tProgram_state));
|
||||
return 0;
|
||||
}
|
||||
if ((harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) && gProgram_state.frank_or_anniness != eFrankie) {
|
||||
if ((harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) && gProgram_state.frank_or_anniness != eFrankie) {
|
||||
DoFeatureUnavailableInDemo();
|
||||
memset(&gProgram_state, 0, sizeof(gProgram_state));
|
||||
return 0;
|
||||
|
|
@ -851,7 +851,7 @@ int DoMultiPlayerStart() {
|
|||
int car_index;
|
||||
LOG_TRACE("()");
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
SuspendPendingFlic();
|
||||
DoFeatureUnavailableInDemo();
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1672,7 +1672,7 @@ tSO_result DoSelectRace(int* pSecond_time_around) {
|
|||
DisposeFlicPanel(0);
|
||||
|
||||
if (result == 2) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
DoFeatureUnavailableInDemo();
|
||||
} else {
|
||||
RunFlic(192);
|
||||
|
|
|
|||
|
|
@ -1214,7 +1214,7 @@ tSO_result DoEndRaceSummary(int* pFirst_summary_done, tRace_result pRace_result)
|
|||
tSO_result result;
|
||||
LOG_TRACE("(%p, %d)", pFirst_summary_done, pRace_result);
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
gRank_etc_munged = 1;
|
||||
DoEndRaceSummary2();
|
||||
return eSO_continue;
|
||||
|
|
|
|||
|
|
@ -359,7 +359,7 @@ void SelectOpponents(tRace_info* pRace_info) {
|
|||
int had_scum;
|
||||
LOG_TRACE("(%p)", pRace_info);
|
||||
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
pRace_info->number_of_racers = OPPONENT_COUNT;
|
||||
for (i = 0; i < OPPONENT_COUNT; i++) {
|
||||
pRace_info->opponent_list[i].index = gDemo_opponents[i];
|
||||
|
|
@ -573,7 +573,7 @@ void DoGame() {
|
|||
DisposeOpponentsCars(&gCurrent_race);
|
||||
}
|
||||
DisposeTrack();
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo) {
|
||||
if (harness_game_info.mode == eGame_carmageddon_demo || harness_game_info.mode == eGame_splatpack_demo || harness_game_info.mode == eGame_splatpack_xmas_demo) {
|
||||
DoFullVersionPowerpoint();
|
||||
}
|
||||
gProgram_state.loaded = 0;
|
||||
|
|
|
|||
|
|
@ -93,13 +93,13 @@ void Harness_DetectGameMode() {
|
|||
printf("Game mode: Splat Pack\n");
|
||||
} else if (access("DATA/RACES/TINSEL.TXT", F_OK) != -1) {
|
||||
// Only the the splat x-mas demo has the tinsel track
|
||||
harness_game_info.defines.INTRO_SMK_FILE = "";
|
||||
harness_game_info.defines.INTRO_SMK_FILE = "MIX_INTR.SMK";
|
||||
harness_game_info.defines.GERMAN_LOADSCRN = "";
|
||||
harness_game_info.mode = eGame_splatpack_demo;
|
||||
harness_game_info.mode = eGame_splatpack_xmas_demo;
|
||||
printf("Game mode: Splat Pack X-mas demo\n");
|
||||
} else {
|
||||
// Assume we're using the splatpack demo
|
||||
harness_game_info.defines.INTRO_SMK_FILE = "";
|
||||
harness_game_info.defines.INTRO_SMK_FILE = "MIX_INTR.SMK";
|
||||
harness_game_info.defines.GERMAN_LOADSCRN = "";
|
||||
harness_game_info.mode = eGame_splatpack_demo;
|
||||
printf("Game mode: Splat Pack demo\n");
|
||||
|
|
@ -165,6 +165,7 @@ void Harness_DetectGameMode() {
|
|||
harness_game_info.defines.ascii_shift_table = demo_ascii_shift_table;
|
||||
break;
|
||||
case eGame_splatpack_demo:
|
||||
case eGame_splatpack_xmas_demo:
|
||||
harness_game_info.defines.ascii_table = splatpack_xmasdemo_ascii_table;
|
||||
harness_game_info.defines.ascii_shift_table = splatpack_xmasdemo_ascii_shift_table;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ typedef enum tHarness_game_type {
|
|||
eGame_splatpack,
|
||||
eGame_carmageddon_demo,
|
||||
eGame_splatpack_demo,
|
||||
eGame_splatpack_xmas_demo,
|
||||
} tHarness_game_type;
|
||||
|
||||
typedef enum {
|
||||
|
|
|
|||
Loading…
Reference in New Issue