-Added translations for "Shop Channel Code"

-Removed unused video code
This commit is contained in:
Joostinonline 2014-02-15 05:16:55 +00:00
parent a9f4ebcb88
commit e2e99984ec
9 changed files with 13 additions and 161 deletions

View File

@ -38,6 +38,7 @@ const char* TXT_HBC_STUB;
const char* TXT_Hollywood; const char* TXT_Hollywood;
const char* TXT_ConsoleID; const char* TXT_ConsoleID;
const char* TXT_ConsoleType; const char* TXT_ConsoleType;
const char* TXT_ShopCountry;
const char* TXT_vBoot2; const char* TXT_vBoot2;
const char* TXT_NrOfTitles; const char* TXT_NrOfTitles;
const char* TXT_NrOfIOS; const char* TXT_NrOfIOS;

View File

@ -1,17 +0,0 @@
#ifndef _VIDEO_H_
#define _VIDEO_H_
// Wii Light state
#define WIILIGHT_OFF 0
#define WIILIGHT_ON 1
// Prototypes
void InitialiseVideo(void);
void SetConsoleForegroundColor(u8, u8);
void SetConsoleBackgroundColor(u8, u8);
void ClearConsole(int);
void PrintText(char *, bool, bool, bool, int, int);
void WiiLightControl(int);
#endif

View File

@ -1,7 +1,6 @@
#include <stdio.h> #include <stdio.h>
#include <gccore.h> #include <gccore.h>
#include "sys.h" #include "sys.h"
#include "video.h"
#include "fatMounter.h" #include "fatMounter.h"
#include "languages.h" #include "languages.h"
@ -60,6 +59,7 @@ int initLanguages(struct tm today)
TXT_Hollywood = "Hollywood v0x%x"; TXT_Hollywood = "Hollywood v0x%x";
TXT_ConsoleID = "Konsolen-ID: %d"; TXT_ConsoleID = "Konsolen-ID: %d";
TXT_ConsoleType = "Konsolentyp: %s"; TXT_ConsoleType = "Konsolentyp: %s";
TXT_ShopCountry ="Shop-Kanal-Land: %s (%u)";
TXT_vBoot2 = "Boot2 v%u"; TXT_vBoot2 = "Boot2 v%u";
TXT_NrOfTitles = "Es wurden %d Titel gefunden."; TXT_NrOfTitles = "Es wurden %d Titel gefunden.";
TXT_NrOfIOS = "Es wurden %d IOS gefunden, von denen %d funktionslos (Stub) sind."; TXT_NrOfIOS = "Es wurden %d IOS gefunden, von denen %d funktionslos (Stub) sind.";
@ -134,6 +134,7 @@ int initLanguages(struct tm today)
TXT_Hollywood = "Hollywood v0x%x"; TXT_Hollywood = "Hollywood v0x%x";
TXT_ConsoleID = "Identifiant de la console: %d"; TXT_ConsoleID = "Identifiant de la console: %d";
TXT_ConsoleType = "Type de Console: %s"; TXT_ConsoleType = "Type de Console: %s";
TXT_ShopCountry ="Pays de la chaîne boutique: %s (%u)";
TXT_vBoot2 = "Boot2 v%u"; TXT_vBoot2 = "Boot2 v%u";
TXT_NrOfTitles = "%d titres trouves."; TXT_NrOfTitles = "%d titres trouves.";
TXT_NrOfIOS = "%d IOS trouves sur cette console. %d sont des stubs."; TXT_NrOfIOS = "%d IOS trouves sur cette console. %d sont des stubs.";
@ -208,6 +209,7 @@ int initLanguages(struct tm today)
TXT_Hollywood = "Hollywood v0x%x"; TXT_Hollywood = "Hollywood v0x%x";
TXT_ConsoleID = "ID console: %d"; TXT_ConsoleID = "ID console: %d";
TXT_ConsoleType = "Tipo Console: %s"; TXT_ConsoleType = "Tipo Console: %s";
TXT_ShopCountry ="Paese canale Shop: %s (%u)";
TXT_vBoot2 = "Boot2 v%u"; TXT_vBoot2 = "Boot2 v%u";
TXT_NrOfTitles = "Trovati %d giochi."; TXT_NrOfTitles = "Trovati %d giochi.";
TXT_NrOfIOS = "Trovati %d IOS in questa console. %d di questi sono stub."; TXT_NrOfIOS = "Trovati %d IOS in questa console. %d di questi sono stub.";
@ -282,6 +284,7 @@ int initLanguages(struct tm today)
TXT_Hollywood = "Hollywood v0x%x"; TXT_Hollywood = "Hollywood v0x%x";
TXT_ConsoleID = "ID de consola: %d"; TXT_ConsoleID = "ID de consola: %d";
TXT_ConsoleType = "Tipo Consola: %s"; TXT_ConsoleType = "Tipo Consola: %s";
TXT_ShopCountry ="Canal Tienda Country: %s (%u)";
TXT_vBoot2 = "Boot2 v%u"; TXT_vBoot2 = "Boot2 v%u";
TXT_NrOfTitles = "Encontrados %d titulos."; TXT_NrOfTitles = "Encontrados %d titulos.";
TXT_NrOfIOS = "Se encontraron %d IOS en esta consola. %d de ellos son stubs."; TXT_NrOfIOS = "Se encontraron %d IOS en esta consola. %d de ellos son stubs.";
@ -356,6 +359,7 @@ int initLanguages(struct tm today)
TXT_Hollywood = "Hollywood v0x%x"; TXT_Hollywood = "Hollywood v0x%x";
TXT_ConsoleID = "Console ID: %d"; TXT_ConsoleID = "Console ID: %d";
TXT_ConsoleType = "Console Type: %s"; TXT_ConsoleType = "Console Type: %s";
TXT_ShopCountry =": %s (%u)";
TXT_vBoot2 = "Boot2 v%u"; TXT_vBoot2 = "Boot2 v%u";
TXT_NrOfTitles = "Found %d titles."; TXT_NrOfTitles = "Found %d titles.";
TXT_NrOfIOS = "Found %d IOS on this console. %d of them are stub."; TXT_NrOfIOS = "Found %d IOS on this console. %d of them are stub.";

