diff --git a/resource/common/locale/English.json b/resource/common/locale/English.json index cc09c73..0fcaca1 100644 --- a/resource/common/locale/English.json +++ b/resource/common/locale/English.json @@ -128,6 +128,10 @@ "FlipVehKey": "Flip current vehicle", "Frames": "Frames: %d", "FreecamKey": "Toggle freecam", + "FreecamBackwardKey": "Freecam backward", + "FreecamForwardKey": "Freecam forward", + "FreecamLeftKey": "Freecam left", + "FreecamRightKey": "Freecam right", "GitHubRepo": "GitHub repo", "GodModeKey": "Toggle god mode", "Hotkeys": "Hotkeys", diff --git a/src/game.cpp b/src/game.cpp index 88ce254..13b93c7 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -321,9 +321,9 @@ void Game::FreeCam() speed *= 2; } - if (KeyPressed(VK_KEY_I) || KeyPressed(VK_KEY_K)) + if (freeCamForward.Pressed() || freeCamBackward.Pressed()) { - if (KeyPressed(VK_KEY_K)) + if (freeCamForward.Pressed()) { speed *= -1; } @@ -335,9 +335,9 @@ void Game::FreeCam() pos.z += speed * 2 * sin(m_Freecam::m_fTotalMouse.y / 3 * 3.14159f / 180.0f); } - if (KeyPressed(VK_KEY_J) || KeyPressed(VK_KEY_L)) + if (freeCamLeft.Pressed() || freeCamRight.Pressed()) { - if (KeyPressed(VK_KEY_J)) + if (freeCamLeft.Pressed()) { speed *= -1; } diff --git a/src/menu.cpp b/src/menu.cpp index 2a7dabe..1bd9459 100644 --- a/src/menu.cpp +++ b/src/menu.cpp @@ -41,6 +41,18 @@ void Menu::Init() freeCam.m_key1 = gConfig.GetValue("hotkey.freecam.key1", VK_F6); freeCam.m_key2 = gConfig.GetValue("hotkey.freecam.key2", VK_F6); + freeCamForward.m_key1 = gConfig.GetValue("hotkey.freeCamForward.key1", VK_KEY_I); + freeCamForward.m_key2 = gConfig.GetValue("hotkey.freeCamForward.key2", VK_KEY_I); + + freeCamBackward.m_key1 = gConfig.GetValue("hotkey.freeCamBackward.key1", VK_KEY_K); + freeCamBackward.m_key2 = gConfig.GetValue("hotkey.freeCamBackward.key2", VK_KEY_K); + + freeCamLeft.m_key1 = gConfig.GetValue("hotkey.freeCamLeft.key1", VK_KEY_J); + freeCamLeft.m_key2 = gConfig.GetValue("hotkey.freeCamLeft.key2", VK_KEY_J); + + freeCamRight.m_key1 = gConfig.GetValue("hotkey.freeCamRight.key1", VK_KEY_L); + freeCamRight.m_key2 = gConfig.GetValue("hotkey.freeCamRight.key2", VK_KEY_L); + quickSceenShot.m_key1 = gConfig.GetValue("hotkey.quick_screenshot.key1", VK_F5); quickSceenShot.m_key2 = gConfig.GetValue("hotkey.quick_screenshot.key2", VK_F5); @@ -515,6 +527,26 @@ void Menu::ShowPage() gConfig.SetValue("hotkey.freecam.key1", freeCam.m_key1); gConfig.SetValue("hotkey.freecam.key2", freeCam.m_key2); } + if (freeCamForward.DrawUI(TEXT("Menu.FreecamForwardKey"))) + { + gConfig.SetValue("hotkey.freeCamForward.key1", freeCamForward.m_key1); + gConfig.SetValue("hotkey.freeCamForward.key2", freeCamForward.m_key2); + } + if (freeCamBackward.DrawUI(TEXT("Menu.FreecamBackwardKey"))) + { + gConfig.SetValue("hotkey.freeCamBackward.key1", freeCamBackward.m_key1); + gConfig.SetValue("hotkey.freeCamBackward.key2", freeCamBackward.m_key2); + } + if (freeCamLeft.DrawUI(TEXT("Menu.FreecamLeftKey"))) + { + gConfig.SetValue("hotkey.freeCamLeft.key1", freeCamLeft.m_key1); + gConfig.SetValue("hotkey.freeCamLeft.key2", freeCamLeft.m_key2); + } + if (freeCamRight.DrawUI(TEXT("Menu.FreecamRightKey"))) + { + gConfig.SetValue("hotkey.freeCamRight.key1", freeCamRight.m_key1); + gConfig.SetValue("hotkey.freeCamRight.key2", freeCamRight.m_key2); + } if (quickTeleport.DrawUI(TEXT("Menu.QuickTPKey"))) { gConfig.SetValue("hotkey.quick_tp.key1", quickTeleport.m_key1); diff --git a/src/pch.cpp b/src/pch.cpp index d66faee..68d705a 100644 --- a/src/pch.cpp +++ b/src/pch.cpp @@ -5,6 +5,10 @@ CJson gConfig = CJson("config"); Hotkey aimSkinChanger; Hotkey freeCam; +Hotkey freeCamForward; +Hotkey freeCamBackward; +Hotkey freeCamLeft; +Hotkey freeCamRight; Hotkey commandWindow; Hotkey fixVeh; Hotkey flipVeh; diff --git a/src/pch.h b/src/pch.h index 7334505..24d1d93 100644 --- a/src/pch.h +++ b/src/pch.h @@ -110,6 +110,10 @@ static void SetHelpMessage(const char *message, bool b1 = false, bool b2 = false extern Hotkey aimSkinChanger; extern Hotkey freeCam; +extern Hotkey freeCamForward; +extern Hotkey freeCamBackward; +extern Hotkey freeCamLeft; +extern Hotkey freeCamRight; extern Hotkey commandWindow; extern Hotkey fixVeh; extern Hotkey flipVeh; diff --git a/src/version.h b/src/version.h index d2a817c..97a287a 100644 --- a/src/version.h +++ b/src/version.h @@ -2,5 +2,5 @@ #define MENU_NAME "Cheat Menu" #define MENU_VERSION_NUMBER "3.3" #define MENU_VERSION MENU_VERSION_NUMBER"-beta" -#define BUILD_NUMBER "20220523" +#define BUILD_NUMBER "20220606" #define MENU_TITLE MENU_NAME " v" MENU_VERSION diff --git a/tools/Setup.bat b/tools/Setup.bat index 0963e9b..bfe6054 100644 --- a/tools/Setup.bat +++ b/tools/Setup.bat @@ -2,9 +2,9 @@ rem Generate visual studio files and run the devcmd init @echo off rem Set game paths below -set "SA_DIR="F:\GTASanAndreas"" -set "VC_DIR="E:\GTA Vice City"" -set "III_DIR="E:\GTA3"" +set "SA_DIR="E:\GTASanAndreas"" +set "VC_DIR="F:\GTA Vice City"" +set "III_DIR="F:\GTA3"" cd tools premake5.exe vs2022 diff --git a/tools/premake5.lua b/tools/premake5.lua index 27c75a7..d58d2fd 100644 --- a/tools/premake5.lua +++ b/tools/premake5.lua @@ -7,10 +7,10 @@ ---------------------------- -- Should get picked up automatically if you installed them properly PSDK_DIR = os.getenv("PLUGIN_SDK_DIR") -DX9SDK_DIR = os.getenv("DIRECTX9_SDK_DIR") +DX9SDK_DIR = os.getenv("DXSDK_DIR") if (DX9SDK_DIR == nil) then - error("DIRECTX9_SDK_DIR environment variable not set") + error("DXSDK_DIR environment variable not set") end if (PSDK_DIR == nil) then