pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] [pingus] push by address@hidden - Moved prefabs into subdir


From: pingus
Subject: [Pingus-CVS] [pingus] push by address@hidden - Moved prefabs into subdirectories... on 2011-09-27 23:33 GMT
Date: Tue, 27 Sep 2011 23:46:43 +0000

Revision: 01b85bf3cb5e
Author:   Ingo Ruhnke <address@hidden>
Date:     Tue Sep 27 16:33:40 2011
Log:      Moved prefabs into subdirectories

Fixes issue 64

http://code.google.com/p/pingus/source/detail?r=01b85bf3cb5e

Added:
 /data/images/prefabs/liquids/slime.png
 /data/images/prefabs/liquids/slime.sprite
 /data/images/prefabs/liquids/water.png
 /data/images/prefabs/liquids/water.sprite
 /data/images/prefabs/misc/snowman1.png
 /data/images/prefabs/misc/snowman1.sprite
 /data/prefabs/liquids/slime.prefab
 /data/prefabs/liquids/water.prefab
 /data/prefabs/misc/snowman1.prefab
Deleted:
 /data/prefabs/liquid.prefab
 /data/prefabs/snowman1.prefab
Modified:
 /src/editor/object_selector.cpp
 /tools/generate-prefab-images.sh

=======================================
--- /dev/null   
+++ /data/images/prefabs/liquids/slime.png      Tue Sep 27 16:33:40 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /data/images/prefabs/liquids/slime.sprite   Tue Sep 27 16:33:40 2011
@@ -0,0 +1,3 @@
+(pingus-sprite
+  (image "slime.png")
+  (offset -24 -84))
=======================================
--- /dev/null   
+++ /data/images/prefabs/liquids/water.png      Tue Sep 27 16:33:40 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /data/images/prefabs/liquids/water.sprite   Tue Sep 27 16:33:40 2011
@@ -0,0 +1,3 @@
+(pingus-sprite
+  (image "water.png")
+  (offset -24 -84))
=======================================
--- /dev/null   
+++ /data/images/prefabs/misc/snowman1.png      Tue Sep 27 16:33:40 2011
Binary file, no diff available.
=======================================
--- /dev/null
+++ /data/images/prefabs/misc/snowman1.sprite   Tue Sep 27 16:33:40 2011
@@ -0,0 +1,3 @@
+(pingus-sprite
+  (image "snowman1.png")
+  (offset -29 -105))
=======================================
--- /dev/null
+++ /data/prefabs/liquids/slime.prefab  Tue Sep 27 16:33:40 2011
@@ -0,0 +1,21 @@
+(pingus-prefab
+  (version 3)
+  (overrides
+    (repeat 15))
+  (objects
+    (liquid
+      (surface
+        (image "liquids/slime")
+        (modifier "ROT0"))
+      (position -24 -84 -10)
+      (speed 0)
+      (repeat 1))
+    (liquid
+      (surface
+        (image "liquids/slime")
+        (modifier "ROT0"))
+      (position 0 -63 10)
+      (speed 0)
+      (repeat 1))))
+
+;; EOF ;;
=======================================
--- /dev/null
+++ /data/prefabs/liquids/water.prefab  Tue Sep 27 16:33:40 2011
@@ -0,0 +1,21 @@
+(pingus-prefab
+  (version 3)
+  (overrides
+    (repeat 15))
+  (objects
+    (liquid
+      (surface
+        (image "liquids/water2")
+        (modifier "ROT0"))
+      (position -24 -84 -10)
+      (speed 0)
+      (repeat 1))
+    (liquid
+      (surface
+        (image "liquids/water2")
+        (modifier "ROT0"))
+      (position 0 -63 10)
+      (speed 0)
+      (repeat 1))))
+
+;; EOF ;;
=======================================
--- /dev/null
+++ /data/prefabs/misc/snowman1.prefab  Tue Sep 27 16:33:40 2011
@@ -0,0 +1,89 @@
+(pingus-prefab
+  (version 3)
+  (objects
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball2")
+        (modifier "ROT0"))
+      (position -29 -67 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball3")
+        (modifier "ROT0"))
+      (position -21 -73 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball1")
+        (modifier "ROT0"))
+      (position -12 -91 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball")
+        (modifier "ROT0"))
+      (position -12 -81 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowman_coal2")
+        (modifier "ROT0"))
+      (position -2 -83 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowman_coal1")
+        (modifier "ROT0"))
+      (position -10 -84 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball2")
+        (modifier "ROT0"))
+      (position 10 -68 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball3")
+        (modifier "ROT0"))
+      (position -21 -41 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball")
+        (modifier "ROT0"))
+      (position -11 -6 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball")
+        (modifier "ROT0"))
+      (position 3 -6 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball")
+        (modifier "ROT0"))
+      (position 11 -7 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball")
+        (modifier "ROT0"))
+      (position -19 -7 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowball")
+        (modifier "ROT0"))
+      (position -5 -6 0))
+    (groundpiece
+      (type "ground")
+      (surface
+        (image "groundpieces/ground/xmas/snowman_nose")
+        (modifier "ROT90FLIP"))
+      (position -3 -105 0))))
+
+;; EOF ;;
=======================================
--- /data/prefabs/liquid.prefab Mon Sep 12 15:43:02 2011
+++ /dev/null
@@ -1,21 +0,0 @@
-(pingus-prefab
-  (version 3)
-  (overrides
-    (repeat 15))
-  (objects
-    (liquid
-      (surface
-        (image "liquids/slime")
-        (modifier "ROT0"))
-      (position -24 -84 -10)
-      (speed 0)
-      (repeat 1))
-    (liquid
-      (surface
-        (image "liquids/slime")
-        (modifier "ROT0"))
-      (position 0 -63 10)
-      (speed 0)
-      (repeat 1))))
-
-;; EOF ;;
=======================================
--- /data/prefabs/snowman1.prefab       Wed Sep 14 14:15:01 2011
+++ /dev/null
@@ -1,89 +0,0 @@
-(pingus-prefab
-  (version 3)
-  (objects
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball2")
-        (modifier "ROT0"))
-      (position -29 -67 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball3")
-        (modifier "ROT0"))
-      (position -21 -73 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball1")
-        (modifier "ROT0"))
-      (position -12 -91 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball")
-        (modifier "ROT0"))
-      (position -12 -81 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowman_coal2")
-        (modifier "ROT0"))
-      (position -2 -83 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowman_coal1")
-        (modifier "ROT0"))
-      (position -10 -84 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball2")
-        (modifier "ROT0"))
-      (position 10 -68 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball3")
-        (modifier "ROT0"))
-      (position -21 -41 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball")
-        (modifier "ROT0"))
-      (position -11 -6 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball")
-        (modifier "ROT0"))
-      (position 3 -6 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball")
-        (modifier "ROT0"))
-      (position 11 -7 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball")
-        (modifier "ROT0"))
-      (position -19 -7 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowball")
-        (modifier "ROT0"))
-      (position -5 -6 0))
-    (groundpiece
-      (type "ground")
-      (surface
-        (image "groundpieces/ground/xmas/snowman_nose")
-        (modifier "ROT90FLIP"))
-      (position -3 -105 0))))
-
-;; EOF ;;
=======================================
--- /src/editor/object_selector.cpp     Tue Sep 27 15:56:17 2011
+++ /src/editor/object_selector.cpp     Tue Sep 27 16:33:40 2011
@@ -361,6 +361,13 @@
   {
     set->add(new Liquid(*i));
   }
