Mercurial > projects > myrrdin
comparison import/myrrdin/tileset.d @ 10:79b534bbda65
new director model
author | fred@reichbier.de |
---|---|
date | Sat, 19 Jul 2008 19:29:00 +0200 |
parents | 806b3781f4e4 |
children |
comparison
equal
deleted
inserted
replaced
9:adc5e1eedb8a | 10:79b534bbda65 |
---|---|
26 import dsfml.window.all; | 26 import dsfml.window.all; |
27 import dsfml.system.all; | 27 import dsfml.system.all; |
28 import dsfml.graphics.all; | 28 import dsfml.graphics.all; |
29 | 29 |
30 import myrrdin.imagecache; | 30 import myrrdin.imagecache; |
31 import myrrdin.director; | |
31 | 32 |
32 alias Image[int] TileList; | 33 alias Image[int] TileList; |
33 | 34 |
34 class Tileset { | 35 class Tileset { |
35 private Cache cache; | 36 private Cache cache; |
36 public TileList tiles; | 37 public TileList tiles; |
37 | 38 |
38 this(Cache cache) { | 39 this() { |
39 this.cache = cache; | 40 this.cache = Director.cache; |
40 } | 41 } |
41 | 42 |
42 void add_tile(int id, char[] filename) { | 43 void add_tile(int id, char[] filename) { |
43 this.tiles[id] = this.cache.get_image(filename); | 44 this.tiles[id] = this.cache.get_image(filename); |
44 } | 45 } |