*Reverted cyrex changes to the settings

*Added Japanese UnicodeFix made by Rudolph (thanks) (you still need to compile with a japanese font.ttf to have it work)
*Added missing languagevariables 

issue 517, issue 515, issue 519
This commit is contained in:
dimok321 2009-06-12 20:11:59 +00:00
parent d7c3bea35c
commit 940fa4b441
24 changed files with 106 additions and 73 deletions

View File

@ -17,7 +17,7 @@ include $(DEVKITPPC)/wii_rules
#--------------------------------------------------------------------------------- #---------------------------------------------------------------------------------
TARGET := boot TARGET := boot
BUILD := build BUILD := build
SOURCES := source source/libwiigui source/images source/fonts source/sounds source/libwbfs source/unzip SOURCES := source source/libwiigui source/images source/fonts source/sounds source/libwbfs source/unzip source/language
INCLUDES := source INCLUDES := source
SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"' SVNDEV := -D'SVN_REV="$(shell svnversion -n ..)"'

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
<pd><ViewState><e p="gui" x="true"></e><e p="gui\source\unzip" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\sounds" x="false"></e></ViewState></pd> <pd><ViewState><e p="gui" x="true"></e><e p="gui\source\language" x="false"></e><e p="gui\source" x="true"></e><e p="gui\source\fonts" x="false"></e><e p="gui\source\images" x="false"></e><e p="gui\source\libwbfs" x="false"></e><e p="gui\source\libwiigui" x="true"></e><e p="gui\source\sounds" x="false"></e><e p="gui\source\unzip" x="false"></e></ViewState></pd>

View File

@ -21,8 +21,9 @@
*/ */
#include "FreeTypeGX.h" #include "FreeTypeGX.h"
#include "CH2Unicode.h" #include "language/CH2Unicode.h"
#include "GB2Unicode.h" #include "language/GB2Unicode.h"
#include "language/sjis2unicode.h"
#include "main.h" #include "main.h"
#include "cfg.h" #include "cfg.h"
@ -95,6 +96,8 @@ wchar_t* FreeTypeGX::charToWideChar(char* strChar) {
CH2Unicode(strChar, strWChar); CH2Unicode(strChar, strWChar);
} else if(Settings.unicodefix == 2) { } else if(Settings.unicodefix == 2) {
ConverGB2Unicode(strChar, strWChar); ConverGB2Unicode(strChar, strWChar);
} else if(Settings.unicodefix == 3) {
_sjis2unicode(strChar, strWChar);
} else { } else {
char *tempSrc = strChar; char *tempSrc = strChar;
wchar_t *tempDest = strWChar; wchar_t *tempDest = strWChar;

View File

@ -11,7 +11,7 @@
#include "wpad.h" #include "wpad.h"
#include "wbfs.h" #include "wbfs.h"
#include "wdvd.h" #include "wdvd.h"
#include "language.h" #include "language/language.h"
#include "libwiigui/gui.h" #include "libwiigui/gui.h"
#include "libwiigui/gui_diskcover.h" #include "libwiigui/gui_diskcover.h"
#include "fatmounter.h" #include "fatmounter.h"

View File

@ -5,7 +5,7 @@
#include "filelist.h" #include "filelist.h"
#include "sys.h" #include "sys.h"
#include "wbfs.h" #include "wbfs.h"
#include "language.h" #include "language/language.h"
#include "libwiigui/gui.h" #include "libwiigui/gui.h"
#include "libwiigui/gui_customoptionbrowser.h" #include "libwiigui/gui_customoptionbrowser.h"
#include "fatmounter.h" #include "fatmounter.h"
@ -52,13 +52,6 @@ int MenuSettings()
char imgPath[100]; char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%ssettings_top.png", CFG.theme_path);
GuiImageData settingsTop(imgPath, settings_top_png);
snprintf(imgPath, sizeof(imgPath), "%ssettings_bottom.png", CFG.theme_path);
GuiImageData settingsBottom(imgPath, settings_bottom_png);
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
GuiImageData btnOutline(imgPath, button_dialogue_box_png); GuiImageData btnOutline(imgPath, button_dialogue_box_png);
snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%ssettings_background.png", CFG.theme_path);
@ -88,14 +81,6 @@ int MenuSettings()
GuiImage creditsImg(&creditsImgData); GuiImage creditsImg(&creditsImgData);
GuiImage creditsImgOver(&creditsOver); GuiImage creditsImgOver(&creditsOver);
GuiImage settingsTopImg(&settingsTop);
settingsTopImg.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
settingsTopImg.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35);
GuiImage settingsBottomImg(&settingsBottom);
settingsBottomImg.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
settingsBottomImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 35);
GuiTrigger trigA; GuiTrigger trigA;
trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A); trigA.SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
GuiTrigger trigHome; GuiTrigger trigHome;
@ -114,7 +99,6 @@ int MenuSettings()
GuiText titleTxt(LANGUAGE.settings, 28, (GXColor){0, 0, 0, 255}); GuiText titleTxt(LANGUAGE.settings, 28, (GXColor){0, 0, 0, 255});
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
titleTxt.SetPosition(0,40); titleTxt.SetPosition(0,40);
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35);
GuiImage settingsbackground(&settingsbg); GuiImage settingsbackground(&settingsbg);
@ -128,7 +112,6 @@ int MenuSettings()
GuiButton backBtn(&backBtnImg,&backBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, &btnClick,1); GuiButton backBtn(&backBtnImg,&backBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, &btnClick,1);
backBtn.SetLabel(&backBtnTxt); backBtn.SetLabel(&backBtnTxt);
backBtn.SetTrigger(&trigB); backBtn.SetTrigger(&trigB);
backBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 35);
GuiButton homo(1,1); GuiButton homo(1,1);
homo.SetTrigger(&trigHome); homo.SetTrigger(&trigHome);
@ -296,8 +279,6 @@ int MenuSettings()
mainWindow->Append(&w); mainWindow->Append(&w);
w.RemoveAll(); w.RemoveAll();
w.Append(&settingsbackground); w.Append(&settingsbackground);
w.Append(&settingsTopImg);
w.Append(&settingsBottomImg);
w.Append(&PageIndicatorBtn1); w.Append(&PageIndicatorBtn1);
w.Append(&PageIndicatorBtn2); w.Append(&PageIndicatorBtn2);
w.Append(&titleTxt); w.Append(&titleTxt);
@ -397,8 +378,6 @@ int MenuSettings()
mainWindow->Append(&w); mainWindow->Append(&w);
w.RemoveAll(); w.RemoveAll();
w.Append(&settingsbackground); w.Append(&settingsbackground);
w.Append(&settingsTopImg);
w.Append(&settingsBottomImg);
w.Append(&PageIndicatorBtn1); w.Append(&PageIndicatorBtn1);
w.Append(&PageIndicatorBtn2); w.Append(&PageIndicatorBtn2);
w.Append(&titleTxt); w.Append(&titleTxt);
@ -532,7 +511,7 @@ int MenuSettings()
Settings.wiilight = 0; Settings.wiilight = 0;
if(Settings.rumble >= settings_rumble_max) if(Settings.rumble >= settings_rumble_max)
Settings.rumble = 0; //RUMBLE Settings.rumble = 0; //RUMBLE
if ( Settings.unicodefix > 2 ) if ( Settings.unicodefix > 3 )
Settings.unicodefix = 0; Settings.unicodefix = 0;
if(Settings.titlesOverride >= 2) if(Settings.titlesOverride >= 2)
Settings.titlesOverride = 0; Settings.titlesOverride = 0;
@ -577,6 +556,7 @@ int MenuSettings()
if (Settings.unicodefix == 0) options2.SetValue(9,"%s",LANGUAGE.OFF); if (Settings.unicodefix == 0) options2.SetValue(9,"%s",LANGUAGE.OFF);
else if (Settings.unicodefix == 1) options2.SetValue(9,"%s",LANGUAGE.TChinese); else if (Settings.unicodefix == 1) options2.SetValue(9,"%s",LANGUAGE.TChinese);
else if (Settings.unicodefix == 2) options2.SetValue(9,"%s",LANGUAGE.SChinese); else if (Settings.unicodefix == 2) options2.SetValue(9,"%s",LANGUAGE.SChinese);
else if (Settings.unicodefix == 3) options2.SetValue(9,"%s",LANGUAGE.Japanese);
if (Settings.titlesOverride == 0) options2.SetValue(10,"%s",LANGUAGE.OFF); if (Settings.titlesOverride == 0) options2.SetValue(10,"%s",LANGUAGE.OFF);
else if (Settings.titlesOverride == 1) options2.SetValue(10,"%s",LANGUAGE.ON); else if (Settings.titlesOverride == 1) options2.SetValue(10,"%s",LANGUAGE.ON);
@ -887,8 +867,8 @@ int MenuSettings()
titleTxt.SetText(LANGUAGE.Parentalcontrol); titleTxt.SetText(LANGUAGE.Parentalcontrol);
exit = false; exit = false;
for(int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL); for(int i = 0; i <= MAXOPTIONS; i++) options2.SetName(i, NULL);
options2.SetName(0, "Console"); options2.SetName(0, "%s",LANGUAGE.Console);
options2.SetName(1, "%s", LANGUAGE.Password); options2.SetName(1, "%s",LANGUAGE.Password);
options2.SetName(2, "%s",LANGUAGE.Controllevel); options2.SetName(2, "%s",LANGUAGE.Controllevel);
for(int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL); for(int i = 0; i <= MAXOPTIONS; i++) options2.SetValue(i, NULL);
w.Append(&optionBrowser2); w.Append(&optionBrowser2);
@ -1683,7 +1663,7 @@ int GameSettings(struct discHdr * header)
options3.SetName(3, "Ocarina"); options3.SetName(3, "Ocarina");
options3.SetName(4, "IOS"); options3.SetName(4, "IOS");
options3.SetName(5,"%s", LANGUAGE.Parentalcontrol); options3.SetName(5,"%s", LANGUAGE.Parentalcontrol);
options3.SetName(6,"%s", "Error 002 fix"); options3.SetName(6,"%s", LANGUAGE.Error002fix);
options3.SetName(7,"%s", LANGUAGE.Defaultgamesettings); options3.SetName(7,"%s", LANGUAGE.Defaultgamesettings);
GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume); GuiSound btnSoundOver(button_over_pcm, button_over_pcm_size, SOUND_PCM, Settings.sfxvolume);
@ -1691,12 +1671,6 @@ int GameSettings(struct discHdr * header)
char imgPath[100]; char imgPath[100];
snprintf(imgPath, sizeof(imgPath), "%ssettings_top.png", CFG.theme_path);
GuiImageData settingsTop(imgPath, settings_top_png);
snprintf(imgPath, sizeof(imgPath), "%ssettings_bottom.png", CFG.theme_path);
GuiImageData settingsBottom(imgPath, settings_bottom_png);
snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sbutton_dialogue_box.png", CFG.theme_path);
GuiImageData btnOutline(imgPath, button_dialogue_box_png); GuiImageData btnOutline(imgPath, button_dialogue_box_png);
snprintf(imgPath, sizeof(imgPath), "%sgamesettings_background.png", CFG.theme_path); snprintf(imgPath, sizeof(imgPath), "%sgamesettings_background.png", CFG.theme_path);
@ -1713,7 +1687,6 @@ int GameSettings(struct discHdr * header)
titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP); titleTxt.SetAlignment(ALIGN_CENTRE, ALIGN_TOP);
titleTxt.SetPosition(12,40); titleTxt.SetPosition(12,40);
titleTxt.SetMaxWidth(356, GuiText::SCROLL); titleTxt.SetMaxWidth(356, GuiText::SCROLL);
titleTxt.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35);
GuiImage settingsbackground(&settingsbg); GuiImage settingsbackground(&settingsbg);
GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight()); GuiButton settingsbackgroundbtn(settingsbackground.GetWidth(), settingsbackground.GetHeight());
@ -1721,14 +1694,6 @@ int GameSettings(struct discHdr * header)
settingsbackgroundbtn.SetPosition(0, 0); settingsbackgroundbtn.SetPosition(0, 0);
settingsbackgroundbtn.SetImage(&settingsbackground); settingsbackgroundbtn.SetImage(&settingsbackground);
GuiImage settingsTopImg(&settingsTop);
settingsTopImg.SetAlignment(ALIGN_LEFT, ALIGN_TOP);
settingsTopImg.SetEffect(EFFECT_SLIDE_TOP | EFFECT_SLIDE_IN, 35);
GuiImage settingsBottomImg(&settingsBottom);
settingsBottomImg.SetAlignment(ALIGN_LEFT, ALIGN_BOTTOM);
settingsBottomImg.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 35);
GuiText saveBtnTxt(LANGUAGE.Save, 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); GuiText saveBtnTxt(LANGUAGE.Save, 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
saveBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30); saveBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
GuiImage saveBtnImg(&btnOutline); GuiImage saveBtnImg(&btnOutline);
@ -1738,7 +1703,6 @@ int GameSettings(struct discHdr * header)
GuiButton saveBtn(&saveBtnImg,&saveBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, &btnClick,1); GuiButton saveBtn(&saveBtnImg,&saveBtnImg, 2, 3, -180, 400, &trigA, &btnSoundOver, &btnClick,1);
saveBtn.SetScale(0.9); saveBtn.SetScale(0.9);
saveBtn.SetLabel(&saveBtnTxt); saveBtn.SetLabel(&saveBtnTxt);
saveBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 35);
GuiText cancelBtnTxt(LANGUAGE.Back, 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); GuiText cancelBtnTxt(LANGUAGE.Back, 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
cancelBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30); cancelBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
@ -1750,7 +1714,6 @@ int GameSettings(struct discHdr * header)
cancelBtn.SetScale(0.9); cancelBtn.SetScale(0.9);
cancelBtn.SetLabel(&cancelBtnTxt); cancelBtn.SetLabel(&cancelBtnTxt);
cancelBtn.SetTrigger(&trigB); cancelBtn.SetTrigger(&trigB);
cancelBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 35);
GuiText deleteBtnTxt(LANGUAGE.Uninstall, 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255}); GuiText deleteBtnTxt(LANGUAGE.Uninstall, 22, (GXColor){THEME.prompttxt_r, THEME.prompttxt_g, THEME.prompttxt_b, 255});
deleteBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30); deleteBtnTxt.SetMaxWidth(btnOutline.GetWidth()-30);
@ -1761,7 +1724,6 @@ int GameSettings(struct discHdr * header)
GuiButton deleteBtn(&deleteBtnImg,&deleteBtnImg, 2, 3, 0, 400, &trigA, &btnSoundOver, &btnClick,1); GuiButton deleteBtn(&deleteBtnImg,&deleteBtnImg, 2, 3, 0, 400, &trigA, &btnSoundOver, &btnClick,1);
deleteBtn.SetScale(0.9); deleteBtn.SetScale(0.9);
deleteBtn.SetLabel(&deleteBtnTxt); deleteBtn.SetLabel(&deleteBtnTxt);
deleteBtn.SetEffect(EFFECT_SLIDE_BOTTOM | EFFECT_SLIDE_IN, 35);
GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, CFG.theme_path, "bg_options_gamesettings.png", bg_options_settings_png, 0, 200); GuiCustomOptionBrowser optionBrowser3(396, 280, &options3, CFG.theme_path, "bg_options_gamesettings.png", bg_options_settings_png, 0, 200);
optionBrowser3.SetPosition(0, 90); optionBrowser3.SetPosition(0, 90);
@ -1770,8 +1732,6 @@ int GameSettings(struct discHdr * header)
HaltGui(); HaltGui();
GuiWindow w(screenwidth, screenheight); GuiWindow w(screenwidth, screenheight);
w.Append(&settingsbackgroundbtn); w.Append(&settingsbackgroundbtn);
w.Append(&settingsTopImg);
w.Append(&settingsBottomImg);
w.Append(&titleTxt); w.Append(&titleTxt);
w.Append(&deleteBtn); w.Append(&deleteBtn);
w.Append(&saveBtn); w.Append(&saveBtn);

