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:
parent
7228bdf210
commit
1d3a76e5ee
8 changed files with 300 additions and 260 deletions
|
@ -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")
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue