/** * @brief Stop game time speed */ void CP_GameTimeStop (void) { /* don't allow time scale in tactical mode - only on the geoscape */ if (!cp_missiontest->integer && CP_OnGeoscape()) ccs.gameLapse = 0; /* Make sure the new lapse state is updated and it (and the time) is show in the menu. */ CP_UpdateTime(); }
/** * @brief Increase game time speed */ void CP_GameTimeFast (void) { /* don't allow time scale in tactical mode - only on the geoscape */ if (CP_AllowTimeScale()) { if (ccs.gameLapse < NUM_TIMELAPSE) ccs.gameLapse++; /* Make sure the new lapse state is updated and it (and the time) is show in the menu. */ CP_UpdateTime(); } }
/** * @brief Perform actions after loading a game for single player campaign * @sa SAV_GameLoad */ static bool SAV_GameActionsAfterLoad (void) { bool result = true; result = result && AIR_PostLoadInit(); result = result && B_PostLoadInit(); result = result && PR_PostLoadInit(); /* Make sure the date&time is displayed when loading. */ CP_UpdateTime(); /* Update number of UFO detected by radar */ RADAR_SetRadarAfterLoading(); return result; }
/** * @brief Set game time speed * @param[in] gameLapseValue The value to set the game time to. */ static void CP_SetGameTime (int gameLapseValue) { if (gameLapseValue == ccs.gameLapse) return; /* check the stats value - already build bases might have been destroyed * so the B_GetCount() values is pointless here */ if (!ccs.campaignStats.basesBuilt) return; if (gameLapseValue < 0 || gameLapseValue >= NUM_TIMELAPSE) return; ccs.gameLapse = gameLapseValue; /* Make sure the new lapse state is updated and it (and the time) is show in the menu. */ CP_UpdateTime(); }
/** * @brief Perform actions after loading a game for single player campaign * @sa SAV_GameLoad */ static bool SAV_GameActionsAfterLoad (void) { bool result = true; result = result && AIR_PostLoadInit(); result = result && B_PostLoadInit(); result = result && PR_PostLoadInit(); /* Make sure the date&time is displayed when loading. */ CP_UpdateTime(); /* Update number of UFO detected by radar */ RADAR_SetRadarAfterLoading(); /* Update the XVI button -- needs to be done after research was loaded */ CP_UpdateXVIMapButton(); return result; }