[Scummvm-cvs-logs] SF.net SVN: scummvm: [32231] scummvm/trunk/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Fri May 23 15:37:56 CEST 2008
Revision: 32231
http://scummvm.svn.sourceforge.net/scummvm/?rev=32231&view=rev
Author: lordhoto
Date: 2008-05-23 06:37:56 -0700 (Fri, 23 May 2008)
Log Message:
-----------
- Added a simple (but yet better) implementation of pauseEngineIntern for Kyra_v1 and Kyra_v2
- Added comments about what game specific details are missing in the pause implementation
Modified Paths:
--------------
scummvm/trunk/engines/kyra/kyra_hof.h
scummvm/trunk/engines/kyra/kyra_lok.h
scummvm/trunk/engines/kyra/kyra_mr.h
scummvm/trunk/engines/kyra/kyra_v1.cpp
scummvm/trunk/engines/kyra/kyra_v1.h
scummvm/trunk/engines/kyra/kyra_v2.cpp
scummvm/trunk/engines/kyra/kyra_v2.h
Modified: scummvm/trunk/engines/kyra/kyra_hof.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_hof.h 2008-05-23 13:05:53 UTC (rev 32230)
+++ scummvm/trunk/engines/kyra/kyra_hof.h 2008-05-23 13:37:56 UTC (rev 32231)
@@ -182,6 +182,10 @@
KyraEngine_HoF(OSystem *system, const GameFlags &flags);
~KyraEngine_HoF();
+ //TODO: proper extended implementation of KyraEngine_v2::pauseEngineIntern.
+ // Here we need to take care of the seqeunce play code (LordHoto *thinks*),
+ // item animation, idle animation and tim player.
+
Screen *screen() { return _screen; }
Screen_v2 *screen_v2() const { return _screen; }
GUI_v2 *gui_v2() const { return _gui; }
Modified: scummvm/trunk/engines/kyra/kyra_lok.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_lok.h 2008-05-23 13:05:53 UTC (rev 32230)
+++ scummvm/trunk/engines/kyra/kyra_lok.h 2008-05-23 13:37:56 UTC (rev 32231)
@@ -113,6 +113,10 @@
KyraEngine_LoK(OSystem *system, const GameFlags &flags);
~KyraEngine_LoK();
+ //TODO: proper extended implementation of KyraEngine_v1::pauseEngineIntern.
+ // _sprites and _seqplayer should be paused here too, to avoid some animation glitches,
+ // also parts of the hardcoded Malcolm fight might need some special handling.
+
Screen *screen() { return _screen; }
Animator_LoK *animator() { return _animator; }
virtual Movie *createWSAMovie();
Modified: scummvm/trunk/engines/kyra/kyra_mr.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_mr.h 2008-05-23 13:05:53 UTC (rev 32230)
+++ scummvm/trunk/engines/kyra/kyra_mr.h 2008-05-23 13:37:56 UTC (rev 32231)
@@ -50,6 +50,11 @@
KyraEngine_MR(OSystem *system, const GameFlags &flags);
~KyraEngine_MR();
+ //TODO: proper extended implementation of KyraEngine_v2::pauseEngineIntern.
+ // Idle animation time, item animations and album animations should be taken
+ // care of, but since those would just produce minor glitches it's not that
+ // important.
+
Screen *screen() { return _screen; }
Screen_v2 *screen_v2() const { return _screen; }
GUI_v2 *gui_v2() const { return _gui; }
Modified: scummvm/trunk/engines/kyra/kyra_v1.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.cpp 2008-05-23 13:05:53 UTC (rev 32230)
+++ scummvm/trunk/engines/kyra/kyra_v1.cpp 2008-05-23 13:37:56 UTC (rev 32231)
@@ -87,6 +87,11 @@
return _debugger;
}
+void KyraEngine_v1::pauseEngineIntern(bool pause) {
+ Engine::pauseEngineIntern(pause);
+ _timer->pause(pause);
+}
+
int KyraEngine_v1::init() {
registerDefaultSettings();
Modified: scummvm/trunk/engines/kyra/kyra_v1.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v1.h 2008-05-23 13:05:53 UTC (rev 32230)
+++ scummvm/trunk/engines/kyra/kyra_v1.h 2008-05-23 13:37:56 UTC (rev 32231)
@@ -109,6 +109,8 @@
::GUI::Debugger *getDebugger();
+ virtual void pauseEngineIntern(bool pause);
+
bool quit() const { return _quitFlag; }
uint8 game() const { return _flags.gameID; }
Modified: scummvm/trunk/engines/kyra/kyra_v2.cpp
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-05-23 13:05:53 UTC (rev 32230)
+++ scummvm/trunk/engines/kyra/kyra_v2.cpp 2008-05-23 13:37:56 UTC (rev 32231)
@@ -68,6 +68,8 @@
memset(&_mainCharacter, 0, sizeof(_mainCharacter));
memset(&_mainCharacter.inventory, -1, sizeof(_mainCharacter.inventory));
+
+ _pauseStart = 0;
}
KyraEngine_v2::~KyraEngine_v2() {
@@ -93,6 +95,21 @@
delete[] _screenBuffer;
}
+void KyraEngine_v2::pauseEngineIntern(bool pause) {
+ KyraEngine_v1::pauseEngineIntern(pause);
+
+ if (!pause) {
+ for (int i = 0; i < ARRAYSIZE(_sceneSpecialScriptsTimer); ++i) {
+ if (_sceneSpecialScriptsTimer[i])
+ _sceneSpecialScriptsTimer[i] += _pauseStart;
+ }
+
+ _pauseStart = 0;
+ } else {
+ _pauseStart = _system->getMillis();
+ }
+}
+
void KyraEngine_v2::delay(uint32 amount, bool updateGame, bool isMainLoop) {
debugC(9, kDebugLevelMain, "KyraEngine_v2::delay(%u, %d, %d)", amount, updateGame, isMainLoop);
Modified: scummvm/trunk/engines/kyra/kyra_v2.h
===================================================================
--- scummvm/trunk/engines/kyra/kyra_v2.h 2008-05-23 13:05:53 UTC (rev 32230)
+++ scummvm/trunk/engines/kyra/kyra_v2.h 2008-05-23 13:37:56 UTC (rev 32231)
@@ -75,6 +75,8 @@
KyraEngine_v2(OSystem *system, const GameFlags &flags, const EngineDesc &desc);
~KyraEngine_v2();
+ virtual void pauseEngineIntern(bool pause);
+
virtual Screen_v2 *screen_v2() const = 0;
virtual GUI *gui_v2() const = 0;
@@ -85,6 +87,7 @@
EngineDesc _desc;
// run
+ uint32 _pauseStart;
bool _runFlag;
bool _showOutro;
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