+
+  // prefab liquids
+ auto directory = Pathname("prefabs/liquids", Pathname::DATA_PATH).opendir("*.prefab");
+  for(auto i = directory.begin(); i != directory.end(); ++i)
+  {
+    set->add(new Prefab(System::cut_file_extension(i->get_raw_path())));
+  }

   return set;
 }
@@ -406,7 +413,7 @@
std::unique_ptr<ObjectSelectorSet> set(new ObjectSelectorSet(object_list, 48, 48));

   // FIXME: doesn't recurse down the prefabs/ directory
- auto directory = Pathname("prefabs", Pathname::DATA_PATH).opendir("*.prefab"); + auto directory = Pathname("prefabs/misc", Pathname::DATA_PATH).opendir("*.prefab");
   for(auto i = directory.begin(); i != directory.end(); ++i)
   {
     set->add(new Prefab(System::cut_file_extension(i->get_raw_path())));
=======================================
--- /tools/generate-prefab-images.sh    Tue Sep 27 15:13:24 2011
+++ /tools/generate-prefab-images.sh    Tue Sep 27 16:33:40 2011
@@ -1,6 +1,6 @@
 #!/bin/bash

-for i in data/prefabs/*.prefab data/prefabs/*/*.prefab; do
+for i in data/prefabs/*/*.prefab; do
     OUT="${i##data/}"
     OUT="data/images/${OUT%%.prefab}.png"
     echo "Writing $OUT"



reply via email to

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