mirror of https://github.com/stella-emu/stella.git
Cleaned up some debugging code from the last commit, and removed remaining
scaler stuff. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@1211 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
839bdb0c5f
commit
0bac94e94f
|
@ -27,7 +27,6 @@ _build_cheats=yes
|
||||||
_build_static=no
|
_build_static=no
|
||||||
_build_profile=no
|
_build_profile=no
|
||||||
_build_atarivox=no
|
_build_atarivox=no
|
||||||
_build_scalers=no
|
|
||||||
|
|
||||||
# more defaults
|
# more defaults
|
||||||
_ranlib=ranlib
|
_ranlib=ranlib
|
||||||
|
@ -268,8 +267,6 @@ Optional Features:
|
||||||
--disable-cheats
|
--disable-cheats
|
||||||
--enable-atarivox enable/disable AtariVox support [disabled]
|
--enable-atarivox enable/disable AtariVox support [disabled]
|
||||||
--disable-atarivox
|
--disable-atarivox
|
||||||
--enable-scalers enable/disable video scalers support [disabled]
|
|
||||||
--disable-scalers
|
|
||||||
--enable-shared build shared binary [enabled]
|
--enable-shared build shared binary [enabled]
|
||||||
--enable-static build static binary (if possible) [disabled]
|
--enable-static build static binary (if possible) [disabled]
|
||||||
--disable-static
|
--disable-static
|
||||||
|
@ -278,7 +275,6 @@ Optional Features:
|
||||||
|
|
||||||
Optional Libraries:
|
Optional Libraries:
|
||||||
--with-zlib-prefix=DIR Prefix where zlib is installed (optional)
|
--with-zlib-prefix=DIR Prefix where zlib is installed (optional)
|
||||||
--disable-zlib disable zlib (compression) support [autodetect]
|
|
||||||
|
|
||||||
--with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional)
|
--with-sdl-prefix=DIR Prefix where the sdl-config script is installed (optional)
|
||||||
|
|
||||||
|
@ -316,10 +312,6 @@ for ac_option in $@; do
|
||||||
--disable-cheats) _build_cheats=no ;;
|
--disable-cheats) _build_cheats=no ;;
|
||||||
--enable-atarivox) _build_atarivox=yes ;;
|
--enable-atarivox) _build_atarivox=yes ;;
|
||||||
--disable-atarivox) _build_atarivox=no ;;
|
--disable-atarivox) _build_atarivox=no ;;
|
||||||
--enable-scalers) _build_scalers=yes ;;
|
|
||||||
--disable-scalers) _build_scalers=no ;;
|
|
||||||
--enable-zlib) _zlib=yes ;;
|
|
||||||
--disable-zlib) _zlib=no ;;
|
|
||||||
--enable-nasm) _nasm=yes ;;
|
--enable-nasm) _nasm=yes ;;
|
||||||
--disable-nasm) _nasm=no ;;
|
--disable-nasm) _nasm=no ;;
|
||||||
--enable-shared) _build_static=no ;;
|
--enable-shared) _build_static=no ;;
|
||||||
|
@ -637,7 +629,12 @@ int main(void) { return strcmp(ZLIB_VERSION, zlibVersion()); }
|
||||||
EOF
|
EOF
|
||||||
cc_check $LDFLAGS $CXXFLAGS $ZLIB_CFLAGS $ZLIB_LIBS -lz && _zlib=yes
|
cc_check $LDFLAGS $CXXFLAGS $ZLIB_CFLAGS $ZLIB_LIBS -lz && _zlib=yes
|
||||||
fi
|
fi
|
||||||
echo "$_zlib"
|
if test "$_zlib" = yes ; then
|
||||||
|
echo "$_zlib"
|
||||||
|
else
|
||||||
|
echo "none found!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# Check for GL
|
# Check for GL
|
||||||
|
@ -744,20 +741,6 @@ else
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$_build_scalers" = "yes" ; then
|
|
||||||
if test "$_build_gl" = "yes" ; then
|
|
||||||
echo_n " Scaler support enabled in OpenGL mode"
|
|
||||||
echo
|
|
||||||
else
|
|
||||||
echo_n " Scaler support disabled (OpenGL not available)"
|
|
||||||
echo
|
|
||||||
_build_scalers=no
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo_n " Scaler support disabled"
|
|
||||||
echo
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$_nasm" = yes ; then
|
if test "$_nasm" = yes ; then
|
||||||
echo_n " NASM support enabled for x86 assembly code"
|
echo_n " NASM support enabled for x86 assembly code"
|
||||||
echo
|
echo
|
||||||
|
@ -798,7 +781,6 @@ DBGGUI="$SRC/debugger/gui"
|
||||||
YACC="$SRC/yacc"
|
YACC="$SRC/yacc"
|
||||||
CHEAT="$SRC/cheat"
|
CHEAT="$SRC/cheat"
|
||||||
ATARIVOX="$SRC/emucore/rsynth"
|
ATARIVOX="$SRC/emucore/rsynth"
|
||||||
SCALER="$SRC/common/scaler"
|
|
||||||
|
|
||||||
INCLUDES="-I$CORE -I$CORE/m6502/src -I$CORE/m6502/src/bspf/src -I$COMMON -I$GUI"
|
INCLUDES="-I$CORE -I$CORE/m6502/src -I$CORE/m6502/src/bspf/src -I$COMMON -I$GUI"
|
||||||
|
|
||||||
|
@ -904,12 +886,6 @@ if test "$_build_atarivox" = yes ; then
|
||||||
INCLUDES="$INCLUDES -I$ATARIVOX"
|
INCLUDES="$INCLUDES -I$ATARIVOX"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$_build_scalers" = yes ; then
|
|
||||||
DEFINES="$DEFINES -DSCALER_SUPPORT"
|
|
||||||
MODULES="$MODULES $SCALER"
|
|
||||||
INCLUDES="$INCLUDES -I$SCALER"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$_build_profile" = no ; then
|
if test "$_build_profile" = no ; then
|
||||||
_build_profile=
|
_build_profile=
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGL.cxx,v 1.75 2006-12-13 19:13:32 stephena Exp $
|
// $Id: FrameBufferGL.cxx,v 1.76 2006-12-13 22:46:28 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifdef DISPLAY_OPENGL
|
#ifdef DISPLAY_OPENGL
|
||||||
|
@ -90,15 +90,15 @@ static void (APIENTRY* p_glTexParameteri)( GLenum, GLenum, GLint );
|
||||||
FrameBufferGL::FrameBufferGL(OSystem* osystem)
|
FrameBufferGL::FrameBufferGL(OSystem* osystem)
|
||||||
: FrameBuffer(osystem),
|
: FrameBuffer(osystem),
|
||||||
myTexture(NULL),
|
myTexture(NULL),
|
||||||
|
myHaveTexRectEXT(false),
|
||||||
|
myHaveAppleCStorageEXT(false),
|
||||||
|
myHaveAppleTexRangeEXT(false),
|
||||||
myScreenmode(0),
|
myScreenmode(0),
|
||||||
myScreenmodeCount(0),
|
myScreenmodeCount(0),
|
||||||
myFilterParamName("GL_NEAREST"),
|
myFilterParamName("GL_NEAREST"),
|
||||||
myZoomLevel(1),
|
myZoomLevel(1),
|
||||||
myFSScaleFactor(1.0),
|
myFSScaleFactor(1.0),
|
||||||
myDirtyFlag(true),
|
myDirtyFlag(true)
|
||||||
myHaveTexRectEXT(false),
|
|
||||||
myHaveAppleCStorageEXT(false),
|
|
||||||
myHaveAppleTexRangeEXT(false)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,7 +291,6 @@ bool FrameBufferGL::createScreen()
|
||||||
cerr << "ERROR: Unable to open SDL window: " << SDL_GetError() << endl;
|
cerr << "ERROR: Unable to open SDL window: " << SDL_GetError() << endl;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
myUse16Bit = (myDepth == 15 || myDepth == 16);
|
|
||||||
|
|
||||||
// Check for some extensions that can potentially speed up operation
|
// Check for some extensions that can potentially speed up operation
|
||||||
const char* extensions = (const char *) p_glGetString(GL_EXTENSIONS);
|
const char* extensions = (const char *) p_glGetString(GL_EXTENSIONS);
|
||||||
|
@ -526,10 +525,9 @@ void FrameBufferGL::drawChar(const GUI::Font* font, uInt8 chr,
|
||||||
uInt16 mask = 0x8000;
|
uInt16 mask = 0x8000;
|
||||||
|
|
||||||
for(int x = 0; x < w; ++x, mask >>= 1)
|
for(int x = 0; x < w; ++x, mask >>= 1)
|
||||||
{
|
|
||||||
if(ptr & mask)
|
if(ptr & mask)
|
||||||
buffer[x] = (uInt16) myDefPalette[color];
|
buffer[x] = (uInt16) myDefPalette[color];
|
||||||
}
|
|
||||||
buffer += myBuffer.pitch;
|
buffer += myBuffer.pitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -544,10 +542,9 @@ void FrameBufferGL::drawBitmap(uInt32* bitmap, Int32 tx, Int32 ty,
|
||||||
{
|
{
|
||||||
uInt32 mask = 0xF0000000;
|
uInt32 mask = 0xF0000000;
|
||||||
for(int x = 0; x < 8; ++x, mask >>= 4)
|
for(int x = 0; x < 8; ++x, mask >>= 4)
|
||||||
{
|
|
||||||
if(bitmap[y] & mask)
|
if(bitmap[y] & mask)
|
||||||
buffer[x] = (uInt16) myDefPalette[color];
|
buffer[x] = (uInt16) myDefPalette[color];
|
||||||
}
|
|
||||||
buffer += myBuffer.pitch;
|
buffer += myBuffer.pitch;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -618,26 +615,15 @@ bool FrameBufferGL::createTextures()
|
||||||
// Create a texture that best suits the current display depth and system
|
// Create a texture that best suits the current display depth and system
|
||||||
// This code needs to be Apple-specific, otherwise performance is
|
// This code needs to be Apple-specific, otherwise performance is
|
||||||
// terrible on a Mac Mini
|
// terrible on a Mac Mini
|
||||||
// if(myUse16Bit)
|
|
||||||
{
|
|
||||||
#if defined(MAC_OSX)
|
#if defined(MAC_OSX)
|
||||||
myTexture = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
myTexture = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
||||||
myBuffer.texture_width, myBuffer.texture_height, 16,
|
myBuffer.texture_width, myBuffer.texture_height, 16,
|
||||||
0x00007c00, 0x000003e0, 0x0000001f, 0x00000000);
|
0x00007c00, 0x000003e0, 0x0000001f, 0x00000000);
|
||||||
#else
|
#else
|
||||||
myTexture = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
myTexture = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
||||||
myBuffer.texture_width, myBuffer.texture_height, 16,
|
myBuffer.texture_width, myBuffer.texture_height, 16,
|
||||||
0x0000f800, 0x000007e0, 0x0000001f, 0x00000000);
|
0x0000f800, 0x000007e0, 0x0000001f, 0x00000000);
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
/*
|
|
||||||
else
|
|
||||||
{
|
|
||||||
myTexture = SDL_CreateRGBSurface(SDL_SWSURFACE,
|
|
||||||
myBuffer.texture_width, myBuffer.texture_height, 32,
|
|
||||||
0x00ff0000, 0x0000ff00, 0x000000ff, 0x00000000);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
if(myTexture == NULL)
|
if(myTexture == NULL)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -683,26 +669,15 @@ bool FrameBufferGL::createTextures()
|
||||||
|
|
||||||
// Finally, create the texture in the most optimal format
|
// Finally, create the texture in the most optimal format
|
||||||
GLenum tex_intformat;
|
GLenum tex_intformat;
|
||||||
// if(myUse16Bit)
|
|
||||||
{
|
|
||||||
#if defined (MAC_OSX)
|
#if defined (MAC_OSX)
|
||||||
tex_intformat = GL_RGB5;
|
tex_intformat = GL_RGB5;
|
||||||
myBuffer.format = GL_BGRA;
|
myBuffer.format = GL_BGRA;
|
||||||
myBuffer.type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
myBuffer.type = GL_UNSIGNED_SHORT_1_5_5_5_REV;
|
||||||
#else
|
#else
|
||||||
tex_intformat = GL_RGB;
|
tex_intformat = GL_RGB;
|
||||||
myBuffer.format = GL_RGB;
|
myBuffer.format = GL_RGB;
|
||||||
myBuffer.type = GL_UNSIGNED_SHORT_5_6_5;
|
myBuffer.type = GL_UNSIGNED_SHORT_5_6_5;
|
||||||
#endif
|
#endif
|
||||||
}
|
|
||||||
/*
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tex_intformat = GL_RGBA8;
|
|
||||||
myBuffer.format = GL_BGRA;
|
|
||||||
myBuffer.type = GL_UNSIGNED_INT_8_8_8_8_REV;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
p_glTexImage2D(myBuffer.target, 0, tex_intformat,
|
p_glTexImage2D(myBuffer.target, 0, tex_intformat,
|
||||||
myBuffer.texture_width, myBuffer.texture_height, 0,
|
myBuffer.texture_width, myBuffer.texture_height, 0,
|
||||||
myBuffer.format, myBuffer.type, myBuffer.pixels);
|
myBuffer.format, myBuffer.type, myBuffer.pixels);
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBufferGL.hxx,v 1.39 2006-12-13 17:09:09 stephena Exp $
|
// $Id: FrameBufferGL.hxx,v 1.40 2006-12-13 22:46:28 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_GL_HXX
|
#ifndef FRAMEBUFFER_GL_HXX
|
||||||
|
@ -36,7 +36,7 @@ class GUI::Font;
|
||||||
This class implements an SDL OpenGL framebuffer.
|
This class implements an SDL OpenGL framebuffer.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: FrameBufferGL.hxx,v 1.39 2006-12-13 17:09:09 stephena Exp $
|
@version $Id: FrameBufferGL.hxx,v 1.40 2006-12-13 22:46:28 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBufferGL : public FrameBuffer
|
class FrameBufferGL : public FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -240,6 +240,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
// Points to the current texture data
|
// Points to the current texture data
|
||||||
SDL_Surface* myTexture;
|
SDL_Surface* myTexture;
|
||||||
|
|
||||||
|
// Holds all items specifically needed by GL commands
|
||||||
struct glBufferType
|
struct glBufferType
|
||||||
{
|
{
|
||||||
GLuint texture;
|
GLuint texture;
|
||||||
|
@ -250,7 +251,7 @@ class FrameBufferGL : public FrameBuffer
|
||||||
GLenum target;
|
GLenum target;
|
||||||
GLenum format;
|
GLenum format;
|
||||||
GLenum type;
|
GLenum type;
|
||||||
GLint filter; // The texture filtering to use
|
GLint filter;
|
||||||
|
|
||||||
void* pixels;
|
void* pixels;
|
||||||
int width, height;
|
int width, height;
|
||||||
|
@ -258,7 +259,8 @@ class FrameBufferGL : public FrameBuffer
|
||||||
};
|
};
|
||||||
glBufferType myBuffer;
|
glBufferType myBuffer;
|
||||||
|
|
||||||
bool myUse16Bit;
|
// Optional GL extensions that may increase performance
|
||||||
|
bool myHaveTexRectEXT, myHaveAppleCStorageEXT, myHaveAppleTexRangeEXT;
|
||||||
|
|
||||||
// The possible OpenGL screenmodes to use
|
// The possible OpenGL screenmodes to use
|
||||||
SDL_Rect** myScreenmode;
|
SDL_Rect** myScreenmode;
|
||||||
|
@ -285,9 +287,6 @@ class FrameBufferGL : public FrameBuffer
|
||||||
// TODO - will be removed when textured dirty rect support is added
|
// TODO - will be removed when textured dirty rect support is added
|
||||||
bool myDirtyFlag;
|
bool myDirtyFlag;
|
||||||
|
|
||||||
// Optional extensions that may increase performance
|
|
||||||
bool myHaveTexRectEXT, myHaveAppleCStorageEXT, myHaveAppleTexRangeEXT;
|
|
||||||
|
|
||||||
// Indicates if the OpenGL functions have been properly loaded
|
// Indicates if the OpenGL functions have been properly loaded
|
||||||
static bool myFuncsLoaded;
|
static bool myFuncsLoaded;
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBuffer.cxx,v 1.108 2006-12-13 00:05:46 stephena Exp $
|
// $Id: FrameBuffer.cxx,v 1.109 2006-12-13 22:46:28 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
@ -698,58 +698,13 @@ void FrameBuffer::setAvailableScalers()
|
||||||
{
|
{
|
||||||
/** Different emulation modes support different scalers, and the size
|
/** Different emulation modes support different scalers, and the size
|
||||||
of the current desktop also determines how much a window can be
|
of the current desktop also determines how much a window can be
|
||||||
zoomed. For now, there are two separate scaler lists; one for
|
zoomed. */
|
||||||
normal emulation mode (and modes that have the TIA in the background),
|
|
||||||
and one for standard GUI modes (modes that bypass drawMediaSource).
|
|
||||||
For reasons of efficiency, only zooming is supported in GUI mode. Also,
|
|
||||||
it doesn't really make sense to use high quality scalers on text-only
|
|
||||||
windows. */
|
|
||||||
|
|
||||||
EventHandler::State state = myOSystem->eventHandler().state();
|
|
||||||
int maxsize = maxWindowSizeForScreen();
|
int maxsize = maxWindowSizeForScreen();
|
||||||
myScalerList.clear();
|
myScalerList.clear();
|
||||||
|
|
||||||
bool inTIAMode = (state == EventHandler::S_EMULATE ||
|
for(int i = 0; i < kScalerListSize; ++i)
|
||||||
state == EventHandler::S_MENU ||
|
if(ourScalers[i].zoom <= maxsize)
|
||||||
state == EventHandler::S_CMDMENU);
|
myScalerList.push_back(&ourScalers[i]);
|
||||||
|
|
||||||
// Next, determine which mode we're in and update the appropriate scaler list
|
|
||||||
if(type() == kSoftBuffer)
|
|
||||||
{
|
|
||||||
if(inTIAMode)
|
|
||||||
{
|
|
||||||
for(int i = 0; i < kTIAScalerListSize; ++i)
|
|
||||||
if(ourTIAScalers[i].scale == 1 && ourTIAScalers[i].zoom <= maxsize)
|
|
||||||
myScalerList.push_back(&ourTIAScalers[i]);
|
|
||||||
}
|
|
||||||
else // UI mode
|
|
||||||
{
|
|
||||||
for(int i = 0; i < kUIScalerListSize; ++i)
|
|
||||||
if(ourUIScalers[i].scale == 1 && ourUIScalers[i].zoom <= maxsize)
|
|
||||||
myScalerList.push_back(&ourTIAScalers[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if(type() == kGLBuffer)
|
|
||||||
{
|
|
||||||
if(inTIAMode)
|
|
||||||
{
|
|
||||||
#ifdef SCALER_SUPPORT
|
|
||||||
for(int i = 0; i < kTIAScalerListSize; ++i)
|
|
||||||
if(ourTIAScalers[i].scale <= maxsize && ourTIAScalers[i].zoom <= maxsize)
|
|
||||||
myScalerList.push_back(&ourTIAScalers[i]);
|
|
||||||
#else
|
|
||||||
for(int i = 0; i < kTIAScalerListSize; ++i)
|
|
||||||
if(ourTIAScalers[i].scale == 1 && ourTIAScalers[i].zoom <= maxsize)
|
|
||||||
myScalerList.push_back(&ourTIAScalers[i]);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
else // UI mode
|
|
||||||
{
|
|
||||||
for(int i = 0; i < kUIScalerListSize; ++i)
|
|
||||||
if(ourUIScalers[i].scale == 1 && ourUIScalers[i].zoom <= maxsize)
|
|
||||||
myScalerList.push_back(&ourTIAScalers[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
|
@ -787,7 +742,6 @@ void FrameBuffer::getScaler(Scaler& scaler, int direction, const string& name)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Otherwise, get the largest scaler that's available
|
// Otherwise, get the largest scaler that's available
|
||||||
// FIXME - this needs to be fixed for high-quality scalers
|
|
||||||
scaler = *(myScalerList[myScalerList.size()-1]);
|
scaler = *(myScalerList[myScalerList.size()-1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -821,27 +775,11 @@ const uInt8 FrameBuffer::ourGUIColors[kNumColors-256][3] = {
|
||||||
};
|
};
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
||||||
Scaler FrameBuffer::ourUIScalers[kUIScalerListSize] = {
|
Scaler FrameBuffer::ourScalers[kScalerListSize] = {
|
||||||
{ kZOOM1X, "Zoom1x", "zoom1x", 1, 1 },
|
{ kZOOM1X, "Zoom1x", "zoom1x", 1 },
|
||||||
{ kZOOM2X, "Zoom2x", "zoom2x", 2, 1 },
|
{ kZOOM2X, "Zoom2x", "zoom2x", 2 },
|
||||||
{ kZOOM3X, "Zoom3x", "zoom3x", 3, 1 },
|
{ kZOOM3X, "Zoom3x", "zoom3x", 3 },
|
||||||
{ kZOOM4X, "Zoom4x", "zoom4x", 4, 1 },
|
{ kZOOM4X, "Zoom4x", "zoom4x", 4 },
|
||||||
{ kZOOM5X, "Zoom5x", "zoom5x", 5, 1 },
|
{ kZOOM5X, "Zoom5x", "zoom5x", 5 },
|
||||||
{ kZOOM6X, "Zoom6x", "zoom6x", 6, 1 }
|
{ kZOOM6X, "Zoom6x", "zoom6x", 6 }
|
||||||
};
|
|
||||||
|
|
||||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
||||||
Scaler FrameBuffer::ourTIAScalers[kTIAScalerListSize] = {
|
|
||||||
{ kZOOM1X, "Zoom1x", "zoom1x", 1, 1 },
|
|
||||||
{ kZOOM2X, "Zoom2x", "zoom2x", 2, 1 },
|
|
||||||
{ kZOOM3X, "Zoom3x", "zoom3x", 3, 1 },
|
|
||||||
{ kZOOM4X, "Zoom4x", "zoom4x", 4, 1 },
|
|
||||||
{ kZOOM5X, "Zoom5x", "zoom5x", 5, 1 },
|
|
||||||
{ kZOOM6X, "Zoom6x", "zoom6x", 6, 1 },
|
|
||||||
|
|
||||||
{ kSCALE2X, "Scale2x", "scale2x", 1, 2 },
|
|
||||||
{ kSCALE3X, "Scale3x", "scale3x", 1, 3 },
|
|
||||||
|
|
||||||
{ kHQ2X, "HQ2x", "hq2x", 1, 2 },
|
|
||||||
{ kHQ3X, "HQ3x", "hq3x", 1, 3 },
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
||||||
//
|
//
|
||||||
// $Id: FrameBuffer.hxx,v 1.80 2006-12-13 00:05:46 stephena Exp $
|
// $Id: FrameBuffer.hxx,v 1.81 2006-12-13 22:46:28 stephena Exp $
|
||||||
//============================================================================
|
//============================================================================
|
||||||
|
|
||||||
#ifndef FRAMEBUFFER_HXX
|
#ifndef FRAMEBUFFER_HXX
|
||||||
|
@ -77,17 +77,12 @@ enum {
|
||||||
};
|
};
|
||||||
|
|
||||||
// Different types of scalers available
|
// Different types of scalers available
|
||||||
enum ScalerType {
|
enum ScalerType { kZOOM1X, kZOOM2X, kZOOM3X, kZOOM4X, kZOOM5X, kZOOM6X };
|
||||||
kZOOM1X, kZOOM2X, kZOOM3X, kZOOM4X, kZOOM5X, kZOOM6X,
|
|
||||||
kSCALE2X, kSCALE3X, kSCALE4X,
|
|
||||||
kHQ2X, kHQ3X, kHQ4X
|
|
||||||
};
|
|
||||||
struct Scaler {
|
struct Scaler {
|
||||||
ScalerType type;
|
ScalerType type;
|
||||||
const char* name;
|
const char* name;
|
||||||
const char* comparitor;
|
const char* comparitor;
|
||||||
int zoom;
|
int zoom;
|
||||||
int scale;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,7 +93,7 @@ struct Scaler {
|
||||||
All GUI elements (ala ScummVM) are drawn here as well.
|
All GUI elements (ala ScummVM) are drawn here as well.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@author Stephen Anthony
|
||||||
@version $Id: FrameBuffer.hxx,v 1.80 2006-12-13 00:05:46 stephena Exp $
|
@version $Id: FrameBuffer.hxx,v 1.81 2006-12-13 22:46:28 stephena Exp $
|
||||||
*/
|
*/
|
||||||
class FrameBuffer
|
class FrameBuffer
|
||||||
{
|
{
|
||||||
|
@ -214,7 +209,7 @@ class FrameBuffer
|
||||||
@param direction Described above
|
@param direction Described above
|
||||||
@param type The scaler to use if direction is set to 0
|
@param type The scaler to use if direction is set to 0
|
||||||
*/
|
*/
|
||||||
bool scale(int direction, const string& type = "Zoom1x");
|
bool scale(int direction, const string& type = "zoom1x");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the state of the cursor (hidden or grabbed) based on the
|
Sets the state of the cursor (hidden or grabbed) based on the
|
||||||
|
@ -541,7 +536,7 @@ class FrameBuffer
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns a scaler based on the current eventhandler mode and the value of direction.
|
Returns a scaler based on the current eventhandler mode and the value of direction.
|
||||||
If there's any error, default to 'Zoom1x'.
|
If there's any error, default to 'zoom1x'.
|
||||||
direction = -1 means previous scaler based on value in 'name'
|
direction = -1 means previous scaler based on value in 'name'
|
||||||
direction = 0 means actual scaler based on value in 'name'
|
direction = 0 means actual scaler based on value in 'name'
|
||||||
direction = +1 means next scaler based on value in 'name'
|
direction = +1 means next scaler based on value in 'name'
|
||||||
|
@ -576,12 +571,8 @@ class FrameBuffer
|
||||||
// The various scalers available in TIA vs. non-TIA mode
|
// The various scalers available in TIA vs. non-TIA mode
|
||||||
// For the foreseeable future, the UI scalers will be restricted
|
// For the foreseeable future, the UI scalers will be restricted
|
||||||
// from using the more advanced scalers
|
// from using the more advanced scalers
|
||||||
enum {
|
enum { kScalerListSize = 6 };
|
||||||
kUIScalerListSize = 6,
|
static Scaler ourScalers[kScalerListSize];
|
||||||
kTIAScalerListSize = 10
|
|
||||||
};
|
|
||||||
static Scaler ourUIScalers[kUIScalerListSize];
|
|
||||||
static Scaler ourTIAScalers[kTIAScalerListSize];
|
|
||||||
|
|
||||||
// The list of scalers available in the current mode
|
// The list of scalers available in the current mode
|
||||||
Common::Array<Scaler*> myScalerList;
|
Common::Array<Scaler*> myScalerList;
|
||||||
|
|
Loading…
Reference in New Issue