pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r2514 - in trunk: data/levels/volcano src src/worldmap


From: jave27
Subject: [Pingus-CVS] r2514 - in trunk: data/levels/volcano src src/worldmap
Date: Mon, 21 Nov 2005 20:53:46 +0100

Author: jave27
Date: 2005-11-21 20:53:35 +0100 (Mon, 21 Nov 2005)
New Revision: 2514

Modified:
   trunk/data/levels/volcano/hellmouth10-grumbel.pingus
   trunk/data/levels/volcano/hellmouth12-grumbel.pingus
   trunk/data/levels/volcano/hellmouth3-grumbel.pingus
   trunk/data/levels/volcano/hellmouth4-grumbel.pingus
   trunk/src/level_desc.cxx
   trunk/src/result_screen.cxx
   trunk/src/start_screen.cxx
   trunk/src/system.cxx
   trunk/src/theme.cxx
   trunk/src/worldmap/level_dot.cxx
   trunk/src/worldmap/worldmap.cxx
Log:
Replaced all System::translate() calls with calls to the tinygettext _() 
function instead.
Made the exit visible in a few more volcano levels.
Still TODO: Create .po files for each worldmap folder for new translations, and 
read them in when loading the worldmap.

Modified: trunk/data/levels/volcano/hellmouth10-grumbel.pingus
===================================================================
--- trunk/data/levels/volcano/hellmouth10-grumbel.pingus        2005-11-19 
02:15:24 UTC (rev 2513)
+++ trunk/data/levels/volcano/hellmouth10-grumbel.pingus        2005-11-21 
19:53:35 UTC (rev 2514)
@@ -916,8 +916,8 @@
 <owner-id>0</owner-id>
 <position>
 <x>706</x>
-<y>977</y>
-<z>-5</z>
+<y>974</y>
+<z>0</z>
 </position>
 <surface>
 <image>exits/stone</image>

Modified: trunk/data/levels/volcano/hellmouth12-grumbel.pingus
===================================================================
--- trunk/data/levels/volcano/hellmouth12-grumbel.pingus        2005-11-19 
02:15:24 UTC (rev 2513)
+++ trunk/data/levels/volcano/hellmouth12-grumbel.pingus        2005-11-21 
19:53:35 UTC (rev 2514)
@@ -77,7 +77,7 @@
 <position>
 <x>648</x>
 <y>828</y>
-<z>-5</z>
+<z>0</z>
 </position>
 <surface>
 <image>exits/stone</image>

Modified: trunk/data/levels/volcano/hellmouth3-grumbel.pingus
===================================================================
--- trunk/data/levels/volcano/hellmouth3-grumbel.pingus 2005-11-19 02:15:24 UTC 
(rev 2513)
+++ trunk/data/levels/volcano/hellmouth3-grumbel.pingus 2005-11-21 19:53:35 UTC 
(rev 2514)
@@ -100,7 +100,7 @@
 <position>
 <x>576</x>
 <y>369</y>
-<z>-50</z>
+<z>0</z>
 </position>
 <surface>
 <image>exits/stone</image>

Modified: trunk/data/levels/volcano/hellmouth4-grumbel.pingus
===================================================================
--- trunk/data/levels/volcano/hellmouth4-grumbel.pingus 2005-11-19 02:15:24 UTC 
(rev 2513)
+++ trunk/data/levels/volcano/hellmouth4-grumbel.pingus 2005-11-21 19:53:35 UTC 
(rev 2514)
@@ -576,7 +576,7 @@
 <position>
 <x>187</x>
 <y>559</y>
-<z>-5</z>
+<z>0</z>
 </position>
 <surface>
 <image>exits/stone</image>

Modified: trunk/src/level_desc.cxx
===================================================================
--- trunk/src/level_desc.cxx    2005-11-19 02:15:24 UTC (rev 2513)
+++ trunk/src/level_desc.cxx    2005-11-21 19:53:35 UTC (rev 2514)
@@ -38,8 +38,8 @@
   title      = Fonts::pingus_large;
 
   description.set_font(font);
-  description.set_text(System::translate(plf->get_description()), 350);
-  levelname = System::translate(plf->get_levelname());
+  description.set_text(_(plf->get_description()), 350);
+  levelname = _(plf->get_levelname());
 }
 
 void

Modified: trunk/src/result_screen.cxx
===================================================================
--- trunk/src/result_screen.cxx 2005-11-19 02:15:24 UTC (rev 2513)
+++ trunk/src/result_screen.cxx 2005-11-21 19:53:35 UTC (rev 2514)
@@ -94,7 +94,7 @@
 
   void draw(DrawingContext& gc) {
     SurfaceButton::draw(gc);
-    gc.print_center(Fonts::chalk_normal, x_pos + 55, y_pos, _("Abort"));
+    gc.print_center(Fonts::chalk_normal, (float)x_pos + 55, (float)y_pos, 
_("Abort"));
   }
 
   void on_click() {
@@ -160,22 +160,23 @@
 
   if (!result.success())
     gc.print_right(Fonts::chalk_normal,
-                   CL_Display::get_width()/2 + 275,
-                   CL_Display::get_height()/2 + 110, _("Retry"));
+                   (float)CL_Display::get_width()/2 + 275,
+                   (float)CL_Display::get_height()/2 + 110, _("Retry"));
 
-  gc.print_center(Fonts::chalk_large, gc.get_width()/2, 
CL_Display::get_height()/2 - 200,
-                  System::translate(result.plf.get_levelname()));
+  gc.print_center(Fonts::chalk_large, gc.get_width()/2, 
+                                                                       
(float)CL_Display::get_height()/2 - 200,
+                  _(result.plf.get_levelname()));
 
   if (result.success())
     {
       gc.print_center(Fonts::chalk_large, gc.get_width()/2,
-                      CL_Display::get_height()/2 - 140, _("Success!"));
+                      (float)CL_Display::get_height()/2 - 140, _("Success!"));
       /*gc.print_center(Fonts::pingus_small, gc.get_width()/2, 
gc.get_height()-30,
         "..:: Press Space to continue ::..");*/
     }
   else
     {
-      gc.print_center(Fonts::chalk_large, gc.get_width()/2, 
CL_Display::get_height()/2 - 140,
+      gc.print_center(Fonts::chalk_large, gc.get_width()/2, 
(float)CL_Display::get_height()/2 - 140,
                       _("Failure!"));
       /*gc.print_center(Fonts::pingus_normal, gc.get_width()/2, 
gc.get_height()-30,
                       "..:: Press Space to retry the level ::..");*/
@@ -213,7 +214,7 @@
         message = _("Better luck next time!");
     }
   gc.print_center(Fonts::chalk_normal, gc.get_width()/2,
-                  CL_Display::get_height()/2 - 70, message);
+                  (float)CL_Display::get_height()/2 - 70, message);
 
 
 #if 0
@@ -226,16 +227,16 @@
   int right_x = CL_Display::get_width()/2 + 100;
   int y = CL_Display::get_height()/2 + 10;
 
-  gc.print_left(Fonts::chalk_normal,  left_x,  y, _("Saved: "));
-  gc.print_right(Fonts::chalk_normal, right_x, y, CL_String::to(result.saved)
+  gc.print_left(Fonts::chalk_normal,  (float)left_x,  (float)y, _("Saved: "));
+  gc.print_right(Fonts::chalk_normal, (float)right_x, (float)y, 
CL_String::to(result.saved)
                  + "/" + CL_String::to(result.needed));;
 
-  gc.print_left(Fonts::chalk_normal,  left_x,  y+=30, _("Died: "));
-  gc.print_right(Fonts::chalk_normal, right_x, y, 
CL_String::to(result.killed));
+  gc.print_left(Fonts::chalk_normal,  (float)left_x,  (float)(y+=30), _("Died: 
"));
+  gc.print_right(Fonts::chalk_normal, (float)right_x, (float)y, 
CL_String::to(result.killed));
 
 
-  gc.print_left(Fonts::chalk_normal,   left_x, y+=30, _("Time left: "));
-  gc.print_right(Fonts::chalk_normal, right_x, y, time_str);
+  gc.print_left(Fonts::chalk_normal,   (float)left_x, (float)(y+=30), _("Time 
left: "));
+  gc.print_right(Fonts::chalk_normal, (float)right_x, (float)y, time_str);
 }
 
 ResultScreen::ResultScreen(Result arg_result)

Modified: trunk/src/start_screen.cxx
===================================================================
--- trunk/src/start_screen.cxx  2005-11-19 02:15:24 UTC (rev 2513)
+++ trunk/src/start_screen.cxx  2005-11-21 19:53:35 UTC (rev 2514)
@@ -147,7 +147,7 @@
   gc.print_center(Fonts::chalk_large,
                   gc.get_width()/2,
                   CL_Display::get_height()/2 - 200,
-                  System::translate(plf.get_levelname()));
+                  _(plf.get_levelname()));
 
   gc.print_left(Fonts::chalk_normal,
                 CL_Display::get_width()/2 - 290,
@@ -185,7 +185,7 @@
   if (description != "")
     return description;
 
-  description = System::translate(plf.get_description());
+  description = _(plf.get_description());
 
   if (description == "")
     return description;

Modified: trunk/src/system.cxx
===================================================================
--- trunk/src/system.cxx        2005-11-19 02:15:24 UTC (rev 2513)
+++ trunk/src/system.cxx        2005-11-21 19:53:35 UTC (rev 2514)
@@ -470,12 +470,6 @@
 #endif
 }
 
-std::string
-System::translate(const std::string& str)
-{
-  return str;
-}
-
 } // namespace Pingus
 
 /* EOF */

Modified: trunk/src/theme.cxx
===================================================================
--- trunk/src/theme.cxx 2005-11-19 02:15:24 UTC (rev 2513)
+++ trunk/src/theme.cxx 2005-11-21 19:53:35 UTC (rev 2514)
@@ -24,6 +24,7 @@
 #include <ClanLib/Display/font.h>
 #include <ClanLib/Display/keyboard.h>
 #include "path_manager.hxx"
+#include "gettext.h"
 #include "system.hxx"
 #include "resource.hxx"
 #include "pingus_error.hxx"
@@ -55,15 +56,15 @@
   if (verbose) std::cout << "Theme: loading: " << filename << std::endl;
   plt.parse(filename);
   
-  title_name = System::translate(plt.get_name());
+  title_name = _(plt.get_name());
 
   level_filenames = plt.get_levels();
   load_levels();
 
-  if (System::translate(plt.get_description()) != "-")
+  if (_(plt.get_description()) != "-")
     {
       description.set_font(font);
-      description.set_text(System::translate(plt.get_description()), 350);
+      description.set_text(_(plt.get_description()), 350);
       has_description = true;
     }
   else
@@ -326,7 +327,7 @@
       try
              {
                 XMLPingusLevel plf(filename, filename);
-               levelnames.push_back(System::translate(plf.get_levelname()));
+               levelnames.push_back(_(plf.get_levelname()));
              }
            catch (PingusError& err)
              {

Modified: trunk/src/worldmap/level_dot.cxx
===================================================================
--- trunk/src/worldmap/level_dot.cxx    2005-11-19 02:15:24 UTC (rev 2513)
+++ trunk/src/worldmap/level_dot.cxx    2005-11-21 19:53:35 UTC (rev 2514)
@@ -129,7 +129,7 @@
 
   if (accessible())
     {
-      int length = Fonts::pingus_small.bounding_rect(0, 0, 
System::translate(get_plf().get_levelname())).get_width() / 2;
+      int length = Fonts::pingus_small.bounding_rect(0, 0, 
_(get_plf().get_levelname())).get_width() / 2;
       int realpos = static_cast<int>(gc.world_to_screen(Vector(pos.x, pos.y, 
0)).x);
       if (realpos - length < 0)
         pos_correction = realpos - length;
@@ -139,7 +139,7 @@
       gc.print_center(Fonts::pingus_small,
                       static_cast<int>(pos.x) - pos_correction,
                       static_cast<int>(pos.y - 40),
-                      System::translate(get_plf().get_levelname()), 
+                      _(get_plf().get_levelname()), 
                       1000);
     }
   else

Modified: trunk/src/worldmap/worldmap.cxx
===================================================================
--- trunk/src/worldmap/worldmap.cxx     2005-11-19 02:15:24 UTC (rev 2513)
+++ trunk/src/worldmap/worldmap.cxx     2005-11-21 19:53:35 UTC (rev 2514)
@@ -201,7 +201,7 @@
           gc.print_center(Fonts::chalk_small,
                           display_gc->get_width ()/2,
                           display_gc->get_height() - 20,
-                          
System::translate(leveldot->get_plf().get_levelname()));
+                          _(leveldot->get_plf().get_levelname()));
           
         }
       else





reply via email to

[Prev in Thread] Current Thread [Next in Thread]