Refactored out main.cpp to be a separate gui and using an FSM to keep the turn based nature straight.

This commit is contained in:
Zed A. Shaw 2025-02-04 12:56:20 -05:00
parent 7228bdf210
commit 1d3a76e5ee
8 changed files with 300 additions and 260 deletions

View file

@ -27,13 +27,12 @@ inline uint32_t dumb_lighting(uint32_t pixel, double distance) {
return conv.as_int;
}
Raycaster::Raycaster(sf::RenderWindow& window, TexturePack &textures, Matrix &map, int width, int height) :
Raycaster::Raycaster(sf::RenderWindow& window, TexturePack &textures, int width, int height) :
$textures(textures),
$view_texture({(unsigned int)width, (unsigned int)height}),
$view_sprite($view_texture),
$width(width), $height(height),
$window(window),
$map(map),
ZBuffer(width),
$anim(256, 256, 10, "assets/monster-1.ogg")
{