[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.6,1.7 bumper.h
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.6,1.7 bumper.hxx,1.5,1.6 conveyor_belt.cxx,1.16,1.17 conveyor_belt.hxx,1.13,1.14 fake_exit.cxx,1.5,1.6 fake_exit.hxx,1.4,1.5 groundpiece.cxx,1.2,1.3 groundpiece.hxx,1.4,1.5 guillotine.cxx,1.4,1.5 guillotine.hxx,1.4,1.5 hammer.cxx,1.4,1.5 hammer.hxx,1.5,1.6 hotspot.cxx,1.2,1.3 hotspot.hxx,1.3,1.4 ice_block.cxx,1.16,1.17 ice_block.hxx,1.12,1.13 info_box.cxx,1.14,1.15 info_box.hxx,1.13,1.14 laser_exit.cxx,1.5,1.6 laser_exit.hxx,1.4,1.5 liquid.cxx,1.1,1.2 liquid.hxx,1.2,1.3 rain_generator.hxx,1.4,1.5 smasher.cxx,1.8,1.9 smasher.hxx,1.5,1.6 solid_color_background.cxx,1.1,1.2 solid_color_background.hxx,1.2,1.3 spike.cxx,1.4,1.5 spike.hxx,1.4,1.5 starfield_background.cxx,1.2,1.3 starfield_background.hxx,1.3,1.4 surface_background.cxx,1.1,1.2 surface_background.hxx,1.2,1.3 switch_door.cxx,1.18,1.19 switch_door.hxx,1.15,1.16 teleporter.cxx,1.10,1.11 teleporter.hxx,1.14,1.15 thunderstorm_background.cxx,1.1,1.2 thunderstorm_background.hxx,1.2,1.3 |
Date: |
27 Sep 2002 18:36:43 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv9961/worldobjs
Modified Files:
bumper.cxx bumper.hxx conveyor_belt.cxx conveyor_belt.hxx
fake_exit.cxx fake_exit.hxx groundpiece.cxx groundpiece.hxx
guillotine.cxx guillotine.hxx hammer.cxx hammer.hxx
hotspot.cxx hotspot.hxx ice_block.cxx ice_block.hxx
info_box.cxx info_box.hxx laser_exit.cxx laser_exit.hxx
liquid.cxx liquid.hxx rain_generator.hxx smasher.cxx
smasher.hxx solid_color_background.cxx
solid_color_background.hxx spike.cxx spike.hxx
starfield_background.cxx starfield_background.hxx
surface_background.cxx surface_background.hxx switch_door.cxx
switch_door.hxx teleporter.cxx teleporter.hxx
thunderstorm_background.cxx thunderstorm_background.hxx
Log Message:
changed parameter passing of the data objects to const &
Index: bumper.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/bumper.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- bumper.cxx 16 Sep 2002 22:51:33 -0000 1.6
+++ bumper.cxx 27 Sep 2002 18:36:40 -0000 1.7
@@ -29,11 +29,11 @@
namespace WorldObjs {
-Bumper::Bumper (WorldObjsData::BumperData* data_) : upwards(false),
- count(0),
- data(new
WorldObjsData::BumperData(*data_))
+Bumper::Bumper (const WorldObjsData::BumperData& data_) : data(new
WorldObjsData::BumperData(data_)),
+ upwards(false),
+ count(0)
+
{
- assert(data);
}
Bumper::~Bumper ()
@@ -69,7 +69,7 @@
}
void
-Bumper::on_startup()
+Bumper::on_startup ()
{
std::cout << "Drawing colmap entry" << std::endl;
@@ -80,21 +80,25 @@
void
Bumper::draw (GraphicContext& gc)
{
- gc.draw (data->surface, data->pos, count);
+ gc.draw(data->surface, data->pos, count);
}
void
-Bumper::catch_pingu(Pingu* pingu)
+Bumper::catch_pingu (Pingu* pingu)
{
- if (pingu->get_y() > data->pos.y + 60 && pingu->get_y() < data->pos.y + 100)
+ if ( pingu->get_y() > data->pos.y + 60
+ && pingu->get_y() < data->pos.y + 100)
{
- if (pingu->get_x() > data->pos.x + 28 && pingu->get_x() < data->pos.x +
32)
+ if ( pingu->get_x() > data->pos.x + 28
+ && pingu->get_x() < data->pos.x + 32)
{
if (!upwards)
upwards = true;
}
- if (upwards && pingu->get_x() > data->pos.x + 0 && pingu->get_x() <
data->pos.x + 60)
+ if ( upwards
+ && pingu->get_x() > data->pos.x + 0
+ && pingu->get_x() < data->pos.x + 60)
{
pingu->apply_force(CL_Vector((pingu->get_x() - 30)/6, -5));
}
Index: bumper.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/bumper.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- bumper.hxx 27 Sep 2002 11:26:49 -0000 1.5
+++ bumper.hxx 27 Sep 2002 18:36:40 -0000 1.6
@@ -33,13 +33,12 @@
class Bumper : public WorldObj
{
private:
+ WorldObjsData::BumperData* const data;
bool upwards;
int count;
- WorldObjsData::BumperData* const data;
-
public:
- Bumper (WorldObjsData::BumperData* data_);
+ Bumper (const WorldObjsData::BumperData& data_);
~Bumper ();
float get_z_pos () const;
Index: conveyor_belt.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/conveyor_belt.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- conveyor_belt.cxx 16 Sep 2002 22:51:33 -0000 1.16
+++ conveyor_belt.cxx 27 Sep 2002 18:36:40 -0000 1.17
@@ -29,8 +29,8 @@
namespace WorldObjs {
-ConveyorBelt::ConveyorBelt (WorldObjsData::ConveyorBeltData* data_)
- : data(new WorldObjsData::ConveyorBeltData(*data_)),
+ConveyorBelt::ConveyorBelt (const WorldObjsData::ConveyorBeltData& data_)
+ : data(new WorldObjsData::ConveyorBeltData(data_)),
left_sur (PingusResource::load_surface ("conveyorbelt_left",
"worldobjs")),
right_sur (PingusResource::load_surface ("conveyorbelt_right",
"worldobjs")),
middle_sur(PingusResource::load_surface ("conveyorbelt_middle",
"worldobjs"))
@@ -54,7 +54,7 @@
}
void
-ConveyorBelt::on_startup()
+ConveyorBelt::on_startup ()
{
CL_Surface sur(PingusResource::load_surface("conveyorbelt_cmap",
"worldobjs"));
for (int i=0; i < (data->width + 2); ++i)
Index: conveyor_belt.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/conveyor_belt.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- conveyor_belt.hxx 27 Sep 2002 11:26:49 -0000 1.13
+++ conveyor_belt.hxx 27 Sep 2002 18:36:41 -0000 1.14
@@ -40,10 +40,10 @@
CL_Surface middle_sur;
public:
- ConveyorBelt (WorldObjsData::ConveyorBeltData* data_);
+ ConveyorBelt (const WorldObjsData::ConveyorBeltData& data_);
void draw (GraphicContext& gc);
- void on_startup();
+ void on_startup ();
void update (float delta);
float get_z_pos () const;
Index: fake_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/fake_exit.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- fake_exit.cxx 16 Sep 2002 16:47:41 -0000 1.5
+++ fake_exit.cxx 27 Sep 2002 18:36:41 -0000 1.6
@@ -27,9 +27,9 @@
namespace WorldObjs {
-FakeExit::FakeExit (WorldObjsData::FakeExitData* data_)
- : smashing(false),
- data (new WorldObjsData::FakeExitData(*data_))
+FakeExit::FakeExit (const WorldObjsData::FakeExitData& data_)
+ : data (new WorldObjsData::FakeExitData(data_)),
+ smashing(false)
{
data->counter.set_size(data->surface.get_num_frames());
data->counter.set_type(GameCounter::once);
@@ -79,7 +79,7 @@
}
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)
+ && pingu->get_y() > data->pos.y + 56 && pingu->get_y() < data->pos.y +
56 + 56)
{
if (pingu->get_action()->get_type() != Actions::Splashed)
{
Index: fake_exit.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/fake_exit.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- fake_exit.hxx 27 Sep 2002 11:26:49 -0000 1.4
+++ fake_exit.hxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -36,11 +36,11 @@
class FakeExit : public WorldObj
{
private:
- bool smashing;
WorldObjsData::FakeExitData* const data;
+ bool smashing;
public:
- FakeExit (WorldObjsData::FakeExitData* data_);
+ FakeExit (const WorldObjsData::FakeExitData& data_);
~FakeExit ();
float get_z_pos () const;
Index: groundpiece.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/groundpiece.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- groundpiece.cxx 16 Sep 2002 20:31:09 -0000 1.2
+++ groundpiece.cxx 27 Sep 2002 18:36:41 -0000 1.3
@@ -21,33 +21,38 @@
#include "../pingu_map.hxx"
#include "../col_map.hxx"
#include "../pingus_resource.hxx"
+#include "../worldobjsdata/groundpiece_data.hxx"
#include "groundpiece.hxx"
namespace WorldObjs {
-Groundpiece::Groundpiece(const WorldObjsData::GroundpieceData& data_)
- : data(data_),
- surface (PingusResource::load_surface(data.desc))
+Groundpiece::Groundpiece (const WorldObjsData::GroundpieceData& data_)
+ : data(new WorldObjsData::GroundpieceData(data_)),
+ surface (PingusResource::load_surface(data->desc))
{
// FIXME: we don't need to load surfaces here, providers would be
// FIXME: enough and should be faster
}
+Groundpiece::~Groundpiece ()
+{
+ delete data;
+}
+
void
-Groundpiece::on_startup()
+Groundpiece::on_startup ()
{
// FIXME: overdrawing of bridges and similar things aren't handled
// FIXME: here
- if (data.gptype == Groundtype::GP_REMOVE)
- get_world()->get_gfx_map()->remove(surface, int(data.pos.x),
int(data.pos.y));
+ if (data->gptype == Groundtype::GP_REMOVE)
+ get_world()->get_gfx_map()->remove(surface, static_cast<int>(data->pos.x),
static_cast<int>(data->pos.y));
else
- get_world()->get_gfx_map()->put(surface, int(data.pos.x), int(data.pos.y));
+ get_world()->get_gfx_map()->put(surface, static_cast<int>(data->pos.x),
static_cast<int>(data->pos.y));
- if (data.gptype == Groundtype::GP_REMOVE)
- get_world()->get_colmap()->remove(surface, int(data.pos.x),
int(data.pos.y));
+ if (data->gptype == Groundtype::GP_REMOVE)
+ get_world()->get_colmap()->remove(surface, static_cast<int>(data->pos.x),
static_cast<int>(data->pos.y));
else
- get_world()->get_colmap()->put(surface, int(data.pos.x), int(data.pos.y),
- data.gptype);
+ get_world()->get_colmap()->put(surface, static_cast<int>(data->pos.x),
static_cast<int>(data->pos.y), data->gptype);
}
} // namespace WorldObjs
Index: groundpiece.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/groundpiece.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- groundpiece.hxx 27 Sep 2002 11:26:49 -0000 1.4
+++ groundpiece.hxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -17,11 +17,14 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#ifndef HEADER_GROUNDPIECE_HXX
-#define HEADER_GROUNDPIECE_HXX
+#ifndef HEADER_PINGUS_WORLDOBJS_GROUNDPIECE_HXX
+#define HEADER_PINGUS_WORLDOBJS_GROUNDPIECE_HXX
#include "../worldobj.hxx"
-#include "../worldobjsdata/groundpiece_data.hxx"
+
+namespace WorldObjsData {
+class GroundpieceData;
+}
namespace WorldObjs {
@@ -30,18 +33,18 @@
class Groundpiece : public WorldObj
{
private:
- WorldObjsData::GroundpieceData data;
+ WorldObjsData::GroundpieceData* const data;
CL_Surface surface;
public:
Groundpiece (const WorldObjsData::GroundpieceData& data_);
- ~Groundpiece() {};
+ ~Groundpiece ();
float get_z_pos () const { return 0; }
- void draw(GraphicContext&) {}
- void on_startup();
- bool purge_after_startup() { return true; }
+ void draw (GraphicContext&) {}
+ void on_startup ();
+ bool purge_after_startup () { return true; }
private:
Groundpiece (const Groundpiece&);
Groundpiece& operator= (const Groundpiece&);
Index: guillotine.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/guillotine.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- guillotine.cxx 14 Sep 2002 19:06:34 -0000 1.4
+++ guillotine.cxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -26,9 +26,9 @@
namespace WorldObjs {
-Guillotine::Guillotine (WorldObjsData::GuillotineData* data_)
- : killing(false),
- data (new WorldObjsData::GuillotineData(*data_))
+Guillotine::Guillotine (const WorldObjsData::GuillotineData& data_)
+ : data(new WorldObjsData::GuillotineData(data_)),
+ killing(false)
{
data->counter.set_size(data->surface.get_num_frames()/2);
data->counter.set_type(GameCounter::once);
Index: guillotine.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/guillotine.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- guillotine.hxx 27 Sep 2002 11:26:49 -0000 1.4
+++ guillotine.hxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -28,17 +28,16 @@
class Pingu;
-
namespace WorldObjs {
class Guillotine : public WorldObj
{
private:
- bool killing;
WorldObjsData::GuillotineData* const data;
+ bool killing;
public:
- Guillotine (WorldObjsData::GuillotineData* data_);
+ Guillotine (const WorldObjsData::GuillotineData& data_);
~Guillotine ();
float get_z_pos () const;
Index: hammer.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/hammer.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hammer.cxx 14 Sep 2002 19:06:34 -0000 1.4
+++ hammer.cxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -26,8 +26,8 @@
namespace WorldObjs {
-Hammer::Hammer (WorldObjsData::HammerData* data_) : particle_thrown(false),
- data (new
WorldObjsData::HammerData(*data_))
+Hammer::Hammer (const WorldObjsData::HammerData& data_) : data(new
WorldObjsData::HammerData(data_)),
+
particle_thrown(false)
{
data->counter.set_size(data->surface.get_num_frames());
data->counter.set_type(GameCounter::ping_pong);
Index: hammer.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/hammer.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hammer.hxx 27 Sep 2002 11:26:49 -0000 1.5
+++ hammer.hxx 27 Sep 2002 18:36:41 -0000 1.6
@@ -33,11 +33,11 @@
class Hammer : public WorldObj
{
private:
- bool particle_thrown;
WorldObjsData::HammerData* const data;
+ bool particle_thrown;
public:
- Hammer (WorldObjsData::HammerData* data_);
+ Hammer (const WorldObjsData::HammerData& data_);
~Hammer ();
float get_z_pos () const;
Index: hotspot.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/hotspot.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hotspot.cxx 24 Sep 2002 16:46:45 -0000 1.2
+++ hotspot.cxx 27 Sep 2002 18:36:41 -0000 1.3
@@ -24,8 +24,8 @@
namespace WorldObjs {
-Hotspot::Hotspot (WorldObjsData::HotspotData* data_)
- : data(new WorldObjsData::HotspotData(*data_)),
+Hotspot::Hotspot (const WorldObjsData::HotspotData& data_)
+ : data(new WorldObjsData::HotspotData(data_)),
sprite(data->desc)
{
if (verbose > 2)
Index: hotspot.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/hotspot.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hotspot.hxx 27 Sep 2002 11:26:49 -0000 1.3
+++ hotspot.hxx 27 Sep 2002 18:36:41 -0000 1.4
@@ -36,7 +36,7 @@
Sprite sprite;
public:
- Hotspot (WorldObjsData::HotspotData* data_);
+ Hotspot (const WorldObjsData::HotspotData& data_);
~Hotspot ();
void draw (GraphicContext& gc);
Index: ice_block.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/ice_block.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- ice_block.cxx 16 Sep 2002 22:51:33 -0000 1.16
+++ ice_block.cxx 27 Sep 2002 18:36:41 -0000 1.17
@@ -31,8 +31,8 @@
namespace WorldObjs {
-IceBlock::IceBlock (WorldObjsData::IceBlockData* data_)
- : data(new WorldObjsData::IceBlockData(*data_)),
+IceBlock::IceBlock (const WorldObjsData::IceBlockData& data_)
+ : data(new WorldObjsData::IceBlockData(data_)),
thickness(1.0),
is_finished(false),
last_contact(0),
@@ -46,7 +46,7 @@
}
void
-IceBlock::on_startup()
+IceBlock::on_startup ()
{
CL_Surface surf(PingusResource::load_surface("iceblock_cmap", "worldobjs"));
Index: ice_block.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/ice_block.hxx,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- ice_block.hxx 27 Sep 2002 11:26:49 -0000 1.12
+++ ice_block.hxx 27 Sep 2002 18:36:41 -0000 1.13
@@ -39,11 +39,11 @@
CL_Surface block_sur;
public:
- IceBlock (WorldObjsData::IceBlockData* data_);
+ IceBlock (const WorldObjsData::IceBlockData& data_);
~IceBlock ();
float get_z_pos () const { return 100; }
- void on_startup();
+ void on_startup ();
void draw (GraphicContext& gc);
void update (float delta);
Index: info_box.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/info_box.cxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- info_box.cxx 17 Sep 2002 16:23:30 -0000 1.14
+++ info_box.cxx 27 Sep 2002 18:36:41 -0000 1.15
@@ -30,12 +30,12 @@
namespace WorldObjs {
-InfoBox::InfoBox (WorldObjsData::InfoBoxData* data_)
- : data(new WorldObjsData::InfoBoxData(*data_)),
+InfoBox::InfoBox (const WorldObjsData::InfoBoxData& data_)
+ : data(new WorldObjsData::InfoBoxData(data_)),
sprite("infobox", "worldobjs"),
is_open (false)
{
- sprite.set_align_center_bottom ();
+ sprite.set_align_center_bottom();
}
InfoBox::~InfoBox ()
Index: info_box.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/info_box.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- info_box.hxx 27 Sep 2002 11:26:49 -0000 1.13
+++ info_box.hxx 27 Sep 2002 18:36:41 -0000 1.14
@@ -37,7 +37,7 @@
bool is_open;
public:
- InfoBox (WorldObjsData::InfoBoxData* data_);
+ InfoBox (const WorldObjsData::InfoBoxData& data_);
~InfoBox ();
void draw (GraphicContext& gc);
Index: laser_exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/laser_exit.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- laser_exit.cxx 14 Sep 2002 19:06:34 -0000 1.5
+++ laser_exit.cxx 27 Sep 2002 18:36:41 -0000 1.6
@@ -27,8 +27,8 @@
namespace WorldObjs {
-LaserExit::LaserExit (WorldObjsData::LaserExitData* data_) : killing(false),
- data (new
WorldObjsData::LaserExitData(*data_))
+LaserExit::LaserExit (const WorldObjsData::LaserExitData& data_) : data(new
WorldObjsData::LaserExitData(data_)),
+
killing(false)
{
data->counter.set_size(data->surface.get_num_frames());
data->counter.set_type(GameCounter::once);
Index: laser_exit.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/laser_exit.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- laser_exit.hxx 27 Sep 2002 11:26:49 -0000 1.4
+++ laser_exit.hxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -33,11 +33,11 @@
class LaserExit : public WorldObj
{
private:
- bool killing;
WorldObjsData::LaserExitData* const data;
+ bool killing;
public:
- LaserExit (WorldObjsData::LaserExitData* data_);
+ LaserExit (const WorldObjsData::LaserExitData& data_);
~LaserExit ();
float get_z_pos () const;
Index: liquid.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/liquid.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- liquid.cxx 25 Sep 2002 17:21:39 -0000 1.1
+++ liquid.cxx 27 Sep 2002 18:36:41 -0000 1.2
@@ -26,8 +26,8 @@
namespace WorldObjs {
-Liquid::Liquid (WorldObjsData::LiquidData* data_) :
- data(new WorldObjsData::LiquidData(*data_)),
+Liquid::Liquid (const WorldObjsData::LiquidData& data_) :
+ data(new WorldObjsData::LiquidData(data_)),
sur(PingusResource::load_surface(data->desc.res_name, "global"))
{
if (!data->old_width_handling)
Index: liquid.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/liquid.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- liquid.hxx 27 Sep 2002 11:26:49 -0000 1.2
+++ liquid.hxx 27 Sep 2002 18:36:41 -0000 1.3
@@ -40,7 +40,7 @@
public:
CL_Surface colmap_sur;
- Liquid (WorldObjsData::LiquidData* data_);
+ Liquid (const WorldObjsData::LiquidData& data_);
~Liquid ();
float get_z_pos () const;
Index: rain_generator.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/rain_generator.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- rain_generator.hxx 27 Sep 2002 11:26:49 -0000 1.4
+++ rain_generator.hxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -31,12 +31,12 @@
float thunder_count;
float waiter_count;
public:
- RainGenerator();
- ~RainGenerator();
+ RainGenerator ();
+ ~RainGenerator ();
- void update(float delta);
- void draw(GraphicContext& gc);
- float get_z_pos() const { return 1000; }
+ void update (float delta);
+ void draw (GraphicContext& gc);
+ float get_z_pos () const { return 1000; }
private:
RainGenerator (const RainGenerator&);
Index: smasher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/smasher.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- smasher.cxx 18 Sep 2002 10:50:57 -0000 1.8
+++ smasher.cxx 27 Sep 2002 18:36:41 -0000 1.9
@@ -33,11 +33,11 @@
namespace WorldObjs {
-Smasher::Smasher (WorldObjsData::SmasherData* data_)
- : smashing(false),
+Smasher::Smasher (const WorldObjsData::SmasherData& data_)
+ : data (new WorldObjsData::SmasherData(data_)),
+ smashing(false),
downwards(false),
- count(0),
- data (new WorldObjsData::SmasherData(*data_))
+ count(0)
{
}
@@ -112,7 +112,7 @@
}
void
-Smasher::on_startup()
+Smasher::on_startup ()
{
std::cout << "Drawing colmap entry" << std::endl;
world->get_colmap()->put(PingusResource::load_surface("Traps/smasher_cmap",
"traps"),
Index: smasher.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/smasher.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- smasher.hxx 27 Sep 2002 11:26:49 -0000 1.5
+++ smasher.hxx 27 Sep 2002 18:36:41 -0000 1.6
@@ -33,19 +33,19 @@
class Smasher : public WorldObj
{
private:
+ WorldObjsData::SmasherData* const data;
bool smashing;
bool downwards;
int count;
- WorldObjsData::SmasherData* const data;
public:
- Smasher (WorldObjsData::SmasherData* data_);
+ Smasher (const WorldObjsData::SmasherData& data_);
~Smasher ();
float get_z_pos () const;
void draw (GraphicContext& gc);
- void on_startup();
+ void on_startup ();
void update (float delta);
protected:
Index: solid_color_background.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjs/solid_color_background.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- solid_color_background.cxx 15 Sep 2002 09:54:34 -0000 1.1
+++ solid_color_background.cxx 27 Sep 2002 18:36:41 -0000 1.2
@@ -23,8 +23,8 @@
namespace WorldObjs {
-SolidColorBackground::SolidColorBackground
(WorldObjsData::SolidColorBackgroundData* data_)
- : data(new WorldObjsData::SolidColorBackgroundData(*data_))
+SolidColorBackground::SolidColorBackground (const
WorldObjsData::SolidColorBackgroundData& data_)
+ : data(new WorldObjsData::SolidColorBackgroundData(data_))
{
}
Index: solid_color_background.hxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjs/solid_color_background.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- solid_color_background.hxx 27 Sep 2002 11:26:49 -0000 1.2
+++ solid_color_background.hxx 27 Sep 2002 18:36:41 -0000 1.3
@@ -34,7 +34,7 @@
WorldObjsData::SolidColorBackgroundData* data;
public:
- SolidColorBackground (WorldObjsData::SolidColorBackgroundData* data_);
+ SolidColorBackground (const WorldObjsData::SolidColorBackgroundData& data_);
~SolidColorBackground ();
// FIXME: Make z_position editable
Index: spike.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/spike.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- spike.cxx 14 Sep 2002 19:06:34 -0000 1.4
+++ spike.cxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -26,8 +26,8 @@
namespace WorldObjs {
-Spike::Spike (WorldObjsData::SpikeData* data_) : killing(false),
- data (new
WorldObjsData::SpikeData(*data_))
+Spike::Spike (const WorldObjsData::SpikeData& data_) : data(new
WorldObjsData::SpikeData(data_)),
+ killing(false)
{
data->counter.set_size(data->surface.get_num_frames());
data->counter.set_type(GameCounter::once);
Index: spike.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/spike.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- spike.hxx 27 Sep 2002 11:26:49 -0000 1.4
+++ spike.hxx 27 Sep 2002 18:36:41 -0000 1.5
@@ -34,11 +34,11 @@
class Spike : public WorldObj
{
private:
- bool killing;
WorldObjsData::SpikeData* data;
+ bool killing;
public:
- Spike (WorldObjsData::SpikeData* data_);
+ Spike (const WorldObjsData::SpikeData& data_);
~Spike ();
float get_z_pos () const;
Index: starfield_background.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjs/starfield_background.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- starfield_background.cxx 24 Sep 2002 14:51:36 -0000 1.2
+++ starfield_background.cxx 27 Sep 2002 18:36:41 -0000 1.3
@@ -23,8 +23,8 @@
namespace WorldObjs {
-StarfieldBackground::StarfieldBackground
(WorldObjsData::StarfieldBackgroundData* data_)
- : data(new WorldObjsData::StarfieldBackgroundData(*data_))
+StarfieldBackground::StarfieldBackground (const
WorldObjsData::StarfieldBackgroundData& data_)
+ : data(new WorldObjsData::StarfieldBackgroundData(data_))
{
int i;
Index: starfield_background.hxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjs/starfield_background.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- starfield_background.hxx 27 Sep 2002 11:26:49 -0000 1.3
+++ starfield_background.hxx 27 Sep 2002 18:36:41 -0000 1.4
@@ -38,7 +38,7 @@
std::vector<StarfieldBackgroundStars*> stars;
public:
- StarfieldBackground (WorldObjsData::StarfieldBackgroundData* data_);
+ StarfieldBackground (const WorldObjsData::StarfieldBackgroundData& data_);
~StarfieldBackground ();
// FIXME: Make z_pos handling editable via xml
Index: surface_background.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/surface_background.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- surface_background.cxx 16 Sep 2002 20:52:22 -0000 1.1
+++ surface_background.cxx 27 Sep 2002 18:36:41 -0000 1.2
@@ -30,10 +30,10 @@
namespace WorldObjs {
-SurfaceBackground::SurfaceBackground (WorldObjsData::SurfaceBackgroundData*
data_)
+SurfaceBackground::SurfaceBackground (const
WorldObjsData::SurfaceBackgroundData& data_)
: scroll_ox(0),
scroll_oy(0),
- data(new WorldObjsData::SurfaceBackgroundData(*data_))
+ data(new WorldObjsData::SurfaceBackgroundData(data_))
{
Timer timer;
Index: surface_background.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/surface_background.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- surface_background.hxx 27 Sep 2002 11:26:49 -0000 1.2
+++ surface_background.hxx 27 Sep 2002 18:36:41 -0000 1.3
@@ -45,7 +45,7 @@
WorldObjsData::SurfaceBackgroundData* const data;
public:
- SurfaceBackground (WorldObjsData::SurfaceBackgroundData* data_);
+ SurfaceBackground (const WorldObjsData::SurfaceBackgroundData& data_);
~SurfaceBackground ();
float get_z_pos () const;
Index: switch_door.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/switch_door.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- switch_door.cxx 16 Sep 2002 22:51:33 -0000 1.18
+++ switch_door.cxx 27 Sep 2002 18:36:41 -0000 1.19
@@ -29,12 +29,12 @@
namespace WorldObjs {
-SwitchDoor::SwitchDoor (WorldObjsData::SwitchDoorData* data_)
- : door_box (PingusResource::load_surface("switchdoor_box" ,
"worldobjs")),
+SwitchDoor::SwitchDoor (const WorldObjsData::SwitchDoorData& data_)
+ : data(new WorldObjsData::SwitchDoorData(data_)),
+ door_box (PingusResource::load_surface("switchdoor_box" ,
"worldobjs")),
door_tile (PingusResource::load_surface("switchdoor_tile" ,
"worldobjs")),
door_tile_cmap(PingusResource::load_surface("switchdoor_tile_cmap",
"worldobjs")),
switch_sur (PingusResource::load_surface("switchdoor_switch" ,
"worldobjs")),
- data(new WorldObjsData::SwitchDoorData(*data_)),
is_opening(false),
current_door_height(data->door_height)
{
@@ -46,7 +46,7 @@
}
void
-SwitchDoor::on_startup()
+SwitchDoor::on_startup ()
{
world->get_colmap()->put(door_box,
static_cast<int>(data->door_pos.x),
Index: switch_door.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/switch_door.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- switch_door.hxx 27 Sep 2002 11:26:49 -0000 1.15
+++ switch_door.hxx 27 Sep 2002 18:36:41 -0000 1.16
@@ -33,13 +33,13 @@
class SwitchDoor : public WorldObj
{
private:
+ WorldObjsData::SwitchDoorData* const data;
+
CL_Surface door_box;
CL_Surface door_tile;
CL_Surface door_tile_cmap;
CL_Surface switch_sur;
- WorldObjsData::SwitchDoorData* const data;
-
/** True if the door is opening */
bool is_opening;
@@ -48,7 +48,7 @@
int current_door_height;
public:
- SwitchDoor (WorldObjsData::SwitchDoorData* data_);
+ SwitchDoor (const WorldObjsData::SwitchDoorData& data_);
~SwitchDoor ();
void on_startup();
Index: teleporter.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/teleporter.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- teleporter.cxx 14 Sep 2002 19:06:34 -0000 1.10
+++ teleporter.cxx 27 Sep 2002 18:36:41 -0000 1.11
@@ -27,8 +27,8 @@
namespace WorldObjs {
-Teleporter::Teleporter (WorldObjsData::TeleporterData* data_)
- : data(new WorldObjsData::TeleporterData(*data_))
+Teleporter::Teleporter (const WorldObjsData::TeleporterData& data_)
+ : data(new WorldObjsData::TeleporterData(data_))
{
data->sprite.set_align_center_bottom();
Index: teleporter.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/teleporter.hxx,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- teleporter.hxx 27 Sep 2002 11:26:49 -0000 1.14
+++ teleporter.hxx 27 Sep 2002 18:36:41 -0000 1.15
@@ -33,7 +33,7 @@
private:
WorldObjsData::TeleporterData* const data;
public:
- Teleporter (WorldObjsData::TeleporterData* data_);
+ Teleporter (const WorldObjsData::TeleporterData& data_);
~Teleporter ();
int get_z_pos () { return 0; }
Index: thunderstorm_background.cxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjs/thunderstorm_background.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- thunderstorm_background.cxx 18 Sep 2002 15:00:37 -0000 1.1
+++ thunderstorm_background.cxx 27 Sep 2002 18:36:41 -0000 1.2
@@ -23,10 +23,10 @@
namespace WorldObjs {
-ThunderstormBackground::ThunderstormBackground
(WorldObjsData::ThunderstormBackgroundData* data_)
- : clouds_sur(PingusResource::load_surface("Textures/thunderstorm",
"textures")),
- x_pos(0),
- data(new WorldObjsData::ThunderstormBackgroundData(*data_))
+ThunderstormBackground::ThunderstormBackground (const
WorldObjsData::ThunderstormBackgroundData& data_)
+ : data(new WorldObjsData::ThunderstormBackgroundData(data_)),
+ clouds_sur(PingusResource::load_surface("Textures/thunderstorm",
"textures")),
+ x_pos(0)
{
// flash_sur.push_back(PingusResource::load_surface("flash1",
"thunderstorm"));
// flash_sur.push_back(PingusResource::load_surface("flash2",
"thunderstorm"));
Index: thunderstorm_background.hxx
===================================================================
RCS file:
/usr/local/cvsroot/Games/Pingus/src/worldobjs/thunderstorm_background.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- thunderstorm_background.hxx 27 Sep 2002 11:26:49 -0000 1.2
+++ thunderstorm_background.hxx 27 Sep 2002 18:36:41 -0000 1.3
@@ -31,13 +31,13 @@
class ThunderstormBackground : public WorldObj
{
private:
+ WorldObjsData::ThunderstormBackgroundData* const data;
CL_Surface clouds_sur;
//std::vector<CL_Surface> flash_sur;
int x_pos;
- WorldObjsData::ThunderstormBackgroundData* const data;
public:
- ThunderstormBackground (WorldObjsData::ThunderstormBackgroundData* data_);
+ ThunderstormBackground (const WorldObjsData::ThunderstormBackgroundData&
data_);
~ThunderstormBackground ();
float get_z_pos () const;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjs bumper.cxx,1.6,1.7 bumper.hxx,1.5,1.6 conveyor_belt.cxx,1.16,1.17 conveyor_belt.hxx,1.13,1.14 fake_exit.cxx,1.5,1.6 fake_exit.hxx,1.4,1.5 groundpiece.cxx,1.2,1.3 groundpiece.hxx,1.4,1.5 guillotine.cxx,1.4,1.5 guillotine.hxx,1.4,1.5 hammer.cxx,1.4,1.5 hammer.hxx,1.5,1.6 hotspot.cxx,1.2,1.3 hotspot.hxx,1.3,1.4 ice_block.cxx,1.16,1.17 ice_block.hxx,1.12,1.13 info_box.cxx,1.14,1.15 info_box.hxx,1.13,1.14 laser_exit.cxx,1.5,1.6 laser_exit.hxx,1.4,1.5 liquid.cxx,1.1,1.2 liquid.hxx,1.2,1.3 rain_generator.hxx,1.4,1.5 smasher.cxx,1.8,1.9 smasher.hxx,1.5,1.6 solid_color_background.cxx,1.1,1.2 solid_color_background.hxx,1.2,1.3 spike.cxx,1.4,1.5 spike.hxx,1.4,1.5 starfield_background.cxx,1.2,1.3 starfield_background.hxx,1.3,1.4 surface_background.cxx,1.1,1.2 surface_background.hxx,1.2,1.3 switch_door.cxx,1.18,1.19 switch_door.hxx,1.15,1.16 teleporter.cxx,1.10,1.11 teleporter.hxx,1.14,1.15 thunderstorm_background.cxx,1.1,1.2 thunderstorm_background.hxx,1.2,1.3,
torangan <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs bumper_obj.cxx,1.7,1.8 bumper_obj.hxx,1.6,1.7 conveyor_belt_obj.cxx,1.3,1.4 conveyor_belt_obj.hxx,1.3,1.4 fake_exit_obj.cxx,1.8,1.9 fake_exit_obj.hxx,1.7,1.8 groundpiece_obj.cxx,1.1,1.2 groundpiece_obj.hxx,1.1,1.2 guillotine_obj.cxx,1.7,1.8 guillotine_obj.hxx,1.6,1.7 hammer_obj.cxx,1.7,1.8 hammer_obj.hxx,1.6,1.7 hotspot_obj.cxx,1.1,1.2 hotspot_obj.hxx,1.2,1.3 ice_block_obj.cxx,1.3,1.4 ice_block_obj.hxx,1.2,1.3 info_box_obj.cxx,1.2,1.3 info_box_obj.hxx,1.3,1.4 laser_exit_obj.cxx,1.8,1.9 laser_exit_obj.hxx,1.6,1.7 liquid_obj.cxx,1.1,1.2 liquid_obj.hxx,1.2,1.3 smasher_obj.cxx,1.6,1.7 smasher_obj.hxx,1.7,1.8 solid_color_background_obj.cxx,1.2,1.3 solid_color_background_obj.hxx,1.2,1.3 spike_obj.cxx,1.7,1.8 spike_obj.hxx,1.6,1.7 starfield_background_obj.cxx,1.1,1.2 starfield_background_obj.hxx,1.2,1.3 surface_background_obj.cxx,1.2,1.3 surface_background_obj.hxx,1.2,1.3 switch_door_obj.cxx,1.4,1.5 switch_door_obj.hxx,1.4,1.5 teleporter_obj.cxx,1.5,1.6 teleporter_obj.hxx,1.6,1.7 thunderstorm_background_obj.cxx,1.1,1.2 thunderstorm_background_obj.hxx,1.2,1.3
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/editor object_selector.cxx,1.27,1.28
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editorobjs bumper_obj.cxx,1.7,1.8 bumper_obj.hxx,1.6,1.7 conveyor_belt_obj.cxx,1.3,1.4 conveyor_belt_obj.hxx,1.3,1.4 fake_exit_obj.cxx,1.8,1.9 fake_exit_obj.hxx,1.7,1.8 groundpiece_obj.cxx,1.1,1.2 groundpiece_obj.hxx,1.1,1.2 guillotine_obj.cxx,1.7,1.8 guillotine_obj.hxx,1.6,1.7 hammer_obj.cxx,1.7,1.8 hammer_obj.hxx,1.6,1.7 hotspot_obj.cxx,1.1,1.2 hotspot_obj.hxx,1.2,1.3 ice_block_obj.cxx,1.3,1.4 ice_block_obj.hxx,1.2,1.3 info_box_obj.cxx,1.2,1.3 info_box_obj.hxx,1.3,1.4 laser_exit_obj.cxx,1.8,1.9 laser_exit_obj.hxx,1.6,1.7 liquid_obj.cxx,1.1,1.2 liquid_obj.hxx,1.2,1.3 smasher_obj.cxx,1.6,1.7 smasher_obj.hxx,1.7,1.8 solid_color_background_obj.cxx,1.2,1.3 solid_color_background_obj.hxx,1.2,1.3 spike_obj.cxx,1.7,1.8 spike_obj.hxx,1.6,1.7 starfield_background_obj.cxx,1.1,1.2 starfield_background_obj.hxx,1.2,1.3 surface_background_obj.cxx,1.2,1.3 surface_background_obj.hxx,1.2,1.3 switch_door_obj.cxx,1.4,1.5 switch_door_obj.hxx,1.4,1.5 teleporter_obj.cxx,1.5,1.6 teleporter_obj.hxx,1.6,1.7 thunderstorm_background_obj.cxx,1.1,1.2 thunderstorm_background_obj.hxx,1.2,1.3
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/editor object_selector.cxx,1.27,1.28
- Index(es):