diff --git a/src/custom/freecam.cpp b/src/custom/freecam_sa.cpp similarity index 99% rename from src/custom/freecam.cpp rename to src/custom/freecam_sa.cpp index eb45250..ab5921c 100644 --- a/src/custom/freecam.cpp +++ b/src/custom/freecam_sa.cpp @@ -1,6 +1,5 @@ #include "pch.h" -#ifdef GTASA -#include "freecam.h" +#include "freecam_sa.h" static CVector gTotalMouse; FreecamMgr& Freecam = *FreecamMgr::Get(); @@ -187,5 +186,4 @@ FreecamMgr::FreecamMgr() Process(); } }; -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/custom/freecam.h b/src/custom/freecam_sa.h similarity index 93% rename from src/custom/freecam.h rename to src/custom/freecam_sa.h index 63813dd..240b362 100644 --- a/src/custom/freecam.h +++ b/src/custom/freecam_sa.h @@ -1,5 +1,4 @@ #pragma once -#ifdef GTASA #include "interface/icheat.hpp" /* @@ -30,5 +29,4 @@ public: void Disable(); }; -extern FreecamMgr& Freecam; -#endif \ No newline at end of file +extern FreecamMgr& Freecam; \ No newline at end of file diff --git a/src/custom/neon.cpp b/src/custom/neon_sa.cpp similarity index 99% rename from src/custom/neon.cpp rename to src/custom/neon_sa.cpp index 61132a2..ae2bc03 100644 --- a/src/custom/neon.cpp +++ b/src/custom/neon_sa.cpp @@ -1,7 +1,5 @@ #include "pch.h" - -#ifdef GTASA -#include "neon.h" +#include "neon_sa.h" NeonMgr& Neon = *NeonMgr::Get(); @@ -270,5 +268,4 @@ void NeonMgr::Install(CVehicle* pVeh, int r, int g, int b) void NeonMgr::Remove(CVehicle* pVeh) { m_VehNeon.Get(pVeh).m_bNeonInstalled = false; -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/custom/neon.h b/src/custom/neon_sa.h similarity index 96% rename from src/custom/neon.h rename to src/custom/neon_sa.h index 870b28a..0ca1c3d 100644 --- a/src/custom/neon.h +++ b/src/custom/neon_sa.h @@ -1,5 +1,4 @@ #pragma once -#ifdef GTASA #include #include "interface/icheat.hpp" /* @@ -55,5 +54,4 @@ public: void Remove(CVehicle* veh); }; -extern NeonMgr& Neon; -#endif \ No newline at end of file +extern NeonMgr& Neon; \ No newline at end of file diff --git a/src/custom/paint.cpp b/src/custom/paint_sa.cpp similarity index 99% rename from src/custom/paint.cpp rename to src/custom/paint_sa.cpp index b59c307..a4ac8ef 100644 --- a/src/custom/paint.cpp +++ b/src/custom/paint_sa.cpp @@ -23,8 +23,7 @@ // SOFTWARE. #include "pch.h" -#ifdef GTASA -#include "paint.h" +#include "paint_sa.h" #include "utils/util.h" #include @@ -319,5 +318,4 @@ void Paint::ResetNodeTexture(CVehicle* pVeh, std::string node_name) }, nullptr); } }); -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/custom/paint.h b/src/custom/paint_sa.h similarity index 99% rename from src/custom/paint.h rename to src/custom/paint_sa.h index b9aa3c2..065309b 100644 --- a/src/custom/paint.h +++ b/src/custom/paint_sa.h @@ -23,7 +23,6 @@ // SOFTWARE. #pragma once -#ifdef GTASA #include class Paint @@ -84,4 +83,3 @@ public: static void ResetNodeColor(CVehicle* veh, std::string node_name); static void ResetNodeTexture(CVehicle* pVeh, std::string node_name); }; -#endif diff --git a/src/custom/randomcheats.cpp b/src/custom/randomcheats_sa.cpp similarity index 97% rename from src/custom/randomcheats.cpp rename to src/custom/randomcheats_sa.cpp index bd7d9c5..146b188 100644 --- a/src/custom/randomcheats.cpp +++ b/src/custom/randomcheats_sa.cpp @@ -1,7 +1,6 @@ #include "pch.h" -#include "randomcheats.h" +#include "randomcheats_sa.h" -#ifdef GTASA RandomCheatsMgr& RandomCheats = *RandomCheatsMgr::Get(); void RandomCheatsMgr::Process() @@ -76,5 +75,4 @@ RandomCheatsMgr::RandomCheatsMgr() Process(); } }; -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/custom/randomcheats.h b/src/custom/randomcheats_sa.h similarity index 91% rename from src/custom/randomcheats.h rename to src/custom/randomcheats_sa.h index bf48012..661bbac 100644 --- a/src/custom/randomcheats.h +++ b/src/custom/randomcheats_sa.h @@ -1,5 +1,4 @@ #pragma once -#ifdef GTASA #include "interface/icheat.hpp" #include "pch.h" @@ -28,5 +27,4 @@ public: void DrawList(); }; -extern RandomCheatsMgr& RandomCheats; -#endif \ No newline at end of file +extern RandomCheatsMgr& RandomCheats; \ No newline at end of file diff --git a/src/pages/game.cpp b/src/pages/game.cpp index 9809cb6..2722c39 100644 --- a/src/pages/game.cpp +++ b/src/pages/game.cpp @@ -5,8 +5,8 @@ #include "utils/util.h" #ifdef GTASA -#include "custom/freecam.h" -#include "custom/randomcheats.h" +#include "custom/freecam_sa.h" +#include "custom/randomcheats_sa.h" #include #include #include diff --git a/src/pages/player.cpp b/src/pages/player.cpp index 45b05fa..a0e0684 100644 --- a/src/pages/player.cpp +++ b/src/pages/player.cpp @@ -3,6 +3,7 @@ #include "menu.h" #include "utils/widget.h" #include "utils/util.h" +#include "kiero/minhook/MinHook.h" #ifdef GTASA #include "ped.h" @@ -99,6 +100,7 @@ void Player::Init() m_bAimSkinChanger = gConfig.Get("Features.AimSkinChanger", false); #endif + // Custom skins setup std::string path = GAME_PATH((char*)"modloader/"); if (GetModuleHandle("modloader.asi") && std::filesystem::is_directory(path)) diff --git a/src/pages/player.h b/src/pages/player.h index 4538baf..170bdc1 100644 --- a/src/pages/player.h +++ b/src/pages/player.h @@ -4,8 +4,8 @@ class Player { private: - static inline bool m_bPlayerRegen; static inline bool m_bGodMode; + static inline bool m_bPlayerRegen; static inline bool m_bModloaderInstalled; struct KeepPosition { @@ -47,6 +47,7 @@ private: #endif public: + Player() = delete; Player(const Player&) = delete; diff --git a/src/pages/vehicle.cpp b/src/pages/vehicle.cpp index ca8a9eb..4a449ae 100644 --- a/src/pages/vehicle.cpp +++ b/src/pages/vehicle.cpp @@ -10,8 +10,8 @@ #ifdef GTASA #include -#include "custom/neon.h" -#include "custom/paint.h" +#include "custom/neon_sa.h" +#include "custom/paint_sa.h" #endif void Vehicle::Init() diff --git a/tools/premake5.lua b/tools/premake5.lua index 5db8d93..3401585 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -49,6 +49,14 @@ function createProject(projectID) "../src/**.c", "../src/**.cpp" } + + if (upperID ~= "SA") then + removefiles { + "../src/**_sa.c", + "../src/**_sa.hpp", + "../src/**_sa.cpp" + } + end if upperID == "III" then upperID = "3"