diff --git a/assets/config.json b/assets/config.json index 18c9606..0127a77 100644 --- a/assets/config.json +++ b/assets/config.json @@ -15,7 +15,8 @@ "well_down": "assets/well_down-256.png", "rope_vines_up": "assets/rope_vines_up-256.png", "tripwire_trap": "assets/tripwire_trap-256.png", - "cinqueda": "assets/cinqueda_1-256.png" + "cinqueda": "assets/cinqueda_1-256.png", + "left_gui": "assets/left_gui.png" }, "enemy": { "HEARING_DISTANCE": 20 diff --git a/assets/left_gui.png b/assets/left_gui.png new file mode 100644 index 0000000..1284b41 Binary files /dev/null and b/assets/left_gui.png differ diff --git a/constants.hpp b/constants.hpp index 094f327..1c9b656 100644 --- a/constants.hpp +++ b/constants.hpp @@ -7,9 +7,9 @@ constexpr const int TEXTURE_HEIGHT=256; constexpr const int RAY_VIEW_WIDTH=900; constexpr const int RAY_VIEW_HEIGHT=600; constexpr const int SCREEN_WIDTH=1280; +constexpr const int SCREEN_HEIGHT=720; constexpr const int RAY_VIEW_X=(SCREEN_WIDTH - RAY_VIEW_WIDTH); constexpr const int RAY_VIEW_Y=0; -constexpr const int SCREEN_HEIGHT=720; constexpr const bool VSYNC=false; constexpr const int FRAME_LIMIT=60; constexpr const int NUM_SPRITES=1; @@ -32,8 +32,6 @@ constexpr int WALL_LIGHT_LEVEL = 3; constexpr int WORLDBUILD_DIVISION = 4; constexpr int WORLDBUILD_SHRINK = 2; constexpr int WORLDBUILD_MAX_PATH = 200; -constexpr int VIDEO_WINDOW_X=1600; -constexpr int VIDEO_WINDOW_Y=900; constexpr int UI_FONT_SIZE=30; constexpr int BASE_MAP_FONT_SIZE=90; constexpr int GAME_MAP_PIXEL_POS = 600; diff --git a/gui.cpp b/gui.cpp index 39fc972..4835d54 100644 --- a/gui.cpp +++ b/gui.cpp @@ -222,9 +222,14 @@ namespace gui { void FSM::draw_gui() { sf::RectangleShape rect({SCREEN_WIDTH - RAY_VIEW_WIDTH, SCREEN_HEIGHT}); rect.setPosition({0,0}); - rect.setFillColor({50, 50, 50}); + rect.setFillColor({36, 33, 26}); $window.draw(rect); + auto left_gui = $textures.sprite_textures.at("left_gui").sprite; + left_gui->setPosition({0,0}); + left_gui->setColor({150, 150, 150}); + $window.draw(*left_gui); + sf::RectangleShape lower({RAY_VIEW_WIDTH, SCREEN_HEIGHT - RAY_VIEW_HEIGHT}); lower.setPosition({RAY_VIEW_X,RAY_VIEW_HEIGHT}); lower.setFillColor({40, 40, 40}); @@ -251,7 +256,7 @@ namespace gui { FRAME_LIMIT, DEBUG_BUILD, $rayview.$dir_x, $rayview.$dir_y, $rayview.$pos_x, $rayview.$pos_y)); - $window.draw($text); + // $window.draw($text); } void FSM::render() { diff --git a/render.hpp b/render.hpp index 8ebe793..238b2df 100644 --- a/render.hpp +++ b/render.hpp @@ -19,8 +19,8 @@ using ftxui::Canvas, ftxui::Screen; * BUG: This could be so much better. */ struct RenderConfig { - unsigned int video_x = VIDEO_WINDOW_X; - unsigned int video_y = VIDEO_WINDOW_Y; + unsigned int video_x = SCREEN_WIDTH; + unsigned int video_y = SCREEN_HEIGHT; int ui_font_size=UI_FONT_SIZE; int base_map_font_size=BASE_MAP_FONT_SIZE; wchar_t bg_tile = BG_TILE;