[Scummvm-cvs-logs] CVS: scummvm/common/scaler 2xsai.cpp,1.3,1.4 hq2x.cpp,1.6,1.7 hq3x.cpp,1.5,1.6 intern.h,1.7,1.8
Max Horn
fingolfin at users.sourceforge.net
Thu Oct 2 16:31:06 CEST 2003
Update of /cvsroot/scummvm/scummvm/common/scaler
In directory sc8-pr-cvs1:/tmp/cvs-serv25255/scaler
Modified Files:
2xsai.cpp hq2x.cpp hq3x.cpp intern.h
Log Message:
fix scaler compilation for MSVC6. However, the produced code stll seems to be incorrect... Jamieson, maybe the MSVC6_COMPAT should be re-added then after all?
Index: 2xsai.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler/2xsai.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- 2xsai.cpp 1 Oct 2003 16:47:49 -0000 1.3
+++ 2xsai.cpp 2 Oct 2003 23:29:58 -0000 1.4
@@ -47,7 +47,7 @@
#define Q_INTERPOLATE Q_INTERPOLATE<bitFormat>
template<int bitFormat>
-void Super2xSaI(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+void Super2xSaITemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
const uint16 *bP;
uint16 *dP;
const uint32 nextlineSrc = srcPitch >> 1;
@@ -156,7 +156,7 @@
MAKE_WRAPPER(Super2xSaI)
template<int bitFormat>
-void SuperEagle(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+void SuperEagleTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
const uint16 *bP;
uint16 *dP;
const uint32 nextlineSrc = srcPitch >> 1;
@@ -267,7 +267,7 @@
MAKE_WRAPPER(SuperEagle)
template<int bitFormat>
-void _2xSaI(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+void _2xSaITemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
const uint16 *bP;
uint16 *dP;
const uint32 nextlineSrc = srcPitch >> 1;
Index: hq2x.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq2x.cpp,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- hq2x.cpp 1 Oct 2003 16:47:49 -0000 1.6
+++ hq2x.cpp 2 Oct 2003 23:29:58 -0000 1.7
@@ -82,7 +82,7 @@
* Adapted for ScummVM to 16 bit output and optimized by Max Horn.
*/
template<int bitFormat>
-void HQ2x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+void HQ2xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
register int w1, w2, w3, w4, w5, w6, w7, w8, w9;
const uint32 nextlineSrc = srcPitch / sizeof(uint16);
Index: hq3x.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler/hq3x.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- hq3x.cpp 1 Oct 2003 20:59:05 -0000 1.5
+++ hq3x.cpp 2 Oct 2003 23:29:58 -0000 1.6
@@ -85,7 +85,7 @@
* Adapted for ScummVM to 16 bit output and optimized by Max Horn.
*/
template<int bitFormat>
-void HQ3x(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
+void HQ3xTemplate(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) {
register int w1, w2, w3, w4, w5, w6, w7, w8, w9;
const uint32 nextlineSrc = srcPitch / sizeof(uint16);
Index: intern.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/scaler/intern.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- intern.h 2 Oct 2003 23:09:54 -0000 1.7
+++ intern.h 2 Oct 2003 23:29:58 -0000 1.8
@@ -35,9 +35,6 @@
//
#define USE_ALTIVEC 0
-// MSVC6 chokes on all but the most simplistic template usage.
-#ifndef MSVC6_COMPAT
-
template<int bitFormat>
struct ColorMasks {
};
@@ -170,20 +167,12 @@
#define MAKE_WRAPPER(FUNC) \
void FUNC(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { \
if (gBitFormat == 565) \
- FUNC<565>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \
+ FUNC ## Template<565>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \
else \
- FUNC<555>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \
- }
-
-#else // MSVC6_COMPAT is defined
-
-#define MAKE_WRAPPER(FUNC) \
- void FUNC(const uint8 *srcPtr, uint32 srcPitch, uint8 *dstPtr, uint32 dstPitch, int width, int height) { \
- return; \
+ FUNC ## Template<555>(srcPtr, srcPitch, dstPtr, dstPitch, width, height); \
}
-#endif
-
+/** Specifies the currently active 16bit pixel format, 555 or 565. */
extern int gBitFormat;
#endif
More information about the Scummvm-git-logs
mailing list