Fixed the map so that it shows directional arrows instead of a compass.

This commit is contained in:
Zed A. Shaw 2025-04-06 23:29:25 -04:00
parent c7c48658bd
commit e6a8a8b338
11 changed files with 35 additions and 27 deletions

View file

@ -2,6 +2,7 @@
#include "components.hpp"
#include "easings.hpp"
#include <fmt/xchar.h>
#include "constants.hpp"
namespace gui {
using namespace components;
@ -27,8 +28,6 @@ namespace gui {
$rayview.set_position(RAY_VIEW_X, RAY_VIEW_Y);
$rayview.position_camera(player.x + 0.5, player.y + 0.5);
$overlay_ui.show_text("left", $compass[$compass_dir]);
auto st = textures::get("down_the_well");
auto bounds = st.sprite->getLocalBounds();
st.sprite->setPosition({RAY_VIEW_X + bounds.size.x / 2,
@ -95,8 +94,7 @@ namespace gui {
void MainUI::plan_rotate(int dir) {
// -1 is left, 1 is right
$compass_dir = ($compass_dir + dir) % $compass.size();
$overlay_ui.show_text("left", $compass[$compass_dir]);
$compass_dir = ($compass_dir + dir) % COMPASS.size();
$camera.plan_rotate(dir);
}
@ -122,7 +120,6 @@ namespace gui {
$rayview.position_camera(player.x + 0.5, player.y + 0.5);
$compass_dir = 0;
$overlay_ui.show_text("left", $compass[$compass_dir]);
dirty();
}