pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.24,1.25 action_w


From: torangan
Subject: [Pingus-CVS] CVS: Games/Pingus/src/editor Makefile.am,1.24,1.25 action_window.hxx,1.7,1.8 editor.hxx,1.17,1.18 editor_event.hxx,1.16,1.17 editor_help_screen.hxx,1.4,1.5 editor_view.hxx,1.5,1.6 editorobj.hxx,1.15,1.16 editorobj_group.hxx,1.10,1.11 editorobj_group_data.hxx,1.5,1.6 entrance_window.cxx,1.4,1.5 entrance_window.hxx,1.6,1.7 groundpiece_window.cxx,1.9,1.10 groundpiece_window.hxx,1.8,1.9 level_property_window.hxx,1.7,1.8 object_manager.hxx,1.19,1.20 object_selector.cxx,1.25,1.26 object_selector.hxx,1.11,1.12 panel.hxx,1.7,1.8 panel_icons.hxx,1.6,1.7 plfobj.cxx,1.13,1.14 plfobj.hxx,1.11,1.12 property_frame.hxx,1.5,1.6 property_window.hxx,1.7,1.8 rect_editorobj.cxx,1.5,1.6 rect_editorobj.hxx,1.5,1.6 scroll_map.hxx,1.4,1.5 selection.hxx,1.10,1.11 sprite_editorobj.cxx,1.6,1.7 sprite_editorobj.hxx,1.7,1.8 start_pos.hxx,1.6,1.7 status_line.hxx,1.9,1.10 string_reader.hxx,1.5,1.6 surface_selector.cxx,1.4,1.5 surface_selector.hxx,1.6,1.7 thumb_cache.hxx,1.7,1.8 weather_obj.hxx,1.8,1.9
Date: 27 Sep 2002 11:27:18 -0000

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

Modified Files:
        Makefile.am action_window.hxx editor.hxx editor_event.hxx 
        editor_help_screen.hxx editor_view.hxx editorobj.hxx 
        editorobj_group.hxx editorobj_group_data.hxx 
        entrance_window.cxx entrance_window.hxx groundpiece_window.cxx 
        groundpiece_window.hxx level_property_window.hxx 
        object_manager.hxx object_selector.cxx object_selector.hxx 
        panel.hxx panel_icons.hxx plfobj.cxx plfobj.hxx 
        property_frame.hxx property_window.hxx rect_editorobj.cxx 
        rect_editorobj.hxx scroll_map.hxx selection.hxx 
        sprite_editorobj.cxx sprite_editorobj.hxx start_pos.hxx 
        status_line.hxx string_reader.hxx surface_selector.cxx 
        surface_selector.hxx thumb_cache.hxx weather_obj.hxx 
Log Message:
- splitted Entrance
- changed operator= return value


Index: Makefile.am
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/Makefile.am,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- Makefile.am 1 Jul 2002 16:31:40 -0000       1.24
+++ Makefile.am 27 Sep 2002 11:26:45 -0000      1.25
@@ -20,7 +20,6 @@
 libpingus_editor_a_SOURCES = \
        action_window.cxx action_window.hxx \
        editor_event.cxx editor_event.hxx \
-       editor_groundpiece_obj.cxx editor_groundpiece_obj.hxx \
        editor_help_screen.cxx editor_help_screen.hxx \
        editor.cxx editor.hxx \
        editorobj_group.cxx editorobj_group.hxx \

Index: action_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/action_window.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- action_window.hxx   11 Sep 2002 12:45:58 -0000      1.7
+++ action_window.hxx   27 Sep 2002 11:26:45 -0000      1.8
@@ -59,7 +59,7 @@
   void write_data ();
   
   ActionWindow (const ActionWindow&);
-  ActionWindow operator= (const ActionWindow&);
+  ActionWindow& operator= (const ActionWindow&);
 };
 
 } // namespace EditorNS

Index: editor.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- editor.hxx  13 Sep 2002 18:28:26 -0000      1.17
+++ editor.hxx  27 Sep 2002 11:26:45 -0000      1.18
@@ -128,7 +128,7 @@
   
 private:
   Editor (const Editor&);
-  Editor operator= (const Editor&);
+  Editor& operator= (const Editor&);
 };
 
 } // namespace EditorNS

Index: editor_event.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.hxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- editor_event.hxx    15 Sep 2002 15:30:21 -0000      1.16
+++ editor_event.hxx    27 Sep 2002 11:26:45 -0000      1.17
@@ -110,7 +110,7 @@
   bool accept_input ();
   
   EditorEvent (const EditorEvent&);
-  EditorEvent operator= (const EditorEvent&);
+  EditorEvent& operator= (const EditorEvent&);
 };
 
 } // namespace EditorNS

Index: editor_help_screen.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_help_screen.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- editor_help_screen.hxx      23 Aug 2002 15:49:54 -0000      1.4
+++ editor_help_screen.hxx      27 Sep 2002 11:26:45 -0000      1.5
@@ -36,7 +36,7 @@
   
 private:
   EditorHelpScreen (const EditorHelpScreen&);
-  EditorHelpScreen operator= (const EditorHelpScreen&);
+  EditorHelpScreen& operator= (const EditorHelpScreen&);
 };
 
 #endif

Index: editor_view.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_view.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- editor_view.hxx     11 Sep 2002 12:45:58 -0000      1.5
+++ editor_view.hxx     27 Sep 2002 11:26:45 -0000      1.6
@@ -96,7 +96,7 @@
 
 private:
   EditorView (const EditorView&);
-  EditorView operator= (const EditorView&);
+  EditorView& operator= (const EditorView&);
 };
 
 } // namespace EditorNS

Index: editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj.hxx,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- editorobj.hxx       11 Sep 2002 12:45:58 -0000      1.15
+++ editorobj.hxx       27 Sep 2002 11:26:45 -0000      1.16
@@ -122,7 +122,7 @@
   
 protected:
   EditorObj (const EditorObj&) { }
-  void operator= (const EditorObj&) { }
+  EditorObj& operator= (const EditorObj&) { return *this; }
 };
 
 #endif

Index: editorobj_group.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj_group.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- editorobj_group.hxx 11 Sep 2002 12:45:58 -0000      1.10
+++ editorobj_group.hxx 27 Sep 2002 11:26:45 -0000      1.11
@@ -59,7 +59,7 @@
   
 private:
   EditorObjGroup (const EditorObjGroup&);
-  EditorObjGroup operator= (const EditorObjGroup&);
+  EditorObjGroup& operator= (const EditorObjGroup&);
 };
 
 #endif

Index: editorobj_group_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editorobj_group_data.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- editorobj_group_data.hxx    23 Aug 2002 15:49:54 -0000      1.5
+++ editorobj_group_data.hxx    27 Sep 2002 11:26:45 -0000      1.6
@@ -39,7 +39,7 @@
   
 private:
   EditorObjGroupData (const EditorObjGroupData&);
-  EditorObjGroupData operator= (const EditorObjGroupData&);
+  EditorObjGroupData& operator= (const EditorObjGroupData&);
 };
 
 #endif

Index: entrance_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/entrance_window.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- entrance_window.cxx 11 Sep 2002 12:45:58 -0000      1.4
+++ entrance_window.cxx 27 Sep 2002 11:26:45 -0000      1.5
@@ -17,10 +17,9 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include "../editorobjs/entrance_obj.hxx"
 #include "editor.hxx"
 #include "object_manager.hxx"
-
-#include "plfobj.hxx"
 #include "../string_converter.hxx"
 #include "entrance_window.hxx"
 
@@ -36,48 +35,48 @@
 
 namespace EditorNS {
 
-EntranceWindow::EntranceWindow (CL_Component* parent, EntranceObj* obj)
-  : PropertyFrame (200, 100, parent),
-    entrance (obj),
-    direction_label (CL_Rect (10, 10, 90, 30), "Direction", this),
-    direction_left (CL_Point (110, 10), "left", this),
-    direction_misc (CL_Point (110, 30), "misc", this),
-    direction_right (CL_Point (110, 50), "right", this),
-    release_rate_label (CL_Rect (10, 70, 90,90), "Release Rate", this),
-    release_rate_input (CL_Rect (110, 70, 190, 90), "30", this)
+EntranceWindow::EntranceWindow (CL_Component* parent, EditorObjs::EntranceObj* 
obj)
+  : PropertyFrame(200, 100, parent),
+    entrance(obj),
+    direction_label(CL_Rect(10, 10, 90, 30), "Direction", this),
+    direction_left(CL_Point(110, 10), "left", this),
+    direction_misc(CL_Point(110, 30), "misc", this),
+    direction_right(CL_Point(110, 50), "right", this),
+    release_rate_label(CL_Rect(10, 70, 90,90), "Release Rate", this),
+    release_rate_input(CL_Rect(110, 70, 190, 90), "30", this)
 {
-  direction_group.add (&direction_left);
-  direction_group.add (&direction_misc);
-  direction_group.add (&direction_right);
+  direction_group.add(&direction_left);
+  direction_group.add(&direction_misc);
+  direction_group.add(&direction_right);
 
   switch (entrance->direction)
     {
-    case EntranceData::LEFT:
-      direction_left.set_checked (true);
+    case WorldObjsData::EntranceData::LEFT:
+      direction_left.set_checked(true);
       break;
-    case EntranceData::MISC:
-      direction_misc.set_checked (true);
+    case WorldObjsData::EntranceData::MISC:
+      direction_misc.set_checked(true);
       break;
-    case EntranceData::RIGHT:
-      direction_right.set_checked (true);
+    case WorldObjsData::EntranceData::RIGHT:
+      direction_right.set_checked(true);
       break;
     }
 
-  release_rate_input.set_text (to_string (entrance->release_rate));
+  release_rate_input.set_text(to_string(entrance->release_rate));
 }
 
 EntranceWindow::~EntranceWindow ()
 {
-  if (EditorObj::get_editor ()->get_object_manager ()->has_object (entrance))
+  if (EditorObj::get_editor()->get_object_manager()->has_object(entrance))
     {
-      if (direction_left.is_checked ())
-       entrance->direction = EntranceData::LEFT;
-      else if (direction_misc.is_checked ())
-       entrance->direction = EntranceData::MISC;
-      else if (direction_right.is_checked ())
-       entrance->direction = EntranceData::RIGHT;
+      if (direction_left.is_checked())
+       entrance->direction = WorldObjsData::EntranceData::LEFT;
+      else if (direction_misc.is_checked())
+       entrance->direction = WorldObjsData::EntranceData::MISC;
+      else if (direction_right.is_checked())
+       entrance->direction = WorldObjsData::EntranceData::RIGHT;
 
-      from_string(release_rate_input.get_text (), entrance->release_rate);
+      from_string(release_rate_input.get_text(), entrance->release_rate);
     }
   else
     {

Index: entrance_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/entrance_window.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- entrance_window.hxx 11 Sep 2002 12:45:58 -0000      1.6
+++ entrance_window.hxx 27 Sep 2002 11:26:45 -0000      1.7
@@ -26,14 +26,16 @@
 #include <ClanLib/GUI/radiobutton.h>
 #include "property_frame.hxx"
 
+namespace EditorObjs {
 class EntranceObj;
+}
 
 namespace EditorNS {
 
 class EntranceWindow : public PropertyFrame
 {
 private:
-  EntranceObj* entrance;
+  EditorObjs::EntranceObj* entrance;
 
   CL_Label       direction_label;
   CL_RadioGroup  direction_group;
@@ -45,14 +47,14 @@
   CL_InputBox    release_rate_input;
 
 public:
-  EntranceWindow (CL_Component* parent, EntranceObj* );
+  EntranceWindow (CL_Component* parent, EditorObjs::EntranceObj* );
   ~EntranceWindow ();
 
   std::string get_title () { return "Entrance Properties"; }
       
 private:
   EntranceWindow (const EntranceWindow&);
-  EntranceWindow operator= (const EntranceWindow&);
+  EntranceWindow& operator= (const EntranceWindow&);
 };
 
 } // namespace EditorNS

Index: groundpiece_window.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/groundpiece_window.cxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- groundpiece_window.cxx      16 Sep 2002 20:31:09 -0000      1.9
+++ groundpiece_window.cxx      27 Sep 2002 11:26:45 -0000      1.10
@@ -17,9 +17,11 @@
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
+#include <iostream>
 #include "editor.hxx"
 #include "object_manager.hxx"
 #include "groundpiece_window.hxx"
+#include "../editorobjs/groundpiece_obj.hxx"
 
 /************************
  Groundpiece Properties
@@ -35,33 +37,33 @@
 
 namespace EditorNS {
 
-GroundpieceWindow::GroundpieceWindow (CL_Component* parent,  
EditorGroundpieceObj* arg_data)
-  : PropertyFrame (200, 120, parent),
-    data (arg_data),
-    convert_to_hotspot_button (CL_Rect (10, 90, 190, 90 + 20), "Convert to 
HotSpot", this),
+GroundpieceWindow::GroundpieceWindow (CL_Component* parent,  
EditorObjs::GroundpieceObj* arg_data)
+  : PropertyFrame(200, 120, parent),
+    data(arg_data),
+    convert_to_hotspot_button(CL_Rect(10, 90, 190, 90 + 20), "Convert to 
HotSpot", this),
 
-    groundtype_label (CL_Rect (10, 10, 90, 10 + 20), "Groundtype", this),
+    groundtype_label(CL_Rect (10, 10, 90, 10 + 20), "Groundtype", this),
     //groundtype_listbox (CL_Rect (110, 60, 190, 60 + 60), this),
 
-    ground_radiobutton (CL_Point (110, 10), "ground", this),
-    transparent_radiobutton (CL_Point (110, 30), "transparent", this),
-    solid_radiobutton (CL_Point (110, 50), "solid", this),
-    bridge_radiobutton (CL_Point (110, 70), "bridge", this)
+    ground_radiobutton(CL_Point (110, 10), "ground", this),
+    transparent_radiobutton(CL_Point (110, 30), "transparent", this),
+    solid_radiobutton(CL_Point (110, 50), "solid", this),
+    bridge_radiobutton(CL_Point (110, 70), "bridge", this)
 {
-  groundtype_group.add (&ground_radiobutton);
-  groundtype_group.add (&transparent_radiobutton);
-  groundtype_group.add (&solid_radiobutton);
-  groundtype_group.add (&bridge_radiobutton);
+  groundtype_group.add(&ground_radiobutton);
+  groundtype_group.add(&transparent_radiobutton);
+  groundtype_group.add(&solid_radiobutton);
+  groundtype_group.add(&bridge_radiobutton);
 
   convert_to_hotspot_button_slot
-    = convert_to_hotspot_button.sig_clicked ().connect (this, 
&GroundpieceWindow::convert_to_hotspot);
+    = convert_to_hotspot_button.sig_clicked().connect(this, 
&GroundpieceWindow::convert_to_hotspot);
 
-  read_data ();
+  read_data();
 }
 
 GroundpieceWindow::~GroundpieceWindow ()
 {
-  write_data ();
+  write_data();
 }
 
 void
@@ -76,16 +78,16 @@
   switch (data->gptype)
     {
     case Groundtype::GP_SOLID:
-      solid_radiobutton.set_checked (true);
+      solid_radiobutton.set_checked(true);
       break;
     case Groundtype::GP_BRIDGE:
-      bridge_radiobutton.set_checked (true);
+      bridge_radiobutton.set_checked(true);
       break;
     case Groundtype::GP_TRANSPARENT:
-      transparent_radiobutton.set_checked (true);
+      transparent_radiobutton.set_checked(true);
       break;
     case Groundtype::GP_GROUND:
-      ground_radiobutton.set_checked (true);
+      ground_radiobutton.set_checked(true);
       break;
     default:
       std::cout << "Unhandled" << std::endl;
@@ -96,15 +98,15 @@
 void
 GroundpieceWindow::write_data ()
 {
-  if (EditorObj::get_editor ()->get_object_manager ()->has_object (data))
+  if (EditorObj::get_editor()->get_object_manager()->has_object(data))
     {
-      if (ground_radiobutton.is_checked ())
+      if (ground_radiobutton.is_checked())
        data->gptype = Groundtype::GP_GROUND;
-      else if (transparent_radiobutton.is_checked ())
+      else if (transparent_radiobutton.is_checked())
        data->gptype = Groundtype::GP_TRANSPARENT;
-      else if (solid_radiobutton.is_checked ())
+      else if (solid_radiobutton.is_checked())
        data->gptype = Groundtype::GP_SOLID;
-      else if (bridge_radiobutton.is_checked ())
+      else if (bridge_radiobutton.is_checked())
        data->gptype = Groundtype::GP_BRIDGE;
       else
        {
@@ -113,7 +115,7 @@
     }
   else
     {
-      std::cout << "GroundpieceWindow::write_data (): object disapeared" << 
std::endl;
+      std::cout << "GroundpieceWindow::write_data(): object disapeared" << 
std::endl;
     }
 }
 

Index: groundpiece_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/groundpiece_window.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- groundpiece_window.hxx      11 Sep 2002 12:45:58 -0000      1.8
+++ groundpiece_window.hxx      27 Sep 2002 11:26:45 -0000      1.9
@@ -25,14 +25,17 @@
 #include <ClanLib/GUI/radiogroup.h>
 #include <ClanLib/GUI/radiobutton.h>
 #include "property_frame.hxx"
-#include "editor_groundpiece_obj.hxx"
+
+namespace EditorObjs {
+class GroundpieceObj;
+}
 
 namespace EditorNS {
 
 class GroundpieceWindow : public PropertyFrame
 {
 private:
-  EditorGroundpieceObj* data;
+  EditorObjs::GroundpieceObj* data;
 
   CL_Button convert_to_hotspot_button;
 
@@ -48,7 +51,7 @@
   CL_Slot convert_to_hotspot_button_slot;
 
 public:
-  GroundpieceWindow (CL_Component* parent,  EditorGroundpieceObj* data);
+  GroundpieceWindow (CL_Component* parent,  EditorObjs::GroundpieceObj* data);
   ~GroundpieceWindow ();
 
   void convert_to_hotspot ();
@@ -60,7 +63,7 @@
       
 private:
   GroundpieceWindow (const GroundpieceWindow&);
-  GroundpieceWindow operator= (const GroundpieceWindow&);
+  GroundpieceWindow& operator= (const GroundpieceWindow&);
 };
 
 } // namespace EditorNS

Index: level_property_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/level_property_window.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- level_property_window.hxx   11 Sep 2002 12:45:58 -0000      1.7
+++ level_property_window.hxx   27 Sep 2002 11:26:45 -0000      1.8
@@ -71,7 +71,7 @@
       
 private:
   LevelPropertyWindow (const LevelPropertyWindow&);
-  LevelPropertyWindow operator= (const LevelPropertyWindow&);
+  LevelPropertyWindow& operator= (const LevelPropertyWindow&);
 };
 
 } // namespace EditorNS

Index: object_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.hxx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- object_manager.hxx  15 Sep 2002 15:30:21 -0000      1.19
+++ object_manager.hxx  27 Sep 2002 11:26:45 -0000      1.20
@@ -154,7 +154,7 @@
 
 private:
   ObjectManager (const ObjectManager&);
-  ObjectManager operator= (const ObjectManager&);
+  ObjectManager& operator= (const ObjectManager&);
 };
 
 } // namespace EditorNS

Index: object_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.cxx,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -d -r1.25 -r1.26
--- object_selector.cxx 25 Sep 2002 17:21:38 -0000      1.25
+++ object_selector.cxx 27 Sep 2002 11:26:45 -0000      1.26
@@ -32,13 +32,14 @@
 #include "../pingus_resource.hxx"
 #include "../string_converter.hxx"
 #include "../system.hxx"
-#include "editor_groundpiece_obj.hxx"
 #include "object_selector.hxx"
 #include "plfobj.hxx"
 #include "string_reader.hxx"
 #include "thumb_cache.hxx"
 #include "weather_obj.hxx"
 
+#include "../worldobjsdata/entrance_data.hxx"
+#include "../worldobjsdata/groundpiece_data.hxx"
 #include "../worldobjsdata/hotspot_data.hxx"
 #include "../worldobjsdata/liquid_data.hxx"
 #include "../worldobjsdata/solid_color_background_data.hxx"
@@ -50,6 +51,7 @@
 #include "../editorobjs/conveyor_belt_obj.hxx"
 #include "../editorobjs/fake_exit_obj.hxx"
 #include "../editorobjs/guillotine_obj.hxx"
+#include "../editorobjs/groundpiece_obj.hxx"
 #include "../editorobjs/hammer_obj.hxx"
 #include "../editorobjs/hotspot_obj.hxx"
 #include "../editorobjs/ice_block_obj.hxx"
@@ -132,7 +134,7 @@
 }
 
 EditorObjLst
-ObjectSelector::get_groundpiece (const Groundtype::GPType & gptype)
+ObjectSelector::get_groundpiece (const Groundtype::GPType& gptype)
 {
   GroundpieceData data;
   std::string datafile = std::string("groundpieces-") + 
Groundtype::type_to_string (gptype);
@@ -141,17 +143,18 @@
 
   std::string str = select_surface(datafile);
 
+  EditorObjLst objs;
+
   if (!str.empty())
     {
       data.desc = ResDescriptor("resource:" + datafile, str);
       data.gptype = gptype;
 
-      EditorObjLst objs;
-      objs.push_back(new EditorGroundpieceObj(data));
+      objs.push_back(new EditorObjs::GroundpieceObj(&data));
       return objs;
     }
   
-  return EditorObjLst();
+  return objs;
 }
 
 EditorObjLst

Index: object_selector.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- object_selector.hxx 16 Sep 2002 20:31:09 -0000      1.11
+++ object_selector.hxx 27 Sep 2002 11:26:45 -0000      1.12
@@ -23,6 +23,7 @@
 #include <config.h>
 #include <map>
 #include <list>
+#include <ClanLib/Core/Math/cl_vector.h>
 #include "../groundtype.hxx"
 #include "surface_selector.hxx"
 #include "editorobj.hxx"
@@ -72,7 +73,7 @@
   
 private:
   ObjectSelector (const ObjectSelector&);
-  ObjectSelector operator= (const ObjectSelector&);
+  ObjectSelector& operator= (const ObjectSelector&);
 };
 
 } // namespace EditorNS

Index: panel.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/panel.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- panel.hxx   11 Sep 2002 12:45:58 -0000      1.7
+++ panel.hxx   27 Sep 2002 11:26:45 -0000      1.8
@@ -51,7 +51,7 @@
   
 private:
   PanelIcon (const PanelIcon&);
-  PanelIcon operator= (const PanelIcon&);
+  PanelIcon& operator= (const PanelIcon&);
 };
 
 class Panel
@@ -76,7 +76,7 @@
   
 private:
   Panel (const Panel&);
-  Panel operator= (const Panel&);
+  Panel& operator= (const Panel&);
 };
 
 } // namespace EditorNS

Index: panel_icons.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/panel_icons.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- panel_icons.hxx     11 Sep 2002 12:45:58 -0000      1.6
+++ panel_icons.hxx     27 Sep 2002 11:26:45 -0000      1.7
@@ -32,7 +32,7 @@
   
 private:
   PanelIconNew (const PanelIconNew&);
-  PanelIconNew operator= (const PanelIconNew&);
+  PanelIconNew& operator= (const PanelIconNew&);
 };
 
 class PanelIconLoad : public PanelIcon
@@ -43,7 +43,7 @@
   
 private:
   PanelIconLoad (const PanelIconLoad&);
-  PanelIconLoad operator= (const PanelIconLoad&);
+  PanelIconLoad& operator= (const PanelIconLoad&);
 };
 
 class PanelIconSave : public PanelIcon
@@ -54,7 +54,7 @@
   
 private:
   PanelIconSave (const PanelIconSave&);
-  PanelIconSave operator= (const PanelIconSave&);
+  PanelIconSave& operator= (const PanelIconSave&);
 };
 
 class PanelIconCopy : public PanelIcon
@@ -65,7 +65,7 @@
   
 private:
   PanelIconCopy (const PanelIconCopy&);
-  PanelIconCopy operator= (const PanelIconCopy&);
+  PanelIconCopy& operator= (const PanelIconCopy&);
 };
 
 class PanelIconPaste : public PanelIcon
@@ -76,7 +76,7 @@
   
 private:
   PanelIconPaste (const PanelIconPaste&);
-  PanelIconPaste operator= (const PanelIconPaste&);
+  PanelIconPaste& operator= (const PanelIconPaste&);
 };
 
 class PanelIconLevelProperties : public PanelIcon
@@ -87,7 +87,7 @@
   
 private:
   PanelIconLevelProperties (const PanelIconLevelProperties&);
-  PanelIconLevelProperties operator= (const PanelIconLevelProperties&);
+  PanelIconLevelProperties& operator= (const PanelIconLevelProperties&);
 };
 
 class PanelIconObjectProperties : public PanelIcon
@@ -98,7 +98,7 @@
   
 private:
   PanelIconObjectProperties (const PanelIconObjectProperties&);
-  PanelIconObjectProperties operator= (const PanelIconObjectProperties&);
+  PanelIconObjectProperties& operator= (const PanelIconObjectProperties&);
 };
 
 class PanelIconDelete : public PanelIcon
@@ -109,7 +109,7 @@
   
 private:
   PanelIconDelete (const PanelIconDelete&);
-  PanelIconDelete operator= (const PanelIconDelete&);
+  PanelIconDelete& operator= (const PanelIconDelete&);
 };
 
 class PanelIconExit : public PanelIcon
@@ -120,7 +120,7 @@
   
 private:
   PanelIconExit (const PanelIconExit&);
-  PanelIconExit operator= (const PanelIconExit&);
+  PanelIconExit& operator= (const PanelIconExit&);
 };
 
 class PanelIconRun : public PanelIcon
@@ -131,7 +131,7 @@
   
 private:
   PanelIconRun (const PanelIconRun&);
-  PanelIconRun operator= (const PanelIconRun&);
+  PanelIconRun& operator= (const PanelIconRun&);
 };
 
 class PanelIconInsertObject : public PanelIcon
@@ -142,7 +142,7 @@
   
 private:
   PanelIconInsertObject (const PanelIconInsertObject&);
-  PanelIconInsertObject operator= (const PanelIconInsertObject&);
+  PanelIconInsertObject& operator= (const PanelIconInsertObject&);
 };
 
 class PanelIconZoomOut : public PanelIcon
@@ -153,7 +153,7 @@
   
 private:
   PanelIconZoomOut (const PanelIconZoomOut&);
-  PanelIconZoomOut operator= (const PanelIconZoomOut&);
+  PanelIconZoomOut& operator= (const PanelIconZoomOut&);
 };
 
 class PanelIconZoomIn : public PanelIcon
@@ -164,7 +164,7 @@
   
 private:
   PanelIconZoomIn (const PanelIconZoomIn&);
-  PanelIconZoomIn operator= (const PanelIconZoomIn&);
+  PanelIconZoomIn& operator= (const PanelIconZoomIn&);
 };
 
 class PanelIconRegionZoom : public PanelIcon
@@ -175,7 +175,7 @@
   
 private:
   PanelIconRegionZoom (const PanelIconRegionZoom&);
-  PanelIconRegionZoom operator= (const PanelIconRegionZoom&);
+  PanelIconRegionZoom& operator= (const PanelIconRegionZoom&);
 };
 
 class PanelIconSetupActions : public PanelIcon
@@ -186,7 +186,7 @@
   
 private:
   PanelIconSetupActions (const PanelIconSetupActions&);
-  PanelIconSetupActions operator= (const PanelIconSetupActions&);
+  PanelIconSetupActions& operator= (const PanelIconSetupActions&);
 };
 
 } // namespace EditorNS

Index: plfobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- plfobj.cxx  25 Sep 2002 17:21:38 -0000      1.13
+++ plfobj.cxx  27 Sep 2002 11:26:45 -0000      1.14
@@ -18,86 +18,9 @@
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include <stdio.h>
-#include "../pingus_error.hxx"
-#include "editor_view.hxx"
 #include "plfobj.hxx"
-#include "entrance_window.hxx"
-
-using namespace std;
-
-EntranceObj::EntranceObj(const EntranceData& data)
-  : EntranceData (data)
-{
-  pos_ref = &pos;
-
-  std::cout << "EntranceObj::EntranceObj(const EntranceData& data): " 
-           << type << std::endl;
-
-  if (type == "generic")
-    {
-      sprite = Sprite("Entrances/generic", "entrances");
-      sprite.set_align_center_bottom ();
-    } 
-  else if (type == "woodthing") 
-    {
-      std::cout << "WOODTHING" << std::endl;
-      sprite = Sprite("Entrances/woodthing_mov", "entrances");
-      sprite.set_align(0  - sprite.get_width()/2,
-                      32 - sprite.get_height());
-    }
-  else if (type == "cloud")
-    {
-      sprite = Sprite("Entrances/cloud", "entrances");
-      sprite.set_align(-115, -75);
-    } 
-  else 
-    {
-      std::cout << "Entrance obj error!" << endl;
-      PingusError::raise("EntranceObj: Unknown entrance type: " + type);
-    }
-}
 
-EditorObj*
-EntranceObj::duplicate()
-{
-  std::cout << "EntranceObj::duplicate()" << std::endl;
-  return new EntranceObj(static_cast<EntranceData>(*this));
-}
-
-std::string
-EntranceObj::status_line()
-{
-  std::string dir_str = "not set - this is a bug";
-  char str[256];
-
-  switch(direction)
-    {
-    case EntranceData::LEFT:
-      dir_str = "left";
-      break;
-    case EntranceData::RIGHT:
-      dir_str = "right";
-      break;
-    case EntranceData::MISC:
-      dir_str = "misc";
-      break;
-    }
-
-  snprintf(str, 256, "Entrance: %s Rate: %d Direction: %s Owner: %d",
-         type.c_str(), release_rate, dir_str.c_str(), owner_id);
-
-  return std::string(str);
-}
-
-EditorNS::PropertyFrame*
-EntranceObj::get_gui_dialog (CL_Component* parent)
-{
-  // FIXME: due to the shared_ptr<> this is not guaranted to stay here
-  // FIXME: long enough
-  return new EditorNS::EntranceWindow (parent, this);
-}
-
-ExitObj::ExitObj(const ExitData& data)
+ExitObj::ExitObj (const ExitData& data)
   : SpriteEditorObj (data.desc.res_name, data.desc.datafile, &pos),
     ExitData (data)
 {

Index: plfobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/plfobj.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- plfobj.hxx  25 Sep 2002 17:21:38 -0000      1.11
+++ plfobj.hxx  27 Sep 2002 11:26:45 -0000      1.12
@@ -20,26 +20,9 @@
 #ifndef HEADER_PINGUS_EDITOR_PLFOBJ_HXX
 #define HEADER_PINGUS_EDITOR_PLFOBJ_HXX
 
-#include "../entrance_data.hxx"
 #include "../exit_data.hxx"
 #include "sprite_editorobj.hxx"
 
-class EntranceObj : public SpriteEditorObj,
-                   public EntranceData
-{
-public:
-  EntranceObj (const EntranceData&);
-
-  EditorObj* duplicate ();
-  void write_xml (std::ostream& xml) { EntranceData::write_xml (xml); }
-  std::string status_line ();
-  EditorNS::PropertyFrame* get_gui_dialog (CL_Component* parent);
-  
-private:
-  EntranceObj (const EntranceObj&);
-  EntranceObj operator= (const EntranceObj&);
-};
-
 class ExitObj : public SpriteEditorObj,
                public ExitData
 {
@@ -52,11 +35,10 @@
   
 private:
   ExitObj (const ExitObj&);
-  ExitObj operator= (const ExitObj&);
+  ExitObj& operator= (const ExitObj&);
 };
 
 #endif
 
 /* EOF */
-
 

Index: property_frame.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/property_frame.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- property_frame.hxx  11 Sep 2002 12:45:58 -0000      1.5
+++ property_frame.hxx  27 Sep 2002 11:26:45 -0000      1.6
@@ -36,7 +36,7 @@
       
 private:
   PropertyFrame (const PropertyFrame&);
-  PropertyFrame operator= (const PropertyFrame&);
+  PropertyFrame& operator= (const PropertyFrame&);
 };
 
 } // namespace EditorNS 

Index: property_window.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/property_window.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- property_window.hxx 11 Sep 2002 12:45:58 -0000      1.7
+++ property_window.hxx 27 Sep 2002 11:26:45 -0000      1.8
@@ -45,7 +45,7 @@
       
 private:
   PropertyWindow (const PropertyWindow&);
-  PropertyWindow operator= (const PropertyWindow&);
+  PropertyWindow& operator= (const PropertyWindow&);
 };
 
 } // namespace EditorNS

Index: rect_editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/rect_editorobj.cxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rect_editorobj.cxx  11 Sep 2002 12:45:58 -0000      1.5
+++ rect_editorobj.cxx  27 Sep 2002 11:26:45 -0000      1.6
@@ -29,11 +29,13 @@
 {
 }
 
-void
+RectEditorObj&
 RectEditorObj::operator= (const RectEditorObj& old)
 {
   if (this != &old)
     EditorObj::operator=(old);
+    
+  return *this;
 }
 
 void

Index: rect_editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/rect_editorobj.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- rect_editorobj.hxx  11 Sep 2002 12:45:58 -0000      1.5
+++ rect_editorobj.hxx  27 Sep 2002 11:26:45 -0000      1.6
@@ -49,7 +49,7 @@
   
 protected:
   RectEditorObj (const RectEditorObj& old);
-  void operator= (const RectEditorObj& old);
+  RectEditorObj& operator= (const RectEditorObj& old);
 };
 
 #endif

Index: scroll_map.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/scroll_map.hxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- scroll_map.hxx      11 Sep 2002 12:45:58 -0000      1.4
+++ scroll_map.hxx      27 Sep 2002 11:26:45 -0000      1.5
@@ -51,7 +51,7 @@
   
 private:
   ScrollMap (const ScrollMap&);
-  ScrollMap operator= (const ScrollMap&);
+  ScrollMap& operator= (const ScrollMap&);
 };
 
 } // namespace EditorNS

Index: selection.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/selection.hxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- selection.hxx       13 Sep 2002 18:28:26 -0000      1.10
+++ selection.hxx       27 Sep 2002 11:26:45 -0000      1.11
@@ -76,7 +76,7 @@
   
 private:
   Selection (const Selection&);
-  Selection operator= (const Selection&);
+  Selection& operator= (const Selection&);
 };
 
 } // namespace EditorNS

Index: sprite_editorobj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/sprite_editorobj.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- sprite_editorobj.cxx        11 Sep 2002 12:45:58 -0000      1.6
+++ sprite_editorobj.cxx        27 Sep 2002 11:26:45 -0000      1.7
@@ -54,7 +54,7 @@
 {
 }
 
-void
+SpriteEditorObj&
 SpriteEditorObj::operator= (const SpriteEditorObj& old)
 {
   if (this != &old)
@@ -64,6 +64,8 @@
       sprite  = old.sprite;
       pos_ref = old.pos_ref;
     }
+    
+  return *this;
 }
 
 float

Index: sprite_editorobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/sprite_editorobj.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- sprite_editorobj.hxx        14 Sep 2002 19:06:34 -0000      1.7
+++ sprite_editorobj.hxx        27 Sep 2002 11:26:45 -0000      1.8
@@ -68,7 +68,7 @@
   
 protected:
   SpriteEditorObj (const SpriteEditorObj& old);
-  void operator= (const SpriteEditorObj& old);
+  SpriteEditorObj& operator= (const SpriteEditorObj& old);
 };
 
 #endif

Index: start_pos.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/start_pos.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- start_pos.hxx       6 Sep 2002 17:33:29 -0000       1.6
+++ start_pos.hxx       27 Sep 2002 11:26:45 -0000      1.7
@@ -36,7 +36,7 @@
   
 private:
   StartPos (const StartPos&);
-  StartPos operator= (const StartPos&);
+  StartPos& operator= (const StartPos&);
 };
 
 #endif

Index: status_line.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/status_line.hxx,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- status_line.hxx     11 Sep 2002 12:45:58 -0000      1.9
+++ status_line.hxx     27 Sep 2002 11:26:45 -0000      1.10
@@ -46,7 +46,7 @@
   
 private:
   StatusLine (const StatusLine&);
-  StatusLine operator= (const StatusLine&);
+  StatusLine& operator= (const StatusLine&);
 };
 
 } // namespace EditorNS

Index: string_reader.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/string_reader.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- string_reader.hxx   23 Aug 2002 15:49:55 -0000      1.5
+++ string_reader.hxx   27 Sep 2002 11:26:45 -0000      1.6
@@ -51,7 +51,7 @@
   
 private:
   StringReader (const StringReader&);
-  StringReader operator= (const StringReader&);
+  StringReader& operator= (const StringReader&);
 };
 
 #endif

Index: surface_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/surface_selector.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- surface_selector.cxx        23 Aug 2002 15:49:55 -0000      1.4
+++ surface_selector.cxx        27 Sep 2002 11:26:45 -0000      1.5
@@ -204,7 +204,7 @@
 {
 }
 
-surface_obj surface_obj::operator= (const surface_obj& old)
+surface_obj& surface_obj::operator= (const surface_obj& old)
 {
   if (this == &old)
     return *this;

Index: surface_selector.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/surface_selector.hxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- surface_selector.hxx        23 Aug 2002 15:49:55 -0000      1.6
+++ surface_selector.hxx        27 Sep 2002 11:26:45 -0000      1.7
@@ -47,7 +47,7 @@
   
   surface_obj ();
   surface_obj (const surface_obj& old);
-  surface_obj operator= (const surface_obj& old);
+  surface_obj& operator= (const surface_obj& old);
 };
 
 class SurfaceSelector
@@ -73,7 +73,7 @@
   
 private:
   SurfaceSelector (const SurfaceSelector&);
-  SurfaceSelector operator= (const SurfaceSelector&);
+  SurfaceSelector& operator= (const SurfaceSelector&);
 }; 
 
 

Index: thumb_cache.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/thumb_cache.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- thumb_cache.hxx     11 Sep 2002 12:45:58 -0000      1.7
+++ thumb_cache.hxx     27 Sep 2002 11:26:46 -0000      1.8
@@ -46,7 +46,7 @@
   
 private:
   ThumbCache (const ThumbCache&);
-  ThumbCache operator= (const ThumbCache&);  
+  ThumbCache& operator= (const ThumbCache&);  
 };
 
 } // namespace EditorNS

Index: weather_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/weather_obj.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- weather_obj.hxx     16 Sep 2002 15:47:35 -0000      1.8
+++ weather_obj.hxx     27 Sep 2002 11:26:46 -0000      1.9
@@ -43,7 +43,7 @@
   
 private:
   WeatherObj (const WeatherObj&);
-  WeatherObj operator= (const WeatherObj&);
+  WeatherObj& operator= (const WeatherObj&);
 };
 
 #endif





reply via email to

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