2009-05-03 20:53:31 +02:00
|
|
|
#ifndef _CFG_H_
|
|
|
|
#define _CFG_H_
|
|
|
|
|
|
|
|
#include <gctypes.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2009-06-13 02:24:36 +02:00
|
|
|
#include "usbloader/disc.h"
|
|
|
|
|
2009-05-03 20:53:31 +02:00
|
|
|
#define CFG_HOME_REBOOT 0
|
|
|
|
#define CFG_HOME_EXIT 1
|
|
|
|
|
|
|
|
#define CFG_VIDEO_SYS 0 // system default
|
|
|
|
#define CFG_VIDEO_DEFAULT 1
|
|
|
|
#define CFG_VIDEO_GAME 1 // game default
|
|
|
|
#define CFG_VIDEO_PATCH 2 // patch mode
|
|
|
|
#define CFG_VIDEO_PAL50 3 // force PAL
|
|
|
|
#define CFG_VIDEO_PAL60 4 // force PAL60
|
|
|
|
#define CFG_VIDEO_NTSC 5 // force NTSC
|
|
|
|
#define CFG_VIDEO_COUNT 6
|
|
|
|
|
|
|
|
#define CFG_LANG_CONSOLE 0
|
|
|
|
#define CFG_LANG_JAPANESE 1
|
|
|
|
#define CFG_LANG_ENGLISH 2
|
|
|
|
#define CFG_LANG_GERMAN 3
|
|
|
|
#define CFG_LANG_FRENCH 4
|
|
|
|
#define CFG_LANG_SPANISH 5
|
|
|
|
#define CFG_LANG_ITALIAN 6
|
|
|
|
#define CFG_LANG_DUTCH 7
|
|
|
|
#define CFG_LANG_S_CHINESE 8
|
|
|
|
#define CFG_LANG_T_CHINESE 9
|
|
|
|
#define CFG_LANG_KOREAN 10
|
|
|
|
#define CFG_LANG_COUNT 11
|
|
|
|
|
|
|
|
#define CFG_ALIGN_LEFT 0
|
|
|
|
#define CFG_ALIGN_RIGHT 1
|
|
|
|
#define CFG_ALIGN_CENTRE 2
|
|
|
|
#define CFG_ALIGN_TOP 3
|
|
|
|
#define CFG_ALIGN_BOTTOM 4
|
|
|
|
#define CFG_ALIGN_MIDDLE 5
|
|
|
|
|
2009-06-10 01:26:03 +02:00
|
|
|
extern char bootDevice[10];
|
|
|
|
//extern char *cfg_path;
|
2009-05-03 20:53:31 +02:00
|
|
|
|
|
|
|
struct CFG
|
|
|
|
{
|
|
|
|
short widescreen;
|
|
|
|
char theme_path[100];
|
|
|
|
};
|
|
|
|
|
2009-05-15 06:07:34 +02:00
|
|
|
|
2009-05-03 20:53:31 +02:00
|
|
|
struct THEME
|
|
|
|
{
|
|
|
|
int selection_x;
|
|
|
|
int selection_y;
|
|
|
|
int selection_w;
|
|
|
|
int selection_h;
|
2009-06-01 05:49:50 +02:00
|
|
|
int gamegrid_x;
|
|
|
|
int gamegrid_y;
|
|
|
|
int gamegrid_w;
|
|
|
|
int gamegrid_h;
|
2009-06-20 12:10:40 +02:00
|
|
|
int tooltipAlpha;
|
2009-06-01 05:49:50 +02:00
|
|
|
int gamecarousel_x;
|
|
|
|
int gamecarousel_y;
|
|
|
|
int gamecarousel_w;
|
|
|
|
int gamecarousel_h;
|
2009-05-04 07:08:10 +02:00
|
|
|
short cover_x;
|
|
|
|
short cover_y;
|
2009-05-03 20:53:31 +02:00
|
|
|
short showID;
|
2009-05-23 00:36:55 +02:00
|
|
|
// short maxcharacters;
|
2009-05-15 06:07:34 +02:00
|
|
|
short batteryUnused;
|
2009-05-04 07:08:10 +02:00
|
|
|
short id_x;
|
|
|
|
short id_y;
|
|
|
|
short region_x;
|
|
|
|
short region_y;
|
|
|
|
short power_x;
|
|
|
|
short power_y;
|
|
|
|
short home_x;
|
|
|
|
short home_y;
|
|
|
|
short battery1_x;
|
|
|
|
short battery2_x;
|
|
|
|
short battery3_x;
|
|
|
|
short battery4_x;
|
|
|
|
short battery1_y;
|
|
|
|
short battery2_y;
|
|
|
|
short battery3_y;
|
|
|
|
short battery4_y;
|
2009-05-29 03:50:05 +02:00
|
|
|
short favorite_x;
|
|
|
|
short favorite_y;
|
|
|
|
short abc_x;
|
2009-06-14 05:42:46 +02:00
|
|
|
short abc_y;
|
|
|
|
short list_x;
|
2009-05-30 05:02:41 +02:00
|
|
|
short list_y;
|
2009-05-29 03:50:05 +02:00
|
|
|
short grid_x;
|
|
|
|
short grid_y;
|
|
|
|
short carousel_x;
|
|
|
|
short carousel_y;
|
|
|
|
short count_x;
|
|
|
|
short count_y;
|
|
|
|
short sortBarOffset;
|
2009-05-03 20:53:31 +02:00
|
|
|
// short showPower;
|
|
|
|
// short showHome;
|
2009-05-04 07:08:10 +02:00
|
|
|
short setting_x;
|
|
|
|
short setting_y;
|
|
|
|
short install_x;
|
|
|
|
short install_y;
|
2009-05-03 20:53:31 +02:00
|
|
|
short showHDD;
|
|
|
|
short hddInfoAlign;
|
2009-05-04 07:08:10 +02:00
|
|
|
short hddInfo_x;
|
|
|
|
short hddInfo_y;
|
2009-05-03 20:53:31 +02:00
|
|
|
short showGameCnt;
|
|
|
|
short gameCntAlign;
|
2009-05-04 07:08:10 +02:00
|
|
|
short gameCnt_x;
|
|
|
|
short gameCnt_y;
|
2009-05-03 20:53:31 +02:00
|
|
|
short showRegion;
|
|
|
|
short showBattery;
|
|
|
|
short showToolTip;
|
|
|
|
//color
|
|
|
|
short info_r;
|
|
|
|
short info_g;
|
|
|
|
short info_b;
|
2009-05-18 11:33:23 +02:00
|
|
|
short prompttxt_r;
|
|
|
|
short prompttxt_g;
|
|
|
|
short prompttxt_b;
|
2009-06-01 05:49:50 +02:00
|
|
|
short settingsTxt_r;
|
|
|
|
short settingsTxt_g;
|
|
|
|
short settingsTxt_b;
|
|
|
|
short clock_r;
|
|
|
|
short clock_g;
|
|
|
|
short clock_b;
|
2009-05-03 20:53:31 +02:00
|
|
|
short clock_x;
|
|
|
|
short clock_y;
|
|
|
|
short clockAlign;
|
2009-05-04 07:08:10 +02:00
|
|
|
short sdcard_x;
|
|
|
|
short sdcard_y;
|
2009-05-05 04:56:01 +02:00
|
|
|
short gameText_r;
|
|
|
|
short gameText_g;
|
|
|
|
short gameText_b;
|
2009-05-06 06:52:44 +02:00
|
|
|
short pagesize;
|
2009-05-03 20:53:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
extern struct CFG CFG;
|
|
|
|
extern struct THEME THEME;
|
|
|
|
extern u8 ocarinaChoice;
|
2009-05-22 09:15:01 +02:00
|
|
|
extern u16 playcnt;
|
2009-05-03 20:53:31 +02:00
|
|
|
extern u8 videoChoice;
|
|
|
|
extern u8 languageChoice;
|
|
|
|
extern u8 viChoice;
|
|
|
|
extern u8 iosChoice;
|
|
|
|
extern u8 parentalcontrolChoice;
|
2009-06-06 19:26:52 +02:00
|
|
|
extern u8 fix002;
|
2009-06-18 18:09:45 +02:00
|
|
|
extern u8 reloadblock;
|
2009-06-14 20:42:26 +02:00
|
|
|
extern u8 countrystrings;
|
2009-06-16 13:29:07 +02:00
|
|
|
extern u8 alternatedol;
|
2009-07-17 19:07:08 +02:00
|
|
|
extern u32 alternatedoloffset;
|
2009-05-05 08:24:23 +02:00
|
|
|
extern u8 xflip;
|
|
|
|
extern u8 qboot;
|
2009-06-14 05:42:46 +02:00
|
|
|
extern u8 sort;
|
2009-05-22 19:51:28 +02:00
|
|
|
extern u8 fave;
|
2009-05-06 13:09:32 +02:00
|
|
|
extern u8 wsprompt;
|
2009-05-17 06:02:52 +02:00
|
|
|
extern u8 keyset;
|
2009-05-25 14:10:34 +02:00
|
|
|
extern u8 gameDisplay;
|
2009-06-20 01:20:18 +02:00
|
|
|
extern u16 playcount;
|
|
|
|
extern u8 favoritevar;
|
2009-07-15 19:20:45 +02:00
|
|
|
extern char alternatedname[40];
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-06-10 01:26:03 +02:00
|
|
|
|
2009-05-03 20:53:31 +02:00
|
|
|
struct Game_CFG
|
|
|
|
{
|
|
|
|
u8 id[8];
|
|
|
|
u8 video;
|
|
|
|
u8 language;
|
|
|
|
u8 ocarina;
|
|
|
|
u8 vipatch;
|
|
|
|
u8 ios;
|
|
|
|
u8 parentalcontrol;
|
2009-06-06 19:26:52 +02:00
|
|
|
u8 errorfix002;
|
2009-06-18 18:09:45 +02:00
|
|
|
u8 iosreloadblock;
|
2009-06-16 13:29:07 +02:00
|
|
|
u8 loadalternatedol;
|
2009-07-17 19:07:08 +02:00
|
|
|
u32 alternatedolstart;
|
2009-06-14 20:42:26 +02:00
|
|
|
u8 patchcountrystrings;
|
2009-07-15 19:20:45 +02:00
|
|
|
char alternatedolname[40];
|
2009-05-03 20:53:31 +02:00
|
|
|
};
|
2009-05-20 10:31:47 +02:00
|
|
|
struct Game_NUM
|
|
|
|
{
|
|
|
|
u8 id[8];
|
|
|
|
u8 favorite;
|
2009-05-22 09:15:01 +02:00
|
|
|
u16 count;
|
2009-05-20 10:31:47 +02:00
|
|
|
};
|
2009-05-03 20:53:31 +02:00
|
|
|
|
|
|
|
|
2009-05-04 23:50:46 +02:00
|
|
|
void CFG_Default(int widescreen); // -1 = non forced mode
|
2009-05-30 00:14:19 +02:00
|
|
|
void CFG_Load(void);
|
2009-05-16 17:38:52 +02:00
|
|
|
void lang_defualt();
|
2009-05-03 20:53:31 +02:00
|
|
|
struct Game_CFG* CFG_get_game_opt(u8 *id);
|
2009-05-20 10:31:47 +02:00
|
|
|
struct Game_NUM* CFG_get_game_num(u8 *id);
|
2009-05-03 20:53:31 +02:00
|
|
|
bool CFG_save_game_opt(u8 *id);
|
2009-05-20 10:31:47 +02:00
|
|
|
bool CFG_save_game_num(u8 *id);
|
2009-06-20 10:19:01 +02:00
|
|
|
bool CFG_reset_all_playcounters();
|
2009-05-04 23:50:46 +02:00
|
|
|
bool CFG_forget_game_opt(u8 *id);
|
2009-06-17 08:07:43 +02:00
|
|
|
bool CFG_forget_game_num(u8 *id);
|
2009-05-03 20:53:31 +02:00
|
|
|
|
2009-06-20 10:19:01 +02:00
|
|
|
|
2009-05-04 23:50:46 +02:00
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
ConsoleLangDefault=0,
|
2009-05-04 23:50:46 +02:00
|
|
|
jap,
|
|
|
|
eng,
|
|
|
|
ger,
|
|
|
|
fren,
|
|
|
|
esp,
|
|
|
|
it,
|
|
|
|
dut,
|
2009-05-03 20:53:31 +02:00
|
|
|
schin,
|
|
|
|
tchin,
|
2009-05-29 15:20:28 +02:00
|
|
|
kor,
|
|
|
|
settings_language_max // always the last entry
|
2009-05-03 20:53:31 +02:00
|
|
|
};
|
|
|
|
|
2009-05-04 23:50:46 +02:00
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
systemdefault=0,
|
2009-05-04 23:50:46 +02:00
|
|
|
discdefault,
|
2009-05-03 20:53:31 +02:00
|
|
|
patch,
|
|
|
|
pal50,
|
|
|
|
pal60,
|
2009-05-29 15:20:28 +02:00
|
|
|
ntsc,
|
|
|
|
settings_video_max // always the last entry
|
2009-05-04 23:50:46 +02:00
|
|
|
};
|
2009-05-03 20:53:31 +02:00
|
|
|
|
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
off=0,
|
2009-05-03 20:53:31 +02:00
|
|
|
on,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_off_on_max // always the last entry
|
2009-05-04 23:50:46 +02:00
|
|
|
};
|
2009-06-25 17:58:16 +02:00
|
|
|
enum {
|
|
|
|
anti=2,
|
|
|
|
};
|
2009-07-06 01:01:29 +02:00
|
|
|
|
2009-05-04 23:50:46 +02:00
|
|
|
|
|
|
|
enum {
|
|
|
|
GameID,
|
|
|
|
GameRegion,
|
|
|
|
Both,
|
|
|
|
Neither,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_sinfo_max // always the last entry
|
2009-05-04 23:50:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
i249=0,
|
2009-05-04 23:50:46 +02:00
|
|
|
i222,
|
2009-06-12 13:50:14 +02:00
|
|
|
i223
|
2009-05-03 20:53:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
ios249=0,
|
2009-05-03 20:53:31 +02:00
|
|
|
ios222,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_cios_max // always the last entry
|
2009-05-03 20:53:31 +02:00
|
|
|
};
|
2009-05-04 23:50:46 +02:00
|
|
|
|
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
hr12=0,
|
2009-05-20 10:31:47 +02:00
|
|
|
hr24,
|
|
|
|
Off,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_clock_max // always the last entry
|
2009-05-04 23:50:46 +02:00
|
|
|
};
|
2009-05-21 06:00:16 +02:00
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
all=0,
|
2009-05-21 06:00:16 +02:00
|
|
|
pcount,
|
|
|
|
};
|
2009-05-04 23:50:46 +02:00
|
|
|
|
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
RumbleOff=0,
|
2009-05-04 23:50:46 +02:00
|
|
|
RumbleOn,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_rumble_max // always the last entry
|
2009-05-04 23:50:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
TooltipsOff=0,
|
2009-05-04 23:50:46 +02:00
|
|
|
TooltipsOn,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_tooltips_max // always the last entry
|
2009-05-04 23:50:46 +02:00
|
|
|
};
|
|
|
|
|
2009-06-18 10:37:24 +02:00
|
|
|
enum {
|
|
|
|
min3=1,
|
|
|
|
min5,
|
|
|
|
min10,
|
|
|
|
min20,
|
|
|
|
min30,
|
|
|
|
min60,
|
|
|
|
settings_screensaver_max // always the last entry
|
|
|
|
};
|
|
|
|
|
2009-05-05 08:24:23 +02:00
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
no=0,
|
2009-05-05 08:24:23 +02:00
|
|
|
yes,
|
2009-05-10 03:01:41 +02:00
|
|
|
sysmenu,
|
|
|
|
wtf,
|
2009-05-20 22:09:57 +02:00
|
|
|
disk3d,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_xflip_max // always the last entry
|
2009-05-05 08:24:23 +02:00
|
|
|
};
|
2009-05-17 06:02:52 +02:00
|
|
|
enum {
|
2009-05-29 15:20:28 +02:00
|
|
|
us=0,
|
2009-05-17 06:02:52 +02:00
|
|
|
dvorak,
|
|
|
|
euro,
|
2009-05-25 14:10:34 +02:00
|
|
|
azerty,
|
2009-05-29 15:20:28 +02:00
|
|
|
settings_keyset_max // always the last entry
|
2009-05-25 14:10:34 +02:00
|
|
|
};
|
|
|
|
enum {
|
|
|
|
list,
|
|
|
|
grid,
|
|
|
|
carousel,
|
2009-06-06 19:26:52 +02:00
|
|
|
settings_display_max
|
2009-05-17 06:02:52 +02:00
|
|
|
};
|
2009-05-29 15:20:28 +02:00
|
|
|
enum {
|
|
|
|
scrollDefault,
|
|
|
|
scrollMarquee,
|
|
|
|
settings_scrolleffect_max // always the last entry
|
|
|
|
};
|
2009-05-04 23:50:46 +02:00
|
|
|
struct SSettings {
|
2009-05-24 00:23:24 +02:00
|
|
|
int video;
|
|
|
|
int language;
|
2009-05-22 19:51:28 +02:00
|
|
|
int ocarina;
|
|
|
|
int vpatch;
|
|
|
|
int ios;
|
2009-05-24 00:23:24 +02:00
|
|
|
int sinfo;
|
|
|
|
int hddinfo;
|
|
|
|
int rumble;
|
|
|
|
int xflip;
|
|
|
|
int volume;
|
2009-06-06 19:26:52 +02:00
|
|
|
int sfxvolume;
|
2009-05-03 20:53:31 +02:00
|
|
|
int tooltips;
|
|
|
|
char unlockCode[20];
|
2009-05-24 00:23:24 +02:00
|
|
|
int parentalcontrol;
|
2009-05-04 23:50:46 +02:00
|
|
|
int cios;
|
2009-05-24 00:23:24 +02:00
|
|
|
int qboot;
|
|
|
|
int wsprompt;
|
|
|
|
int keyset;
|
2009-06-14 05:42:46 +02:00
|
|
|
int sort;
|
2009-05-24 00:23:24 +02:00
|
|
|
int fave;
|
|
|
|
int wiilight;
|
2009-05-25 14:10:34 +02:00
|
|
|
int gameDisplay;
|
2009-05-30 18:58:34 +02:00
|
|
|
int patchcountrystrings;
|
2009-06-18 10:37:24 +02:00
|
|
|
int screensaver;
|
2009-06-04 03:04:23 +02:00
|
|
|
short godmode;
|
|
|
|
char covers_path[100];
|
|
|
|
char theme_path[100];
|
|
|
|
char wtheme_path[100];
|
|
|
|
char disc_path[100];
|
|
|
|
char titlestxt_path[100];
|
|
|
|
char language_path[100];
|
2009-06-06 19:26:52 +02:00
|
|
|
char languagefiles_path[100];
|
2009-06-04 03:04:23 +02:00
|
|
|
char oggload_path[100];
|
|
|
|
char ogg_path[150];
|
2009-06-16 15:42:52 +02:00
|
|
|
char dolpath[150];
|
2009-06-04 03:04:23 +02:00
|
|
|
char update_path[150];
|
2009-07-19 11:10:25 +02:00
|
|
|
char homebrewapps_path[150];
|
|
|
|
char selected_homebrew[200];
|
2009-06-10 13:27:19 +02:00
|
|
|
char Cheatcodespath[100];
|
2009-06-24 09:33:31 +02:00
|
|
|
char TxtCheatcodespath[100];
|
2009-06-14 20:42:26 +02:00
|
|
|
short error002;
|
2009-06-20 02:32:10 +02:00
|
|
|
int titlesOverride; // db_titles
|
|
|
|
char db_url[200];
|
|
|
|
char db_language[100];
|
|
|
|
int db_JPtoEN;
|
2009-07-01 04:05:50 +02:00
|
|
|
int gridRows;
|
2009-05-04 23:50:46 +02:00
|
|
|
};
|
|
|
|
|
2009-05-03 20:53:31 +02:00
|
|
|
void CFG_LoadGlobal(void);
|
|
|
|
bool cfg_save_global(void);
|
|
|
|
|
2009-06-20 02:32:10 +02:00
|
|
|
bool OpenXMLDatabase(char* xmlfilepath, char* argdblang, bool argJPtoEN, bool openfile, bool loadtitles, bool freemem);
|
|
|
|
|
2009-05-03 20:53:31 +02:00
|
|
|
char *get_title(struct discHdr *header);
|
|
|
|
u8 get_block(struct discHdr *header);
|
|
|
|
|
|
|
|
void CFG_Cleanup(void);
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|