Tropico - hardware rendering mode yields corrupted graphics #109
-
The 2001 simulation game Tropico works fine in modern Windows versions using software rendering. However, when hardware rendering is attempted, graphics are mostly corrupted, as seen in the screenshot. Is there a way to use dxwrapper to correct the problem? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 12 replies
-
This issue is almost certainly related to pitch/stride. I have seen this issue before. What version of DirectX does Tropica use? |
Beta Was this translation helpful? Give feedback.
-
The issue is that the game completely ignores the pitch/stride sent by DirectDraw. In newer versions of Windows the surfaces are byte aligned for performance reasons and so the pitch may be larger than the width. In this case some of the game's video data is written to the unused part of the surface. I added a quick fix for this by emulating the lock function and feeding the game a pitch that it is expecting. Here is the updated build: dxwrapper.zip |
Beta Was this translation helpful? Give feedback.
-
Somewhat related, is there a way to use dxwrapper to have the 1280x1024 resolution "boxed in" at the native res of 1920x1080 with black filling in the rest of the screen? Enabling dd7to9 and then these settings yields the correct look, but also results in the mouse cursor having an "offset" / binding to what seems to be a 640x480 box in the upper left corner of the main menu, plus Tropico believes hardware mode is not usable when using dd7to9 without these settings defined. DdrawUseNativeResolution = 1 I can adjust my monitor's settings to display 5:4 aspect ratio instead as a workaround if there's no way around the resolution limitation. Thank you again for your time and effort. I find dxwrapper indispensable for playing Star Trek: Armada (1) as well. |
Beta Was this translation helpful? Give feedback.
The issue is that the game completely ignores the pitch/stride sent by DirectDraw. In newer versions of Windows the surfaces are byte aligned for performance reasons and so the pitch may be larger than the width. In this case some of the game's video data is written to the unused part of the surface.
I added a quick fix for this by emulating the lock function and feeding the game a pitch that it is expecting.
Here is the updated build: dxwrapper.zip