Sprites now have a distance lighting calculation that's the same as the raycaster using a shader.
This commit is contained in:
parent
a19bc47904
commit
3986e6978e
4 changed files with 21 additions and 8 deletions
5
gui.cpp
5
gui.cpp
|
@ -1,4 +1,3 @@
|
|||
#define FSM_DEBUG 1
|
||||
#include "gui.hpp"
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
|
@ -41,8 +40,8 @@ namespace gui {
|
|||
}
|
||||
|
||||
void FSM::START(Event ) {
|
||||
// ZED: this must die
|
||||
generate_map();
|
||||
$rayview.init_shaders();
|
||||
$rayview.set_position(RAY_VIEW_X, RAY_VIEW_Y);
|
||||
$rayview.position_camera($player.x + 0.5, $player.y + 0.5);
|
||||
state(State::IDLE);
|
||||
|
@ -199,7 +198,7 @@ namespace gui {
|
|||
$stats.sample(1/elapsed.count());
|
||||
|
||||
draw_gui();
|
||||
draw_weapon();
|
||||
// draw_weapon();
|
||||
$window.display();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue