diff src/tileset.d @ 0:a2d653eb9e99

first working version.
author fred@reichbier.de
date Thu, 17 Jul 2008 18:52:55 +0200
parents
children fc2f936a961c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tileset.d	Thu Jul 17 18:52:55 2008 +0200
@@ -0,0 +1,20 @@
+module tileset;
+
+import dsfml.window.all;
+import dsfml.system.all;
+import dsfml.graphics.all;
+
+import imagecache;
+
+class Tileset {
+    private Cache cache;
+    public Image[int] tiles;
+
+    this(Cache cache) {
+	this.cache = cache;	
+    }
+
+    void add_tile(int id, char[] filename) {
+	this.tiles[id] = this.cache.get_image(filename);
+    }
+}