Mercurial > projects > myrrdin
comparison import/myrrdin/tileset.d @ 5:f4b89014ad39
added moving figure stuff + animated sprites. not usable atm.
author | fred@reichbier.de |
---|---|
date | Sat, 19 Jul 2008 14:33:08 +0200 |
parents | src/tileset.d@fc2f936a961c |
children | 510541745cd1 |
comparison
equal
deleted
inserted
replaced
4:292df259cc85 | 5:f4b89014ad39 |
---|---|
1 /* | |
2 This file is part of myrrdin. | |
3 | |
4 myrrdin is free software: you can redistribute it and/or modify | |
5 it under the terms of the GNU Lesser General Public License as | |
6 published by the Free Software Foundation, either version 3 of | |
7 the License, or (at your option) any later version. | |
8 | |
9 myrrdin is distributed in the hope that it will be useful, | |
10 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 GNU Lesser General Public License for more details. | |
13 | |
14 You should have received a copy of the GNU Lesser General Public | |
15 License along with myrrdin. If not, see <http://www.gnu.org/licenses/>. | |
16 */ | |
17 | |
18 module tileset; | |
19 | |
20 import dsfml.window.all; | |
21 import dsfml.system.all; | |
22 import dsfml.graphics.all; | |
23 | |
24 import imagecache; | |
25 | |
26 alias Image[int] TileList; | |
27 | |
28 class Tileset { | |
29 private Cache cache; | |
30 public TileList tiles; | |
31 | |
32 this(Cache cache) { | |
33 this.cache = cache; | |
34 } | |
35 | |
36 void add_tile(int id, char[] filename) { | |
37 this.tiles[id] = this.cache.get_image(filename); | |
38 } | |
39 } |