[Supertux-Commit] r5437 - in trunk/supertux/src: . gui squirrel/include

matzeb at millhouse.dreamhost.com matzeb at millhouse.dreamhost.com
Thu May 8 11:57:32 PDT 2008


Author: matzeb
Date: 2008-05-08 11:57:31 -0700 (Thu, 08 May 2008)
New Revision: 5437

Modified:
   trunk/supertux/src/gui/menu.cpp
   trunk/supertux/src/mainloop.cpp
   trunk/supertux/src/squirrel/include/sqstdio.h
Log:
fix a few warnings

Modified: trunk/supertux/src/gui/menu.cpp
===================================================================
--- trunk/supertux/src/gui/menu.cpp	2008-05-08 17:54:28 UTC (rev 5436)
+++ trunk/supertux/src/gui/menu.cpp	2008-05-08 18:57:31 UTC (rev 5437)
@@ -372,7 +372,7 @@
 void
 Menu::update()
 {
-  int menu_height = get_height();
+  int menu_height = (int) get_height();
   if (menu_height > SCREEN_HEIGHT)
     { // Scrolling
       int scroll_offset = (menu_height - SCREEN_HEIGHT) / 2 + 32;
@@ -823,8 +823,8 @@
 
   if (!items[active_item]->help.empty())
     {
-      int text_width  = default_font->get_text_width(items[active_item]->help);
-      int text_height = default_font->get_text_height(items[active_item]->help);
+      int text_width  = (int) default_font->get_text_width(items[active_item]->help);
+      int text_height = (int) default_font->get_text_height(items[active_item]->help);
       
       Rect text_rect(pos_x - text_width/2 - 8, 
                      SCREEN_HEIGHT - 48 - text_height/2 - 4,

Modified: trunk/supertux/src/mainloop.cpp
===================================================================
--- trunk/supertux/src/mainloop.cpp	2008-05-08 17:54:28 UTC (rev 5436)
+++ trunk/supertux/src/mainloop.cpp	2008-05-08 18:57:31 UTC (rev 5437)
@@ -246,7 +246,7 @@
     elapsed_ticks += ticks - last_ticks;
     last_ticks = ticks;
 
-    Uint32 ticks_per_frame = TICKS_PER_FRAME * game_speed;
+    Uint32 ticks_per_frame = (Uint32) (TICKS_PER_FRAME * game_speed);
 
     if (elapsed_ticks > ticks_per_frame*4) {
       // when the game loads up or levels are switched the

Modified: trunk/supertux/src/squirrel/include/sqstdio.h
===================================================================
--- trunk/supertux/src/squirrel/include/sqstdio.h	2008-05-08 17:54:28 UTC (rev 5436)
+++ trunk/supertux/src/squirrel/include/sqstdio.h	2008-05-08 18:57:31 UTC (rev 5437)
@@ -7,6 +7,8 @@
 #define SQSTD_STREAM_TYPE_TAG 0x80000000
 
 struct SQStream {
+	virtual ~SQStream() {}
+
 	virtual SQInteger Read(void *buffer, SQInteger size) = 0;
 	virtual SQInteger Write(void *buffer, SQInteger size) = 0;
 	virtual SQInteger Flush() = 0;




More information about the Supertux-Commit mailing list