2010-09-24 02:48:03 +02:00
|
|
|
/****************************************************************************
|
2010-09-19 22:25:12 +02:00
|
|
|
* Copyright (C) 2010
|
|
|
|
* by Dimok
|
|
|
|
*
|
|
|
|
* This software is provided 'as-is', without any express or implied
|
|
|
|
* warranty. In no event will the authors be held liable for any
|
|
|
|
* damages arising from the use of this software.
|
|
|
|
*
|
|
|
|
* Permission is granted to anyone to use this software for any
|
|
|
|
* purpose, including commercial applications, and to alter it and
|
|
|
|
* redistribute it freely, subject to the following restrictions:
|
|
|
|
*
|
|
|
|
* 1. The origin of this software must not be misrepresented; you
|
|
|
|
* must not claim that you wrote the original software. If you use
|
|
|
|
* this software in a product, an acknowledgment in the product
|
|
|
|
* documentation would be appreciated but is not required.
|
|
|
|
*
|
|
|
|
* 2. Altered source versions must be plainly marked as such, and
|
|
|
|
* must not be misrepresented as being the original software.
|
|
|
|
*
|
|
|
|
* 3. This notice may not be removed or altered from any source
|
|
|
|
* distribution.
|
|
|
|
***************************************************************************/
|
|
|
|
#ifndef _CSETTINGS_H_
|
|
|
|
#define _CSETTINGS_H_
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <gctypes.h>
|
2011-06-03 22:31:09 +02:00
|
|
|
#include <vector>
|
2010-10-27 16:45:27 +02:00
|
|
|
#include "SettingsEnums.h"
|
2012-05-06 12:59:58 +02:00
|
|
|
#include "GameCube/DML_Config.h"
|
2012-07-16 18:07:24 +02:00
|
|
|
#include "GameCube/DEVO_Config.h"
|
2010-09-19 22:25:12 +02:00
|
|
|
|
|
|
|
class CSettings
|
|
|
|
{
|
2011-07-26 00:28:22 +02:00
|
|
|
public:
|
|
|
|
//!Constructor
|
|
|
|
CSettings();
|
|
|
|
//!Destructor
|
|
|
|
~CSettings();
|
|
|
|
//!Set Default Settings
|
|
|
|
void SetDefault();
|
|
|
|
//!Load Settings
|
|
|
|
bool Load();
|
|
|
|
//!Save Settings
|
|
|
|
bool Save();
|
|
|
|
//!Reset Settings
|
|
|
|
bool Reset();
|
|
|
|
//!Load a languagefile
|
|
|
|
//!\param language
|
|
|
|
bool LoadLanguage(const char *path, int language = -1);
|
2010-09-19 22:25:12 +02:00
|
|
|
|
2012-05-06 12:59:58 +02:00
|
|
|
//! System settings stuff
|
|
|
|
bool widescreen;
|
|
|
|
bool PAL50;
|
|
|
|
bool NTSC;
|
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
/** Variables **/
|
|
|
|
char BootDevice[10];
|
|
|
|
char unlockCode[20];
|
|
|
|
char db_language[20];
|
|
|
|
char returnTo[20];
|
|
|
|
char ConfigPath[80];
|
|
|
|
char covers_path[100];
|
|
|
|
char coversFull_path[100];
|
|
|
|
char covers2d_path[100];
|
|
|
|
char theme_path[100];
|
|
|
|
char theme[100];
|
|
|
|
char disc_path[100];
|
|
|
|
char titlestxt_path[100];
|
|
|
|
char language_path[100];
|
|
|
|
char languagefiles_path[100];
|
|
|
|
char ogg_path[150];
|
|
|
|
char Cheatcodespath[100];
|
|
|
|
char TxtCheatcodespath[100];
|
|
|
|
char BcaCodepath[100];
|
|
|
|
char WipCodepath[100];
|
|
|
|
char dolpath[100];
|
|
|
|
char update_path[100];
|
|
|
|
char homebrewapps_path[100];
|
|
|
|
char WDMpath[100];
|
|
|
|
char WiinnertagPath[100];
|
|
|
|
char NandEmuPath[50];
|
2011-11-12 19:14:09 +01:00
|
|
|
char NandEmuChanPath[50];
|
2012-05-06 12:59:58 +02:00
|
|
|
char BNRCachePath[50];
|
2012-02-09 22:18:16 +01:00
|
|
|
char GameCubePath[100];
|
2012-05-06 12:59:58 +02:00
|
|
|
char GameCubeSDPath[100];
|
2012-07-16 18:07:24 +02:00
|
|
|
char DEVOLoaderPath[100];
|
2012-08-05 19:07:47 +02:00
|
|
|
char CustomBannersURL[100];
|
2011-07-26 00:28:22 +02:00
|
|
|
short videomode;
|
|
|
|
short language;
|
|
|
|
short ocarina;
|
|
|
|
short videopatch;
|
|
|
|
short sinfo;
|
|
|
|
short hddinfo;
|
|
|
|
short rumble;
|
|
|
|
short xflip;
|
|
|
|
short volume;
|
|
|
|
short sfxvolume;
|
|
|
|
short gamesoundvolume;
|
|
|
|
short tooltips;
|
|
|
|
short parentalcontrol;
|
|
|
|
short cios;
|
|
|
|
short quickboot;
|
|
|
|
short wsprompt;
|
|
|
|
short keyset;
|
|
|
|
short GameSort;
|
|
|
|
short wiilight;
|
|
|
|
short gameDisplay;
|
|
|
|
short patchcountrystrings;
|
|
|
|
short screensaver;
|
|
|
|
short partition;
|
|
|
|
short musicloopmode;
|
|
|
|
short godmode;
|
|
|
|
short error002;
|
|
|
|
short titlesOverride; // db_titles
|
|
|
|
short gridRows;
|
|
|
|
short autonetwork;
|
|
|
|
short discart;
|
2012-08-05 19:07:47 +02:00
|
|
|
short coversfull;
|
2011-07-26 00:28:22 +02:00
|
|
|
short gamesound;
|
|
|
|
short marknewtitles;
|
|
|
|
short InstallToDir;
|
|
|
|
short GameSplit;
|
|
|
|
short PlaylogUpdate;
|
|
|
|
short ShowFreeSpace;
|
|
|
|
short HomeMenu;
|
|
|
|
short MultiplePartitions;
|
|
|
|
short USBPort;
|
|
|
|
short CacheTitles;
|
|
|
|
short BlockIOSReload;
|
|
|
|
u32 InstallPartitions;
|
|
|
|
u32 ParentalBlocks;
|
|
|
|
f32 WSFactor;
|
|
|
|
f32 FontScaleFactor;
|
2012-05-19 15:40:58 +02:00
|
|
|
f32 ClockFontScaleFactor;
|
2011-12-28 17:27:30 +01:00
|
|
|
f32 PointerSpeed;
|
2011-07-26 00:28:22 +02:00
|
|
|
short Wiinnertag;
|
|
|
|
short SelectedGame;
|
|
|
|
short GameListOffset;
|
|
|
|
short sneekVideoPatch;
|
|
|
|
std::vector<u32> EnabledCategories;
|
2012-06-09 14:20:14 +02:00
|
|
|
std::vector<u32> RequiredCategories;
|
|
|
|
std::vector<u32> ForbiddenCategories;
|
2011-07-26 00:28:22 +02:00
|
|
|
u8 EntryIOS;
|
|
|
|
short NandEmuMode;
|
2012-01-08 19:24:46 +01:00
|
|
|
short NandEmuChanMode;
|
2011-07-26 00:28:22 +02:00
|
|
|
short UseSystemFont;
|
2011-07-29 22:59:31 +02:00
|
|
|
short Hooktype;
|
|
|
|
short WiirdDebugger;
|
|
|
|
short WiirdDebuggerPause;
|
2011-09-04 12:13:47 +02:00
|
|
|
short ShowPlayCount;
|
2011-09-10 22:08:12 +02:00
|
|
|
short RememberUnlock;
|
2011-11-12 19:14:09 +01:00
|
|
|
short LoaderMode;
|
|
|
|
short SearchMode;
|
2011-12-23 16:48:20 +01:00
|
|
|
short GameAspectRatio;
|
2012-01-08 19:24:46 +01:00
|
|
|
short UseChanLauncher;
|
2012-02-05 19:38:26 +01:00
|
|
|
int AdjustOverscanX;
|
|
|
|
int AdjustOverscanY;
|
2012-02-29 20:52:36 +01:00
|
|
|
short ForceDiscTitles;
|
2012-05-06 12:59:58 +02:00
|
|
|
short TooltipDelay;
|
|
|
|
short GameWindowMode;
|
|
|
|
short CacheBNRFiles;
|
|
|
|
short BannerAnimStart;
|
|
|
|
float BannerGridSpeed;
|
|
|
|
short BannerZoomDuration;
|
|
|
|
float BannerProjectionOffsetX;
|
|
|
|
float BannerProjectionOffsetY;
|
|
|
|
float BannerProjectionWidth;
|
|
|
|
float BannerProjectionHeight;
|
|
|
|
float GCBannerScale;
|
2012-07-16 18:07:24 +02:00
|
|
|
short GameCubeMode;
|
2012-12-09 22:36:32 +01:00
|
|
|
short GameCubeSource;
|
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;
|
2012-07-16 18:07:24 +02:00
|
|
|
short DEVOMCEmulation;
|
2012-10-14 18:27:01 +02:00
|
|
|
short DEVOWidescreen;
|
|
|
|
short DEVOActivityLED;
|
2012-05-06 12:59:58 +02:00
|
|
|
short GCInstallCompressed;
|
|
|
|
short GCInstallAligned;
|
2011-12-22 23:44:48 +01:00
|
|
|
|
|
|
|
// This variable is not saved to the settings file
|
|
|
|
bool FirstTimeRun;
|
2011-07-26 00:28:22 +02:00
|
|
|
protected:
|
|
|
|
bool ValidVersion(FILE * file);
|
|
|
|
bool SetSetting(char *name, char *value);
|
|
|
|
//!Find the config file in the default paths
|
|
|
|
bool FindConfig();
|
2010-09-19 22:25:12 +02:00
|
|
|
|
2011-07-26 00:28:22 +02:00
|
|
|
void ParseLine(char *line);
|
|
|
|
void TrimLine(char *dest, char *src, int size);
|
2010-09-19 22:25:12 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern CSettings Settings;
|
|
|
|
|
|
|
|
#endif
|