[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.13,1.14 angel.hxx
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.13,1.14 angel.hxx,1.12,1.13 basher.cxx,1.20,1.21 basher.hxx,1.13,1.14 blocker.cxx,1.13,1.14 blocker.hxx,1.12,1.13 boarder.cxx,1.11,1.12 boarder.hxx,1.11,1.12 bomber.cxx,1.19,1.20 bomber.hxx,1.14,1.15 bridger.cxx,1.22,1.23 bridger.hxx,1.15,1.16 climber.cxx,1.16,1.17 climber.hxx,1.11,1.12 digger.cxx,1.16,1.17 digger.hxx,1.11,1.12 drown.cxx,1.10,1.11 drown.hxx,1.10,1.11 exiter.cxx,1.10,1.11 exiter.hxx,1.10,1.11 faller.cxx,1.28,1.29 faller.hxx,1.15,1.16 floater.cxx,1.19,1.20 floater.hxx,1.12,1.13 jumper.cxx,1.15,1.16 jumper.hxx,1.10,1.11 laser_kill.cxx,1.11,1.12 laser_kill.hxx,1.11,1.12 miner.cxx,1.14,1.15 miner.hxx,1.10,1.11 rocket_launcher.cxx,1.10,1.11 rocket_launcher.hxx,1.10,1.11 slider.cxx,1.14,1.15 slider.hxx,1.10,1.11 smashed.cxx,1.10,1.11 smashed.hxx,1.11,1.12 splashed.cxx,1.10,1.11 splashed.hxx,1.11,1.12 superman.cxx,1.8,1.9 superman.hxx,1.11,1.12 teleported.cxx,1.9,1.10 teleported.hxx,1.10,1.11 waiter.cxx,1.10,1.11 waiter.hxx,1.10,1.11 walker.cxx,1.27,1.28 walker.hxx,1.10,1.11 |
Date: |
13 Oct 2002 16:40:04 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv32210/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:
Pingu* is now a constructor parameter of a PinguAction, set_pingu() is no
longer necesarry
Index: angel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- angel.cxx 4 Oct 2002 13:46:56 -0000 1.13
+++ angel.cxx 13 Oct 2002 16:39:59 -0000 1.14
@@ -27,12 +27,10 @@
namespace Actions {
-Angel::Angel () : counter(0.0), x_pos(0)
-{
-}
-
-void
-Angel::init ()
+Angel::Angel(Pingu* p)
+ : PinguAction(p),
+ counter(0.0),
+ x_pos(0)
{
x_pos = pingu->get_x();
counter = 0.0;
Index: angel.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- angel.hxx 1 Oct 2002 19:53:44 -0000 1.12
+++ angel.hxx 13 Oct 2002 16:39:59 -0000 1.13
@@ -34,8 +34,8 @@
Sprite sprite;
public:
- Angel ();
- void init ();
+ Angel (Pingu* p);
+
std::string get_name () const { return "Angel"; }
ActionName get_type () const { return Actions::Angel; }
Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- basher.cxx 8 Oct 2002 17:53:10 -0000 1.20
+++ basher.cxx 13 Oct 2002 16:39:59 -0000 1.21
@@ -30,12 +30,10 @@
namespace Actions {
-Basher::Basher () : basher_c(0), first_bash(true)
-{
-}
-
-void
-Basher::init (void)
+Basher::Basher (Pingu* p)
+ : PinguAction(p),
+ basher_c(0),
+ first_bash(true)
{
bash_radius = PingusResource::load_surface ("Other/bash_radius", "pingus");
bash_radius_gfx = PingusResource::load_surface ("Other/bash_radius_gfx",
"pingus");
@@ -108,15 +106,15 @@
if (y_inc < -max_steps_down)
{
- // The step down is too much. So stop being a Basher and be a Faller.
- pingu->set_action(Actions::Faller);
+ // The step down is too much. So stop being a Basher and be a Faller.
+ pingu->set_action(Actions::Faller);
}
else
{
- // Note that Pingu::set_pos() is the 'reverse' of the y co-ords of
- // rel_getpixel()
- pingu->set_pos(pingu->get_x() + static_cast<int>(pingu->direction),
- pingu->get_y() - y_inc);
+ // Note that Pingu::set_pos() is the 'reverse' of the y co-ords of
+ // rel_getpixel()
+ pingu->set_pos(pingu->get_x() + static_cast<int>(pingu->direction),
+ pingu->get_y() - y_inc);
}
}
Index: basher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- basher.hxx 8 Oct 2002 17:53:10 -0000 1.13
+++ basher.hxx 13 Oct 2002 16:40:00 -0000 1.14
@@ -42,8 +42,7 @@
enum { max_steps_down = 3 };
public:
- Basher ();
- void init (void);
+ Basher (Pingu* p);
std::string get_name () const { return "Basher"; }
ActionName get_type () const { return Actions::Basher; }
Index: blocker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- blocker.cxx 4 Oct 2002 13:46:56 -0000 1.13
+++ blocker.cxx 13 Oct 2002 16:40:00 -0000 1.14
@@ -29,12 +29,8 @@
namespace Actions {
-Blocker::Blocker()
-{
-}
-
-void
-Blocker::init(void)
+Blocker::Blocker(Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite(PingusResource::load_surface ("Pingus/blocker"
+ to_string (pingu->get_owner
()),
Index: blocker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- blocker.hxx 1 Oct 2002 19:53:45 -0000 1.12
+++ blocker.hxx 13 Oct 2002 16:40:01 -0000 1.13
@@ -31,8 +31,7 @@
Sprite sprite;
public:
- Blocker ();
- void init ();
+ Blocker (Pingu* p);
int y_offset ();
Index: boarder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- boarder.cxx 1 Oct 2002 19:53:45 -0000 1.11
+++ boarder.cxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -26,12 +26,9 @@
namespace Actions {
-Boarder::Boarder () : x_pos(0), speed(0.0)
-{
-}
-
-void
-Boarder::init()
+Boarder::Boarder (Pingu* p)
+ : PinguAction(p),
+ x_pos(0), speed(0.0)
{
x_pos = pingu->get_x();
speed = 0.0;
Index: boarder.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- boarder.hxx 1 Oct 2002 19:53:45 -0000 1.11
+++ boarder.hxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -35,8 +35,7 @@
double speed;
Sprite sprite;
public:
- Boarder ();
- void init();
+ Boarder (Pingu* p);
std::string get_name () const { return "Boarder"; }
ActionName get_type () const { return Actions::Boarder; }
Index: bomber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- bomber.cxx 12 Oct 2002 00:49:10 -0000 1.19
+++ bomber.cxx 13 Oct 2002 16:40:01 -0000 1.20
@@ -38,23 +38,13 @@
CL_Surface Bomber::bomber_radius;
CL_Surface Bomber::bomber_radius_gfx;
-Bomber::Bomber ()
- : particle_thrown(false),
+Bomber::Bomber (Pingu* p)
+ : PinguAction(p),
+ particle_thrown(false),
sound_played(false),
gfx_exploded(false),
colmap_exploded(false)
{
-}
-
-void
-Bomber::on_successfull_apply ()
-{
- WorldObj::get_world()->play_wav("sounds/ohno.wav", pingu->get_pos ());
-}
-
-void
-Bomber::init ()
-{
// Only load the surface again if no static_surface is available
if (!static_surface_loaded)
{
@@ -69,6 +59,12 @@
sprite.set_align_center_bottom ();
sound_played = false;
+}
+
+void
+Bomber::on_successfull_apply ()
+{
+ WorldObj::get_world()->play_wav("sounds/ohno.wav", pingu->get_pos ());
}
void
Index: bomber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- bomber.hxx 12 Oct 2002 00:49:10 -0000 1.14
+++ bomber.hxx 13 Oct 2002 16:40:01 -0000 1.15
@@ -43,9 +43,8 @@
CL_Surface explo_surf;
public:
- Bomber ();
-
- void init (void);
+ Bomber (Pingu* p);
+
std::string get_name () const { return "Bomber"; }
ActionName get_type() const { return Actions::Bomber; }
ActionType get_activation_mode() const { return COUNTDOWN_TRIGGERED; }
Index: bridger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.cxx,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- bridger.cxx 7 Oct 2002 23:10:20 -0000 1.22
+++ bridger.cxx 13 Oct 2002 16:40:01 -0000 1.23
@@ -40,16 +40,12 @@
CL_Surface Bridger::brick_r;
CL_Surface Bridger::static_surface;
-Bridger::Bridger () : mode(B_BUILDING),
- bricks(MAX_BRICKS),
- block_build(false),
- name("Bridger (" + to_string(bricks) + ")")
-
-{
-}
-
-void
-Bridger::init (void)
+Bridger::Bridger (Pingu* p)
+ : PinguAction(p),
+ mode(B_BUILDING),
+ bricks(MAX_BRICKS),
+ block_build(false),
+ name("Bridger (" + to_string(bricks) + ")")
{
if (!static_surfaces_loaded)
{
Index: bridger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- bridger.hxx 1 Oct 2002 19:53:45 -0000 1.15
+++ bridger.hxx 13 Oct 2002 16:40:01 -0000 1.16
@@ -53,9 +53,8 @@
std::string name;
public:
- Bridger();
+ Bridger(Pingu*);
- void init ();
std::string get_name () const;
ActionName get_type () const { return Actions::Bridger; }
Index: climber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- climber.cxx 4 Oct 2002 11:38:29 -0000 1.16
+++ climber.cxx 13 Oct 2002 16:40:01 -0000 1.17
@@ -24,12 +24,8 @@
namespace Actions {
-Climber::Climber()
-{
-}
-
-void
-Climber::init(void)
+Climber::Climber(Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite ("Pingus/climber0", "pingus");
Index: climber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- climber.hxx 1 Oct 2002 19:53:45 -0000 1.11
+++ climber.hxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -30,8 +30,7 @@
private:
Sprite sprite;
public:
- Climber ();
- void init ();
+ Climber (Pingu*);
std::string get_name () const { return "Climber"; }
ActionName get_type () const { return Actions::Climber; }
Index: digger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- digger.cxx 1 Oct 2002 19:53:45 -0000 1.16
+++ digger.cxx 13 Oct 2002 16:40:01 -0000 1.17
@@ -30,12 +30,9 @@
namespace Actions {
-Digger::Digger () : digger_c(0)
-{
-}
-
-void
-Digger::init (void)
+Digger::Digger (Pingu* p)
+ : PinguAction(p),
+ digger_c(0)
{
digger_radius = PingusResource::load_surface ("Other/digger_radius",
"pingus");
digger_radius_gfx = PingusResource::load_surface ("Other/digger_radius",
"pingus");
Index: digger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- digger.hxx 4 Oct 2002 13:46:56 -0000 1.11
+++ digger.hxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -34,8 +34,7 @@
int digger_c;
public:
- Digger();
- void init (void);
+ Digger(Pingu*);
std::string get_name () const { return "Digger"; }
ActionName get_type () const { return Actions::Digger; }
Index: drown.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- drown.cxx 1 Oct 2002 19:53:45 -0000 1.10
+++ drown.cxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -24,8 +24,8 @@
namespace Actions {
-void
-Drown::init ()
+Drown::Drown (Pingu* p)
+ : PinguAction(p)
{
//if (pingu->environment == ENV_AIR)
sprite = Sprite("Pingus/drownfall0", "pingus", 60.0f,
Index: drown.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- drown.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ drown.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -31,8 +31,7 @@
Sprite sprite;
public:
- Drown () { }
- void init ();
+ Drown (Pingu* p);
std::string get_name () const { return "Drown"; }
ActionName get_type () const { return Actions::Drown; }
Index: exiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- exiter.cxx 1 Oct 2002 19:53:45 -0000 1.10
+++ exiter.cxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -25,8 +25,8 @@
namespace Actions {
-void
-Exiter::init (void)
+Exiter::Exiter(Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite("Pingus/exit0", "pingus", 10.0f, Sprite::NONE, Sprite::ONCE);
sprite.set_align_center_bottom();
Index: exiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- exiter.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ exiter.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -31,7 +31,7 @@
Sprite sprite;
public:
- Exiter () { }
+ Exiter(Pingu*);
void init(void);
std::string get_name () const { return "Exiter"; }
ActionName get_type() const { return Actions::Exiter; }
Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- faller.cxx 4 Oct 2002 11:38:29 -0000 1.28
+++ faller.cxx 13 Oct 2002 16:40:01 -0000 1.29
@@ -31,13 +31,10 @@
const float Faller::deadly_velocity = 20.0f;
-Faller::Faller() : falling(0) { }
-
-Faller::~Faller() { }
-
-void
-Faller::init(void)
-{
+Faller::Faller(Pingu* p)
+ : PinguAction(p),
+ falling(0)
+{
faller = Sprite("Pingus/faller" + to_string(pingu->get_owner ()), "pingus");
faller.set_align_center_bottom ();
@@ -46,6 +43,8 @@
tumbler = Sprite("Pingus/tumble" + to_string(pingu->get_owner()), "pingus");
tumbler.set_align_center_bottom();
}
+
+Faller::~Faller() { }
void
Faller::update ()
Index: faller.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- faller.hxx 1 Oct 2002 19:53:45 -0000 1.15
+++ faller.hxx 13 Oct 2002 16:40:01 -0000 1.16
@@ -36,10 +36,8 @@
static const float deadly_velocity;
public:
- Faller();
+ Faller(Pingu*);
virtual ~Faller();
-
- void init(void);
void draw (GraphicContext& gc);
void update();
Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- floater.cxx 4 Oct 2002 13:46:56 -0000 1.19
+++ floater.cxx 13 Oct 2002 16:40:01 -0000 1.20
@@ -24,12 +24,9 @@
namespace Actions {
-Floater::Floater() : falling_depth(0), step(0)
-{
-}
-
-void
-Floater::init(void)
+Floater::Floater(Pingu* p)
+ : PinguAction(p),
+ falling_depth(0), step(0)
{
falling_depth = 0;
step = 0;
Index: floater.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- floater.hxx 1 Oct 2002 19:53:45 -0000 1.12
+++ floater.hxx 13 Oct 2002 16:40:01 -0000 1.13
@@ -32,7 +32,7 @@
int step;
Sprite sprite;
public:
- Floater();
+ Floater(Pingu* p);
std::string get_name() const { return "Floater"; }
ActionName get_type() const { return Actions::Floater; }
Index: jumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- jumper.cxx 4 Oct 2002 11:38:29 -0000 1.15
+++ jumper.cxx 13 Oct 2002 16:40:01 -0000 1.16
@@ -25,13 +25,8 @@
namespace Actions {
-Jumper::Jumper ()
-{
- // do nothing
-}
-
-void
-Jumper::init ()
+Jumper::Jumper (Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite("Pingus/jumper" + to_string(pingu->get_owner ()),
"pingus");
Index: jumper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- jumper.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ jumper.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -30,9 +30,8 @@
private:
Sprite sprite;
public:
- Jumper();
+ Jumper(Pingu*);
- void init(void);
std::string get_name() const { return "Jumper"; }
ActionName get_type() const { return Actions::Jumper; }
Index: laser_kill.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- laser_kill.cxx 1 Oct 2002 19:53:45 -0000 1.11
+++ laser_kill.cxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -24,12 +24,8 @@
namespace Actions {
-LaserKill::LaserKill()
-{
-}
-
-void
-LaserKill::init (void)
+LaserKill::LaserKill(Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite ("Other/laser_kill", "pingus",
20.0f, Sprite::NONE, Sprite::ONCE);
Index: laser_kill.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- laser_kill.hxx 1 Oct 2002 19:53:45 -0000 1.11
+++ laser_kill.hxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -33,7 +33,8 @@
Sprite sprite;
public:
- LaserKill ();
+ LaserKill (Pingu*);
+
std::string get_name () const { return "LaserKill"; }
ActionName get_type () const { return Actions::Laserkill; }
void init (void);
Index: miner.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- miner.cxx 4 Oct 2002 11:38:29 -0000 1.14
+++ miner.cxx 13 Oct 2002 16:40:01 -0000 1.15
@@ -28,12 +28,8 @@
namespace Actions {
-Miner::Miner()
-{
-}
-
-void
-Miner::init (void)
+Miner::Miner(Pingu* p)
+ : PinguAction(p)
{
miner_radius = PingusResource::load_surface("Other/bash_radius", "pingus");
miner_radius_gfx = PingusResource::load_surface("Other/bash_radius_gfx",
"pingus");
Index: miner.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- miner.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ miner.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -33,10 +33,9 @@
Sprite sprite;
int slow_count;
public:
- Miner ();
+ Miner (Pingu* p);
virtual ~Miner () {}
- void init (void);
std::string get_name () const { return "Miner"; }
ActionName get_type () const { return Actions::Miner; }
Index: rocket_launcher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- rocket_launcher.cxx 1 Oct 2002 19:53:45 -0000 1.10
+++ rocket_launcher.cxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -29,8 +29,8 @@
namespace Actions {
-void
-RocketLauncher::init ()
+RocketLauncher::RocketLauncher(Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite (PingusResource::load_surface
("Pingus/rocketlauncher" + to_string(pingu->get_owner ()),
Index: rocket_launcher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- rocket_launcher.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ rocket_launcher.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -31,10 +31,8 @@
Sprite sprite;
bool launched;
public:
- RocketLauncher () {}
- ~RocketLauncher () {}
-
- void init ();
+ RocketLauncher(Pingu*);
+ ~RocketLauncher() {}
std::string get_name () const { return "RocketLauncher"; }
ActionName get_type () const { return Actions::Rocketlauncher; }
Index: slider.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- slider.cxx 12 Oct 2002 00:24:26 -0000 1.14
+++ slider.cxx 13 Oct 2002 16:40:01 -0000 1.15
@@ -25,12 +25,8 @@
namespace Actions {
-Slider::Slider ()
-{
-}
-
-void
-Slider::init (void)
+Slider::Slider (Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite("Pingus/slider" + to_string(pingu->get_owner()),
"pingus");
Index: slider.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- slider.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ slider.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -31,9 +31,8 @@
Sprite sprite;
float speed;
public:
- Slider ();
+ Slider (Pingu* p);
- void init(void);
std::string get_name() const { return "Slider"; }
ActionName get_type() const { return Actions::Slider; }
Index: smashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- smashed.cxx 1 Oct 2002 19:53:45 -0000 1.10
+++ smashed.cxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -24,8 +24,8 @@
namespace Actions {
-void
-Smashed::init (void)
+Smashed::Smashed (Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite("Pingus/bomber0", "pingus");
sound_played = false;
Index: smashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- smashed.hxx 1 Oct 2002 19:53:45 -0000 1.11
+++ smashed.hxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -35,8 +35,8 @@
Sprite sprite;
public:
- Smashed () { }
- void init (void);
+ Smashed (Pingu*);
+
std::string get_name () const { return "Smashed"; }
ActionName get_type () const { return Actions::Smashed; }
Index: splashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- splashed.cxx 1 Oct 2002 19:53:45 -0000 1.10
+++ splashed.cxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -26,12 +26,8 @@
namespace Actions {
-Splashed::Splashed (void)
-{
-}
-
-void
-Splashed::init (void)
+Splashed::Splashed (Pingu* p)
+ : PinguAction(p)
{
sprite = Sprite("Pingus/splat0", "pingus", 30.0f,
Sprite::NONE, Sprite::ONCE);
Index: splashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- splashed.hxx 1 Oct 2002 19:53:45 -0000 1.11
+++ splashed.hxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -32,8 +32,7 @@
bool sound_played;
Sprite sprite;
public:
- Splashed();
- void init (void);
+ Splashed(Pingu*);
std::string get_name () const { return "Splashed"; }
ActionName get_type () const { return Actions::Splashed; }
Index: superman.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- superman.cxx 1 Oct 2002 19:53:45 -0000 1.8
+++ superman.cxx 13 Oct 2002 16:40:01 -0000 1.9
@@ -25,12 +25,8 @@
namespace Actions {
-Superman::Superman ()
-{
-}
-
-void
-Superman::init ()
+Superman::Superman (Pingu* p)
+ : PinguAction(p)
{
x_pos = pingu->get_x();
counter = 0.0;
Index: superman.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/superman.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- superman.hxx 1 Oct 2002 19:53:45 -0000 1.11
+++ superman.hxx 13 Oct 2002 16:40:01 -0000 1.12
@@ -33,8 +33,8 @@
Sprite sprite;
public:
- Superman ();
- void init ();
+ Superman (Pingu*);
+
std::string get_name () const { return "Superman"; }
ActionName get_type () const { return Actions::Superman; }
Index: teleported.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- teleported.cxx 1 Oct 2002 19:53:45 -0000 1.9
+++ teleported.cxx 13 Oct 2002 16:40:01 -0000 1.10
@@ -23,12 +23,9 @@
namespace Actions {
-Teleported::Teleported(void) : sound_played(false)
-{
-}
-
-void
-Teleported::init(void)
+Teleported::Teleported(Pingu* p)
+ : PinguAction(p),
+ sound_played(false)
{
sprite = Sprite ("Pingus/bomber0", "pingus");
}
Index: teleported.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- teleported.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ teleported.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -30,11 +30,10 @@
bool sound_played;
Sprite sprite;
public:
- Teleported();
+ Teleported(Pingu*);
std::string get_name() const { return "Teleported"; }
ActionName get_type() const { return Actions::Teleported; }
- void init(void);
void draw (GraphicContext& gc);
void update();
Index: waiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- waiter.cxx 1 Oct 2002 19:53:45 -0000 1.10
+++ waiter.cxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -25,8 +25,12 @@
namespace Actions {
-Waiter::Waiter ()
+Waiter::Waiter (Pingu* p)
+ : PinguAction(p)
{
+ sprite = PingusResource::load_surface("Pingus/blocker0", "pingus");
+ sprite.set_align_center_bottom();
+ countdown = 2.0;
}
void
@@ -38,14 +42,6 @@
pingu->set_action(Actions::Walker);
countdown -= 0.025f;
-}
-
-void
-Waiter::init ()
-{
- sprite = PingusResource::load_surface("Pingus/blocker0", "pingus");
- sprite.set_align_center_bottom();
- countdown = 2.0;
}
void
Index: waiter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- waiter.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ waiter.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -35,8 +35,7 @@
Sprite sprite;
public:
- Waiter();
- void init();
+ Waiter(Pingu*);
std::string get_name() const { return "Waiter"; }
ActionName get_type() const { return Actions::Waiter; }
Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- walker.cxx 4 Oct 2002 11:38:29 -0000 1.27
+++ walker.cxx 13 Oct 2002 16:40:01 -0000 1.28
@@ -27,8 +27,8 @@
namespace Actions {
-void
-Walker::init (void)
+Walker::Walker (Pingu* p)
+ : PinguAction(p)
{
walker = Sprite("Pingus/walker" + to_string(pingu->get_owner ()), "pingus");
walker.set_align_center_bottom();
Index: walker.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- walker.hxx 1 Oct 2002 19:53:45 -0000 1.10
+++ walker.hxx 13 Oct 2002 16:40:01 -0000 1.11
@@ -33,8 +33,7 @@
enum { max_steps = 5 }; // max nr. of pixels that pingu can walk up/down
public:
- Walker () { }
- void init (void);
+ Walker (Pingu*);
void draw (GraphicContext& gc);
void update ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.13,1.14 angel.hxx,1.12,1.13 basher.cxx,1.20,1.21 basher.hxx,1.13,1.14 blocker.cxx,1.13,1.14 blocker.hxx,1.12,1.13 boarder.cxx,1.11,1.12 boarder.hxx,1.11,1.12 bomber.cxx,1.19,1.20 bomber.hxx,1.14,1.15 bridger.cxx,1.22,1.23 bridger.hxx,1.15,1.16 climber.cxx,1.16,1.17 climber.hxx,1.11,1.12 digger.cxx,1.16,1.17 digger.hxx,1.11,1.12 drown.cxx,1.10,1.11 drown.hxx,1.10,1.11 exiter.cxx,1.10,1.11 exiter.hxx,1.10,1.11 faller.cxx,1.28,1.29 faller.hxx,1.15,1.16 floater.cxx,1.19,1.20 floater.hxx,1.12,1.13 jumper.cxx,1.15,1.16 jumper.hxx,1.10,1.11 laser_kill.cxx,1.11,1.12 laser_kill.hxx,1.11,1.12 miner.cxx,1.14,1.15 miner.hxx,1.10,1.11 rocket_launcher.cxx,1.10,1.11 rocket_launcher.hxx,1.10,1.11 slider.cxx,1.14,1.15 slider.hxx,1.10,1.11 smashed.cxx,1.10,1.11 smashed.hxx,1.11,1.12 splashed.cxx,1.10,1.11 splashed.hxx,1.11,1.12 superman.cxx,1.8,1.9 superman.hxx,1.11,1.12 teleported.cxx,1.9,1.10 teleported.hxx,1.10,1.11 waiter.cxx,1.10,1.11 waiter.hxx,1.10,1.11 walker.cxx,1.27,1.28 walker.hxx,1.10,1.11,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.35,1.36 pingu_action.cxx,1.8,1.9 pingu_action.hxx,1.18,1.19 pingu_action_factory.cxx,1.8,1.9 pingu_action_factory.hxx,1.7,1.8
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap dot.cxx,1.2,1.3 dot.hxx,1.3,1.4 graph.hxx,1.15,1.16 level_dot.cxx,1.3,1.4 path_drawable.cxx,1.1,1.2 path_drawable.hxx,1.1,1.2 path_graph.cxx,1.5,1.6 path_graph.hxx,1.2,1.3
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.35,1.36 pingu_action.cxx,1.8,1.9 pingu_action.hxx,1.18,1.19 pingu_action_factory.cxx,1.8,1.9 pingu_action_factory.hxx,1.7,1.8
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap dot.cxx,1.2,1.3 dot.hxx,1.3,1.4 graph.hxx,1.15,1.16 level_dot.cxx,1.3,1.4 path_drawable.cxx,1.1,1.2 path_drawable.hxx,1.1,1.2 path_graph.cxx,1.5,1.6 path_graph.hxx,1.2,1.3
- Index(es):