pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src console.cxx,1.14,1.15 demo_session.cx


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src console.cxx,1.14,1.15 demo_session.cxx,1.8,1.9 gettext.h,1.1,1.2 level_result.cxx,1.16,1.17 menu_button.cxx,1.11,1.12 result_screen.cxx,1.17,1.18 smallmap.cxx,1.37,1.38 story_screen.cxx,1.20,1.21
Date: 17 Jun 2003 14:09:22 -0000

Update of /var/lib/cvs/Games/Pingus/src
In directory dark:/tmp/cvs-serv5583

Modified Files:
        console.cxx demo_session.cxx gettext.h level_result.cxx 
        menu_button.cxx result_screen.cxx smallmap.cxx 
        story_screen.cxx 
Log Message:
a bunch of very small code cleanups

Index: console.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/console.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- console.cxx 22 Apr 2003 16:40:41 -0000      1.14
+++ console.cxx 17 Jun 2003 14:09:20 -0000      1.15
@@ -165,7 +165,7 @@
 
   const std::list<std::string>& buffer = streambuf.get_buffer ();
 
-  unsigned int window_start = Math::max(0, static_cast<int>(buffer.size() - 
number_of_lines - current_pos));
+  unsigned int window_start = Math::max(0, int(buffer.size() - number_of_lines 
- current_pos));
 
   std::list<std::string>::const_iterator it = buffer.begin();
 

Index: demo_session.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/demo_session.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- demo_session.cxx    19 Apr 2003 10:23:17 -0000      1.8
+++ demo_session.cxx    17 Jun 2003 14:09:20 -0000      1.9
@@ -70,13 +70,13 @@
   float x_of = -gc.get_x_offset();
   float y_of = -gc.get_y_offset();
 
-  x_of = Math::mid(float(gc.get_width()/2),
+  x_of = Math::mid(gc.get_width()/2.0f,
                    x_of,
-                   float(world->get_width() - 1 - gc.get_width()/2));
+                   world->get_width() - 1 - gc.get_width()/2.0f);
 
-  y_of = Math::mid(float(gc.get_height()/2),
+  y_of = Math::mid(gc.get_height()/2.0f,
                    y_of,
-                   float(world->get_height() - 1 - gc.get_height()/2));
+                   world->get_height() - 1 - gc.get_height()/2.0f);
 
   gc.set_offset(-x_of, -y_of);
 

Index: gettext.h
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gettext.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- gettext.h   24 Apr 2003 15:48:27 -0000      1.1
+++ gettext.h   17 Jun 2003 14:09:20 -0000      1.2
@@ -21,8 +21,8 @@
 
 #include <config.h>
 
-#define _(String) gettext (String)
-#define N_(String) gettext_noop (String)
+#define _(String) gettext(String)
+#define N_(String) gettext_noop(String)
 
 /* NLS can be disabled through the configure --disable-nls option.  */
 #if ENABLE_NLS

Index: level_result.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/level_result.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- level_result.cxx    24 Apr 2003 15:18:19 -0000      1.16
+++ level_result.cxx    17 Jun 2003 14:09:20 -0000      1.17
@@ -66,7 +66,7 @@
           world->get_pingus()->get_number_of_allowed());
   font->print_center(CL_Display::get_width() / 2, 140, str);
 
-  snprintf(str, 128, _("Pingus killed:  %3d/%3d"),
+  snprintf(str, 128, _("Pingus died:  %3d/%3d"),
          world->get_pingus()->get_number_of_allowed()
            - world->get_pingus()->get_number_of_exited(),
          world->get_pingus()->get_number_of_allowed());

Index: menu_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/menu_button.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- menu_button.cxx     24 Apr 2003 15:18:19 -0000      1.11
+++ menu_button.cxx     17 Jun 2003 14:09:20 -0000      1.12
@@ -62,7 +62,7 @@
   if (mouse_over && !pressed)
     {
       gc.print_center(font, CL_Display::get_width() / 2,
-                      CL_Display::get_height() - 20,
+                      CL_Display::get_height() - font->get_height(),
                       desc.c_str());
 
       gc.draw(surface_p, x_pos - surface_p.get_width()/2,
@@ -76,7 +76,7 @@
        }
       else
        {
-         gc.print_center(font_large, x_pos + 32, y_pos - 32 - 
font_large->get_height(),
+         gc.print_center(font_large, x_pos + 32, y_pos - 32 - 
(font_large->get_height() - 5),
                           line1.c_str());
          gc.print_center(font_large, x_pos + 32, y_pos - 32,
                           line2.c_str());

Index: result_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/result_screen.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- result_screen.cxx   24 Apr 2003 15:18:19 -0000      1.17
+++ result_screen.cxx   17 Jun 2003 14:09:20 -0000      1.18
@@ -231,7 +231,7 @@
   gc.print_right(Fonts::chalk_normal, right_x, y, to_string(result.saved)
                  + "/" + to_string(result.needed));;
 
-  gc.print_left(Fonts::chalk_normal,  left_x,  y+=30, _("Killed: "));
+  gc.print_left(Fonts::chalk_normal,  left_x,  y+=30, _("Died: "));
   gc.print_right(Fonts::chalk_normal, right_x, y, to_string(result.killed));
 
 

Index: smallmap.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/smallmap.cxx,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- smallmap.cxx        19 Apr 2003 10:23:17 -0000      1.37
+++ smallmap.cxx        17 Jun 2003 14:09:20 -0000      1.38
@@ -209,8 +209,8 @@
 
   Display::draw_rect(x_of,
                     y_of,
-                    x_of + Math::min(rwidth,  static_cast<int>(sur.get_width() 
 - 1)),
-                    y_of + Math::min(rheight, 
static_cast<int>(sur.get_height() - 1)),
+                    x_of + Math::min(rwidth,  int(sur.get_width()  - 1)),
+                    y_of + Math::min(rheight, int(sur.get_height() - 1)),
                     0.0, 1.0, 0.0, 1.0);
 
   // FIXME: This should use put_target(), but put_target(), does not

Index: story_screen.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/story_screen.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- story_screen.cxx    24 Apr 2003 15:18:19 -0000      1.20
+++ story_screen.cxx    17 Jun 2003 14:09:20 -0000      1.21
@@ -142,7 +142,7 @@
 
   if (!page_displayed_completly)
     {
-      unsigned int len = static_cast<unsigned int>(20.0f * time_passed);
+      std::string::size_type len = static_cast<std::string::size_type>(20.0f * 
time_passed);
       display_text = current_page.text.substr(0, 
Math::min(current_page.text.length(), len));
 
       if (current_page.text.length() < len)





reply via email to

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