update spdlog (it still dont work), fix 6.3(1)

This commit is contained in:
Gray
2024-06-10 16:30:29 -04:00
parent dd2bbfacda
commit bab7c30669
107 changed files with 10351 additions and 9620 deletions

View File

@@ -331,8 +331,8 @@ void Addresses::FindAll()
LOG_INFO(LogDev, "Finished finding!");
}
#define PRINT_CRITICAL_OFFSET(offset) if (!offset) LOG_ERROR(LogDev, "Failed to find {}", #offset) \
else LOG_INFO(LogDev, "{}: 0x{:x}", #offset, offset - __int64(GetModuleHandleW(0)));
#define PRINT_CRITICAL_OFFSET(offset) if (!offset) { LOG_ERROR(LogDev, "Failed to find {}", #offset) } \
else { LOG_INFO(LogDev, "{}: 0x{:x}", #offset, offset - __int64(GetModuleHandleW(0))) };
void Addresses::Print()
{
@@ -608,7 +608,10 @@ std::vector<uint64> Addresses::GetFunctionsToNull()
if (Engine_Version == 421)
{
toNull.push_back(Memcury::Scanner::FindPattern("48 8B C4 48 89 58 08 48 89 70 10 57 48 81 EC ? ? ? ? 48 8B BA ? ? ? ? 48 8B DA 0F 29").Get()); // Pawn Overlap
toNull.push_back(Memcury::Scanner::FindStringRef(L"Widget Class %s - Running Initialize On Archetype, %s.").ScanFor({ 0x40, 0x55 }, false).Get()); // Widget class
std::vector<uint8_t> BytesToFind = Fortnite_Version < 6.3 ? std::vector<uint8_t>{ 0x40, 0x55 } : std::vector<uint8_t>{ 0x48, 0x89, 0x5C };
toNull.push_back(Memcury::Scanner::FindStringRef(L"Widget Class %s - Running Initialize On Archetype, %s.").ScanFor(BytesToFind, false).Get()); // Widget class
}
if (Engine_Version >= 422

View File

@@ -818,6 +818,8 @@ DWORD WINAPI Main(LPVOID)
return 1;
}
std::cout << std::format("Base Address: 0x{:x}\n", __int64(GetModuleHandleW(0)));
LOG_INFO(LogInit, "Initializing Project Reboot!");
LOG_INFO(LogDev, "Built on {} {}", __DATE__, __TIME__);

View File

@@ -1771,9 +1771,10 @@ static inline uint64 FindReplaceBuildingActor()
return Memcury::Scanner::FindPattern("4C 89 44 24 ? 55 56 57 41 55 41 56 41 57 48 8D AC 24 ? ? ? ? 48 81 EC ? ? ? ? 45").Get(); // 1.7.2 & 2.4.2
}
return FindBytes(StringRef,
(Engine_Version == 420 || Engine_Version == 421 || Engine_Version >= 427 ? std::vector<uint8_t>{ 0x48, 0x8B, 0xC4 } : std::vector<uint8_t>{ 0x4C, 0x8B }),
1000, 0, true);
auto BytesToFind = Engine_Version == 420 || (Engine_Version == 421 && Fortnite_Version < 6.30) || Engine_Version >= 427 ? std::vector<uint8_t>{ 0x48, 0x8B, 0xC4 }
: std::vector<uint8_t>{ 0x4C, 0x8B };
return FindBytes(StringRef, BytesToFind, 1000, 0, true);
}
static inline uint64 FindSendClientAdjustment()

View File

@@ -12,6 +12,8 @@
#include <spdlog/sinks/stdout_color_sinks.h>
#include <filesystem>
// #define ENABLE_SPD_LOG
static inline std::vector<spdlog::sink_ptr> sinks;
enum ELogLevel : uint8_t
@@ -54,6 +56,8 @@ inline void InitLogger()
}
SetConsoleTitleA("Project Reboot 3.0");
#ifdef ENABLE_SPD_LOG
std::string logName = "reboot.log"; // GenerateLogFileName();
@@ -89,8 +93,10 @@ inline void InitLogger()
MakeLogger("LogRebooting");
MakeLogger("LogObjectViewer");
MakeLogger("LogLateGame");
#endif
}
#ifdef ENABLE_SPD_LOG
#define LOG_DEBUG(loggerName, ...) \
if (spdlog::get(#loggerName)) \
spdlog::get(#loggerName)->debug(std::format(__VA_ARGS__));
@@ -105,4 +111,11 @@ inline void InitLogger()
spdlog::get(#loggerName)->error(std::format(__VA_ARGS__));
#define LOG_FATAL(loggerName, ...) \
if (spdlog::get(#loggerName)) \
spdlog::get(#loggerName)->critical(std::format(__VA_ARGS__));
spdlog::get(#loggerName)->critical(std::format(__VA_ARGS__));
#else
#define LOG_DEBUG(loggerName, ...)
#define LOG_INFO(loggerName, ...)
#define LOG_WARN(loggerName, ...)
#define LOG_ERROR(loggerName, ...)
#define LOG_FATAL(loggerName, ...)
#endif