-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGameLanguage.h
127 lines (110 loc) · 7.28 KB
/
GameLanguage.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
#ifndef GAMELANGUAGE_H_INCLUDED
#define GAMELANGUAGE_H_INCLUDED
#include "../../isEngine/system/function/GameKeyName.h"
/*
* This file allows you to define the languages you want to use in the game.
* To use a language you must define a array. the first index represents the first language
* (e.g lang_array[0] => eng) and the index following its translation (e.g lang_array[1] => fr).
*
* example to display several sentences in the dialog manager.
* lang_array[] = {"eng 1", "translation fr 1", "eng 2", "translation fr 2", ...};
* (Go to the GameDialog Class to see how we implement languages to make sentences in dialogs)
*/
namespace is
{
//////////////////////////////////////////////////////
/// \brief Access to content that allows internationalization of the game
///
//////////////////////////////////////////////////////
namespace lang
{
////////////////////////////////////////////////////////////
/// \brief Represent the index of each language
///
////////////////////////////////////////////////////////////
enum GameLanguage
{
ENGLISH, ///< English language index
FRANCAIS, ///< French language index
};
// ------------------------ message box answer ------------------------
static std::string pad_answer_ok[] = {"OK", "OK"};
static std::string pad_answer_yes[] = {"YES", "OUI"};
static std::string pad_answer_no[] = {"NO", "NON"};
// ------------------------ intro ------------------------
static std::string pad_game_language[] = {"English", "French"};
// ------------------------ menu ------------------------
static std::string pad_main_menu[] = {"Main Menu", "Menu Principal"};
static std::wstring msg_erase_data[] = {L"Erase previous data and start\nnew game?",
L"Effacer les données en cours \net démarrer un nouveau jeu?"};
static std::string pad_new_game[] = {"Start Game", "Nouvelle Partie"};
static std::string pad_continue_game[] = {"Continue Game", "Continuer le Jeu"};
static std::wstring pad_controller[] = {L"Controller", L"Contrôleur"};
static std::string opt_enable_sound[] = {"Enable SOUND : YES", "Activer SON : OUI"};
static std::string opt_disable_sound[] = {"Enable SOUND : NO", "Activer SON : NON"};
static std::string opt_enable_music[] = {"Enable MUSIC : YES", "Activer MUSIQUE : OUI"};
static std::string opt_disable_music[] = {"Enable MUSIC : NO", "Activer MUSIQUE : NON"};
static std::string opt_enable_vibrate[] = {"Enable VIBRATE : YES", "Activer VIBREUR : OUI"};
static std::string opt_disable_vibrate[] = {"Enable VIBRATE : NO", "Activer VIBREUR : NON"};
static std::string opt_game_lang[] = {"Game Language : ENGLISH", "Langue du Jeu : FRANCAIS"};
static std::string msg_quit_game[] = {"Quit game?", "Quitter le jeu?"};
static std::string msg_controller_opt_error[] = {"Only for Android!", "Uniquement pour Android!"};
static std::wstring msg_permute_AB[] = {L"Permute ", L"Permuter "};
static std::wstring msg_how_move_control[] = {L"Press a controller to change its position",
L"Appuyez sur un contrôleur pour changer sa position"};
// ------------------------ level dialog ------------------------
static std::string pad_dialog_skip[] = {"Skip", "Passer"};
/*
* The message changes depending on the operating system.
* On Android we just display LEFT, UP, RIGHT, DOWN, A, B in the messages
* as the key to use to control the player.
* On windows or Linux, the names of the keyboard keys to be used to control
* the player are displayed because they can change according to the values
* defined in the GameConfig.cpp file.
*/
#if defined(__ANDROID__)
static std::wstring dialog_player_move[] = {L"Press LEFT or RIGHT to move.\n"
"Press A to jump and B to run.",
L"Appuie sur GAUCHE ou DROITE pour te déplacer.\n"
"Appuie sur A pour sauter et B pour courir."};
#else
static std::wstring dialog_player_move[] = {L"Press " + is::getKeyWName(is::GameConfig::KEY_LEFT) + L" or " +
is::getKeyWName(is::GameConfig::KEY_RIGHT) + L" to move.\n"
"Press " + is::getKeyWName(is::GameConfig::KEY_A) + L" to jump and " +
is::getKeyWName(is::GameConfig::KEY_B) + L" to run.",
L"Appuie sur " + is::getKeyWName(is::GameConfig::KEY_LEFT) + L" ou " +
is::getKeyWName(is::GameConfig::KEY_RIGHT) + L" pour te déplacer.\n"
"Appuie sur " + is::getKeyWName(is::GameConfig::KEY_A) + L" pour sauter et " +
is::getKeyWName(is::GameConfig::KEY_B) + L" pour courir."};
#endif // defined
// ------------------------ menu pause ------------------------
static std::string msg_pause_restart[] = {"Restart Game?\n(The current game will be lost)",
"Recommencer la partie?\n(La partie en cours sera perdue)"};
static std::string msg_pause_quit[] = {"Quit Game?\n(The current game will be lost)",
"Quitter la partie?\n(La partie en cours sera perdue)"};
static std::string pad_restart_game[] = {"Restart Game", "Recommencer"};
static std::string pad_quit_game[] = {"Quit Game", "Quitter le Jeu"};
// ------------------------ game over ------------------------
static std::wstring game_over[] = {L"Game Over", L"Partie Terminée"};
// ------------------------ game end ------------------------
static std::wstring end_msg_congrat[] = {L"Congratulation", L"Félicitation"};
static std::wstring end_msg_sentences[] = {L"End of the Demo, Thanks for playing.\n"
"\nYou want more levels?\n"
"Well, we have some good news for you!\n"
"You have the possibility to add your own levels in the game\n"
"thanks to its level editor.\n"
"Go ahead and let us discover your creativity!\n"
"Make 35 years of Super Mario Bros unforgettable!\n"
"We are counting on you!",
L"Fin de la Démo.\n\n"
"Vous voulez plus de niveaux?\n"
"Et bien, nous avons une bonne nouvelle pour vous!\n"
"Vous avez la possibilité d'ajouter vos propres niveaux dans\n"
"le jeu grâce à son éditeur de niveau.\n"
"Lancez-vous et faite nous découvrir votre créativité!\n"
"Faite que ces 35 ans de Super Mario Bros soit inoubliable!\n"
"Nous comptons sur vous!"};
static std::wstring end_msg_lvl_editor[] = {L"Click here to access the editor.", L"Cliquez ici (éditeur du jeu)."};
}
}
#endif // GAMELANGUAGE_H_INCLUDED