pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata bumper_data.cxx,1.6,1.7


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata bumper_data.cxx,1.6,1.7 conveyor_belt_data.cxx,1.4,1.5 fake_exit_data.cxx,1.6,1.7 groundpiece_data.cxx,1.4,1.5 guillotine_data.cxx,1.6,1.7 hammer_data.cxx,1.6,1.7 hotspot_data.cxx,1.2,1.3 ice_block_data.cxx,1.4,1.5 info_box_data.cxx,1.6,1.7 laser_exit_data.cxx,1.6,1.7 liquid_data.cxx,1.2,1.3 smasher_data.cxx,1.6,1.7 solid_color_background_data.cxx,1.2,1.3 spike_data.cxx,1.6,1.7 starfield_background_data.cxx,1.2,1.3 surface_background_data.cxx,1.2,1.3 switch_door_data.cxx,1.5,1.6 teleporter_data.cxx,1.5,1.6 thunderstorm_background_data.cxx,1.2,1.3 worldobj_group_data.cxx,1.4,1.5
Date: 27 Sep 2002 18:36:44 -0000

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

Modified Files:
        bumper_data.cxx conveyor_belt_data.cxx fake_exit_data.cxx 
        groundpiece_data.cxx guillotine_data.cxx hammer_data.cxx 
        hotspot_data.cxx ice_block_data.cxx info_box_data.cxx 
        laser_exit_data.cxx liquid_data.cxx smasher_data.cxx 
        solid_color_background_data.cxx spike_data.cxx 
        starfield_background_data.cxx surface_background_data.cxx 
        switch_door_data.cxx teleporter_data.cxx 
        thunderstorm_background_data.cxx worldobj_group_data.cxx 
Log Message:
changed parameter passing of the data objects to const &


Index: bumper_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/bumper_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- bumper_data.cxx     25 Sep 2002 17:25:49 -0000      1.6
+++ bumper_data.cxx     27 Sep 2002 18:36:41 -0000      1.7
@@ -63,13 +63,13 @@
 WorldObj*
 BumperData::create_WorldObj ()
 {
-  return new WorldObjs::Bumper(this);
+  return new WorldObjs::Bumper(*this);
 }
 
 EditorObjLst
 BumperData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::BumperObj(this));
+  return EditorObjLst(1, new EditorObjs::BumperObj(*this));
 }
 
 } // WorldObjsData

Index: conveyor_belt_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/conveyor_belt_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- conveyor_belt_data.cxx      25 Sep 2002 17:25:49 -0000      1.4
+++ conveyor_belt_data.cxx      27 Sep 2002 18:36:41 -0000      1.5
@@ -86,13 +86,13 @@
 WorldObj* 
 ConveyorBeltData::create_WorldObj ()
 {
-  return new WorldObjs::ConveyorBelt(this);
+  return new WorldObjs::ConveyorBelt(*this);
 }
 
 EditorObjLst
 ConveyorBeltData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::ConveyorBeltObj(this));
+  return EditorObjLst(1, new EditorObjs::ConveyorBeltObj(*this));
 }
 
 } // namespace WorldObjsData

Index: fake_exit_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/fake_exit_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- fake_exit_data.cxx  25 Sep 2002 17:25:49 -0000      1.6
+++ fake_exit_data.cxx  27 Sep 2002 18:36:41 -0000      1.7
@@ -63,13 +63,13 @@
 WorldObj*
 FakeExitData::create_WorldObj ()
 {
-  return new WorldObjs::FakeExit(this);
+  return new WorldObjs::FakeExit(*this);
 }
 
 EditorObjLst
 FakeExitData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::FakeExitObj(this));
+  return EditorObjLst(1, new EditorObjs::FakeExitObj(*this));
 }
 
 } // namespace WorldObjsData

Index: groundpiece_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/groundpiece_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- groundpiece_data.cxx        27 Sep 2002 11:26:49 -0000      1.4
+++ groundpiece_data.cxx        27 Sep 2002 18:36:41 -0000      1.5
@@ -22,6 +22,7 @@
 #include "../worldobjs/groundpiece.hxx"
 #include "../world.hxx"
 #include "../xml_helper.hxx"
