#include "resources.h"
#include "background.h"
#include "tilemap.h"
+#include "gettext.h"
GameSession* GameSession::current_ = 0;
LAYER_FOREGROUND1);
context.draw_text_center(white_small_text,
- std::string("by ") + level->get_author(),
+ std::string(_("by ")) + level->get_author(),
Vector(0, 400), LAYER_FOREGROUND1);
context.do_drawing();
context->draw_filled_rect(
Vector(0,0), Vector(screen->w, screen->h),
Color(rand() % 50, rand() % 50, rand() % 50, 128), LAYER_FOREGROUND1);
- context->draw_text_center(blue_text, "PAUSE - Press 'P' To Play",
+ context->draw_text_center(blue_text, _("PAUSE - Press 'P' To Play"),
Vector(0, 230), LAYER_FOREGROUND1+2);
}
char str[60];
snprintf(str, 60, "%d", player_status.score);
- context.draw_text(white_text, "SCORE", Vector(0, 0), LAYER_FOREGROUND1);
+ context.draw_text(white_text, _("SCORE"), Vector(0, 0), LAYER_FOREGROUND1);
context.draw_text(gold_text, str, Vector(96, 0), LAYER_FOREGROUND1);
if(st_gl_mode == ST_GL_TEST)
{
- context.draw_text(white_text, "Press ESC To Return", Vector(0,20),
+ context.draw_text(white_text, _("Press ESC To Return"), Vector(0,20),
LAYER_FOREGROUND1);
}
if(!time_left.check()) {
- context.draw_text_center(white_text, "TIME's UP", Vector(0, 0),
+ context.draw_text_center(white_text, _("TIME's UP"), Vector(0, 0),
LAYER_FOREGROUND1);
} else if (time_left.get_left() > TIME_WARNING || (global_frame_counter % 10) < 5) {
sprintf(str, "%d", time_left.get_left() / 1000 );
- context.draw_text_center(white_text, "TIME",
+ context.draw_text_center(white_text, _("TIME"),
Vector(0, 0), LAYER_FOREGROUND1);
context.draw_text_center(gold_text, str,
Vector(4*16, 0), LAYER_FOREGROUND1);
}
sprintf(str, "%d", player_status.distros);
- context.draw_text(white_text, "COINS",
- Vector(screen->w - white_text->get_text_width("COINS "), 0),
+ context.draw_text(white_text, _("COINS"),
+ Vector(screen->w - white_text->get_text_width(_("COINS"))+white_text->get_text_width(str), 0),
LAYER_FOREGROUND1);
context.draw_text(gold_text, str,
Vector(screen->w - gold_text->get_text_width("99"), 0),LAYER_FOREGROUND1);
- context.draw_text(white_text, "LIVES",
- Vector(screen->w - white_text->get_text_width("LIVES "), 20),
+ context.draw_text(white_text, _("LIVES"),
+ Vector(screen->w - white_text->get_text_width(_("LIVES"))+white_text->get_text_width(str), 20),
LAYER_FOREGROUND1);
if (player_status.lives >= 5)
{
DrawingContext context;
currentsector->background->draw(context);
- context.draw_text_center(blue_text, "Result:", Vector(0, 200),
+ context.draw_text_center(blue_text, _("Result:"), Vector(0, 200),
LAYER_FOREGROUND1);
- sprintf(str, "SCORE: %d", player_status.score);
+ sprintf(str, _("SCORE: %d"), player_status.score);
context.draw_text_center(gold_text, str, Vector(0, 224), LAYER_FOREGROUND1);
- sprintf(str, "COINS: %d", player_status.distros);
+ sprintf(str, _("COINS: %d"), player_status.distros);
context.draw_text_center(gold_text, str, Vector(0, 256), LAYER_FOREGROUND1);
context.do_drawing();
if (!title.empty())
snprintf(tmp,1024,"Slot %d - %s",slot, title.c_str());
else
- snprintf(tmp, 1024,"Slot %d - Savegame",slot);
+ snprintf(tmp, 1024,_("Slot %d - Savegame"),slot);
}
else
- sprintf(tmp,"Slot %d - Free",slot);
+ sprintf(tmp,_("Slot %d - Free"),slot);
return tmp;
}
main_menu->additem(MN_ACTION, _("Credits"),0,0, MNID_CREDITS);
main_menu->additem(MN_ACTION, _("Quit"),0,0, MNID_QUITMAINMENU);
- options_menu->additem(MN_LABEL,"Options",0,0);
+ options_menu->additem(MN_LABEL,_("Options"),0,0);
options_menu->additem(MN_HL,"",0,0);
#ifndef NOOPENGL
options_menu->additem(MN_TOGGLE,"OpenGL",use_gl,0, MNID_OPENGL);
#else
- options_menu->additem(MN_DEACTIVE,"OpenGL (not supported)",use_gl, 0, MNID_OPENGL);
+ options_menu->additem(MN_DEACTIVE,_("OpenGL (not supported)"),use_gl, 0, MNID_OPENGL);
#endif
- options_menu->additem(MN_TOGGLE,"Fullscreen",use_fullscreen,0, MNID_FULLSCREEN);
+ options_menu->additem(MN_TOGGLE,_("Fullscreen"),use_fullscreen,0, MNID_FULLSCREEN);
if(audio_device)
{
- options_menu->additem(MN_TOGGLE,"Sound ", use_sound,0, MNID_SOUND);
- options_menu->additem(MN_TOGGLE,"Music ", use_music,0, MNID_MUSIC);
+ options_menu->additem(MN_TOGGLE,_("Sound "), use_sound,0, MNID_SOUND);
+ options_menu->additem(MN_TOGGLE,_("Music "), use_music,0, MNID_MUSIC);
}
else
{
- options_menu->additem(MN_DEACTIVE,"Sound ", false,0, MNID_SOUND);
- options_menu->additem(MN_DEACTIVE,"Music ", false,0, MNID_MUSIC);
+ options_menu->additem(MN_DEACTIVE,_("Sound "), false,0, MNID_SOUND);
+ options_menu->additem(MN_DEACTIVE,_("Music "), false,0, MNID_MUSIC);
}
- options_menu->additem(MN_TOGGLE,"Show FPS ",show_fps,0, MNID_SHOWFPS);
- options_menu->additem(MN_GOTO,"Keyboard Setup",0,options_keys_menu);
+ options_menu->additem(MN_TOGGLE,_("Show FPS "),show_fps,0, MNID_SHOWFPS);
+ options_menu->additem(MN_GOTO,_("Keyboard Setup"),0,options_keys_menu);
if(use_joystick)
- options_menu->additem(MN_GOTO,"Joystick Setup",0,options_joystick_menu);
+ options_menu->additem(MN_GOTO,_("Joystick Setup"),0,options_joystick_menu);
options_menu->additem(MN_HL,"",0,0);
- options_menu->additem(MN_BACK,"Back",0,0);
+ options_menu->additem(MN_BACK,_("Back"),0,0);
- options_keys_menu->additem(MN_LABEL,"Key Setup",0,0);
+ options_keys_menu->additem(MN_LABEL,_("Key Setup"),0,0);
options_keys_menu->additem(MN_HL,"",0,0);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,"Left move", 0,0, 0,&keymap.left);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,"Right move", 0,0, 0,&keymap.right);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,"Jump", 0,0, 0,&keymap.jump);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,"Duck", 0,0, 0,&keymap.duck);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,"Activate", 0, 0, 0,
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Left move"), 0,0, 0,&keymap.left);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Right move"), 0,0, 0,&keymap.right);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Jump"), 0,0, 0,&keymap.jump);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Duck"), 0,0, 0,&keymap.duck);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Activate"), 0, 0, 0,
&keymap.activate);
- options_keys_menu->additem(MN_CONTROLFIELD_KB,"Power/Run", 0,0, 0,&keymap.fire);
+ options_keys_menu->additem(MN_CONTROLFIELD_KB,_("Power/Run"), 0,0, 0,&keymap.fire);
options_keys_menu->additem(MN_HL,"",0,0);
- options_keys_menu->additem(MN_BACK,"Back",0,0);
+ options_keys_menu->additem(MN_BACK,_("Back"),0,0);
if(use_joystick)
{
- options_joystick_menu->additem(MN_LABEL,"Joystick Setup",0,0);
+ options_joystick_menu->additem(MN_LABEL,_("Joystick Setup"),0,0);
options_joystick_menu->additem(MN_HL,"",0,0);
//options_joystick_menu->additem(MN_CONTROLFIELD_JS,"X axis", 0,0, 0,&joystick_keymap.x_axis);
//options_joystick_menu->additem(MN_CONTROLFIELD_JS,"Y axis", 0,0, 0,&joystick_keymap.y_axis);
- options_joystick_menu->additem(MN_CONTROLFIELD_JS,"A button", 0,0, 0,&joystick_keymap.a_button);
- options_joystick_menu->additem(MN_CONTROLFIELD_JS,"B button", 0,0, 0,&joystick_keymap.b_button);
+ options_joystick_menu->additem(MN_CONTROLFIELD_JS,_("A button"), 0,0, 0,&joystick_keymap.a_button);
+ options_joystick_menu->additem(MN_CONTROLFIELD_JS,_("B button"), 0,0, 0,&joystick_keymap.b_button);
//options_joystick_menu->additem(MN_CONTROLFIELD_JS,"Start", 0,0, 0,&joystick_keymap.start_button);
//options_joystick_menu->additem(MN_CONTROLFIELD_JS,"DeadZone", 0,0, 0,&joystick_keymap.dead_zone);
options_joystick_menu->additem(MN_HL,"",0,0);
- options_joystick_menu->additem(MN_BACK,"Back",0,0);
+ options_joystick_menu->additem(MN_BACK,_("Back"),0,0);
}
- load_game_menu->additem(MN_LABEL,"Start Game",0,0);
+ load_game_menu->additem(MN_LABEL,_("Start Game"),0,0);
load_game_menu->additem(MN_HL,"",0,0);
load_game_menu->additem(MN_DEACTIVE,"Slot 1",0,0, 1);
load_game_menu->additem(MN_DEACTIVE,"Slot 2",0,0, 2);
load_game_menu->additem(MN_DEACTIVE,"Slot 4",0,0, 4);
load_game_menu->additem(MN_DEACTIVE,"Slot 5",0,0, 5);
load_game_menu->additem(MN_HL,"",0,0);
- load_game_menu->additem(MN_BACK,"Back",0,0);
+ load_game_menu->additem(MN_BACK,_("Back"),0,0);
- save_game_menu->additem(MN_LABEL,"Save Game",0,0);
+ save_game_menu->additem(MN_LABEL,_("Save Game"),0,0);
save_game_menu->additem(MN_HL,"",0,0);
save_game_menu->additem(MN_DEACTIVE,"Slot 1",0,0, 1);
save_game_menu->additem(MN_DEACTIVE,"Slot 2",0,0, 2);
save_game_menu->additem(MN_HL,"",0,0);
save_game_menu->additem(MN_BACK,"Back",0,0);
- game_menu->additem(MN_LABEL,"Pause",0,0);
+ game_menu->additem(MN_LABEL,_("Pause"),0,0);
game_menu->additem(MN_HL,"",0,0);
- game_menu->additem(MN_ACTION,"Continue",0,0,MNID_CONTINUE);
- game_menu->additem(MN_GOTO,"Options",0,options_menu);
+ game_menu->additem(MN_ACTION,_("Continue"),0,0,MNID_CONTINUE);
+ game_menu->additem(MN_GOTO,_("Options"),0,options_menu);
game_menu->additem(MN_HL,"",0,0);
- game_menu->additem(MN_ACTION,"Abort Level",0,0,MNID_ABORTLEVEL);
+ game_menu->additem(MN_ACTION,_("Abort Level"),0,0,MNID_ABORTLEVEL);
- worldmap_menu->additem(MN_LABEL,"Pause",0,0);
+ worldmap_menu->additem(MN_LABEL,_("Pause"),0,0);
worldmap_menu->additem(MN_HL,"",0,0);
- worldmap_menu->additem(MN_ACTION,"Continue",0,0,MNID_RETURNWORLDMAP);
- worldmap_menu->additem(MN_GOTO,"Options",0,options_menu);
+ worldmap_menu->additem(MN_ACTION,_("Continue"),0,0,MNID_RETURNWORLDMAP);
+ worldmap_menu->additem(MN_GOTO,_("Options"),0,options_menu);
worldmap_menu->additem(MN_HL,"",0,0);
- worldmap_menu->additem(MN_ACTION,"Quit Game",0,0,MNID_QUITWORLDMAP);
+ worldmap_menu->additem(MN_ACTION,_("Quit Game"),0,0,MNID_QUITWORLDMAP);
- highscore_menu->additem(MN_TEXTFIELD,"Enter your name:",0,0);
+ highscore_menu->additem(MN_TEXTFIELD,_("Enter your name:"),0,0);
}
void update_load_save_game_menu(Menu* pmenu)
#include "worldmap.h"
#include "sound_manager.h"
#include "resources.h"
+#include "gettext.h"
namespace WorldMapNS {
context.draw_gradient(Color (0, 255, 0), Color (255, 0, 255),
LAYER_BACKGROUND0);
- context.draw_text_center(blue_text, "GAMEOVER",
+ context.draw_text_center(blue_text, _("GAMEOVER"),
Vector(0, 200), LAYER_FOREGROUND1);
- sprintf(str, "SCORE: %d", player_status.score);
+ sprintf(str, _("SCORE: %d"), player_status.score);
context.draw_text_center(gold_text, str,
Vector(0, 224), LAYER_FOREGROUND1);
- sprintf(str, "COINS: %d", player_status.distros);
+ sprintf(str, _("COINS: %d"), player_status.distros);
context.draw_text_center(gold_text, str,
Vector(0, screen->w - 32), LAYER_FOREGROUND1);
char str[80];
sprintf(str, "%d", player_status.score);
- context.draw_text(white_text, "SCORE", Vector(0, 0), LAYER_FOREGROUND1);
+ context.draw_text(white_text, _("SCORE"), Vector(0, 0), LAYER_FOREGROUND1);
context.draw_text(gold_text, str, Vector(96, 0), LAYER_FOREGROUND1);
sprintf(str, "%d", player_status.distros);
- context.draw_text(white_text, "COINS", Vector(screen->w/2 - 16*5, 0),
+ context.draw_text(white_text, _("COINS"), Vector(screen->w/2 - 16*5, 0),
LAYER_FOREGROUND1);
context.draw_text(gold_text, str, Vector(screen->w/2 + (16*5)/2, 0),
LAYER_FOREGROUND1);
- context.draw_text(white_text, "LIVES",
- Vector(screen->w - white_text->get_text_width("LIVES")*2, 0),
+ context.draw_text(white_text, _("LIVES"),
+ Vector(screen->w - white_text->get_text_width(_("LIVES"))*2, 0),
LAYER_FOREGROUND1);
if (player_status.lives >= 5)
{