Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Quirks: Hyperspace Delivery Boy should run in 16bpp mode
The LGP port of Hyperspace Delivery Boy has broken colour keys if run in 32-bpp mode (see bug #317). This is because it relies heavily on the imprecise RGB565->RGB888 conversion in earlier SDL 1.2 versions, when running in 32-bpp mode. The game's assets are all in 565 format, and the game converts these to the screen's format on load. It then sets a colour key. This presents a problem, because: - The generic BlitNToN implementation in SDL 1.2 just shifted the values, so the resulting image was not at full range. Magenta became (F800F8). - Early versions of SDL 1.2 fell back to the BlitNToN blitter very frequently: libsdl-org/SDL-1.2@6f4a75d - So, Hyperspace Delivery Boy calls SDL_MapRGB(0xF8, 0, 0xF8) to get the colour key, then sets it on the converted surface. - In SDL 2.0, the blitters now properly do a full-range conversion, so the magenta becomes (FF00FF), which now doesn't match the hardcoded (F800F8). - That being said, in general, it's not guaranteed that SDL_MapRGB() will do the same format conversion as SDL_CovertSurface(), so the "correct" way of handling this is to set the colour key before converting, which works (albeit slowly) in SDL2: libsdl-org/SDL#1854 - Since the conversion behaviour is different even between SDL 1.2 versions, it's not worth trying to imitate it here, so we just force the game to run in 16-bpp mode, which works fine. - (And the game's README recommends it, too.)
- Loading branch information