diff options
| -rw-r--r-- | .gitmodules | 3 | ||||
| -rw-r--r-- | CHANGELOG.md | 56 | ||||
| -rw-r--r-- | CMakeLists.txt | 7 | ||||
| -rw-r--r-- | VERSION | 2 | ||||
| -rw-r--r-- | VERSION.yaml | 8 | ||||
| -rwxr-xr-x | assets/areas.yaml | 2 | ||||
| -rw-r--r-- | src/ap_state.cpp | 9 | ||||
| -rw-r--r-- | src/area_popup.cpp | 7 | ||||
| -rw-r--r-- | src/game_data.cpp | 33 | ||||
| -rw-r--r-- | src/game_data.h | 2 | ||||
| -rw-r--r-- | src/main.cpp | 2 | ||||
| -rw-r--r-- | src/tracker_panel.cpp | 23 | ||||
| -rw-r--r-- | src/tracker_state.cpp | 7 | ||||
| -rw-r--r-- | src/updater.cpp | 33 | ||||
| -rw-r--r-- | src/updater.h | 1 | ||||
| -rw-r--r-- | src/version.h | 2 | ||||
| -rw-r--r-- | vcpkg.json | 1 | ||||
| m--------- | vendor/vcpkg | 0 | ||||
| m--------- | vendor/websocketpp | 0 |
19 files changed, 118 insertions, 80 deletions
| diff --git a/.gitmodules b/.gitmodules index ebe016f..1a69477 100644 --- a/.gitmodules +++ b/.gitmodules | |||
| @@ -16,3 +16,6 @@ | |||
| 16 | [submodule "vendor/vcpkg"] | 16 | [submodule "vendor/vcpkg"] |
| 17 | path = vendor/vcpkg | 17 | path = vendor/vcpkg |
| 18 | url = https://github.com/Microsoft/vcpkg.git | 18 | url = https://github.com/Microsoft/vcpkg.git |
| 19 | [submodule "vendor/websocketpp"] | ||
| 20 | path = vendor/websocketpp | ||
| 21 | url = https://github.com/zaphoyd/websocketpp | ||
| diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f0fdc2..e2444b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md | |||
| @@ -1,5 +1,61 @@ | |||
| 1 | # lingo-ap-tracker Releases | 1 | # lingo-ap-tracker Releases |
| 2 | 2 | ||
| 3 | ## v2.0.2 - 2025-05-24 | ||
| 4 | |||
| 5 | - Fixed issue connecting to the Archipelago 0.6.2 RC server. | ||
| 6 | |||
| 7 | Download: | ||
| 8 | [lingo-ap-tracker-v2.0.2-win64.zip](https://files.fourisland.com/releases/lingo-ap-tracker/lingo-ap-tracker-v2.0.2-win64.zip)<br/> | ||
| 9 | Source: [v2.0.2](https://code.fourisland.com/lingo-ap-tracker/tag/?h=v2.0.2) | ||
| 10 | |||
| 11 | ## v2.0.1 - 2025-04-06 | ||
| 12 | |||
| 13 | - The tracker now assumes postgame shuffle is enabled when the flag is not | ||
| 14 | present in slot data (as is the case with Archipelago 0.6.1 and earlier). | ||
| 15 | Players who have postgame shuffle disabled will unfortunately see locations | ||
| 16 | that are not in their world, until this problem can be fixed. | ||
| 17 | |||
| 18 | Download: | ||
| 19 | [lingo-ap-tracker-v2.0.1-win64.zip](https://files.fourisland.com/releases/lingo-ap-tracker/lingo-ap-tracker-v2.0.1-win64.zip)<br/> | ||
| 20 | Source: [v2.0.1](https://code.fourisland.com/lingo-ap-tracker/tag/?h=v2.0.1) | ||
| 21 | |||
| 22 | ## v2.0.0 - 2025-04-01 | ||
| 23 | |||
| 24 | - Compatibility update for Archipelago 0.6.0. | ||
| 25 | |||
| 26 | Download: | ||
| 27 | [lingo-ap-tracker-v2.0.0-win64.zip](https://files.fourisland.com/releases/lingo-ap-tracker/lingo-ap-tracker-v2.0.0-win64.zip)<br/> | ||
| 28 | Source: [v2.0.0](https://code.fourisland.com/lingo-ap-tracker/tag/?h=v2.0.0) | ||
| 29 | |||
| 30 | ## v1.0.0 - 2025-03-21 | ||
| 31 | |||
| 32 | After almost two years of development, we have finally hit version 1! | ||
| 33 | |||
| 34 | - The subway map now uses Kinrah's updated map image, including fully separated | ||
| 35 | paintings for places like The Wondrous and Orange Tower Sixth Floor, as well | ||
| 36 | as indicators for the color items. | ||
| 37 | - Paintings have friendly names now instead of the internal game IDs. They are | ||
| 38 | also distinguished from regular checks by using an owl icon instead of an eye. | ||
| 39 | - The tracker is now able to read your solved panel state from the multiworld | ||
| 40 | (requires v5.3.0 of the client). This obsoletes save file parsing and | ||
| 41 | receiving panel solves by connecting to the game. | ||
| 42 | - Numerous optimizations to reachability detection and rendering. | ||
| 43 | - Added a pane that shows all items received, similar to the web tracker. | ||
| 44 | - Added a pane that shows your currently revealed painting mapping, as well as a | ||
| 45 | button that reveals it all immediately. | ||
| 46 | - Added a pane that shows your slot options. | ||
| 47 | - Postgame shuffle being disabled is handled properly now, and removed locations | ||
| 48 | are no longer shown. | ||
| 49 | - Improved support for high-DPI screens. The tracker should no longer appear | ||
| 50 | "blurry" on a high-DPI screen, and should also be able to react properly to | ||
| 51 | being moved between screens with different DPIs. | ||
| 52 | - The update checker is now able to download and install tracker updates in | ||
| 53 | place. | ||
| 54 | |||
| 55 | Download: | ||
| 56 | [lingo-ap-tracker-v1.0.0-win64.zip](https://files.fourisland.com/releases/lingo-ap-tracker/lingo-ap-tracker-v1.0.0-win64.zip)<br/> | ||
| 57 | Source: [v1.0.0](https://code.fourisland.com/lingo-ap-tracker/tag/?h=v1.0.0) | ||
| 58 | |||
| 3 | ## v0.12.3 - 2025-03-03 | 59 | ## v0.12.3 - 2025-03-03 |
| 4 | 60 | ||
| 5 | - Fixed issue with non-ASCII connection details. | 61 | - Fixed issue with non-ASCII connection details. |
| diff --git a/CMakeLists.txt b/CMakeLists.txt index 82673ab..ef741fb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | cmake_minimum_required (VERSION 3.1) | 1 | cmake_minimum_required (VERSION 3.20) |
| 2 | project (lingo_ap_tracker) | 2 | project (lingo_ap_tracker) |
| 3 | 3 | ||
| 4 | if (MSVC) | 4 | if (MSVC) |
| @@ -10,7 +10,6 @@ endif(MSVC) | |||
| 10 | find_package(wxWidgets CONFIG REQUIRED) | 10 | find_package(wxWidgets CONFIG REQUIRED) |
| 11 | find_package(OpenSSL REQUIRED) | 11 | find_package(OpenSSL REQUIRED) |
| 12 | find_package(yaml-cpp REQUIRED) | 12 | find_package(yaml-cpp REQUIRED) |
| 13 | find_package(websocketpp REQUIRED) | ||
| 14 | find_package(fmt REQUIRED) | 13 | find_package(fmt REQUIRED) |
| 15 | 14 | ||
| 16 | include_directories( | 15 | include_directories( |
| @@ -19,7 +18,7 @@ include_directories( | |||
| 19 | vendor/asio/asio/include | 18 | vendor/asio/asio/include |
| 20 | vendor/nlohmann | 19 | vendor/nlohmann |
| 21 | vendor/valijson/include | 20 | vendor/valijson/include |
| 22 | ${websocketpp_INCLUDE_DIRS} | 21 | vendor/websocketpp |
| 23 | vendor/wswrap/include | 22 | vendor/wswrap/include |
| 24 | ${yaml-cpp_INCLUDE_DIRS} | 23 | ${yaml-cpp_INCLUDE_DIRS} |
| 25 | ${OpenSSL_INCLUDE_DIRS} | 24 | ${OpenSSL_INCLUDE_DIRS} |
| @@ -68,7 +67,7 @@ endif(MSVC) | |||
| 68 | add_executable(lingo_ap_tracker ${SOURCE_FILES}) | 67 | add_executable(lingo_ap_tracker ${SOURCE_FILES}) |
| 69 | set_property(TARGET lingo_ap_tracker PROPERTY CXX_STANDARD 20) | 68 | set_property(TARGET lingo_ap_tracker PROPERTY CXX_STANDARD 20) |
| 70 | set_property(TARGET lingo_ap_tracker PROPERTY CXX_STANDARD_REQUIRED ON) | 69 | set_property(TARGET lingo_ap_tracker PROPERTY CXX_STANDARD_REQUIRED ON) |
| 71 | target_link_libraries(lingo_ap_tracker PRIVATE fmt::fmt OpenSSL::SSL OpenSSL::Crypto websocketpp::websocketpp wx::core wx::base wx::net yaml-cpp::yaml-cpp) | 70 | target_link_libraries(lingo_ap_tracker PRIVATE fmt::fmt OpenSSL::SSL OpenSSL::Crypto wx::core wx::base wx::net yaml-cpp::yaml-cpp) |
| 72 | 71 | ||
| 73 | set(SRC_DIR "${CMAKE_SOURCE_DIR}/assets") | 72 | set(SRC_DIR "${CMAKE_SOURCE_DIR}/assets") |
| 74 | set(DST_DIR "${CMAKE_BINARY_DIR}/$<CONFIG>/assets") | 73 | set(DST_DIR "${CMAKE_BINARY_DIR}/$<CONFIG>/assets") |
| diff --git a/VERSION b/VERSION index 1af39b3..b02d37b 100644 --- a/VERSION +++ b/VERSION | |||
| @@ -1 +1 @@ | |||
| v0.12.3 \ No newline at end of file | v2.0.2 \ No newline at end of file | ||
| diff --git a/VERSION.yaml b/VERSION.yaml index c4ad3ec..8f86a39 100644 --- a/VERSION.yaml +++ b/VERSION.yaml | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | version: v0.12.3 | 1 | version: v2.0.2 |
| 2 | packages: | 2 | packages: |
| 3 | win64: | 3 | win64: |
| 4 | url: "https://files.fourisland.com/releases/lingo-ap-tracker/lingo-ap-tracker-v0.12.3-win64.zip" | 4 | url: "https://files.fourisland.com/releases/lingo-ap-tracker/lingo-ap-tracker-v2.0.2-win64.zip" |
| 5 | checksum: "0c0d8310d1ecae4f1b8de933661ba14f63aac011cd2b22947aff7085d997f0db" | 5 | checksum: "dfb2fce2f5b14c09f4af7e7fcf6478e420a070db9fb23f9f9ad196f2db4b7518" |
| 6 | files: | 6 | files: |
| 7 | - fmt.dll | 7 | - fmt.dll |
| 8 | - jpeg62.dll | 8 | - jpeg62.dll |
| @@ -20,7 +20,7 @@ packages: | |||
| 20 | - zlib1.dll | 20 | - zlib1.dll |
| 21 | - assets/areas.yaml | 21 | - assets/areas.yaml |
| 22 | - assets/checked.png | 22 | - assets/checked.png |
| 23 | # TODO: next release will contain the checked owl | 23 | - assets/checked_owl.png |
| 24 | - assets/ids.yaml | 24 | - assets/ids.yaml |
| 25 | - assets/lingo_map.png | 25 | - assets/lingo_map.png |
| 26 | - assets/LL1.yaml | 26 | - assets/LL1.yaml |
| diff --git a/assets/areas.yaml b/assets/areas.yaml index cbcf23a..a615e2c 100755 --- a/assets/areas.yaml +++ b/assets/areas.yaml | |||
| @@ -279,6 +279,8 @@ | |||
| 279 | map: [1368, 2103] | 279 | map: [1368, 2103] |
| 280 | Art Gallery: | 280 | Art Gallery: |
| 281 | map: [2474, 1366] | 281 | map: [2474, 1366] |
| 282 | Art Gallery (First Floor): | ||
| 283 | fold_into: Art Gallery | ||
| 282 | Art Gallery (Second Floor): | 284 | Art Gallery (Second Floor): |
| 283 | fold_into: Art Gallery | 285 | fold_into: Art Gallery |
| 284 | Art Gallery (Third Floor): | 286 | Art Gallery (Third Floor): |
| diff --git a/src/ap_state.cpp b/src/ap_state.cpp index a969892..8438649 100644 --- a/src/ap_state.cpp +++ b/src/ap_state.cpp | |||
| @@ -29,8 +29,8 @@ | |||
| 29 | #include "tracker_state.h" | 29 | #include "tracker_state.h" |
| 30 | 30 | ||
| 31 | constexpr int AP_MAJOR = 0; | 31 | constexpr int AP_MAJOR = 0; |
| 32 | constexpr int AP_MINOR = 4; | 32 | constexpr int AP_MINOR = 6; |
| 33 | constexpr int AP_REVISION = 5; | 33 | constexpr int AP_REVISION = 1; |
| 34 | 34 | ||
| 35 | constexpr const char* CERT_STORE_PATH = "cacert.pem"; | 35 | constexpr const char* CERT_STORE_PATH = "cacert.pem"; |
| 36 | constexpr int ITEM_HANDLING = 7; // <- all | 36 | constexpr int ITEM_HANDLING = 7; // <- all |
| @@ -503,8 +503,9 @@ struct APState { | |||
| 503 | : kSUNWARP_ACCESS_NORMAL; | 503 | : kSUNWARP_ACCESS_NORMAL; |
| 504 | sunwarp_shuffle = slot_data.contains("shuffle_sunwarps") && | 504 | sunwarp_shuffle = slot_data.contains("shuffle_sunwarps") && |
| 505 | slot_data["shuffle_sunwarps"].get<int>() == 1; | 505 | slot_data["shuffle_sunwarps"].get<int>() == 1; |
| 506 | postgame_shuffle = slot_data.contains("shuffle_postgame") && | 506 | postgame_shuffle = slot_data.contains("shuffle_postgame") |
| 507 | slot_data["shuffle_postgame"].get<int>() == 1; | 507 | ? (slot_data["shuffle_postgame"].get<int>() == 1) |
| 508 | : true; | ||
| 508 | 509 | ||
| 509 | if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) { | 510 | if (painting_shuffle && slot_data.contains("painting_entrance_to_exit")) { |
| 510 | painting_mapping.clear(); | 511 | painting_mapping.clear(); |
| diff --git a/src/area_popup.cpp b/src/area_popup.cpp index 8ec4dd1..c95e492 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp | |||
| @@ -50,11 +50,8 @@ void AreaPopup::ResetIndicators() { | |||
| 50 | for (int section_id = 0; section_id < map_area.locations.size(); | 50 | for (int section_id = 0; section_id < map_area.locations.size(); |
| 51 | section_id++) { | 51 | section_id++) { |
| 52 | const Location& location = map_area.locations.at(section_id); | 52 | const Location& location = map_area.locations.at(section_id); |
| 53 | if (IsLocationPostgame(location.ap_location_id)) { | 53 | if ((!AP_IsLocationVisible(location.classification) || |
| 54 | continue; | 54 | IsLocationPostgame(location.ap_location_id)) && |
| 55 | } | ||
| 56 | |||
| 57 | if (!AP_IsLocationVisible(location.classification) && | ||
| 58 | !(location.hunt && | 55 | !(location.hunt && |
| 59 | GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && | 56 | GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && |
| 60 | !(location.single_panel && | 57 | !(location.single_panel && |
| diff --git a/src/game_data.cpp b/src/game_data.cpp index 7ce1fb6..588ffc8 100644 --- a/src/game_data.cpp +++ b/src/game_data.cpp | |||
| @@ -29,7 +29,6 @@ struct GameData { | |||
| 29 | std::map<std::string, int> painting_by_id_; | 29 | std::map<std::string, int> painting_by_id_; |
| 30 | 30 | ||
| 31 | std::vector<int> door_definition_order_; | 31 | std::vector<int> door_definition_order_; |
| 32 | std::vector<int> room_definition_order_; | ||
| 33 | 32 | ||
| 34 | std::map<std::string, int> room_by_painting_; | 33 | std::map<std::string, int> room_by_painting_; |
| 35 | std::map<int, int> room_by_sunwarp_; | 34 | std::map<int, int> room_by_sunwarp_; |
| @@ -92,7 +91,6 @@ struct GameData { | |||
| 92 | 91 | ||
| 93 | for (const auto &room_it : lingo_config) { | 92 | for (const auto &room_it : lingo_config) { |
| 94 | int room_id = AddOrGetRoom(room_it.first.as<std::string>()); | 93 | int room_id = AddOrGetRoom(room_it.first.as<std::string>()); |
| 95 | room_definition_order_.push_back(room_id); | ||
| 96 | 94 | ||
| 97 | for (const auto &entrance_it : room_it.second["entrances"]) { | 95 | for (const auto &entrance_it : room_it.second["entrances"]) { |
| 98 | int from_room_id = AddOrGetRoom(entrance_it.first.as<std::string>()); | 96 | int from_room_id = AddOrGetRoom(entrance_it.first.as<std::string>()); |
| @@ -129,6 +127,10 @@ struct GameData { | |||
| 129 | exit_obj.type = EntranceType::kCrossroadsRoofAccess; | 127 | exit_obj.type = EntranceType::kCrossroadsRoofAccess; |
| 130 | } | 128 | } |
| 131 | 129 | ||
| 130 | if (option["static_painting"] && option["static_painting"].as<bool>()) { | ||
| 131 | exit_obj.type = EntranceType::kStaticPainting; | ||
| 132 | } | ||
| 133 | |||
| 132 | rooms_[from_room_id].exits.push_back(exit_obj); | 134 | rooms_[from_room_id].exits.push_back(exit_obj); |
| 133 | }; | 135 | }; |
| 134 | 136 | ||
| @@ -780,31 +782,6 @@ struct GameData { | |||
| 780 | } | 782 | } |
| 781 | } | 783 | } |
| 782 | 784 | ||
| 783 | // As a workaround for a generator bug in 0.5.1, we are going to remove the | ||
| 784 | // panel door requirement on panels that are defined earlier in the file than | ||
| 785 | // the panel door is. This results in logic that matches the generator, even | ||
| 786 | // if it is not true to how the game should work. This will be reverted once | ||
| 787 | // the logic bug is fixed and released. | ||
| 788 | // See: https://github.com/ArchipelagoMW/Archipelago/pull/4342 | ||
| 789 | for (Panel& panel : panels_) { | ||
| 790 | if (panel.panel_door == -1) { | ||
| 791 | continue; | ||
| 792 | } | ||
| 793 | const PanelDoor &panel_door = panel_doors_[panel.panel_door]; | ||
| 794 | for (int room_id : room_definition_order_) { | ||
| 795 | if (room_id == panel_door.room) { | ||
| 796 | // The panel door was defined first (or at the same time as the panel), | ||
| 797 | // so we're good. | ||
| 798 | break; | ||
| 799 | } else if (room_id == panel.room) { | ||
| 800 | // The panel was defined first, so we have to pretend the panel door is | ||
| 801 | // not required for this panel. | ||
| 802 | panel.panel_door = -1; | ||
| 803 | break; | ||
| 804 | } | ||
| 805 | } | ||
| 806 | } | ||
| 807 | |||
| 808 | // Report errors. | 785 | // Report errors. |
| 809 | for (const std::string &area : malconfigured_areas_) { | 786 | for (const std::string &area : malconfigured_areas_) { |
| 810 | TrackerLog(fmt::format("Area data not found for: {}", area)); | 787 | TrackerLog(fmt::format("Area data not found for: {}", area)); |
| @@ -937,7 +914,7 @@ struct GameData { | |||
| 937 | if (!panel_doors_by_id_.count(full_name)) { | 914 | if (!panel_doors_by_id_.count(full_name)) { |
| 938 | int panel_door_id = panel_doors_.size(); | 915 | int panel_door_id = panel_doors_.size(); |
| 939 | panel_doors_by_id_[full_name] = panel_door_id; | 916 | panel_doors_by_id_[full_name] = panel_door_id; |
| 940 | panel_doors_.push_back({.room = AddOrGetRoom(room)}); | 917 | panel_doors_.push_back({}); |
| 941 | } | 918 | } |
| 942 | 919 | ||
| 943 | return panel_doors_by_id_[full_name]; | 920 | return panel_doors_by_id_[full_name]; |
| diff --git a/src/game_data.h b/src/game_data.h index 44084d9..8d3db4b 100644 --- a/src/game_data.h +++ b/src/game_data.h | |||
| @@ -31,6 +31,7 @@ enum class EntranceType { | |||
| 31 | kWarp, | 31 | kWarp, |
| 32 | kPilgrimage, | 32 | kPilgrimage, |
| 33 | kCrossroadsRoofAccess, | 33 | kCrossroadsRoofAccess, |
| 34 | kStaticPainting, | ||
| 34 | }; | 35 | }; |
| 35 | 36 | ||
| 36 | enum class DoorType { | 37 | enum class DoorType { |
| @@ -86,7 +87,6 @@ struct Door { | |||
| 86 | }; | 87 | }; |
| 87 | 88 | ||
| 88 | struct PanelDoor { | 89 | struct PanelDoor { |
| 89 | int room; | ||
| 90 | int ap_item_id = -1; | 90 | int ap_item_id = -1; |
| 91 | int group_ap_item_id = -1; | 91 | int group_ap_item_id = -1; |
| 92 | std::vector<ProgressiveRequirement> progressives; | 92 | std::vector<ProgressiveRequirement> progressives; |
| diff --git a/src/main.cpp b/src/main.cpp index 1d7cc9e..574b6df 100644 --- a/src/main.cpp +++ b/src/main.cpp | |||
| @@ -10,7 +10,7 @@ | |||
| 10 | 10 | ||
| 11 | class TrackerApp : public wxApp { | 11 | class TrackerApp : public wxApp { |
| 12 | public: | 12 | public: |
| 13 | virtual bool OnInit() { | 13 | virtual bool OnInit() override { |
| 14 | GetTrackerConfig().Load(); | 14 | GetTrackerConfig().Load(); |
| 15 | 15 | ||
| 16 | TrackerFrame *frame = new TrackerFrame(); | 16 | TrackerFrame *frame = new TrackerFrame(); |
| diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 0a756e6..ddb4df9 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp | |||
| @@ -55,15 +55,13 @@ void TrackerPanel::UpdateIndicators(bool reset) { | |||
| 55 | for (AreaIndicator &area : areas_) { | 55 | for (AreaIndicator &area : areas_) { |
| 56 | const MapArea &map_area = GD_GetMapArea(area.area_id); | 56 | const MapArea &map_area = GD_GetMapArea(area.area_id); |
| 57 | 57 | ||
| 58 | if (IsAreaPostgame(area.area_id)) { | 58 | if ((!AP_IsLocationVisible(map_area.classification) || |
| 59 | area.active = false; | 59 | IsAreaPostgame(area.area_id)) && |
| 60 | } else if (!AP_IsLocationVisible(map_area.classification) && | 60 | !(map_area.hunt && |
| 61 | !(map_area.hunt && GetTrackerConfig().visible_panels == | 61 | GetTrackerConfig().visible_panels == TrackerConfig::kHUNT_PANELS) && |
| 62 | TrackerConfig::kHUNT_PANELS) && | 62 | !(map_area.has_single_panel && |
| 63 | !(map_area.has_single_panel && | 63 | GetTrackerConfig().visible_panels == TrackerConfig::kALL_PANELS) && |
| 64 | GetTrackerConfig().visible_panels == | 64 | !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { |
| 65 | TrackerConfig::kALL_PANELS) && | ||
| 66 | !(AP_IsPaintingShuffle() && !map_area.paintings.empty())) { | ||
| 67 | area.active = false; | 65 | area.active = false; |
| 68 | } else { | 66 | } else { |
| 69 | area.active = true; | 67 | area.active = true; |
| @@ -233,11 +231,10 @@ void TrackerPanel::Redraw() { | |||
| 233 | bool has_unreachable_unchecked = false; | 231 | bool has_unreachable_unchecked = false; |
| 234 | for (const Location §ion : map_area.locations) { | 232 | for (const Location §ion : map_area.locations) { |
| 235 | bool has_unchecked = false; | 233 | bool has_unchecked = false; |
| 236 | if (IsLocationPostgame(section.ap_location_id)) { | 234 | if (IsLocationWinCondition(section)) { |
| 237 | // Nope. | ||
| 238 | } else if (IsLocationWinCondition(section)) { | ||
| 239 | has_unchecked = !AP_HasReachedGoal(); | 235 | has_unchecked = !AP_HasReachedGoal(); |
| 240 | } else if (AP_IsLocationVisible(section.classification)) { | 236 | } else if (AP_IsLocationVisible(section.classification) && |
| 237 | !IsLocationPostgame(section.ap_location_id)) { | ||
| 241 | has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); | 238 | has_unchecked = !AP_HasCheckedGameLocation(section.ap_location_id); |
| 242 | } else if ((section.hunt && GetTrackerConfig().visible_panels == | 239 | } else if ((section.hunt && GetTrackerConfig().visible_panels == |
| 243 | TrackerConfig::kHUNT_PANELS) || | 240 | TrackerConfig::kHUNT_PANELS) || |
| diff --git a/src/tracker_state.cpp b/src/tracker_state.cpp index bf2725a..674f68a 100644 --- a/src/tracker_state.cpp +++ b/src/tracker_state.cpp | |||
| @@ -342,7 +342,7 @@ class StateCalculator { | |||
| 342 | new_boundary.push_back( | 342 | new_boundary.push_back( |
| 343 | {.source_room = room_exit.destination_room, | 343 | {.source_room = room_exit.destination_room, |
| 344 | .destination_room = GD_GetRoomByName("Color Hallways"), | 344 | .destination_room = GD_GetRoomByName("Color Hallways"), |
| 345 | .type = EntranceType::kPainting}); | 345 | .type = EntranceType::kStaticPainting}); |
| 346 | } | 346 | } |
| 347 | 347 | ||
| 348 | if (AP_IsPilgrimageEnabled()) { | 348 | if (AP_IsPilgrimageEnabled()) { |
| @@ -368,7 +368,7 @@ class StateCalculator { | |||
| 368 | .destination_room = GD_GetRoomByName("Pilgrim Antechamber"), | 368 | .destination_room = GD_GetRoomByName("Pilgrim Antechamber"), |
| 369 | .door = | 369 | .door = |
| 370 | GD_GetDoorByName("Pilgrim Antechamber - Sun Painting"), | 370 | GD_GetDoorByName("Pilgrim Antechamber - Sun Painting"), |
| 371 | .type = EntranceType::kPainting}); | 371 | .type = EntranceType::kStaticPainting}); |
| 372 | } | 372 | } |
| 373 | } | 373 | } |
| 374 | 374 | ||
| @@ -650,7 +650,8 @@ class StateCalculator { | |||
| 650 | !AP_DoesPilgrimageAllowRoofAccess()) { | 650 | !AP_DoesPilgrimageAllowRoofAccess()) { |
| 651 | return kNo; | 651 | return kNo; |
| 652 | } | 652 | } |
| 653 | if (room_exit.type == EntranceType::kPainting && | 653 | if ((room_exit.type == EntranceType::kPainting || |
| 654 | room_exit.type == EntranceType::kStaticPainting) && | ||
| 654 | !AP_DoesPilgrimageAllowPaintings()) { | 655 | !AP_DoesPilgrimageAllowPaintings()) { |
| 655 | return kNo; | 656 | return kNo; |
| 656 | } | 657 | } |
| diff --git a/src/updater.cpp b/src/updater.cpp index 67d5f31..2b05daf 100644 --- a/src/updater.cpp +++ b/src/updater.cpp | |||
| @@ -36,7 +36,7 @@ std::string CalculateStringSha256(const wxString& data) { | |||
| 36 | 36 | ||
| 37 | char output[65] = {0}; | 37 | char output[65] = {0}; |
| 38 | for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) { | 38 | for (int i = 0; i < SHA256_DIGEST_LENGTH; i++) { |
| 39 | sprintf(output + (i * 2), "%02x", hash[i]); | 39 | snprintf(output + (i * 2), 3, "%02x", hash[i]); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | return std::string(output); | 42 | return std::string(output); |
| @@ -172,26 +172,33 @@ void Updater::InstallUpdate(std::string url, std::string checksum, | |||
| 172 | return; | 172 | return; |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | package_path_.clear(); | 175 | bool download_issue = false; |
| 176 | package_path_.resize(L_tmpnam + 1); | ||
| 177 | tmpnam_s(package_path_.data(), L_tmpnam); | ||
| 178 | 176 | ||
| 179 | { | 177 | wxFileName package_path; |
| 180 | wxFileOutputStream writeOut(package_path_); | 178 | package_path.AssignTempFileName(""); |
| 179 | |||
| 180 | if (!package_path.IsOk()) { | ||
| 181 | download_issue = true; | ||
| 182 | } else { | ||
| 183 | wxFileOutputStream writeOut(package_path.GetFullPath()); | ||
| 181 | wxString fileData = packageRequest.GetResponse().AsString(); | 184 | wxString fileData = packageRequest.GetResponse().AsString(); |
| 182 | writeOut.WriteAll(fileData.c_str(), fileData.length()); | 185 | writeOut.WriteAll(fileData.c_str(), fileData.length()); |
| 183 | 186 | ||
| 184 | std::string downloadedChecksum = CalculateStringSha256(fileData); | 187 | std::string downloadedChecksum = CalculateStringSha256(fileData); |
| 185 | if (downloadedChecksum != checksum) { | 188 | if (downloadedChecksum != checksum) { |
| 186 | if (wxMessageBox("There was an issue downloading the update. Would you " | 189 | download_issue = true; |
| 187 | "like to manually download it instead?", | ||
| 188 | "Error", wxYES_NO | wxICON_ERROR) == wxID_YES) { | ||
| 189 | wxLaunchDefaultBrowser(kChangelogUrl); | ||
| 190 | } | ||
| 191 | return; | ||
| 192 | } | 190 | } |
| 193 | } | 191 | } |
| 194 | 192 | ||
| 193 | if (download_issue) { | ||
| 194 | if (wxMessageBox("There was an issue downloading the update. Would you " | ||
| 195 | "like to manually download it instead?", | ||
| 196 | "Error", wxYES_NO | wxICON_ERROR) == wxID_YES) { | ||
| 197 | wxLaunchDefaultBrowser(kChangelogUrl); | ||
| 198 | } | ||
| 199 | return; | ||
| 200 | } | ||
| 201 | |||
| 195 | std::filesystem::path newArea = GetExecutableDirectory(); | 202 | std::filesystem::path newArea = GetExecutableDirectory(); |
| 196 | std::filesystem::path oldArea = newArea / "old"; | 203 | std::filesystem::path oldArea = newArea / "old"; |
| 197 | std::set<std::filesystem::path> folders; | 204 | std::set<std::filesystem::path> folders; |
| @@ -241,7 +248,7 @@ void Updater::InstallUpdate(std::string url, std::string checksum, | |||
| 241 | } | 248 | } |
| 242 | } | 249 | } |
| 243 | 250 | ||
| 244 | wxFileInputStream fileInputStream(package_path_); | 251 | wxFileInputStream fileInputStream(package_path.GetFullPath()); |
| 245 | wxZipInputStream zipStream(fileInputStream); | 252 | wxZipInputStream zipStream(fileInputStream); |
| 246 | std::unique_ptr<wxZipEntry> zipEntry; | 253 | std::unique_ptr<wxZipEntry> zipEntry; |
| 247 | while ((zipEntry = std::unique_ptr<wxZipEntry>(zipStream.GetNextEntry())) != | 254 | while ((zipEntry = std::unique_ptr<wxZipEntry>(zipStream.GetNextEntry())) != |
| diff --git a/src/updater.h b/src/updater.h index 2d2f746..c604a49 100644 --- a/src/updater.h +++ b/src/updater.h | |||
| @@ -41,7 +41,6 @@ class Updater : public wxEvtHandler { | |||
| 41 | 41 | ||
| 42 | wxFrame* parent_; | 42 | wxFrame* parent_; |
| 43 | UpdateState update_state_ = UpdateState::GetVersionInvisible; | 43 | UpdateState update_state_ = UpdateState::GetVersionInvisible; |
| 44 | std::string package_path_; | ||
| 45 | }; | 44 | }; |
| 46 | 45 | ||
| 47 | #endif /* end of include guard: UPDATER_H_809E7381 */ | 46 | #endif /* end of include guard: UPDATER_H_809E7381 */ |
| diff --git a/src/version.h b/src/version.h index 544d563..3439fda 100644 --- a/src/version.h +++ b/src/version.h | |||
| @@ -36,6 +36,6 @@ struct Version { | |||
| 36 | } | 36 | } |
| 37 | }; | 37 | }; |
| 38 | 38 | ||
| 39 | constexpr const Version kTrackerVersion = Version(1, 0, 0); | 39 | constexpr const Version kTrackerVersion = Version(2, 0, 2); |
| 40 | 40 | ||
| 41 | #endif /* end of include guard: VERSION_H_C757E53C */ \ No newline at end of file | 41 | #endif /* end of include guard: VERSION_H_C757E53C */ \ No newline at end of file |
| diff --git a/vcpkg.json b/vcpkg.json index e13d228..581a507 100644 --- a/vcpkg.json +++ b/vcpkg.json | |||
| @@ -1,6 +1,5 @@ | |||
| 1 | { | 1 | { |
| 2 | "dependencies": [ | 2 | "dependencies": [ |
| 3 | "websocketpp", | ||
| 4 | "wxwidgets", | 3 | "wxwidgets", |
| 5 | "openssl", | 4 | "openssl", |
| 6 | "yaml-cpp", | 5 | "yaml-cpp", |
| diff --git a/vendor/vcpkg b/vendor/vcpkg | |||
| Subproject 3dd44b931481d7a8e9ba412621fa810232b6628 | Subproject df8bfe519564ae001903e5cdd32af0999531ef7 | ||
| diff --git a/vendor/websocketpp b/vendor/websocketpp new file mode 160000 | |||
| Subproject 1b11fd301531e6df35a6107c1e8665b1e77a2d8 | |||
