https://bugs.winehq.org/show_bug.cgi?id=39171
Bug ID: 39171 Summary: Creatures: White pixels are black. Product: Wine Version: 1.7.50 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: gdi32 Assignee: wine-bugs@winehq.org Reporter: rw92672685@hotmail.com Distribution: Ubuntu
Created attachment 52203 --> https://bugs.winehq.org/attachment.cgi?id=52203 Incorrect colours.
In the 1996 MFC game Creatures, any of the game's graphics that have solid white pixels are rendered black within Wine. Attached is a screenshot comparing Wine and Windows.
The game itself is 8-bit. Looking through the game's uncompressed sprite files, the colour index for these pixels is 255. No other pixels are affected.
I'm using the most recently version of Wine as of this writing, commit; 6056a3f1634a72e181fb3a03ca625aaa7720523e. Outside of needing MFC42, using a clean Wine prefix. Running Ubuntu 15.04.
Let me know if you need any further information.
https://bugs.winehq.org/show_bug.cgi?id=39171
super_man@post.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |super_man@post.com
--- Comment #1 from super_man@post.com --- It may require additional debug channels, but you should copy paste as attachment the console output when you run the game.
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #2 from Richard rw92672685@hotmail.com --- Created attachment 52224 --> https://bugs.winehq.org/attachment.cgi?id=52224 Default Wine debug channel output.
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #3 from Richard rw92672685@hotmail.com --- I've spent sometime on this and found it caused by an undocumented "feature" of GetSystemPaletteEntries().
MSDN makes no mention of it but the function will fill whatever it can of the nEntries buffer with the default system colours, even when returning 0 for failure. The passed device context may even be NULL.
I've attached an initial patch for the fix, along with a simple test program.
This is my second WINE patch so let me know of any problems with it.
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #4 from Richard rw92672685@hotmail.com --- Created attachment 52389 --> https://bugs.winehq.org/attachment.cgi?id=52389 Implement undocumented feature to GetSystemPaletteEntries.
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #5 from Richard rw92672685@hotmail.com --- Created attachment 52391 --> https://bugs.winehq.org/attachment.cgi?id=52391 Test application source code.
https://bugs.winehq.org/show_bug.cgi?id=39171
Richard rw92672685@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #52389|0 |1 is obsolete| |
--- Comment #6 from Richard rw92672685@hotmail.com --- Created attachment 52402 --> https://bugs.winehq.org/attachment.cgi?id=52402 Implement undocumented feature to GetSystemPaletteEntries.
Minor small correction to my previous patch. Declare loop variable outside of for statements, avoiding build error.
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #7 from Bruno Jesus 00cpxxx@gmail.com --- This seems related to a recent patch by Anton Baskanov: http://source.winehq.org/patches/data/114077
The patch was not merged yet.
https://bugs.winehq.org/show_bug.cgi?id=39171
Richard rw92672685@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |baskanov@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #8 from Richard rw92672685@hotmail.com --- Anton's (CC'd) patch is a better implementation then mine.
Only problem I see with it is that GetSystemPaletteEntries should provide the system colors even when the passed DC is NULL.
Creatures isn't doing this but it's something I came across in my testing of it. The test application source I attached would fail with it.
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #9 from Bruno Jesus 00cpxxx@gmail.com --- Should be fixed by http://source.winehq.org/git/wine.git/commitdiff/18dc14ed9aaace447dfd3647031...
If possible retest on wine-git.
https://bugs.winehq.org/show_bug.cgi?id=39171
--- Comment #10 from Richard rw92672685@hotmail.com --- The initial issue is now fixed when using wine-1.7.53-101-g8075101.
However my test program in comment 5 fails, although I'm not aware of any real world application making use of it that way. Should I file another bug for it?
https://bugs.winehq.org/show_bug.cgi?id=39171
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |18dc14ed9aaace447dfd3647031 | |bdb0a8f700c43 Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED
--- Comment #11 from Bruno Jesus 00cpxxx@gmail.com --- (In reply to Richard from comment #10)
The initial issue is now fixed when using wine-1.7.53-101-g8075101.
Thanks for testing.
However my test program in comment 5 fails, although I'm not aware of any real world application making use of it that way. Should I file another bug for it?
Feel free to open the bug, if all windows versions behave the same and since it will be a very simple change I see no reason to ignore the problem.
https://bugs.winehq.org/show_bug.cgi?id=39171
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #12 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.54.