[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.2,1.3 basher.hxx,
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.2,1.3 basher.hxx,1.3,1.4 blocker.hxx,1.2,1.3 boarder.hxx,1.3,1.4 bomber.hxx,1.3,1.4 bridger.hxx,1.5,1.6 climber.hxx,1.2,1.3 digger.hxx,1.2,1.3 drown.cxx,1.2,1.3 drown.hxx,1.2,1.3 exiter.hxx,1.2,1.3 faller.cxx,1.9,1.10 faller.hxx,1.4,1.5 floater.cxx,1.5,1.6 floater.hxx,1.2,1.3 jumper.hxx,1.2,1.3 laser_kill.hxx,1.2,1.3 miner.hxx,1.2,1.3 rocket_launcher.hxx,1.2,1.3 slider.hxx,1.2,1.3 smashed.hxx,1.2,1.3 splashed.hxx,1.2,1.3 superman.hxx,1.2,1.3 teleported.hxx,1.2,1.3 waiter.hxx,1.2,1.3 walker.cxx,1.8,1.9 walker.hxx,1.2,1.3 |
Date: |
26 Jun 2002 19:13:15 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv5990/src/actions
Modified Files:
angel.hxx basher.hxx blocker.hxx boarder.hxx bomber.hxx
bridger.hxx climber.hxx digger.hxx drown.cxx drown.hxx
exiter.hxx faller.cxx faller.hxx floater.cxx floater.hxx
jumper.hxx laser_kill.hxx miner.hxx rocket_launcher.hxx
slider.hxx smashed.hxx splashed.hxx superman.hxx
teleported.hxx waiter.hxx walker.cxx walker.hxx
Log Message:
- removed PinguEnvironment, this might cause lots of action bugs, but it makes
the code cleaner
- testers are welcome again to test
- persistant handling is still ugly, should be moved completly out of pingu.?xx
Index: angel.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- angel.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ angel.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -33,7 +33,6 @@
Angel ();
void init();
std::string get_name() const { return "Angel"; }
- PinguEnvironment get_environment() const { return ENV_ALWAYS; }
void update(float delta);
void draw_offset(int, int, float s);
Index: basher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- basher.hxx 26 Jun 2002 15:38:44 -0000 1.3
+++ basher.hxx 26 Jun 2002 19:13:13 -0000 1.4
@@ -38,7 +38,6 @@
void init(void);
std::string get_name () const { return "Basher"; }
- PinguEnvironment get_environment() const { return
PinguEnvironment(ENV_LAND); }
void draw_offset(int x, int y, float s);
void update(float delta);
bool have_something_to_dig();
Index: blocker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- blocker.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ blocker.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -37,7 +37,6 @@
///
void init();
std::string get_name () const { return "Blocker"; }
- PinguEnvironment get_environment() const { return
PinguEnvironment(ENV_LAND); }
void update(float delta);
void draw_offset(int, int, float s);
Index: boarder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- boarder.hxx 24 Jun 2002 22:52:57 -0000 1.3
+++ boarder.hxx 26 Jun 2002 19:13:13 -0000 1.4
@@ -36,7 +36,6 @@
Boarder ();
void init();
std::string get_name() const { return "Boarder"; }
- PinguEnvironment get_environment() const { return ENV_LAND; }
void update(float delta);
void draw_offset(int, int, float s);
private:
Index: bomber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- bomber.hxx 26 Jun 2002 15:38:44 -0000 1.3
+++ bomber.hxx 26 Jun 2002 19:13:13 -0000 1.4
@@ -28,18 +28,16 @@
class Bomber : public PinguAction
{
private:
- ///
bool particle_thrown;
- ///
bool sound_played;
bool gfx_exploded;
bool colmap_exploded;
- ///
+
static bool static_surface_loaded;
Sprite sprite;
static CL_Surface bomber_radius;
static CL_Surface bomber_radius_gfx;
- ///
+
CL_Surface explo_surf;
public:
@@ -47,7 +45,6 @@
void init(void);
std::string get_name () const { return "Bomber"; }
- PinguEnvironment get_environment() const { return
PinguEnvironment(ENV_LAND|ENV_AIR); }
void draw_offset(int x, int y, float s);
void update(float delta);
int activation_time() { return 50; }
Index: bridger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- bridger.hxx 26 Jun 2002 10:48:19 -0000 1.5
+++ bridger.hxx 26 Jun 2002 19:13:13 -0000 1.6
@@ -54,7 +54,6 @@
void init();
std::string get_name () const;
- PinguEnvironment get_environment() const { return ENV_LAND; }
void update(float delta);
void update_build (float delta);
void update_walk (float delta);
Index: climber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- climber.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ climber.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -33,7 +33,6 @@
Climber();
void init();
std::string get_name () const { return "Climber"; }
- PinguEnvironment get_environment() const { return
PinguEnvironment(ENV_LAND|ENV_AIR); }
void draw_offset(int x, int y, float s=1.0);
void update(float delta);
ActionType get_type(void) { return (ActionType)WALL; }
Index: digger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- digger.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ digger.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -36,7 +36,6 @@
void init(void);
std::string get_name () const { return "Digger"; }
- PinguEnvironment get_environment() const { return ENV_LAND; }
bool have_something_to_dig();
void dig();
void update(float delta);
Index: drown.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- drown.cxx 13 Jun 2002 14:25:12 -0000 1.2
+++ drown.cxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -24,12 +24,12 @@
void
Drown::init()
{
- if (pingu->environment == ENV_AIR)
+ //if (pingu->environment == ENV_AIR)
sprite = Sprite ("Pingus/drownfall0", "pingus", 60.0f,
Sprite::NONE, Sprite::ONCE);
- else
- sprite = Sprite ("Pingus/drownwalk0", "pingus", 30.0f,
- Sprite::NONE, Sprite::ONCE);
+ //else
+ //sprite = Sprite ("Pingus/drownwalk0", "pingus", 30.0f,
+ // Sprite::NONE, Sprite::ONCE);
sprite.set_align_center_bottom ();
}
Index: drown.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- drown.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ drown.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -30,7 +30,6 @@
public:
void init();
std::string get_name() const { return "Drown"; }
- PinguEnvironment get_environment() const { return ENV_ALWAYS; }
void update(float delta);
void draw_offset(int x, int y, float s);
bool catchable () { return false; }
Index: exiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- exiter.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ exiter.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -31,7 +31,6 @@
public:
void init(void);
std::string get_name () const { return "Exiter"; }
- PinguEnvironment get_environment() const { return
(PinguEnvironment)ENV_LAND; }
void update(float delta);
void draw_offset(int x, int y, float s);
};
Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- faller.cxx 26 Jun 2002 17:43:18 -0000 1.9
+++ faller.cxx 26 Jun 2002 19:13:13 -0000 1.10
@@ -119,8 +119,8 @@
{ // if pingu is not on ground
++falling;
- if (falling > 3)
- pingu->environment = ENV_AIR;
+ //if (falling > 3) //FIXME: insert floater check here
+ //pingu->environment = ENV_AIR;
}
else // Ping is on ground/water/something
{
Index: faller.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- faller.hxx 24 Jun 2002 22:52:57 -0000 1.4
+++ faller.hxx 26 Jun 2002 19:13:13 -0000 1.5
@@ -44,7 +44,6 @@
bool change_allowed (const std::string&);
- PinguEnvironment get_environment() const { return ENV_ALWAYS; }
std::string get_name() const { return "Faller"; }
bool is_tumbling () const;
};
Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- floater.cxx 26 Jun 2002 17:43:18 -0000 1.5
+++ floater.cxx 26 Jun 2002 19:13:13 -0000 1.6
@@ -18,6 +18,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../pingu.hxx"
+#include "../groundpiece_data.hxx"
#include "floater.hxx"
Floater::Floater() : falling_depth(0), step(0)
@@ -39,7 +40,7 @@
sprite.update (delta);
pingu->velocity = CL_Vector(0.0, 0.0);
- if (rel_getpixel(0, -1) == 0) {
+ if (rel_getpixel(0, -1) == GroundpieceData::GP_NOTHING) {
++step;
if (step > 0) {
++(pingu->pos.y);
@@ -48,6 +49,19 @@
} else {
pingu->set_action ("walker");
}
+
+ // FIXME: use action slots here instead of a for-loop
+ if (rel_getpixel(0, -1) == GroundpieceData::GP_NOTHING)
+ {
+ for (unsigned int i=0; i < pingu->get_persistent_actions ()->size();
++i)
+ {
+ if ((*(pingu->get_persistent_actions ()))[i]->get_type() ==
(ActionType)FALL)
+ {
+ // FIXME: Use action slots instead of the persistend vector
+ pingu->set_action("floater");
+ }
+ }
+ }
}
void
Index: floater.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- floater.hxx 24 Jun 2002 22:52:57 -0000 1.2
+++ floater.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -35,7 +35,6 @@
Floater();
std::string get_name() const { return "Floater"; }
- PinguEnvironment get_environment() const { return
PinguEnvironment(ENV_LAND|ENV_AIR); }
ActionType get_type(void) { return FALL; };
void init(void);
void update(float delta);
Index: jumper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- jumper.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ jumper.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -32,7 +32,6 @@
Jumper();
void init(void);
- PinguEnvironment get_environment () const { return
(PinguEnvironment)ENV_LAND; }
std::string get_name() const { return "Jumper"; }
void update(float delta);
void draw_offset(int x, int y, float s);
Index: laser_kill.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- laser_kill.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ laser_kill.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -32,7 +32,6 @@
///
LaserKill();
std::string get_name() const { return "LaserKill"; }
- PinguEnvironment get_environment() const { return
(PinguEnvironment)ENV_LAND; }
void init(void);
void update(float delta);
void draw_offset(int x, int y, float s);
Index: miner.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- miner.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ miner.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -38,7 +38,6 @@
void init(void);
std::string get_name() const { return "Miner"; }
- PinguEnvironment get_environment() const { return
(PinguEnvironment)ENV_LAND; }
void update(float delta);
void draw_offset(int x, int y, float s);
};
Index: rocket_launcher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- rocket_launcher.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ rocket_launcher.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -35,7 +35,6 @@
void init();
std::string get_name() const { return "RocketLauncher"; }
- PinguEnvironment get_environment() const { return ENV_LAND; }
void update(float delta);
void draw_offset(int, int, float s);
};
Index: slider.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- slider.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ slider.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -32,7 +32,6 @@
Slider ();
void init(void);
- PinguEnvironment get_environment () const { return
(PinguEnvironment)ENV_LAND; }
std::string get_name() const { return "Slider"; }
void update(float delta);
void draw_offset(int x, int y, float s);
Index: smashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- smashed.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ smashed.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -33,7 +33,6 @@
public:
void init(void);
std::string get_name() const { return "Smashed"; }
- PinguEnvironment get_environment() const { return
(PinguEnvironment)ENV_LAND; }
void update(float delta);
void draw_offset(int x, int y, float s);
bool catchable () { return false; }
Index: splashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- splashed.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ splashed.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -36,7 +36,6 @@
void init(void);
std::string get_name() const { return "Splashed"; }
- PinguEnvironment get_environment() const { return ENV_LAND; }
void update(float delta);
void draw_offset(int x, int y, float s);
bool catchable () { return false; }
Index: superman.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- superman.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ superman.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -32,7 +32,6 @@
Superman ();
void init();
std::string get_name() const { return "Superman"; }
- PinguEnvironment get_environment() const { return ENV_ALWAYS; }
void update(float delta);
void draw_offset(int, int, float s);
Index: teleported.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- teleported.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ teleported.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -32,7 +32,6 @@
Teleported();
std::string get_name() const { return "LaserKill"; }
- PinguEnvironment get_environment() const { return
(PinguEnvironment)ENV_LAND; }
void init(void);
void update(float delta);
void draw_offset(int x, int y, float s);
Index: waiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- waiter.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ waiter.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -37,7 +37,6 @@
///
void init();
std::string get_name() const { return "Waiter"; }
- PinguEnvironment get_environment() const { return ENV_LAND; }
void update(float delta);
void draw_offset(int x, int y, float s);
};
Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- walker.cxx 26 Jun 2002 17:43:18 -0000 1.8
+++ walker.cxx 26 Jun 2002 19:13:13 -0000 1.9
@@ -60,9 +60,6 @@
*/
- // FIXME: pingu environment needs to get reviewed
- pingu->environment = ENV_LAND;
-
if (rel_getpixel(0, -1) == GroundpieceData::GP_WATER)
{
pingu->set_action ("drown");
Index: walker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- walker.hxx 24 Jun 2002 22:52:58 -0000 1.2
+++ walker.hxx 26 Jun 2002 19:13:13 -0000 1.3
@@ -36,7 +36,6 @@
void update(float delta);
void draw_offset(int x, int y, float s);
- PinguEnvironment get_environment() const { return ENV_ALWAYS; }
std::string get_name() const { return "Walker"; }
};
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions angel.hxx,1.2,1.3 basher.hxx,1.3,1.4 blocker.hxx,1.2,1.3 boarder.hxx,1.3,1.4 bomber.hxx,1.3,1.4 bridger.hxx,1.5,1.6 climber.hxx,1.2,1.3 digger.hxx,1.2,1.3 drown.cxx,1.2,1.3 drown.hxx,1.2,1.3 exiter.hxx,1.2,1.3 faller.cxx,1.9,1.10 faller.hxx,1.4,1.5 floater.cxx,1.5,1.6 floater.hxx,1.2,1.3 jumper.hxx,1.2,1.3 laser_kill.hxx,1.2,1.3 miner.hxx,1.2,1.3 rocket_launcher.hxx,1.2,1.3 slider.hxx,1.2,1.3 smashed.hxx,1.2,1.3 splashed.hxx,1.2,1.3 superman.hxx,1.2,1.3 teleported.hxx,1.2,1.3 waiter.hxx,1.2,1.3 walker.cxx,1.8,1.9 walker.hxx,1.2,1.3,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.14,1.15 pingu.hxx,1.6,1.7 pingu_action.hxx,1.4,1.5 pingu_enums.hxx,1.2,1.3 string_converter.cxx,1.3,1.4 string_converter.hxx,1.2,1.3 world.cxx,1.9,1.10
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor sprite_editorobj.cxx,1.1,1.2
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.14,1.15 pingu.hxx,1.6,1.7 pingu_action.hxx,1.4,1.5 pingu_enums.hxx,1.2,1.3 string_converter.cxx,1.3,1.4 string_converter.hxx,1.2,1.3 world.cxx,1.9,1.10
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor sprite_editorobj.cxx,1.1,1.2
- Index(es):