From e07ed536207bec772c37e942712e6254fce0f939 Mon Sep 17 00:00:00 2001 From: Grinch_ Date: Thu, 17 Dec 2020 04:14:16 +0600 Subject: [PATCH] Switec to cmake/vs code, fixed issue with windows 7 --- .github/workflows/msbuild.yml | 27 - .vscode/settings.json | 11 + CheatMenu.sln | 22 - CheatMenu/CheatMenu.vcxproj.filters | 72 -- CheatMenu/CheatMenu.vcxproj.vcxproj | 226 ------ CheatMenu/CheatMenu.vcxproj.vcxproj.filters | 111 --- CheatMenu/CheatMenu.vcxproj.vcxproj.user | 6 - CheatMenu/Ui.cpp | 757 ------------------ {CheatMenu => src}/Animation.cpp | 0 {CheatMenu => src}/Animation.h | 0 src/CMakeLists.txt | 244 ++++++ {CheatMenu => src}/CheatMenu.cpp | 0 {CheatMenu => src}/CheatMenu.h | 0 {CheatMenu => src}/CustomWidgets.cpp | 0 {CheatMenu => src}/CustomWidgets.h | 0 {CheatMenu => src}/Events.cpp | 0 {CheatMenu => src}/Events.h | 0 {CheatMenu => src}/Game.cpp | 0 {CheatMenu => src}/Game.h | 0 {CheatMenu => src}/Hook.cpp | 0 {CheatMenu => src}/Hook.h | 0 {CheatMenu => src}/Json.cpp | 0 {CheatMenu => src}/Json.h | 0 {CheatMenu => src}/Menu.cpp | 0 {CheatMenu => src}/Menu.h | 0 {CheatMenu => src}/NeonAPI.cpp | 0 {CheatMenu => src}/NeonAPI.h | 0 {CheatMenu => src}/Paint.cpp | 0 {CheatMenu => src}/Paint.h | 0 {CheatMenu => src}/Ped.cpp | 0 {CheatMenu => src}/Ped.h | 0 {CheatMenu => src}/Player.cpp | 0 {CheatMenu => src}/Player.h | 0 {CheatMenu => src}/Teleport.cpp | 0 {CheatMenu => src}/Teleport.h | 0 {CheatMenu => src}/Ui.h | 0 {CheatMenu => src}/Util.cpp | 0 {CheatMenu => src}/Util.h | 0 {CheatMenu => src}/VKeys.h | 0 {CheatMenu => src}/Vehicle.cpp | 0 {CheatMenu => src}/Vehicle.h | 0 {CheatMenu => src}/Visual.cpp | 0 {CheatMenu => src}/Visual.h | 0 {CheatMenu => src}/Weapon.cpp | 0 {CheatMenu => src}/Weapon.h | 0 {CheatMenu => src}/external/imgui/imconfig.h | 0 {CheatMenu => src}/external/imgui/imgui.cpp | 0 {CheatMenu => src}/external/imgui/imgui.h | 0 .../external/imgui/imgui_demo.cpp | 0 .../external/imgui/imgui_draw.cpp | 0 .../external/imgui/imgui_impl_dx11.cpp | 0 .../external/imgui/imgui_impl_dx11.h | 0 .../external/imgui/imgui_impl_dx9.cpp | 0 .../external/imgui/imgui_impl_dx9.h | 0 .../external/imgui/imgui_impl_win32.cpp | 0 .../external/imgui/imgui_impl_win32.h | 0 .../external/imgui/imgui_internal.h | 0 .../external/imgui/imgui_widgets.cpp | 0 .../external/imgui/imstb_rectpack.h | 0 .../external/imgui/imstb_textedit.h | 0 .../external/imgui/imstb_truetype.h | 0 {CheatMenu => src}/external/imgui/stb_image.h | 0 {CheatMenu => src}/external/json.hpp | 0 {CheatMenu => src}/external/kiero/kiero.cpp | 0 {CheatMenu => src}/external/kiero/kiero.h | 0 .../external/kiero/minhook/include/MinHook.h | 0 .../external/moon/pool_object_extender.h | 0 .../external/moon/texture_manager.cpp | 0 .../external/moon/texture_manager.h | 0 .../external/moon/vehicle_renderer.cpp | 0 .../external/moon/vehicle_renderer.h | 0 {CheatMenu => src}/pch.cpp | 0 {CheatMenu => src}/pch.h | 2 +- 73 files changed, 256 insertions(+), 1222 deletions(-) delete mode 100644 .github/workflows/msbuild.yml create mode 100644 .vscode/settings.json delete mode 100644 CheatMenu.sln delete mode 100644 CheatMenu/CheatMenu.vcxproj.filters delete mode 100644 CheatMenu/CheatMenu.vcxproj.vcxproj delete mode 100644 CheatMenu/CheatMenu.vcxproj.vcxproj.filters delete mode 100644 CheatMenu/CheatMenu.vcxproj.vcxproj.user delete mode 100644 CheatMenu/Ui.cpp rename {CheatMenu => src}/Animation.cpp (100%) rename {CheatMenu => src}/Animation.h (100%) create mode 100644 src/CMakeLists.txt rename {CheatMenu => src}/CheatMenu.cpp (100%) rename {CheatMenu => src}/CheatMenu.h (100%) rename {CheatMenu => src}/CustomWidgets.cpp (100%) rename {CheatMenu => src}/CustomWidgets.h (100%) rename {CheatMenu => src}/Events.cpp (100%) rename {CheatMenu => src}/Events.h (100%) rename {CheatMenu => src}/Game.cpp (100%) rename {CheatMenu => src}/Game.h (100%) rename {CheatMenu => src}/Hook.cpp (100%) rename {CheatMenu => src}/Hook.h (100%) rename {CheatMenu => src}/Json.cpp (100%) rename {CheatMenu => src}/Json.h (100%) rename {CheatMenu => src}/Menu.cpp (100%) rename {CheatMenu => src}/Menu.h (100%) rename {CheatMenu => src}/NeonAPI.cpp (100%) rename {CheatMenu => src}/NeonAPI.h (100%) rename {CheatMenu => src}/Paint.cpp (100%) rename {CheatMenu => src}/Paint.h (100%) rename {CheatMenu => src}/Ped.cpp (100%) rename {CheatMenu => src}/Ped.h (100%) rename {CheatMenu => src}/Player.cpp (100%) rename {CheatMenu => src}/Player.h (100%) rename {CheatMenu => src}/Teleport.cpp (100%) rename {CheatMenu => src}/Teleport.h (100%) rename {CheatMenu => src}/Ui.h (100%) rename {CheatMenu => src}/Util.cpp (100%) rename {CheatMenu => src}/Util.h (100%) rename {CheatMenu => src}/VKeys.h (100%) rename {CheatMenu => src}/Vehicle.cpp (100%) rename {CheatMenu => src}/Vehicle.h (100%) rename {CheatMenu => src}/Visual.cpp (100%) rename {CheatMenu => src}/Visual.h (100%) rename {CheatMenu => src}/Weapon.cpp (100%) rename {CheatMenu => src}/Weapon.h (100%) rename {CheatMenu => src}/external/imgui/imconfig.h (100%) rename {CheatMenu => src}/external/imgui/imgui.cpp (100%) rename {CheatMenu => src}/external/imgui/imgui.h (100%) rename {CheatMenu => src}/external/imgui/imgui_demo.cpp (100%) rename {CheatMenu => src}/external/imgui/imgui_draw.cpp (100%) rename {CheatMenu => src}/external/imgui/imgui_impl_dx11.cpp (100%) rename {CheatMenu => src}/external/imgui/imgui_impl_dx11.h (100%) rename {CheatMenu => src}/external/imgui/imgui_impl_dx9.cpp (100%) rename {CheatMenu => src}/external/imgui/imgui_impl_dx9.h (100%) rename {CheatMenu => src}/external/imgui/imgui_impl_win32.cpp (100%) rename {CheatMenu => src}/external/imgui/imgui_impl_win32.h (100%) rename {CheatMenu => src}/external/imgui/imgui_internal.h (100%) rename {CheatMenu => src}/external/imgui/imgui_widgets.cpp (100%) rename {CheatMenu => src}/external/imgui/imstb_rectpack.h (100%) rename {CheatMenu => src}/external/imgui/imstb_textedit.h (100%) rename {CheatMenu => src}/external/imgui/imstb_truetype.h (100%) rename {CheatMenu => src}/external/imgui/stb_image.h (100%) rename {CheatMenu => src}/external/json.hpp (100%) rename {CheatMenu => src}/external/kiero/kiero.cpp (100%) rename {CheatMenu => src}/external/kiero/kiero.h (100%) rename {CheatMenu => src}/external/kiero/minhook/include/MinHook.h (100%) rename {CheatMenu => src}/external/moon/pool_object_extender.h (100%) rename {CheatMenu => src}/external/moon/texture_manager.cpp (100%) rename {CheatMenu => src}/external/moon/texture_manager.h (100%) rename {CheatMenu => src}/external/moon/vehicle_renderer.cpp (100%) rename {CheatMenu => src}/external/moon/vehicle_renderer.h (100%) rename {CheatMenu => src}/pch.cpp (100%) rename {CheatMenu => src}/pch.h (97%) diff --git a/.github/workflows/msbuild.yml b/.github/workflows/msbuild.yml deleted file mode 100644 index c93dbff..0000000 --- a/.github/workflows/msbuild.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: MSBuild - -on: [push] - -env: - # Path to the solution file relative to the root of the project. - SOLUTION_FILE_PATH: . - -jobs: - build: - runs-on: windows-latest - - steps: - - uses: actions/checkout@v2 - - - name: Add MSBuild to PATH - uses: microsoft/setup-msbuild@v1 - - - name: Restore NuGet packages - working-directory: ${{env.GITHUB_WORKSPACE}} - run: nuget restore ${{env.SOLUTION_FILE_PATH}} - - - name: Build - working-directory: ${{env.GITHUB_WORKSPACE}} - # Add additional options to the MSBuild command line here (like platform or verbosity level). - # See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference - run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..5913ec8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,11 @@ +{ + "C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools", + "files.associations": { + "iosfwd": "cpp", + "xlocbuf": "cpp", + "filesystem": "cpp", + "xlocale": "cpp", + "xstring": "cpp", + "xutility": "cpp" + } +} \ No newline at end of file diff --git a/CheatMenu.sln b/CheatMenu.sln deleted file mode 100644 index d2462bd..0000000 --- a/CheatMenu.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CheatMenu", "CheatMenu\CheatMenu.vcxproj.vcxproj", "{B212DDA4-2A8E-45B2-914D-7BEEB31D06B1}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - GTASA Release|x86 = GTASA Release|x86 - GTASA zDebug|x86 = GTASA zDebug|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B212DDA4-2A8E-45B2-914D-7BEEB31D06B1}.GTASA Release|x86.ActiveCfg = GTASA Release|Win32 - {B212DDA4-2A8E-45B2-914D-7BEEB31D06B1}.GTASA Release|x86.Build.0 = GTASA Release|Win32 - {B212DDA4-2A8E-45B2-914D-7BEEB31D06B1}.GTASA zDebug|x86.ActiveCfg = GTASA zDebug|Win32 - {B212DDA4-2A8E-45B2-914D-7BEEB31D06B1}.GTASA zDebug|x86.Build.0 = GTASA zDebug|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/CheatMenu/CheatMenu.vcxproj.filters b/CheatMenu/CheatMenu.vcxproj.filters deleted file mode 100644 index 26b7ce5..0000000 --- a/CheatMenu/CheatMenu.vcxproj.filters +++ /dev/null @@ -1,72 +0,0 @@ - - - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - include\imgui - - - include - - - - - - {76d7c5f4-7966-4299-babe-1441756fd761} - - - {b4b37f77-034a-404c-9ec1-8fcec9d1052e} - - - - - include - - - - - include - - - \ No newline at end of file diff --git a/CheatMenu/CheatMenu.vcxproj.vcxproj b/CheatMenu/CheatMenu.vcxproj.vcxproj deleted file mode 100644 index 380826e..0000000 --- a/CheatMenu/CheatMenu.vcxproj.vcxproj +++ /dev/null @@ -1,226 +0,0 @@ - - - - - GTASA Release - Win32 - - - GTASA zDebug - Win32 - - - - {B212DDA4-2A8E-45B2-914D-7BEEB31D06B1} - true - Win32Proj - CheatMenu - CheatMenu - 8.1 - - - - DynamicLibrary - false - MultiByte - v140 - true - - - DynamicLibrary - true - MultiByte - v140 - - - - - - - - - - - - - F:\GTASanAndreas\ - $(ProjectDir).obj\GTASA\Release\ - .asi - $(IncludePath);$(DIRECTX9_SDK_DIR)\Include\ - $(LibraryPath);$(DIRECTX9_SDK_DIR)\Lib\x86\ - $(ProjectName) - - - F:\GTASanAndreas\ - $(ProjectDir).obj\GTASA\Debug\ - $(ProjectName) - .asi - $(IncludePath);$(DIRECTX9_SDK_DIR)\Include\ - $(LibraryPath);$(DIRECTX9_SDK_DIR)\Lib\x86\ - - - - Level3 - MaxSpeed - true - true - false - MultiThreaded - $(PLUGIN_SDK_DIR)\plugin_sa\;$(PLUGIN_SDK_DIR)\plugin_sa\game_sa\;$(PLUGIN_SDK_DIR)\shared\;$(PLUGIN_SDK_DIR)\shared\game\;%(AdditionalIncludeDirectories) - _NDEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;GTASA;GTAGAME_NAME="San Andreas";GTAGAME_ABBR="SA";GTAGAME_ABBRLOW="sa";GTAGAME_PROTAGONISTNAME="CJ";GTAGAME_CITYNAME="San Andreas";_LA_SUPPORT;_DX9_SDK_INSTALLED;PLUGIN_SGV_10US;%(PreprocessorDefinitions) - stdcpplatest - pch.h - Use - - - true - true - No - UseLinkTimeCodeGeneration - $(PLUGIN_SDK_DIR)\output\lib\;%(AdditionalLibraryDirectories) - plugin.lib;d3d9.lib;d3dx9.lib;d3d11.lib;d3dx11.lib;$(ProjectDir)external\kiero\minhook\lib\libMinHook-x86-v140-mt.lib;$(ProjectDir)external\kiero\minhook\lib\libMinHook-x86-v140-md.lib;%(AdditionalDependencies) - Windows - false - - - taskkill /f /fi "imagename eq gta_sa.exe" - - - - - Level3 - Disabled - false - MultiThreadedDebug - $(PLUGIN_SDK_DIR)\plugin_sa\;$(PLUGIN_SDK_DIR)\plugin_sa\game_sa\;$(PLUGIN_SDK_DIR)\shared\;$(PLUGIN_SDK_DIR)\shared\game\;%(AdditionalIncludeDirectories) - _DEBUG;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS;GTASA;GTAGAME_NAME="San Andreas";GTAGAME_ABBR="SA";GTAGAME_ABBRLOW="sa";GTAGAME_PROTAGONISTNAME="CJ";GTAGAME_CITYNAME="San Andreas";_LA_SUPPORT;_DX9_SDK_INSTALLED;PLUGIN_SGV_10US;%(PreprocessorDefinitions) - stdcpplatest - pch.h - Use - - - Debug - Default - $(PLUGIN_SDK_DIR)\output\lib\;%(AdditionalLibraryDirectories) - plugin_d.lib;d3d9.lib;d3dx9.lib;d3d11.lib;d3dx11.lib;$(ProjectDir)external\kiero\minhook\lib\libMinHook-x86-v140-mtd.lib;$(ProjectDir)external\kiero\minhook\lib\libMinHook-x86-v140-mdd.lib;%(AdditionalDependencies) - Windows - - - taskkill /f /fi "imagename eq gta_sa.exe" - - - - - - - NotUsing - NotUsing - - - NotUsing - NotUsing - - - - - NotUsing - NotUsing - - - NotUsing - NotUsing - - - - - - - - - - - - NotUsing - NotUsing - - - NotUsing - NotUsing - - - NotUsing - NotUsing - - - NotUsing - NotUsing - - - NotUsing - NotUsing - - - NotUsing - NotUsing - - - Use - pch.h - - - Create - Create - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/CheatMenu/CheatMenu.vcxproj.vcxproj.filters b/CheatMenu/CheatMenu.vcxproj.vcxproj.filters deleted file mode 100644 index b1e316c..0000000 --- a/CheatMenu/CheatMenu.vcxproj.vcxproj.filters +++ /dev/null @@ -1,111 +0,0 @@ - - - - - - external - - - external - - - external - - - external - - - external - - - external - - - - - - - - - - - - - - - - - - - - - - - - - - - - - external - - - external - - - external - - - external - - - external - - - external - - - external - - - external - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {f1569096-fe99-4d5d-871f-c0e55624f9d4} - - - - - - - - - \ No newline at end of file diff --git a/CheatMenu/CheatMenu.vcxproj.vcxproj.user b/CheatMenu/CheatMenu.vcxproj.vcxproj.user deleted file mode 100644 index a11cd7f..0000000 --- a/CheatMenu/CheatMenu.vcxproj.vcxproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - true - - \ No newline at end of file diff --git a/CheatMenu/Ui.cpp b/CheatMenu/Ui.cpp deleted file mode 100644 index 4053aff..0000000 --- a/CheatMenu/Ui.cpp +++ /dev/null @@ -1,757 +0,0 @@ -#include "pch.h" -#include "Ui.h" -#include "CustomWidgets.h" - -std::string Ui::current_hotkey = ""; - -static Ui::JsonPopUpData json_popup; -static Ui::ImgPopUpData img_popup; - -bool Ui::ListBox(const char* label, std::vector& all_items, int& selected) -{ - bool rtn = false; - if (ImGui::BeginCombo(label, all_items[selected].c_str())) - { - for (size_t index = 0; index < all_items.size(); index++) - { - if (selected != index) - { - if (ImGui::MenuItem(all_items[index].c_str())) - { - selected = index; - rtn = true; - } - } - } - ImGui::EndCombo(); - } - return rtn; -} - -bool Ui::ListBoxStr(const char* label, std::vector& all_items, std::string& selected) -{ - bool rtn = false; - if (ImGui::BeginCombo(label, selected.c_str())) - { - for (std::string current_item : all_items) - { - if (current_item != label) - { - if (ImGui::MenuItem(current_item.c_str())) - { - selected = current_item; - rtn = true; - } - } - } - ImGui::EndCombo(); - } - - return rtn; -} - -ImVec2 Ui::GetSize(short count,bool spacing) -{ - if (count == 1) - spacing = false; - - float factor = ImGui::GetStyle().ItemSpacing.x / 2.0f; - float x; - - if (count == 3) - factor = ImGui::GetStyle().ItemSpacing.x / 1.403f; - - if (spacing) - x = ImGui::GetWindowContentRegionWidth() / count - factor; - else - x = ImGui::GetWindowContentRegionWidth() / count; - - return ImVec2(x, ImGui::GetFrameHeight()*1.3f); -} - -void Ui::DrawHeaders(unsortedMap& data) -{ - - ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0)); - - short i = 1; - auto colors = ImGui::GetStyle().Colors; - ImVec4 btn_col = colors[ImGuiCol_Button]; - static void* func; - for (auto it = data.begin(); it != data.end(); ++it) - { - const char* btn_text = it->first.c_str(); - - if (btn_text == Globals::header_id) - colors[ImGuiCol_Button] = colors[ImGuiCol_ButtonActive]; - - - if (ImGui::Button(btn_text, GetSize(3, false))) - { - Globals::header_id = btn_text; - func = it->second; - } - - colors[ImGuiCol_Button] = btn_col; - - if (i % 3 != 0) - ImGui::SameLine(); - i++; - } - ImGui::PopStyleVar(); - ImGui::Dummy(ImVec2(0, 10)); - - if (Globals::header_id != "" && func != nullptr) - { - if (ImGui::BeginChild("TABSBAR")) - { - ((void(*)(void))func)(); - ImGui::EndChild(); - } - } -} - -void Ui::ShowTooltip(const char* text) -{ - ImGui::SameLine(); - ImGui::TextDisabled("?"); - - if (ImGui::IsItemHovered()) - { - ImGui::BeginTooltip(); - ImGui::Text(text); - ImGui::EndTooltip(); - } -} - -bool Ui::CheckboxWithHint(const char* label, bool* state, const char* hint, const bool is_disabled) -{ - bool rtn = false; - - if (CustomWidgets::Checkbox(label,state,hint,is_disabled)) - rtn = true; - - return rtn; -} - -bool Ui::CheckboxAddress(const char* label, const int addr, const char* hint) -{ - bool rtn = false; - bool state = patch::Get(addr,false); - - if (CheckboxWithHint(label, &state, hint) && addr != NULL) - { - patch::Set(addr, state, false); - rtn = true; - } - - return rtn; -} - -bool Ui::CheckboxAddressEx(const char* label, const int addr, int enabled_val, int disabled_val, const char* hint) -{ - bool rtn = false; - - bool state = false; - int val = 0; - patch::GetRaw(addr, &val, 1, false); - - if (val == enabled_val) - state = true; - - if (CheckboxWithHint(label, &state, hint) && addr != NULL) - { - if (state) - patch::SetRaw(addr, &enabled_val, 1, false); - else - patch::SetRaw(addr, &disabled_val, 1, false); - rtn = true; - } - - return rtn; -} - -bool Ui::CheckboxAddressVar(const char* label, bool val, int addr, const char* hint) -{ - bool rtn = false; - bool state = val; - if (CheckboxWithHint(label, &state, hint)) - { - patch::Set(addr, state, false); - rtn = true; - } - - return rtn; -} - -bool Ui::CheckboxAddressVarEx(const char* label, bool val, int addr, int enabled_val, int disabled_val, const char* hint) -{ - bool rtn = false; - bool state = val; - if (CheckboxWithHint(label, &state, hint)) - { - if (state) - patch::SetRaw(addr, &enabled_val, 1, false); - else - patch::SetRaw(addr, &disabled_val, 1, false); - - rtn = true; - } - - return rtn; -} - -bool Ui::CheckboxBitFlag(const char* label,uint flag, const char* hint) -{ - bool rtn = false; - bool state = (flag == 1) ? true : false; - if (CheckboxWithHint(label, &state, hint)) - { - flag = state ? 1 : 0; - rtn = true; - } - - return rtn; -} - -void Ui::DrawJSON(CJson& json, std::vector& combo_items, std::string& selected_item, ImGuiTextFilter& filter , std::function func_left_click, std::function func_right_click) -{ - ImGui::PushItemWidth(ImGui::GetContentRegionAvailWidth()/2 - 5); - ListBoxStr("##Categories", combo_items, selected_item); - ImGui::SameLine(); - - filter.Draw("##Filter"); - if (strlen(filter.InputBuf) == 0) - { - ImDrawList *drawlist = ImGui::GetWindowDrawList(); - - ImVec2 min = ImGui::GetItemRectMin(); - min.x += ImGui::GetStyle().FramePadding.x; - min.y += ImGui::GetStyle().FramePadding.y; - - drawlist->AddText(min, ImGui::GetColorU32(ImGuiCol_TextDisabled), "Search"); - } - - ImGui::PopItemWidth(); - - ImGui::Spacing(); - - if (ImGui::IsMouseClicked(1)) - json_popup.function = nullptr; - - - ImGui::BeginChild(1); - for (auto root : json.data.items()) - { - if (root.key() == selected_item || selected_item == "All") - { - for (auto _data : root.value().items()) - { - - std::string name = _data.key(); - if (filter.PassFilter(name.c_str())) - { - if (ImGui::MenuItem(name.c_str()) && func_left_click != nullptr) - { - func_left_click(std::string(root.key()),std::string(_data.key()), std::string(_data.value())); - } - - if (ImGui::IsItemClicked(1) && func_right_click != nullptr) - { - json_popup.function = func_right_click; - json_popup.root_key = root.key(); - json_popup.key = name; - json_popup.value = _data.value(); - } - } - } - } - } - - if (json_popup.function != nullptr) - { - if (ImGui::BeginPopupContextWindow()) - { - ImGui::Text(json_popup.key.c_str()); - ImGui::Separator(); - if (ImGui::MenuItem("Remove")) - json_popup.function(json_popup.root_key,json_popup.key,json_popup.value); - - - if (ImGui::MenuItem("Close")) - json_popup.function = nullptr; - - ImGui::EndPopup(); - } - } - ImGui::EndChild(); -} - - -void Ui::EditStat(const char *label, const int stat_id, const int min, const int def, const int max) -{ - if (ImGui::CollapsingHeader(label)) - { - int val = static_cast(CStats::GetStatValue(stat_id)); - - ImGui::Columns(3, 0, false); - ImGui::Text(("Min: " + std::to_string(min)).c_str()); - ImGui::NextColumn(); - ImGui::Text(("Def: " + std::to_string(def)).c_str()); - ImGui::NextColumn(); - ImGui::Text(("Max: " + std::to_string(max)).c_str()); - ImGui::Columns(1); - - ImGui::Spacing(); - - if (ImGui::InputInt(("Set value##" + std::string(label)).c_str(), &val)) - CStats::SetStatValue(stat_id, static_cast(val)); - - ImGui::Spacing(); - - if (ImGui::Button(("Minimum##" + std::string(label)).c_str(), Ui::GetSize(3))) - CStats::SetStatValue(stat_id, static_cast(min)); - - ImGui::SameLine(); - - if (ImGui::Button(("Default##" + std::string(label)).c_str(), Ui::GetSize(3))) - CStats::SetStatValue(stat_id, static_cast(def)); - - ImGui::SameLine(); - - if (ImGui::Button(("Maximum##" + std::string(label)).c_str(), Ui::GetSize(3))) - CStats::SetStatValue(stat_id, static_cast(max)); - - ImGui::Spacing(); - ImGui::Separator(); - } -} - -void Ui::FilterWithHint(const char* label, ImGuiTextFilter& filter, const char* hint) -{ - filter.Draw(label); - - if (strlen(filter.InputBuf) == 0) - { - ImDrawList *drawlist = ImGui::GetWindowDrawList(); - - ImVec2 min = ImGui::GetItemRectMin(); - min.x += ImGui::GetStyle().FramePadding.x; - min.y += ImGui::GetStyle().FramePadding.y; - - drawlist->AddText(min, ImGui::GetColorU32(ImGuiCol_TextDisabled), hint); - } -} - -// clean up the code someday -void Ui::DrawImages(std::vector> &img_vec, ImVec2 image_size, - std::vector& category_vec,std::string& selected_item, ImGuiTextFilter& filter, - std::function on_left_click, std::function on_right_click, - std::function get_name_func, std::function verify_func) -{ - - int images_in_row = static_cast(ImGui::GetWindowContentRegionWidth() / image_size.x); - image_size.x = ImGui::GetWindowContentRegionWidth() / images_in_row - ImGuiStyleVar_ItemSpacing*0.65f; - - int images_count = 1; - - ImGui::Spacing(); - - if (ImGui::IsMouseClicked(1)) - img_popup.function = nullptr; - - ImGui::PushItemWidth(ImGui::GetContentRegionAvailWidth() / 2 - 5); - ListBoxStr("##Categories", category_vec, selected_item); - ImGui::SameLine(); - FilterWithHint("##Filter", filter, "Search"); - - ImGui::Spacing(); - - ImGui::BeginChild("DrawImages"); - for (uint i = 0; i < img_vec.size(); i++) - { - std::string text = img_vec[i]->file_name; - std::string model_name = get_name_func(text); - - if (filter.PassFilter(model_name.c_str()) - && (img_vec[i]->category_name == selected_item || selected_item == "All") - && (verify_func == nullptr || verify_func(text)) - ) - { - void *texture = nullptr; - - if (Globals::renderer == Render_DirectX9) - texture = img_vec[i]->texture9; - else // consider 11 - texture = img_vec[i]->texture11; - - if (ImGui::ImageButton(texture, image_size, ImVec2(0, 0), ImVec2(1, 1), 1, ImVec4(1, 1, 1, 1), ImVec4(1, 1, 1, 1))) - on_left_click(text); - - if (ImGui::IsItemClicked(1) && on_right_click != nullptr) - { - img_popup.function = on_right_click; - img_popup.value = model_name; - } - - if (ImGui::IsItemHovered()) - { - ImDrawList *drawlist = ImGui::GetWindowDrawList(); - - ImVec2 btn_min = ImGui::GetItemRectMin(); - ImVec2 btn_max = ImGui::GetItemRectMax(); - - drawlist->AddRectFilled(btn_min, btn_max, ImGui::GetColorU32(ImGuiCol_ModalWindowDimBg)); - - ImVec2 text_size = ImGui::CalcTextSize(model_name.c_str()); - if (text_size.x < image_size.x) - { - float offsetX = (ImGui::GetItemRectSize().x - text_size.x) / 2; - drawlist->AddText(ImVec2(btn_min.x + offsetX, btn_min.y + 10), ImGui::GetColorU32(ImGuiCol_Text), model_name.c_str()); - } - else - { - std::string buff = ""; - - std::stringstream ss(model_name); - short count = 1; - - while (ss >> buff) - { - text_size = ImGui::CalcTextSize(buff.c_str()); - float offsetX = (ImGui::GetItemRectSize().x - text_size.x) / 2; - drawlist->AddText(ImVec2(btn_min.x + offsetX, btn_min.y + 10 * count), ImGui::GetColorU32(ImGuiCol_Text), buff.c_str()); - ++count; - } - - } - } - - if (images_count % images_in_row != 0) - ImGui::SameLine(0.0, 4.0); - - images_count++; - } - } - - if (img_popup.function != nullptr) - { - if (ImGui::BeginPopupContextWindow()) - { - ImGui::Text(img_popup.value.c_str()); - ImGui::Separator(); - if (ImGui::MenuItem("Remove")) - img_popup.function(img_popup.value); - - - if (ImGui::MenuItem("Close")) - img_popup.function = nullptr; - - ImGui::EndPopup(); - } - } - ImGui::EndChild(); -} - -void Ui::RadioButtonAddress(const char* label, std::vector &named_mem) -{ - size_t btn_in_column = named_mem.size() / 2 -1; - - ImGui::Text(label); - ImGui::Columns(2, 0, false); - - bool state = true; - - for (size_t i = 0; i < named_mem.size(); i++) - { - if (patch::Get(named_mem[i].addr, false)) - state = false; - } - - if (ImGui::RadioButton("None", state)) - { - for (size_t i = 0; i < named_mem.size(); i++) - patch::Set(named_mem[i].addr, false); - } - - for (size_t i = 0; i < named_mem.size(); i++) - { - state = patch::Get(named_mem[i].addr, false); - - if (ImGui::RadioButton(named_mem[i].name.c_str(), state)) - { - for (size_t i = 0; i < named_mem.size(); i++) - patch::Set(named_mem[i].addr, false); - - patch::Set(named_mem[i].addr, true); - } - - if (i == btn_in_column) - ImGui::NextColumn(); - } - ImGui::Columns(1); -} - -void Ui::RadioButtonAddressEx(const char* label, int addr, std::vector &named_val) -{ - size_t btn_in_column = named_val.size() / 2; - - ImGui::Text(label); - ImGui::Columns(2, 0, false); - - int mem_val = 0; - patch::GetRaw(addr, &mem_val, 1, false); - - for (size_t i = 0; i < named_val.size(); i++) - { - if (ImGui::RadioButton(named_val[i].name.c_str(), &mem_val, named_val[i].value)) - patch::SetRaw(addr, &named_val[i].value, 1, false); - - if (i == btn_in_column) - ImGui::NextColumn(); - } - ImGui::Columns(1); -} - -void Ui::EditRadioButtonAddress(const char* label, std::vector &named_mem) -{ - if (ImGui::CollapsingHeader(label)) - { - RadioButtonAddress(label, named_mem); - ImGui::Spacing(); - ImGui::Separator(); - } -} - -void Ui::EditRadioButtonAddressEx(const char* label, int addr, std::vector &named_val) -{ - if (ImGui::CollapsingHeader(label)) - { - RadioButtonAddressEx(label,addr,named_val); - ImGui::Spacing(); - ImGui::Separator(); - } -} - -void Ui::ColorPickerAddress(const char* label, int base_addr, ImVec4&& default_color) -{ - if (ImGui::CollapsingHeader(label)) - { - float cur_color[4]; - cur_color[0] = patch::Get(base_addr, false); - cur_color[1] = patch::Get(base_addr + 1, false); - cur_color[2] = patch::Get(base_addr + 2, false); - cur_color[3] = patch::Get(base_addr + 3,false); - - // 0-255 -> 0-1 - cur_color[0] /= 255; - cur_color[1] /= 255; - cur_color[2] /= 255; - cur_color[3] /= 255; - - if (ImGui::ColorPicker4(std::string("Pick color##" + std::string(label)).c_str(), cur_color)) - { - // 0-1 -> 0-255 - cur_color[0] *= 255; - cur_color[1] *= 255; - cur_color[2] *= 255; - cur_color[3] *= 255; - - patch::Set(base_addr, cur_color[0], false); - patch::Set(base_addr+1, cur_color[1], false); - patch::Set(base_addr+2, cur_color[2], false); - patch::Set(base_addr+3, cur_color[3], false); - } - ImGui::Spacing(); - - if (ImGui::Button("Reset to default", Ui::GetSize())) - { - patch::SetRaw(base_addr, &default_color.w, 1, false); - patch::SetRaw(base_addr + 1, &default_color.x, 1, false); - patch::SetRaw(base_addr + 2, &default_color.y, 1, false); - patch::SetRaw(base_addr + 3, &default_color.z, 1, false); - } - - ImGui::Spacing(); - ImGui::Separator(); - } -} - -void Ui::EditBits(const char *label, const int address, const std::vector& names) -{ - int *mem_val = (int*)address; - - if (ImGui::CollapsingHeader(label)) - { - ImGui::Columns(2, NULL, false); - - for (int i = 0; i < 32; ++i) - { - int mask = 1 << i; - bool state = static_cast(*mem_val & mask); - - if (ImGui::Checkbox(names[i].c_str(), &state)) - *mem_val ^= mask; - - if (i + 1 == 32 / 2) - ImGui::NextColumn(); - } - ImGui::Columns(1); - - ImGui::Spacing(); - ImGui::Separator(); - } -} - -void Ui::EditFloat(const char *label, const int address, const float min, const float def, const float max, const float mul) -{ - if (ImGui::CollapsingHeader(label)) - { - float val = patch::Get(address, false)*mul; - - int items = 3; - - if (min == def) - items = 2; - - ImGui::Columns(items, 0, false); - - ImGui::Text(("Min: " + std::to_string(min)).c_str()); - - if (items == 3) - { - ImGui::NextColumn(); - ImGui::Text(("Def: " + std::to_string(def)).c_str()); - } - - ImGui::NextColumn(); - ImGui::Text(("Max: " + std::to_string(max)).c_str()); - ImGui::Columns(1); - - ImGui::Spacing(); - - int size = ImGui::GetFrameHeight(); - - if (ImGui::InputFloat(("##" + std::string(label)).c_str(), &val)) - patch::Set(address, val/mul, false); - - ImGui::SameLine(0.0, 4.0); - if (ImGui::Button("-",ImVec2(size, size))) - { - val -= 1; - patch::Set(address, val / mul, false); - } - ImGui::SameLine(0.0, 4.0); - if (ImGui::Button("+",ImVec2(size, size))) - { - val += 1; - patch::Set(address, val / mul, false); - } - ImGui::SameLine(0.0, 4.0); - ImGui::Text("Set"); - - - ImGui::Spacing(); - - if (ImGui::Button(("Minimum##" + std::string(label)).c_str(), Ui::GetSize(items))) - patch::Set(address, min/mul, false); - - if (items == 3) - { - ImGui::SameLine(); - - if (ImGui::Button(("Default##" + std::string(label)).c_str(), Ui::GetSize(items))) - patch::Set(address, def/mul, false); - } - - ImGui::SameLine(); - - if (ImGui::Button(("Maximum##" + std::string(label)).c_str(), Ui::GetSize(items))) - patch::Set(address, max/mul, false); - - ImGui::Spacing(); - ImGui::Separator(); - } -} - -void Ui::HotKey(const char* label, int* key_array) -{ - bool active = current_hotkey == label; - - if (active) - { - ImGui::PushStyleColor(ImGuiCol_Button, ImGui::GetStyle().Colors[ImGuiCol_ButtonActive]); - - for (int key = 2; key != 90; ++key) - { - if (KeyPressed(key)) - { - key_array[0] = key; - break; - } - } - - for (int key = 90; key != 2; --key) - { - if (KeyPressed(key)) - { - key_array[1] = key; - break; - } - } - } - - std::string text = key_names[key_array[0]-1]; - - if (key_array[0] != key_array[1]) - text += (" + " + key_names[key_array[1]-1]); - - if (ImGui::Button((text + std::string("##") + std::string(label)).c_str(), ImVec2(ImGui::GetWindowContentRegionWidth() / 3, ImGui::GetFrameHeight()))) - { - if (active) - current_hotkey = ""; - else - current_hotkey = label;; - } - ImGui::SameLine(); - ImGui::Text(label); - - if (active) - ImGui::PopStyleColor(); - - if (!(ImGui::IsWindowFocused() || ImGui::IsItemVisible())) - current_hotkey = ""; -} - -bool Ui::HotKeyPressed(int *hotkey) -{ - return current_hotkey == "" && KeyPressed(hotkey[0]) && KeyPressed(hotkey[1]); -} - -std::string Ui::GetHotKeyNameString(int *hotkey) -{ - std::string text = key_names[hotkey[0] - 1]; - - if (hotkey[0] != hotkey[1]) - text += (" + " + key_names[hotkey[1] - 1]); - - return text; -} - - -bool Ui::ColorButton(int color_id, std::vector &color, ImVec2 size) -{ - bool rtn = false; - std::string label = "Color " + std::to_string(color_id); - - if (ImGui::ColorButton(label.c_str(), ImVec4(color[0], color[1], color[2], 1), 0, size)) - rtn = true; - - if (ImGui::IsItemHovered()) - { - ImDrawList *drawlist = ImGui::GetWindowDrawList(); - drawlist->AddRectFilled(ImGui::GetItemRectMin(), ImGui::GetItemRectMax(), ImGui::GetColorU32(ImGuiCol_ModalWindowDimBg)); - } - - return rtn; -} diff --git a/CheatMenu/Animation.cpp b/src/Animation.cpp similarity index 100% rename from CheatMenu/Animation.cpp rename to src/Animation.cpp diff --git a/CheatMenu/Animation.h b/src/Animation.h similarity index 100% rename from CheatMenu/Animation.h rename to src/Animation.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 index 0000000..b22ede3 --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,244 @@ +################################################################################ +# Source groups +################################################################################ +set(no_group_source_files + "Animation.cpp" + "Animation.h" + "CheatMenu.cpp" + "CheatMenu.h" + "CustomWidgets.cpp" + "CustomWidgets.h" + "Events.cpp" + "Events.h" + "external/imgui/imgui_impl_dx11.cpp" + "external/imgui/imgui_impl_dx11.h" + "external/imgui/stb_image.h" + "external/json.hpp" + "external/kiero/kiero.cpp" + "external/kiero/kiero.h" + "external/kiero/minhook/include/MinHook.h" + "external/moon/pool_object_extender.h" + "external/moon/texture_manager.cpp" + "external/moon/texture_manager.h" + "external/moon/vehicle_renderer.cpp" + "external/moon/vehicle_renderer.h" + "Game.cpp" + "Game.h" + "Hook.cpp" + "Hook.h" + "Json.cpp" + "Json.h" + "Menu.cpp" + "Menu.h" + "NeonAPI.cpp" + "NeonAPI.h" + "Paint.cpp" + "Paint.h" + "pch.cpp" + "pch.h" + "Ped.cpp" + "Ped.h" + "Player.cpp" + "Player.h" + "Teleport.cpp" + "Teleport.h" + "Ui.cpp" + "Ui.h" + "Util.cpp" + "Util.h" + "Vehicle.cpp" + "Vehicle.h" + "Visual.cpp" + "Visual.h" + "VKeys.h" + "Weapon.cpp" + "Weapon.h" +) +source_group("" FILES ${no_group_source_files}) + +set(external + "external/imgui/imconfig.h" + "external/imgui/imgui.cpp" + "external/imgui/imgui.h" + "external/imgui/imgui_demo.cpp" + "external/imgui/imgui_draw.cpp" + "external/imgui/imgui_impl_dx9.cpp" + "external/imgui/imgui_impl_dx9.h" + "external/imgui/imgui_impl_win32.cpp" + "external/imgui/imgui_impl_win32.h" + "external/imgui/imgui_internal.h" + "external/imgui/imgui_widgets.cpp" + "external/imgui/imstb_rectpack.h" + "external/imgui/imstb_textedit.h" + "external/imgui/imstb_truetype.h" +) +source_group("external" FILES ${external}) + +set(ALL_FILES + ${no_group_source_files} + ${external} +) + +################################################################################ +# Target +################################################################################ +add_library(${PROJECT_NAME} SHARED ${ALL_FILES}) + +add_precompiled_header(${PROJECT_NAME} "pch.h" "pch.cpp") + +string(CONCAT "MSVC_RUNTIME_LIBRARY_STR" + $<$: + MultiThreaded + > + $<$: + MultiThreadedDebug + > +) + +set_target_properties(${PROJECT_NAME} PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "F:/GTASanAndreas/$<0:>/" + SUFFIX ".asi" + MSVC_RUNTIME_LIBRARY ${MSVC_RUNTIME_LIBRARY_STR} +) + +################################################################################ +# Include directories +################################################################################ +include_directories( + "$ENV{PLUGIN_SDK_DIR}/plugin_sa" + "$ENV{PLUGIN_SDK_DIR}/plugin_sa/game_sa" + "$ENV{PLUGIN_SDK_DIR}/shared" + "$ENV{PLUGIN_SDK_DIR}/shared/game" + "$ENV{DIRECTX9_SDK_DIR}/include" +) + +################################################################################ +# Compile definitions +################################################################################ +target_compile_definitions(${PROJECT_NAME} PRIVATE + "$<$:" + "_NDEBUG" + ">" + "$<$:" + "_DEBUG" + ">" + "_CRT_SECURE_NO_WARNINGS;" + "_CRT_NON_CONFORMING_SWPRINTFS;" + "GTASA;" + "GTAGAME_NAME=\"San Andreas\";" + "GTAGAME_ABBR=\"SA\";" + "GTAGAME_ABBRLOW=\"sa\";" + "GTAGAME_PROTAGONISTNAME=\"CJ\";" + "GTAGAME_CITYNAME=\"San Andreas\";" + "_LA_SUPPORT;" + "_DX9_SDK_INSTALLED;" + "PLUGIN_SGV_10US;" + "_MBCS" +) + +################################################################################ +# Compile and link options +################################################################################ +if(MSVC) + target_compile_options(${PROJECT_NAME} PRIVATE + $<$: + /O2; + /Oi; + /Gy + > + $<$: + /Od + > + /std:c++latest; + /sdl-; + /W3; + ${DEFAULT_CXX_DEBUG_INFORMATION_FORMAT}; + ${DEFAULT_CXX_EXCEPTION_HANDLING} + /w44005 + ) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/imgui/imgui_impl_dx11.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/kiero/kiero.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/moon/texture_manager.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/moon/vehicle_renderer.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/imgui/imgui.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/imgui/imgui_demo.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/imgui/imgui_draw.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/imgui/imgui_impl_dx9.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/imgui/imgui_impl_win32.cpp ${FILE_CL_OPTIONS}) + string(CONCAT FILE_CL_OPTIONS + "/Y-" + ) + source_file_compile_options(external/imgui/imgui_widgets.cpp ${FILE_CL_OPTIONS}) + target_link_options(${PROJECT_NAME} PRIVATE + $<$: + /SAFESEH:NO; + /OPT:REF; + /LTCG; + /OPT:ICF + > + /DEBUG:FULL; + /SUBSYSTEM:WINDOWS + ) +endif() + +################################################################################ +# Pre build events +################################################################################ +add_custom_command_if( + TARGET ${PROJECT_NAME} + PRE_BUILD + COMMANDS + COMMAND $ taskkill /f /fi "imagename eq gta_sa.exe" + COMMAND $ taskkill /f /fi "imagename eq gta_sa.exe" +) + +################################################################################ +# Dependencies +################################################################################ +target_link_libraries(${PROJECT_NAME} PUBLIC +optimized plugin +optimized libMinHook-x86-v140-mt +optimized libMinHook-x86-v140-md +debug plugin_d +debug libMinHook-x86-v140-mtd +debug libMinHook-x86-v140-mdd +d3d9 +d3dx9 +d3d11 +d3dx11 +XInput9_1_0 +) + +target_link_directories(${PROJECT_NAME} PUBLIC + "$ENV{PLUGIN_SDK_DIR}/output/lib/" + "$ENV{DIRECTX9_SDK_DIR}/lib/x86/" + "external/kiero/minhook/lib/" +) + diff --git a/CheatMenu/CheatMenu.cpp b/src/CheatMenu.cpp similarity index 100% rename from CheatMenu/CheatMenu.cpp rename to src/CheatMenu.cpp diff --git a/CheatMenu/CheatMenu.h b/src/CheatMenu.h similarity index 100% rename from CheatMenu/CheatMenu.h rename to src/CheatMenu.h diff --git a/CheatMenu/CustomWidgets.cpp b/src/CustomWidgets.cpp similarity index 100% rename from CheatMenu/CustomWidgets.cpp rename to src/CustomWidgets.cpp diff --git a/CheatMenu/CustomWidgets.h b/src/CustomWidgets.h similarity index 100% rename from CheatMenu/CustomWidgets.h rename to src/CustomWidgets.h diff --git a/CheatMenu/Events.cpp b/src/Events.cpp similarity index 100% rename from CheatMenu/Events.cpp rename to src/Events.cpp diff --git a/CheatMenu/Events.h b/src/Events.h similarity index 100% rename from CheatMenu/Events.h rename to src/Events.h diff --git a/CheatMenu/Game.cpp b/src/Game.cpp similarity index 100% rename from CheatMenu/Game.cpp rename to src/Game.cpp diff --git a/CheatMenu/Game.h b/src/Game.h similarity index 100% rename from CheatMenu/Game.h rename to src/Game.h diff --git a/CheatMenu/Hook.cpp b/src/Hook.cpp similarity index 100% rename from CheatMenu/Hook.cpp rename to src/Hook.cpp diff --git a/CheatMenu/Hook.h b/src/Hook.h similarity index 100% rename from CheatMenu/Hook.h rename to src/Hook.h diff --git a/CheatMenu/Json.cpp b/src/Json.cpp similarity index 100% rename from CheatMenu/Json.cpp rename to src/Json.cpp diff --git a/CheatMenu/Json.h b/src/Json.h similarity index 100% rename from CheatMenu/Json.h rename to src/Json.h diff --git a/CheatMenu/Menu.cpp b/src/Menu.cpp similarity index 100% rename from CheatMenu/Menu.cpp rename to src/Menu.cpp diff --git a/CheatMenu/Menu.h b/src/Menu.h similarity index 100% rename from CheatMenu/Menu.h rename to src/Menu.h diff --git a/CheatMenu/NeonAPI.cpp b/src/NeonAPI.cpp similarity index 100% rename from CheatMenu/NeonAPI.cpp rename to src/NeonAPI.cpp diff --git a/CheatMenu/NeonAPI.h b/src/NeonAPI.h similarity index 100% rename from CheatMenu/NeonAPI.h rename to src/NeonAPI.h diff --git a/CheatMenu/Paint.cpp b/src/Paint.cpp similarity index 100% rename from CheatMenu/Paint.cpp rename to src/Paint.cpp diff --git a/CheatMenu/Paint.h b/src/Paint.h similarity index 100% rename from CheatMenu/Paint.h rename to src/Paint.h diff --git a/CheatMenu/Ped.cpp b/src/Ped.cpp similarity index 100% rename from CheatMenu/Ped.cpp rename to src/Ped.cpp diff --git a/CheatMenu/Ped.h b/src/Ped.h similarity index 100% rename from CheatMenu/Ped.h rename to src/Ped.h diff --git a/CheatMenu/Player.cpp b/src/Player.cpp similarity index 100% rename from CheatMenu/Player.cpp rename to src/Player.cpp diff --git a/CheatMenu/Player.h b/src/Player.h similarity index 100% rename from CheatMenu/Player.h rename to src/Player.h diff --git a/CheatMenu/Teleport.cpp b/src/Teleport.cpp similarity index 100% rename from CheatMenu/Teleport.cpp rename to src/Teleport.cpp diff --git a/CheatMenu/Teleport.h b/src/Teleport.h similarity index 100% rename from CheatMenu/Teleport.h rename to src/Teleport.h diff --git a/CheatMenu/Ui.h b/src/Ui.h similarity index 100% rename from CheatMenu/Ui.h rename to src/Ui.h diff --git a/CheatMenu/Util.cpp b/src/Util.cpp similarity index 100% rename from CheatMenu/Util.cpp rename to src/Util.cpp diff --git a/CheatMenu/Util.h b/src/Util.h similarity index 100% rename from CheatMenu/Util.h rename to src/Util.h diff --git a/CheatMenu/VKeys.h b/src/VKeys.h similarity index 100% rename from CheatMenu/VKeys.h rename to src/VKeys.h diff --git a/CheatMenu/Vehicle.cpp b/src/Vehicle.cpp similarity index 100% rename from CheatMenu/Vehicle.cpp rename to src/Vehicle.cpp diff --git a/CheatMenu/Vehicle.h b/src/Vehicle.h similarity index 100% rename from CheatMenu/Vehicle.h rename to src/Vehicle.h diff --git a/CheatMenu/Visual.cpp b/src/Visual.cpp similarity index 100% rename from CheatMenu/Visual.cpp rename to src/Visual.cpp diff --git a/CheatMenu/Visual.h b/src/Visual.h similarity index 100% rename from CheatMenu/Visual.h rename to src/Visual.h diff --git a/CheatMenu/Weapon.cpp b/src/Weapon.cpp similarity index 100% rename from CheatMenu/Weapon.cpp rename to src/Weapon.cpp diff --git a/CheatMenu/Weapon.h b/src/Weapon.h similarity index 100% rename from CheatMenu/Weapon.h rename to src/Weapon.h diff --git a/CheatMenu/external/imgui/imconfig.h b/src/external/imgui/imconfig.h similarity index 100% rename from CheatMenu/external/imgui/imconfig.h rename to src/external/imgui/imconfig.h diff --git a/CheatMenu/external/imgui/imgui.cpp b/src/external/imgui/imgui.cpp similarity index 100% rename from CheatMenu/external/imgui/imgui.cpp rename to src/external/imgui/imgui.cpp diff --git a/CheatMenu/external/imgui/imgui.h b/src/external/imgui/imgui.h similarity index 100% rename from CheatMenu/external/imgui/imgui.h rename to src/external/imgui/imgui.h diff --git a/CheatMenu/external/imgui/imgui_demo.cpp b/src/external/imgui/imgui_demo.cpp similarity index 100% rename from CheatMenu/external/imgui/imgui_demo.cpp rename to src/external/imgui/imgui_demo.cpp diff --git a/CheatMenu/external/imgui/imgui_draw.cpp b/src/external/imgui/imgui_draw.cpp similarity index 100% rename from CheatMenu/external/imgui/imgui_draw.cpp rename to src/external/imgui/imgui_draw.cpp diff --git a/CheatMenu/external/imgui/imgui_impl_dx11.cpp b/src/external/imgui/imgui_impl_dx11.cpp similarity index 100% rename from CheatMenu/external/imgui/imgui_impl_dx11.cpp rename to src/external/imgui/imgui_impl_dx11.cpp diff --git a/CheatMenu/external/imgui/imgui_impl_dx11.h b/src/external/imgui/imgui_impl_dx11.h similarity index 100% rename from CheatMenu/external/imgui/imgui_impl_dx11.h rename to src/external/imgui/imgui_impl_dx11.h diff --git a/CheatMenu/external/imgui/imgui_impl_dx9.cpp b/src/external/imgui/imgui_impl_dx9.cpp similarity index 100% rename from CheatMenu/external/imgui/imgui_impl_dx9.cpp rename to src/external/imgui/imgui_impl_dx9.cpp diff --git a/CheatMenu/external/imgui/imgui_impl_dx9.h b/src/external/imgui/imgui_impl_dx9.h similarity index 100% rename from CheatMenu/external/imgui/imgui_impl_dx9.h rename to src/external/imgui/imgui_impl_dx9.h diff --git a/CheatMenu/external/imgui/imgui_impl_win32.cpp b/src/external/imgui/imgui_impl_win32.cpp similarity index 100% rename from CheatMenu/external/imgui/imgui_impl_win32.cpp rename to src/external/imgui/imgui_impl_win32.cpp diff --git a/CheatMenu/external/imgui/imgui_impl_win32.h b/src/external/imgui/imgui_impl_win32.h similarity index 100% rename from CheatMenu/external/imgui/imgui_impl_win32.h rename to src/external/imgui/imgui_impl_win32.h diff --git a/CheatMenu/external/imgui/imgui_internal.h b/src/external/imgui/imgui_internal.h similarity index 100% rename from CheatMenu/external/imgui/imgui_internal.h rename to src/external/imgui/imgui_internal.h diff --git a/CheatMenu/external/imgui/imgui_widgets.cpp b/src/external/imgui/imgui_widgets.cpp similarity index 100% rename from CheatMenu/external/imgui/imgui_widgets.cpp rename to src/external/imgui/imgui_widgets.cpp diff --git a/CheatMenu/external/imgui/imstb_rectpack.h b/src/external/imgui/imstb_rectpack.h similarity index 100% rename from CheatMenu/external/imgui/imstb_rectpack.h rename to src/external/imgui/imstb_rectpack.h diff --git a/CheatMenu/external/imgui/imstb_textedit.h b/src/external/imgui/imstb_textedit.h similarity index 100% rename from CheatMenu/external/imgui/imstb_textedit.h rename to src/external/imgui/imstb_textedit.h diff --git a/CheatMenu/external/imgui/imstb_truetype.h b/src/external/imgui/imstb_truetype.h similarity index 100% rename from CheatMenu/external/imgui/imstb_truetype.h rename to src/external/imgui/imstb_truetype.h diff --git a/CheatMenu/external/imgui/stb_image.h b/src/external/imgui/stb_image.h similarity index 100% rename from CheatMenu/external/imgui/stb_image.h rename to src/external/imgui/stb_image.h diff --git a/CheatMenu/external/json.hpp b/src/external/json.hpp similarity index 100% rename from CheatMenu/external/json.hpp rename to src/external/json.hpp diff --git a/CheatMenu/external/kiero/kiero.cpp b/src/external/kiero/kiero.cpp similarity index 100% rename from CheatMenu/external/kiero/kiero.cpp rename to src/external/kiero/kiero.cpp diff --git a/CheatMenu/external/kiero/kiero.h b/src/external/kiero/kiero.h similarity index 100% rename from CheatMenu/external/kiero/kiero.h rename to src/external/kiero/kiero.h diff --git a/CheatMenu/external/kiero/minhook/include/MinHook.h b/src/external/kiero/minhook/include/MinHook.h similarity index 100% rename from CheatMenu/external/kiero/minhook/include/MinHook.h rename to src/external/kiero/minhook/include/MinHook.h diff --git a/CheatMenu/external/moon/pool_object_extender.h b/src/external/moon/pool_object_extender.h similarity index 100% rename from CheatMenu/external/moon/pool_object_extender.h rename to src/external/moon/pool_object_extender.h diff --git a/CheatMenu/external/moon/texture_manager.cpp b/src/external/moon/texture_manager.cpp similarity index 100% rename from CheatMenu/external/moon/texture_manager.cpp rename to src/external/moon/texture_manager.cpp diff --git a/CheatMenu/external/moon/texture_manager.h b/src/external/moon/texture_manager.h similarity index 100% rename from CheatMenu/external/moon/texture_manager.h rename to src/external/moon/texture_manager.h diff --git a/CheatMenu/external/moon/vehicle_renderer.cpp b/src/external/moon/vehicle_renderer.cpp similarity index 100% rename from CheatMenu/external/moon/vehicle_renderer.cpp rename to src/external/moon/vehicle_renderer.cpp diff --git a/CheatMenu/external/moon/vehicle_renderer.h b/src/external/moon/vehicle_renderer.h similarity index 100% rename from CheatMenu/external/moon/vehicle_renderer.h rename to src/external/moon/vehicle_renderer.h diff --git a/CheatMenu/pch.cpp b/src/pch.cpp similarity index 100% rename from CheatMenu/pch.cpp rename to src/pch.cpp diff --git a/CheatMenu/pch.h b/src/pch.h similarity index 97% rename from CheatMenu/pch.h rename to src/pch.h index 108d0da..2102b54 100644 --- a/CheatMenu/pch.h +++ b/src/pch.h @@ -1,5 +1,5 @@ #pragma once -#pragma warning(disable:4503 4244) +#pragma warning(disable:4503 4244 4005) #define INPUT_BUFFER_SIZE 64 #define SPAWN_PED_LIMIT 20