+#include "groundpiece_data.hxx"
 
 namespace WorldObjsData {
 
@@ -89,10 +90,12 @@
   if (this == &old)
     return *this;
     
-  surface  = old.surface;
-  desc     = old.desc;
-  pos      = old.pos;
-  gptype   = old.gptype;
+  WorldObjData::operator=(old);
+  
+  surface = old.surface;
+  desc    = old.desc;
+  pos     = old.pos;
+  gptype  = old.gptype;
   
   return *this;
 }
@@ -103,7 +106,7 @@
 EditorObjLst
 GroundpieceData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::GroundpieceObj(this));
+  return EditorObjLst(1, new EditorObjs::GroundpieceObj(*this));
 }
 
 WorldObj*

Index: guillotine_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/guillotine_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- guillotine_data.cxx 15 Sep 2002 09:54:34 -0000      1.6
+++ guillotine_data.cxx 27 Sep 2002 18:36:41 -0000      1.7
@@ -35,7 +35,7 @@
     idle_surf(PingusResource::load_surface("Traps/guillotineidle", "traps"))
 {
   if (cur->name)
-    std::cout << (const char*)cur->name << std::endl;
+    std::cout << reinterpret_cast<const char*>(cur->name) << std::endl;
       
   cur = cur->children;
   while (cur)
@@ -47,7 +47,7 @@
          pos = XMLhelper::parse_vector(doc, cur);
        }
       else
-       std::cout << (const char*)cur->name << std::endl;
+       std::cout << reinterpret_cast<const char*>(cur->name) << std::endl;
          
       cur = cur->next;
     }
@@ -71,13 +71,13 @@
 WorldObj*
 GuillotineData::create_WorldObj ()
 {
-  return new WorldObjs::Guillotine(this);
+  return new WorldObjs::Guillotine(*this);
 }
 
 EditorObjLst
 GuillotineData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::GuillotineObj(this));
+  return EditorObjLst(1, new EditorObjs::GuillotineObj(*this));
 }
 
 } // namespace WorldObjsData

Index: hammer_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/hammer_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hammer_data.cxx     25 Sep 2002 17:25:49 -0000      1.6
+++ hammer_data.cxx     27 Sep 2002 18:36:41 -0000      1.7
@@ -63,13 +63,13 @@
 WorldObj*
 HammerData::create_WorldObj ()
 {
-  return new WorldObjs::Hammer(this);
+  return new WorldObjs::Hammer(*this);
 }
 
 EditorObjLst
 HammerData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::HammerObj(this));
+  return EditorObjLst(1, new EditorObjs::HammerObj(*this));
 }
 
 } // namespace WorldObjsData

Index: hotspot_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/hotspot_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- hotspot_data.cxx    25 Sep 2002 17:25:49 -0000      1.2
+++ hotspot_data.cxx    27 Sep 2002 18:36:41 -0000      1.3
@@ -86,13 +86,13 @@
 WorldObj* 
 HotspotData::create_WorldObj ()
 {
-  return new WorldObjs::Hotspot(this);
+  return new WorldObjs::Hotspot(*this);
 }
 
 EditorObjLst 
 HotspotData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::HotspotObj(this));
+  return EditorObjLst(1, new EditorObjs::HotspotObj(*this));
 }
 
 } //namespace WorldObjsData

Index: ice_block_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/ice_block_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- ice_block_data.cxx  25 Sep 2002 17:25:49 -0000      1.4
+++ ice_block_data.cxx  27 Sep 2002 18:36:41 -0000      1.5
@@ -75,13 +75,13 @@
 WorldObj* 
 IceBlockData::create_WorldObj ()
 {
-  return new WorldObjs::IceBlock(this);
+  return new WorldObjs::IceBlock(*this);
 }
 
 EditorObjLst
 IceBlockData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::IceBlockObj(this));
+  return EditorObjLst(1, new EditorObjs::IceBlockObj(*this));
 }
 
 } // namespace WorldObjsData

Index: info_box_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/info_box_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- info_box_data.cxx   25 Sep 2002 17:25:49 -0000      1.6
+++ info_box_data.cxx   27 Sep 2002 18:36:41 -0000      1.7
@@ -37,13 +37,13 @@
 WorldObj* 
 InfoBoxData::create_WorldObj ()
 {
-  return new WorldObjs::InfoBox(this);
+  return new WorldObjs::InfoBox(*this);
 }
 
 EditorObjLst
 InfoBoxData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::InfoBoxObj(this));
+  return EditorObjLst(1, new EditorObjs::InfoBoxObj(*this));
 }
 
 InfoBoxData::InfoBoxData (xmlDocPtr doc, xmlNodePtr cur)

Index: laser_exit_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/laser_exit_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- laser_exit_data.cxx 25 Sep 2002 17:25:49 -0000      1.6
+++ laser_exit_data.cxx 27 Sep 2002 18:36:41 -0000      1.7
@@ -63,13 +63,13 @@
 WorldObj*
 LaserExitData::create_WorldObj ()
 {
-  return new WorldObjs::LaserExit(this);
+  return new WorldObjs::LaserExit(*this);
 }
 
 EditorObjLst
 LaserExitData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::LaserExitObj(this));
+  return EditorObjLst(1, new EditorObjs::LaserExitObj(*this));
 }
 
 } // namespace WorldObjsData

Index: liquid_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/liquid_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- liquid_data.cxx     25 Sep 2002 18:09:57 -0000      1.2
+++ liquid_data.cxx     27 Sep 2002 18:36:41 -0000      1.3
@@ -96,14 +96,14 @@
 LiquidData::create_WorldObj ()
 {
   std::cout << "LiquidData::create_WorldObj ()" << std::endl;
-  return new WorldObjs::Liquid(this);
+  return new WorldObjs::Liquid(*this);
 }
 
 EditorObjLst
 LiquidData::create_EditorObj () 
 { 
   std::cout << "LiquidData::create_EditorObj ()" << std::endl;
-  return EditorObjLst(1, new EditorObjs::LiquidObj(this));
+  return EditorObjLst(1, new EditorObjs::LiquidObj(*this));
 }
 
 } // namespace WorldObjsData

Index: smasher_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/smasher_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- smasher_data.cxx    25 Sep 2002 17:25:49 -0000      1.6
+++ smasher_data.cxx    27 Sep 2002 18:36:41 -0000      1.7
@@ -63,7 +63,7 @@
 WorldObj*
 SmasherData::create_WorldObj ()
 {
-  return new WorldObjs::Smasher(this);
+  return new WorldObjs::Smasher(*this);
 }
 
 EditorObjLst

Index: solid_color_background_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/solid_color_background_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- solid_color_background_data.cxx     25 Sep 2002 17:25:49 -0000      1.2
+++ solid_color_background_data.cxx     27 Sep 2002 18:36:41 -0000      1.3
@@ -64,13 +64,13 @@
 WorldObj* 
 SolidColorBackgroundData::create_WorldObj ()
 {
-  return new WorldObjs::SolidColorBackground(this);
+  return new WorldObjs::SolidColorBackground(*this);
 }
 
 EditorObjLst 
 SolidColorBackgroundData::create_EditorObj()
 {
-  return EditorObjLst(1, new EditorObjs::SolidColorBackgroundObj(this));
+  return EditorObjLst(1, new EditorObjs::SolidColorBackgroundObj(*this));
 }
 
 } // namespace WorldObjsData

Index: spike_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjsdata/spike_data.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- spike_data.cxx      25 Sep 2002 17:25:49 -0000      1.6
+++ spike_data.cxx      27 Sep 2002 18:36:41 -0000      1.7
@@ -63,13 +63,13 @@
 WorldObj*
 SpikeData::create_WorldObj ()
 {
-  return new WorldObjs::Spike(this);
+  return new WorldObjs::Spike(*this);
 }
 
 EditorObjLst
 SpikeData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::SpikeObj(this));
+  return EditorObjLst(1, new EditorObjs::SpikeObj(*this));
 }
 
 } // namespace WorldObjsData

Index: starfield_background_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/starfield_background_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- starfield_background_data.cxx       25 Sep 2002 17:25:49 -0000      1.2
+++ starfield_background_data.cxx       27 Sep 2002 18:36:41 -0000      1.3
@@ -108,13 +108,13 @@
 WorldObj* 
 StarfieldBackgroundData::create_WorldObj ()
 {
-  return new WorldObjs::StarfieldBackground(this);
+  return new WorldObjs::StarfieldBackground(*this);
 }
 
 EditorObjLst
 StarfieldBackgroundData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::StarfieldBackgroundObj(this));
+  return EditorObjLst(1, new EditorObjs::StarfieldBackgroundObj(*this));
 }
 
 } // namespace WorldObjsData

