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:
Zed A. Shaw 2025-02-01 14:39:08 -05:00
parent a67d25ee10
commit cbf0955786
11 changed files with 93 additions and 65 deletions

View file

@ -21,7 +21,6 @@ struct Sprite {
struct TexturePack {
std::vector<sf::Image> surfaces;
std::vector<Sprite> sprites;
std::unordered_map<std::string, SpriteTexture> sprite_textures;
std::unordered_map<wchar_t, int> char_to_texture;
sf::Image floor;
@ -31,10 +30,7 @@ struct TexturePack {
void load_tiles();
void load_sprites();
sf::Image load_image(std::string filename);
Sprite& get_sprite(size_t sprite_num);
const uint32_t* get_surface(size_t num);
// this needs to go into a map place
void position_sprite(double x, double y, std::string name);
// ZED: this is ugly so maybe you should like rewrite it or something
matrix::Matrix convert_char_to_texture(matrix::Matrix &from);