pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/gui graphic_context.cxx, 1.3, 1.4 sur


From: Ingo Ruhnke
Subject: [Pingus-CVS] CVS: Games/Pingus/src/gui graphic_context.cxx, 1.3, 1.4 surface_button.cxx, 1.9, 1.10 surface_button.hxx, 1.10, 1.11
Date: Sun, 14 Dec 2003 01:30:06 +0100

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

Modified Files:
        graphic_context.cxx surface_button.cxx surface_button.hxx 
Log Message:
- replaced a few CL_Surface with CL_Sprite

Index: graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/graphic_context.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- graphic_context.cxx 13 Dec 2003 11:21:24 -0000      1.3
+++ graphic_context.cxx 14 Dec 2003 00:30:04 -0000      1.4
@@ -26,11 +26,14 @@
 void
 GraphicContext::draw (CL_Sprite& sprite, const Vector& pos)
 {
+  sprite.draw((int)pos.x, (int)pos.y);
 }
 
 void
 GraphicContext::draw (CL_Sprite& sprite, const Vector& pos, int frame)
 {
+  // FIXME: Frame ignored
+  sprite.draw((int)pos.x, (int)pos.y);
 }
 
 void

Index: surface_button.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/surface_button.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- surface_button.cxx  18 Oct 2003 23:17:28 -0000      1.9
+++ surface_button.cxx  14 Dec 2003 00:30:04 -0000      1.10
@@ -31,9 +31,9 @@
                              const ResDescriptor& 
arg_button_mouse_over_surface)
   : x_pos (arg_x_pos), y_pos (arg_y_pos), pressed (false), mouse_over (false)
 {
-  button_surface            = PingusResource::load_surface 
(arg_button_surface);
-  button_pressed_surface    = PingusResource::load_surface 
(arg_button_pressed_surface);
-  button_mouse_over_surface = PingusResource::load_surface 
(arg_button_mouse_over_surface);
+  button_surface            = PingusResource::load_sprite(arg_button_surface);
+  button_pressed_surface    = 
PingusResource::load_sprite(arg_button_pressed_surface);
+  button_mouse_over_surface = 
PingusResource::load_sprite(arg_button_mouse_over_surface);
 }
 
 SurfaceButton::~SurfaceButton ()
@@ -44,11 +44,11 @@
 SurfaceButton::draw (GraphicContext& gc)
 {
   if (pressed && mouse_over)
-    gc.draw(button_pressed_surface, x_pos, y_pos);
+    gc.draw(button_pressed_surface, Vector(x_pos, y_pos));
   else if (!pressed && mouse_over)
-    gc.draw(button_mouse_over_surface, x_pos, y_pos);
+    gc.draw(button_mouse_over_surface, Vector(x_pos, y_pos));
   else
-    gc.draw(button_surface, x_pos, y_pos);
+    gc.draw(button_surface, Vector(x_pos, y_pos));
 }
 
 bool

Index: surface_button.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/surface_button.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- surface_button.hxx  20 Oct 2003 19:28:55 -0000      1.10
+++ surface_button.hxx  14 Dec 2003 00:30:04 -0000      1.11
@@ -36,9 +36,9 @@
 protected:
   int x_pos;
   int y_pos;
-  CL_Surface button_surface;
-  CL_Surface button_pressed_surface;
-  CL_Surface button_mouse_over_surface;
+  CL_Sprite button_surface;
+  CL_Sprite button_pressed_surface;
+  CL_Sprite button_mouse_over_surface;
 
   bool pressed;
   bool mouse_over;





reply via email to

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