First hack to get a random gen map going.
This commit is contained in:
parent
2daa1c9bd5
commit
56d67aba28
7 changed files with 72 additions and 34 deletions
|
@ -39,15 +39,15 @@ void TexturePack::load_textures() {
|
|||
Config assets("assets/config.json");
|
||||
|
||||
for(string tile_path : assets["textures"]) {
|
||||
images.emplace_back(load_image(tile_path));
|
||||
surfaces.emplace_back(load_image(tile_path));
|
||||
}
|
||||
|
||||
floor = load_image(assets["sprites"]["floor"]);
|
||||
ceiling = load_image(assets["sprites"]["ceiling"]);
|
||||
}
|
||||
|
||||
const uint32_t* TexturePack::get_texture(size_t num) {
|
||||
return (const uint32_t *)images[num].getPixelsPtr();
|
||||
const uint32_t* TexturePack::get_surface(size_t num) {
|
||||
return (const uint32_t *)surfaces[num].getPixelsPtr();
|
||||
}
|
||||
|
||||
Sprite &TexturePack::get_sprite(size_t sprite_num) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue