pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2587 - in trunk/src: . display editor


From: jave27
Subject: [Pingus-CVS] r2587 - in trunk/src: . display editor
Date: Wed, 11 Jan 2006 18:45:01 +0100

Author: jave27
Date: 2006-01-11 18:44:51 +0100 (Wed, 11 Jan 2006)
New Revision: 2587

Modified:
   trunk/src/display/drawing_context.cxx
   trunk/src/editor/context_menu.cxx
   trunk/src/layer_manager.hxx
   trunk/src/pingus_menu_manager.cxx
Log:
Fixed some type conversion issues.  The Blitter scaling of the main menu leaves 
a small gap between the scaled and scrolling images in OpenGL mode, though.

Modified: trunk/src/display/drawing_context.cxx
===================================================================
--- trunk/src/display/drawing_context.cxx       2006-01-10 17:44:01 UTC (rev 
2586)
+++ trunk/src/display/drawing_context.cxx       2006-01-11 17:44:51 UTC (rev 
2587)
@@ -378,13 +378,13 @@
 float
 DrawingContext::get_width() const
 {
-  return CL_Display::get_width();
+  return (float)CL_Display::get_width();
 }
 
 float
 DrawingContext::get_height() const
 {
-  return CL_Display::get_height();  
+  return (float)CL_Display::get_height();  
 }
 
 void

Modified: trunk/src/editor/context_menu.cxx
===================================================================
--- trunk/src/editor/context_menu.cxx   2006-01-10 17:44:01 UTC (rev 2586)
+++ trunk/src/editor/context_menu.cxx   2006-01-11 17:44:51 UTC (rev 2587)
@@ -133,7 +133,7 @@
                                        break;
                                case (SET_Z_POS) :
                                        
objs[i]->set_pos(Vector(objs[i]->get_pos().x, objs[i]->get_pos().y, 
-                                               
CL_String::to_int(actions[selected_action_offset].parameter)));
+                                               
(float)CL_String::to_int(actions[selected_action_offset].parameter)));
                                        
objs[i]->set_orig_pos(objs[i]->get_pos());
                                        break;
                                default :

Modified: trunk/src/layer_manager.hxx
===================================================================
--- trunk/src/layer_manager.hxx 2006-01-10 17:44:01 UTC (rev 2586)
+++ trunk/src/layer_manager.hxx 2006-01-11 17:44:51 UTC (rev 2587)
@@ -67,8 +67,8 @@
 
     void update (float delta)
     {
-      x_pos = fmod((x_pos + x_update * delta),CL_Display::get_width());
-      y_pos = fmod((y_pos + y_update * delta),CL_Display::get_height());
+      x_pos = fmod((x_pos + x_update * delta),(float)CL_Display::get_width());
+      y_pos = fmod((y_pos + y_update * delta),(float)CL_Display::get_height());
     }
   };
 

Modified: trunk/src/pingus_menu_manager.cxx
===================================================================
--- trunk/src/pingus_menu_manager.cxx   2006-01-10 17:44:01 UTC (rev 2586)
+++ trunk/src/pingus_menu_manager.cxx   2006-01-11 17:44:51 UTC (rev 2587)
@@ -38,13 +38,13 @@
        background.add_layer (Blitter::scale_surface_to_canvas(
                Resource::load_pixelbuffer("core/menu/layer1"), w, 185 * h / 
600), 0, 0, 12, 0);
        background.add_layer (Blitter::scale_surface_to_canvas(
-               Resource::load_pixelbuffer("core/menu/layer2"), w, 362 * h / 
600), 0, 150 * h / 600, 25, 0);
+               Resource::load_pixelbuffer("core/menu/layer2"), w, 362 * h / 
600), 0, 150 * (float)h / 600, 25, 0);
        background.add_layer (Blitter::scale_surface_to_canvas(
-               Resource::load_pixelbuffer("core/menu/layer3"), w, 306 * h / 
600), 0, 200 * h / 600, 50, 0);
+               Resource::load_pixelbuffer("core/menu/layer3"), w, 306 * h / 
600), 0, 200 * (float)h / 600, 50, 0);
        background.add_layer (Blitter::scale_surface_to_canvas(
-               Resource::load_pixelbuffer("core/menu/layer4"), w, 171 * h / 
600), 0, 429 * h / 600, 100, 0);
+               Resource::load_pixelbuffer("core/menu/layer4"), w, 171 * h / 
600), 0, 429 * (float)h / 600, 100, 0);
        background.add_layer (Blitter::scale_surface_to_canvas(
-               Resource::load_pixelbuffer("core/menu/layer5"), 302 * w / 800, 
104 * h / 600), 0, 500 * h / 600, 200, 0);
+               Resource::load_pixelbuffer("core/menu/layer5"), 302 * w / 800, 
104 * h / 600), 0, 500 * (float)h / 600, 200, 0);
        
        push_menu (&mainmenu);
 }





reply via email to

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