[Scummvm-cvs-logs] CVS: scummvm/backends/wince CEScaler.cpp,1.1,1.2 wince-sdl.cpp,1.2,1.3
Nicolas Bacca
arisme at users.sourceforge.net
Wed Jan 28 01:30:20 CET 2004
Update of /cvsroot/scummvm/scummvm/backends/wince
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21623
Modified Files:
CEScaler.cpp wince-sdl.cpp
Log Message:
Fix 640x480, part 1, perfect fix tomorrow probably :p
Index: CEScaler.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/CEScaler.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CEScaler.cpp 26 Jan 2004 08:20:26 -0000 1.1
+++ CEScaler.cpp 27 Jan 2004 01:29:30 -0000 1.2
@@ -53,9 +53,10 @@
int width, int height) {
uint8 *work;
int i;
+ int dec;
uint16 srcPitch16 = (uint16)(srcPitch / sizeof(uint16));
- while (height--) {
+ while ((height-=2) >= 0) {
i = 0;
work = dstPtr;
@@ -66,10 +67,10 @@
uint16 color3 = *(((const uint16 *)srcPtr) + (i + srcPitch16));
*(((uint16 *)work) + 0) = interpolate16_3<565, 2, 1, 1>(color1, color2, color3);
-
- work += 2 * sizeof(uint16);
+
+ work += sizeof(uint16);
}
- srcPtr += 2 * srcPitch;
+ srcPtr += 2 * srcPitch;
dstPtr += dstPitch;
}
}
Index: wince-sdl.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/wince/wince-sdl.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- wince-sdl.cpp 26 Jan 2004 22:38:07 -0000 1.2
+++ wince-sdl.cpp 27 Jan 2004 01:29:30 -0000 1.3
@@ -653,9 +653,10 @@
register int dst_h = 0;
register int orig_dst_y = 0;
- // Check if the toolbar is overwritten
+ // Check if the toolbar is overwritten
if (!_forceFull && toolbarVisible && r->y + r->h >= 200)
_toolbarHandler.forceRedraw();
+
if (dst_y < _screenHeight) {
dst_h = r->h;
@@ -669,7 +670,7 @@
orig_dst_y = dst_y;
dst_y = real2Aspect(dst_y);
}
-
+
_scaler_proc((byte *)_tmpscreen->pixels + (r->x * 2 + 2) + (r->y + 1) * srcPitch, srcPitch,
(byte *)_hwscreen->pixels + (r->x * 2 * _scaleFactorXm / _scaleFactorXd) + dst_y * dstPitch, dstPitch, r->w, dst_h);
}
@@ -678,7 +679,7 @@
r->x /= _scaleFactorXd;
r->y = dst_y;
r->w *= _scaleFactorXm;
- r->w *= _scaleFactorXd;
+ r->w /= _scaleFactorXd;
r->h = dst_h * _scaleFactorYm / _scaleFactorYd;
/*if (_adjustAspectRatio && orig_dst_y / _scaleFactor < _screenHeight)
@@ -877,6 +878,22 @@
}
while (w % 4) w++;
}
+ else
+ if (_scaler_proc == PocketPCHalf) {
+ // Align on a 2x2 square
+ if (x != 0) {
+ while (x % 2) {
+ x--;
+ w++;
+ }
+ while (y % 2) {
+ y--;
+ h++;
+ }
+ while (w % 2) w++;
+ while (h % 2) h++;
+ }
+ }
OSystem_SDL_Common::add_dirty_rect(x, y, w, h);
}
More information about the Scummvm-git-logs
mailing list