Main Changes:

- Added automatic frameskip support
- Improved Timers speed

git-svn-id: https://clonekeenplus.svn.sourceforge.net/svnroot/clonekeenplus/cgenius/trunk@6 4df4b0f3-56ce-47cb-b001-ed939b7d65a6
This commit is contained in:
gerstrong
2009-06-07 11:44:08 +00:00
parent 563103b890
commit 8352242dc6
17 changed files with 194 additions and 57 deletions

View File

@@ -55,6 +55,7 @@ CVideoDriver::CVideoDriver() {
Filtermode=1;
Zoom=2;
FrameSkip=2;
m_targetfps = 0; // Disable automatic frameskipping by default
m_opengl = false;
m_opengl_filter = GL_NEAREST;
mp_OpenGL = NULL;
@@ -220,7 +221,7 @@ bool CVideoDriver::createSurfaces(void)
//Set surface alpha
SDL_SetAlpha( FGLayerSurface, SDL_SRCALPHA, 225 );
if(Width == 320)
if(Width == 320 && !m_opengl)
{
g_pLogFile->textOut("Blitsurface = Screen<br>");
BlitSurface = screen;
@@ -244,10 +245,6 @@ bool CVideoDriver::createSurfaces(void)
dstrect.w = GAME_STD_WIDTH;
dstrect.h = GAME_STD_HEIGHT;
// TODO: If OpenGL used, do we still need this?
if(m_opengl) // If OpenGL could be set, initialize the matrices
{
mp_OpenGL = new COpenGL();