From f992d41e113883d86c295dff3b0dfb4d7c8a13f6 Mon Sep 17 00:00:00 2001 From: gered Date: Mon, 4 Nov 2019 20:27:26 -0500 Subject: [PATCH] add ability for map editor to recognize and load pcx files --- map_edit/m1read.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/map_edit/m1read.c b/map_edit/m1read.c index 30db36f..2ec7287 100644 --- a/map_edit/m1read.c +++ b/map_edit/m1read.c @@ -53,17 +53,25 @@ short LoadBitmap(short BitmapNumber,char *BitmapName,short BitmapType) LoadType = 0; if (!(stricmp(GetExtent(BitmapName),"BBM"))) LoadType = 1; - if (!(stricmp(GetExtent(BitmapName),"GIF"))) LoadType = 2; +if (!(stricmp(GetExtent(BitmapName),"PCX"))) + LoadType = 3; if (LoadType) { - if (LoadType == 1) - bmp = AckReadiff(BitmapName); - else - bmp = AckReadgif(BitmapName); + switch (LoadType) { + case 1: + bmp = AckReadiff(BitmapName); + break; + case 2: + bmp = AckReadgif(BitmapName); + break; + case 3: + bmp = AckReadPCX(BitmapName); + break; + } if (bmp == NULL) {