pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.8,1.9 angel.hxx,1


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.8,1.9 angel.hxx,1.8,1.9 basher.cxx,1.12,1.13 basher.hxx,1.8,1.9 blocker.cxx,1.6,1.7 blocker.hxx,1.7,1.8 boarder.cxx,1.6,1.7 boarder.hxx,1.7,1.8 bomber.cxx,1.10,1.11 bomber.hxx,1.9,1.10 bridger.cxx,1.12,1.13 bridger.hxx,1.9,1.10 climber.cxx,1.8,1.9 climber.hxx,1.6,1.7 digger.cxx,1.10,1.11 digger.hxx,1.6,1.7 drown.cxx,1.5,1.6 drown.hxx,1.6,1.7 exiter.cxx,1.5,1.6 exiter.hxx,1.6,1.7 faller.cxx,1.17,1.18 faller.hxx,1.11,1.12 floater.cxx,1.12,1.13 floater.hxx,1.8,1.9 jumper.cxx,1.8,1.9 jumper.hxx,1.6,1.7 laser_kill.cxx,1.3,1.4 laser_kill.hxx,1.6,1.7 miner.cxx,1.8,1.9 miner.hxx,1.6,1.7 rocket_launcher.cxx,1.6,1.7 rocket_launcher.hxx,1.6,1.7 slider.cxx,1.6,1.7 slider.hxx,1.6,1.7 smashed.cxx,1.4,1.5 smashed.hxx,1.6,1.7 splashed.cxx,1.5,1.6 splashed.hxx,1.6,1.7 superman.cxx,1.4,1.5 superman.hxx,1.7,1.8 teleported.cxx,1.5,1.6 teleported.hxx,1.6,1.7 waiter.cxx,1.5,1.6 waiter.hxx,1.6,1.7 walker.cxx,1.18,1.19 walker.hxx,1.6,1.7
Date: 4 Sep 2002 20:30:32 -0000

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

Modified Files:
        angel.cxx angel.hxx basher.cxx basher.hxx blocker.cxx 
        blocker.hxx boarder.cxx boarder.hxx bomber.cxx bomber.hxx 
        bridger.cxx bridger.hxx climber.cxx climber.hxx digger.cxx 
        digger.hxx drown.cxx drown.hxx exiter.cxx exiter.hxx 
        faller.cxx faller.hxx floater.cxx floater.hxx jumper.cxx 
        jumper.hxx laser_kill.cxx laser_kill.hxx miner.cxx miner.hxx 
        rocket_launcher.cxx rocket_launcher.hxx slider.cxx slider.hxx 
        smashed.cxx smashed.hxx splashed.cxx splashed.hxx superman.cxx 
        superman.hxx teleported.cxx teleported.hxx waiter.cxx 
        waiter.hxx walker.cxx walker.hxx 
Log Message:
some more GC stuff -> s/draw_offset/draw(GraphicContext&)/

Index: angel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- angel.cxx   4 Sep 2002 14:55:12 -0000       1.8
+++ angel.cxx   4 Sep 2002 20:30:29 -0000       1.9
@@ -53,11 +53,9 @@
   }
 
   void   
-  Angel::draw_offset (int x_of, int y_of, float s)
+  Angel::draw (GraphicContext& gc)
   {
-    sprite.put_screen (static_cast<int>(pingu->get_x () + x_of),
-                      static_cast<int>(pingu->get_y () + y_of));
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos ());
   }
 
 }

Index: angel.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- angel.hxx   4 Sep 2002 14:55:12 -0000       1.8
+++ angel.hxx   4 Sep 2002 20:30:29 -0000       1.9
@@ -40,7 +40,7 @@
     ActionName get_type () const { return Actions::Angel; }
     
     void  update (float delta);
-    void  draw_offset (int, int, float s);
+    void  draw (GraphicContext& gc);
 
   private:
     Angel (const Angel&);

Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- basher.cxx  4 Sep 2002 14:55:12 -0000       1.12
+++ basher.cxx  4 Sep 2002 20:30:29 -0000       1.13
@@ -47,16 +47,14 @@
   }
 
   void
-  Basher::draw_offset (int x, int y, float s)
+  Basher::draw (GraphicContext& gc)
   {
     if (pingu->direction.is_left())
       sprite.set_direction (Sprite::LEFT);
     else
       sprite.set_direction (Sprite::RIGHT);
 
-    sprite.put_screen(pingu->get_pos() + CL_Vector(x, y));
-    
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos());
   }
 
   void

Index: basher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- basher.hxx  4 Sep 2002 14:55:12 -0000       1.8
+++ basher.hxx  4 Sep 2002 20:30:29 -0000       1.9
@@ -44,7 +44,7 @@
     std::string get_name () const { return "Basher"; }
     ActionName get_type () const { return Actions::Basher; }
     
-    void draw_offset (int x, int y, float s);
+    void draw (GraphicContext& gc);
     void update (float delta);
     
     bool have_something_to_dig ();

Index: blocker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- blocker.cxx 4 Sep 2002 14:55:12 -0000       1.6
+++ blocker.cxx 4 Sep 2002 20:30:29 -0000       1.7
@@ -65,10 +65,9 @@
   }
 
   void
-  Blocker::draw_offset(int x, int y, float s)
+  Blocker::draw (GraphicContext& gc)
   {
-    sprite.put_screen(pingu->get_pos() + CL_Vector(x, y));
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos());
   }
 
   bool

Index: blocker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- blocker.hxx 25 Aug 2002 09:08:49 -0000      1.7
+++ blocker.hxx 4 Sep 2002 20:30:29 -0000       1.8
@@ -39,8 +39,8 @@
     std::string get_name () const { return "Blocker"; }
     ActionName get_type() const { return Actions::Blocker; }
  
+    void  draw (GraphicContext& gc);
     void  update(float delta);
-    void  draw_offset(int, int, float s);
     bool  standing_on_ground();
 
     bool  need_catch();

Index: boarder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- boarder.cxx 4 Sep 2002 14:55:12 -0000       1.6
+++ boarder.cxx 4 Sep 2002 20:30:29 -0000       1.7
@@ -85,11 +85,9 @@
   }
 
   void   
-  Boarder::draw_offset(int x_of, int y_of, float s)
+  Boarder::draw (GraphicContext& gc)
   {
-    sprite.put_screen (static_cast<int>(pingu->get_x () + x_of),
-                      static_cast<int>(pingu->get_y () + y_of));
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
   bool

Index: boarder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- boarder.hxx 25 Aug 2002 09:08:49 -0000      1.7
+++ boarder.hxx 4 Sep 2002 20:30:29 -0000       1.8
@@ -41,8 +41,8 @@
     std::string get_name () const { return "Boarder"; }
     ActionName get_type () const { return Actions::Boarder; }
   
+    void  draw (GraphicContext& gc);
     void  update (float delta);
-    void  draw_offset (int, int, float s);
   
   private:
     bool on_ground ();

Index: bomber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- bomber.cxx  4 Sep 2002 14:55:12 -0000       1.10
+++ bomber.cxx  4 Sep 2002 20:30:29 -0000       1.11
@@ -69,18 +69,16 @@
   }
 
   void
-  Bomber::draw_offset (int x, int y, float s)
+  Bomber::draw (GraphicContext& gc)
   {
     if (sprite.get_frame () >= 13 && !gfx_exploded) 
       {
-        explo_surf.put_screen(static_cast<int>(pingu->get_x () - 32 + x), 
-                             static_cast<int>(pingu->get_y () - 48 + y));
+        gc.draw (explo_surf, CL_Vector(static_cast<int>(pingu->get_x () - 32), 
+                                      static_cast<int>(pingu->get_y () - 48)));
         gfx_exploded = true;
       }
 
-    sprite.put_screen(static_cast<int>(pingu->get_x () + x, pingu->get_y () + 
y));
-    
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
   void

Index: bomber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- bomber.hxx  25 Aug 2002 09:08:49 -0000      1.9
+++ bomber.hxx  4 Sep 2002 20:30:29 -0000       1.10
@@ -49,10 +49,12 @@
     std::string get_name () const { return "Bomber"; }
     ActionName get_type() const { return Actions::Bomber; }
     ActionType get_activation_mode() const { return COUNTDOWN_TRIGGERED; }
-    void   draw_offset(int x, int y, float s);
-    void   update(float delta);
-    void   update_position(float delta);
-    int    activation_time() { return 50; }
+
+    void draw (GraphicContext& gc);
+    void update(float delta);
+
+    void update_position(float delta);
+    int  activation_time() { return 50; }
     void on_successfull_apply (Pingu*);
   
   private:

Index: bridger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- bridger.cxx 4 Sep 2002 14:55:12 -0000       1.12
+++ bridger.cxx 4 Sep 2002 20:30:29 -0000       1.13
@@ -66,9 +66,8 @@
   }
 
   void
-  Bridger::draw_offset (int x, int y, float s)
+  Bridger::draw (GraphicContext& gc)
   {
-
     int x_offset(6), y_offset(4);
 
     if (bricks == MAX_BRICKS) {
@@ -91,22 +90,19 @@
         else
          build_sprite.set_direction (Sprite::RIGHT);
       
-        build_sprite.put_screen(static_cast<int>(pingu->get_x () + x - 
(x_offset * pingu->direction)),
-                               static_cast<int>(pingu->get_y () + y + 
y_offset));
+        gc.draw(build_sprite, CL_Vector(pingu->get_x () - (x_offset * 
pingu->direction),
+                                       pingu->get_y () + y_offset));
         break;
       
       case B_WALKING:
         if (pingu->direction.is_left ())
          walk_sprite.set_direction (Sprite::LEFT);
         else
-         walk_sprite.set_direction (Sprite::RIGHT);
-      
-        walk_sprite.put_screen(static_cast<int>(pingu->get_x () + x - 
(x_offset * pingu->direction)),
-                              static_cast<int>(pingu->get_y () + y + 
y_offset));
+          walk_sprite.set_direction (Sprite::RIGHT);
+         gc.draw (walk_sprite, CL_Vector(static_cast<int>(pingu->get_x () - 
(x_offset * pingu->direction)),
+                                         static_cast<int>(pingu->get_y () + 
y_offset)));
         break;
       }
-      
-    UNUSED_ARG(s);
   }
 
   void

Index: bridger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- bridger.hxx 25 Aug 2002 09:08:49 -0000      1.9
+++ bridger.hxx 4 Sep 2002 20:30:29 -0000       1.10
@@ -63,7 +63,7 @@
     void   update_build (float delta);
     void   update_walk (float delta);
     
-    void   draw_offset (int, int, float s);
+    void   draw (GraphicContext& gc);
     
     bool   way_is_free ();
     void   place_a_brick ();

Index: climber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- climber.cxx 4 Sep 2002 14:55:12 -0000       1.8
+++ climber.cxx 4 Sep 2002 20:30:29 -0000       1.9
@@ -97,10 +97,9 @@
   }
 
   void
-  Climber::draw_offset(int x, int y, float s)
+  Climber::draw (GraphicContext& gc)
   {
-    sprite.put_screen (pingu->get_pos() + CL_Vector (x, y));
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos());
   }
 
 }

Index: climber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- climber.hxx 25 Aug 2002 09:08:49 -0000      1.6
+++ climber.hxx 4 Sep 2002 20:30:29 -0000       1.7
@@ -38,7 +38,7 @@
     ActionName get_type () const { return Actions::Climber; }
     ActionType get_activation_mode () const { return WALL_TRIGGERED; }
     
-    void draw_offset (int x, int y, float s=1.0);
+    void draw (GraphicContext& gc);
     
     void update (float delta);
     

Index: digger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- digger.cxx  4 Sep 2002 14:55:12 -0000       1.10
+++ digger.cxx  4 Sep 2002 20:30:29 -0000       1.11
@@ -100,10 +100,9 @@
   }
 
   void  
-  Digger::draw_offset (int x, int y, float s)
+  Digger::draw (GraphicContext& gc)
   {
-    sprite.put_screen (static_cast<int>(pingu->get_x() + x), 
static_cast<int>(pingu->get_y() + y));
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
 }

Index: digger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- digger.hxx  25 Aug 2002 09:08:49 -0000      1.6
+++ digger.hxx  4 Sep 2002 20:30:29 -0000       1.7
@@ -43,8 +43,8 @@
     bool have_something_to_dig ();
     void dig ();
     
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int x, int y, float s);
 
   private:
     Digger (const Digger&);

Index: drown.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- drown.cxx   4 Sep 2002 14:55:12 -0000       1.5
+++ drown.cxx   4 Sep 2002 20:30:29 -0000       1.6
@@ -37,7 +37,7 @@
   }
 
   void 
-  Drown::draw_offset (int x, int y, float s)
+  Drown::draw (GraphicContext& gc)
   {
     // FIXME: Direction handling is ugly
     if (pingu->direction.is_left())
@@ -45,8 +45,7 @@
     else
       sprite.set_direction(Sprite::RIGHT);
 
-    sprite.put_screen(pingu->get_pos() + CL_Vector(x, y));
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
   void 

Index: drown.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- drown.hxx   25 Aug 2002 09:08:49 -0000      1.6
+++ drown.hxx   4 Sep 2002 20:30:29 -0000       1.7
@@ -37,9 +37,8 @@
     std::string get_name () const { return "Drown"; }
     ActionName get_type () const { return Actions::Drown; }
     
-    void update (float delta);
-    
-    void draw_offset (int x, int y, float s);
+    void draw (GraphicContext& gc);
+    void update (float delta);  
     
     bool catchable () { return false; }
   

Index: exiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- exiter.cxx  4 Sep 2002 14:55:12 -0000       1.5
+++ exiter.cxx  4 Sep 2002 20:30:29 -0000       1.6
@@ -47,16 +47,14 @@
   }
 
   void 
-  Exiter::draw_offset(int x, int y, float s)
+  Exiter::draw (GraphicContext& gc)
   {
     if (pingu->direction.is_left())
       sprite.set_direction(Sprite::LEFT);
     else
       sprite.set_direction(Sprite::RIGHT);
     
-    sprite.put_screen(pingu->get_pos() + CL_Vector (x, y));
-    
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
 }

Index: exiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- exiter.hxx  25 Aug 2002 09:08:49 -0000      1.6
+++ exiter.hxx  4 Sep 2002 20:30:29 -0000       1.7
@@ -35,8 +35,9 @@
     void init(void);
     std::string get_name () const { return "Exiter"; }
     ActionName get_type() const { return Actions::Exiter; }
+
+    void draw (GraphicContext& gc);
     void update(float delta);
-    void draw_offset(int x, int y, float s);
   
   private:
     Exiter (const Exiter&);

Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- faller.cxx  4 Sep 2002 14:55:12 -0000       1.17
+++ faller.cxx  4 Sep 2002 20:30:29 -0000       1.18
@@ -147,15 +147,13 @@
   }
 
   void 
-  Faller::draw_offset (int x, int y, float s)
+  Faller::draw (GraphicContext& gc)
   {
     if (is_tumbling()) {
-      tumbler.put_screen(static_cast<int>(pingu->get_x() + x), 
static_cast<int>(pingu->get_y() + y));
+      gc.draw(tumbler, pingu->get_pos ());
     } else {
-      faller.put_screen (static_cast<int>(pingu->get_x() + x), 
static_cast<int>(pingu->get_y() + y));
+      gc.draw(tumbler, pingu->get_pos ());
     }
-    
-    UNUSED_ARG(s);
   }
 
   bool

Index: faller.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- faller.hxx  25 Aug 2002 09:08:49 -0000      1.11
+++ faller.hxx  4 Sep 2002 20:30:29 -0000       1.12
@@ -41,8 +41,8 @@
   
     void  init(void);
   
+    void  draw (GraphicContext& gc);
     void  update(float delta);
-    void  draw_offset(int x, int y, float s);
 
     bool change_allowed (Actions::ActionName new_action);
   

Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- floater.cxx 4 Sep 2002 14:55:12 -0000       1.12
+++ floater.cxx 4 Sep 2002 20:30:29 -0000       1.13
@@ -54,10 +54,9 @@
   }
 
   void 
-  Floater::draw_offset (int x, int y, float s)
+  Floater::draw (GraphicContext& gc)
   {
-    sprite.put_screen(pingu->get_pos() + CL_Vector (x, y));
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos());
   }
 
   bool

Index: floater.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- floater.hxx 25 Aug 2002 09:08:49 -0000      1.8
+++ floater.hxx 4 Sep 2002 20:30:29 -0000       1.9
@@ -39,8 +39,10 @@
     ActionType get_activation_mode() const { return FALL_TRIGGERED; }
     
     void init(void);
+
+    void draw (GraphicContext& gc);
     void update(float delta);
-    void draw_offset (int x, int y, float s);
+
     char get_persistent_char () { return 'f'; }
     bool change_allowed (ActionName new_action);
   

Index: jumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- jumper.cxx  4 Sep 2002 14:55:12 -0000       1.8
+++ jumper.cxx  4 Sep 2002 20:30:29 -0000       1.9
@@ -37,11 +37,9 @@
   }
 
   void 
-  Jumper::draw_offset (int x, int y, float s)
+  Jumper::draw (GraphicContext& gc)
   {
-    // FIXME: Huh! Does this work?!
-    sprite.put_screen (x, y);
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
   void

Index: jumper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- jumper.hxx  25 Aug 2002 09:08:49 -0000      1.6
+++ jumper.hxx  4 Sep 2002 20:30:29 -0000       1.7
@@ -35,8 +35,9 @@
     void  init(void);
     std::string get_name() const { return "Jumper"; }
     ActionName get_type() const { return Actions::Jumper; }
+
+    void  draw (GraphicContext& gc);
     void  update(float delta);
-    void  draw_offset(int x, int y, float s);
   
   private:
     Jumper (const Jumper&);

Index: laser_kill.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- laser_kill.cxx      25 Aug 2002 09:08:49 -0000      1.3
+++ laser_kill.cxx      4 Sep 2002 20:30:29 -0000       1.4
@@ -33,10 +33,9 @@
   }
 
   void 
-  LaserKill::draw_offset(int x, int y, float s)
+  LaserKill::draw (GraphicContext& gc)
   {
-    sprite.put_screen (x, y);
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
   void

Index: laser_kill.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- laser_kill.hxx      25 Aug 2002 09:08:49 -0000      1.6
+++ laser_kill.hxx      4 Sep 2002 20:30:29 -0000       1.7
@@ -35,8 +35,10 @@
     std::string get_name () const { return "LaserKill"; }
     ActionName get_type () const { return Actions::Laserkill; }
     void init (void);
+
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int x, int y, float s);
+
     bool catchable () { return false; }
   
   private:

Index: miner.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- miner.cxx   4 Sep 2002 14:55:12 -0000       1.8
+++ miner.cxx   4 Sep 2002 20:30:29 -0000       1.9
@@ -92,10 +92,9 @@
   }
 
   void 
-  Miner::draw_offset (int x, int y, float s)
+  Miner::draw (GraphicContext& gc)
   {
-    sprite.put_screen(pingu->get_pos() + CL_Vector(x, y));
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos());
   }
 
 }

Index: miner.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- miner.hxx   25 Aug 2002 09:08:49 -0000      1.6
+++ miner.hxx   4 Sep 2002 20:30:29 -0000       1.7
@@ -39,8 +39,9 @@
     void init (void);
     std::string get_name () const { return "Miner"; }
     ActionName get_type () const { return Actions::Miner; }
+
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int x, int y, float s);
   
   private:
     Miner (const Miner&);

Index: rocket_launcher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rocket_launcher.cxx 4 Sep 2002 14:55:12 -0000       1.6
+++ rocket_launcher.cxx 4 Sep 2002 20:30:29 -0000       1.7
@@ -56,16 +56,14 @@
   }
 
   void
-  RocketLauncher::draw_offset (int x, int y, float s)
+  RocketLauncher::draw (GraphicContext& gc)
   {
     if (pingu->direction.is_left())
       sprite.set_direction(Sprite::LEFT);
     else
       sprite.set_direction(Sprite::RIGHT);
       
-    sprite.put_screen(pingu->get_pos() + CL_Vector(x, y));
-  
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos());
   }
 
 }

Index: rocket_launcher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- rocket_launcher.hxx 25 Aug 2002 09:08:49 -0000      1.6
+++ rocket_launcher.hxx 4 Sep 2002 20:30:29 -0000       1.7
@@ -39,8 +39,8 @@
     std::string get_name () const { return "RocketLauncher"; }
     ActionName get_type () const { return Actions::Rocketlauncher; }
   
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int, int, float s);
   
   private:
     RocketLauncher (const RocketLauncher&);

Index: slider.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- slider.cxx  4 Sep 2002 14:55:12 -0000       1.6
+++ slider.cxx  4 Sep 2002 20:30:29 -0000       1.7
@@ -73,10 +73,9 @@
   }
 
   void
-  Slider::draw_offset (int x, int y, float s)
+  Slider::draw (GraphicContext& gc)
   {
-    sprite.put_screen(pingu->get_pos() + CL_Vector(x, y - 2));
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos() + CL_Vector(0, -2));
   }
 
 }

Index: slider.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- slider.hxx  25 Aug 2002 09:08:49 -0000      1.6
+++ slider.hxx  4 Sep 2002 20:30:29 -0000       1.7
@@ -36,8 +36,9 @@
     void  init(void);
     std::string get_name() const { return "Slider"; }
     ActionName get_type() const { return Actions::Slider; }
-    void  update(float delta);
-    void  draw_offset(int x, int y, float s);
+
+    void draw (GraphicContext& gc);
+    void update(float delta);
   
   private:
     Slider (const Slider&);

Index: smashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- smashed.cxx 4 Sep 2002 14:55:12 -0000       1.4
+++ smashed.cxx 4 Sep 2002 20:30:29 -0000       1.5
@@ -30,9 +30,9 @@
   }
 
   void 
-  Smashed::draw_offset (int x, int y, float /*s*/)
+  Smashed::draw (GraphicContext& gc)
   {
-    sprite.put_screen (x, y);
+    gc.draw (sprite, pingu->get_pos ());
   }
 
   void

Index: smashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- smashed.hxx 25 Aug 2002 09:08:49 -0000      1.6
+++ smashed.hxx 4 Sep 2002 20:30:29 -0000       1.7
@@ -37,8 +37,10 @@
     void init (void);
     std::string get_name () const { return "Smashed"; }
     ActionName get_type () const { return Actions::Smashed; }
+
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int x, int y, float s);
+
     bool catchable () { return false; }
   
   private:

Index: splashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- splashed.cxx        4 Sep 2002 14:55:12 -0000       1.5
+++ splashed.cxx        4 Sep 2002 20:30:29 -0000       1.6
@@ -59,11 +59,9 @@
   }
 
   void 
-  Splashed::draw_offset (int x_of, int y_of, float s)
+  Splashed::draw (GraphicContext& gc)
   {
-    sprite.put_screen (static_cast<int>(pingu->get_x() + x_of),
-                      static_cast<int>(pingu->get_y() + y_of));
-    UNUSED_ARG(s);
+    gc.draw (sprite, pingu->get_pos ());
   }
 
 }

Index: splashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- splashed.hxx        25 Aug 2002 09:08:49 -0000      1.6
+++ splashed.hxx        4 Sep 2002 20:30:29 -0000       1.7
@@ -38,8 +38,9 @@
     std::string get_name () const { return "Splashed"; }
     ActionName get_type () const { return Actions::Splashed; }
   
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int x, int y, float s);
+
     bool catchable () { return false; }
   
   private:

Index: superman.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- superman.cxx        4 Sep 2002 14:55:12 -0000       1.4
+++ superman.cxx        4 Sep 2002 20:30:29 -0000       1.5
@@ -51,11 +51,9 @@
   }
 
   void   
-  Superman::draw_offset (int x_of, int y_of, float s)
+  Superman::draw (GraphicContext& gc)
   {
-    sprite.put_screen (static_cast<int>(pingu->get_x () + x_of),
-                      static_cast<int>(pingu->get_y () + y_of));
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
 }

Index: superman.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- superman.hxx        25 Aug 2002 09:08:49 -0000      1.7
+++ superman.hxx        4 Sep 2002 20:30:29 -0000       1.8
@@ -38,8 +38,8 @@
     std::string get_name () const { return "Superman"; }
     ActionName get_type () const { return Actions::Superman; }
   
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int, int, float s);
 
   private:
     Superman (const Superman&);

Index: teleported.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- teleported.cxx      25 Aug 2002 09:08:49 -0000      1.5
+++ teleported.cxx      4 Sep 2002 20:30:29 -0000       1.6
@@ -34,10 +34,9 @@
 
 
   void 
-  Teleported::draw_offset(int x, int y, float s)
+  Teleported::draw (GraphicContext& gc)
   {
-    sprite.put_screen (x, y);
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
 

Index: teleported.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- teleported.hxx      25 Aug 2002 09:08:49 -0000      1.6
+++ teleported.hxx      4 Sep 2002 20:30:29 -0000       1.7
@@ -35,8 +35,10 @@
     std::string get_name() const { return "Teleported"; }
     ActionName get_type() const { return Actions::Teleported; }
     void init(void);
+
+    void draw (GraphicContext& gc);
     void update(float delta);
-    void draw_offset(int x, int y, float s);
+
     bool catchable () { return false; }
 
     int x_target, y_target; // <- FIXME: Ugly!

Index: waiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- waiter.cxx  4 Sep 2002 14:55:12 -0000       1.5
+++ waiter.cxx  4 Sep 2002 20:30:29 -0000       1.6
@@ -48,10 +48,9 @@
   }
 
   void
-  Waiter::draw_offset (int x, int y, float s)
+  Waiter::draw (GraphicContext& gc)
   {
-    sprite.put_screen(pingu->get_pos() + CL_Vector(x, y));
-    UNUSED_ARG(s);
+    gc.draw(sprite, pingu->get_pos ());
   }
 
 }

Index: waiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- waiter.hxx  25 Aug 2002 09:08:49 -0000      1.6
+++ waiter.hxx  4 Sep 2002 20:30:29 -0000       1.7
@@ -41,8 +41,8 @@
     std::string get_name() const { return "Waiter"; }
     ActionName get_type() const { return Actions::Waiter; }
   
+    void draw (GraphicContext& gc);
     void update(float delta);
-    void  draw_offset(int x, int y, float s);
   
   private:
     Waiter (const Waiter&);

Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- walker.cxx  4 Sep 2002 14:55:12 -0000       1.18
+++ walker.cxx  4 Sep 2002 20:30:29 -0000       1.19
@@ -196,16 +196,14 @@
   }
 
   void  
-  Walker::draw_offset (int x, int y, float s)
+  Walker::draw (GraphicContext& gc)
   {
     if (pingu->direction.is_left())
       walker.set_direction(Sprite::LEFT);
     else
       walker.set_direction(Sprite::RIGHT);
 
-    walker.put_screen(pingu->get_pos() + CL_Vector (x, y));
-    
-    UNUSED_ARG(s);
+    gc.draw (walker, pingu->get_pos());
   }
 
 }

Index: walker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- walker.hxx  25 Aug 2002 09:08:49 -0000      1.6
+++ walker.hxx  4 Sep 2002 20:30:29 -0000       1.7
@@ -36,8 +36,8 @@
     Walker () { }
     void init (void);
 
+    void draw (GraphicContext& gc);
     void update (float delta);
-    void draw_offset (int x, int y, float s);
 
     std::string get_name () const { return "Walker"; }
     ActionName get_type () const { return Actions::Walker; }





reply via email to

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