From 8514e5244fb8fe217eeecda261d62e144b7452b5 Mon Sep 17 00:00:00 2001 From: Anders Jenbo Date: Thu, 21 Aug 2025 22:46:35 +0200 Subject: [PATCH 1/2] Avoid purple edges on scaled down transparent 2D (#694) --- LEGO1/omni/src/video/mxdisplaysurface.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/LEGO1/omni/src/video/mxdisplaysurface.cpp b/LEGO1/omni/src/video/mxdisplaysurface.cpp index 387b31b8..4ebccb58 100644 --- a/LEGO1/omni/src/video/mxdisplaysurface.cpp +++ b/LEGO1/omni/src/video/mxdisplaysurface.cpp @@ -447,7 +447,8 @@ void MxDisplaySurface::VTable0x28( palette->Release(); } } -#else +#endif + if (m_surfaceDesc.ddpfPixelFormat.dwRGBBitCount != 32) { DDCOLORKEY colorKey; if (m_surfaceDesc.ddpfPixelFormat.dwRGBBitCount == 8) { @@ -458,7 +459,6 @@ void MxDisplaySurface::VTable0x28( } tempSurface->SetColorKey(DDCKEY_SRCBLT, &colorKey); } -#endif DDSURFACEDESC tempDesc; memset(&tempDesc, 0, sizeof(tempDesc)); @@ -571,7 +571,7 @@ void MxDisplaySurface::VTable0x30( MxBITMAPINFO* bmi = p_bitmap->GetBitmapInfo(); if (bmi) { PALETTEENTRY pe[256]; - for (int i = 0; i < 256; i++) { + for (int i = 1; i < 256; i++) { pe[i].peRed = bmi->m_bmiColors[i].rgbRed; pe[i].peGreen = bmi->m_bmiColors[i].rgbGreen; pe[i].peBlue = bmi->m_bmiColors[i].rgbBlue; @@ -758,6 +758,11 @@ LPDIRECTDRAWSURFACE MxDisplaySurface::VTable0x44( pe[i].peBlue = bmi->m_bmiColors[i].rgbBlue; pe[i].peFlags = PC_NONE; } + if (p_transparent) { + pe[0].peRed = 0; + pe[0].peGreen = 0; + pe[0].peBlue = 0; + } LPDIRECTDRAWPALETTE palette = nullptr; if (draw->CreatePalette(DDPCAPS_8BIT | DDPCAPS_ALLOW256, pe, &palette, NULL) == DD_OK && palette) { surface->SetPalette(palette); From 78ee45296bb0b465c42f15eda3d4537564579a76 Mon Sep 17 00:00:00 2001 From: Cookie <52550063+Covkie@users.noreply.github.com> Date: Thu, 21 Aug 2025 19:16:21 -0400 Subject: [PATCH 2/2] system stack size for MxDiskStreamProviderThread (#698) --- LEGO1/omni/src/stream/mxdiskstreamprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp b/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp index b3fad5fc..1f3b7d36 100644 --- a/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp +++ b/LEGO1/omni/src/stream/mxdiskstreamprovider.cpp @@ -32,7 +32,7 @@ MxResult MxDiskStreamProviderThread::Run() MxResult MxDiskStreamProviderThread::StartWithTarget(MxDiskStreamProvider* p_target) { m_target = p_target; - return Start(0x1000, 0); + return Start(0, 0); } // FUNCTION: LEGO1 0x100d0f70