[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.32,1.33 obj
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.32,1.33 object_manager.cxx,1.28,1.29 object_manager.hxx,1.17,1.18 |
Date: |
14 Sep 2002 23:31:14 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv18104/editor
Modified Files:
editor_event.cxx object_manager.cxx object_manager.hxx
Log Message:
- some cleanup, removed unused member functions
- added object sorter to the editor (should probally be sorted automatically on
each update)
Index: editor_event.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/editor_event.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- editor_event.cxx 11 Sep 2002 12:45:58 -0000 1.32
+++ editor_event.cxx 14 Sep 2002 23:31:12 -0000 1.33
@@ -309,6 +309,10 @@
}
break;
+ case CL_KEY_S:
+ object_manager->z_pos_sort ();
+ break;
+
case CL_KEY_Z: // FIXME: stupid key binding
editor_zoom_in ();
break;
Index: object_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.cxx,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -d -r1.28 -r1.29
--- object_manager.cxx 11 Sep 2002 12:45:58 -0000 1.28
+++ object_manager.cxx 14 Sep 2002 23:31:12 -0000 1.29
@@ -377,6 +377,12 @@
return std::find (editor_objs.begin (), editor_objs.end (), obj) !=
editor_objs.end ();
}
+void
+ObjectManager::z_pos_sort ()
+{
+ std::stable_sort(editor_objs.begin (), editor_objs.end (),
EditorObj_z_pos_sorter);
+}
+
} // namespace EditorNS
/* EOF */
Index: object_manager.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.hxx,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- object_manager.hxx 11 Sep 2002 12:45:58 -0000 1.17
+++ object_manager.hxx 14 Sep 2002 23:31:12 -0000 1.18
@@ -29,7 +29,8 @@
class EditorView;
-/// Manager for all level objects.
+/** Manager for all level objects. This class is kind of analog to the
+ World. */
class ObjectManager
{
private:
@@ -148,6 +149,9 @@
the object has not yet been deleted */
bool has_object (EditorObj* obj);
+ /** sort all objects acording to there z_position */
+ void z_pos_sort ();
+
private:
ObjectManager (const ObjectManager&);
ObjectManager operator= (const ObjectManager&);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor editor_event.cxx,1.32,1.33 object_manager.cxx,1.28,1.29 object_manager.hxx,1.17,1.18,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src action_holder.hxx,1.5,1.6 smallmap_image.cxx,1.5,1.6 true_server.cxx,1.6,1.7 world.cxx,1.22,1.23 world.hxx,1.10,1.11
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src plf.cxx,1.5,1.6 plf.hxx,1.3,1.4 spot_map.cxx,1.12,1.13 worldobj_data_factory.cxx,1.10,1.11
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src action_holder.hxx,1.5,1.6 smallmap_image.cxx,1.5,1.6 true_server.cxx,1.6,1.7 world.cxx,1.22,1.23 world.hxx,1.10,1.11
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src plf.cxx,1.5,1.6 plf.hxx,1.3,1.4 spot_map.cxx,1.12,1.13 worldobj_data_factory.cxx,1.10,1.11
- Index(es):