about summary refs log tree commit diff stats
path: root/src/global.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-03-08 00:29:17 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2025-03-08 00:29:17 -0500
commite290161d58c98e73ea185855e79efad19cb111a2 (patch)
treea03d0e3822b19a1c57dd83d1309ab32814d670fe /src/global.cpp
parent4fa8f5b6c933dcbab5940d39a515937e86e9d280 (diff)
downloadlingo-ap-tracker-e290161d58c98e73ea185855e79efad19cb111a2.tar.gz
lingo-ap-tracker-e290161d58c98e73ea185855e79efad19cb111a2.tar.bz2
lingo-ap-tracker-e290161d58c98e73ea185855e79efad19cb111a2.zip
Added postgame detection
Diffstat (limited to 'src/global.cpp')
-rw-r--r--src/global.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/global.cpp b/src/global.cpp index 1eb3f8d..63f4a19 100644 --- a/src/global.cpp +++ b/src/global.cpp
@@ -26,17 +26,19 @@ std::string GetAbsolutePath(std::string_view path) {
26 return (GetExecutableDirectory() / path).string(); 26 return (GetExecutableDirectory() / path).string();
27} 27}
28 28
29bool IsLocationWinCondition(const Location& location) { 29std::string GetWinCondition() {
30 switch (AP_GetVictoryCondition()) { 30 switch (AP_GetVictoryCondition()) {
31 case kTHE_END: 31 case kTHE_END:
32 return location.ap_location_name == 32 return "Orange Tower Seventh Floor - THE END";
33 "Orange Tower Seventh Floor - THE END";
34 case kTHE_MASTER: 33 case kTHE_MASTER:
35 return location.ap_location_name == 34 return "Orange Tower Seventh Floor - THE MASTER";
36 "Orange Tower Seventh Floor - THE MASTER";
37 case kLEVEL_2: 35 case kLEVEL_2:
38 return location.ap_location_name == "Second Room - LEVEL 2"; 36 return "Second Room - LEVEL 2";
39 case kPILGRIMAGE: 37 case kPILGRIMAGE:
40 return location.ap_location_name == "Pilgrim Antechamber - PILGRIM"; 38 return "Pilgrim Antechamber - PILGRIM";
41 } 39 }
42} 40}
41
42bool IsLocationWinCondition(const Location& location) {
43 return location.ap_location_name == GetWinCondition();
44}