diff options
author | Nebuleon Fumika | 2013-02-11 18:27:49 -0500 |
---|---|---|
committer | Nebuleon Fumika | 2013-02-11 18:27:49 -0500 |
commit | 7a2bde06a1ddd5a5fbd37acb70c764163f228429 (patch) | |
tree | 4eedbb5826736640826458f6609bd2265d0ffde1 | |
parent | 2332157879353ec29c566a920ff541f445e358bf (diff) | |
download | snes9x2005-7a2bde06a1ddd5a5fbd37acb70c764163f228429.tar.gz snes9x2005-7a2bde06a1ddd5a5fbd37acb70c764163f228429.tar.bz2 snes9x2005-7a2bde06a1ddd5a5fbd37acb70c764163f228429.zip |
Language file adjustments and arrows for direction keys (*u, *d, *l, *r).
* All languages except Chinese: Remove redundancy in the New game menu. Remove "from the card".
* All languages except German and Chinese: Remove "games" in "recently played games". It's implied by the rest of the menu.
* Spanish: menu should be menú.
* All languages: modify keys in the screenshot slideshow message so that direction keys are arrows.
* Tools/Screenshots, English, French, Spanish: Stop implying that you can browse the screenshots; instead imply that it's a slideshow you control only sequentially.
* Dutch: Try to shorten "Ga terug naar het spel" so it can fit in a button, by removing the "Ga". It still splits.
-rw-r--r-- | CATSFC/system/language.msg | 116 | ||||
-rw-r--r-- | source/nds/gui.c | 88 |
2 files changed, 123 insertions, 81 deletions
diff --git a/CATSFC/system/language.msg b/CATSFC/system/language.msg index 1cccbeb..d17709a 100644 --- a/CATSFC/system/language.msg +++ b/CATSFC/system/language.msg @@ -21,6 +21,10 @@ STARTVERSION # *R (R shoulder button) a cut rectangle containing the letter R # *S (START button) a smaller ST # *s (SELECT button) a smaller SEL +# *u (Up direction) an arrow pointing upwards +# *d (Down direction) an arrow pointing downwards +# *l (Left direction) an arrow pointing to the left +# *r (Right direction) an arrow pointing to the right ENDVERSION ENDCOMMENT @@ -101,7 +105,7 @@ Version information #MSG_SCREENSHOT_CREATE Save a screenshot #MSG_SCREENSHOT_BROWSE -Browse screenshots +Screenshot slideshow #MSG_HOTKEY_MAIN_MENU Go to main menu #MSG_HOTKEY_TEMPORARY_FAST_FORWARD @@ -115,11 +119,11 @@ Press the buttons you wish to use to perform this action. #MSG_HOTKEY_CANCEL_WITH_B *B Cancel #MSG_LOAD_GAME_RECENTLY_PLAYED -Recently played games +Recently played... #MSG_LOAD_GAME_FROM_CARD -Select a game from the card +Select a game... #MSG_LOAD_GAME_MENU_TITLE -Select a game +New game #MSG_VIDEO_ASPECT_RATIO_0 [0] Entire screen #MSG_VIDEO_ASPECT_RATIO_1 @@ -211,17 +215,17 @@ Playing... #MSG_PAUSE_SLIDE Pause... #MSG_PLAY_SLIDE1 -Key UP Speed up +*u Speed up #MSG_PLAY_SLIDE2 -Key DOWN Slow down +*d Slow down #MSG_PLAY_SLIDE3 -Key LEFT Last image +*l Previous image #MSG_PLAY_SLIDE4 -Key RIGHT Next image +*r Next image #MSG_PLAY_SLIDE5 -Key A Pause +*A Pause #MSG_PLAY_SLIDE6 -Key B Return to the menu +*B Return to the menu #MSG_PROGRESS_LOADING_GAME Loading... #MSG_EMULATOR_NAME @@ -421,17 +425,17 @@ Press the buttons you wish to use to perform this action. #MSG_PAUSE_SLIDE 已暂停 #MSG_PLAY_SLIDE1 -按键 上 加快播放 +*u 加快播放 #MSG_PLAY_SLIDE2 -按键 下 减慢播放 +*d 减慢播放 #MSG_PLAY_SLIDE3 -按键 左 上一帧 +*l 上一帧 #MSG_PLAY_SLIDE4 -按键 右 下一帧 +*r 下一帧 #MSG_PLAY_SLIDE5 -按键 *A 暂停 +*A 暂停 #MSG_PLAY_SLIDE6 -按键 *B 返回菜单 +*B 返回菜单 #MSG_PROGRESS_LOADING_GAME 正在装载游戏... #MSG_EMULATOR_NAME @@ -521,7 +525,7 @@ Version #MSG_SCREENSHOT_CREATE Créer une capture d'écran #MSG_SCREENSHOT_BROWSE -Parcourir les captures d'écran +Diaporama de captures d'écran #MSG_HOTKEY_MAIN_MENU Menu principal #MSG_HOTKEY_TEMPORARY_FAST_FORWARD @@ -535,11 +539,11 @@ Appuyez sur les boutons que vous voulez utiliser pour effectuer cette action. #MSG_HOTKEY_CANCEL_WITH_B *B Annuler #MSG_LOAD_GAME_RECENTLY_PLAYED -Jeux joués récemment +Récemment joués... #MSG_LOAD_GAME_FROM_CARD -Sélectionner un jeu de la carte +Sélectionner un jeu... #MSG_LOAD_GAME_MENU_TITLE -Sélectionner un jeu +Nouveau jeu #MSG_VIDEO_ASPECT_RATIO_0 [0] Écran entier #MSG_VIDEO_ASPECT_RATIO_1 @@ -631,17 +635,17 @@ En cours... #MSG_PAUSE_SLIDE Pause... #MSG_PLAY_SLIDE1 -HAUT Accélérer +*u Accélérer #MSG_PLAY_SLIDE2 -BAS Ralentir +*d Ralentir #MSG_PLAY_SLIDE3 -GAUCHE Précédente +*l Précédente #MSG_PLAY_SLIDE4 -DROITE Suivante +*r Suivante #MSG_PLAY_SLIDE5 -*A Pause +*A Pause #MSG_PLAY_SLIDE6 -*B Retour au menu +*B Retour au menu #MSG_PROGRESS_LOADING_GAME Chargement... #MSG_EMULATOR_NAME @@ -746,11 +750,11 @@ Knöpfe für dieses Ereignis drücken. #MSG_HOTKEY_CANCEL_WITH_B *B Abbrechen #MSG_LOAD_GAME_RECENTLY_PLAYED -Zuletzt gespielt +Zuletzt gespielt... #MSG_LOAD_GAME_FROM_CARD -Wähle ein Spiel von der Karte aus -#MSG_LOAD_GAME_MENU_TITLE Wähle ein Spiel +#MSG_LOAD_GAME_MENU_TITLE +Neues Spiel #MSG_VIDEO_ASPECT_RATIO_0 [0] Vollbild #MSG_VIDEO_ASPECT_RATIO_1 @@ -842,17 +846,17 @@ Zeigen... #MSG_PAUSE_SLIDE Pause... #MSG_PLAY_SLIDE1 -Key UP Geschw. hoch +*u Geschw. hoch #MSG_PLAY_SLIDE2 -Key DOWN Geschw. runter +*d Geschw. runter #MSG_PLAY_SLIDE3 -Key LEFT Voriges Bild +*l Voriges Bild #MSG_PLAY_SLIDE4 -Key RIGHT Nächstes Bild +*r Nächstes Bild #MSG_PLAY_SLIDE5 -Key A Pause +*A Pause #MSG_PLAY_SLIDE6 -Key B Zurück zum Menü +*B Zurück zum Menü #MSG_PROGRESS_LOADING_GAME Laden... #MSG_EMULATOR_NAME @@ -871,7 +875,7 @@ STARTDUTCH #MSG_MAIN_MENU_NEW_GAME Nieuw spel #MSG_MAIN_MENU_RETURN_TO_GAME -Ga terug naar het spel +Terug naar het spel #MSG_MAIN_MENU_RESET_GAME Herstart spel #MSG_MAIN_MENU_VIDEO_AUDIO @@ -957,11 +961,11 @@ Druk op de gewenste knoppencombinatie. #MSG_HOTKEY_CANCEL_WITH_B *B Annuleren #MSG_LOAD_GAME_RECENTLY_PLAYED -Recent gespeelde spellen +Recent gespeelde... #MSG_LOAD_GAME_FROM_CARD -Selecteer een spel van de kaart +Selecteer een spel... #MSG_LOAD_GAME_MENU_TITLE -Selecteer een spel +Nieuw spel #MSG_VIDEO_ASPECT_RATIO_0 [0] Volledig scherm #MSG_VIDEO_ASPECT_RATIO_1 @@ -1053,17 +1057,17 @@ Aan het afspelen... #MSG_PAUSE_SLIDE Onderbreken... #MSG_PLAY_SLIDE1 -OMHOOG-toets Sneller +*u Sneller #MSG_PLAY_SLIDE2 -OMLAAG-toets Langzamer +*d Langzamer #MSG_PLAY_SLIDE3 -LINKS-toets Laatste afbeelding +*l Laatste afbeelding #MSG_PLAY_SLIDE4 -RECHTS-toets Volgende afbeelding +*r Volgende afbeelding #MSG_PLAY_SLIDE5 -A-toets Onderbreken +*A Onderbreken #MSG_PLAY_SLIDE6 -B-toets Terug naar het menu +*B Terug naar het menu #MSG_PROGRESS_LOADING_GAME Laden... #MSG_EMULATOR_NAME @@ -1154,7 +1158,7 @@ Información de versión #MSG_SCREENSHOT_CREATE Salvar captura #MSG_SCREENSHOT_BROWSE -Explorar capturas +Mostrar capturas #MSG_HOTKEY_MAIN_MENU Ir al menú principal #MSG_HOTKEY_TEMPORARY_FAST_FORWARD @@ -1168,11 +1172,11 @@ Presione la tecla para esta acción. #MSG_HOTKEY_CANCEL_WITH_B *B Cancelar #MSG_LOAD_GAME_RECENTLY_PLAYED -Juegos recientes +Recientemente jugados... #MSG_LOAD_GAME_FROM_CARD -Seleccionar un juego desde la tarjeta +Seleccionar un juego... #MSG_LOAD_GAME_MENU_TITLE -Seleccionar el juego +Nuevo juego #MSG_VIDEO_ASPECT_RATIO_0 [0] Pantalla completa #MSG_VIDEO_ASPECT_RATIO_1 @@ -1224,7 +1228,7 @@ No hay juego cargado #MSG_CHEAT_ELEMENT_NOT_LOADED <Vacío> #MSG_SAVESTATE_FULL -Posición actual en uso. ¿Sobreescribirla? + Posición actual en uso. ¿Sobreescribirla? #MSG_PROGRESS_SAVED_STATE_CREATING Salvando la partida... #MSG_PROGRESS_SAVED_STATE_CREATION_FAILED @@ -1264,17 +1268,17 @@ Ejecutando... #MSG_PAUSE_SLIDE Pausa... #MSG_PLAY_SLIDE1 -Tecla ^ Velocidad + +*u Velocidad + #MSG_PLAY_SLIDE2 -Tecla v Velocidad - +*d Velocidad - #MSG_PLAY_SLIDE3 -Tecla < Anterior +*l Anterior #MSG_PLAY_SLIDE4 -Tecla > Siguiente +*r Siguiente #MSG_PLAY_SLIDE5 -Tecla A Pausa +*A Pausa #MSG_PLAY_SLIDE6 -Tecla B Volver al menu +*B Volver al menú #MSG_PROGRESS_LOADING_GAME Cargando el juego... #MSG_EMULATOR_NAME diff --git a/source/nds/gui.c b/source/nds/gui.c index 32ceebd..e5486d8 100644 --- a/source/nds/gui.c +++ b/source/nds/gui.c @@ -99,6 +99,11 @@ const uint8 HOTKEY_L_DISPLAY[] = {0xD7, 0x8C, 0x00}; const uint8 HOTKEY_R_DISPLAY[] = {0xD7, 0x8D, 0x00}; const uint8 HOTKEY_START_DISPLAY[] = {0xD7, 0x8E, 0x00}; const uint8 HOTKEY_SELECT_DISPLAY[] = {0xD7, 0x8F, 0x00}; +// These are U+2190 and subsequent codepoints encoded in UTF-8. +const uint8 DIRECTION_LEFT_DISPLAY[] = {0xE2, 0x86, 0x90, 0x00}; +const uint8 DIRECTION_UP_DISPLAY[] = {0xE2, 0x86, 0x91, 0x00}; +const uint8 DIRECTION_RIGHT_DISPLAY[] = {0xE2, 0x86, 0x92, 0x00}; +const uint8 DIRECTION_DOWN_DISPLAY[] = {0xE2, 0x86, 0x93, 0x00}; #define MAKE_MENU(name, init_function, passive_function, key_function, end_function, \ focus_option, screen_focus) \ @@ -4171,59 +4176,92 @@ int load_language_msg(char *filename, u32 language) // Replace key definitions (*letter) with Pictochat icons // while copying. - unsigned int curChar; - for (curChar = 0; curChar < len; curChar++) + unsigned int srcChar, dstLen = 0; + for (srcChar = 0; srcChar < len; srcChar++) { - if (pt[curChar] == '*') + if (pt[srcChar] == '*') { - switch (pt[curChar + 1]) + switch (pt[srcChar + 1]) { case 'A': - memcpy(&dst[curChar], HOTKEY_A_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_A_DISPLAY, sizeof (HOTKEY_A_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_A_DISPLAY) - 1; break; case 'B': - memcpy(&dst[curChar], HOTKEY_B_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_B_DISPLAY, sizeof (HOTKEY_B_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_B_DISPLAY) - 1; break; case 'X': - memcpy(&dst[curChar], HOTKEY_X_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_X_DISPLAY, sizeof (HOTKEY_X_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_X_DISPLAY) - 1; break; case 'Y': - memcpy(&dst[curChar], HOTKEY_Y_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_Y_DISPLAY, sizeof (HOTKEY_Y_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_Y_DISPLAY) - 1; break; case 'L': - memcpy(&dst[curChar], HOTKEY_L_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_L_DISPLAY, sizeof (HOTKEY_L_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_L_DISPLAY) - 1; break; case 'R': - memcpy(&dst[curChar], HOTKEY_R_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_R_DISPLAY, sizeof (HOTKEY_R_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_R_DISPLAY) - 1; break; case 'S': - memcpy(&dst[curChar], HOTKEY_START_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_START_DISPLAY, sizeof (HOTKEY_START_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_START_DISPLAY) - 1; break; case 's': - memcpy(&dst[curChar], HOTKEY_SELECT_DISPLAY, 2); - curChar++; + memcpy(&dst[dstLen], HOTKEY_SELECT_DISPLAY, sizeof (HOTKEY_SELECT_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (HOTKEY_SELECT_DISPLAY) - 1; + break; + case 'u': + memcpy(&dst[dstLen], DIRECTION_UP_DISPLAY, sizeof (DIRECTION_UP_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (DIRECTION_UP_DISPLAY) - 1; + break; + case 'd': + memcpy(&dst[dstLen], DIRECTION_DOWN_DISPLAY, sizeof (DIRECTION_DOWN_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (DIRECTION_DOWN_DISPLAY) - 1; + break; + case 'l': + memcpy(&dst[dstLen], DIRECTION_LEFT_DISPLAY, sizeof (DIRECTION_LEFT_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (DIRECTION_LEFT_DISPLAY) - 1; + break; + case 'r': + memcpy(&dst[dstLen], DIRECTION_RIGHT_DISPLAY, sizeof (DIRECTION_RIGHT_DISPLAY) - 1); + srcChar++; + dstLen += sizeof (DIRECTION_RIGHT_DISPLAY) - 1; break; case '\0': - dst[curChar] = pt[curChar]; + dst[dstLen] = pt[srcChar]; + dstLen++; break; default: - memcpy(&dst[curChar], &pt[curChar], 2); - curChar++; + memcpy(&dst[dstLen], &pt[srcChar], 2); + srcChar++; + dstLen += 2; break; } } else - dst[curChar] = pt[curChar]; + { + dst[dstLen] = pt[srcChar]; + dstLen++; + } } - dst += len; + dst += dstLen; //at a line return, when "\n" paded, this message not end if(*(dst-1) == 0x0A) { |