From 526fe2651acd113d3f042f6c8a771f2f7065236e Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Sat, 6 May 2023 18:32:44 -0400 Subject: [PATCH] clean up files --- CMakeLists.txt | 4 -- cmake/FindSpdlog.cmake | 4 ++ src/red4ext/Addresses.hpp | 96 ++++++++++++------------- src/red4ext/CMakeLists.txt | 34 --------- src/red4ext/ctd_helper.filters | 6 -- src/red4ext/ctd_helper.sln | 25 ------- src/red4ext/ctd_helper.vcxproj | 126 --------------------------------- src/red4ext/versioninfo.rc | 42 ----------- tools/build.bat | 9 --- tools/install.bat | 1 - tools/lint.bat | 2 - tools/lint_installed.bat | 1 - tools/pack.bat | 3 - 13 files changed, 52 insertions(+), 301 deletions(-) delete mode 100644 src/red4ext/CMakeLists.txt delete mode 100644 src/red4ext/ctd_helper.filters delete mode 100644 src/red4ext/ctd_helper.sln delete mode 100644 src/red4ext/ctd_helper.vcxproj delete mode 100644 src/red4ext/versioninfo.rc delete mode 100644 tools/build.bat delete mode 100644 tools/install.bat delete mode 100644 tools/lint.bat delete mode 100644 tools/lint_installed.bat delete mode 100644 tools/pack.bat diff --git a/CMakeLists.txt b/CMakeLists.txt index ed7bcc5..b694d98 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,11 +29,7 @@ find_package(Spdlog) target_link_libraries(${MOD_SLUG}.dll PUBLIC Detours - FMOD spdlog - RedLib - PhysX3 - input_loader.dll ) configure_folder_file(readme.md) diff --git a/cmake/FindSpdlog.cmake b/cmake/FindSpdlog.cmake index 0c45151..3c0c2ad 100644 --- a/cmake/FindSpdlog.cmake +++ b/cmake/FindSpdlog.cmake @@ -9,6 +9,10 @@ option(SPDLOG_WCHAR_SUPPORT "" ON) add_subdirectory(deps/spdlog) set_target_properties(spdlog PROPERTIES FOLDER "Dependencies") +target_compile_definitions(spdlog PUBLIC +_ITERATOR_DEBUG_LEVEL=0 +) + mark_as_advanced( SPDLOG_BUILD_ALL SPDLOG_BUILD_BENCH diff --git a/src/red4ext/Addresses.hpp b/src/red4ext/Addresses.hpp index 2b904fd..a9baedb 100644 --- a/src/red4ext/Addresses.hpp +++ b/src/red4ext/Addresses.hpp @@ -4,75 +4,75 @@ #define ZOLTAN_EXPAND_THEN_STRINGISE(N) ZOLTAN_STRINGISE(N) #define __LINE_STR__ ZOLTAN_EXPAND_THEN_STRINGISE(__LINE__) -#ifndef CallFunc_Addr -#define CallFunc_Addr 0x288640 +#ifndef CallFunc_Addr + #define CallFunc_Addr 0x288640 #endif -#ifndef CrashFunc_Addr -#define CrashFunc_Addr 0x2BD0680 +#ifndef CrashFunc_Addr + #define CrashFunc_Addr 0x2BD0680 #endif -#ifndef DebugPrint_Addr -#define DebugPrint_Addr 0xA97C60 +#ifndef DebugPrint_Addr + #define DebugPrint_Addr 0xA97C60 #endif -#ifndef BaseStream_ReadWriteHandleID_Addr -#define BaseStream_ReadWriteHandleID_Addr 0x720670 +#ifndef BaseStream_ReadWriteHandleID_Addr + #define BaseStream_ReadWriteHandleID_Addr 0x720670 #endif -#ifndef CBaseRTTIType_VFT_Addr -#define CBaseRTTIType_VFT_Addr 0x311F4D0 +#ifndef CBaseRTTIType_VFT_Addr + #define CBaseRTTIType_VFT_Addr 0x311F4D0 #endif -#ifndef CClass_AddEventCallbackType_Addr -#define CClass_AddEventCallbackType_Addr 0x2034E0 +#ifndef CClass_AddEventCallbackType_Addr + #define CClass_AddEventCallbackType_Addr 0x2034E0 #endif -#ifndef CClass_ApplyFlags_Addr -#define CClass_ApplyFlags_Addr 0x206EF0 +#ifndef CClass_ApplyFlags_Addr + #define CClass_ApplyFlags_Addr 0x206EF0 #endif -#ifndef CClass_SetupScriptCallbacks_Addr -#define CClass_SetupScriptCallbacks_Addr 0x2035C0 +#ifndef CClass_SetupScriptCallbacks_Addr + #define CClass_SetupScriptCallbacks_Addr 0x2035C0 #endif -#ifndef CClass_VFT_Addr -#define CClass_VFT_Addr 0x311F2C0 +#ifndef CClass_VFT_Addr + #define CClass_VFT_Addr 0x311F2C0 #endif -#ifndef CGameFramework_Systems_120_128_130_Addr -#define CGameFramework_Systems_120_128_130_Addr 0x13B3860 +#ifndef CGameFramework_Systems_120_128_130_Addr + #define CGameFramework_Systems_120_128_130_Addr 0x13B3860 #endif -#ifndef IGameInstance_RegisterGameLoadCallbacks_Addr -#define IGameInstance_RegisterGameLoadCallbacks_Addr 0x2D9AFD0 +#ifndef IGameInstance_RegisterGameLoadCallbacks_Addr + #define IGameInstance_RegisterGameLoadCallbacks_Addr 0x2D9AFD0 #endif -#ifndef IGameInstance_RegisterStreamingWorldLoadedCallback_Addr -#define IGameInstance_RegisterStreamingWorldLoadedCallback_Addr 0x2D9B4F0 +#ifndef IGameInstance_RegisterStreamingWorldLoadedCallback_Addr + #define IGameInstance_RegisterStreamingWorldLoadedCallback_Addr 0x2D9B4F0 #endif -#ifndef IGameInstance_Systems158_Addr -#define IGameInstance_Systems158_Addr 0x2D9B460 +#ifndef IGameInstance_Systems158_Addr + #define IGameInstance_Systems158_Addr 0x2D9B460 #endif -#ifndef IGameInstance_Systems160_Addr -#define IGameInstance_Systems160_Addr 0x2D9B420 +#ifndef IGameInstance_Systems160_Addr + #define IGameInstance_Systems160_Addr 0x2D9B420 #endif -#ifndef IGameInstance_Systems168o170_Addr -#define IGameInstance_Systems168o170_Addr 0x2D9BAF0 +#ifndef IGameInstance_Systems168o170_Addr + #define IGameInstance_Systems168o170_Addr 0x2D9BAF0 #endif -#ifndef IGameInstance_Systems178_Addr -#define IGameInstance_Systems178_Addr 0x2D9AE20 +#ifndef IGameInstance_Systems178_Addr + #define IGameInstance_Systems178_Addr 0x2D9AE20 #endif -#ifndef IGameInstance_WorldDetached_Addr -#define IGameInstance_WorldDetached_Addr 0x2D9AD90 +#ifndef IGameInstance_WorldDetached_Addr + #define IGameInstance_WorldDetached_Addr 0x2D9AD90 #endif -#ifndef IGameInstance_WorldPendingDetach_Addr -#define IGameInstance_WorldPendingDetach_Addr 0x2D9B790 +#ifndef IGameInstance_WorldPendingDetach_Addr + #define IGameInstance_WorldPendingDetach_Addr 0x2D9B790 #endif -#ifndef ISerializable_SetOwner_Addr -#define ISerializable_SetOwner_Addr 0x1BA2A0 +#ifndef ISerializable_SetOwner_Addr + #define ISerializable_SetOwner_Addr 0x1BA2A0 #endif -#ifndef ISerializable_VFT_Addr -#define ISerializable_VFT_Addr 0x31179A8 +#ifndef ISerializable_VFT_Addr + #define ISerializable_VFT_Addr 0x31179A8 #endif -#ifndef ScriptHost_Get_Addr -#define ScriptHost_Get_Addr 0x275ED0 +#ifndef ScriptHost_Get_Addr + #define ScriptHost_Get_Addr 0x275ED0 #endif -#ifndef ScriptHost_VFT_Addr -#define ScriptHost_VFT_Addr 0x3127DC0 +#ifndef ScriptHost_VFT_Addr + #define ScriptHost_VFT_Addr 0x3127DC0 #endif -#ifndef ShowMessageBox_Addr -#define ShowMessageBox_Addr 0xA7FB40 +#ifndef ShowMessageBox_Addr + #define ShowMessageBox_Addr 0xA7FB40 #endif -#ifndef sub_142B90C60_Addr -#define sub_142B90C60_Addr 0x2BCD3F0 +#ifndef sub_142B90C60_Addr + #define sub_142B90C60_Addr 0x2BCD3F0 #endif diff --git a/src/red4ext/CMakeLists.txt b/src/red4ext/CMakeLists.txt deleted file mode 100644 index a27f840..0000000 --- a/src/red4ext/CMakeLists.txt +++ /dev/null @@ -1,34 +0,0 @@ -add_library(${CMAKE_PROJECT_NAME}.dll SHARED) - -set_target_properties(${CMAKE_PROJECT_NAME}.dll PROPERTIES OUTPUT_NAME ${CMAKE_PROJECT_NAME}) -set_target_properties(${CMAKE_PROJECT_NAME}.dll PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") -set_target_properties(${CMAKE_PROJECT_NAME}.dll PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - -file(GLOB_RECURSE HEADER_FILES *.hpp) -file(GLOB_RECURSE SOURCE_FILES *.cpp) -file(GLOB_RECURSE RC_FILES *.rc) - -source_group(_CMake REGULAR_EXPRESSION cmake_pch.*) -source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" FILES ${HEADER_FILES} ${SOURCE_FILES} ${RC_FILES}) - -target_include_directories(${CMAKE_PROJECT_NAME}.dll PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) -target_sources(${CMAKE_PROJECT_NAME}.dll PRIVATE ${HEADER_FILES} ${SOURCE_FILES} ${RC_FILES}) - -target_precompile_headers(${CMAKE_PROJECT_NAME}.dll PUBLIC stdafx.hpp) -target_link_libraries(${CMAKE_PROJECT_NAME}.dll - PUBLIC - Detours - RED4ext.SDK - spdlog -) - -add_dependencies(${CMAKE_PROJECT_NAME}.dll addresses) - -add_custom_command( - TARGET ${CMAKE_PROJECT_NAME}.dll POST_BUILD - DEPENDS ${CMAKE_PROJECT_NAME}.dll - COMMAND ${CMAKE_COMMAND} -E copy_if_different - # ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_PROJECT_NAME}.dll - $ - ${MOD_GAME_DIR}/red4ext/plugins/${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_NAME}.dll - COMMENT "${CMAKE_PROJECT_NAME}.dll -> ${MOD_GAME_DIR}/red4ext/plugins/${CMAKE_PROJECT_NAME}/${CMAKE_PROJECT_NAME}.dll") \ No newline at end of file diff --git a/src/red4ext/ctd_helper.filters b/src/red4ext/ctd_helper.filters deleted file mode 100644 index d3e9077..0000000 --- a/src/red4ext/ctd_helper.filters +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/red4ext/ctd_helper.sln b/src/red4ext/ctd_helper.sln deleted file mode 100644 index 02e913a..0000000 --- a/src/red4ext/ctd_helper.sln +++ /dev/null @@ -1,25 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31205.134 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ctd_helper", "ctd_helper.vcxproj", "{8A72E3B4-B773-416F-AA0C-FCBEE424AF09}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8A72E3B4-B773-416F-AA0C-FCBEE424AF09}.Debug|x64.ActiveCfg = Debug|x64 - {8A72E3B4-B773-416F-AA0C-FCBEE424AF09}.Debug|x64.Build.0 = Debug|x64 - {8A72E3B4-B773-416F-AA0C-FCBEE424AF09}.Release|x64.ActiveCfg = Release|x64 - {8A72E3B4-B773-416F-AA0C-FCBEE424AF09}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {ACC1B1F1-63A2-4218-BF1F-6A030016847A} - EndGlobalSection -EndGlobal diff --git a/src/red4ext/ctd_helper.vcxproj b/src/red4ext/ctd_helper.vcxproj deleted file mode 100644 index 55859f1..0000000 --- a/src/red4ext/ctd_helper.vcxproj +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {8a72e3b4-b773-416f-aa0c-fcbee424af09} - ctd_helper - 10.0 - ctd_helper - - - - DynamicLibrary - true - v143 - Unicode - - - DynamicLibrary - false - v143 - true - Unicode - - - - - - - - - - - - - - - true - $(SolutionDir)build\debug\bin\ - ../../deps/red4ext.sdk/include;../../deps/spdlog/include;../../deps/detours/include;$(IncludePath) - $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);../../deps/spdlog/build/Release;../../deps/detours/lib.X64 - - - false - $(SolutionDir)build\release\bin\ - ../../deps/red4ext.sdk/include;../../deps/spdlog/include;../../deps/detours/include;$(IncludePath) - $(VC_LibraryPath_x64);$(WindowsSDK_LibraryPath_x64);../../deps/spdlog/build/Release;../../deps/detours/lib.X64 - - - - Level3 - true - _DEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - stdcpp20 - stdc17 - - - Windows - true - false - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - xcopy /y /d "$(SolutionDir)build\debug\bin\*.dll" "$(SolutionDir)..\..\build\red4ext\plugins\ctd_helper\" - - - - - Level3 - true - true - true - NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - stdcpp20 - stdc17 - - - Windows - true - true - true - false - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) - - - xcopy /y /d "$(SolutionDir)build\release\bin\*.dll" "$(SolutionDir)..\..\build\red4ext\plugins\ctd_helper\" - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/src/red4ext/versioninfo.rc b/src/red4ext/versioninfo.rc deleted file mode 100644 index dc78be5..0000000 --- a/src/red4ext/versioninfo.rc +++ /dev/null @@ -1,42 +0,0 @@ -1 TYPELIB "versioninfo.rc" - -1 VERSIONINFO -FILEVERSION VER_FILEVERSION -PRODUCTVERSION VER_PRODUCTVERSION -FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif -FILEOS 0x4L -FILETYPE 0x2L -FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904e4" - BEGIN - VALUE "CompanyName", VER_COMPANYNAME_STR - VALUE "FileDescription", VER_FILEDESCRIPTION_STR - VALUE "FileVersion", VER_FILEVERSION_STR - VALUE "LegalCopyright", VER_LEGALCOPYRIGHT_STR - VALUE "ProductName", VER_PRODUCTNAME_STR - VALUE "ProductVersion", VER_PRODUCTVERSION_STR - VALUE "OriginalFilename", FILE_NAME_STR - END - END - - BLOCK "VarFileInfo" - BEGIN - /* The following line should only be modified for localized versions. */ - /* It consists of any number of WORD,WORD pairs, with each pair */ - /* describing a language,codepage combination supported by the file. */ - /* */ - /* For example, a file might have values "0x409,1252" indicating that it */ - /* supports English language (0x409) in the Windows ANSI codepage (1252). */ - - VALUE "Translation", 0x409, 1252 - - END -END \ No newline at end of file diff --git a/tools/build.bat b/tools/build.bat deleted file mode 100644 index dc7ab1f..0000000 --- a/tools/build.bat +++ /dev/null @@ -1,9 +0,0 @@ -if not exist "build" mkdir build -xcopy /y /d /s resources\packed\* build\ -if not exist "build\r6\scripts" mkdir build\r6\scripts -xcopy /y /d /s src\redscript\* build\r6\scripts\ -if not exist "build\r6\input" mkdir build\r6\input -xcopy /y /d /s src\input\* build\r6\input\ -if not exist "build\red4ext" mkdir build\red4ext -if not exist "build\red4ext\plugins" mkdir build\red4ext\plugins -if not exist "build\red4ext\plugins\ctd_helper" mkdir build\red4ext\plugins\ctd_helper \ No newline at end of file diff --git a/tools/install.bat b/tools/install.bat deleted file mode 100644 index ae0f0df..0000000 --- a/tools/install.bat +++ /dev/null @@ -1 +0,0 @@ -xcopy /s /d /y build\* "C:\Program Files (x86)\Steam\steamapps\common\Cyberpunk 2077\" \ No newline at end of file diff --git a/tools/lint.bat b/tools/lint.bat deleted file mode 100644 index 9de6df8..0000000 --- a/tools/lint.bat +++ /dev/null @@ -1,2 +0,0 @@ -tools\redscript-cli.exe compile -s prereqs\r6\scripts -b "C:\Program Files (x86)\Steam\steamapps\common\Cyberpunk 2077\r6\cache\final.redscripts.bk" -o ".\prereqs.redscripts" -tools\redscript-cli.exe lint -s src\redscript -b ".\prereqs.redscripts" \ No newline at end of file diff --git a/tools/lint_installed.bat b/tools/lint_installed.bat deleted file mode 100644 index 9510fde..0000000 --- a/tools/lint_installed.bat +++ /dev/null @@ -1 +0,0 @@ -"C:\Users\Jack\Downloads\redscript-cli (2).exe" lint -s "C:\Program Files (x86)\Steam\steamapps\common\Cyberpunk 2077\r6\scripts" -b "C:\Program Files (x86)\Steam\steamapps\common\Cyberpunk 2077\r6\cache\final.redscripts.bk" \ No newline at end of file diff --git a/tools/pack.bat b/tools/pack.bat deleted file mode 100644 index cce7def..0000000 --- a/tools/pack.bat +++ /dev/null @@ -1,3 +0,0 @@ -if not exist "packed" mkdir packed -xcopy /s /d /y build\* packed -xcopy /s /d /y prereqs\* packed \ No newline at end of file