narzoul / DDrawCompat

DirectDraw and Direct3D 1-7 compatibility, performance and visual enhancements for Windows Vista, 7, 8, 10 and 11
BSD Zero Clause License
885 stars 67 forks source link

Shifted menu colors in Claw (1997) #207

Closed PlayNeth closed 1 year ago

PlayNeth commented 1 year ago

Something obscure I stumbled upon while trying out custom levels: image While this is how it should look: image Curious what the issue might be, never seen something like this before. Tested using the latest version of ddrawcompat.

narzoul commented 1 year ago

Actually, the first picture is closer to what it should look like. The game is running in 8-bit (256 colors) exclusive fullscreen mode, so it's allowed to override the 20 static colors that GDI uses for rendering window elements. DWM doesn't respect this and just renders everything in the desktop's color depth, which is usually 32-bits. I'm not sure what it does in Windows 7 if the desktop is set to 8-bit color mode. The game crashes in my Win7 VM so I could only try it in an XP one: claw-xp-classic

The only difference compared to DDrawCompat is that different colors get assigned to the static colors. This might be because DDrawCompat doesn't emulate some palette modifying operations 100% accurately, but it doesn't really matter for this game, because it doesn't preserve the static entries either way, so it's never going to look "right".

This "bug" only affects the CrazyHook modded version of the game btw, the official game versions render the dialog with proper colors. I'm guessing the mod was made for newer systems and wasn't tested on a pre-DWM system.

PlayNeth commented 1 year ago

Fascinating. Had no idea that was a thing exclusive to the crazyhook version. Thanks for the info!