mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-23 08:24:16 +00:00
ISLE and mingw32 fixes (#18)
* ci: no need to do a final cd * MxDSAction has a setAtomId method * Implement the MxOmniCreateParamBase destructor inline Because of this, ISLE should no longer have to compile mxomnicreateparambase.obj. I didn't modify isle.mak, because I don't have the MSVC 4.20 GUI set-up. * Replace 256 with sizeof(...) * Format DefWndProc calls in WndProc * Replace magic mask in WNDPROC with macro's * Replace magic numbers in main.cpp with macro's * MOUSEMOVE notification id is 10 instead of 0x10 * Lowercase all windows includes such that mingw32 on Linux can find these * Convert ISLE/res/isle.rc to utf-8, and add a comma needed by mingw32 * mingw32 cannot use a enum without previous declaration * minor adjustments --------- Co-authored-by: itsmattkc <34096995+itsmattkc@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
bba513c525
commit
6e18d1b41f
@@ -254,7 +254,7 @@ void Isle::setupVideoFlags(BOOL fullScreen, BOOL flipSurfaces, BOOL backBuffers,
|
||||
BOOL Isle::setupLegoOmni()
|
||||
{
|
||||
char mediaPath[256];
|
||||
GetProfileStringA("LEGO Island", "MediaPath", "", mediaPath, 256);
|
||||
GetProfileStringA("LEGO Island", "MediaPath", "", mediaPath, sizeof(mediaPath));
|
||||
|
||||
if (Lego()->Create(MxOmniCreateParam(mediaPath, (struct HWND__ *) m_windowHandle, m_videoParam, MxOmniCreateFlags())) != FAILURE) {
|
||||
VariableTable()->SetVariable("ACTOR_01", "");
|
||||
@@ -348,13 +348,13 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
}
|
||||
return DefWindowProcA(hWnd,WM_SYSCOMMAND,wParam,lParam);
|
||||
case WM_EXITMENULOOP:
|
||||
return DefWindowProcA(hWnd,WM_EXITMENULOOP,wParam,lParam);
|
||||
return DefWindowProcA(hWnd, WM_EXITMENULOOP, wParam, lParam);
|
||||
case WM_MOVING:
|
||||
if (g_isle && g_isle->m_fullScreen) {
|
||||
GetWindowRect(hWnd, (LPRECT) lParam);
|
||||
return 0;
|
||||
}
|
||||
return DefWindowProcA(hWnd,WM_MOVING,wParam,lParam);
|
||||
return DefWindowProcA(hWnd, WM_MOVING, wParam, lParam);
|
||||
case WM_NCPAINT:
|
||||
if (g_isle && g_isle->m_fullScreen) {
|
||||
return 0;
|
||||
@@ -396,8 +396,10 @@ LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
switch (uMsg) {
|
||||
case WM_KEYDOWN:
|
||||
if (lParam & 0x40000000) {
|
||||
return DefWindowProcA(hWnd,WM_KEYDOWN,wParam,lParam);
|
||||
// While this probably should be (HIWORD(lParam) & KF_REPEAT), this seems
|
||||
// to be what the assembly is actually doing
|
||||
if (lParam & (KF_REPEAT << 16)) {
|
||||
return DefWindowProcA(hWnd, WM_KEYDOWN, wParam, lParam);
|
||||
}
|
||||
keyCode = wParam;
|
||||
type = KEYDOWN;
|
||||
@@ -603,7 +605,7 @@ void Isle::tick(BOOL sleepIfNotNextFrame)
|
||||
return;
|
||||
}
|
||||
|
||||
ds.m_atomId = stream->atom;
|
||||
ds.setAtomId(stream->atom);
|
||||
ds.m_unk24 = 0xFFFF;
|
||||
ds.m_unk1c = 0;
|
||||
VideoManager()->EnableFullScreenMovie(TRUE, TRUE);
|
||||
@@ -612,7 +614,7 @@ void Isle::tick(BOOL sleepIfNotNextFrame)
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
ds.m_atomId = stream->atom;
|
||||
ds.setAtomId(stream->atom);
|
||||
ds.m_unk24 = 0xFFFF;
|
||||
ds.m_unk1c = 0;
|
||||
if (Start(&ds) != SUCCESS) {
|
||||
|
Reference in New Issue
Block a user