From 00d1d41439491b2a58902b048c2bdd5e02ce88bc Mon Sep 17 00:00:00 2001 From: kreatordxx <> Date: Tue, 30 Mar 2010 03:37:29 +0000 Subject: [PATCH] D1X: Fix black and white swapping when viewing robots in briefings using Mac data; D2X: For Descent 1 briefings, only change the palette to groupa.256 for brief03.pcx - the robot screen. Improves palette use for sdl build --- CHANGELOG.txt | 4 ++++ main/titles.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 49c0a75b8..211931547 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,5 +1,9 @@ D1X-Rebirth Changelog +20100330 +-------- +main/titles.c: Fix black and white swapping when viewing robots in briefings using Mac data + 20100328 -------- main/lighting.c: For casting light from Player-object, smooth out thrust to prevent flickering on high FPS diff --git a/main/titles.c b/main/titles.c index a4dae2e41..0d887555a 100644 --- a/main/titles.c +++ b/main/titles.c @@ -944,6 +944,7 @@ void bald_guy_cheat(int key) } void free_briefing_screen(briefing *br); +extern void swap_0_255(grs_bitmap *bmp); // loads a briefing screen int load_briefing_screen(briefing *br, char *fname) @@ -962,6 +963,16 @@ int load_briefing_screen(briefing *br, char *fname) if ((pcx_error = pcx_read_bitmap(fname, &br->background, BM_LINEAR, gr_palette))!=PCX_ERROR_NONE) Error( "Error loading briefing screen <%s>, PCX load error: %s (%i)\n",fname, pcx_errormsg(pcx_error), pcx_error); + + // Hack: Make sure black parts of robot are shown black + if (MacPig && gr_palette[0] == 63 && + (!stricmp(fname, "brief03.pcx") || + !stricmp(fname, "end01.pcx"))) + { + swap_0_255(&br->background); + gr_palette[0] = gr_palette[1] = gr_palette[2] = 0; + gr_palette[765] = gr_palette[766] = gr_palette[767] = 63; + } show_fullscr(&br->background);