2010-09-24 23:22:01 +02:00
|
|
|
#ifndef _GAME_SETTINGS_H_
|
|
|
|
#define _GAME_SETTINGS_H_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <gctypes.h>
|
|
|
|
#include <vector>
|
|
|
|
#include "usbloader/disc.h"
|
|
|
|
|
|
|
|
typedef struct _GameCFG
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
char id[7];
|
|
|
|
short video;
|
* Improved GameCube controller functions (patch by Dynamit)
R+Z=Screenshot, X=Gameinfo window, Y=Covers download
* Added Classic Controller and GameCube Controller support
in GameInfo window:
Right stick=3D Cover movement, X=Flip 3DCover 180°, L/R=Zoom
* Added Wifi6 and wifi10 pictures for GameInfo window.
(Thanks OriginalHamster)
* Added device priority selection for GameCube listing
in global Loader settings (SD->USB, or USB->SD)
* Added a "Use global" language setting for Gamecube games.
* Added support for USB devices with modified MBR's signature
to prevent WiiU's format message.
* Prevent Rockband cursor display on GameCube and WiiWare
games with "band" in the title (Crach bandicoot, Beach
Bandits, etc.)
* Added Dol's Video mode patcher in Loader/Game settings,
for games which couldn't be forced. (MadWorld, MotoGP08,
Mario Party 8, etc.)
♦ Region patch = Patches the dol's known video modes
to the region selected in "Video mode" setting,
but keep interlace/progressive references.
♦ ON = Patch all dol's known video modes to the one
selected in "Video mode" setting.
♦ ALL = Patch all dol's found video mode patterns
(even unknown video modes) to the one selected
in "Video mode" setting.
* DML: Updated DM(L) version detection up to v2.10
* DML: Automatically enable PADHook if Screenshot setting
is enabled
* DML: Fixed a bug where multiple video modes could be set
at the same time
* DEVO: Added a prompt if trying to launch a game from a
non FAT32 partition.
* DEVO: Added Direct Mapping Buttons setting (Devo r200+)
* DEVO: Added support for Language setting
* Language files updated: Chinese, French
2013-08-18 16:30:39 +02:00
|
|
|
short videoPatchDol;
|
2011-12-23 16:48:20 +01:00
|
|
|
short aspectratio;
|
2011-07-26 00:28:22 +02:00
|
|
|
short language;
|
|
|
|
short ocarina;
|
|
|
|
short vipatch;
|
|
|
|
short ios;
|
|
|
|
short parentalcontrol;
|
|
|
|
short errorfix002;
|
|
|
|
short iosreloadblock;
|
|
|
|
short loadalternatedol;
|
|
|
|
u32 alternatedolstart;
|
|
|
|
short patchcountrystrings;
|
2011-12-20 22:41:00 +01:00
|
|
|
std::string alternatedolname;
|
2011-07-26 00:28:22 +02:00
|
|
|
short returnTo;
|
|
|
|
short sneekVideoPatch;
|
2011-09-03 11:39:26 +02:00
|
|
|
short NandEmuMode;
|
2011-12-20 22:41:00 +01:00
|
|
|
std::string NandEmuPath;
|
2011-09-03 11:39:26 +02:00
|
|
|
short Hooktype;
|
|
|
|
short WiirdDebugger;
|
2012-07-16 18:07:24 +02:00
|
|
|
short GameCubeMode;
|
2012-07-22 22:30:59 +02:00
|
|
|
short DMLVideo;
|
2012-07-16 18:07:24 +02:00
|
|
|
short DMLProgPatch;
|
2012-05-06 12:59:58 +02:00
|
|
|
short DMLNMM;
|
|
|
|
short DMLActivityLED;
|
|
|
|
short DMLPADHOOK;
|
2012-07-22 19:08:54 +02:00
|
|
|
short DMLNoDisc2;
|
2012-07-19 22:13:39 +02:00
|
|
|
short DMLWidescreen;
|
2012-11-11 14:47:02 +01:00
|
|
|
short DMLScreenshot;
|
2012-08-24 18:55:49 +02:00
|
|
|
short DMLJPNPatch;
|
2012-05-06 12:59:58 +02:00
|
|
|
short DMLDebug;
|
2013-10-01 23:13:08 +02:00
|
|
|
short NINMCEmulation;
|
|
|
|
short NINUSBHID;
|
2012-07-16 18:07:24 +02:00
|
|
|
short DEVOMCEmulation;
|
2012-10-14 18:27:01 +02:00
|
|
|
short DEVOWidescreen;
|
|
|
|
short DEVOActivityLED;
|
2013-04-14 23:02:09 +02:00
|
|
|
short DEVOFZeroAX;
|
|
|
|
short DEVOTimerFix;
|
* Improved GameCube controller functions (patch by Dynamit)
R+Z=Screenshot, X=Gameinfo window, Y=Covers download
* Added Classic Controller and GameCube Controller support
in GameInfo window:
Right stick=3D Cover movement, X=Flip 3DCover 180°, L/R=Zoom
* Added Wifi6 and wifi10 pictures for GameInfo window.
(Thanks OriginalHamster)
* Added device priority selection for GameCube listing
in global Loader settings (SD->USB, or USB->SD)
* Added a "Use global" language setting for Gamecube games.
* Added support for USB devices with modified MBR's signature
to prevent WiiU's format message.
* Prevent Rockband cursor display on GameCube and WiiWare
games with "band" in the title (Crach bandicoot, Beach
Bandits, etc.)
* Added Dol's Video mode patcher in Loader/Game settings,
for games which couldn't be forced. (MadWorld, MotoGP08,
Mario Party 8, etc.)
♦ Region patch = Patches the dol's known video modes
to the region selected in "Video mode" setting,
but keep interlace/progressive references.
♦ ON = Patch all dol's known video modes to the one
selected in "Video mode" setting.
♦ ALL = Patch all dol's found video mode patterns
(even unknown video modes) to the one selected
in "Video mode" setting.
* DML: Updated DM(L) version detection up to v2.10
* DML: Automatically enable PADHook if Screenshot setting
is enabled
* DML: Fixed a bug where multiple video modes could be set
at the same time
* DEVO: Added a prompt if trying to launch a game from a
non FAT32 partition.
* DEVO: Added Direct Mapping Buttons setting (Devo r200+)
* DEVO: Added support for Language setting
* Language files updated: Chinese, French
2013-08-18 16:30:39 +02:00
|
|
|
short DEVODButtons;
|
2011-07-26 00:28:22 +02:00
|
|
|
short Locked;
|
2011-12-20 22:41:00 +01:00
|
|
|
|
|
|
|
void operator=(const struct _GameCFG &game)
|
|
|
|
{
|
|
|
|
memcpy(this->id, game.id, sizeof(game.id));
|
|
|
|
this->video = game.video;
|
* Improved GameCube controller functions (patch by Dynamit)
R+Z=Screenshot, X=Gameinfo window, Y=Covers download
* Added Classic Controller and GameCube Controller support
in GameInfo window:
Right stick=3D Cover movement, X=Flip 3DCover 180°, L/R=Zoom
* Added Wifi6 and wifi10 pictures for GameInfo window.
(Thanks OriginalHamster)
* Added device priority selection for GameCube listing
in global Loader settings (SD->USB, or USB->SD)
* Added a "Use global" language setting for Gamecube games.
* Added support for USB devices with modified MBR's signature
to prevent WiiU's format message.
* Prevent Rockband cursor display on GameCube and WiiWare
games with "band" in the title (Crach bandicoot, Beach
Bandits, etc.)
* Added Dol's Video mode patcher in Loader/Game settings,
for games which couldn't be forced. (MadWorld, MotoGP08,
Mario Party 8, etc.)
♦ Region patch = Patches the dol's known video modes
to the region selected in "Video mode" setting,
but keep interlace/progressive references.
♦ ON = Patch all dol's known video modes to the one
selected in "Video mode" setting.
♦ ALL = Patch all dol's found video mode patterns
(even unknown video modes) to the one selected
in "Video mode" setting.
* DML: Updated DM(L) version detection up to v2.10
* DML: Automatically enable PADHook if Screenshot setting
is enabled
* DML: Fixed a bug where multiple video modes could be set
at the same time
* DEVO: Added a prompt if trying to launch a game from a
non FAT32 partition.
* DEVO: Added Direct Mapping Buttons setting (Devo r200+)
* DEVO: Added support for Language setting
* Language files updated: Chinese, French
2013-08-18 16:30:39 +02:00
|
|
|
this->videoPatchDol = game.videoPatchDol;
|
2011-12-23 16:48:20 +01:00
|
|
|
this->aspectratio = game.aspectratio;
|
2011-12-20 22:41:00 +01:00
|
|
|
this->language = game.language;
|
|
|
|
this->ocarina = game.ocarina;
|
|
|
|
this->vipatch = game.vipatch;
|
|
|
|
this->ios = game.ios;
|
|
|
|
this->parentalcontrol = game.parentalcontrol;
|
|
|
|
this->errorfix002 = game.errorfix002;
|
|
|
|
this->iosreloadblock = game.iosreloadblock;
|
|
|
|
this->loadalternatedol = game.loadalternatedol;
|
|
|
|
this->alternatedolstart = game.alternatedolstart;
|
|
|
|
this->patchcountrystrings = game.patchcountrystrings;
|
|
|
|
this->alternatedolname = game.alternatedolname;
|
|
|
|
this->returnTo = game.returnTo;
|
|
|
|
this->sneekVideoPatch = game.sneekVideoPatch;
|
|
|
|
this->NandEmuMode = game.NandEmuMode;
|
|
|
|
this->NandEmuPath = game.NandEmuPath;
|
|
|
|
this->Hooktype = game.Hooktype;
|
|
|
|
this->WiirdDebugger = game.WiirdDebugger;
|
2012-07-16 18:07:24 +02:00
|
|
|
this->GameCubeMode = game.GameCubeMode;
|
2012-07-22 22:30:59 +02:00
|
|
|
this->DMLVideo = game.DMLVideo;
|
2012-07-16 18:07:24 +02:00
|
|
|
this->DMLProgPatch = game.DMLProgPatch;
|
2012-05-06 12:59:58 +02:00
|
|
|
this->DMLNMM = game.DMLNMM;
|
|
|
|
this->DMLActivityLED = game.DMLActivityLED;
|
|
|
|
this->DMLPADHOOK = game.DMLPADHOOK;
|
2012-07-22 19:08:54 +02:00
|
|
|
this->DMLNoDisc2 = game.DMLNoDisc2;
|
2012-07-19 22:13:39 +02:00
|
|
|
this->DMLWidescreen = game.DMLWidescreen;
|
2012-11-11 14:47:02 +01:00
|
|
|
this->DMLScreenshot = game.DMLScreenshot;
|
2012-08-24 18:55:49 +02:00
|
|
|
this->DMLJPNPatch = game.DMLJPNPatch;
|
2012-05-06 12:59:58 +02:00
|
|
|
this->DMLDebug = game.DMLDebug;
|
2013-10-01 23:13:08 +02:00
|
|
|
this->NINMCEmulation = game.NINMCEmulation;
|
|
|
|
this->NINUSBHID = game.NINUSBHID;
|
2012-07-16 18:07:24 +02:00
|
|
|
this->DEVOMCEmulation = game.DEVOMCEmulation;
|
2012-10-14 18:27:01 +02:00
|
|
|
this->DEVOWidescreen = game.DEVOWidescreen;
|
|
|
|
this->DEVOActivityLED = game.DEVOActivityLED;
|
2013-04-14 23:02:09 +02:00
|
|
|
this->DEVOFZeroAX = game.DEVOFZeroAX;
|
|
|
|
this->DEVOTimerFix = game.DEVOTimerFix;
|
* Improved GameCube controller functions (patch by Dynamit)
R+Z=Screenshot, X=Gameinfo window, Y=Covers download
* Added Classic Controller and GameCube Controller support
in GameInfo window:
Right stick=3D Cover movement, X=Flip 3DCover 180°, L/R=Zoom
* Added Wifi6 and wifi10 pictures for GameInfo window.
(Thanks OriginalHamster)
* Added device priority selection for GameCube listing
in global Loader settings (SD->USB, or USB->SD)
* Added a "Use global" language setting for Gamecube games.
* Added support for USB devices with modified MBR's signature
to prevent WiiU's format message.
* Prevent Rockband cursor display on GameCube and WiiWare
games with "band" in the title (Crach bandicoot, Beach
Bandits, etc.)
* Added Dol's Video mode patcher in Loader/Game settings,
for games which couldn't be forced. (MadWorld, MotoGP08,
Mario Party 8, etc.)
♦ Region patch = Patches the dol's known video modes
to the region selected in "Video mode" setting,
but keep interlace/progressive references.
♦ ON = Patch all dol's known video modes to the one
selected in "Video mode" setting.
♦ ALL = Patch all dol's found video mode patterns
(even unknown video modes) to the one selected
in "Video mode" setting.
* DML: Updated DM(L) version detection up to v2.10
* DML: Automatically enable PADHook if Screenshot setting
is enabled
* DML: Fixed a bug where multiple video modes could be set
at the same time
* DEVO: Added a prompt if trying to launch a game from a
non FAT32 partition.
* DEVO: Added Direct Mapping Buttons setting (Devo r200+)
* DEVO: Added support for Language setting
* Language files updated: Chinese, French
2013-08-18 16:30:39 +02:00
|
|
|
this->DEVODButtons = game.DEVODButtons;
|
2011-12-20 22:41:00 +01:00
|
|
|
this->Locked = game.Locked;
|
|
|
|
}
|
2010-09-24 23:22:01 +02:00
|
|
|
} GameCFG;
|
|
|
|
|
|
|
|
class CGameSettings
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
public:
|
|
|
|
//!Constructor
|
|
|
|
CGameSettings();
|
|
|
|
//!Destructor
|
|
|
|
~CGameSettings();
|
|
|
|
//!Load
|
|
|
|
bool Load(const char * path);
|
|
|
|
//!Save
|
|
|
|
bool Save();
|
|
|
|
//!AddGame
|
|
|
|
bool AddGame(const GameCFG & NewGame);
|
|
|
|
//!Reset
|
|
|
|
bool RemoveAll();
|
|
|
|
//!Overload Reset for one Game
|
|
|
|
bool Remove(const char * id);
|
2012-05-06 12:59:58 +02:00
|
|
|
bool Remove(const u8 * id) { return Remove((const char *) id); }
|
|
|
|
bool Remove(const struct discHdr * game) { if(!game) return false; else return Remove(game->id); }
|
2011-07-26 00:28:22 +02:00
|
|
|
//!Get GameCFG
|
|
|
|
GameCFG * GetGameCFG(const char * id);
|
|
|
|
//!Overload
|
2012-05-06 12:59:58 +02:00
|
|
|
GameCFG * GetGameCFG(const u8 * id) { return GetGameCFG((const char *) id); }
|
2011-07-26 00:28:22 +02:00
|
|
|
//!Overload
|
2012-05-06 12:59:58 +02:00
|
|
|
GameCFG * GetGameCFG(const struct discHdr * game) { if(!game) return NULL; else return GetGameCFG(game->id); }
|
2011-07-26 00:28:22 +02:00
|
|
|
//!Quick settings to PEGI conversion
|
|
|
|
static int GetPartenalPEGI(int parentalsetting);
|
2011-12-20 22:41:00 +01:00
|
|
|
//!Set the default configuration block
|
|
|
|
void SetDefault(GameCFG &game);
|
2011-07-26 00:28:22 +02:00
|
|
|
protected:
|
|
|
|
bool ReadGameID(const char * src, char * GameID, int size);
|
2011-12-20 22:41:00 +01:00
|
|
|
bool SetSetting(GameCFG & game, const char *name, const char *value);
|
2011-07-26 00:28:22 +02:00
|
|
|
bool ValidVersion(FILE * file);
|
|
|
|
//!Find the config file in the default paths
|
|
|
|
bool FindConfig();
|
2010-09-24 23:22:01 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
void ParseLine(char *line);
|
2011-12-20 22:41:00 +01:00
|
|
|
void TrimLine(std::string &dest, const char *src, char stopChar);
|
2011-07-26 00:28:22 +02:00
|
|
|
std::string ConfigPath;
|
|
|
|
std::vector<GameCFG> GameList;
|
|
|
|
GameCFG DefaultConfig;
|
2010-09-24 23:22:01 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern CGameSettings GameSettings;
|
|
|
|
|
|
|
|
#endif
|