More refactoring of the gui. Now most things are out of the FSM and MainUI is responsible for the rayvew and its overlay.
This commit is contained in:
parent
23ed1594f2
commit
dd4f77a106
6 changed files with 89 additions and 45 deletions
19
main_ui.hpp
19
main_ui.hpp
|
@ -3,22 +3,39 @@
|
|||
#include <SFML/Graphics/RenderWindow.hpp>
|
||||
#include "stats.hpp"
|
||||
#include "overlay_ui.hpp"
|
||||
#include "raycaster.hpp"
|
||||
#include "camera.hpp"
|
||||
|
||||
namespace gui {
|
||||
|
||||
class MainUI {
|
||||
public:
|
||||
Point $player{0,0};
|
||||
Stats $stats;
|
||||
sf::RenderWindow& $window;
|
||||
GameLevel $level;
|
||||
TexturePack& $textures;
|
||||
OverlayUI $overlay_ui;
|
||||
Raycaster $rayview;
|
||||
CameraLOL $camera;
|
||||
|
||||
MainUI(sf::RenderWindow& window, GameLevel level, TexturePack &textures);
|
||||
|
||||
void mouse(int x, int y);
|
||||
void debug();
|
||||
void draw_stats();
|
||||
void draw_blood();
|
||||
void render();
|
||||
|
||||
bool play_move();
|
||||
void plan_rotate(int dir);
|
||||
bool play_rotate();
|
||||
Point plan_move(int dir, bool strafe);
|
||||
void abort_plan();
|
||||
|
||||
void init();
|
||||
void draw();
|
||||
|
||||
void generate_map();
|
||||
void dead_entity(DinkyECS::Entity entity);
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue