Skip to content

Commit

Permalink
finally good backup of AR
Browse files Browse the repository at this point in the history
  • Loading branch information
dtugend committed Dec 3, 2018
1 parent 977e32d commit bff7aba
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 12 deletions.
28 changes: 27 additions & 1 deletion AfxHookSource/AfxInterop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,6 @@ namespace AfxInterop {
{
if (EngineThread::m_Active)
{
SOURCESDK::VMatrix worldToScreenMatrix = g_VEngineClient->WorldToScreenMatrix();

if (!WriteInt32(EngineThread::m_hPipe, EngineThread::EngineMessage_BeforeFrameRenderStart)) { errorLine = __LINE__; goto locked_error; }

Expand All @@ -522,6 +521,33 @@ namespace AfxInterop {
if (!WriteSingle(EngineThread::m_hPipe, g_Hook_VClient_RenderView.GetGlobals()->absoluteframetime_get())) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, g_Hook_VClient_RenderView.GetGlobals()->curtime_get())) { errorLine = __LINE__; goto locked_error; }

int width, height;
g_VEngineClient->GetScreenSize(width, height);

if (!WriteInt32(EngineThread::m_hPipe, width)) { errorLine = __LINE__; goto locked_error; }
if (!WriteInt32(EngineThread::m_hPipe, height)) { errorLine = __LINE__; goto locked_error; }

SOURCESDK::VMatrix worldToViewMatrix = g_VEngineClient->WorldToViewMatrix();

if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[0][0])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[0][1])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[0][2])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[0][3])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[1][0])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[1][1])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[1][2])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[1][3])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[2][0])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[2][1])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[2][2])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[2][3])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[3][0])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[3][1])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[3][2])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToViewMatrix.m[3][3])) { errorLine = __LINE__; goto locked_error; }

SOURCESDK::VMatrix worldToScreenMatrix = g_VEngineClient->WorldToScreenMatrix();

if (!WriteSingle(EngineThread::m_hPipe, worldToScreenMatrix.m[0][0])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToScreenMatrix.m[0][1])) { errorLine = __LINE__; goto locked_error; }
if (!WriteSingle(EngineThread::m_hPipe, worldToScreenMatrix.m[0][2])) { errorLine = __LINE__; goto locked_error; }
Expand Down
2 changes: 1 addition & 1 deletion AfxHookSource/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2192,7 +2192,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpReserved)
{
case DLL_PROCESS_ATTACH:
{
#if 1
#ifdef _DEBUG
MessageBox(0,"DLL_PROCESS_ATTACH","MDT_DEBUG",MB_OK);
#endif

Expand Down
Binary file modified AfxHookUnity/dllmain.cpp
Binary file not shown.
11 changes: 1 addition & 10 deletions how_to_build.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,18 +134,9 @@ Notice:
to "C:\<HLAESRC>\advancedfx\build\Release\bin"

[X] Copy all files
form "C:\Program Files (x86)\Windows Kits\10\Redist\ucrt\DLLs\x64"
to "C:\<HLAESRC>\advancedfx\build\Release\bin\x64"

[X] Copy all files
form "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.15.26706\x86\Microsoft.VC141.CRT"
form "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.16.27012\x86\Microsoft.VC141.CRT"
to "C:\<HLAESRC>\advancedfx\build\Release\bin"

[ ] This step is currently not required!
Copy all files
form "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.15.26706\x64\Microsoft.VC141.CRT"
to "C:\<HLAESRC>\advancedfx\build\Release\bin\x64"

[X] Copy all DLL files from
"C:\<HLAESRC>\ilmbase-build\lib",
"C:\<HLAESRC>\openexr-build\lib" (except "IlmImfUtil-2_2.dll") and
Expand Down

0 comments on commit bff7aba

Please sign in to comment.