From d95946abfe40093ab76b5e870b968f4fb7430184 Mon Sep 17 00:00:00 2001 From: Helloyunho Date: Mon, 7 Jul 2025 07:40:30 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=F0=9F=94=A8=20fix:=20use=20custom=20certif?= =?UTF-8?q?icate=20(#540)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packaging/UWP/CMakeLists.txt | 7 ++++++- packaging/UWP/IslePortable.pfx | Bin 0 -> 2547 bytes packaging/UWP/Package.appxmanifest | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 packaging/UWP/IslePortable.pfx diff --git a/packaging/UWP/CMakeLists.txt b/packaging/UWP/CMakeLists.txt index dedad8d8..95018c49 100644 --- a/packaging/UWP/CMakeLists.txt +++ b/packaging/UWP/CMakeLists.txt @@ -12,4 +12,9 @@ set_source_files_properties(${MANIFEST_FILE} PROPERTIES VS_DEPLOYMENT_CONTENT 1 ) -target_sources(isle PRIVATE ${ASSET_FILES} ${MANIFEST_FILE}) +set(SIGNING_KEY_FILE IslePortable.pfx) +set_source_files_properties(${SIGNING_KEY_FILE} PROPERTIES + VS_DEPLOYMENT_CONTENT 1 +) + +target_sources(isle PRIVATE ${ASSET_FILES} ${MANIFEST_FILE} ${SIGNING_KEY_FILE}) diff --git a/packaging/UWP/IslePortable.pfx b/packaging/UWP/IslePortable.pfx new file mode 100644 index 0000000000000000000000000000000000000000..3b85ffca4267642899c4b29f063c0a4283371db7 GIT binary patch literal 2547 zcmai$XE+-Q7srJdAx3QpHH(_DN>Qp}Q=>(TBJmcbXze|Msv5P&wP`Bav@s$@sTQ#n z(VD%8U3*=#;dP()eR@CM59c}0`TakfPv`d>7z(sS4WNOcKxjIU)HB0phs*$aKq(58 z14Mx`E^sOgMRW2`L|2NUS-U{X)BviBHv3NkfI0mhXqjPFFol0cFiZ@{mhgg2pmmM- zjE#Dxr)?E3OHIu{1q0JD{BJ8Yh?WW_KnHSuW(asl0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f3;l56iOou555AFPi z<|4}OGNILiUS!Ohm-l%lO8UGTD=R;%O)F}ISE=}=`DFU-oF$>lqQ+=I#Sja`ECN{P zB`C2x20OpR9Ich>kqYtH=-YFUbsCa{pA&Kv-a^vzr7qK!{#3;xj32K(qnv);`1o+! zzyo*qxGnY#@Dqy(EY^GD)mK))fOd?K6@7WfyGV4LKnP1vo{jOhnu5>OdX)iRnwZp5 z!P{2klKIHGV4fUja)R_2c}hDjMl7mR$Dc>=oNH_tK`3N;#|CzbG_CZNdqP!ppfAoedA@u|P?aLige;QXsBAt0oir@847#_n?9x3DYT z+sI`4C#eVANSW1 zC2^4Kch=*WKYCU1X?*}ZKAR;*PoQ0&VdPPC_ApE9W4`&5aDDK}oXb;${;e9un=&Wr zFkcSnc{O2S?i?2<-fXnWbV;Oo^>zfkXyTxW zyL*e@Y*q3vV(pv`Z(9_-9cmMp!9qIV6@LJ2`*UnGxki zVD(ya&ndAZT#*_KV3umPA9u4sj}AoGcM9xt&q_G=`%Q)@0P%0$P`WP9dP2a_*UCVZ z<0hzCJR1ErMGx6Qf|N6(zIgW2u00hmN4wB}AAFg#=Wr0EG+`ez+TGrrtSG|S>Z-)Z zzU!ZA!Snjn$0k62xsldPl>JnMOOjJ)`0MQl;fKE6*yy6MtC&HM+w>4}AI||tsA&~? zoN4&<{^(I0HyzK6%jweiQ?&2XOLtm>*aA4xf(7s7PpZ_2eZsx`N4jEL&2kIiKOA?O zBNVQ{M1PAG#HGLu - + LEGO® Island - Helloyunho + isledecomp/isle-portable StoreLogo.png From 6df6ae407c7cb7461ff85ade92859db494893bdf Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 7 Jul 2025 02:43:25 +0200 Subject: [PATCH 2/5] Fix transition on software rendere (#543) --- miniwin/src/d3drm/backends/software/renderer.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/miniwin/src/d3drm/backends/software/renderer.cpp b/miniwin/src/d3drm/backends/software/renderer.cpp index 48c9c3ef..93a80a2e 100644 --- a/miniwin/src/d3drm/backends/software/renderer.cpp +++ b/miniwin/src/d3drm/backends/software/renderer.cpp @@ -800,9 +800,17 @@ void Direct3DRMSoftwareRenderer::Draw2DImage( return; } + bool isUpscaling = centeredRect.w > srcRect.w || centeredRect.h > srcRect.h; + SDL_Surface* surface = m_textures[textureId].cached; SDL_UnlockSurface(surface); - SDL_BlitSurfaceScaled(surface, &srcRect, m_renderedImage, ¢eredRect, SDL_SCALEMODE_LINEAR); + SDL_BlitSurfaceScaled( + surface, + &srcRect, + m_renderedImage, + ¢eredRect, + isUpscaling ? SDL_SCALEMODE_NEAREST : SDL_SCALEMODE_LINEAR + ); SDL_LockSurface(surface); } From bb86ee317230fdffe54e0b3315ce9e9841dd5c85 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 7 Jul 2025 03:40:53 +0200 Subject: [PATCH 3/5] Fix clear screen on buffered deevices (#544) --- LEGO1/omni/src/video/mxdisplaysurface.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/LEGO1/omni/src/video/mxdisplaysurface.cpp b/LEGO1/omni/src/video/mxdisplaysurface.cpp index 612caba4..b36cbd2a 100644 --- a/LEGO1/omni/src/video/mxdisplaysurface.cpp +++ b/LEGO1/omni/src/video/mxdisplaysurface.cpp @@ -52,7 +52,7 @@ void MxDisplaySurface::ClearScreen() DDSURFACEDESC desc; if (!m_videoParam.Flags().GetFlipSurfaces()) { - backBuffers = 1; + backBuffers = 2; } else { backBuffers = m_videoParam.GetBackBuffers() + 1; @@ -80,6 +80,17 @@ void MxDisplaySurface::ClearScreen() if (m_videoParam.Flags().GetFlipSurfaces()) { m_ddSurface1->Flip(NULL, DDFLIP_WAIT); } + else { + DDBLTFX data; + memset(&data, 0, sizeof(data)); + data.dwSize = sizeof(data); + data.dwDDFX = DDBLTFX_NOTEARING; + + if (m_ddSurface1->Blt(NULL, m_ddSurface2, NULL, DDBLT_NONE, &data) == DDERR_SURFACELOST) { + m_ddSurface1->Restore(); + m_ddSurface1->Blt(NULL, m_ddSurface2, NULL, DDBLT_NONE, &data); + } + } } } From b82cfc4b36445fedcc8e0d0ab5a921ac5e71420b Mon Sep 17 00:00:00 2001 From: Helloyunho Date: Mon, 7 Jul 2025 11:36:37 +0900 Subject: [PATCH 4/5] Recheck through gamepads when gamepad is added or removed (#546) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🩹 fix: recheck through gamepads when gamepad is added or removed * 🚑️ fix: oops i forgot to put lego1_export --- ISLE/isleapp.cpp | 7 +++++++ LEGO1/lego/legoomni/include/legoinputmanager.h | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ISLE/isleapp.cpp b/ISLE/isleapp.cpp index 09dcaab2..5cc6c9c2 100644 --- a/ISLE/isleapp.cpp +++ b/ISLE/isleapp.cpp @@ -474,6 +474,13 @@ SDL_AppResult SDL_AppEvent(void* appstate, SDL_Event* event) } break; } + case SDL_EVENT_GAMEPAD_ADDED: + case SDL_EVENT_GAMEPAD_REMOVED: { + if (InputManager()) { + InputManager()->GetJoystick(); + } + break; + } case SDL_EVENT_GAMEPAD_BUTTON_DOWN: { switch (event->gbutton.button) { case SDL_GAMEPAD_BUTTON_DPAD_UP: diff --git a/LEGO1/lego/legoomni/include/legoinputmanager.h b/LEGO1/lego/legoomni/include/legoinputmanager.h index 202f8a55..5f3052c1 100644 --- a/LEGO1/lego/legoomni/include/legoinputmanager.h +++ b/LEGO1/lego/legoomni/include/legoinputmanager.h @@ -108,7 +108,7 @@ class LegoInputManager : public MxPresenter { MxResult Create(HWND p_hwnd); void Destroy() override; - MxResult GetJoystick(); + LEGO1_EXPORT MxResult GetJoystick(); MxResult GetJoystickState(MxU32* p_joystickX, MxU32* p_joystickY, MxU32* p_povPosition); void StartAutoDragTimer(); void StopAutoDragTimer(); From c6b94dabcf1a75c1b757547e2325a6b4c7ba0f48 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Mon, 7 Jul 2025 04:59:44 +0200 Subject: [PATCH 5/5] Align FakeMosaicTransition with MosaicTransition (#545) The palette is a bit off but I have no strong urge to fix it --- .../src/common/mxtransitionmanager.cpp | 202 ++++++++++-------- 1 file changed, 115 insertions(+), 87 deletions(-) diff --git a/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp index b66b26e4..04805092 100644 --- a/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp +++ b/LEGO1/lego/legoomni/src/common/mxtransitionmanager.cpp @@ -701,101 +701,129 @@ void MxTransitionManager::FakeMosaicTransition() EndTransition(TRUE); return; } + else { + if (m_animationTimer == 0) { + g_colorOffset = SDL_rand(32); - if (m_animationTimer == 0) { - g_colorOffset = SDL_rand(32); - for (MxS32 i = 0; i < 64; i++) { - m_columnOrder[i] = i; - } - for (MxS32 i = 0; i < 64; i++) { - MxS32 swap = SDL_rand(64); - std::swap(m_columnOrder[i], m_columnOrder[swap]); - } - for (MxS32 i = 0; i < 48; i++) { - m_randomShift[i] = SDL_rand(64); - } - } - - if (!g_fakeTranstionSurface) { - DDSURFACEDESC mainDesc = {}; - mainDesc.dwSize = sizeof(mainDesc); - if (m_ddSurface->GetSurfaceDesc(&mainDesc) != DD_OK) { - return; - } - - DDSURFACEDESC tempDesc = {}; - tempDesc.dwSize = sizeof(tempDesc); - tempDesc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS; - tempDesc.dwWidth = 64; - tempDesc.dwHeight = 48; - tempDesc.ddpfPixelFormat = mainDesc.ddpfPixelFormat; - tempDesc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - - HRESULT hr = MVideoManager()->GetDirectDraw()->CreateSurface(&tempDesc, &g_fakeTranstionSurface, nullptr); - if (hr != DD_OK || !g_fakeTranstionSurface) { - return; - } - } - - DDSURFACEDESC ddsd = {}; - ddsd.dwSize = sizeof(ddsd); - HRESULT res = g_fakeTranstionSurface->Lock(NULL, &ddsd, DDLOCK_WAIT | DDLOCK_WRITEONLY, NULL); - if (res == DDERR_SURFACELOST) { - g_fakeTranstionSurface->Restore(); - res = g_fakeTranstionSurface->Lock(NULL, &ddsd, DDLOCK_WAIT | DDLOCK_WRITEONLY, NULL); - } - - if (res == DD_OK) { - SubmitCopyRect(&ddsd); - - static const MxU8 g_palette[32][3] = { - {0x00, 0x00, 0x00}, {0x12, 0x1e, 0x50}, {0x00, 0x22, 0x6c}, {0x14, 0x2d, 0x9f}, {0x0e, 0x36, 0xb0}, - {0x0e, 0x39, 0xd0}, {0x47, 0x96, 0xe2}, {0x79, 0xaa, 0xca}, {0xff, 0xff, 0xff}, {0xc9, 0xcd, 0xcb}, - {0xad, 0xad, 0xab}, {0xa6, 0x91, 0x8e}, {0xaf, 0x59, 0x49}, {0xc0, 0x00, 0x00}, {0xab, 0x18, 0x18}, - {0x61, 0x0c, 0x0c}, {0x04, 0x38, 0x12}, {0x2c, 0x67, 0x28}, {0x4a, 0xb4, 0x6b}, {0x94, 0xb7, 0x7c}, - {0xb6, 0xb9, 0x87}, {0x52, 0x4a, 0x67}, {0x87, 0x8d, 0x8a}, {0xa6, 0x91, 0x8e}, {0xf8, 0xee, 0xdc}, - {0xf4, 0xe2, 0xc3}, {0x87, 0x8d, 0x8a}, {0xba, 0x9f, 0x12}, {0xb5, 0x83, 0x00}, {0x6a, 0x44, 0x27}, - {0x36, 0x37, 0x34}, {0x2b, 0x23, 0x0f} - }; - - MxS32 bytesPerPixel = ddsd.ddpfPixelFormat.dwRGBBitCount / 8; - - for (MxS32 col = 0; col < 64; col++) { - if (m_animationTimer * 4 > m_columnOrder[col]) { - continue; - } - if (m_animationTimer * 4 + 3 < m_columnOrder[col]) { - continue; + // Same init/shuffle steps as the dissolve transition, except that + // we are using big blocky pixels and only need 64 columns. + MxS32 i; + for (i = 0; i < 64; i++) { + m_columnOrder[i] = i; } - for (MxS32 row = 0; row < 48; row++) { - int paletteIndex = GetColorIndexWithLocality(col, row); + for (i = 0; i < 64; i++) { + MxS32 swap = SDL_rand(64); + MxU16 t = m_columnOrder[i]; + m_columnOrder[i] = m_columnOrder[swap]; + m_columnOrder[swap] = t; + } - const MxU8* color = g_palette[paletteIndex]; + // The same is true here. We only need 48 rows. + for (i = 0; i < 48; i++) { + m_randomShift[i] = SDL_rand(64); + } + DDSURFACEDESC mainDesc = {}; + mainDesc.dwSize = sizeof(mainDesc); + if (m_ddSurface->GetSurfaceDesc(&mainDesc) != DD_OK) { + return; + } - MxS32 xShift = (m_randomShift[row] + col) % 64; - MxU8* dest = (MxU8*) ddsd.lpSurface + row * ddsd.lPitch + xShift * bytesPerPixel; + DDSURFACEDESC tempDesc = {}; + tempDesc.dwSize = sizeof(tempDesc); + tempDesc.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS; + tempDesc.dwWidth = 64; + tempDesc.dwHeight = 48; + tempDesc.ddpfPixelFormat = mainDesc.ddpfPixelFormat; + tempDesc.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN; - switch (bytesPerPixel) { - case 1: - *dest = paletteIndex; - break; - case 2: - *((MxU16*) dest) = RGB555_CREATE(color[2], color[1], color[0]); - break; - default: - *((MxU32*) dest) = RGB8888_CREATE(color[2], color[1], color[0], 255); - break; + if (MVideoManager()->GetDirectDraw()->CreateSurface(&tempDesc, &g_fakeTranstionSurface, nullptr) != DD_OK) { + return; + } + + DWORD fillColor = 0x00000000; + switch (mainDesc.ddpfPixelFormat.dwRGBBitCount) { + case 8: + fillColor = 0x10; + break; + case 16: + fillColor = RGB555_CREATE(0x1f, 0, 0x1f); + break; + } + + DDBLTFX bltFx = {}; + bltFx.dwSize = sizeof(bltFx); + bltFx.dwFillColor = fillColor; + g_fakeTranstionSurface->Blt(NULL, NULL, NULL, DDBLT_COLORFILL | DDBLT_WAIT, &bltFx); + + DDCOLORKEY key = {}; + key.dwColorSpaceLowValue = key.dwColorSpaceHighValue = fillColor; + g_fakeTranstionSurface->SetColorKey(DDCKEY_SRCBLT, &key); + } + + // Run one tick of the animation + DDSURFACEDESC ddsd; + memset(&ddsd, 0, sizeof(ddsd)); + ddsd.dwSize = sizeof(ddsd); + + HRESULT res = g_fakeTranstionSurface->Lock(NULL, &ddsd, DDLOCK_WAIT | DDLOCK_WRITEONLY, NULL); + if (res == DDERR_SURFACELOST) { + g_fakeTranstionSurface->Restore(); + res = g_fakeTranstionSurface->Lock(NULL, &ddsd, DDLOCK_WAIT | DDLOCK_WRITEONLY, NULL); + } + + if (res == DD_OK) { + SubmitCopyRect(&ddsd); + + static const MxU8 g_palette[32][3] = { + {0x00, 0x00, 0x00}, {0x12, 0x1e, 0x50}, {0x00, 0x22, 0x6c}, {0x14, 0x2d, 0x9f}, {0x0e, 0x36, 0xb0}, + {0x0e, 0x39, 0xd0}, {0x47, 0x96, 0xe2}, {0x79, 0xaa, 0xca}, {0xff, 0xff, 0xff}, {0xc9, 0xcd, 0xcb}, + {0xad, 0xad, 0xab}, {0xa6, 0x91, 0x8e}, {0xaf, 0x59, 0x49}, {0xc0, 0x00, 0x00}, {0xab, 0x18, 0x18}, + {0x61, 0x0c, 0x0c}, {0x04, 0x38, 0x12}, {0x2c, 0x67, 0x28}, {0x4a, 0xb4, 0x6b}, {0x94, 0xb7, 0x7c}, + {0xb6, 0xb9, 0x87}, {0x52, 0x4a, 0x67}, {0x87, 0x8d, 0x8a}, {0xa6, 0x91, 0x8e}, {0xf8, 0xee, 0xdc}, + {0xf4, 0xe2, 0xc3}, {0x87, 0x8d, 0x8a}, {0xba, 0x9f, 0x12}, {0xb5, 0x83, 0x00}, {0x6a, 0x44, 0x27}, + {0x36, 0x37, 0x34}, {0x2b, 0x23, 0x0f} + }; + + MxS32 bytesPerPixel = ddsd.ddpfPixelFormat.dwRGBBitCount / 8; + + for (MxS32 col = 0; col < 64; col++) { + // Select 4 columns on each tick + if (m_animationTimer * 4 > m_columnOrder[col]) { + continue; + } + + if (m_animationTimer * 4 + 3 < m_columnOrder[col]) { + continue; + } + + for (MxS32 row = 0; row < 48; row++) { + MxS32 x = (m_randomShift[row] + col) % 64; + MxU8* dest = (MxU8*) ddsd.lpSurface + row * ddsd.lPitch + x * bytesPerPixel; + + const MxU8 paletteIndex = GetColorIndexWithLocality(col, row); + const MxU8* color = g_palette[paletteIndex]; + switch (bytesPerPixel) { + case 1: + *dest = paletteIndex; + break; + case 2: + *((MxU16*) dest) = RGB555_CREATE(color[2], color[1], color[0]); + break; + default: + *((MxU32*) dest) = RGB8888_CREATE(color[2], color[1], color[0], 255); + break; + } } } + + SetupCopyRect(&ddsd); + g_fakeTranstionSurface->Unlock(ddsd.lpSurface); + + RECT srcRect = {0, 0, 64, 48}; + m_ddSurface->Blt(&g_fullScreenRect, g_fakeTranstionSurface, &srcRect, DDBLT_WAIT | DDBLT_KEYSRC, NULL); + + m_animationTimer++; } - - SetupCopyRect(&ddsd); - g_fakeTranstionSurface->Unlock(ddsd.lpSurface); - - RECT srcRect = {0, 0, 64, 48}; - m_ddSurface->Blt(&g_fullScreenRect, g_fakeTranstionSurface, &srcRect, DDBLT_WAIT, NULL); } - - m_animationTimer++; }