Fix initial variable setup

This commit is contained in:
jonschz 2025-05-04 10:30:23 +02:00
parent 36536c530b
commit 608faafe9e

View File

@ -375,18 +375,19 @@ void DecodeSS2(LPBITMAPINFOHEADER p_bitmapHeader, BYTE* p_pixelData, BYTE* p_dat
short lines = *data++; short lines = *data++;
short height = p_flcHeader->height; // LINE: BETA10 0x1013e666
// LINE: BETA10 0x1013e66f short row = p_flcHeader->height - yofs - 1;
short row = height - yofs - 1;
do { do {
// LINE: BETA10 0x1013e692
token = *((short*) data); token = *((short*) data);
data += 2; // TODO: likely an otherData assignment data += 2; // TODO: likely an otherData assignment
if (token < 0) { if (token < 0) {
if (token & 0x4000) { if (token & 0x4000) {
// TODO: Make the compiler move this code all the way to the top of the loop
// // LINE: BETA10 0x1013e684
row += token; row += token;
// TODO: otherData assigment // TODO: otherData assigment
continue; continue;
@ -423,9 +424,9 @@ void DecodeSS2(LPBITMAPINFOHEADER p_bitmapHeader, BYTE* p_pixelData, BYTE* p_dat
} }
else { else {
type = -type; type = -type;
// short p_pixel = *((WORD*) data); // removed for stack size short p_pixel = *((WORD*) data); // removed for stack size
data += 2; data += 2;
WritePixelPairs(p_bitmapHeader, p_pixelData, column, row, *((WORD*) data), type >> 1); WritePixelPairs(p_bitmapHeader, p_pixelData, column, row, p_pixel, type >> 1);
column += type; column += type;
} }
} while (--token); } while (--token);