Mercurial > projects > myrrdin
annotate src/tileset.d @ 2:fc2f936a961c
basic loading, to be fixed
author | fred@reichbier.de |
---|---|
date | Thu, 17 Jul 2008 21:06:43 +0200 |
parents | a2d653eb9e99 |
children |
rev | line source |
---|---|
0 | 1 module tileset; |
2 | |
3 import dsfml.window.all; | |
4 import dsfml.system.all; | |
5 import dsfml.graphics.all; | |
6 | |
7 import imagecache; | |
8 | |
2 | 9 alias Image[int] TileList; |
10 | |
0 | 11 class Tileset { |
12 private Cache cache; | |
2 | 13 public TileList tiles; |
0 | 14 |
15 this(Cache cache) { | |
16 this.cache = cache; | |
17 } | |
18 | |
19 void add_tile(int id, char[] filename) { | |
20 this.tiles[id] = this.cache.get_image(filename); | |
21 } | |
22 } |