Index: surface_background_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/surface_background_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- surface_background_data.cxx 25 Sep 2002 17:25:49 -0000      1.2
+++ surface_background_data.cxx 27 Sep 2002 18:36:41 -0000      1.3
@@ -133,15 +133,13 @@
 WorldObj* 
 SurfaceBackgroundData::create_WorldObj ()
 {
-  return new WorldObjs::SurfaceBackground(this);
+  return new WorldObjs::SurfaceBackground(*this);
 }
 
 EditorObjLst 
 SurfaceBackgroundData::create_EditorObj ()
 {
-  EditorObjLst lst;
-  lst.push_back(new EditorObjs::SurfaceBackgroundObj(this));
-  return lst;
+  return EditorObjLst(1, new EditorObjs::SurfaceBackgroundObj(*this));
 }
 
 } // namespace WorldObjsData

Index: switch_door_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/switch_door_data.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- switch_door_data.cxx        25 Sep 2002 17:25:49 -0000      1.5
+++ switch_door_data.cxx        27 Sep 2002 18:36:41 -0000      1.6
@@ -118,7 +118,7 @@
 WorldObj* 
 SwitchDoorData::create_WorldObj ()
 {
-  return new WorldObjs::SwitchDoor (this);
+  return new WorldObjs::SwitchDoor(*this);
 }
 
 /** Create an EditorObj from the given data object */
@@ -126,7 +126,7 @@
 SwitchDoorData::create_EditorObj ()
 {
   EditorObjLst lst(2); 
-  EditorObjs::SwitchDoorObj* obj = new EditorObjs::SwitchDoorObj(this);
+  EditorObjs::SwitchDoorObj* obj = new EditorObjs::SwitchDoorObj(*this);
   lst[0] = obj;
   lst[1] = new EditorObjs::SwitchDoorSwitchObj(obj);
   return lst;

Index: teleporter_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/teleporter_data.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- teleporter_data.cxx 25 Sep 2002 17:25:49 -0000      1.5
+++ teleporter_data.cxx 27 Sep 2002 18:36:42 -0000      1.6
@@ -90,7 +90,7 @@
 WorldObj* 
 TeleporterData::create_WorldObj ()
 {
-  return new WorldObjs::Teleporter(this);
+  return new WorldObjs::Teleporter(*this);
 }
 
 EditorObjLst
@@ -99,7 +99,7 @@
   std::cout << "TeleportData::create_EditorObj () " << std::endl;
   EditorObjLst objs(2);
   
-  EditorObjs::TeleporterObj*       teleporter        = new 
EditorObjs::TeleporterObj(this);
+  EditorObjs::TeleporterObj*       teleporter        = new 
EditorObjs::TeleporterObj(*this);
   EditorObjs::TeleporterTargetObj* teleporter_target = new 
EditorObjs::TeleporterTargetObj(teleporter);
 
   objs[0] = teleporter;

Index: thunderstorm_background_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/thunderstorm_background_data.cxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- thunderstorm_background_data.cxx    25 Sep 2002 17:25:49 -0000      1.2
+++ thunderstorm_background_data.cxx    27 Sep 2002 18:36:42 -0000      1.3
@@ -59,13 +59,13 @@
 WorldObj* 
 ThunderstormBackgroundData::create_WorldObj ()
 {
-  return new WorldObjs::ThunderstormBackground(this);
+  return new WorldObjs::ThunderstormBackground(*this);
 }
 
 EditorObjLst 
 ThunderstormBackgroundData::create_EditorObj ()
 {
-  return EditorObjLst(1, new EditorObjs::ThunderstormBackgroundObj(this));
+  return EditorObjLst(1, new EditorObjs::ThunderstormBackgroundObj(*this));
 }
 
 } // namespace WorldObjsData

Index: worldobj_group_data.cxx
===================================================================
RCS file: 
/usr/local/cvsroot/Games/Pingus/src/worldobjsdata/worldobj_group_data.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- worldobj_group_data.cxx     16 Sep 2002 20:52:22 -0000      1.4
+++ worldobj_group_data.cxx     27 Sep 2002 18:36:42 -0000      1.5
@@ -89,10 +89,10 @@
 EditorObjLst 
 WorldObjGroupData::create_EditorObj ()
 {
-  EditorObjLst lst;
+  EditorObjLst lst(1);
   EditorObjGroup* group = new EditorObjGroup();
-  lst.push_back (group);
-  
+  lst[0] = group;
+
   for (ObjsIter i = objs.begin (); i != objs.end (); ++i)
     {
       EditorObjLst sublst ((*i)->create_EditorObj ());





reply via email to

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