pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r3392 - in trunk/pingus: . src/editor


From: grumbel at BerliOS
Subject: [Pingus-CVS] r3392 - in trunk/pingus: . src/editor
Date: Tue, 30 Oct 2007 07:18:46 +0100

Author: grumbel
Date: 2007-10-30 07:18:45 +0100 (Tue, 30 Oct 2007)
New Revision: 3392

Modified:
   trunk/pingus/TODO
   trunk/pingus/src/editor/object_selector.cpp
Log:
- make entrance hotspot default to 100 and generic one to 110

Modified: trunk/pingus/TODO
===================================================================
--- trunk/pingus/TODO   2007-10-30 06:13:44 UTC (rev 3391)
+++ trunk/pingus/TODO   2007-10-30 06:18:45 UTC (rev 3392)
@@ -306,8 +306,6 @@
 Medium Important:
 =================
 
-- default entrance hotspots to 100
-
 - shrinking the editor window to much causes a crash (limit size as temporary 
fix)
 
 - implement proper tmpfile Support (save tmp levels to ~/.pingus/tmp/

Modified: trunk/pingus/src/editor/object_selector.cpp
===================================================================
--- trunk/pingus/src/editor/object_selector.cpp 2007-10-30 06:13:44 UTC (rev 
3391)
+++ trunk/pingus/src/editor/object_selector.cpp 2007-10-30 06:18:45 UTC (rev 
3392)
@@ -72,6 +72,7 @@
     LevelObj* obj = new LevelObj("entrance", impl);
     obj->set_type("generic");
     obj->set_pos(pos);
+    obj->set_pos_z(110);
     obj->set_direction("misc");
     obj->set_release_rate(150);
     obj->set_owner(0);
@@ -101,16 +102,19 @@
 struct Hotspot : public ObjectSelectorList::Object 
 {
   ResDescriptor desc;
+  int z_pos;
   
-  Hotspot(const std::string& name)
+  Hotspot(const std::string& name, int z_pos = 0)
     : Object(Resource::load_sprite(name),
              Resource::load_thumb_sprite(name)),
-      desc(name)
+      desc(name),
+      z_pos(z_pos)
   {}
 
   LevelObj* create(const Vector2i& pos, LevelImpl* impl) { 
     LevelObj* obj = new LevelObj("hotspot", impl);
     obj->set_pos(pos);
+    obj->set_pos_z(z_pos);
     obj->set_res_desc(desc);
     // obj->set_para();
     return obj;
@@ -461,7 +465,7 @@
     {
       //sprite.scale(48, 48);
       if (*i != "entrances/generic")
-        set->add(new Hotspot(*i));
+        set->add(new Hotspot(*i, 100));
     }
 
   return set;





reply via email to

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