OpenTrespasser / JurassicParkTrespasser

A git-based fork of the Jurassic Park: Trespasser source code.
101 stars 25 forks source link

32bit color depth support #154

Closed meekee7 closed 3 years ago

meekee7 commented 3 years ago

Support for 32bit color depth is introduced. (See issue #10). This makes it possible to run the game without forcing it into the 16bit color depth compatibility mode. However, support for 16bit remains active at this stage. The change required is surprisingly simple. If we are in 32bit mode, then we force that the backbuffer is created with 16bit. When the buffers are flipped, DirectDraw's blitting automatically takes care of the color conversion.

The only configuration where this trick does not work is D3D mode combined with exclusive fullscreen mode, because here the backbuffer(s) are created indirectly. In this configuration, a warning message is displayed to the player at startup.

This adjustment breaks FMV rendering, screenshots and the pause menu background in certain configurations (usually 32bit + D3D), but all that is easily fixed.