Esempio n. 1
0
// Save the choosen values in the corresponding parameter file.
static void saveSoundOption(void *)
{
	const int BUFSIZE = 1024;
	char buf[BUFSIZE];

	snprintf(buf, BUFSIZE, "%s%s", GetLocalDir(), GR_SOUND_PARM_CFG);
	void *paramHandle = GfParmReadFile(buf, GFPARM_RMODE_REREAD | GFPARM_RMODE_CREAT);
	GfParmSetStr(paramHandle, GR_SCT_SOUND, GR_ATT_SOUND_STATE, soundOptionList[curOption]);
	GfParmSetNum(paramHandle, GR_SCT_SOUND, GR_ATT_SOUND_VOLUME, "%", VolumeValue);
	GfParmWriteFile(NULL, paramHandle, "sound");
	GfParmReleaseHandle(paramHandle);

	// Write Menu music optons
	snprintf(buf, BUFSIZE, "%s%s", GetLocalDir(), MM_SOUND_PARM_CFG);
	paramHandle = GfParmReadFile(buf, GFPARM_RMODE_REREAD | GFPARM_RMODE_CREAT);
	GfParmSetStr(paramHandle, MM_SCT_SOUND, MM_ATT_SOUND_ENABLE, menuMusicList[curOptionMenuMusic]);
	GfParmWriteFile(NULL, paramHandle, "sound");
	GfParmReleaseHandle(paramHandle);
	
	if (curOptionMenuMusic == 1) {
		startMenuMusic();
	} else {
		stopMenuMusic();
	}
	
	// Return to previous screen.
	GfuiScreenActivate(prevHandle);
	return;
}
Esempio n. 2
0
/*
 * Function
 *	TorcsEntry
 *
 * Description
 *	entry point of TORCS
 *
 * Parameters
 *	none
 *
 * Return
 *	none
 *
 * Remarks
 *	
 */
void
TorcsEntry(void)
{
	ssgInit();

	GfInitClient();

	TorcsMainMenuInit();

	SplashScreen();
	
	startMenuMusic();
}
Esempio n. 3
0
static void
AbortRaceHookActivate(void * /* dummy */)
{
	GfuiScreenActivate(ReInfo->_reGameScreen);

	ReInfo->_reSimItf.shutdown();
	if (ReInfo->_displayMode == RM_DISP_MODE_NORMAL) {
		ReInfo->_reGraphicItf.shutdowncars();
		startMenuMusic();
	}
	ReInfo->_reGraphicItf.shutdowntrack();
	ReRaceCleanDrivers();
	taManager->RaceEnd();

	FREEZ(ReInfo->_reCarInfo);
	/* Return to race menu */
	ReInfo->_reState = RE_STATE_CONFIG;
}