Fixed release config
This commit is contained in:
parent
79040ef9c1
commit
e458cbc95e
14
.vscode/launch.json
vendored
Normal file
14
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach",
|
||||
"type": "cppvsdbg",
|
||||
"request": "attach",
|
||||
"processId": "${command:pickProcess}"
|
||||
}
|
||||
]
|
||||
}
|
59
.vscode/settings.json
vendored
59
.vscode/settings.json
vendored
@ -6,6 +6,63 @@
|
||||
"filesystem": "cpp",
|
||||
"xlocale": "cpp",
|
||||
"xstring": "cpp",
|
||||
"xutility": "cpp"
|
||||
"xutility": "cpp",
|
||||
"ostream": "cpp",
|
||||
"algorithm": "cpp",
|
||||
"array": "cpp",
|
||||
"cctype": "cpp",
|
||||
"chrono": "cpp",
|
||||
"clocale": "cpp",
|
||||
"cmath": "cpp",
|
||||
"codecvt": "cpp",
|
||||
"cstddef": "cpp",
|
||||
"cstdint": "cpp",
|
||||
"cstdio": "cpp",
|
||||
"cstdlib": "cpp",
|
||||
"cstring": "cpp",
|
||||
"ctime": "cpp",
|
||||
"cwchar": "cpp",
|
||||
"exception": "cpp",
|
||||
"forward_list": "cpp",
|
||||
"fstream": "cpp",
|
||||
"functional": "cpp",
|
||||
"initializer_list": "cpp",
|
||||
"ios": "cpp",
|
||||
"istream": "cpp",
|
||||
"iterator": "cpp",
|
||||
"limits": "cpp",
|
||||
"list": "cpp",
|
||||
"locale": "cpp",
|
||||
"map": "cpp",
|
||||
"memory": "cpp",
|
||||
"new": "cpp",
|
||||
"numeric": "cpp",
|
||||
"ratio": "cpp",
|
||||
"sstream": "cpp",
|
||||
"stdexcept": "cpp",
|
||||
"streambuf": "cpp",
|
||||
"string": "cpp",
|
||||
"system_error": "cpp",
|
||||
"tuple": "cpp",
|
||||
"type_traits": "cpp",
|
||||
"typeinfo": "cpp",
|
||||
"unordered_map": "cpp",
|
||||
"utility": "cpp",
|
||||
"valarray": "cpp",
|
||||
"vector": "cpp",
|
||||
"xfacet": "cpp",
|
||||
"xfunctional": "cpp",
|
||||
"xhash": "cpp",
|
||||
"xiosbase": "cpp",
|
||||
"xlocinfo": "cpp",
|
||||
"xlocmes": "cpp",
|
||||
"xlocmon": "cpp",
|
||||
"xlocnum": "cpp",
|
||||
"xloctime": "cpp",
|
||||
"xmemory": "cpp",
|
||||
"xmemory0": "cpp",
|
||||
"xstddef": "cpp",
|
||||
"xtr1common": "cpp",
|
||||
"xtree": "cpp"
|
||||
}
|
||||
}
|
@ -116,10 +116,10 @@ include_directories(
|
||||
# Compile definitions
|
||||
################################################################################
|
||||
target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
"$<$<CONFIG:GTASARelease>:"
|
||||
"$<$<CONFIG:Release>:"
|
||||
"_NDEBUG"
|
||||
">"
|
||||
"$<$<CONFIG:GTASAzDebug>:"
|
||||
"$<$<CONFIG:Debug>:"
|
||||
"_DEBUG"
|
||||
">"
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
@ -141,12 +141,12 @@ target_compile_definitions(${PROJECT_NAME} PRIVATE
|
||||
################################################################################
|
||||
if(MSVC)
|
||||
target_compile_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:GTASARelease>:
|
||||
$<$<CONFIG:Release>:
|
||||
/O2;
|
||||
/Oi;
|
||||
/Gy
|
||||
>
|
||||
$<$<CONFIG:GTASAzDebug>:
|
||||
$<$<CONFIG:Debug>:
|
||||
/Od
|
||||
>
|
||||
/std:c++latest;
|
||||
@ -197,13 +197,15 @@ if(MSVC)
|
||||
)
|
||||
source_file_compile_options(external/imgui/imgui_widgets.cpp ${FILE_CL_OPTIONS})
|
||||
target_link_options(${PROJECT_NAME} PRIVATE
|
||||
$<$<CONFIG:GTASARelease>:
|
||||
$<$<CONFIG:Release>:
|
||||
/SAFESEH:NO;
|
||||
/OPT:REF;
|
||||
/LTCG;
|
||||
/OPT:ICF
|
||||
>
|
||||
/DEBUG:FULL;
|
||||
$<$<CONFIG:Debug>:
|
||||
/DEBUG:FULL;
|
||||
>
|
||||
/SUBSYSTEM:WINDOWS
|
||||
)
|
||||
endif()
|
||||
@ -215,8 +217,8 @@ add_custom_command_if(
|
||||
TARGET ${PROJECT_NAME}
|
||||
PRE_BUILD
|
||||
COMMANDS
|
||||
COMMAND $<CONFIG:GTASARelease> taskkill /f /fi "imagename eq gta_sa.exe"
|
||||
COMMAND $<CONFIG:GTASAzDebug> taskkill /f /fi "imagename eq gta_sa.exe"
|
||||
COMMAND $<CONFIG:Release> taskkill /f /fi "imagename eq gta_sa.exe"
|
||||
COMMAND $<CONFIG:Debug> taskkill /f /fi "imagename eq gta_sa.exe"
|
||||
)
|
||||
|
||||
################################################################################
|
||||
|
@ -51,11 +51,11 @@ CheatMenu::CheatMenu()
|
||||
Globals::menu_size.x = config.GetValue<float>("window.sizeX", screen::GetScreenWidth() / 4.0f);
|
||||
Globals::menu_size.y = config.GetValue<float>("window.sizeY", screen::GetScreenHeight() / 1.2f);
|
||||
srand(CTimer::m_snTimeInMilliseconds);
|
||||
|
||||
};
|
||||
|
||||
Events::processScriptsEvent += [this]
|
||||
{
|
||||
|
||||
if (Globals::init_done && !FrontEndMenuManager.m_bMenuActive && CTimer::m_snTimeInMilliseconds - Globals::last_key_timer > 250)
|
||||
{
|
||||
if (Ui::HotKeyPressed(hotkey::menu_open))
|
||||
|
20
src/Hook.cpp
20
src/Hook.cpp
@ -68,12 +68,10 @@ HRESULT Hook::PresentDx9(IDirect3DDevice9 *pDevice, RECT* pSourceRect, RECT* pDe
|
||||
ImGui::EndFrame();
|
||||
ImGui::Render();
|
||||
ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Globals::init_done = true;
|
||||
|
||||
ImGui::CreateContext();
|
||||
|
||||
ImGuiStyle& style = ImGui::GetStyle();
|
||||
@ -189,19 +187,23 @@ Hook::Hook()
|
||||
{
|
||||
if (kiero::init(kiero::RenderType::D3D9) == kiero::Status::Success)
|
||||
{
|
||||
assert(kiero::bind(16, (void**)&oReset9, ResetDx9) == kiero::Status::Success);
|
||||
assert(kiero::bind(17, (void**)&oPresent9, PresentDx9) == kiero::Status::Success);
|
||||
Globals::renderer = Render_DirectX9;
|
||||
|
||||
flog << "Successfully hooked dx9 device." << std::endl;
|
||||
if (kiero::bind(16, (void**)&oReset9, ResetDx9) == kiero::Status::Success
|
||||
&& kiero::bind(17, (void**)&oPresent9, PresentDx9) == kiero::Status::Success)
|
||||
{
|
||||
Globals::renderer = Render_DirectX9;
|
||||
flog << "Successfully hooked dx9 device." << std::endl;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// gtaRenderHook
|
||||
if (kiero::init(kiero::RenderType::D3D11) == kiero::Status::Success)
|
||||
{
|
||||
kiero::bind(8, (void**)&oPresent11, PresentDx11);
|
||||
Globals::renderer = Render_DirectX11;
|
||||
if (kiero::bind(8, (void**)&oPresent11, PresentDx11) == kiero::Status::Success)
|
||||
{
|
||||
Globals::renderer = Render_DirectX11;
|
||||
flog << "Successfully hooked dx11 device." << std::endl;
|
||||
}
|
||||
|
||||
flog << "Successfully hooked dx11 device." << std::endl;
|
||||
}
|
||||
|
@ -49,7 +49,6 @@ Ped::~Ped()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Ped::SpawnPed(std::string& model)
|
||||
{
|
||||
if (spawn_ped::list.size() == SPAWN_PED_LIMIT)
|
||||
|
Loading…
Reference in New Issue
Block a user