Skip to content

Commit

Permalink
Change: Support decoding 32bpp-only NewGRFs.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterN committed Dec 12, 2023
1 parent ab143e2 commit 13c2e81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sprites.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,14 @@ int decodesprite(FILE *grf, spritestorage *imgpal, spritestorage *imgrgba, sprit
printf("\nError: cannot decode 32bpp sprites to pcx\n");
exit(2);
}
writesprite(false, imgrgba, writer, imgbuffer, info);
writesprite(i == 0, imgrgba, writer, imgbuffer, info);
} else if (info.depth==DEPTH_MASK) {
if (imgrgba == NULL) {
printf("\nError: cannot decode 32bpp sprites to pcx\n");
exit(2);
}
info.depth=DEPTH_32BPP;
writesprite(false, imgrgba, writer, imgbuffer, info);
writesprite(i == 0, imgrgba, writer, imgbuffer, info);
info.depth=DEPTH_MASK;
writesprite(false, imgpal, writer, imgbuffer, info);
} else if (info.depth==DEPTH_8BPP) {
Expand Down

0 comments on commit 13c2e81

Please sign in to comment.