diff --git a/src/DETHRACE/common/loading.c b/src/DETHRACE/common/loading.c index 80967ec7..6683e039 100644 --- a/src/DETHRACE/common/loading.c +++ b/src/DETHRACE/common/loading.c @@ -505,18 +505,20 @@ br_pixelmap* LoadPixelmap(char* pName) { end = &pName[strlen(pName)]; } - if ((end - pName) != 4 || memcmp(pName, "none", end - pName) != 0) { - PossibleService(); - PathCat(the_path, gApplication_path, gGraf_specs[gGraf_spec_index].data_dir_name); - PathCat(the_path, the_path, "PIXELMAP"); + if (end - pName == 4 && memcmp(pName, "none", end - pName) == 0) { + return NULL; + } + + PossibleService(); + PathCat(the_path, gApplication_path, gGraf_specs[gGraf_spec_index].data_dir_name); + PathCat(the_path, the_path, "PIXELMAP"); + PathCat(the_path, the_path, pName); + AllowOpenToFail(); + pm = DRPixelmapLoad(the_path); + if (pm == NULL) { + PathCat(the_path, gApplication_path, "PIXELMAP"); PathCat(the_path, the_path, pName); - AllowOpenToFail(); pm = DRPixelmapLoad(the_path); - if (pm == NULL) { - PathCat(the_path, gApplication_path, "PIXELMAP"); - PathCat(the_path, the_path, pName); - pm = DRPixelmapLoad(the_path); - } } return pm; } diff --git a/src/DETHRACE/common/netgame.c b/src/DETHRACE/common/netgame.c index 75f51890..b7c9d5d1 100644 --- a/src/DETHRACE/common/netgame.c +++ b/src/DETHRACE/common/netgame.c @@ -5,6 +5,7 @@ #include "errors.h" #include "globvars.h" #include "globvrpb.h" +#include "grafdata.h" #include "graphics.h" #include "harness/trace.h" #include "loading.h" @@ -417,12 +418,25 @@ void InitNetHeadups(void) { if (gDigits_pix != NULL) { BrMapAdd(gDigits_pix); } + /* The Windows version does not use gIcons_pix_low_res. */ + if (gGraf_data_index != 0) { + SwitchToLoresMode(); + gIcons_pix_low_res = LoadPixelmap("CARICONS.PIX"); + SwitchToRealResolution(); + } else { + gIcons_pix_low_res = gIcons_pix; + } } // IDA: void __cdecl DisposeNetHeadups() void DisposeNetHeadups(void) { LOG_TRACE("()"); + /* Windows version does not use gIcons_pix_low_res. */ + if (gIcons_pix_low_res != NULL && gIcons_pix_low_res != gIcons_pix) { + BrPixelmapFree(gIcons_pix_low_res); + } + if (gIcons_pix != NULL) { BrMapRemove(gIcons_pix); BrPixelmapFree(gIcons_pix); diff --git a/src/DETHRACE/common/racestrt.c b/src/DETHRACE/common/racestrt.c index 3ccae3df..970a2901 100644 --- a/src/DETHRACE/common/racestrt.c +++ b/src/DETHRACE/common/racestrt.c @@ -2561,10 +2561,10 @@ void NetSynchStartDraw(int pCurrent_choice, int pCurrent_mode) { DRPixelmapRectangleMaskedCopy(gBack_screen, gCurrent_graf_data->start_synch_x_0, gCurrent_graf_data->start_synch_top + 1 + gCurrent_graf_data->start_synch_y_pitch * i, - gIcons_pix, + gIcons_pix_low_res, /* DOS version uses low res, Windows version uses normal res */ 0, gNet_players[i].car_index * gCurrent_graf_data->net_head_icon_height, - gIcons_pix->width, + gIcons_pix_low_res->width, /* DOS version uses low res, Windows version uses normal res */ gCurrent_graf_data->net_head_icon_height); TurnOnPaletteConversion(); DrawAnItem__racestrt(