View File

@ -13,8 +13,7 @@
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <ctype.h> #include <ctype.h>
#include "sys.h" #include "sys.h"
#include "video.h"
#include "SysMenuInfo.h" #include "SysMenuInfo.h"
#include "ticket_dat.h" #include "ticket_dat.h"

View File

@ -16,8 +16,7 @@
#include <runtimeiospatch/runtimeiospatch.h> #include <runtimeiospatch/runtimeiospatch.h>
#include "tmd_dat.h" #include "tmd_dat.h"
#include "sys.h" #include "sys.h"
#include "video.h"
#include "fatMounter.h" #include "fatMounter.h"
#include "languages.h" #include "languages.h"
#include "gui.h" #include "gui.h"
@ -1017,7 +1016,7 @@ int main(int argc, char **argv)
sprintf(ReportBuffer[HOLLYWOOD], TXT_Hollywood, *HOLLYWOOD_VERSION); sprintf(ReportBuffer[HOLLYWOOD], TXT_Hollywood, *HOLLYWOOD_VERSION);
sprintf(ReportBuffer[CONSOLE_ID], TXT_ConsoleID, SystemInfo.deviceID); sprintf(ReportBuffer[CONSOLE_ID], TXT_ConsoleID, SystemInfo.deviceID);
sprintf(ReportBuffer[CONSOLE_TYPE], TXT_ConsoleType, SystemInfo.deviceType ? "vWii" : "Wii"); sprintf(ReportBuffer[CONSOLE_TYPE], TXT_ConsoleType, SystemInfo.deviceType ? "vWii" : "Wii");
sprintf(ReportBuffer[COUNTRY], "Shop Channel Country: %s (%u)", (strlen(SystemInfo.country)) ? SystemInfo.country : TXT_Unknown, SystemInfo.shopcode); sprintf(ReportBuffer[COUNTRY], TXT_ShopCountry, (strlen(SystemInfo.country)) ? SystemInfo.country : TXT_Unknown, SystemInfo.shopcode);
sprintf(ReportBuffer[BOOT2_VERSION], TXT_vBoot2, SystemInfo.boot2version); sprintf(ReportBuffer[BOOT2_VERSION], TXT_vBoot2, SystemInfo.boot2version);
sprintf(ReportBuffer[NR_OF_TITLES], TXT_NrOfTitles, SystemInfo.countTitles); sprintf(ReportBuffer[NR_OF_TITLES], TXT_NrOfTitles, SystemInfo.countTitles);
sprintf(ReportBuffer[NR_OF_IOS], TXT_NrOfIOS, (SystemInfo.countIOS - SystemInfo.countBCMIOS), SystemInfo.countStubs); sprintf(ReportBuffer[NR_OF_IOS], TXT_NrOfIOS, (SystemInfo.countIOS - SystemInfo.countBCMIOS), SystemInfo.countStubs);

