Tiles now record their textures and this is loaded from the map then converted to an indexed integer on the fly.
This commit is contained in:
parent
9e3e347e4a
commit
a67d25ee10
10 changed files with 64 additions and 66 deletions
|
@ -21,7 +21,7 @@ struct Raycaster {
|
|||
int $pitch=0;
|
||||
sf::Clock $clock;
|
||||
|
||||
TexturePack $textures;
|
||||
TexturePack &$textures;
|
||||
double $posX = 0;
|
||||
double $posY = 0;
|
||||
|
||||
|
@ -48,7 +48,7 @@ struct Raycaster {
|
|||
sf::Shader $paused;
|
||||
sf::Shader* $active_shader = nullptr;
|
||||
|
||||
Raycaster(sf::RenderWindow& window, Matrix &map, int width, int height);
|
||||
Raycaster(sf::RenderWindow& window, TexturePack &textures, Matrix &map, int width, int height);
|
||||
|
||||
void draw_pixel_buffer();
|
||||
void clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue