Fixed movie scale pitch size for CPU palette conversion

This commit is contained in:
NovaRain
2022-01-20 10:29:00 +08:00
parent 03676d09ee
commit a9f03544d5
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -3,7 +3,7 @@
[Main]
;Set to 1 to enable the built-in High Resolution Patch mode that is similar to the hi-res patch by Mash
;The required settings will be read from f2_res.ini configuration file from the original hi-res patch
;The required settings will be read from the f2_res.ini configuration file of the original hi-res patch
HiResMode=1
;Set to 1 if you want to use command line arguments to tell sfall to use another ini file
+4 -1
View File
@@ -645,6 +645,7 @@ public:
fo::func::buf_to_buf(mveSurface, width, mveDesc.dwHeight, width, (BYTE*)dRect.pBits, dRect.Pitch);
}
} else {
int sPitch = width;
int height = mveDesc.dwHeight;
if (d != 0) { // scale
@@ -653,7 +654,9 @@ public:
height = dst->bottom - dst->top;
HRP::Image::Scale(mveSurface, mveDesc.lPitch, mveDesc.dwHeight, mveScaleSurface, width, height, ResWidth);
mveSurface = mveScaleSurface;
sPitch = ResWidth;
}
int pitch = dRect.Pitch / 4;
@@ -662,7 +665,7 @@ public:
while (height--) {
int x = width;
while (x--) pBits[x] = palette[mveSurface[x]].xRGB;
mveSurface += width;
mveSurface += sPitch;
pBits += pitch;
}
}