[add] client MovePatch
This commit is contained in:
@@ -25,10 +25,18 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
{
|
||||
#ifdef _DEBUG
|
||||
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
|
||||
//_CrtSetBreakAlloc(1181);
|
||||
//_CrtSetBreakAlloc(1182);
|
||||
//_CrtSetBreakAlloc(1183);
|
||||
//_CrtSetBreakAlloc(1184);
|
||||
//_CrtSetBreakAlloc(1185);
|
||||
//_CrtSetBreakAlloc(1186);
|
||||
//_CrtSetBreakAlloc(1187);
|
||||
#endif
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
|
||||
|
||||
CMainApp* pMainApp = { nullptr };
|
||||
|
||||
LoadStringW(hInstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
|
||||
@@ -41,8 +49,8 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
}
|
||||
|
||||
HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_CLIENT));
|
||||
|
||||
MSG msg = {};
|
||||
|
||||
MSG msg;
|
||||
|
||||
pMainApp = CMainApp::Create();
|
||||
if (nullptr == pMainApp)
|
||||
@@ -106,13 +114,13 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance,
|
||||
#endif // _DEBUG
|
||||
|
||||
pGameInstance->Compute_TimeDelta(TEXT("Timer_60"));
|
||||
|
||||
#ifdef _DEBUG
|
||||
pMainApp->Update(0.0166f);
|
||||
#endif // _DEBUG
|
||||
pMainApp->Update(1.f / 60.f);
|
||||
#endif // _DEBUG
|
||||
#ifndef _DEBUG
|
||||
pMainApp->Update(pGameInstance->Get_TimeDelta(TEXT("Timer_60")));
|
||||
#endif // !_DEBUG
|
||||
|
||||
#endif
|
||||
pMainApp->Render();
|
||||
|
||||
fTimeAcc = 0.f;
|
||||
@@ -163,7 +171,7 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
|
||||
RECT rcWindow = { 0, 0, g_iWinSizeX, g_iWinSizeY };
|
||||
|
||||
AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, TRUE);
|
||||
AdjustWindowRect(&rcWindow, WS_OVERLAPPEDWINDOW, FALSE);
|
||||
|
||||
HWND hWnd = CreateWindowW(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
|
||||
CW_USEDEFAULT, 0, rcWindow.right - rcWindow.left, rcWindow.bottom - rcWindow.top, nullptr, nullptr, hInstance, nullptr);
|
||||
@@ -178,18 +186,20 @@ BOOL InitInstance(HINSTANCE hInstance, int nCmdShow)
|
||||
|
||||
g_hWnd = hWnd;
|
||||
|
||||
return TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
if (ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam))
|
||||
if (ImGui_ImplWin32_WndProcHandler(hWnd, message, wParam, lParam)) {
|
||||
return true;
|
||||
}
|
||||
switch (message)
|
||||
{
|
||||
case WM_DESTROY:
|
||||
PostQuitMessage(0);
|
||||
break;
|
||||
|
||||
default:
|
||||
return DefWindowProc(hWnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user