Raycaster now controls the sprite locations with SpatialMap rather than the old way. Quick hack job in main.cpp that shows how they can move too.
This commit is contained in:
parent
a67d25ee10
commit
cbf0955786
11 changed files with 93 additions and 65 deletions
|
@ -34,10 +34,6 @@ void TexturePack::load_sprites() {
|
|||
ceiling = load_image(assets["sprites"]["ceiling"]);
|
||||
}
|
||||
|
||||
void TexturePack::position_sprite(double x, double y, string name) {
|
||||
sprites.emplace_back(x, y, sprite_textures[name]);
|
||||
}
|
||||
|
||||
void TexturePack::load_tiles() {
|
||||
Config assets("assets/tiles.json");
|
||||
auto &tiles = assets.json();
|
||||
|
@ -58,10 +54,6 @@ const uint32_t* TexturePack::get_surface(size_t num) {
|
|||
return (const uint32_t *)surfaces[num].getPixelsPtr();
|
||||
}
|
||||
|
||||
Sprite &TexturePack::get_sprite(size_t sprite_num) {
|
||||
return sprites[sprite_num];
|
||||
}
|
||||
|
||||
matrix::Matrix TexturePack::convert_char_to_texture(matrix::Matrix &tile_ids) {
|
||||
auto result = matrix::make(matrix::width(tile_ids), matrix::height(tile_ids));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue