mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 08:25:18 +01:00
17d6488545
-Save/Load Method set to Auto - will automatically determine method (NOT YET IMPLEMENTED - defaults to SD for the moment) -All ROM, SRAM, Freeze, and preferences are saved/loaded according to these preferences -new cheats menu! Loads .CHT file from /cheats folder, must match file name of ROM -combined SRAM / Freeze Managers into new "Game Option" menu -SRAM / Freeze - game (re)loaded automatically after loading a SRAM or Freeze from Game Options -SRAM load/save defaults to ON -Game Options, Return to Game, Reload Game do not show up until a game has been loaded -added ROM Information page to Game Option menu -licence/credits moved to Credits page -menu code tweaks -USB support -added future support for Wii DVD / Network loading -MultiTap & SuperScope moved to controller configuration -combined/rewrote SRAM/preferences/freeze code - this is now much cleaner and less repetitve - a few steps closer to being workable -a lot of function parameters have been changed and standardized -if preferences can't be loaded at the start and/or are reset, preferences menu pops up -if Home button is pressed when a game is running, Game Menu pops up -a bunch of misc. bug fixes -probably some more things
49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
/****************************************************************************
|
|
* Snes9x 1.51
|
|
*
|
|
* Nintendo Wii/Gamecube Port
|
|
* Tantric August 2008
|
|
*
|
|
* cheatmgr.cpp
|
|
*
|
|
* Cheat handling
|
|
****************************************************************************/
|
|
|
|
#include "snes9xGx.h"
|
|
#include "memmap.h"
|
|
#include "sdload.h"
|
|
#include "cheats.h"
|
|
|
|
extern SCheatData Cheat;
|
|
|
|
/****************************************************************************
|
|
* SetupCheats
|
|
*
|
|
* Erases any prexisting cheats, loads cheats from a cheat file
|
|
* Called when a ROM is first loaded
|
|
****************************************************************************/
|
|
void
|
|
SetupCheats()
|
|
{
|
|
S9xInitCheatData ();
|
|
S9xDeleteCheats ();
|
|
|
|
char cheatFile[150] = { '\0' };
|
|
|
|
if(GCSettings.SaveMethod == METHOD_SD)
|
|
sprintf (cheatFile, "%s/snes9x/cheats/%s.cht", ROOTSDDIR, Memory.ROMFilename);
|
|
else if(GCSettings.SaveMethod == METHOD_USB)
|
|
sprintf (cheatFile, "%s/snes9x/cheats/%s.cht", ROOTUSBDIR, Memory.ROMFilename);
|
|
|
|
// load cheat file if present
|
|
if(strlen(cheatFile) > 0)
|
|
{
|
|
if(S9xLoadCheatFile (cheatFile))
|
|
{
|
|
// disable all cheats loaded from the file
|
|
for (uint16 i = 0; i < Cheat.num_cheats; i++)
|
|
S9xDisableCheat(i);
|
|
}
|
|
}
|
|
}
|