WinMain 99%

This commit is contained in:
Christian Semmler 2023-06-23 18:08:36 +02:00
parent 344fcf48ad
commit 435ac977a1
No known key found for this signature in database
GPG Key ID: 086DAA1360BEEE5C

View File

@ -88,7 +88,6 @@ class Isle
};
extern LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
// OFFSET: ISLE 0x4023e0
@ -210,7 +209,11 @@ inline MxResult Isle::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
// OFFSET: ISLE 0x402c20
inline void Isle::Tick(BOOL sleepIfNotNextFrame)
{
if (this->m_windowActive) {
if (!this->m_windowActive) {
Sleep(0);
return;
}
if (!Lego()) return;
if (!TickleManager()) return;
if (!Timer()) return;
@ -219,6 +222,7 @@ inline void Isle::Tick(BOOL sleepIfNotNextFrame)
if (currentTime < g_lastFrameTime) {
g_lastFrameTime = -this->m_frameDelta;
}
if (this->m_frameDelta + g_lastFrameTime < currentTime) {
if (!Lego()->vtable40()) {
TickleManager()->Tickle();
@ -265,8 +269,9 @@ inline void Isle::Tick(BOOL sleepIfNotNextFrame)
}
return;
}
if (sleepIfNotNextFrame == 0) return;
}
if (sleepIfNotNextFrame == 0)
return;
Sleep(0);
}