aboutsummaryrefslogtreecommitdiff
path: root/frontend/cmd
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-29 15:22:59 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-29 15:22:59 +0100
commit7285f9f2c2622acff734e31314f92df9b25cae16 (patch)
tree36500df9ba5cf45b20f705d4c478afd2b7903a6f /frontend/cmd
parent953f18fe681a2f120dab5be9e9884bf35765e21e (diff)
split commands into separate files
Diffstat (limited to 'frontend/cmd')
-rw-r--r--frontend/cmd/CMakeLists.txt17
-rw-r--r--frontend/cmd/cheat.cpp6
-rw-r--r--frontend/cmd/equip.cpp6
-rw-r--r--frontend/cmd/get.cpp6
-rw-r--r--frontend/cmd/go.cpp6
-rw-r--r--frontend/cmd/help.cpp15
-rw-r--r--frontend/cmd/hit.cpp6
-rw-r--r--frontend/cmd/put.cpp6
-rw-r--r--frontend/cmd/query.cpp6
-rw-r--r--frontend/cmd/quit.cpp6
-rw-r--r--frontend/cmd/restart.cpp6
-rw-r--r--frontend/cmd/search.cpp6
-rw-r--r--frontend/cmd/use.cpp6
-rw-r--r--frontend/cmd/view.cpp12
-rw-r--r--frontend/cmd/wait.cpp6
15 files changed, 116 insertions, 0 deletions
diff --git a/frontend/cmd/CMakeLists.txt b/frontend/cmd/CMakeLists.txt
new file mode 100644
index 0000000..61feb84
--- /dev/null
+++ b/frontend/cmd/CMakeLists.txt
@@ -0,0 +1,17 @@
+target_sources(main PUBLIC
+ cheat.cpp
+ equip.cpp
+ get.cpp
+ go.cpp
+ help.cpp
+ hit.cpp
+ put.cpp
+ query.cpp
+ quit.cpp
+ restart.cpp
+ search.cpp
+ use.cpp
+ view.cpp
+ wait.cpp
+)
+
diff --git a/frontend/cmd/cheat.cpp b/frontend/cmd/cheat.cpp
new file mode 100644
index 0000000..ed4e452
--- /dev/null
+++ b/frontend/cmd/cheat.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_cheat(Argv argv) {
+ return FollowupAction::NONE;
+}
+
diff --git a/frontend/cmd/equip.cpp b/frontend/cmd/equip.cpp
new file mode 100644
index 0000000..a713bd2
--- /dev/null
+++ b/frontend/cmd/equip.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_equip(Argv argv) {
+ return FollowupAction::UPDATE;
+}
+
diff --git a/frontend/cmd/get.cpp b/frontend/cmd/get.cpp
new file mode 100644
index 0000000..8c8194b
--- /dev/null
+++ b/frontend/cmd/get.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_get(Argv argv) {
+ return FollowupAction::NONE;
+}
+
diff --git a/frontend/cmd/go.cpp b/frontend/cmd/go.cpp
new file mode 100644
index 0000000..2aaec08
--- /dev/null
+++ b/frontend/cmd/go.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_go(Argv argv) {
+ return FollowupAction::UPDATE;
+}
+
diff --git a/frontend/cmd/help.cpp b/frontend/cmd/help.cpp
new file mode 100644
index 0000000..1ae1fde
--- /dev/null
+++ b/frontend/cmd/help.cpp
@@ -0,0 +1,15 @@
+#include "../print.h"
+#include "../Player.h"
+
+FollowupAction Player::cmd_help(Argv argv) {
+ lprtf("De beschikbare commando's zijn: ");
+ bool first = true;
+ for (auto & [ key, _ ] : this->cmds) {
+ if (!first) lprtf(", ");
+ lprtf("%s", key.c_str());
+ first = false;
+ }
+ lprtf(".\n");
+ return FollowupAction::NONE;
+}
+
diff --git a/frontend/cmd/hit.cpp b/frontend/cmd/hit.cpp
new file mode 100644
index 0000000..740c348
--- /dev/null
+++ b/frontend/cmd/hit.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_hit(Argv argv) {
+ return FollowupAction::UPDATE;
+}
+
diff --git a/frontend/cmd/put.cpp b/frontend/cmd/put.cpp
new file mode 100644
index 0000000..ebf30da
--- /dev/null
+++ b/frontend/cmd/put.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_put(Argv argv) {
+ return FollowupAction::NONE;
+}
+
diff --git a/frontend/cmd/query.cpp b/frontend/cmd/query.cpp
new file mode 100644
index 0000000..48cbb55
--- /dev/null
+++ b/frontend/cmd/query.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_query(Argv argv) {
+ return FollowupAction::NONE;
+}
+
diff --git a/frontend/cmd/quit.cpp b/frontend/cmd/quit.cpp
new file mode 100644
index 0000000..24aa7c9
--- /dev/null
+++ b/frontend/cmd/quit.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_quit(Argv argv) {
+ return FollowupAction::EXIT;
+}
+
diff --git a/frontend/cmd/restart.cpp b/frontend/cmd/restart.cpp
new file mode 100644
index 0000000..aac5833
--- /dev/null
+++ b/frontend/cmd/restart.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_restart(Argv argv) {
+ return FollowupAction::RESTART;
+}
+
diff --git a/frontend/cmd/search.cpp b/frontend/cmd/search.cpp
new file mode 100644
index 0000000..334c997
--- /dev/null
+++ b/frontend/cmd/search.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_search(Argv argv) {
+ return FollowupAction::UPDATE;
+}
+
diff --git a/frontend/cmd/use.cpp b/frontend/cmd/use.cpp
new file mode 100644
index 0000000..fca40c3
--- /dev/null
+++ b/frontend/cmd/use.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_use(Argv argv) {
+ return FollowupAction::NONE;
+}
+
diff --git a/frontend/cmd/view.cpp b/frontend/cmd/view.cpp
new file mode 100644
index 0000000..8b08a2c
--- /dev/null
+++ b/frontend/cmd/view.cpp
@@ -0,0 +1,12 @@
+#include "../print.h"
+#include "../Player.h"
+
+FollowupAction Player::cmd_view(Argv argv) {
+ if (argv.size() == 0) {
+ lprtf("Fout, gebruik: Bekijk <Zelf|VIJHAND|OBJECT>\n");
+ return FollowupAction::NONE;
+ }
+
+ return FollowupAction::NONE;
+}
+
diff --git a/frontend/cmd/wait.cpp b/frontend/cmd/wait.cpp
new file mode 100644
index 0000000..d2bc908
--- /dev/null
+++ b/frontend/cmd/wait.cpp
@@ -0,0 +1,6 @@
+#include "../Player.h"
+
+FollowupAction Player::cmd_wait(Argv argv) {
+ return FollowupAction::NONE;
+}
+