[Scummvm-cvs-logs] CVS: scummvm/sky sky.cpp,1.103,1.104 sky.h,1.48,1.49
Torbj?rn Andersson
eriktorbjorn at users.sourceforge.net
Sun Aug 3 08:51:03 CEST 2003
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1:/tmp/cvs-serv4001
Modified Files:
sky.cpp sky.h
Log Message:
Added "fast mode" (Ctrl-F/Ctrl-G) like the one we have for SCUMM and Simon.
It does not change the game speed setting, because the most likely use (I
think) is to toggle it on briefly, e.g. while travelling the walkways.
Index: sky.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.cpp,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -d -r1.103 -r1.104
--- sky.cpp 2 Aug 2003 00:36:38 -0000 1.103
+++ sky.cpp 3 Aug 2003 15:50:39 -0000 1.104
@@ -93,6 +93,8 @@
_floppyIntro = detector->_floppyIntro;
+ _fastMode = 0;
+
_system->init_size(320, 200);
}
@@ -202,7 +204,12 @@
_lastSaveTime = _system->get_msecs();
while (1) {
- delay(_systemVars.gameSpeed);
+ if (_fastMode & 2)
+ delay(0);
+ else if (_fastMode & 1)
+ delay(10);
+ else
+ delay(_systemVars.gameSpeed);
if (_system->get_msecs() - _lastSaveTime > 5 * 60 * 1000) {
if (_skyControl->loadSaveAllowed()) {
@@ -404,6 +411,17 @@
while (_system->poll_event(&event)) {
switch (event.event_code) {
case OSystem::EVENT_KEYDOWN:
+ if (event.kbd.flags == OSystem::KBD_CTRL) {
+ if (event.kbd.keycode == 'f') {
+ _fastMode ^= 1;
+ break;
+ }
+ if (event.kbd.keycode == 'g') {
+ _fastMode ^= 2;
+ break;
+ }
+ }
+
// Make sure backspace works right (this fixes a small issue on OS X)
if (event.kbd.keycode == 8)
_key_pressed = 8;
Index: sky.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sky.h,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -d -r1.48 -r1.49
--- sky.h 2 Aug 2003 19:55:17 -0000 1.48
+++ sky.h 3 Aug 2003 15:50:39 -0000 1.49
@@ -106,6 +106,8 @@
static SystemVars _systemVars;
protected:
+ byte _fastMode;
+
void logic_engine();
void delay(uint amount);
void go();
More information about the Scummvm-git-logs
mailing list