aboutsummaryrefslogtreecommitdiff
path: root/frontend
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-31 14:34:01 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-31 14:34:01 +0100
commit82dcf9e2dd3596b28ef846f4a217dc19c21cf781 (patch)
treef99f556afa6affeb0fe6a2a1c107862ca76f9e66 /frontend
parentf8d8d7499ba4433678db2a68fb1cae74448ca31e (diff)
more WIP
Diffstat (limited to 'frontend')
-rw-r--r--frontend/Player.cpp4
-rw-r--r--frontend/Player.h1
-rw-r--r--frontend/main.cpp2
3 files changed, 6 insertions, 1 deletions
diff --git a/frontend/Player.cpp b/frontend/Player.cpp
index fde85e6..85c4fff 100644
--- a/frontend/Player.cpp
+++ b/frontend/Player.cpp
@@ -66,3 +66,7 @@ void Player::take_damage(unsigned int dmg) {
}
}
+Location & Player::get_location() const {
+ return this->location;
+}
+
diff --git a/frontend/Player.h b/frontend/Player.h
index c01c86a..249a129 100644
--- a/frontend/Player.h
+++ b/frontend/Player.h
@@ -43,6 +43,7 @@ public:
void take_damage(unsigned int dmg);
float get_attack() const;
unsigned get_health() const;
+ Location & get_location() const;
private:
void cmdset_default();
diff --git a/frontend/main.cpp b/frontend/main.cpp
index e513c12..780a649 100644
--- a/frontend/main.cpp
+++ b/frontend/main.cpp
@@ -43,7 +43,7 @@ FollowupAction game_main() {
switch (action) {
case NONE: break;
case UPDATE: {
- dungeon->update();
+ dungeon->update(&player.get_location());
break;
}
default: return action;