[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.14,1.15 basher.cx
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.14,1.15 basher.cxx,1.21,1.22 blocker.cxx,1.14,1.15 boarder.cxx,1.12,1.13 bomber.cxx,1.20,1.21 bomber.hxx,1.15,1.16 bridger.cxx,1.23,1.24 bridger.hxx,1.16,1.17 climber.cxx,1.17,1.18 digger.cxx,1.17,1.18 drown.cxx,1.11,1.12 exiter.cxx,1.11,1.12 faller.cxx,1.29,1.30 floater.cxx,1.20,1.21 jumper.cxx,1.16,1.17 laser_kill.cxx,1.12,1.13 miner.cxx,1.15,1.16 rocket_launcher.cxx,1.11,1.12 slider.cxx,1.15,1.16 smashed.cxx,1.11,1.12 smashed.hxx,1.12,1.13 splashed.cxx,1.11,1.12 splashed.hxx,1.12,1.13 superman.cxx,1.9,1.10 teleported.cxx,1.10,1.11 teleported.hxx,1.11,1.12 waiter.cxx,1.11,1.12 waiter.hxx,1.11,1.12 walker.cxx,1.28,1.29 |
Date: |
13 Oct 2002 20:25:02 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv16015/actions
Modified Files:
angel.cxx basher.cxx blocker.cxx boarder.cxx bomber.cxx
bomber.hxx bridger.cxx bridger.hxx climber.cxx digger.cxx
drown.cxx exiter.cxx faller.cxx floater.cxx jumper.cxx
laser_kill.cxx miner.cxx rocket_launcher.cxx slider.cxx
smashed.cxx smashed.hxx splashed.cxx splashed.hxx superman.cxx
teleported.cxx teleported.hxx waiter.cxx waiter.hxx walker.cxx
Log Message:
some small cleanup
Index: angel.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/angel.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- angel.cxx 13 Oct 2002 16:39:59 -0000 1.14
+++ angel.cxx 13 Oct 2002 20:25:00 -0000 1.15
@@ -27,17 +27,13 @@
namespace Actions {
-Angel::Angel(Pingu* p)
+Angel::Angel (Pingu* p)
: PinguAction(p),
counter(0.0),
- x_pos(0)
+ x_pos(pingu->get_x()),
+ sprite(PingusResource::load_surface("Pingus/angel" +
to_string(pingu->get_owner()), "pingus"))
{
- x_pos = pingu->get_x();
- counter = 0.0;
- sprite = Sprite (PingusResource::load_surface
- ("Pingus/angel" + to_string(pingu->get_owner ()),
- "pingus"));
- sprite.set_align_center_bottom ();
+ sprite.set_align_center_bottom();
}
void
Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- basher.cxx 13 Oct 2002 16:39:59 -0000 1.21
+++ basher.cxx 13 Oct 2002 20:25:00 -0000 1.22
@@ -32,17 +32,17 @@
Basher::Basher (Pingu* p)
: PinguAction(p),
+ sprite(PingusResource::load_surface("Pingus/basher0", "pingus")),
+ bash_radius(PingusResource::load_surface("Other/bash_radius", "pingus")),
+ bash_radius_gfx(PingusResource::load_surface("Other/bash_radius_gfx",
"pingus")),
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");
- sprite = Sprite (PingusResource::load_surface ("Pingus/basher0", "pingus"));
- sprite.set_align_center_bottom ();
+ sprite.set_align_center_bottom();
// Start a bash even so the action will stops instantly after the
// first bash
- bash ();
+ bash();
}
void
Index: blocker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/blocker.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- blocker.cxx 13 Oct 2002 16:40:00 -0000 1.14
+++ blocker.cxx 13 Oct 2002 20:25:00 -0000 1.15
@@ -30,20 +30,18 @@
namespace Actions {
Blocker::Blocker(Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ sprite(PingusResource::load_surface("Pingus/blocker" +
to_string(pingu->get_owner()), "pingus"))
{
- sprite = Sprite(PingusResource::load_surface ("Pingus/blocker"
- + to_string (pingu->get_owner
()),
- "pingus"));
- sprite.set_align_center_bottom ();
+ sprite.set_align_center_bottom();
- if (rel_getpixel(0,-1) == Groundtype::GP_NOTHING
+ if ( rel_getpixel(0,-1) == Groundtype::GP_NOTHING
&& rel_getpixel(0, -2) == Groundtype::GP_GROUND)
{
pingu->set_x(pingu->get_x() + 1);
}
- else if (rel_getpixel(0,-1) == Groundtype::GP_NOTHING
- && rel_getpixel(0, -2) == Groundtype::GP_NOTHING
+ else if ( rel_getpixel(0,-1) == Groundtype::GP_NOTHING
+ && rel_getpixel(0,-2) == Groundtype::GP_NOTHING
&& rel_getpixel(0,-3) == Groundtype::GP_GROUND)
{
pingu->set_y(pingu->get_y() + 2);
Index: boarder.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/boarder.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- boarder.cxx 13 Oct 2002 16:40:01 -0000 1.12
+++ boarder.cxx 13 Oct 2002 20:25:00 -0000 1.13
@@ -28,26 +28,23 @@
Boarder::Boarder (Pingu* p)
: PinguAction(p),
- x_pos(0), speed(0.0)
+ x_pos(pingu->get_x()),
+ speed(0.0),
+ sprite(PingusResource::load_surface("Pingus/boarder" +
to_string(pingu->get_owner ()), "pingus"))
{
- x_pos = pingu->get_x();
- speed = 0.0;
- sprite = Sprite (PingusResource::load_surface
- ("Pingus/boarder" + to_string(pingu->get_owner ()),
- "pingus"));
- sprite.set_align_center_bottom ();
+ sprite.set_align_center_bottom();
}
void
-Boarder::update()
+Boarder::update ()
{
- if (pingu->direction.is_left ())
+ if (pingu->direction.is_left())
sprite.set_direction(Sprite::LEFT);
else
sprite.set_direction(Sprite::RIGHT);
- sprite.update ();
+ sprite.update();
- if (on_ground ())
+ if (on_ground())
{
if (speed < 15.0)
speed += 15.0 * 25.0f/1000.0f;
Index: bomber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- bomber.cxx 13 Oct 2002 16:40:01 -0000 1.20
+++ bomber.cxx 13 Oct 2002 20:25:00 -0000 1.21
@@ -43,7 +43,9 @@
particle_thrown(false),
sound_played(false),
gfx_exploded(false),
- colmap_exploded(false)
+ colmap_exploded(false),
+ sprite(PingusResource::load_surface("Pingus/bomber" +
to_string(pingu->get_owner()), "pingus"), 17.0f, Sprite::NONE, Sprite::ONCE),
+ explo_surf(PingusResource::load_surface("Other/explo" +
to_string(pingu->get_owner()), "pingus"))
{
// Only load the surface again if no static_surface is available
if (!static_surface_loaded)
@@ -52,13 +54,7 @@
bomber_radius = PingusResource::load_surface ("Other/bomber_radius",
"pingus");
bomber_radius_gfx = PingusResource::load_surface
("Other/bomber_radius_gfx", "pingus");
}
-
- explo_surf = PingusResource::load_surface ("Other/explo" + to_string
(pingu->get_owner ()), "pingus");
- sprite = Sprite(PingusResource::load_surface ("Pingus/bomber" +
to_string(pingu->get_owner ()), "pingus"),
- 17.0f, Sprite::NONE, Sprite::ONCE);
- sprite.set_align_center_bottom ();
-
- sound_played = false;
+ sprite.set_align_center_bottom();
}
void
Index: bomber.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bomber.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- bomber.hxx 13 Oct 2002 16:40:01 -0000 1.15
+++ bomber.hxx 13 Oct 2002 20:25:00 -0000 1.16
@@ -36,10 +36,10 @@
bool colmap_exploded;
static bool static_surface_loaded;
- Sprite sprite;
static CL_Surface bomber_radius;
static CL_Surface bomber_radius_gfx;
+ Sprite sprite;
CL_Surface explo_surf;
public:
Index: bridger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.cxx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- bridger.cxx 13 Oct 2002 16:40:01 -0000 1.23
+++ bridger.cxx 13 Oct 2002 20:25:00 -0000 1.24
@@ -33,8 +33,6 @@
namespace Actions {
// Initialise class static
-const int Bridger::brick_length = 16;
-
bool Bridger::static_surfaces_loaded = false;
CL_Surface Bridger::brick_l;
CL_Surface Bridger::brick_r;
@@ -43,6 +41,8 @@
Bridger::Bridger (Pingu* p)
: PinguAction(p),
mode(B_BUILDING),
+ walk_sprite(Sprite("Pingus/bridger_walk" + to_string(pingu->get_owner()),
"pingus", 15.0f, Sprite::NONE, Sprite::ONCE)),
+ build_sprite(Sprite("Pingus/bridger_build" +
to_string(pingu->get_owner()), "pingus", 15.0f, Sprite::NONE, Sprite::ONCE)),
bricks(MAX_BRICKS),
block_build(false),
name("Bridger (" + to_string(bricks) + ")")
@@ -54,12 +54,9 @@
brick_r = PingusResource::load_surface ("Other/brick_right", "pingus");
static_surfaces_loaded = true;
}
- build_sprite = Sprite ("Pingus/bridger_build" + to_string(pingu->get_owner
()),
- "pingus", 15.0f, Sprite::NONE, Sprite::ONCE);
- walk_sprite = Sprite ("Pingus/bridger_walk" + to_string(pingu->get_owner ()),
- "pingus", 15.0f, Sprite::NONE, Sprite::ONCE);
- build_sprite.set_align_center_bottom ();
- walk_sprite.set_align_center_bottom ();
+
+ build_sprite.set_align_center_bottom();
+ walk_sprite.set_align_center_bottom();
}
void
Index: bridger.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/bridger.hxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- bridger.hxx 13 Oct 2002 16:40:01 -0000 1.16
+++ bridger.hxx 13 Oct 2002 20:25:00 -0000 1.17
@@ -32,14 +32,13 @@
private:
enum Mode { B_WALKING, B_BUILDING } mode;
enum { MAX_BRICKS = 15 };
+ enum { brick_length = 16 };
private:
Sprite walk_sprite;
Sprite build_sprite;
GameCounter counter;
-
- static const int brick_length;
static bool static_surfaces_loaded;
static CL_Surface static_surface;
Index: climber.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/climber.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- climber.cxx 13 Oct 2002 16:40:01 -0000 1.17
+++ climber.cxx 13 Oct 2002 20:25:00 -0000 1.18
@@ -24,30 +24,29 @@
namespace Actions {
-Climber::Climber(Pingu* p)
- : PinguAction(p)
+Climber::Climber (Pingu* p)
+ : PinguAction(p),
+ sprite(Sprite ("Pingus/climber0", "pingus"))
{
- sprite = Sprite ("Pingus/climber0", "pingus");
-
// these alignments are necessary to prevent climber walking
// inside the wall.
int sprite_height = sprite.get_height();
int sprite_width = sprite.get_width();
- if (pingu->direction.is_left ())
+ if (pingu->direction.is_left())
{
- sprite.set_align (0, -sprite_height/2);
- sprite.set_direction (Sprite::LEFT);
+ sprite.set_align(0, -sprite_height/2);
+ sprite.set_direction(Sprite::LEFT);
}
else
{
- sprite.set_align (-sprite_width, -sprite_height/2);
- sprite.set_direction (Sprite::RIGHT);
+ sprite.set_align(-sprite_width, -sprite_height/2);
+ sprite.set_direction(Sprite::RIGHT);
}
}
void
-Climber::update()
+Climber::update ()
{
/*
std::cout << "Climer update()" << std::endl;
Index: digger.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/digger.cxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- digger.cxx 13 Oct 2002 16:40:01 -0000 1.17
+++ digger.cxx 13 Oct 2002 20:25:00 -0000 1.18
@@ -32,18 +32,17 @@
Digger::Digger (Pingu* p)
: PinguAction(p),
+ digger_radius(PingusResource::load_surface ("Other/digger_radius",
"pingus")),
+ digger_radius_gfx(PingusResource::load_surface ("Other/digger_radius",
"pingus")),
+ sprite(Sprite (std::string("Pingus/digger") + to_string(pingu->get_owner
()), "pingus")),
digger_c(0)
{
- digger_radius = PingusResource::load_surface ("Other/digger_radius",
"pingus");
- digger_radius_gfx = PingusResource::load_surface ("Other/digger_radius",
"pingus");
- sprite = Sprite (std::string("Pingus/digger") + to_string(pingu->get_owner
()),
- "pingus");
#if 0
// FIXME: Just an idea...
sprite = Sprite (std::string("Pingus/digger") + to_string(pingu->get_owner
()),
"pingus", PropertyMgr::instance()->get_int
("actions/digger/sprite-fps", 20));
#endif
- sprite.set_align_center_bottom ();
+ sprite.set_align_center_bottom();
}
void
Index: drown.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/drown.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- drown.cxx 13 Oct 2002 16:40:01 -0000 1.11
+++ drown.cxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -25,15 +25,9 @@
namespace Actions {
Drown::Drown (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ sprite(Sprite("Pingus/drownfall0", "pingus", 60.0f, Sprite::NONE,
Sprite::ONCE))
{
- //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);
-
sprite.set_align_center_bottom();
}
Index: exiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/exiter.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- exiter.cxx 13 Oct 2002 16:40:01 -0000 1.11
+++ exiter.cxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -25,10 +25,10 @@
namespace Actions {
-Exiter::Exiter(Pingu* p)
- : PinguAction(p)
+Exiter::Exiter (Pingu* p)
+ : PinguAction(p),
+ sprite(Sprite("Pingus/exit0", "pingus", 10.0f, Sprite::NONE, Sprite::ONCE))
{
- sprite = Sprite("Pingus/exit0", "pingus", 10.0f, Sprite::NONE, Sprite::ONCE);
sprite.set_align_center_bottom();
}
Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- faller.cxx 13 Oct 2002 16:40:01 -0000 1.29
+++ faller.cxx 13 Oct 2002 20:25:00 -0000 1.30
@@ -31,20 +31,19 @@
const float Faller::deadly_velocity = 20.0f;
-Faller::Faller(Pingu* p)
+Faller::Faller (Pingu* p)
: PinguAction(p),
- falling(0)
+ faller(Sprite("Pingus/faller" + to_string(pingu->get_owner ()), "pingus")),
+ // FIXME: we can save some cpu cycles & memory if we do this when it
+ // is necessary
+ tumbler(Sprite("Pingus/tumble" + to_string(pingu->get_owner()), "pingus")),
+ falling(0)
{
- faller = Sprite("Pingus/faller" + to_string(pingu->get_owner ()), "pingus");
- faller.set_align_center_bottom ();
-
- // FIXME: we can save some cpu cycles & memory if we do this when it
- // is necessary
- tumbler = Sprite("Pingus/tumble" + to_string(pingu->get_owner()), "pingus");
+ faller .set_align_center_bottom();
tumbler.set_align_center_bottom();
}
-Faller::~Faller() { }
+Faller::~Faller () { }
void
Faller::update ()
Index: floater.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/floater.cxx,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -r1.20 -r1.21
--- floater.cxx 13 Oct 2002 16:40:01 -0000 1.20
+++ floater.cxx 13 Oct 2002 20:25:00 -0000 1.21
@@ -26,12 +26,11 @@
Floater::Floater(Pingu* p)
: PinguAction(p),
- falling_depth(0), step(0)
+ falling_depth(0),
+ step(0),
+ sprite(Sprite ("Pingus/floater0", "pingus"))
{
- falling_depth = 0;
- step = 0;
- sprite = Sprite ("Pingus/floater0", "pingus");
- sprite.set_align_center_bottom ();
+ sprite.set_align_center_bottom();
}
void
Index: jumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/jumper.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- jumper.cxx 13 Oct 2002 16:40:01 -0000 1.16
+++ jumper.cxx 13 Oct 2002 20:25:00 -0000 1.17
@@ -26,10 +26,9 @@
namespace Actions {
Jumper::Jumper (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ sprite(Sprite("Pingus/jumper" + to_string(pingu->get_owner ()), "pingus"))
{
- sprite = Sprite("Pingus/jumper" + to_string(pingu->get_owner ()),
- "pingus");
sprite.set_align_center_bottom();
}
Index: laser_kill.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/laser_kill.cxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- laser_kill.cxx 13 Oct 2002 16:40:01 -0000 1.12
+++ laser_kill.cxx 13 Oct 2002 20:25:00 -0000 1.13
@@ -25,10 +25,9 @@
namespace Actions {
LaserKill::LaserKill(Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ sprite(Sprite ("Other/laser_kill", "pingus", 20.0f, Sprite::NONE,
Sprite::ONCE))
{
- sprite = Sprite ("Other/laser_kill", "pingus",
- 20.0f, Sprite::NONE, Sprite::ONCE);
sprite.set_align_center_bottom();
}
Index: miner.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/miner.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- miner.cxx 13 Oct 2002 16:40:01 -0000 1.15
+++ miner.cxx 13 Oct 2002 20:25:00 -0000 1.16
@@ -28,14 +28,14 @@
namespace Actions {
-Miner::Miner(Pingu* p)
- : PinguAction(p)
+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")),
+ sprite(Sprite("Pingus/miner0", "pingus", 20.0f)),
+ slow_count(0)
{
- miner_radius = PingusResource::load_surface("Other/bash_radius", "pingus");
- miner_radius_gfx = PingusResource::load_surface("Other/bash_radius_gfx",
"pingus");
- sprite = Sprite("Pingus/miner0", "pingus", 20.0f);
sprite.set_align_center_bottom();
- slow_count = 0;
}
void
Index: rocket_launcher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/rocket_launcher.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- rocket_launcher.cxx 13 Oct 2002 16:40:01 -0000 1.11
+++ rocket_launcher.cxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -29,14 +29,12 @@
namespace Actions {
-RocketLauncher::RocketLauncher(Pingu* p)
- : PinguAction(p)
+RocketLauncher::RocketLauncher (Pingu* p)
+ : PinguAction(p),
+ sprite(PingusResource::load_surface("Pingus/rocketlauncher" +
to_string(pingu->get_owner()), "pingus"), 10.0f, Sprite::NONE, Sprite::ONCE),
+ launched(false)
{
- sprite = Sprite (PingusResource::load_surface
- ("Pingus/rocketlauncher" + to_string(pingu->get_owner ()),
- "pingus"), 10.0f, Sprite::NONE, Sprite::ONCE);
sprite.set_align_center_bottom();
- launched = false;
WorldObj::get_world()->get_particle_holder()->add_particle
(new ExplosiveParticle (static_cast<int>(pingu->get_x()),
Index: slider.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/slider.cxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- slider.cxx 13 Oct 2002 16:40:01 -0000 1.15
+++ slider.cxx 13 Oct 2002 20:25:00 -0000 1.16
@@ -26,12 +26,11 @@
namespace Actions {
Slider::Slider (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ sprite("Pingus/slider" + to_string(pingu->get_owner()), "pingus"),
+ speed(10)
{
- sprite = Sprite("Pingus/slider" + to_string(pingu->get_owner()),
- "pingus");
sprite.set_align_center_bottom();
- speed = 10;
}
void
Index: smashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- smashed.cxx 13 Oct 2002 16:40:01 -0000 1.11
+++ smashed.cxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -25,10 +25,10 @@
namespace Actions {
Smashed::Smashed (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ sound_played(false),
+ sprite("Pingus/bomber0", "pingus")
{
- sprite = Sprite("Pingus/bomber0", "pingus");
- sound_played = false;
sprite.set_align_center_bottom();
}
Index: smashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/smashed.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- smashed.hxx 13 Oct 2002 16:40:01 -0000 1.12
+++ smashed.hxx 13 Oct 2002 20:25:00 -0000 1.13
@@ -30,7 +30,6 @@
class Smashed : public PinguAction
{
private:
- bool particle_thrown;
bool sound_played;
Sprite sprite;
Index: splashed.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- splashed.cxx 13 Oct 2002 16:40:01 -0000 1.11
+++ splashed.cxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -27,14 +27,12 @@
namespace Actions {
Splashed::Splashed (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ particle_thrown(false),
+ sound_played(false),
+ sprite("Pingus/splat0", "pingus", 30.0f, Sprite::NONE, Sprite::ONCE)
{
- sprite = Sprite("Pingus/splat0", "pingus", 30.0f,
- Sprite::NONE, Sprite::ONCE);
sprite.set_align_center_bottom();
-
- sound_played = false;
- particle_thrown = false;
}
void
Index: splashed.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/splashed.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- splashed.hxx 13 Oct 2002 16:40:01 -0000 1.12
+++ splashed.hxx 13 Oct 2002 20:25:00 -0000 1.13
@@ -32,7 +32,7 @@
bool sound_played;
Sprite sprite;
public:
- Splashed(Pingu*);
+ 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.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- superman.cxx 13 Oct 2002 16:40:01 -0000 1.9
+++ superman.cxx 13 Oct 2002 20:25:00 -0000 1.10
@@ -26,13 +26,11 @@
namespace Actions {
Superman::Superman (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ counter(0.0f),
+ x_pos(pingu->get_x()),
+ sprite(PingusResource::load_surface("Pingus/superman" +
to_string(pingu->get_owner()), "pingus"))
{
- x_pos = pingu->get_x();
- counter = 0.0;
- sprite = Sprite (PingusResource::load_surface
- ("Pingus/superman" + to_string(pingu->get_owner ()),
- "pingus"));
sprite.set_align_center_bottom();
}
Index: teleported.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- teleported.cxx 13 Oct 2002 16:40:01 -0000 1.10
+++ teleported.cxx 13 Oct 2002 20:25:00 -0000 1.11
@@ -25,9 +25,9 @@
Teleported::Teleported(Pingu* p)
: PinguAction(p),
- sound_played(false)
+ sound_played(false),
+ sprite("Pingus/bomber0", "pingus")
{
- sprite = Sprite ("Pingus/bomber0", "pingus");
}
Index: teleported.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/teleported.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- teleported.hxx 13 Oct 2002 16:40:01 -0000 1.11
+++ teleported.hxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -30,7 +30,7 @@
bool sound_played;
Sprite sprite;
public:
- Teleported(Pingu*);
+ Teleported (Pingu*);
std::string get_name() const { return "Teleported"; }
ActionName get_type() const { return Actions::Teleported; }
Index: waiter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/waiter.cxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- waiter.cxx 13 Oct 2002 16:40:01 -0000 1.11
+++ waiter.cxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -26,11 +26,11 @@
namespace Actions {
Waiter::Waiter (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ countdown(2.0f),
+ sprite(PingusResource::load_surface("Pingus/blocker0", "pingus"))
{
- 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.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- waiter.hxx 13 Oct 2002 16:40:01 -0000 1.11
+++ waiter.hxx 13 Oct 2002 20:25:00 -0000 1.12
@@ -35,13 +35,13 @@
Sprite sprite;
public:
- Waiter(Pingu*);
+ Waiter (Pingu*);
- std::string get_name() const { return "Waiter"; }
- ActionName get_type() const { return Actions::Waiter; }
+ std::string get_name () const { return "Waiter"; }
+ ActionName get_type () const { return Actions::Waiter; }
void draw (GraphicContext& gc);
- void update();
+ void update ();
private:
Waiter (const Waiter&);
Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- walker.cxx 13 Oct 2002 16:40:01 -0000 1.28
+++ walker.cxx 13 Oct 2002 20:25:00 -0000 1.29
@@ -28,11 +28,11 @@
namespace Actions {
Walker::Walker (Pingu* p)
- : PinguAction(p)
+ : PinguAction(p),
+ walker("Pingus/walker" + to_string(pingu->get_owner()), "pingus")
{
- walker = Sprite("Pingus/walker" + to_string(pingu->get_owner ()), "pingus");
walker.set_align_center_bottom();
-
+
// Reset the velocity
pingu->set_velocity(Vector());
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions angel.cxx,1.14,1.15 basher.cxx,1.21,1.22 blocker.cxx,1.14,1.15 boarder.cxx,1.12,1.13 bomber.cxx,1.20,1.21 bomber.hxx,1.15,1.16 bridger.cxx,1.23,1.24 bridger.hxx,1.16,1.17 climber.cxx,1.17,1.18 digger.cxx,1.17,1.18 drown.cxx,1.11,1.12 exiter.cxx,1.11,1.12 faller.cxx,1.29,1.30 floater.cxx,1.20,1.21 jumper.cxx,1.16,1.17 laser_kill.cxx,1.12,1.13 miner.cxx,1.15,1.16 rocket_launcher.cxx,1.11,1.12 slider.cxx,1.15,1.16 smashed.cxx,1.11,1.12 smashed.hxx,1.12,1.13 splashed.cxx,1.11,1.12 splashed.hxx,1.12,1.13 superman.cxx,1.9,1.10 teleported.cxx,1.10,1.11 teleported.hxx,1.11,1.12 waiter.cxx,1.11,1.12 waiter.hxx,1.11,1.12 walker.cxx,1.28,1.29,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs exit.cxx,1.6,1.7 fake_exit.cxx,1.10,1.11 hammer.cxx,1.10,1.11 laser_exit.cxx,1.9,1.10 smasher.cxx,1.13,1.14
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap Makefile.am,1.9,1.10 graph.hxx,1.16,1.17 path_graph.cxx,1.7,1.8 path_graph.hxx,1.3,1.4 pathfinder.hxx,1.2,1.3 pingus.cxx,1.12,1.13 pingus.hxx,1.14,1.15 worldmap.cxx,1.19,1.20 worldmap.hxx,1.16,1.17
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs exit.cxx,1.6,1.7 fake_exit.cxx,1.10,1.11 hammer.cxx,1.10,1.11 laser_exit.cxx,1.9,1.10 smasher.cxx,1.13,1.14
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap Makefile.am,1.9,1.10 graph.hxx,1.16,1.17 path_graph.cxx,1.7,1.8 path_graph.hxx,1.3,1.4 pathfinder.hxx,1.2,1.3 pingus.cxx,1.12,1.13 pingus.hxx,1.14,1.15 worldmap.cxx,1.19,1.20 worldmap.hxx,1.16,1.17
- Index(es):