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

@@ -643,6 +643,7 @@ short GraphicsDlg(stCloneKeenPlus *pCKP)
bool fsmode;
char buf[256];
short retval = 0;
unsigned char autoframeskip = 0;
showmapatpos(90, MAINMENU_X, MENUS_Y, 0, pCKP);
@@ -718,6 +719,24 @@ short GraphicsDlg(stCloneKeenPlus *pCKP)
else
DisplayMenu->addOptionText("Software Rendering");
autoframeskip = g_pVideoDriver->getTargetFPS();
switch(autoframeskip)
{
case 60:
DisplayMenu->addOptionText("Auto-Frameskip : 60 fps"); break;
case 50:
DisplayMenu->addOptionText("Auto-Frameskip : 50 fps"); break;
case 40:
DisplayMenu->addOptionText("Auto-Frameskip : 40 fps"); break;
case 30:
DisplayMenu->addOptionText("Auto-Frameskip : 30 fps"); break;
case 20:
DisplayMenu->addOptionText("Auto-Frameskip : 20 fps"); break;
default:
DisplayMenu->addOptionText("Auto-Frameskip disabled"); break;
};
DisplayMenu->addSeparator();
DisplayMenu->addOptionText("Save and return");
DisplayMenu->addOptionText("Cancel");
@@ -843,7 +862,32 @@ short GraphicsDlg(stCloneKeenPlus *pCKP)
else
DisplayMenu->setOptionText(5,"Software Rendering");
}
else if(selection == 7)
else if(selection == 6)
{
if(autoframeskip < 60 && autoframeskip >= 0)
autoframeskip += 10;
else
autoframeskip = 0;
switch(autoframeskip)
{
case 60:
DisplayMenu->setOptionText(6,"Auto-Frameskip : 60 fps"); break;
case 50:
DisplayMenu->setOptionText(6,"Auto-Frameskip : 50 fps"); break;
case 40:
DisplayMenu->setOptionText(6,"Auto-Frameskip : 40 fps"); break;
case 30:
DisplayMenu->setOptionText(6,"Auto-Frameskip : 30 fps"); break;
case 20:
DisplayMenu->setOptionText(6,"Auto-Frameskip : 20 fps"); break;
case 10:
DisplayMenu->setOptionText(6,"Auto-Frameskip : 10 fps"); break;
default:
DisplayMenu->setOptionText(6,"Auto-Frameskip disabled"); break;
};
}
else if(selection == 8)
{
g_pVideoDriver->stop();
@@ -858,6 +902,7 @@ short GraphicsDlg(stCloneKeenPlus *pCKP)
g_pVideoDriver->setZoom(zoom);
g_pVideoDriver->setFilter(filter);
g_pVideoDriver->setFrameskip(frameskip);
g_pVideoDriver->setTargetFPS(autoframeskip);
saveDriverConfiguration(pCKP);
g_pGraphics->allocScrollBufmem();