diff options
| author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-26 21:28:25 -0500 |
|---|---|---|
| committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-02-26 21:28:25 -0500 |
| commit | be20b76ac411cc6017c4359ee36a1c9855a9f66e (patch) | |
| tree | bc96ec093d6df99bb8f8968b67f215dbed19a02b /src/global.cpp | |
| parent | efa0587b4399a45faecf5aa941ff75a40595a124 (diff) | |
| parent | c714f8d2a5827196ca86ed4351ae22cfce5dfce5 (diff) | |
| download | lingo-ap-tracker-be20b76ac411cc6017c4359ee36a1c9855a9f66e.tar.gz lingo-ap-tracker-be20b76ac411cc6017c4359ee36a1c9855a9f66e.tar.bz2 lingo-ap-tracker-be20b76ac411cc6017c4359ee36a1c9855a9f66e.zip | |
Merge branch 'main' into future
Diffstat (limited to 'src/global.cpp')
| -rw-r--r-- | src/global.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
| diff --git a/src/global.cpp b/src/global.cpp index 3ee4f58..bd0dcaa 100644 --- a/src/global.cpp +++ b/src/global.cpp | |||
| @@ -6,6 +6,9 @@ | |||
| 6 | #include <string> | 6 | #include <string> |
| 7 | #include <string_view> | 7 | #include <string_view> |
| 8 | 8 | ||
| 9 | #include "ap_state.h" | ||
| 10 | #include "game_data.h" | ||
| 11 | |||
| 9 | const std::filesystem::path& GetExecutableDirectory() { | 12 | const std::filesystem::path& GetExecutableDirectory() { |
| 10 | static const std::filesystem::path* executable_directory = []() { | 13 | static const std::filesystem::path* executable_directory = []() { |
| 11 | int length = wai_getExecutablePath(NULL, 0, NULL); | 14 | int length = wai_getExecutablePath(NULL, 0, NULL); |
| @@ -22,3 +25,16 @@ const std::filesystem::path& GetExecutableDirectory() { | |||
| 22 | std::string GetAbsolutePath(std::string_view path) { | 25 | std::string GetAbsolutePath(std::string_view path) { |
| 23 | return (GetExecutableDirectory() / path).string(); | 26 | return (GetExecutableDirectory() / path).string(); |
| 24 | } | 27 | } |
| 28 | |||
| 29 | bool IsLocationWinCondition(const Location& location) { | ||
| 30 | switch (AP_GetVictoryCondition()) { | ||
| 31 | case kTHE_END: | ||
| 32 | return location.ap_location_name == | ||
| 33 | "Orange Tower Seventh Floor - THE END"; | ||
| 34 | case kTHE_MASTER: | ||
| 35 | return location.ap_location_name == | ||
| 36 | "Orange Tower Seventh Floor - THE MASTER"; | ||
| 37 | case kLEVEL_2: | ||
| 38 | return location.ap_location_name == "Second Room - LEVEL 2"; | ||
| 39 | } | ||
| 40 | } | ||
