[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r2552 - in trunk/src: components editor
From: |
jave27 |
Subject: |
[Pingus-CVS] r2552 - in trunk/src: components editor |
Date: |
Thu, 8 Dec 2005 22:16:20 +0100 |
Author: jave27
Date: 2005-12-08 22:16:15 +0100 (Thu, 08 Dec 2005)
New Revision: 2552
Modified:
trunk/src/components/menu_button.cxx
trunk/src/editor/level_objs.cxx
Log:
got rid of some float->int warning messages
Modified: trunk/src/components/menu_button.cxx
===================================================================
--- trunk/src/components/menu_button.cxx 2005-12-08 21:01:02 UTC (rev
2551)
+++ trunk/src/components/menu_button.cxx 2005-12-08 21:16:15 UTC (rev
2552)
@@ -34,10 +34,6 @@
#include "menu_button.hxx"
-#if _MSC_VER > 1000
-#pragma warning( once : 4244 )
-#endif
-
namespace Pingus {
MenuButton::MenuButton(const CL_Point& pos_, const CL_Sprite& sprite_,
@@ -88,39 +84,39 @@
{
if (mouse_over && !pressed)
{
- gc.print_center(font, CL_Display::get_width() / 2,
- CL_Display::get_height() - font.get_height(),
+ gc.print_center(font, (float)CL_Display::get_width() / 2,
+ (float)(CL_Display::get_height() - font.get_height()),
desc.c_str());
- gc.draw(surface_p, Vector(x_pos - surface_p.get_width()/2,
- y_pos - surface_p.get_height()/2));
+ gc.draw(surface_p, Vector((float)(x_pos - surface_p.get_width()/2),
+ (float)(y_pos - surface_p.get_height()/2)));
- gc.print_center(font_large, x_pos + 32,
- y_pos - 32 - font_large.get_height()/2,
+ gc.print_center(font_large, (float)x_pos + 32,
+ (float)(y_pos - 32 - font_large.get_height()/2),
text);
}
else if (mouse_over && pressed)
{
float shrink = 0.9f;
- gc.print_center(font, CL_Display::get_width() / 2,
- CL_Display::get_height() - 20,
+ gc.print_center(font, (float)CL_Display::get_width() / 2,
+ (float)CL_Display::get_height() - 20,
desc.c_str());
gc.draw(surface_p,
- Vector(x_pos - surface_p.get_width()/2 * shrink,
- y_pos - surface_p.get_height()/2 * shrink));
+ Vector((float)(x_pos - surface_p.get_width()/2 * shrink),
+ (float)(y_pos - surface_p.get_height()/2 * shrink)));
gc.print_center(font_large,
- x_pos + 32,
- y_pos - 32 - font_large.get_height()/2,
+ (float)x_pos + 32,
+ (float)(y_pos - 32 - font_large.get_height()/2),
text);
}
else
{
gc.draw(surface_p,
- Vector(x_pos - surface_p.get_width()/2,
- y_pos - surface_p.get_height()/2));
+ Vector((float)(x_pos - surface_p.get_width()/2),
+ (float)(y_pos - surface_p.get_height()/2)));
}
UNUSED_ARG(gc);
}
Modified: trunk/src/editor/level_objs.cxx
===================================================================
--- trunk/src/editor/level_objs.cxx 2005-12-08 21:01:02 UTC (rev 2551)
+++ trunk/src/editor/level_objs.cxx 2005-12-08 21:16:15 UTC (rev 2552)
@@ -118,7 +118,7 @@
w = 800;
h = 600;
- sur =
Blitter::scale_surface_to_canvas(sprite.get_frame_surface(0), w, h);
+ sur =
Blitter::scale_surface_to_canvas(sprite.get_frame_surface(0), (int)w, (int)h);
sprite_desc = CL_SpriteDescription();
sprite_desc.add_frame(sur.get_pixeldata());
sprite = CL_Sprite(sprite_desc);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r2552 - in trunk/src: components editor,
jave27 <=