aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--2xsai.cpp30
-rw-r--r--gameDetector.cpp3
-rw-r--r--readme.txt7
-rw-r--r--sdl.cpp6
-rw-r--r--system.h1
5 files changed, 42 insertions, 5 deletions
diff --git a/2xsai.cpp b/2xsai.cpp
index 71b4f75ab8..97ea6ca40d 100644
--- a/2xsai.cpp
+++ b/2xsai.cpp
@@ -731,3 +731,33 @@ void Scale_2xSaI(uint8 *srcPtr, uint32 srcPitch, uint8 * /* deltaPtr */ ,
dstPtr += dstPitch;
}
}
+
+void AdvMame2x(uint8 *srcPtr, uint32 srcPitch, uint8 *null, uint8 *dstPtr, uint32 dstPitch, int width, int height)
+{
+ unsigned int nextlineSrc = srcPitch / sizeof(short);
+ short* p = (short*)srcPtr;
+
+ unsigned nextlineDst = dstPitch / sizeof(short);
+ short* q = (short*)dstPtr;
+
+ for(int j = 0; j < height; ++j) {
+ for(int i = 0; i < width; ++i) {
+ short A = *(p + i - nextlineSrc - 1);
+ short B = *(p + i - nextlineSrc);
+ short C = *(p + i - nextlineSrc + 1);
+ short D = *(p + i - 1);
+ short E = *(p + i );
+ short F = *(p + i + 1);
+ short G = *(p + i + nextlineSrc - 1);
+ short H = *(p + i + nextlineSrc);
+ short I = *(p + i + nextlineSrc + 1);
+
+ *(q + (i << 1)) = D == B && B != F && D != H ? D : E;
+ *(q + (i << 1) + 1) = B == F && B != D && F != H ? F : E;
+ *(q + (i << 1) + nextlineDst) = D == H && D != B && H != F ? D : E;
+ *(q + (i << 1) + nextlineDst + 1) = H == F && D != H && B != F ? F : E;
+ }
+ p += nextlineSrc;
+ q += nextlineDst << 1;
+ }
+}
diff --git a/gameDetector.cpp b/gameDetector.cpp
index da4a530e65..74b8c1afe0 100644
--- a/gameDetector.cpp
+++ b/gameDetector.cpp
@@ -46,7 +46,7 @@ static const char USAGE_STRING[] =
"\te<mode> - set music engine. see readme.txt for details\n"
"\tr - emulate roland mt32 instruments\n"
"\tf - fullscreen mode\n"
- "\tg<mode> - graphics mode. normal,2x,3x,2xsai,super2xsai,supereagle\n"
+ "\tg<mode> - graphics mode. normal,2x,3x,2xsai,super2xsai,supereagle.advmame2x\n"
"\ta - specify game is amiga version\n"
;
@@ -179,6 +179,7 @@ int GameDetector::parseGraphicsMode(const char *s) {
{"2xsai",GFX_2XSAI},
{"super2xsai",GFX_SUPER2XSAI},
{"supereagle",GFX_SUPEREAGLE},
+ {"advmame2x",GFX_ADVMAME2X}
};
const GraphicsModes *gm = gfx_modes;
diff --git a/readme.txt b/readme.txt
index ef2af9a73d..72e75a7d56 100644
--- a/readme.txt
+++ b/readme.txt
@@ -92,11 +92,8 @@ listed here, nor in the compatibility table on the website, please see below.
Sam and Max:
- Subgames are not fully functional.
- - Some overlap may occur in graphics, expecially the intro
- - Music isn't perfect. Some overlap may occur
Loom (256 Talkie):
- - CD music and voices are not totally syncronised
- If you are having random crashes, this is a Windows bug.
Try copying the data files from CD to your harddisk.
@@ -227,6 +224,7 @@ They are:
-g2xsai - 2xsai filtering, double screen/window size to 640x480
-gsuper2xsai - Enhanced 2xsai filtering. 640x480 screen/window size
-gsupereagle - Less blurry than 2xsai, but slower. Also 640x480
+ -gadvmame2x - 640x480 scaling. Doesn't rely on blurring like 2xSAI.
Note that filters are very slow when ScummVM is compiled in a debug
configuration without optimisations. And there is always a speed impact when
@@ -349,11 +347,12 @@ Credits:
Claudio Matsuoka - Daily builds (http://scummvm.sf.net/daily/)
Janne Huttunen - Zak256/Indy256/LoomCD actor mask support
Jeroen Janssen - Numerous readability and bugfix patches
+ Gregory Montoir - AdvanceMAME Scale-2X implementation
Edward Rudd - Fixes for playing MP3 versions of MI1/Loom Audio
Daniel Schepler - Final MI1 CD music support
Tim 'realmz' - Initial MI1 CD music support
Jonathan 'khalek' - Expert weaver in the Loom
-
+
And to all the contributors, users, and beta testers we've missed.
Thanks!
diff --git a/sdl.cpp b/sdl.cpp
index fb23be9fec..fefb9bf93a 100644
--- a/sdl.cpp
+++ b/sdl.cpp
@@ -188,6 +188,9 @@ void Super2xSaI(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr,
uint8 *dstPtr, uint32 dstPitch, int width, int height);
void SuperEagle(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr,
uint8 *dstPtr, uint32 dstPitch, int width, int height);
+void AdvMame2x(uint8 *srcPtr, uint32 srcPitch, uint8 *null,
+ uint8 *dstPtr, uint32 dstPitch, int width, int height);
+
void atexit_proc() {
@@ -251,6 +254,9 @@ void OSystem_SDL::load_gfx_mode() {
case GFX_SUPEREAGLE:
_sai_func = SuperEagle;
break;
+ case GFX_ADVMAME2X:
+ _sai_func = AdvMame2x;
+ break;
case GFX_DOUBLESIZE:
scaling = 2;
diff --git a/system.h b/system.h
index 2581ad49bd..304bb3c721 100644
--- a/system.h
+++ b/system.h
@@ -153,6 +153,7 @@ enum {
GFX_2XSAI = 3,
GFX_SUPER2XSAI = 4,
GFX_SUPEREAGLE = 5,
+ GFX_ADVMAME2X = 6
};