[Scummvm-cvs-logs] SF.net SVN: scummvm:[48996] scummvm/trunk

dhewg at users.sourceforge.net dhewg at users.sourceforge.net
Mon May 10 19:25:13 CEST 2010


Revision: 48996
          http://scummvm.svn.sourceforge.net/scummvm/?rev=48996&view=rev
Author:   dhewg
Date:     2010-05-10 17:25:12 +0000 (Mon, 10 May 2010)

Log Message:
-----------
Revert r48979. Instead, make the HQ scalers depend on the normal ones. Configure reflects that now.

Modified Paths:
--------------
    scummvm/trunk/backends/platform/sdl/graphics.cpp
    scummvm/trunk/backends/platform/sdl/sdl.cpp
    scummvm/trunk/configure
    scummvm/trunk/graphics/module.mk
    scummvm/trunk/graphics/scaler.h

Modified: scummvm/trunk/backends/platform/sdl/graphics.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/graphics.cpp	2010-05-10 00:50:37 UTC (rev 48995)
+++ scummvm/trunk/backends/platform/sdl/graphics.cpp	2010-05-10 17:25:12 UTC (rev 48996)
@@ -45,27 +45,23 @@
 	{"supereagle", "SuperEagle", GFX_SUPEREAGLE},
 	{"advmame2x", "AdvMAME2x", GFX_ADVMAME2X},
 	{"advmame3x", "AdvMAME3x", GFX_ADVMAME3X},
-	{"tv2x", "TV2x", GFX_TV2X},
-	{"dotmatrix", "DotMatrix", GFX_DOTMATRIX},
-#endif
 #ifdef USE_HQ_SCALERS
 	{"hq2x", "HQ2x", GFX_HQ2X},
 	{"hq3x", "HQ3x", GFX_HQ3X},
 #endif
+	{"tv2x", "TV2x", GFX_TV2X},
+	{"dotmatrix", "DotMatrix", GFX_DOTMATRIX},
+#endif
 	{0, 0, 0}
 };
 
 // Table of relative scalers magnitudes
 // [definedScale - 1][scaleFactor - 1]
 static ScalerProc *scalersMagn[3][3] = {
-#if defined(USE_SCALERS)
+#ifdef USE_SCALERS
 	{ Normal1x, AdvMame2x, AdvMame3x },
 	{ Normal1x, Normal1x, Normal1o5x },
 	{ Normal1x, Normal1x, Normal1x }
-#elif defined(USE_HQ_SCALERS)
-	{ Normal1x, HQ2x, HQ3x },
-	{ Normal1x, Normal1x, Normal1x },
-	{ Normal1x, Normal1x, Normal1x }
 #else // remove dependencies on other scalers
 	{ Normal1x, Normal1x, Normal1x },
 	{ Normal1x, Normal1x, Normal1x },
@@ -84,7 +80,7 @@
 		{ GFX_NORMAL, GFX_DOTMATRIX, -1, -1 }
 	};
 
-#if defined(USE_SCALERS) || defined(USE_HQ_SCALERS)
+#ifdef USE_SCALERS
 static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY);
 #endif
 
@@ -335,13 +331,6 @@
 	case GFX_ADVMAME3X:
 		newScaleFactor = 3;
 		break;
-	case GFX_TV2X:
-		newScaleFactor = 2;
-		break;
-	case GFX_DOTMATRIX:
-		newScaleFactor = 2;
-		break;
-#endif // USE_SCALERS
 #ifdef USE_HQ_SCALERS
 	case GFX_HQ2X:
 		newScaleFactor = 2;
@@ -350,6 +339,13 @@
 		newScaleFactor = 3;
 		break;
 #endif
+	case GFX_TV2X:
+		newScaleFactor = 2;
+		break;
+	case GFX_DOTMATRIX:
+		newScaleFactor = 2;
+		break;
+#endif // USE_SCALERS
 
 	default:
 		warning("unknown gfx mode %d", mode);
@@ -399,13 +395,6 @@
 	case GFX_ADVMAME3X:
 		newScalerProc = AdvMame3x;
 		break;
-	case GFX_TV2X:
-		newScalerProc = TV2x;
-		break;
-	case GFX_DOTMATRIX:
-		newScalerProc = DotMatrix;
-		break;
-#endif // USE_SCALERS
 #ifdef USE_HQ_SCALERS
 	case GFX_HQ2X:
 		newScalerProc = HQ2x;
@@ -414,6 +403,13 @@
 		newScalerProc = HQ3x;
 		break;
 #endif
+	case GFX_TV2X:
+		newScalerProc = TV2x;
+		break;
+	case GFX_DOTMATRIX:
+		newScalerProc = DotMatrix;
+		break;
+#endif // USE_SCALERS
 
 	default:
 		error("Unknown gfx mode %d", _videoMode.mode);
@@ -902,7 +898,7 @@
 			r->w = r->w * scale1;
 			r->h = dst_h * scale1;
 
-#if defined(USE_SCALERS) || defined(USE_HQ_SCALERS)
+#ifdef USE_SCALERS
 			if (_videoMode.aspectRatioCorrection && orig_dst_y < height && !_overlayVisible)
 				r->h = stretch200To240((uint8 *) _hwscreen->pixels, dstPitch, r->w, r->h, r->x, r->y, orig_dst_y * scale1);
 #endif
@@ -1114,7 +1110,7 @@
 		h = height - y;
 	}
 
-#if defined(USE_SCALERS) || defined(USE_HQ_SCALERS)
+#ifdef USE_SCALERS
 	if (_videoMode.aspectRatioCorrection && !_overlayVisible && !realCoordinates) {
 		makeRectStretchable(x, y, w, h);
 	}
@@ -1375,7 +1371,7 @@
 	_scalerProc((byte *)(_tmpscreen->pixels) + _tmpscreen->pitch + 2, _tmpscreen->pitch,
 	(byte *)_overlayscreen->pixels, _overlayscreen->pitch, _videoMode.screenWidth, _videoMode.screenHeight);
 
-#if defined(USE_SCALERS) || defined(USE_HQ_SCALERS)
+#ifdef USE_SCALERS
 	if (_videoMode.aspectRatioCorrection)
 		stretch200To240((uint8 *)_overlayscreen->pixels, _overlayscreen->pitch,
 						_videoMode.overlayWidth, _videoMode.screenHeight * _videoMode.scaleFactor, 0, 0, 0);
@@ -1668,7 +1664,7 @@
 		_mouseCurState.vHotY = _mouseCurState.hotY;
 	}
 
-#if defined(USE_SCALERS) || defined(USE_HQ_SCALERS)
+#ifdef USE_SCALERS
 	int rH1 = rH; // store original to pass to aspect-correction function later
 #endif
 
@@ -1706,10 +1702,8 @@
 	// If possible, use the same scaler for the cursor as for the rest of
 	// the game. This only works well with the non-blurring scalers so we
 	// actually only use the 1x, 1.5x, 2x and AdvMame scalers.
-	if (_cursorTargetScale == 1 && (_videoMode.mode == GFX_DOUBLESIZE ||
-									_videoMode.mode == GFX_TRIPLESIZE ||
-									_videoMode.mode == GFX_HQ2X ||
-									_videoMode.mode == GFX_HQ3X))
+
+	if (_cursorTargetScale == 1 && (_videoMode.mode == GFX_DOUBLESIZE || _videoMode.mode == GFX_TRIPLESIZE))
 		scalerProc = _scalerProc;
 	else
 		scalerProc = scalersMagn[_cursorTargetScale - 1][_videoMode.scaleFactor - 1];
@@ -1718,7 +1712,7 @@
 		_mouseOrigSurface->pitch, (byte *)_mouseSurface->pixels, _mouseSurface->pitch,
 		_mouseCurState.w, _mouseCurState.h);
 
-#if defined(USE_SCALERS) || defined(USE_HQ_SCALERS)
+#ifdef USE_SCALERS
 	if (_videoMode.aspectRatioCorrection && _cursorTargetScale == 1)
 		cursorStretch200To240((uint8 *)_mouseSurface->pixels, _mouseSurface->pitch, rW, rH1, 0, 0, 0);
 #endif
@@ -1727,9 +1721,9 @@
 	SDL_UnlockSurface(_mouseOrigSurface);
 }
 
-#if defined(USE_SCALERS) || defined(USE_HQ_SCALERS)
+#ifdef USE_SCALERS
 // Basically it is kVeryFastAndUglyAspectMode of stretch200To240 from
-// graphics/scale/aspect.cpp
+// common/scale/aspect.cpp
 static int cursorStretch200To240(uint8 *buf, uint32 pitch, int width, int height, int srcX, int srcY, int origSrcY) {
 	int maxDstY = real2Aspect(origSrcY + height - 1);
 	int y;

Modified: scummvm/trunk/backends/platform/sdl/sdl.cpp
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl.cpp	2010-05-10 00:50:37 UTC (rev 48995)
+++ scummvm/trunk/backends/platform/sdl/sdl.cpp	2010-05-10 17:25:12 UTC (rev 48996)
@@ -94,7 +94,7 @@
 	_kh = h;
 }
 
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && (defined(USE_SCALERS) || defined(USE_HQ_SCALERS))
+#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS)
 static const size_t AR_COUNT = 4;
 static const char*       desiredAspectRatioAsStrings[AR_COUNT] = {            "auto",            "4/3",            "16/9",            "16/10" };
 static const AspectRatio desiredAspectRatios[AR_COUNT]         = { AspectRatio(0, 0), AspectRatio(4,3), AspectRatio(16,9), AspectRatio(16,10) };
@@ -150,16 +150,12 @@
 	memset(&_transactionDetails, 0, sizeof(_transactionDetails));
 
 	_cksumValid = false;
-#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && (defined(USE_SCALERS) || defined(USE_HQ_SCALERS))
+#if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) && defined(USE_SCALERS)
 	_videoMode.mode = GFX_DOUBLESIZE;
 	_videoMode.scaleFactor = 2;
 	_videoMode.aspectRatioCorrection = ConfMan.getBool("aspect_ratio");
 	_videoMode.desiredAspectRatio = getDesiredAspectRatio();
-#ifdef USE_SCALERS
 	_scalerProc = Normal2x;
-#else
-	_scalerProc = HQ2x;
-#endif
 #else // for small screen platforms
 	_videoMode.mode = GFX_NORMAL;
 	_videoMode.scaleFactor = 1;

Modified: scummvm/trunk/configure
===================================================================
--- scummvm/trunk/configure	2010-05-10 00:50:37 UTC (rev 48995)
+++ scummvm/trunk/configure	2010-05-10 17:25:12 UTC (rev 48996)
@@ -1436,7 +1436,6 @@
 			_need_memalign=yes
 			_backend="dc"
 			_build_scalers="no"
-			_build_hq_scalers="no"
 			_mad="yes"
 			_zlib="yes"
 			add_line_to_config_mk 'ronindir = /usr/local/ronin'
@@ -1447,7 +1446,6 @@
 			_need_memalign=yes
 			_backend="wii"
 			_build_scalers="no"
-			_build_hq_scalers="no"
 			_mt32emu="no"
 			_port_mk="backends/platform/wii/wii.mk"
 			add_line_to_config_mk 'GAMECUBE = 1'
@@ -1574,7 +1572,6 @@
 			_need_memalign=yes
 			_backend="ps2"
 			_build_scalers="no"
-			_build_hq_scalers="no"
 			_mt32emu="no"
 			# HACK to enable mad & zlib (they are not properly detected due to linker issues).
 			# This trick doesn't work for tremor right now, as the PS2 port the resulting library
@@ -1602,7 +1599,6 @@
 			_need_memalign=yes
 			_backend="psp"
 			_build_scalers="no"
-			_build_hq_scalers="no"
 			_mt32emu="no"
 			_port_mk="backends/platform/psp/psp.mk"
 			;;
@@ -1618,8 +1614,6 @@
 			add_line_to_config_mk 'USE_ARM_SCALER_ASM = 1'
 			_backend="samsungtv"
 			_mt32emu="no"
-			_build_scalers="yes"
-			_build_hq_scalers="yes"
 			_vkeybd="yes"
 			;;
 		wii)
@@ -1627,7 +1621,6 @@
 			_need_memalign=yes
 			_backend="wii"
 			_build_scalers="no"
-			_build_hq_scalers="no"
 			_port_mk="backends/platform/wii/wii.mk"
 			add_line_to_config_mk 'GAMECUBE = 0'
 			add_line_to_config_h "#define DEBUG_WII_USBGECKO"
@@ -1913,6 +1906,7 @@
 # Check whether to enable the (hq) scalers
 #
 if test "$_build_scalers" = no ; then
+	_build_hq_scalers=no
 	_def_scalers='#undef USE_SCALERS'
 else
 	_def_scalers='#define USE_SCALERS'
@@ -2318,13 +2312,13 @@
 fi
 
 if test "$_build_scalers" = yes ; then
-	echo_n ", scalers"
+	if test "$_build_hq_scalers" = yes ; then
+		echo_n ", HQ scalers"
+	else
+		echo_n ", scalers"
+	fi
 fi
 
-if test "$_build_hq_scalers" = yes ; then
-	echo_n ", HQ scalers"
-fi
-
 if test "$_mt32emu" = yes ; then
 	echo_n ", MT-32 emu"
 fi

Modified: scummvm/trunk/graphics/module.mk
===================================================================
--- scummvm/trunk/graphics/module.mk	2010-05-10 00:50:37 UTC (rev 48995)
+++ scummvm/trunk/graphics/module.mk	2010-05-10 17:25:12 UTC (rev 48996)
@@ -48,15 +48,8 @@
 	scaler/Normal2xARM.o
 endif
 
-endif
-
 ifdef USE_HQ_SCALERS
-ifndef USE_SCALERS
 MODULE_OBJS += \
-	scaler/aspect.o
-endif
-
-MODULE_OBJS += \
 	scaler/hq2x.o \
 	scaler/hq3x.o
 
@@ -68,5 +61,7 @@
 
 endif
 
+endif
+
 # Include common rules
 include $(srcdir)/rules.mk

Modified: scummvm/trunk/graphics/scaler.h
===================================================================
--- scummvm/trunk/graphics/scaler.h	2010-05-10 00:50:37 UTC (rev 48995)
+++ scummvm/trunk/graphics/scaler.h	2010-05-10 17:25:12 UTC (rev 48996)
@@ -42,6 +42,7 @@
 DECLARE_SCALER(Normal1x);
 
 #ifdef USE_SCALERS
+
 DECLARE_SCALER(Normal2x);
 DECLARE_SCALER(Normal3x);
 DECLARE_SCALER(Normal1o5x);
@@ -55,13 +56,14 @@
 
 DECLARE_SCALER(TV2x);
 DECLARE_SCALER(DotMatrix);
-#endif // #ifdef USE_SCALERS
 
 #ifdef USE_HQ_SCALERS
 DECLARE_SCALER(HQ2x);
 DECLARE_SCALER(HQ3x);
 #endif
 
+#endif // #ifdef USE_SCALERS
+
 // creates a 160x100 thumbnail for 320x200 games
 // and 160x120 thumbnail for 320x240 and 640x480 games
 // only 565 mode


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list