pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.1,1.2 bumper.h


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.1,1.2 bumper.hxx,1.1,1.2 fake_exit.cxx,1.1,1.2 fake_exit.hxx,1.1,1.2 hammer.cxx,1.1,1.2 hammer.hxx,1.1,1.2 info_box.cxx,1.7,1.8 laser_exit.cxx,1.1,1.2 laser_exit.hxx,1.1,1.2 smasher.cxx,1.1,1.2 smasher.hxx,1.1,1.2 spike.cxx,1.1,1.2 spike.hxx,1.1,1.2 switch_door.cxx,1.8,1.9 switch_door.hxx,1.7,1.8 teleporter.cxx,1.6,1.7 teleporter.hxx,1.8,1.9
Date: 5 Sep 2002 11:26:37 -0000

Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv28402/worldobjs

Modified Files:
        bumper.cxx bumper.hxx fake_exit.cxx fake_exit.hxx hammer.cxx 
        hammer.hxx info_box.cxx laser_exit.cxx laser_exit.hxx 
        smasher.cxx smasher.hxx spike.cxx spike.hxx switch_door.cxx 
        switch_door.hxx teleporter.cxx teleporter.hxx 
Log Message:
- added gc stuff for fonts
added global fonthandles
-hotspots are still kind of broken

Index: bumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/bumper.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bumper.cxx  4 Sep 2002 14:55:13 -0000       1.1
+++ bumper.cxx  5 Sep 2002 11:26:35 -0000       1.2
@@ -78,10 +78,9 @@
   }
 
   void 
-  Bumper::draw_offset(int x, int y, float s)
+  Bumper::draw (GraphicContext& gc)
   {
-    data->surface.put_screen(static_cast<int>(data->pos.x) + x, 
static_cast<int>(data->pos.y) + y, count);
-    UNUSED_ARG(s);
+    gc.draw (data->surface, data->pos, count);
   }
 
   void 

Index: bumper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/bumper.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bumper.hxx  4 Sep 2002 14:55:13 -0000       1.1
+++ bumper.hxx  5 Sep 2002 11:26:35 -0000       1.2
@@ -44,7 +44,7 @@
 
     float get_z_pos () const;
     
-    void draw_offset (int x, int y, float s);
+    void draw (GraphicContext& gc);
     void draw_colmap ();
     void update (float delta);
 

Index: fake_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/fake_exit.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fake_exit.cxx       4 Sep 2002 14:55:13 -0000       1.1
+++ fake_exit.cxx       5 Sep 2002 11:26:35 -0000       1.2
@@ -47,17 +47,9 @@
   }
 
   void 
-  FakeExit::draw_offset (int x, int y, float s)
+  FakeExit::draw (GraphicContext& gc)
   {
-    if (s == 1.0) {
-      data->surface.put_screen(static_cast<int>(data->pos.x) + x,
-                               static_cast<int>(data->pos.y) + y,
-                              data->counter.value());
-    } else {
-      data->surface.put_screen(static_cast<int>((data->pos.x + x) * s), 
-                              static_cast<int>((data->pos.y + y) * s),
-                              s, s, data->counter.value());
-    }
+    gc.draw (data->surface, data->pos, data->counter.value());
   }
 
 

Index: fake_exit.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/fake_exit.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- fake_exit.hxx       4 Sep 2002 14:55:13 -0000       1.1
+++ fake_exit.hxx       5 Sep 2002 11:26:35 -0000       1.2
@@ -42,7 +42,7 @@
 
     float get_z_pos () const;
     
-    void draw_offset (int x, int y, float s);
+    void draw (GraphicContext& gc);
 
     void update (float delta);
 

Index: hammer.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/hammer.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hammer.cxx  4 Sep 2002 14:55:13 -0000       1.1
+++ hammer.cxx  5 Sep 2002 11:26:35 -0000       1.2
@@ -46,17 +46,9 @@
   }
 
   void 
-  Hammer::draw_offset (int x, int y, float s)
+  Hammer::draw (GraphicContext& gc)
   {
-    if (s == 1.0) {
-      data->surface.put_screen(static_cast<int>(data->pos.x + x), 
-                               static_cast<int>(data->pos.y + y),
-                              data->counter.value());
-    } else {
-      data->surface.put_screen(static_cast<int>((data->pos.x + x) * s), 
-                              static_cast<int>((data->pos.y + y) * s),
-                              s, s, data->counter.value());
-    }
+    gc.draw (data->surface, data->pos, data->counter.value());
   }
 
   void

Index: hammer.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/hammer.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hammer.hxx  4 Sep 2002 14:55:13 -0000       1.1
+++ hammer.hxx  5 Sep 2002 11:26:35 -0000       1.2
@@ -43,7 +43,7 @@
 
     float get_z_pos () const;
 
-    void draw_offset (int x, int y, float s);
+    void draw (GraphicContext& gc);
     void update (float delta);
 
   protected:

Index: info_box.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/info_box.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- info_box.cxx        4 Sep 2002 20:30:29 -0000       1.7
+++ info_box.cxx        5 Sep 2002 11:26:35 -0000       1.8
@@ -137,7 +137,7 @@
     }
   else
     {
-      sprite.put_screen (pos);
+      gc.draw (sprite, pos);
     }
 }
 

Index: laser_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/laser_exit.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- laser_exit.cxx      4 Sep 2002 14:55:13 -0000       1.1
+++ laser_exit.cxx      5 Sep 2002 11:26:35 -0000       1.2
@@ -48,17 +48,9 @@
   }
 
   void 
-  LaserExit::draw_offset (int x, int y, float s)
+  LaserExit::draw (GraphicContext& gc)
   {
-    if (s == 1.0) {
-      data->surface.put_screen(static_cast<int>(data->pos.x + x),
-                               static_cast<int>(data->pos.y + y),
-                              data->counter.value());
-    } else {
-      data->surface.put_screen(static_cast<int>((data->pos.x + x) * s), 
-                              static_cast<int>((data->pos.y + y) * s),
-                              s, s, data->counter.value());
-    }
+    gc.draw (data->surface, data->pos, data->counter.value());
   }
 
   void

Index: laser_exit.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/laser_exit.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- laser_exit.hxx      4 Sep 2002 14:55:13 -0000       1.1
+++ laser_exit.hxx      5 Sep 2002 11:26:35 -0000       1.2
@@ -43,7 +43,7 @@
 
     float get_z_pos () const;
 
-    void draw_offset (int x, int y, float s);
+    void draw (GraphicContext& gc);
     void update (float delta);
 
   protected:

Index: smasher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/smasher.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- smasher.cxx 4 Sep 2002 14:55:13 -0000       1.1
+++ smasher.cxx 5 Sep 2002 11:26:35 -0000       1.2
@@ -118,9 +118,9 @@
   }
 
   void 
-  Smasher::draw_offset (int x, int y, float /*s*/)
+  Smasher::draw (GraphicContext& gc)
   {
-    data->surface.put_screen (static_cast<int>(data->pos.x + x), 
static_cast<int>(data->pos.y + y), count);
+    gc.draw (data->surface, data->pos, count);
   }
 
   void 

Index: smasher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/smasher.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- smasher.hxx 4 Sep 2002 14:55:13 -0000       1.1
+++ smasher.hxx 5 Sep 2002 11:26:35 -0000       1.2
@@ -45,7 +45,7 @@
 
     float get_z_pos () const;
     
-    void draw_offset (int x, int y, float s);
+    void draw (GraphicContext& gc);
     void draw_colmap ();
     void update (float delta);
 

Index: spike.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/spike.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- spike.cxx   4 Sep 2002 14:55:13 -0000       1.1
+++ spike.cxx   5 Sep 2002 11:26:35 -0000       1.2
@@ -47,12 +47,10 @@
   }
 
   void
-  Spike::draw_offset (int x, int y, float /*s*/)
+  Spike::draw (GraphicContext& gc)
   {
     if (killing) {
-      data->surface.put_screen(static_cast<int>(data->pos.x + x),
-                               static_cast<int>(data->pos.y + y),
-                              data->counter);
+      gc.draw (data->surface, data->pos, data->counter);
     } else {
       // do nothing
     }

Index: spike.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/spike.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- spike.hxx   4 Sep 2002 14:55:13 -0000       1.1
+++ spike.hxx   5 Sep 2002 11:26:35 -0000       1.2
@@ -43,7 +43,7 @@
 
     float get_z_pos () const;
 
-    void draw_offset (int x_of, int y_of, float s = 1.0);
+    void draw (GraphicContext& gc);
     void update (float delta);
 
   protected:

Index: switch_door.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/switch_door.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- switch_door.cxx     4 Sep 2002 14:55:13 -0000       1.8
+++ switch_door.cxx     5 Sep 2002 11:26:35 -0000       1.9
@@ -174,15 +174,14 @@
 }
 
 void
-SwitchDoor::draw_offset(int x_of, int y_of, float /*s*/)
+SwitchDoor::draw (GraphicContext& gc)
 {
-  door_box.put_screen (int(door_pos.x) + x_of, int(door_pos.y) + y_of);
+  gc.draw (door_box, door_pos);
   for (int i=0; i < current_door_height; ++i)
-    door_tile.put_screen (int(door_pos.x) + x_of, 
-                         int(door_pos.y) + y_of 
-                         + i * door_tile.get_height ()
-                         + door_box.get_height ());
-  switch_sur.put_screen (int(switch_pos.x) + x_of, int(switch_pos.y) + y_of);
+    gc.draw (door_tile, 
+            int(door_pos.x),  
+            int(door_pos.y) + i * door_tile.get_height () + 
door_box.get_height ());
+  gc.draw (switch_sur, switch_pos);
 }
 
 void

Index: switch_door.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/switch_door.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- switch_door.hxx     23 Aug 2002 15:49:57 -0000      1.7
+++ switch_door.hxx     5 Sep 2002 11:26:35 -0000       1.8
@@ -79,7 +79,7 @@
   SwitchDoor (const SwitchDoorData&);
   
   void draw_colmap();
-  void draw_offset(int x, int y, float s = 1.0);
+  void draw (GraphicContext& gc);
   void update(float delta);
   /// The switch and the door should stay above the pingus
   float get_z_pos() const { return 100; }

Index: teleporter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/teleporter.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- teleporter.cxx      4 Sep 2002 14:55:13 -0000       1.6
+++ teleporter.cxx      5 Sep 2002 11:26:35 -0000       1.7
@@ -136,12 +136,10 @@
 }
 
 void 
-Teleporter::draw_offset (int x_of, int y_of, float /*s*/)
+Teleporter::draw (GraphicContext& gc)
 {
-  //std::cout << "Teleporter::draw_offset ()" << std::endl;
-  //view->draw (sur, pos);
-  sprite.put_screen (pos + CL_Vector(x_of, y_of));
-  target_sprite.put_screen (target_pos + CL_Vector(x_of, y_of));
+  gc.draw (sprite, pos);
+  gc.draw (target_sprite, target_pos);
 }
 
 void 

Index: teleporter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/teleporter.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- teleporter.hxx      23 Aug 2002 15:49:57 -0000      1.8
+++ teleporter.hxx      5 Sep 2002 11:26:35 -0000       1.9
@@ -60,9 +60,9 @@
 public:
   Teleporter (const TeleporterData& data);
 
-  int get_z_pos() { return 0; }  
-  void draw_offset (int x, int y, float s = 1.0);
-  void update(float delta);
+  int   get_z_pos() { return 0; }  
+  void  draw (GraphicContext& gc);
+  void  update(float delta);
   float get_z_pos() const { return (int) pos.z; }
   
 private:





reply via email to

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