gtrafimenkov / ja2-experiments

Experimenting with Jagged Alliance 2 sources
0 stars 0 forks source link

Debug build doesn't work because the game doesn't support 32bpp graphics mode #31

Open gtrafimenkov opened 1 year ago

gtrafimenkov commented 1 year ago

DirectDraw can be used in Exclusive Mode (full-screen) and Windowed Mode. In Exclusive mode it is possible to configure any bpp (bits per pixel). In Windowed Mode the game has to use the the settings the user has configured (in the past it could be 16bpp, 24bpp, 32bpp, on modern PCs it is most likely 32bpp).

This game was written to support only 16bpp mode.

When the game is started in debug mode it uses Windowed Mode and it doesn't work because 32 bpp is not supported by the game code. The game hangs in GetRGBDistribution procedure at first, but actually all the graphics code needs rework to support 32 bit mode.

gtrafimenkov commented 1 year ago

The game hangs in GetRGBDistribution function when it tries to calculate an impossible task of how to fit 32 bits into 16 bits.

image_2023-03-15_09-27-04

gtrafimenkov commented 1 year ago

Materials that may or may not be useful: