Пример #1
0
static void __CheatStart() {
	__CheatStop();

	gameTitle = g_paramSFO.GetValueString("DISC_ID");

	activeCheatFile = GetSysDirectory(DIRECTORY_CHEATS) + gameTitle + ".ini";
	File::CreateFullPath(GetSysDirectory(DIRECTORY_CHEATS));

	if (!File::Exists(activeCheatFile)) {
		FILE *f = File::OpenCFile(activeCheatFile, "wb");
		if (f) {
			fwrite("\xEF\xBB\xBF", 1, 3, f);
			fclose(f);
		}
		if (!File::Exists(activeCheatFile)) {
			I18NCategory *err = GetI18NCategory("Error");
			osm.Show(err->T("Unable to create cheat file, disk may be full"));
		}

	}

	cheatEngine = new CWCheatEngine();
	cheatEngine->CreateCodeList();
	g_Config.bReloadCheats = false;
	cheatsEnabled = true;
}
Пример #2
0
static void __CheatStart() {
	__CheatStop();

	gameTitle = g_paramSFO.GetValueString("DISC_ID");

	if (gameTitle != "") { //this only generates ini files on boot, let's leave homebrew ini file for UI
		cheatEngine->CreateCheatFile();
	}

	cheatEngine = new CWCheatEngine();
	cheatEngine->ParseCheats();
	g_Config.bReloadCheats = false;
	cheatsEnabled = true;
}
Пример #3
0
static void __CheatStart() {
	__CheatStop();

	gameTitle = g_paramSFO.GetValueString("DISC_ID");

	activeCheatFile = GetSysDirectory(DIRECTORY_CHEATS) + gameTitle + ".ini";
	File::CreateFullPath(GetSysDirectory(DIRECTORY_CHEATS));

	if (!File::Exists(activeCheatFile)) {
		File::CreateEmptyFile(activeCheatFile);
	}

	cheatEngine = new CWCheatEngine();
	cheatEngine->CreateCodeList();
	g_Config.bReloadCheats = false;
	cheatsEnabled = true;
}
Пример #4
0
void hleCheat(u64 userdata, int cyclesLate) {
	if (cheatsEnabled != g_Config.bEnableCheats) {
		// Okay, let's move to the desired state, then.
		if (g_Config.bEnableCheats) {
			__CheatStart();
		} else {
			__CheatStop();
		}
	}

	// Only check once a second for cheats to be enabled.
	CoreTiming::ScheduleEvent(msToCycles(cheatsEnabled ? 77 : 1000), CheatEvent, 0);

	if (!cheatEngine || !cheatsEnabled)
		return;
	
	if (g_Config.bReloadCheats) { //Checks if the "reload cheats" button has been pressed.
		cheatEngine->CreateCodeList();
		g_Config.bReloadCheats = false;
	}
	cheatEngine->Run();
}
Пример #5
0
void __CheatShutdown() {
	__CheatStop();
}