View File

@ -4,7 +4,7 @@
#include "filelist.h" #include "filelist.h"
#include "sys.h" #include "sys.h"
#include "language.h" #include "language/language.h"
#include "libwiigui/gui.h" #include "libwiigui/gui.h"
#include "libwiigui/gui_customoptionbrowser.h" #include "libwiigui/gui_customoptionbrowser.h"
#include "listfiles.h" #include "listfiles.h"

View File

@ -7,7 +7,7 @@
#include <ogcsys.h> #include <ogcsys.h>
#include <mxml.h> #include <mxml.h>
#include "cfg.h" #include "cfg.h"
#include "language.h" #include "language/language.h"
#include "xml.h" /* XML - Lustar*/ #include "xml.h" /* XML - Lustar*/

View File

@ -11,12 +11,6 @@
#include <gccore.h> #include <gccore.h>
extern const u8 settings_top_png[];
extern const u32 settings_top_png_size;
extern const u8 settings_bottom_png[];
extern const u32 settings_bottom_png_size;
extern const u8 font_ttf[]; extern const u8 font_ttf[];
extern const u32 font_ttf_size; extern const u32 font_ttf_size;

View File

@ -13,7 +13,7 @@
#include "sys.h" #include "sys.h"
#include "wpad.h" #include "wpad.h"
#include "wbfs.h" #include "wbfs.h"
#include "language.h" #include "language/language.h"
#include "libwiigui/gui.h" #include "libwiigui/gui.h"
#include "fatmounter.h" #include "fatmounter.h"
#include "listfiles.h" #include "listfiles.h"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

