aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/client
diff options
context:
space:
mode:
authorF1F7Y <64418963+F1F7Y@users.noreply.github.com>2023-07-07 12:28:35 +0200
committerGitHub <noreply@github.com>2023-07-07 12:28:35 +0200
commit513705e33f59273c5b463c0da874a0066e8d0589 (patch)
tree76c66af8d46d0cdd864cefcc2ef9a237a80ddb5b /NorthstarDLL/client
parent043fb83d8febc9d277064d5b24e60832375a110f (diff)
downloadNorthstarLauncher-513705e33f59273c5b463c0da874a0066e8d0589.tar.gz
NorthstarLauncher-513705e33f59273c5b463c0da874a0066e8d0589.zip
Memory class renaming (#469)
- Renames `MemoryAddress` to `CMemoryAddress` - Renames `CMemoryAddress::As` to `CMemoryAddress::RCast`
Diffstat (limited to 'NorthstarDLL/client')
-rw-r--r--NorthstarDLL/client/audio.cpp2
-rw-r--r--NorthstarDLL/client/chatcommand.cpp3
-rw-r--r--NorthstarDLL/client/clientauthhooks.cpp2
-rw-r--r--NorthstarDLL/client/debugoverlay.cpp8
-rw-r--r--NorthstarDLL/client/localchatwriter.cpp10
-rw-r--r--NorthstarDLL/client/r2client.cpp6
6 files changed, 16 insertions, 15 deletions
diff --git a/NorthstarDLL/client/audio.cpp b/NorthstarDLL/client/audio.cpp
index ea1f6416..9fcac982 100644
--- a/NorthstarDLL/client/audio.cpp
+++ b/NorthstarDLL/client/audio.cpp
@@ -502,5 +502,5 @@ ON_DLL_LOAD_CLIENT_RELIESON("client.dll", AudioHooks, ConVar, (CModule module))
AUTOHOOK_DISPATCH()
Cvar_ns_print_played_sounds = new ConVar("ns_print_played_sounds", "0", FCVAR_NONE, "");
- MilesStopAll = module.Offset(0x580850).As<MilesStopAll_Type>();
+ MilesStopAll = module.Offset(0x580850).RCast<MilesStopAll_Type>();
}
diff --git a/NorthstarDLL/client/chatcommand.cpp b/NorthstarDLL/client/chatcommand.cpp
index c1ad1b3b..9cf34e43 100644
--- a/NorthstarDLL/client/chatcommand.cpp
+++ b/NorthstarDLL/client/chatcommand.cpp
@@ -28,7 +28,8 @@ void ConCommand_log(const CCommand& args)
ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", ClientChatCommand, ConCommand, (CModule module))
{
- ClientSayText = module.Offset(0x54780).As<void(__fastcall*)(void* a1, const char* message, uint64_t isIngameChat, bool isTeamChat)>();
+ ClientSayText =
+ module.Offset(0x54780).RCast<void(__fastcall*)(void* a1, const char* message, uint64_t isIngameChat, bool isTeamChat)>();
RegisterConCommand("say", ConCommand_say, "Enters a message in public chat", FCVAR_CLIENTDLL);
RegisterConCommand("say_team", ConCommand_say_team, "Enters a message in team chat", FCVAR_CLIENTDLL);
RegisterConCommand("log", ConCommand_log, "Log a message to the local chat window", FCVAR_CLIENTDLL);
diff --git a/NorthstarDLL/client/clientauthhooks.cpp b/NorthstarDLL/client/clientauthhooks.cpp
index 7fca9581..e66da6c8 100644
--- a/NorthstarDLL/client/clientauthhooks.cpp
+++ b/NorthstarDLL/client/clientauthhooks.cpp
@@ -52,7 +52,7 @@ ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", ClientAuthHooks, ConVar, (CModule modu
{
AUTOHOOK_DISPATCH()
- p3PToken = module.Offset(0x13979D80).As<char*>();
+ p3PToken = module.Offset(0x13979D80).RCast<char*>();
// this cvar will save to cfg once initially agreed with
Cvar_ns_has_agreed_to_send_token = new ConVar(
diff --git a/NorthstarDLL/client/debugoverlay.cpp b/NorthstarDLL/client/debugoverlay.cpp
index e3a9292d..cdb14693 100644
--- a/NorthstarDLL/client/debugoverlay.cpp
+++ b/NorthstarDLL/client/debugoverlay.cpp
@@ -127,13 +127,13 @@ ON_DLL_LOAD_CLIENT_RELIESON("engine.dll", DebugOverlay, ConVar, (CModule module)
{
AUTOHOOK_DISPATCH()
- RenderLine = module.Offset(0x192A70).As<RenderLineType>();
- RenderBox = module.Offset(0x192520).As<RenderBoxType>();
- RenderWireframeBox = module.Offset(0x193DA0).As<RenderBoxType>();
+ RenderLine = module.Offset(0x192A70).RCast<RenderLineType>();
+ RenderBox = module.Offset(0x192520).RCast<RenderBoxType>();
+ RenderWireframeBox = module.Offset(0x193DA0).RCast<RenderBoxType>();
sEngineModule = reinterpret_cast<HMODULE>(module.m_nAddress);
// not in g_pCVar->FindVar by this point for whatever reason, so have to get from memory
- ConVar* Cvar_enable_debug_overlays = module.Offset(0x10DB0990).As<ConVar*>();
+ ConVar* Cvar_enable_debug_overlays = module.Offset(0x10DB0990).RCast<ConVar*>();
Cvar_enable_debug_overlays->SetValue(false);
Cvar_enable_debug_overlays->m_pszDefaultValue = (char*)"0";
Cvar_enable_debug_overlays->AddFlags(FCVAR_CHEAT);
diff --git a/NorthstarDLL/client/localchatwriter.cpp b/NorthstarDLL/client/localchatwriter.cpp
index 57fe98a2..848d898f 100644
--- a/NorthstarDLL/client/localchatwriter.cpp
+++ b/NorthstarDLL/client/localchatwriter.cpp
@@ -440,10 +440,10 @@ void LocalChatWriter::InsertDefaultFade()
ON_DLL_LOAD_CLIENT("client.dll", LocalChatWriter, (CModule module))
{
- gGameSettings = module.Offset(0x11BAA48).As<CGameSettings**>();
- gChatFadeLength = module.Offset(0x11BAB78).As<CGameFloatVar**>();
- gChatFadeSustain = module.Offset(0x11BAC08).As<CGameFloatVar**>();
- CHudChat::allHuds = module.Offset(0x11BA9E8).As<CHudChat**>();
+ gGameSettings = module.Offset(0x11BAA48).RCast<CGameSettings**>();
+ gChatFadeLength = module.Offset(0x11BAB78).RCast<CGameFloatVar**>();
+ gChatFadeSustain = module.Offset(0x11BAC08).RCast<CGameFloatVar**>();
+ CHudChat::allHuds = module.Offset(0x11BA9E8).RCast<CHudChat**>();
- ConvertANSIToUnicode = module.Offset(0x7339A0).As<ConvertANSIToUnicodeType>();
+ ConvertANSIToUnicode = module.Offset(0x7339A0).RCast<ConvertANSIToUnicodeType>();
}
diff --git a/NorthstarDLL/client/r2client.cpp b/NorthstarDLL/client/r2client.cpp
index fabc0dc6..fea97d8e 100644
--- a/NorthstarDLL/client/r2client.cpp
+++ b/NorthstarDLL/client/r2client.cpp
@@ -12,8 +12,8 @@ namespace R2
ON_DLL_LOAD("engine.dll", R2EngineClient, (CModule module))
{
- g_pLocalPlayerUserID = module.Offset(0x13F8E688).As<char*>();
- g_pLocalPlayerOriginToken = module.Offset(0x13979C80).As<char*>();
+ g_pLocalPlayerUserID = module.Offset(0x13F8E688).RCast<char*>();
+ g_pLocalPlayerOriginToken = module.Offset(0x13979C80).RCast<char*>();
- GetBaseLocalClient = module.Offset(0x78200).As<GetBaseLocalClientType>();
+ GetBaseLocalClient = module.Offset(0x78200).RCast<GetBaseLocalClientType>();
}