From 5ec5050af2cb6b9e51c3c5482aaf67be3f22c1d4 Mon Sep 17 00:00:00 2001 From: karri Date: Thu, 29 Dec 2022 21:48:28 +0200 Subject: [PATCH] Remove redundant code --- src/sp65/pcx.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/src/sp65/pcx.c b/src/sp65/pcx.c index 519f3bd58..607253c59 100644 --- a/src/sp65/pcx.c +++ b/src/sp65/pcx.c @@ -403,35 +403,18 @@ Bitmap* ReadPCXFile (const Collection* A) } } else { - if (P->BPP == 4) { - /* One plane with 8bpp is indexed */ - for (Y = 0, Px = B->Data; Y < P->Height; ++Y) { + /* One plane with 8bpp is indexed */ + for (Y = 0, Px = B->Data; Y < P->Height; ++Y) { - /* Read the plane */ - ReadPlane (F, P, L); + /* Read the plane */ + ReadPlane (F, P, L); - /* Create pixels */ - for (X = 0; X < P->Width; ++X, ++Px) { - if (L[X] > MaxIdx) { - MaxIdx = L[X]; - } - Px->Index = L[X]; - } - } - } else { - /* One plane with 8bpp is indexed */ - for (Y = 0, Px = B->Data; Y < P->Height; ++Y) { - - /* Read the plane */ - ReadPlane (F, P, L); - - /* Create pixels */ - for (X = 0; X < P->Width; ++X, ++Px) { - if (L[X] > MaxIdx) { - MaxIdx = L[X]; - } - Px->Index = L[X]; + /* Create pixels */ + for (X = 0; X < P->Width; ++X, ++Px) { + if (L[X] > MaxIdx) { + MaxIdx = L[X]; } + Px->Index = L[X]; } } }