View File

@ -13,8 +13,7 @@
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <ctype.h> #include <ctype.h>
#include "sys.h" #include "sys.h"
#include "video.h"
#include "SysMenuInfo.h" #include "SysMenuInfo.h"
#include "ticket_dat.h" #include "ticket_dat.h"

View File

@ -13,8 +13,7 @@
#include <wiiuse/wpad.h> #include <wiiuse/wpad.h>
#include <ctype.h> #include <ctype.h>
#include "sys.h" #include "sys.h"
#include "video.h"
#include "SysMenuInfo.h" #include "SysMenuInfo.h"
#include "ticket_dat.h" #include "ticket_dat.h"

View File

@ -1,132 +0,0 @@
#include <stdio.h>
#include <ogcsys.h>
#include <string.h>
#include <gccore.h>
#include <malloc.h>
#include <wiilight.h>
#include "video.h"
static GXRModeObj *rmode = NULL;
static void *frontBuffer = NULL;
// Initialise video
void InitialiseVideo(void)
{
// Initialise the video system
VIDEO_Init();
// Get the preferred video mode from the system (corresponding to the settings in the Wii menu)
rmode = VIDEO_GetPreferredMode(NULL);
GX_AdjustForOverscan(rmode, rmode, 32, 24);
// Allocate memory for the display in the uncached region
frontBuffer = MEM_K0_TO_K1(SYS_AllocateFramebuffer(rmode));
// Initialise the console (required for printf)
console_init(frontBuffer, 20, 20, rmode->fbWidth, rmode->xfbHeight, rmode->fbWidth*VI_DISPLAY_PIX_SZ);
// Set up the video registers with the chosen mode
VIDEO_Configure(rmode);
// Now configure the FrameBuffer (display memory)
VIDEO_SetNextFramebuffer(frontBuffer);
// Make the display visible
VIDEO_SetBlack(FALSE);
// Flush the video register changes to the hardware
VIDEO_Flush();
// Wait for Video setup to complete
VIDEO_WaitVSync();
if(rmode->viTVMode&VI_NON_INTERLACE) VIDEO_WaitVSync();
}
// Set the console foreground color
void SetConsoleForegroundColor(u8 color, u8 bold)
{
printf("\x1b[%u;%um", color+30, bold);
fflush(stdout);
}
// Set the console background color
void SetConsoleBackgroundColor(u8 color, u8 bold)
{
printf("\x1b[%u;%um", color+40, bold);
fflush(stdout);
}
// Clears the console setting the background with the specified colour
// The console supports VT terminal escape codes
void ClearConsole(int backgroundCol)
{
printf("\x1b[4%im", backgroundCol);
printf("\x1b[2J");
fflush(stdout);
}
// Print text to the center of the screen
void PrintCenter(char *text, int width)
{
int textLen = strlen(text);
int leftPad = (width - textLen) / 2;
int rightPad = (width - textLen) - leftPad;
printf("%*s%s%*s", leftPad, " ", text, rightPad, " ");
}
// Print text
void PrintText(char *text, bool clear, bool border, bool center, int backgroundCol, int foregroundCol)
{
const int consoleLineLength = 72;
const int defaultBGColor = 0; // Black is the default background color
const int defaultFGColor = 7; // White is the default background color
// Clear the screen
if (clear) ClearConsole(backgroundCol);
// Set the console background and foreground color
SetConsoleBackgroundColor(backgroundCol, 0);
SetConsoleForegroundColor(foregroundCol, 0);
// Draw the upper border
if (border) printf("%*s", consoleLineLength, " ");
// Display the text
if (center)
PrintCenter(text, consoleLineLength);
else
printf(text);
// Draw the lower border
if (border) printf("%*s", consoleLineLength, " ");
// Set the console background and foreground default color
SetConsoleBackgroundColor(defaultBGColor, 0);
SetConsoleForegroundColor(defaultFGColor, 0);
fflush(stdout);
}
// Turn on/off the Wii Light
void WiiLightControl(int state)
{
switch (state)
{
case WIILIGHT_ON:
WIILIGHT_SetLevel(255);
WIILIGHT_TurnOn();
break;
case WIILIGHT_OFF:
default:
WIILIGHT_SetLevel(0);
WIILIGHT_TurnOn();
WIILIGHT_Toggle();
break;
}
}

