mirror of
https://github.com/isledecomp/isle.git
synced 2026-02-03 13:41:15 +00:00
WinMain 99%
This commit is contained in:
parent
344fcf48ad
commit
435ac977a1
13
ISLE/isle.h
13
ISLE/isle.h
@ -88,7 +88,6 @@ class Isle
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
extern LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
extern LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
// OFFSET: ISLE 0x4023e0
|
// OFFSET: ISLE 0x4023e0
|
||||||
@ -210,7 +209,11 @@ inline MxResult Isle::SetupWindow(HINSTANCE hInstance, LPSTR lpCmdLine)
|
|||||||
// OFFSET: ISLE 0x402c20
|
// OFFSET: ISLE 0x402c20
|
||||||
inline void Isle::Tick(BOOL sleepIfNotNextFrame)
|
inline void Isle::Tick(BOOL sleepIfNotNextFrame)
|
||||||
{
|
{
|
||||||
if (this->m_windowActive) {
|
if (!this->m_windowActive) {
|
||||||
|
Sleep(0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!Lego()) return;
|
if (!Lego()) return;
|
||||||
if (!TickleManager()) return;
|
if (!TickleManager()) return;
|
||||||
if (!Timer()) return;
|
if (!Timer()) return;
|
||||||
@ -219,6 +222,7 @@ inline void Isle::Tick(BOOL sleepIfNotNextFrame)
|
|||||||
if (currentTime < g_lastFrameTime) {
|
if (currentTime < g_lastFrameTime) {
|
||||||
g_lastFrameTime = -this->m_frameDelta;
|
g_lastFrameTime = -this->m_frameDelta;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this->m_frameDelta + g_lastFrameTime < currentTime) {
|
if (this->m_frameDelta + g_lastFrameTime < currentTime) {
|
||||||
if (!Lego()->vtable40()) {
|
if (!Lego()->vtable40()) {
|
||||||
TickleManager()->Tickle();
|
TickleManager()->Tickle();
|
||||||
@ -265,8 +269,9 @@ inline void Isle::Tick(BOOL sleepIfNotNextFrame)
|
|||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (sleepIfNotNextFrame == 0) return;
|
|
||||||
}
|
if (sleepIfNotNextFrame == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
Sleep(0);
|
Sleep(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user