pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] CVS: Games/Pingus/src/editorobjs bumper_obj.cxx,1.7,1.8 bum


From: torangan
Subject: [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
Date: 27 Sep 2002 18:36:43 -0000

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

Modified Files:
        bumper_obj.cxx bumper_obj.hxx conveyor_belt_obj.cxx 
        conveyor_belt_obj.hxx fake_exit_obj.cxx fake_exit_obj.hxx 
        groundpiece_obj.cxx groundpiece_obj.hxx guillotine_obj.cxx 
        guillotine_obj.hxx hammer_obj.cxx hammer_obj.hxx 
        hotspot_obj.cxx hotspot_obj.hxx ice_block_obj.cxx 
        ice_block_obj.hxx info_box_obj.cxx info_box_obj.hxx 
        laser_exit_obj.cxx laser_exit_obj.hxx liquid_obj.cxx 
        liquid_obj.hxx smasher_obj.cxx smasher_obj.hxx 
        solid_color_background_obj.cxx solid_color_background_obj.hxx 
        spike_obj.cxx spike_obj.hxx starfield_background_obj.cxx 
        starfield_background_obj.hxx surface_background_obj.cxx 
        surface_background_obj.hxx switch_door_obj.cxx 
        switch_door_obj.hxx teleporter_obj.cxx teleporter_obj.hxx 
        thunderstorm_background_obj.cxx 
        thunderstorm_background_obj.hxx 
Log Message:
changed parameter passing of the data objects to const &


Index: bumper_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/bumper_obj.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- bumper_obj.cxx      11 Sep 2002 12:45:58 -0000      1.7
+++ bumper_obj.cxx      27 Sep 2002 18:36:40 -0000      1.8
@@ -24,13 +24,13 @@
 
 namespace EditorObjs {
 
-BumperObj::BumperObj (WorldObjsData::BumperData* data_)
-  : frame(0),
-    data(new WorldObjsData::BumperData(*data_))
+BumperObj::BumperObj (const WorldObjsData::BumperData& data_)
+  : data(new WorldObjsData::BumperData(data_)),
+    frame(0)
 {
   data->pos.z = -100;
   sprite = Sprite("Traps/bumper", "traps");
-  sprite.set_align_center_bottom ();
+  sprite.set_align_center_bottom();
 
   pos_ref = &data->pos;
 }
@@ -45,13 +45,13 @@
 {
   WorldObjsData::BumperData newdata;
   newdata.pos = pos;
-  return EditorObjLst(1, new BumperObj(&newdata));
+  return EditorObjLst(1, new BumperObj(newdata));
 }
 
 EditorObj*
 BumperObj::duplicate ()
 {
-  return new BumperObj(data);
+  return new BumperObj(*data);
 }
 
 void

Index: bumper_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/bumper_obj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- bumper_obj.hxx      27 Sep 2002 11:26:46 -0000      1.6
+++ bumper_obj.hxx      27 Sep 2002 18:36:40 -0000      1.7
@@ -30,26 +30,26 @@
 
 class BumperObj : public SpriteEditorObj
 {
-  private:
-    int frame;
-    WorldObjsData::BumperData* const data;
-  
-  public:
-    BumperObj (WorldObjsData::BumperData* data_);
-   ~BumperObj ();   
+private:
+  WorldObjsData::BumperData* const data;
+  int frame;
 
-    static EditorObjLst create (const CL_Vector& pos);
+public:
+  BumperObj (const WorldObjsData::BumperData& data_);
+ ~BumperObj ();   
 
-    EditorObj* duplicate ();
-    
-    void write_xml (std::ostream& xml);
-    void draw (EditorNS::EditorView* view);
-    
-    std::string status_line ();
+  static EditorObjLst create (const CL_Vector& pos);
+
+  EditorObj* duplicate ();
   
-  private:
-    BumperObj (const BumperObj&);
-    BumperObj& operator= (const BumperObj&);
+  void write_xml (std::ostream& xml);
+  void draw (EditorNS::EditorView* view);
+  
+  std::string status_line ();
+
+private:
+  BumperObj (const BumperObj&);
+  BumperObj& operator= (const BumperObj&);
 };
 
 } // namespace EditorObjs

Index: conveyor_belt_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/conveyor_belt_obj.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- conveyor_belt_obj.cxx       20 Sep 2002 08:43:18 -0000      1.3
+++ conveyor_belt_obj.cxx       27 Sep 2002 18:36:40 -0000      1.4
@@ -25,8 +25,8 @@
 
 namespace EditorObjs {
 
-ConveyorBeltObj::ConveyorBeltObj (WorldObjsData::ConveyorBeltData* data_)
-  : data(new WorldObjsData::ConveyorBeltData(*data_)),
+ConveyorBeltObj::ConveyorBeltObj (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"))
@@ -34,9 +34,9 @@
 }
 
 EditorObj*
-ConveyorBeltObj::duplicate()
+ConveyorBeltObj::duplicate ()
 {
-  return new ConveyorBeltObj(data);
+  return new ConveyorBeltObj(*data);
 }
 
 void

Index: conveyor_belt_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/conveyor_belt_obj.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- conveyor_belt_obj.hxx       27 Sep 2002 11:26:46 -0000      1.3
+++ conveyor_belt_obj.hxx       27 Sep 2002 18:36:40 -0000      1.4
@@ -40,7 +40,7 @@
   CL_Surface middle_sur;
 
 public:
-  ConveyorBeltObj (WorldObjsData::ConveyorBeltData* data_);
+  ConveyorBeltObj (const WorldObjsData::ConveyorBeltData& data_);
 
   EditorObj* duplicate ();
   

Index: fake_exit_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/fake_exit_obj.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- fake_exit_obj.cxx   11 Sep 2002 12:45:58 -0000      1.8
+++ fake_exit_obj.cxx   27 Sep 2002 18:36:40 -0000      1.9
@@ -24,9 +24,9 @@
 
 namespace EditorObjs {
 
-FakeExitObj::FakeExitObj (WorldObjsData::FakeExitData* data_) 
-  : frame(0),
-    data(new WorldObjsData::FakeExitData(*data_))
+FakeExitObj::FakeExitObj (const WorldObjsData::FakeExitData& data_) 
+  : data(new WorldObjsData::FakeExitData(data_)),
+    frame(0)
 {
   data->pos.z = -100;
   sprite = Sprite("Traps/fake_exit", "traps");
@@ -45,13 +45,13 @@
 {
   WorldObjsData::FakeExitData newdata;
   newdata.pos = pos;
-  return EditorObjLst(1, new FakeExitObj (&newdata));
+  return EditorObjLst(1, new FakeExitObj (newdata));
 }
   
 EditorObj*
 FakeExitObj::duplicate ()
 {
-  return new FakeExitObj(data);
+  return new FakeExitObj(*data);
 }
 
 void

Index: fake_exit_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/fake_exit_obj.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- fake_exit_obj.hxx   27 Sep 2002 11:26:46 -0000      1.7
+++ fake_exit_obj.hxx   27 Sep 2002 18:36:40 -0000      1.8
@@ -31,11 +31,11 @@
 class FakeExitObj : public SpriteEditorObj
 {
 private:
-  int frame;
   WorldObjsData::FakeExitData* const data;
+  int frame;
   
 public:
-  FakeExitObj (WorldObjsData::FakeExitData* data_);
+  FakeExitObj (const WorldObjsData::FakeExitData& data_);
   ~FakeExitObj ();
    
   static EditorObjLst create (const CL_Vector& pos);

Index: groundpiece_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/groundpiece_obj.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- groundpiece_obj.cxx 27 Sep 2002 11:26:46 -0000      1.1
+++ groundpiece_obj.cxx 27 Sep 2002 18:36:40 -0000      1.2
@@ -25,9 +25,9 @@
 
 namespace EditorObjs {
 
-GroundpieceObj::GroundpieceObj (WorldObjsData::GroundpieceData* data_)
-  : SpriteEditorObj(data_->desc),
-    data(new WorldObjsData::GroundpieceData(*data_)),
+GroundpieceObj::GroundpieceObj (const WorldObjsData::GroundpieceData& data_)
+  : SpriteEditorObj(data_.desc),
+    data(new WorldObjsData::GroundpieceData(data_)),
     gptype(data->gptype)
 {
   pos_ref = &data->pos;
@@ -41,7 +41,7 @@
 EditorObj*
 GroundpieceObj::duplicate ()
 {
-  return new GroundpieceObj(data);
+  return new GroundpieceObj(*data);
 }
 
 void

Index: groundpiece_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/groundpiece_obj.hxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- groundpiece_obj.hxx 27 Sep 2002 11:26:46 -0000      1.1
+++ groundpiece_obj.hxx 27 Sep 2002 18:36:40 -0000      1.2
@@ -37,7 +37,7 @@
 public:
   Groundtype::GPType gptype;
 
-  GroundpieceObj (WorldObjsData::GroundpieceData* data_);
+  GroundpieceObj (const WorldObjsData::GroundpieceData& data_);
  ~GroundpieceObj ();
 
   /** Flip the object vertical */

Index: guillotine_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/guillotine_obj.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- guillotine_obj.cxx  11 Sep 2002 12:45:58 -0000      1.7
+++ guillotine_obj.cxx  27 Sep 2002 18:36:40 -0000      1.8
@@ -24,9 +24,9 @@
 
 namespace EditorObjs {
 
-GuillotineObj::GuillotineObj (WorldObjsData::GuillotineData* data_)
-  : frame(0),
-    data(new WorldObjsData::GuillotineData(*data_))
+GuillotineObj::GuillotineObj (const WorldObjsData::GuillotineData& data_)
+  : data(new WorldObjsData::GuillotineData(data_)),
+    frame(0)
 {
   data->pos.z = -100;
   sprite = Sprite("Traps/guillotineidle", "traps");
@@ -43,13 +43,13 @@
 {
   WorldObjsData::GuillotineData newdata;
   newdata.pos = pos;
-  return EditorObjLst(1, new GuillotineObj(&newdata));
+  return EditorObjLst(1, new GuillotineObj(newdata));
 }
   
 EditorObj*
 GuillotineObj::duplicate ()
 {
-  return new GuillotineObj(data);
+  return new GuillotineObj(*data);
 }
 
 void

Index: guillotine_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/guillotine_obj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- guillotine_obj.hxx  27 Sep 2002 11:26:46 -0000      1.6
+++ guillotine_obj.hxx  27 Sep 2002 18:36:40 -0000      1.7
@@ -31,11 +31,11 @@
 class GuillotineObj : public SpriteEditorObj
 {
 private:
-  int frame;
   WorldObjsData::GuillotineData* const data;
+  int frame;
   
 public:
-  GuillotineObj (WorldObjsData::GuillotineData* data_);
+  GuillotineObj (const WorldObjsData::GuillotineData& data_);
   ~GuillotineObj ();
    
   static EditorObjLst create (const CL_Vector& pos);

Index: hammer_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/hammer_obj.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- hammer_obj.cxx      11 Sep 2002 12:45:58 -0000      1.7
+++ hammer_obj.cxx      27 Sep 2002 18:36:40 -0000      1.8
@@ -24,9 +24,9 @@
 
 namespace EditorObjs {
 
-HammerObj::HammerObj (WorldObjsData::HammerData* data_) 
-  : frame(0),
-    data(new WorldObjsData::HammerData(*data_))
+HammerObj::HammerObj (const WorldObjsData::HammerData& data_) 
+  : data(new WorldObjsData::HammerData(data_)),
+    frame(0)
 {
   data->pos.z = -100;
   sprite = Sprite("Traps/hammer", "traps");
@@ -42,7 +42,7 @@
 EditorObj*
 HammerObj::duplicate ()
 {
-  return new HammerObj(data);
+  return new HammerObj(*data);
 }
 
 EditorObjLst
@@ -50,7 +50,7 @@
 {
   WorldObjsData::HammerData hammer_data;
   hammer_data.pos = pos;
-  return EditorObjLst(1, new HammerObj(&hammer_data));
+  return EditorObjLst(1, new HammerObj(hammer_data));
 }
   
 void

Index: hammer_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/hammer_obj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hammer_obj.hxx      27 Sep 2002 11:26:46 -0000      1.6
+++ hammer_obj.hxx      27 Sep 2002 18:36:40 -0000      1.7
@@ -31,11 +31,11 @@
 class HammerObj : public SpriteEditorObj
 {
 private:
-  int frame;
   WorldObjsData::HammerData* const data;
+  int frame;
   
 public:
-  HammerObj (WorldObjsData::HammerData* data_);
+  HammerObj (const WorldObjsData::HammerData& data_);
   ~HammerObj ();
    
   static EditorObjLst create (const CL_Vector& pos);

Index: hotspot_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/hotspot_obj.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- hotspot_obj.cxx     24 Sep 2002 09:29:04 -0000      1.1
+++ hotspot_obj.cxx     27 Sep 2002 18:36:40 -0000      1.2
@@ -23,9 +23,9 @@
 
 namespace EditorObjs {
 
-HotspotObj::HotspotObj (WorldObjsData::HotspotData* data_)
-  : SpriteEditorObj (data_->desc),
-    data(new WorldObjsData::HotspotData(*data_))
+HotspotObj::HotspotObj (const WorldObjsData::HotspotData& data_)
+  : SpriteEditorObj (data_.desc),
+    data(new WorldObjsData::HotspotData(data_))
 {
   pos_ref = &data->pos;
 }
@@ -39,7 +39,7 @@
 EditorObj*
 HotspotObj::duplicate ()
 {
-  return new HotspotObj(data);
+  return new HotspotObj(*data);
 }
 
 std::string

Index: hotspot_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/hotspot_obj.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hotspot_obj.hxx     27 Sep 2002 11:26:46 -0000      1.2
+++ hotspot_obj.hxx     27 Sep 2002 18:36:40 -0000      1.3
@@ -34,7 +34,7 @@
   WorldObjsData::HotspotData* const data;
   
 public:
-  HotspotObj (WorldObjsData::HotspotData* data_);
+  HotspotObj (const WorldObjsData::HotspotData& data_);
 
   void write_xml (std::ostream& xml);
 

Index: ice_block_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/ice_block_obj.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ice_block_obj.cxx   20 Sep 2002 08:43:18 -0000      1.3
+++ ice_block_obj.cxx   27 Sep 2002 18:36:40 -0000      1.4
@@ -23,10 +23,11 @@
 
 namespace EditorObjs {
 
-IceBlockObj::IceBlockObj (WorldObjsData::IceBlockData* data_)
-  : SpriteEditorObj ("iceblock", "worldobjs", &data_->pos),
-    data(new WorldObjsData::IceBlockData(*data_))   
+IceBlockObj::IceBlockObj (const WorldObjsData::IceBlockData& data_)
+  : SpriteEditorObj ("iceblock", "worldobjs"),
+    data(new WorldObjsData::IceBlockData(data_))   
 {
+  pos_ref = &data->pos;
 }
 
 IceBlockObj::~IceBlockObj ()
@@ -60,7 +61,7 @@
 EditorObj*
 IceBlockObj::duplicate ()
 {
-  return new IceBlockObj(data);
+  return new IceBlockObj(*data);
 }
 
 } // namespace EditorObjs

Index: ice_block_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/ice_block_obj.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- ice_block_obj.hxx   27 Sep 2002 11:26:46 -0000      1.2
+++ ice_block_obj.hxx   27 Sep 2002 18:36:40 -0000      1.3
@@ -34,7 +34,7 @@
   WorldObjsData::IceBlockData* const data;
   
 public:
-  IceBlockObj (WorldObjsData::IceBlockData* data_);
+  IceBlockObj (const WorldObjsData::IceBlockData& data_);
  ~IceBlockObj ();
 
   /** Create the object with resonable defaults */

Index: info_box_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/info_box_obj.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- info_box_obj.cxx    14 Sep 2002 19:06:34 -0000      1.2
+++ info_box_obj.cxx    27 Sep 2002 18:36:40 -0000      1.3
@@ -22,10 +22,11 @@
 
 namespace EditorObjs {
 
-InfoBoxObj::InfoBoxObj (WorldObjsData::InfoBoxData* data_)
-  : SpriteEditorObj ("InfoBoxObj", "worldobjs", &data->pos),
-    data(new WorldObjsData::InfoBoxData(*data_))
+InfoBoxObj::InfoBoxObj (const WorldObjsData::InfoBoxData& data_)
+  : SpriteEditorObj ("InfoBoxObj", "worldobjs"),
+    data(new WorldObjsData::InfoBoxData(data_))
 {
+  pos_ref = &data->pos;
 }
 
 InfoBoxObj::~InfoBoxObj ()
@@ -38,7 +39,7 @@
 {
   WorldObjsData::InfoBoxData newdata;
   newdata.pos = pos;
-  return EditorObjLst(1, new InfoBoxObj(&newdata));
+  return EditorObjLst(1, new InfoBoxObj(newdata));
 }
 
 void
@@ -50,7 +51,7 @@
 EditorObj*
 InfoBoxObj::duplicate ()
 {
-  return new InfoBoxObj(data);
+  return new InfoBoxObj(*data);
 }
 
 std::string 

Index: info_box_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/info_box_obj.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- info_box_obj.hxx    27 Sep 2002 11:26:46 -0000      1.3
+++ info_box_obj.hxx    27 Sep 2002 18:36:40 -0000      1.4
@@ -34,7 +34,7 @@
   WorldObjsData::InfoBoxData* const data;
 
 public:
-  InfoBoxObj (WorldObjsData::InfoBoxData* data_);
+  InfoBoxObj (const WorldObjsData::InfoBoxData& data_);
  ~InfoBoxObj ();
 
   static EditorObjLst create (const CL_Vector& pos);

Index: laser_exit_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/laser_exit_obj.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- laser_exit_obj.cxx  13 Sep 2002 18:28:26 -0000      1.8
+++ laser_exit_obj.cxx  27 Sep 2002 18:36:40 -0000      1.9
@@ -24,9 +24,9 @@
 
 namespace EditorObjs {
 
-LaserExitObj::LaserExitObj (WorldObjsData::LaserExitData* data_) 
-  : frame(0),
-    data(new WorldObjsData::LaserExitData(*data_))
+LaserExitObj::LaserExitObj (const WorldObjsData::LaserExitData& data_) 
+  : data(new WorldObjsData::LaserExitData(data_)),
+    frame(0)
 {
   data->pos.z = -100;
   sprite = Sprite("Traps/laser_exit", "traps");
@@ -44,13 +44,13 @@
 {
   WorldObjsData::LaserExitData newdata;
   newdata.pos = pos;
-  return EditorObjLst(1, new LaserExitObj(&newdata));
+  return EditorObjLst(1, new LaserExitObj(newdata));
 }
 
 EditorObj*
 LaserExitObj::duplicate ()
 {
-  return new LaserExitObj(data);
+  return new LaserExitObj(*data);
 }
 
 void

Index: laser_exit_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/laser_exit_obj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- laser_exit_obj.hxx  27 Sep 2002 11:26:46 -0000      1.6
+++ laser_exit_obj.hxx  27 Sep 2002 18:36:40 -0000      1.7
@@ -31,11 +31,11 @@
 class LaserExitObj : public SpriteEditorObj
 {
 private:
-  int frame;
   WorldObjsData::LaserExitData* const data;
+  int frame;
   
 public:
-  LaserExitObj (WorldObjsData::LaserExitData* data_);
+  LaserExitObj (const WorldObjsData::LaserExitData& data_);
   ~LaserExitObj ();
 
   static EditorObjLst create (const CL_Vector& pos);

Index: liquid_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/liquid_obj.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- liquid_obj.cxx      25 Sep 2002 17:21:38 -0000      1.1
+++ liquid_obj.cxx      27 Sep 2002 18:36:40 -0000      1.2
@@ -23,9 +23,9 @@
 
 namespace EditorObjs {
 
-LiquidObj::LiquidObj (WorldObjsData::LiquidData* data_)
-  : SpriteEditorObj(data_->desc.res_name, data_->desc.datafile),
-    data(new WorldObjsData::LiquidData(*data_))
+LiquidObj::LiquidObj (const WorldObjsData::LiquidData& data_)
+  : SpriteEditorObj(data_.desc.res_name, data_.desc.datafile),
+    data(new WorldObjsData::LiquidData(data_))
 {
   if (data->old_width_handling)
     {
@@ -44,7 +44,7 @@
 EditorObj*
 LiquidObj::duplicate ()
 {
-  return new LiquidObj(data);
+  return new LiquidObj(*data);
 }
 
 void

Index: liquid_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/liquid_obj.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- liquid_obj.hxx      27 Sep 2002 11:26:46 -0000      1.2
+++ liquid_obj.hxx      27 Sep 2002 18:36:40 -0000      1.3
@@ -35,7 +35,7 @@
   WorldObjsData::LiquidData* const data;
   
 public:
-  LiquidObj (WorldObjsData::LiquidData* data_);
+  LiquidObj (const WorldObjsData::LiquidData& data_);
  ~LiquidObj ();
 
   EditorObj* duplicate ();

Index: smasher_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/smasher_obj.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- smasher_obj.cxx     11 Sep 2002 12:45:58 -0000      1.6
+++ smasher_obj.cxx     27 Sep 2002 18:36:40 -0000      1.7
@@ -25,8 +25,8 @@
 namespace EditorObjs {
 
 SmasherObj::SmasherObj (const WorldObjsData::SmasherData& data_)
-  : frame(0),
-    data(new WorldObjsData::SmasherData(data_))
+  : data(new WorldObjsData::SmasherData(data_)),
+    frame(0)
 {
   data->pos.z = -100;
   sprite = Sprite("Traps/smasher", "traps");

Index: smasher_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/smasher_obj.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- smasher_obj.hxx     27 Sep 2002 11:26:46 -0000      1.7
+++ smasher_obj.hxx     27 Sep 2002 18:36:40 -0000      1.8
@@ -31,8 +31,8 @@
 class SmasherObj : public SpriteEditorObj
 {
 private:
-  int frame;
   WorldObjsData::SmasherData* const data;
+  int frame;
   
 public:
   SmasherObj (const WorldObjsData::SmasherData& data_);

Index: solid_color_background_obj.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/solid_color_background_obj.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- solid_color_background_obj.cxx      16 Sep 2002 20:52:22 -0000      1.2
+++ solid_color_background_obj.cxx      27 Sep 2002 18:36:40 -0000      1.3
@@ -24,8 +24,8 @@
 
 namespace EditorObjs {
 
-SolidColorBackgroundObj::SolidColorBackgroundObj 
(WorldObjsData::SolidColorBackgroundData* data_)
-  : data(new WorldObjsData::SolidColorBackgroundData(*data_))
+SolidColorBackgroundObj::SolidColorBackgroundObj (const 
WorldObjsData::SolidColorBackgroundData& data_)
+  : data(new WorldObjsData::SolidColorBackgroundData(data_))
 {
 }
 
@@ -43,7 +43,7 @@
 EditorObj*
 SolidColorBackgroundObj::duplicate ()
 {
-  return new SolidColorBackgroundObj(data);
+  return new SolidColorBackgroundObj(*data);
 }
 
 float

Index: solid_color_background_obj.hxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/solid_color_background_obj.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- solid_color_background_obj.hxx      27 Sep 2002 11:26:46 -0000      1.2
+++ solid_color_background_obj.hxx      27 Sep 2002 18:36:40 -0000      1.3
@@ -34,7 +34,7 @@
   WorldObjsData::SolidColorBackgroundData* const data;
   
 public:
-  SolidColorBackgroundObj (WorldObjsData::SolidColorBackgroundData* data_);
+  SolidColorBackgroundObj (const WorldObjsData::SolidColorBackgroundData& 
data_);
  ~SolidColorBackgroundObj ();
  
   void write_xml (std::ostream& xml);

Index: spike_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/spike_obj.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- spike_obj.cxx       11 Sep 2002 12:45:58 -0000      1.7
+++ spike_obj.cxx       27 Sep 2002 18:36:40 -0000      1.8
@@ -24,9 +24,9 @@
 
 namespace EditorObjs {
 
-SpikeObj::SpikeObj (WorldObjsData::SpikeData* data_) 
-  : frame(0),
-    data(new WorldObjsData::SpikeData(*data_))
+SpikeObj::SpikeObj (const WorldObjsData::SpikeData& data_) 
+  : data(new WorldObjsData::SpikeData(data_)),
+    frame(0)
 {
   data->pos.z = -100;
   sprite = Sprite("Traps/spike", "traps");
@@ -43,13 +43,13 @@
 {
   WorldObjsData::SpikeData spike_data;
   spike_data.pos = pos;
-  return EditorObjLst(1, new SpikeObj (&spike_data));
+  return EditorObjLst(1, new SpikeObj(spike_data));
 }
   
 EditorObj*
 SpikeObj::duplicate ()
 {
-  return new SpikeObj(data);
+  return new SpikeObj(*data);
 }
 
 void

Index: spike_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/spike_obj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- spike_obj.hxx       27 Sep 2002 11:26:46 -0000      1.6
+++ spike_obj.hxx       27 Sep 2002 18:36:40 -0000      1.7
@@ -31,11 +31,11 @@
 class SpikeObj : public SpriteEditorObj
 {
 private:
-  int frame;
   WorldObjsData::SpikeData* const data;
+  int frame;
   
 public:
-  SpikeObj (WorldObjsData::SpikeData* data_);
+  SpikeObj (const WorldObjsData::SpikeData& data_);
   ~SpikeObj ();
    
   static EditorObjLst create (const CL_Vector& pos);

Index: starfield_background_obj.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/starfield_background_obj.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- starfield_background_obj.cxx        16 Sep 2002 20:52:22 -0000      1.1
+++ starfield_background_obj.cxx        27 Sep 2002 18:36:40 -0000      1.2
@@ -23,10 +23,10 @@
 
 namespace EditorObjs {
 
-StarfieldBackgroundObj::StarfieldBackgroundObj 
(WorldObjsData::StarfieldBackgroundData* data_)
+StarfieldBackgroundObj::StarfieldBackgroundObj (const 
WorldObjsData::StarfieldBackgroundData& data_)
   : SpriteEditorObj ("Stars/starfield_icon", "game"),
-    pos (-64.0f, 0.0f),
-    data(new WorldObjsData::StarfieldBackgroundData(*data_))
+    data(new WorldObjsData::StarfieldBackgroundData(data_)),
+    pos (-64.0f, 0.0f)
 {
   pos_ref = &pos;
 }
@@ -45,7 +45,7 @@
 EditorObj*
 StarfieldBackgroundObj::duplicate ()
 {
-  return new StarfieldBackgroundObj(data);
+  return new StarfieldBackgroundObj(*data);
 }
 
 std::string

Index: starfield_background_obj.hxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/starfield_background_obj.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- starfield_background_obj.hxx        27 Sep 2002 11:26:46 -0000      1.2
+++ starfield_background_obj.hxx        27 Sep 2002 18:36:40 -0000      1.3
@@ -33,11 +33,11 @@
 class StarfieldBackgroundObj : public SpriteEditorObj
 {
 private:
-  CL_Vector pos;
   WorldObjsData::StarfieldBackgroundData* const data;
+  CL_Vector pos;
   
 public:
-  StarfieldBackgroundObj (WorldObjsData::StarfieldBackgroundData* data_);
+  StarfieldBackgroundObj (const WorldObjsData::StarfieldBackgroundData& data_);
  ~StarfieldBackgroundObj ();
 
   void write_xml (std::ostream& xml);

Index: surface_background_obj.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/surface_background_obj.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- surface_background_obj.cxx  17 Sep 2002 22:52:36 -0000      1.2
+++ surface_background_obj.cxx  27 Sep 2002 18:36:40 -0000      1.3
@@ -23,9 +23,9 @@
 
 namespace EditorObjs {
 
-SurfaceBackgroundObj::SurfaceBackgroundObj 
(WorldObjsData::SurfaceBackgroundData* data_)
-  : SpriteEditorObj (data_->desc.res_name, data_->desc.datafile),
-    data(new WorldObjsData::SurfaceBackgroundData(*data_))
+SurfaceBackgroundObj::SurfaceBackgroundObj (const 
WorldObjsData::SurfaceBackgroundData& data_)
+  : SpriteEditorObj (data_.desc.res_name, data_.desc.datafile),
+    data(new WorldObjsData::SurfaceBackgroundData(data_))
 {
   pos_ref = &data->pos;
 }
@@ -44,7 +44,7 @@
 EditorObj*
 SurfaceBackgroundObj::duplicate ()
 {
-  return new SurfaceBackgroundObj(data);
+  return new SurfaceBackgroundObj(*data);
 }
 
 std::string

Index: surface_background_obj.hxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/surface_background_obj.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- surface_background_obj.hxx  27 Sep 2002 11:26:46 -0000      1.2
+++ surface_background_obj.hxx  27 Sep 2002 18:36:40 -0000      1.3
@@ -34,7 +34,7 @@
   WorldObjsData::SurfaceBackgroundData* const data;
   
 public:
-  SurfaceBackgroundObj (WorldObjsData::SurfaceBackgroundData* data_);
+  SurfaceBackgroundObj (const WorldObjsData::SurfaceBackgroundData& data_);
  ~SurfaceBackgroundObj ();
  
   void write_xml (std::ostream& xml);

Index: switch_door_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/switch_door_obj.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- switch_door_obj.cxx 16 Sep 2002 23:49:56 -0000      1.4
+++ switch_door_obj.cxx 27 Sep 2002 18:36:40 -0000      1.5
@@ -26,8 +26,8 @@
 
 namespace EditorObjs { 
 
-SwitchDoorObj::SwitchDoorObj (WorldObjsData::SwitchDoorData* data_)
-  : data(new WorldObjsData::SwitchDoorData(*data_)),
+SwitchDoorObj::SwitchDoorObj (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")),
@@ -75,13 +75,13 @@
   newdata.switch_pos  = pos;
   newdata.door_height = 15;
 
-  return newdata.create_EditorObj();
+  return EditorObjLst(1, new SwitchDoorObj(newdata));
 }
 
 void
 SwitchDoorObj::save_xml (std::ostream& xml)
 {
-  write_xml (xml);
+  data->write_xml(xml);
 }
 
 std::string 

Index: switch_door_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/switch_door_obj.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- switch_door_obj.hxx 27 Sep 2002 11:26:46 -0000      1.4
+++ switch_door_obj.hxx 27 Sep 2002 18:36:40 -0000      1.5
@@ -41,7 +41,7 @@
 public:
   friend class SwitchDoorSwitchObj;
   
-  SwitchDoorObj (WorldObjsData::SwitchDoorData* data_);
+  SwitchDoorObj (const WorldObjsData::SwitchDoorData& data_);
  ~SwitchDoorObj ();
   
   /** Create this object (and child objects) with reasonable defaults

Index: teleporter_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/teleporter_obj.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- teleporter_obj.cxx  14 Sep 2002 19:06:34 -0000      1.5
+++ teleporter_obj.cxx  27 Sep 2002 18:36:40 -0000      1.6
@@ -25,9 +25,9 @@
 
 namespace EditorObjs {
 
-TeleporterObj::TeleporterObj (WorldObjsData::TeleporterData* data_)
+TeleporterObj::TeleporterObj (const WorldObjsData::TeleporterData& data_)
                             : SpriteEditorObj ("teleporter", "worldobjs"),
-                             data (new WorldObjsData::TeleporterData(*data_))
+                             data(new WorldObjsData::TeleporterData(data_))
 {
   data->sprite.set_align_center_bottom ();
   pos_ref = &data->pos;
@@ -62,7 +62,7 @@
   newdata.target_pos.x = pos.x + 50;
   newdata.target_pos.y = pos.y + 50;
 
-  return newdata.create_EditorObj();
+  return EditorObjLst(1, new TeleporterObj(newdata));
 }
 
 void

Index: teleporter_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editorobjs/teleporter_obj.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- teleporter_obj.hxx  27 Sep 2002 11:26:46 -0000      1.6
+++ teleporter_obj.hxx  27 Sep 2002 18:36:40 -0000      1.7
@@ -41,7 +41,7 @@
   TeleporterTargetObj* target;
 
 public:
-  TeleporterObj (WorldObjsData::TeleporterData* data_);
+  TeleporterObj (const WorldObjsData::TeleporterData& data_);
  ~TeleporterObj ();
 
   CL_Vector& get_target_pos_ref ();

Index: thunderstorm_background_obj.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/thunderstorm_background_obj.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- thunderstorm_background_obj.cxx     18 Sep 2002 15:00:37 -0000      1.1
+++ thunderstorm_background_obj.cxx     27 Sep 2002 18:36:40 -0000      1.2
@@ -22,11 +22,12 @@
 
 namespace EditorObjs {
 
-ThunderstormBackgroundObj::ThunderstormBackgroundObj 
(WorldObjsData::ThunderstormBackgroundData* data_)
-  : SpriteEditorObj ("Stars/starfield_icon", "game", &data->pos),
-    data(new WorldObjsData::ThunderstormBackgroundData(*data_))
+ThunderstormBackgroundObj::ThunderstormBackgroundObj (const 
WorldObjsData::ThunderstormBackgroundData& data_)
+  : SpriteEditorObj ("Stars/starfield_icon", "game"),
+    data(new WorldObjsData::ThunderstormBackgroundData(data_))
 {
   data->pos = CL_Vector(-128.0f, 0.0f);
+  pos_ref = &data->pos;
 }
 
 ThunderstormBackgroundObj::~ThunderstormBackgroundObj ()
@@ -43,7 +44,7 @@
 EditorObj*
 ThunderstormBackgroundObj::duplicate ()
 {
-  return new ThunderstormBackgroundObj(data);
+  return new ThunderstormBackgroundObj(*data);
 }
 
 std::string

Index: thunderstorm_background_obj.hxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/editorobjs/thunderstorm_background_obj.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- thunderstorm_background_obj.hxx     27 Sep 2002 11:26:46 -0000      1.2
+++ thunderstorm_background_obj.hxx     27 Sep 2002 18:36:40 -0000      1.3
@@ -34,7 +34,7 @@
   WorldObjsData::ThunderstormBackgroundData* const data;
   
 public:
-  ThunderstormBackgroundObj (WorldObjsData::ThunderstormBackgroundData* data_);
+  ThunderstormBackgroundObj (const WorldObjsData::ThunderstormBackgroundData& 
data_);
  ~ThunderstormBackgroundObj ();
  
   void write_xml (std::ostream& xml);





reply via email to

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