Esempio n. 1
0
/**
 * Load a scenario in a safe way, and prepare the game.
 * @param houseID The House which is going to play the game.
 * @param scenarioID The Scenario to load.
 */
void Game_LoadScenario(uint8 houseID, uint16 scenarioID)
{
	Audio_PlayVoice(VOICE_STOP);
	Game_Init();
	g_validateStrictIfZero++;

	g_scenarioID = scenarioID;
	if (!Scenario_Load(scenarioID, houseID))
	{
		GUI_DisplayModalMessage("No more scenarios!", 0xFFFF);

		PrepareEnd();
		exit(0);
	}

	Game_Prepare();

	if (scenarioID < 5)
	{
		g_hintsShown1 = 0;
		g_hintsShown2 = 0;
	}

	g_validateStrictIfZero--;
}
Esempio n. 2
0
/**
* Load a scenario in a safe way, and prepare the game.
* @param houseID The House which is going to play the game.
* @param scenarioID The Scenario to load.
*/
bool Game_LoadScenario(const char* scenario)
{
	Audio_PlayVoice(VOICE_STOP);
	Game_Init();
	g_validateStrictIfZero++;

	g_scenarioID = 0xFFFF;
	if (!Scenario_Load(scenario, SEARCHDIR_SCENARIO_DIR))
		return false;

	Game_Prepare();

	g_hintsShown1 = 0;
	g_hintsShown2 = 0;
	g_validateStrictIfZero--;
	return true;
}
Esempio n. 3
0
/**
 * Load a scenario in a safe way, and prepare the game.
 * @param houseID The House which is going to play the game.
 * @param scenarioID The Scenario to load.
 */
void Game_LoadScenario(uint8 houseID, uint16 scenarioID)
{
	Sound_Output_Feedback(0xFFFE);

	Game_Init();

	g_validateStrictIfZero++;

	if (!Scenario_Load(scenarioID, houseID)) {
		GUI_DisplayModalMessage("No more scenarios!", 0xFFFF);

		PrepareEnd();
		exit(0);
	}

	Game_Prepare();

	if (scenarioID < 5) {
		g_hintsShown1 = 0;
		g_hintsShown2 = 0;
	}

	g_validateStrictIfZero--;
}