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 buffer_graphic_context.cxx, 1.5,


From: Ingo Ruhnke
Subject: [Pingus-CVS] CVS: Games/Pingus/src/gui buffer_graphic_context.cxx, 1.5, 1.6 buffer_graphic_context.hxx, 1.5, 1.6 display_graphic_context.cxx, 1.10, 1.11 display_graphic_context.hxx, 1.7, 1.8 graphic_context.cxx, 1.4, 1.5 graphic_context.hxx, 1.8, 1.9
Date: Fri, 02 Apr 2004 20:13:02 +0200

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

Modified Files:
        buffer_graphic_context.cxx buffer_graphic_context.hxx 
        display_graphic_context.cxx display_graphic_context.hxx 
        graphic_context.cxx graphic_context.hxx 
Log Message:
- stuff

Index: buffer_graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/buffer_graphic_context.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- buffer_graphic_context.cxx  20 Oct 2003 13:33:43 -0000      1.5
+++ buffer_graphic_context.cxx  2 Apr 2004 18:13:00 -0000       1.6
@@ -47,6 +47,11 @@
   std::cout << "BufferGraphicContext: clear" << std::endl;
 }
 
+void 
+BufferGraphicContext::draw(CL_Sprite&, const Pingus::Vector&)
+{
+}
+
 void
 BufferGraphicContext::draw (CL_Surface& sur, int x_pos, int y_pos)
 {

Index: buffer_graphic_context.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/buffer_graphic_context.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- buffer_graphic_context.hxx  19 Oct 2003 12:25:47 -0000      1.5
+++ buffer_graphic_context.hxx  2 Apr 2004 18:13:00 -0000       1.6
@@ -66,6 +66,8 @@
 
   void clear (float r, float g, float b);
 
+  void draw(CL_Sprite&, const Pingus::Vector&);
+
   void draw (CL_Surface& sur, int x_pos, int y_pos);
   void draw (CL_Surface& sur, int x_pos, int y_pos, int frame);
   void draw (CL_Surface& sur, int x_pos, int y_pos,

Index: display_graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/display_graphic_context.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- display_graphic_context.cxx 20 Oct 2003 13:33:44 -0000      1.10
+++ display_graphic_context.cxx 2 Apr 2004 18:13:00 -0000       1.11
@@ -161,6 +161,12 @@
 }
 
 void
+DisplayGraphicContext::draw (CL_Sprite& sprite, const Vector& pos)
+{
+  sprite.draw(w2s_x(pos.x), w2s_y(pos.y));
+}
+
+void
 DisplayGraphicContext::draw (CL_Surface& sur, int x_pos, int y_pos)
 {
   if (offset.z == 1.0)
@@ -197,8 +203,8 @@
 DisplayGraphicContext::draw (CL_Surface& sur, int x_pos, int y_pos,
            float size_x, float size_y, int frame)
 {
+  sur.draw(w2s_x(x_pos), w2s_y(y_pos));
 #ifdef CLANLIB_0_6
-  sur.draw(w2s_x(x_pos), w2s_y(y_pos),
            size_x * offset.z,
            size_y * offset.z, frame);
 #endif
@@ -274,19 +280,19 @@
 }
 
 void
-DisplayGraphicContext::print_center (CL_Font font, int x_pos, int y_pos, const 
std::string& str)
+DisplayGraphicContext::print_center (CL_Font font_, int x_pos, int y_pos, 
const std::string& str)
 {
-#ifdef CLANLIB_0_6
-  font.print_center(w2s_x(x_pos), w2s_y(y_pos), str.c_str ());
-#endif
+  CL_Font font = font_;
+  font.set_alignment(origin_bottom_center);
+  font.draw(w2s_x(x_pos), w2s_y(y_pos), str.c_str ());
 }
 
 void
-DisplayGraphicContext::print_right (CL_Font font, int x_pos, int y_pos, const 
std::string& str)
+DisplayGraphicContext::print_right (CL_Font font_, int x_pos, int y_pos, const 
std::string& str)
 {
-#ifdef CLANLIB_0_6
-  font->print_right(w2s_x(x_pos), w2s_y(y_pos), str.c_str ());
-#endif
+  CL_Font font = font_;
+  font.set_alignment(origin_bottom_center);
+  font.draw(w2s_x(x_pos), w2s_y(y_pos), str.c_str ());
 }
 
 } // namespace Pingus

Index: display_graphic_context.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/display_graphic_context.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- display_graphic_context.hxx 19 Oct 2003 12:25:47 -0000      1.7
+++ display_graphic_context.hxx 2 Apr 2004 18:13:00 -0000       1.8
@@ -92,6 +92,8 @@
 
   void clear (float r, float g, float b);
 
+  void draw (CL_Sprite& sprite, const Vector& pos);
+
   void draw (CL_Surface& sur, int x_pos, int y_pos);
   void draw (CL_Surface& sur, int x_pos, int y_pos, int frame);
 

Index: graphic_context.cxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/graphic_context.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- graphic_context.cxx 14 Dec 2003 00:30:04 -0000      1.4
+++ graphic_context.cxx 2 Apr 2004 18:13:00 -0000       1.5
@@ -18,18 +18,13 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <assert.h>
+#include <iostream>
 #include "../sprite.hxx"
 #include "graphic_context.hxx"
 
 namespace Pingus {
 
 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

Index: graphic_context.hxx
===================================================================
RCS file: /var/lib/cvs/Games/Pingus/src/gui/graphic_context.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- graphic_context.hxx 20 Oct 2003 13:33:44 -0000      1.8
+++ graphic_context.hxx 2 Apr 2004 18:13:00 -0000       1.9
@@ -68,7 +68,7 @@
 
   virtual void clear (float r, float g, float b) =0;
 
-  virtual void draw (CL_Sprite& sprite, const Vector& pos);
+  virtual void draw (CL_Sprite& sprite, const Vector& pos) =0;
   virtual void draw (CL_Sprite& sprite, const Vector& pos, int frame);
 
   virtual void draw (Sprite& sprite, const Vector& pos);





reply via email to

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