View File

@ -56,6 +56,7 @@ snprintf(LANGUAGE.ClicktoDownloadCovers, sizeof(LANGUAGE.ClicktoDownloadCovers),
snprintf(LANGUAGE.Clock, sizeof(LANGUAGE.Clock), "Clock"); snprintf(LANGUAGE.Clock, sizeof(LANGUAGE.Clock), "Clock");
snprintf(LANGUAGE.Close, sizeof(LANGUAGE.Close), "Close"); snprintf(LANGUAGE.Close, sizeof(LANGUAGE.Close), "Close");
snprintf(LANGUAGE.Continueinstallgame, sizeof(LANGUAGE.Continueinstallgame), "Continue to install game?"); snprintf(LANGUAGE.Continueinstallgame, sizeof(LANGUAGE.Continueinstallgame), "Continue to install game?");
snprintf(LANGUAGE.Console, sizeof(LANGUAGE.Console), "Console");
snprintf(LANGUAGE.ConsoleDefault, sizeof(LANGUAGE.ConsoleDefault), "Console Default"); snprintf(LANGUAGE.ConsoleDefault, sizeof(LANGUAGE.ConsoleDefault), "Console Default");
snprintf(LANGUAGE.Consoleshouldbeunlockedtomodifyit, sizeof(LANGUAGE.Consoleshouldbeunlockedtomodifyit), "Console should be unlocked to modify it."); snprintf(LANGUAGE.Consoleshouldbeunlockedtomodifyit, sizeof(LANGUAGE.Consoleshouldbeunlockedtomodifyit), "Console should be unlocked to modify it.");
snprintf(LANGUAGE.ConsoleLocked, sizeof(LANGUAGE.ConsoleLocked), "Console Locked"); snprintf(LANGUAGE.ConsoleLocked, sizeof(LANGUAGE.ConsoleLocked), "Console Locked");
@ -92,6 +93,7 @@ snprintf(LANGUAGE.Defaultsettings, sizeof(LANGUAGE.Defaultsettings), "Default Se
snprintf(LANGUAGE.Default, sizeof(LANGUAGE.Default), "Default"); snprintf(LANGUAGE.Default, sizeof(LANGUAGE.Default), "Default");
snprintf(LANGUAGE.diversepatches, sizeof(LANGUAGE.diversepatches), "for diverse patches"); snprintf(LANGUAGE.diversepatches, sizeof(LANGUAGE.diversepatches), "for diverse patches");
snprintf(LANGUAGE.Error, sizeof(LANGUAGE.Error), "Error !"); snprintf(LANGUAGE.Error, sizeof(LANGUAGE.Error), "Error !");
snprintf(LANGUAGE.Error002fix, sizeof(LANGUAGE.Error002fix), "Error 002 fix");
snprintf(LANGUAGE.hour, sizeof(LANGUAGE.hour), "Hour"); snprintf(LANGUAGE.hour, sizeof(LANGUAGE.hour), "Hour");
snprintf(LANGUAGE.Homemenu, sizeof(LANGUAGE.Homemenu), "HOME Menu"); snprintf(LANGUAGE.Homemenu, sizeof(LANGUAGE.Homemenu), "HOME Menu");
snprintf(LANGUAGE.BOOTERROR, sizeof(LANGUAGE.BOOTERROR), "BOOT ERROR"); snprintf(LANGUAGE.BOOTERROR, sizeof(LANGUAGE.BOOTERROR), "BOOT ERROR");
@ -389,6 +391,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Continueinstallgame, val, sizeof(LANGUAGE.Continueinstallgame)); strcopy(LANGUAGE.Continueinstallgame, val, sizeof(LANGUAGE.Continueinstallgame));
return; return;
} }
if (strcmp(name, "Console") == 0) {
strcopy(LANGUAGE.Console, val, sizeof(LANGUAGE.Console));
return;
}
if (strcmp(name, "ConsoleDefault") == 0) { if (strcmp(name, "ConsoleDefault") == 0) {
strcopy(LANGUAGE.ConsoleDefault, val, sizeof(LANGUAGE.ConsoleDefault)); strcopy(LANGUAGE.ConsoleDefault, val, sizeof(LANGUAGE.ConsoleDefault));
return; return;
@ -529,6 +535,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.Error, val, sizeof(LANGUAGE.Error)); strcopy(LANGUAGE.Error, val, sizeof(LANGUAGE.Error));
return; return;
} }
if (strcmp(name, "Error002fix") == 0) {
strcopy(LANGUAGE.Error002fix, val, sizeof(LANGUAGE.Error002fix));
return;
}
if (strcmp(name, "BOOTERROR") == 0) { if (strcmp(name, "BOOTERROR") == 0) {
strcopy(LANGUAGE.BOOTERROR, val, sizeof(LANGUAGE.BOOTERROR)); strcopy(LANGUAGE.BOOTERROR, val, sizeof(LANGUAGE.BOOTERROR));
return; return;
@ -1205,6 +1215,10 @@ void language_set(char *name, char *val)
strcopy(LANGUAGE.updating, val, sizeof(LANGUAGE.updating)); strcopy(LANGUAGE.updating, val, sizeof(LANGUAGE.updating));
return; return;
} }
if (strcmp(name, "XMLTitles") == 0) {
strcopy(LANGUAGE.XMLTitles, val, sizeof(LANGUAGE.XMLTitles));
return;
}
} }

