about summary refs log tree commit diff stats
path: root/src/game_data.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-11-26 14:05:29 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2023-11-26 14:05:29 -0500
commit2adce1795211fd0a42c3b4e03ab35a90bb01bccf (patch)
tree7fda2f874f0653e4c74edaaf1547fe9802b2005a /src/game_data.cpp
parent7fc0e0f50ae961efbe0cac1032b03a42d41d87d5 (diff)
downloadlingo-ap-tracker-2adce1795211fd0a42c3b4e03ab35a90bb01bccf.tar.gz
lingo-ap-tracker-2adce1795211fd0a42c3b4e03ab35a90bb01bccf.tar.bz2
lingo-ap-tracker-2adce1795211fd0a42c3b4e03ab35a90bb01bccf.zip
Stop relying on correctly set working directory
Diffstat (limited to 'src/game_data.cpp')
-rw-r--r--src/game_data.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/game_data.cpp b/src/game_data.cpp index 31e23ec..5204262 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp
@@ -6,6 +6,7 @@
6#include <iostream> 6#include <iostream>
7#include <sstream> 7#include <sstream>
8 8
9#include "global.h"
9#include "logger.h" 10#include "logger.h"
10 11
11namespace { 12namespace {
@@ -61,10 +62,13 @@ struct GameData {
61 std::set<std::string> malconfigured_areas_; 62 std::set<std::string> malconfigured_areas_;
62 63
63 GameData() { 64 GameData() {
64 YAML::Node lingo_config = YAML::LoadFile("assets/LL1.yaml"); 65 YAML::Node lingo_config =
65 YAML::Node areas_config = YAML::LoadFile("assets/areas.yaml"); 66 YAML::LoadFile(GetAbsolutePath("assets/LL1.yaml"));
66 YAML::Node pilgrimage_config = YAML::LoadFile("assets/pilgrimage.yaml"); 67 YAML::Node areas_config =
67 YAML::Node ids_config = YAML::LoadFile("assets/ids.yaml"); 68 YAML::LoadFile(GetAbsolutePath("assets/areas.yaml"));
69 YAML::Node pilgrimage_config =
70 YAML::LoadFile(GetAbsolutePath("assets/pilgrimage.yaml"));
71 YAML::Node ids_config = YAML::LoadFile(GetAbsolutePath("assets/ids.yaml"));
68 72
69 auto init_color_id = [this, &ids_config](const std::string &color_name) { 73 auto init_color_id = [this, &ids_config](const std::string &color_name) {
70 if (ids_config["special_items"] && 74 if (ids_config["special_items"] &&