[Scummvm-cvs-logs] SF.net SVN: scummvm: [26371] scummvm/trunk/engines/queen
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Mon Apr 2 20:59:00 CEST 2007
Revision: 26371
http://scummvm.svn.sourceforge.net/scummvm/?rev=26371&view=rev
Author: cyx
Date: 2007-04-02 11:59:00 -0700 (Mon, 02 Apr 2007)
Log Message:
-----------
This should make the game match the original DOS version speed.
Modified Paths:
--------------
scummvm/trunk/engines/queen/input.cpp
scummvm/trunk/engines/queen/input.h
scummvm/trunk/engines/queen/queen.cpp
scummvm/trunk/engines/queen/queen.h
Modified: scummvm/trunk/engines/queen/input.cpp
===================================================================
--- scummvm/trunk/engines/queen/input.cpp 2007-04-02 17:33:23 UTC (rev 26370)
+++ scummvm/trunk/engines/queen/input.cpp 2007-04-02 18:59:00 UTC (rev 26371)
@@ -81,11 +81,10 @@
}
}
-void Input::delay() {
- delay(_fastMode ? DELAY_SHORT : DELAY_NORMAL);
-}
-
void Input::delay(uint amount) {
+ if (_fastMode && amount > DELAY_SHORT) {
+ amount = DELAY_SHORT;
+ }
if (_idleTime < DELAY_SCREEN_BLANKER) {
_idleTime += amount;
}
Modified: scummvm/trunk/engines/queen/input.h
===================================================================
--- scummvm/trunk/engines/queen/input.h 2007-04-02 17:33:23 UTC (rev 26370)
+++ scummvm/trunk/engines/queen/input.h 2007-04-02 18:59:00 UTC (rev 26371)
@@ -46,10 +46,6 @@
Input(Common::Language language, OSystem *system);
- //! calls the other delay() with a value adjusted depending on _fastMode
- void delay();
-
- //! moved QueenEngine::delay() here
void delay(uint amount);
//! convert input to verb
Modified: scummvm/trunk/engines/queen/queen.cpp
===================================================================
--- scummvm/trunk/engines/queen/queen.cpp 2007-04-02 17:33:23 UTC (rev 26370)
+++ scummvm/trunk/engines/queen/queen.cpp 2007-04-02 18:59:00 UTC (rev 26371)
@@ -177,7 +177,12 @@
_graphics->update(_logic->currentRoom());
_logic->update();
- _input->delay();
+ int frameDelay = (_lastUpdateTime + Input::DELAY_NORMAL - _system->getMillis());
+ if (frameDelay <= 0) {
+ frameDelay = 1;
+ }
+ _input->delay(frameDelay);
+ _lastUpdateTime = _system->getMillis();
if (!_resource->isInterview()) {
_display->palCustomScroll(_logic->currentRoom());
@@ -333,7 +338,7 @@
if (ConfMan.hasKey("save_slot") && canLoadOrSave()) {
loadGameState(ConfMan.getInt("save_slot"));
}
- _lastSaveTime = _system->getMillis();
+ _lastSaveTime = _lastUpdateTime = _system->getMillis();
_quit = false;
while (!_quit) {
if (_logic->newRoom() > 0) {
Modified: scummvm/trunk/engines/queen/queen.h
===================================================================
--- scummvm/trunk/engines/queen/queen.h 2007-04-02 17:33:23 UTC (rev 26370)
+++ scummvm/trunk/engines/queen/queen.h 2007-04-02 18:59:00 UTC (rev 26371)
@@ -133,6 +133,7 @@
bool _subtitles;
bool _quit;
uint32 _lastSaveTime;
+ uint32 _lastUpdateTime;
BamScene *_bam;
BankManager *_bankMan;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list