View File

@ -56,6 +56,7 @@ struct LANGUAGE
char Clock[20]; char Clock[20];
char Close[20]; char Close[20];
char Continueinstallgame[50]; char Continueinstallgame[50];
char Console[50];
char ConsoleDefault[50]; char ConsoleDefault[50];
char Consoleshouldbeunlockedtomodifyit[100]; char Consoleshouldbeunlockedtomodifyit[100];
char ConsoleLocked[50]; char ConsoleLocked[50];
@ -92,6 +93,7 @@ struct LANGUAGE
char Default[40]; char Default[40];
char diversepatches[60]; char diversepatches[60];
char Error[30]; char Error[30];
char Error002fix[50];
char BOOTERROR[50]; char BOOTERROR[50];
char ErrorreadingDisc[50]; char ErrorreadingDisc[50];
char ExitUSBISOLoader[50]; char ExitUSBISOLoader[50];

View File

@ -0,0 +1,49 @@
////////////////////////////////////////////
// SJIS(CP932)/UTF-8 -> UNICODE
// 2009/05/02 by Rudolph
////////////////////////////////////////////
extern const u8 sjis2unicode_tbl[];
static bool _isKanji1(wchar_t ch)
{
if((ch >= (wchar_t)0x81) && (ch <= (wchar_t)0x9F))
return true;
if((ch >= (wchar_t)0xE0) && (ch <= (wchar_t)0xEF))
return true;
if((ch >= (wchar_t)0xFA) && (ch <= (wchar_t)0xFB)) // JIS X 0218¼ IBMŠg£•¶Žš (0xFA40-0xFC4B)
return true;
return false;
}
static void _sjis2unicode(char *src, wchar_t *dest)
{
wchar_t lc = 0;
int bt;
bt = mbstowcs(dest, src, strlen(src)); // UTF-8 to UTF-16
if(bt > 0) {
dest[bt] = (wchar_t)'\0';
return;
}
while(*src) {
lc = (wchar_t)*src;
src++;
if(_isKanji1(lc) && *src) {
lc = (lc << 8) + ((wchar_t)*src);
src++;
}
if(lc < ((wchar_t)(sjis2unicode_tbl[3]) << 8) + (wchar_t)(sjis2unicode_tbl[2])) {
*dest = (((wchar_t)(sjis2unicode_tbl[lc*2+5]) << 8)) + (wchar_t)(sjis2unicode_tbl[lc*2+4]);
if(*dest == (wchar_t)'\0')
*dest = (wchar_t)'?';
} else *dest = (wchar_t)'?';
dest++;
}
*dest = (wchar_t)'\0';
return;
}

Binary file not shown.

View File

@ -0,0 +1,11 @@
# SJIS(CP932) -> UNICODE by Rudolph
.rodata
.globl sjis2unicode_tbl
.balign 32
sjis2unicode_tbl:
.incbin "../source/language/sjis2unicode.tbl"

View File

@ -32,7 +32,7 @@
#include "video2.h" #include "video2.h"
#include "wpad.h" #include "wpad.h"
#include "cfg.h" #include "cfg.h"
#include "language.h" #include "language/language.h"
#include "fat.h" #include "fat.h"
#include "mload.h" #include "mload.h"

View File

@ -25,7 +25,7 @@
#include "sys.h" #include "sys.h"
#include "patchcode.h" #include "patchcode.h"
#include "wpad.h" #include "wpad.h"
#include "language.h" #include "language/language.h"
#include "listfiles.h" #include "listfiles.h"
#include "fatmounter.h" #include "fatmounter.h"
#include "getentries.h" #include "getentries.h"