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 fake_exit.cxx,1.4,1.5 rain_


From: grumbel
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldobjs fake_exit.cxx,1.4,1.5 rain_generator.cxx,1.2,1.3 rain_generator.hxx,1.2,1.3 smasher.cxx,1.4,1.5
Date: 16 Sep 2002 16:47:43 -0000

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

Modified Files:
        fake_exit.cxx rain_generator.cxx rain_generator.hxx 
        smasher.cxx 
Log Message:
- fixed FakeExit
- fixed rain/snow

Index: fake_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/fake_exit.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fake_exit.cxx       14 Sep 2002 19:06:34 -0000      1.4
+++ fake_exit.cxx       16 Sep 2002 16:47:41 -0000      1.5
@@ -20,6 +20,7 @@
 #include "../graphic_context.hxx"
 #include "../pingu.hxx"
 #include "../pingu_holder.hxx"
+#include "../pingu_action.hxx"
 #include "../world.hxx"
 #include "../worldobjsdata/fake_exit_data.hxx"
 #include "fake_exit.hxx"
@@ -80,14 +81,17 @@
   if (   pingu->get_x() > data->pos.x + 31 && pingu->get_x() < data->pos.x + 
31 + 15
         && pingu->get_y() > data->pos.y + 56 && pingu->get_y() < data->pos.y + 
56 + 56) 
     {
-      if (!smashing) {
-       data->counter = 0;
-       smashing = true; 
-      }
+      if (pingu->get_action()->get_type() != Actions::Splashed)
+       {
+         if (!smashing) {
+           data->counter = 0;
+           smashing = true; 
+         }
 
-      if (data->counter >= 3 && data->counter <= 5) {
-       pingu->set_action(Actions::Smashed);
-      }
+         if (data->counter >= 3 && data->counter <= 5) {
+           pingu->set_action(Actions::Splashed);
+         }
+       }
     }
 }
 

Index: rain_generator.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/rain_generator.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rain_generator.cxx  16 Sep 2002 16:04:58 -0000      1.2
+++ rain_generator.cxx  16 Sep 2002 16:47:41 -0000      1.3
@@ -23,6 +23,7 @@
 #include "../particles/rain_particle.hxx"
 #include "../sound.hxx"
 #include "../world.hxx"
+#include "../graphic_context.hxx"
 #include "rain_generator.hxx"
 
 namespace WorldObjs {
@@ -38,7 +39,7 @@
 }
 
 void 
-RainGenerator::draw_offset(int /*x*/, int /*y*/, float /*s*/)
+RainGenerator::draw(GraphicContext& gc)
 {
   if (do_thunder)
     {
@@ -48,8 +49,8 @@
        waiter_count = 1.0f;
       }
 
-      CL_Display::fill_rect (0, 0, CL_Display::get_width (), 
CL_Display::get_height (),
-                            1.0, 1.0, 1.0, thunder_count);
+      gc.draw_fillrect (0, 0, CL_Display::get_width (), CL_Display::get_height 
(),
+                       1.0, 1.0, 1.0, thunder_count);
     }
 }
 

Index: rain_generator.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/rain_generator.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rain_generator.hxx  16 Sep 2002 16:04:58 -0000      1.2
+++ rain_generator.hxx  16 Sep 2002 16:47:41 -0000      1.3
@@ -35,7 +35,7 @@
   ~RainGenerator();
 
   void update(float delta);
-  void draw_offset(int x, int y, float s = 1.0f);
+  void draw(GraphicContext& gc);
   float get_z_pos() const { return 1000; }
 
 private:

Index: smasher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/smasher.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- smasher.cxx 14 Sep 2002 19:06:34 -0000      1.4
+++ smasher.cxx 16 Sep 2002 16:47:41 -0000      1.5
@@ -32,10 +32,11 @@
 
 namespace WorldObjs {
 
-Smasher::Smasher (WorldObjsData::SmasherData* data_) : smashing(false),
-                                                      downwards(false),
-                                                      count(0),
-                                                      data (new 
WorldObjsData::SmasherData(*data_))
+Smasher::Smasher (WorldObjsData::SmasherData* data_)
+  : smashing(false),
+    downwards(false),
+    count(0),
+    data (new WorldObjsData::SmasherData(*data_))
 {
 }
 





reply via email to

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