diff options
author | BDKPlayer <fabian.stotz@yahoo.de> | 2020-02-28 18:08:43 +0100 |
---|---|---|
committer | BDKPlayer <fabian.stotz@yahoo.de> | 2020-02-28 18:08:43 +0100 |
commit | 26e5fdf3923a8a53f83c3de6a338b093c04dcae6 (patch) | |
tree | e4aaf9bbf999fbb3058a8800d67f8fbadbd4442a | |
parent | 3caca381151332c22a24cb16676bc449d3276cae (diff) |
- Updated to enw game version
-rw-r--r-- | Offsets.h | 9 | ||||
-rw-r--r-- | Source.cpp | 28 |
2 files changed, 12 insertions, 25 deletions
@@ -4,11 +4,14 @@ namespace Offsets { //48 8D 0D ? ? ? ? 41 B8 ? ? ? ? E8 ? ? ? ? 33 C0 - int64_t pathfindingSystem = 0x2882C00; + //48 8D 0D ? ? ? ? E8 ? ? ? ? 0F B6 C0 + int64_t pathfindingSystem = 0x2A070F0; //PathingSystem, World and map correct //48 8B 0D ? ? ? ? E8 ? ? ? ? C6 85 - int64_t mainScreen = 0x2870828; + //48 83 3D ? ? ? ? ? 0F 84 ? ? ? ? 45 0F + int64_t mainScreen = 0x29C50F8; //MainScreenCorrect, MainView COrrect //44 89 25 ? ? ? ? 2B - int32_t totalPlayers = 0x2743C74; + //41 8B 45 28 99 + int32_t totalPlayers = 0x28900D4; //correct }
\ No newline at end of file @@ -38,48 +38,33 @@ DWORD_PTR* pSwapChainVtable = NULL; VOID WINAPI OnDllAttach(PVOID base) { +#ifdef DEBUG AllocConsole(); freopen_s((FILE**)stdin, "CONIN$", "r", stdin); freopen_s((FILE**)stdout, "CONOUT$", "w", stdout); SetConsoleTitleA("Age of Empires 2 DE - BDKPlayer"); +#endif } VOID WINAPI OnDllDetach() { +#ifdef DEBUG fclose((FILE*)stdin); fclose((FILE*)stdout); HWND hw_ConsoleHwnd = GetConsoleWindow(); FreeConsole(); PostMessageW(hw_ConsoleHwnd, WM_CLOSE, 0, 0); +#endif } extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam); LRESULT CALLBACK hWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - ImGuiIO& io = ImGui::GetIO(); - POINT mPos; - GetCursorPos(&mPos); - ScreenToClient(window, &mPos); - ImGui::GetIO().MousePos.x = mPos.x; - ImGui::GetIO().MousePos.y = mPos.y; - - if (uMsg == WM_KEYUP) - { - if (wParam == VK_INSERT) - { - if(ShowMenu) - io.MouseDrawCursor = true; - else - io.MouseDrawCursor = false; - } - } - if (ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam)) { return true; } - return CallWindowProc(OriginalWndProcHandler, hWnd, uMsg, wParam, lParam); } @@ -219,7 +204,7 @@ const int MultisampleCount = 1; // Set to 1 to disable multisampling LRESULT CALLBACK DXGIMsgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { return DefWindowProc(hwnd, uMsg, wParam, lParam); } DWORD __stdcall InitHooks(LPVOID hModule) { - //OnDllAttach(hModule); + OnDllAttach(hModule); HMODULE hDXGIDLL = 0; do @@ -331,8 +316,7 @@ BOOL __stdcall DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpReserved) case DLL_PROCESS_DETACH: Sleep(1000); - //OnDllDetach(); - //Sleep(100); + OnDllDetach(); break; } return TRUE; |