View File

@ -1 +1 @@
<Project name="sysCheck"><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.c;*.cpp;*.h" name="source" path="source\"><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.c;*.cpp;*.h" name="gfx" path="gfx\"><File path="background.h"></File><File path="Checkicon.c"></File><File path="Checkicon.h"></File><File path="Deleteicon.c"></File><File path="Deleteicon.h"></File><File path="loadingbarblue.c"></File><File path="loadingbarblue.h"></File><File path="loadingbargrey.c"></File><File path="loadingbargrey.h"></File><File path="Refreshicon.c"></File><File path="Refreshicon.h"></File><File path="WiiButtonA.c"></File><File path="WiiButtonA.h"></File><File path="WiiButtonHome.c"></File><File path="WiiButtonHome.h"></File><File path="WiiButtonMinus.c"></File><File path="WiiButtonMinus.h"></File><File path="WiiButtonPlus.c"></File><File path="WiiButtonPlus.h"></File><File path="WiiDpadLeft.c"></File><File path="WiiDpadLeft.h"></File><File path="WiiDpadRight.c"></File><File path="WiiDpadRight.h"></File><File path="window.h"></File></MagicFolder><File path="fatMounter.c"></File><File path="gecko.c"></File><File path="gui.c"></File><File path="http.c"></File><File path="languages.c"></File><File path="mload.c"></File><File path="sha1.c"></File><File path="sys.c"></File><File path="sysCheck.c"></File><File path="title.c"></File><File path="update.c"></File><File path="video.c"></File><File path="wiibasics.c"></File></MagicFolder><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.h" name="include" path="include\"><File path="fatMounter.h"></File><File path="gecko.h"></File><File path="gui.h"></File><File path="http.h"></File><File path="languages.h"></File><File path="mload.h"></File><File path="sha1.h"></File><File path="sys.h"></File><File path="title.h"></File><File path="tmdIdentification.h"></File><File path="update.h"></File><File path="video.h"></File><File path="wiibasics.h"></File></MagicFolder><File path="Makefile"></File></Project> <Project name="sysCheck"><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.c;*.cpp;*.h" name="source" path="source\"><File path="fatMounter.c"></File><File path="gecko.c"></File><File path="gui.c"></File><File path="http.c"></File><File path="languages.c"></File><File path="mload.c"></File><File path="sha1.c"></File><File path="sys.c"></File><File path="sysCheck.c"></File><File path="SysMenuInfo.c"></File><File path="title.c"></File><File path="tools.c"></File><File path="update.c"></File><File path="upload.c"></File><File path="wiibasics.c"></File></MagicFolder><MagicFolder excludeFiles="*.pnproj;*.pnps;*.bak;*.tmp" excludeFolders="CVS;.svn" filter="*.h" name="include" path="include\"><File path="fatMounter.h"></File><File path="gecko.h"></File><File path="gui.h"></File><File path="http.h"></File><File path="languages.h"></File><File path="mload.h"></File><File path="sha1.h"></File><File path="sys.h"></File><File path="SysMenuInfo.h"></File><File path="title.h"></File><File path="tmdIdentification.h"></File><File path="update.h"></File><File path="wiibasics.h"></File></MagicFolder><File path="Makefile"></File></Project>