aboutsummaryrefslogtreecommitdiff
path: root/frontend/main.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-10-31 08:29:14 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-10-31 08:29:14 +0100
commita0e14fa424494ed35da1bd6e5e54bb36178259a7 (patch)
treead167a6d489931bad90c41f1fd47e51cb7d3c3b0 /frontend/main.cpp
parentda92752a5f9ea2c301ae0d541ae28caf3589f097 (diff)
implement put command
Diffstat (limited to 'frontend/main.cpp')
-rw-r--r--frontend/main.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/frontend/main.cpp b/frontend/main.cpp
index 56743c1..e513c12 100644
--- a/frontend/main.cpp
+++ b/frontend/main.cpp
@@ -5,6 +5,7 @@
#include "backend/print.h"
#include "backend/Dungeon.h"
+#include "GameData.h"
#include "Player.h"
#include "Exception.h"
#include "load_dungeon.h"
@@ -51,8 +52,14 @@ FollowupAction game_main() {
}
int main() {
- FollowupAction action;
+ try {
+ GameData::get_instance(); // pre-load DB
+ } catch (Exception & e) {
+ lprtf("FOUT: %s\n", e.what());
+ return EXIT_FAILURE;
+ }
+ FollowupAction action;
do {
action = game_main();
if (action == EXIT) break;