OpenXcom  1.0
Open-source clone of the original X-Com
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Static Public Member Functions | List of all members
OpenXcom::Zoom Class Reference

Static Public Member Functions

static void flipWithZoom (SDL_Surface *src, SDL_Surface *dst, int topBlackBand, int bottomBlackBand, int leftBlackBand, int rightBlackBand, OpenGL *glOut)
 Flip screen given src and dst; might use software or OpenGL. More...
 
static int _zoomSurfaceY (SDL_Surface *src, SDL_Surface *dst, int flipx, int flipy)
 Copy src to dst, resizing as needed. Please don't use flipx or flipy as the optimized functions ignore these parameters. More...
 
static bool haveSSE2 ()
 Check for SSE2 instructions using CPUID.
 

Member Function Documentation

int OpenXcom::Zoom::_zoomSurfaceY ( SDL_Surface *  src,
SDL_Surface *  dst,
int  flipx,
int  flipy 
)
static

Copy src to dst, resizing as needed. Please don't use flipx or flipy as the optimized functions ignore these parameters.

Internal 8-bit Zoomer without smoothing.

Source code originally from SDL_gfx (LGPL) with permission by author.

Zooms 8bit palette/Y 'src' surface to 'dst' surface. Assumes src and dst surfaces are of 8-bit depth. Assumes dst surface was allocated with the correct dimensions.

Parameters
srcThe surface to zoom (input).
dstThe zoomed surface (output).
flipxFlag indicating if the image should be horizontally flipped.
flipyFlag indicating if the image should be vertically flipped.
Returns
0 for success or -1 for error.
void OpenXcom::Zoom::flipWithZoom ( SDL_Surface *  src,
SDL_Surface *  dst,
int  topBlackBand,
int  bottomBlackBand,
int  leftBlackBand,
int  rightBlackBand,
OpenGL glOut 
)
static

Flip screen given src and dst; might use software or OpenGL.

Wrapper around various software and OpenGL screen buffer pushing functions which zoom.

Basically called just from Screen::flip()

Parameters
srcThe surface to zoom (input).
dstThe zoomed surface (output).
topBlackBandSize of top black band in pixels (letterboxing).
bottomBlackBandSize of bottom black band in pixels (letterboxing).
leftBlackBandSize of left black band in pixels (letterboxing).
rightBlackBandSize of right black band in pixels (letterboxing).
glOutOpenGL output.

The documentation for this class was generated from the following files: