From db5e47d2ceab60effccf80b495fa166504c8bcf3 Mon Sep 17 00:00:00 2001 From: DayibBaba <79384354+DayibBaba@users.noreply.github.com> Date: Sat, 4 Nov 2023 00:23:37 +0100 Subject: [PATCH] Xml Map Loader (Menyoo) (#2233) Co-authored-by: Yimura <24669514+Yimura@users.noreply.github.com> --- src/backend/backend.cpp | 2 + src/main.cpp | 2 + src/services/gui/gui_service.hpp | 2 + src/services/xml_maps/xml_map_service.cpp | 541 ++++++++++++++++++++++ src/services/xml_maps/xml_map_service.hpp | 20 + src/views/view.hpp | 1 + src/views/world/view_xml_maps.cpp | 27 ++ 7 files changed, 595 insertions(+) create mode 100644 src/services/xml_maps/xml_map_service.cpp create mode 100644 src/services/xml_maps/xml_map_service.hpp create mode 100644 src/views/world/view_xml_maps.cpp diff --git a/src/backend/backend.cpp b/src/backend/backend.cpp index ae3775d0..09e108b4 100644 --- a/src/backend/backend.cpp +++ b/src/backend/backend.cpp @@ -13,6 +13,7 @@ #include "services/tunables/tunables_service.hpp" #include "services/vehicle/vehicle_control_service.hpp" #include "services/vehicle/xml_vehicles_service.hpp" +#include "services/xml_maps/xml_map_service.hpp" #include "thread_pool.hpp" @@ -27,6 +28,7 @@ namespace big g_squad_spawner_service.fetch_squads(); g_xml_vehicles_service->fetch_xml_files(); + g_xml_map_service->fetch_xml_files(); g_custom_teleport_service.fetch_saved_locations(); g_ped_animation_service.fetch_saved_animations(); diff --git a/src/main.cpp b/src/main.cpp index 23cead36..7ac72361 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -32,6 +32,7 @@ #include "services/vehicle/handling_service.hpp" #include "services/vehicle/vehicle_control_service.hpp" #include "services/vehicle/xml_vehicles_service.hpp" +#include "services/xml_maps/xml_map_service.hpp" #include "thread_pool.hpp" #include "util/migrate.hpp" #include "version.hpp" @@ -113,6 +114,7 @@ BOOL APIENTRY DllMain(HMODULE hmod, DWORD reason, PVOID) auto tunables_service_instance = std::make_unique(); auto script_connection_service_instance = std::make_unique(); auto xml_vehicles_service_instance = std::make_unique(); + auto xml_maps_service_instance = std::make_unique(); LOG(INFO) << "Registered service instances..."; g_script_mgr.add_script(std::make_unique