http://bugs.winehq.org/show_bug.cgi?id=27264
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #17 from Stefan Dösinger stefan@codeweavers.com 2011-10-15 10:17:47 CDT --- I see why the game is broken now, and why it worked before, but I don't yet know a proper fix.
The game draws the broken parts of the menu at z = 0.0: err:d3d:position_float4 Position 471.250000 433.000031 0.000000 1.000000
This is right at the near clip plane. If the z would be any less the geometry would be discarded. The game sets ZBIAS to 0x00000001, which is supposed to move the geometry closer to the camera. To get the result in GL we set glPolygonOffset to -1.0. This does cause the geometry to be clipped by the near clipping plane.
Prior to my patch this used to work because we interpreted the DWORD value 0x00000001 as float, which is a really tiny value, much smaller than 1.0. This didn't make sense because even the highest possible ZBIAS(15) would be a way too small offset, so ZBIAS was essentially disabled prior to my patch. Now that we give the app what it asks for it breaks.
I'm not sure why it is working on Windows(or supposed to work, didn't test yet). Most likely it is because it is using pretransformed geometry and ZBIAS isn't applied in that case. Or ZBIAS is applied after clipping(unlikely). Or a zbias value of 1 is supposed to be so small that it doesn't have any effect at all. This will need some tests.
There are some parts of the main menu that still work, e.g. the mouse pointer, the main menu and the new game menu. Those are drawn at z=0.01. What's not working is the fade-in/fade-out animation and the text in the options menu.