view src/tileset.d @ 3:a9af6ec19195

working map and tileset loading
author fred@reichbier.de
date Thu, 17 Jul 2008 21:34:53 +0200
parents fc2f936a961c
children
line wrap: on
line source

module tileset;

import dsfml.window.all;
import dsfml.system.all;
import dsfml.graphics.all;

import imagecache;

alias Image[int] TileList;

class Tileset {
    private Cache cache;
    public TileList tiles;

    this(Cache cache) {
	this.cache = cache;	
    }

    void add_tile(int id, char[] filename) {
	this.tiles[id] = this.cache.get_image(filename);
    }
}