mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 08:23:15 +00:00
Add new Scale mode. Thanks Gregory Montoir.
svn-id: r4069
This commit is contained in:
parent
c8cfb1e25a
commit
4cc43b3679
30
2xsai.cpp
30
2xsai.cpp
@ -731,3 +731,33 @@ void Scale_2xSaI(uint8 *srcPtr, uint32 srcPitch, uint8 * /* deltaPtr */ ,
|
|||||||
dstPtr += dstPitch;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -46,7 +46,7 @@ static const char USAGE_STRING[] =
|
|||||||
"\te<mode> - set music engine. see readme.txt for details\n"
|
"\te<mode> - set music engine. see readme.txt for details\n"
|
||||||
"\tr - emulate roland mt32 instruments\n"
|
"\tr - emulate roland mt32 instruments\n"
|
||||||
"\tf - fullscreen mode\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"
|
"\ta - specify game is amiga version\n"
|
||||||
;
|
;
|
||||||
|
|
||||||
@ -179,6 +179,7 @@ int GameDetector::parseGraphicsMode(const char *s) {
|
|||||||
{"2xsai",GFX_2XSAI},
|
{"2xsai",GFX_2XSAI},
|
||||||
{"super2xsai",GFX_SUPER2XSAI},
|
{"super2xsai",GFX_SUPER2XSAI},
|
||||||
{"supereagle",GFX_SUPEREAGLE},
|
{"supereagle",GFX_SUPEREAGLE},
|
||||||
|
{"advmame2x",GFX_ADVMAME2X}
|
||||||
};
|
};
|
||||||
|
|
||||||
const GraphicsModes *gm = gfx_modes;
|
const GraphicsModes *gm = gfx_modes;
|
||||||
|
@ -92,11 +92,8 @@ listed here, nor in the compatibility table on the website, please see below.
|
|||||||
|
|
||||||
Sam and Max:
|
Sam and Max:
|
||||||
- Subgames are not fully functional.
|
- 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):
|
Loom (256 Talkie):
|
||||||
- CD music and voices are not totally syncronised
|
|
||||||
- If you are having random crashes, this is a Windows bug.
|
- If you are having random crashes, this is a Windows bug.
|
||||||
Try copying the data files from CD to your harddisk.
|
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
|
-g2xsai - 2xsai filtering, double screen/window size to 640x480
|
||||||
-gsuper2xsai - Enhanced 2xsai filtering. 640x480 screen/window size
|
-gsuper2xsai - Enhanced 2xsai filtering. 640x480 screen/window size
|
||||||
-gsupereagle - Less blurry than 2xsai, but slower. Also 640x480
|
-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
|
Note that filters are very slow when ScummVM is compiled in a debug
|
||||||
configuration without optimisations. And there is always a speed impact when
|
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/)
|
Claudio Matsuoka - Daily builds (http://scummvm.sf.net/daily/)
|
||||||
Janne Huttunen - Zak256/Indy256/LoomCD actor mask support
|
Janne Huttunen - Zak256/Indy256/LoomCD actor mask support
|
||||||
Jeroen Janssen - Numerous readability and bugfix patches
|
Jeroen Janssen - Numerous readability and bugfix patches
|
||||||
|
Gregory Montoir - AdvanceMAME Scale-2X implementation
|
||||||
Edward Rudd - Fixes for playing MP3 versions of MI1/Loom Audio
|
Edward Rudd - Fixes for playing MP3 versions of MI1/Loom Audio
|
||||||
Daniel Schepler - Final MI1 CD music support
|
Daniel Schepler - Final MI1 CD music support
|
||||||
Tim 'realmz' - Initial MI1 CD music support
|
Tim 'realmz' - Initial MI1 CD music support
|
||||||
Jonathan 'khalek' - Expert weaver in the Loom
|
Jonathan 'khalek' - Expert weaver in the Loom
|
||||||
|
|
||||||
And to all the contributors, users, and beta testers we've missed.
|
And to all the contributors, users, and beta testers we've missed.
|
||||||
Thanks!
|
Thanks!
|
||||||
|
|
||||||
|
6
sdl.cpp
6
sdl.cpp
@ -188,6 +188,9 @@ void Super2xSaI(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr,
|
|||||||
uint8 *dstPtr, uint32 dstPitch, int width, int height);
|
uint8 *dstPtr, uint32 dstPitch, int width, int height);
|
||||||
void SuperEagle(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr,
|
void SuperEagle(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr,
|
||||||
uint8 *dstPtr, uint32 dstPitch, int width, int height);
|
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() {
|
void atexit_proc() {
|
||||||
@ -251,6 +254,9 @@ void OSystem_SDL::load_gfx_mode() {
|
|||||||
case GFX_SUPEREAGLE:
|
case GFX_SUPEREAGLE:
|
||||||
_sai_func = SuperEagle;
|
_sai_func = SuperEagle;
|
||||||
break;
|
break;
|
||||||
|
case GFX_ADVMAME2X:
|
||||||
|
_sai_func = AdvMame2x;
|
||||||
|
break;
|
||||||
|
|
||||||
case GFX_DOUBLESIZE:
|
case GFX_DOUBLESIZE:
|
||||||
scaling = 2;
|
scaling = 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user