Cleanup before trying to make the tile rendering faster by pre-loading the sprites needed, or caching as they're requested.
This commit is contained in:
parent
08d71f9bdc
commit
31c86fa2b3
2 changed files with 16 additions and 25 deletions
5
gui.hpp
5
gui.hpp
|
@ -4,6 +4,7 @@
|
|||
#include <SFML/Graphics/Font.hpp>
|
||||
#include <SFML/Graphics/RenderWindow.hpp>
|
||||
#include <SFML/Graphics/Text.hpp>
|
||||
#include <SFML/Graphics/Sprite.hpp>
|
||||
#include <codecvt>
|
||||
#include <ftxui/component/component.hpp>
|
||||
#include <ftxui/screen/screen.hpp>
|
||||
|
@ -44,12 +45,12 @@ class GUI {
|
|||
Canvas $canvas;
|
||||
sf::Font $font;
|
||||
sf::Text $ui_text;
|
||||
sf::Text $map_text;
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> $converter;
|
||||
sf::RenderWindow $window;
|
||||
Screen $screen;
|
||||
Screen $map_screen;
|
||||
DinkyECS::World $world;
|
||||
std::unordered_map<wchar_t, sf::Sprite> $sprites;
|
||||
|
||||
public:
|
||||
GUI();
|
||||
|
@ -63,9 +64,9 @@ public:
|
|||
bool handle_events();
|
||||
void draw_screen(bool clear=true, float map_off_x=0.0f, float map_off_y=0.0f);
|
||||
void shake();
|
||||
void burn();
|
||||
void configure_world();
|
||||
void run_systems();
|
||||
sf::Sprite get_text_sprite(wchar_t tile);
|
||||
|
||||
int main();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue