[Scummvm-cvs-logs] SF.net SVN: scummvm:[55081] scummvm/trunk/engines/hugo
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Fri Dec 31 23:44:18 CET 2010
Revision: 55081
http://scummvm.svn.sourceforge.net/scummvm/?rev=55081&view=rev
Author: strangerke
Date: 2010-12-31 22:44:16 +0000 (Fri, 31 Dec 2010)
Log Message:
-----------
HUGO: Add CTRL-l and CTRL-s keys used in Win versions.
CTRL-n has been added too, but is currently only a STUB
Modified Paths:
--------------
scummvm/trunk/engines/hugo/parser_v1d.cpp
scummvm/trunk/engines/hugo/parser_v1w.cpp
Modified: scummvm/trunk/engines/hugo/parser_v1d.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser_v1d.cpp 2010-12-31 16:57:48 UTC (rev 55080)
+++ scummvm/trunk/engines/hugo/parser_v1d.cpp 2010-12-31 22:44:16 UTC (rev 55081)
@@ -360,7 +360,12 @@
gameStatus.viewState = V_PLAY;
break;
case Common::KEYCODE_F6: // Inventory
- showDosInventory();
+ if (gameStatus.viewState == V_PLAY) {
+ if (gameStatus.gameOverFl)
+ Utils::gameOverMsg();
+ else
+ showDosInventory();
+ }
break;
case Common::KEYCODE_F8: // Turbo mode
_config.turboFl = !_config.turboFl;
@@ -368,6 +373,61 @@
case Common::KEYCODE_F9: // Boss button
warning("STUB: F9 (DOS) - BossKey");
break;
+ case Common::KEYCODE_l:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ _vm->_file->restoreGame(-1);
+ _vm->_scheduler->restoreScreen(*_vm->_screen_p);
+ gameStatus.viewState = V_PLAY;
+ } else {
+ if (!gameStatus.storyModeFl) { // Keyboard disabled
+ // Add printable keys to ring buffer
+ uint16 bnext = _putIndex + 1;
+ if (bnext >= sizeof(_ringBuffer))
+ bnext = 0;
+ if (bnext != _getIndex) {
+ _ringBuffer[_putIndex] = event.kbd.ascii;
+ _putIndex = bnext;
+ }
+ }
+ }
+ break;
+ case Common::KEYCODE_n:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ warning("STUB: CTRL-N (WIN) - New Game");
+ } else {
+ if (!gameStatus.storyModeFl) { // Keyboard disabled
+ // Add printable keys to ring buffer
+ uint16 bnext = _putIndex + 1;
+ if (bnext >= sizeof(_ringBuffer))
+ bnext = 0;
+ if (bnext != _getIndex) {
+ _ringBuffer[_putIndex] = event.kbd.ascii;
+ _putIndex = bnext;
+ }
+ }
+ }
+ break;
+ case Common::KEYCODE_s:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ if (gameStatus.viewState == V_PLAY) {
+ if (gameStatus.gameOverFl)
+ Utils::gameOverMsg();
+ else
+ _vm->_file->saveGame(-1, Common::String());
+ }
+ } else {
+ if (!gameStatus.storyModeFl) { // Keyboard disabled
+ // Add printable keys to ring buffer
+ uint16 bnext = _putIndex + 1;
+ if (bnext >= sizeof(_ringBuffer))
+ bnext = 0;
+ if (bnext != _getIndex) {
+ _ringBuffer[_putIndex] = event.kbd.ascii;
+ _putIndex = bnext;
+ }
+ }
+ }
+ break;
default: // Any other key
if (!gameStatus.storyModeFl) { // Keyboard disabled
// Add printable keys to ring buffer
Modified: scummvm/trunk/engines/hugo/parser_v1w.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser_v1w.cpp 2010-12-31 16:57:48 UTC (rev 55080)
+++ scummvm/trunk/engines/hugo/parser_v1w.cpp 2010-12-31 22:44:16 UTC (rev 55081)
@@ -128,6 +128,61 @@
case Common::KEYCODE_F9: // Boss button
warning("STUB: F9 (DOS) - BossKey");
break;
+ case Common::KEYCODE_l:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ _vm->_file->restoreGame(-1);
+ _vm->_scheduler->restoreScreen(*_vm->_screen_p);
+ gameStatus.viewState = V_PLAY;
+ } else {
+ if (!gameStatus.storyModeFl) { // Keyboard disabled
+ // Add printable keys to ring buffer
+ uint16 bnext = _putIndex + 1;
+ if (bnext >= sizeof(_ringBuffer))
+ bnext = 0;
+ if (bnext != _getIndex) {
+ _ringBuffer[_putIndex] = event.kbd.ascii;
+ _putIndex = bnext;
+ }
+ }
+ }
+ break;
+ case Common::KEYCODE_n:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ warning("STUB: CTRL-N (WIN) - New Game");
+ } else {
+ if (!gameStatus.storyModeFl) { // Keyboard disabled
+ // Add printable keys to ring buffer
+ uint16 bnext = _putIndex + 1;
+ if (bnext >= sizeof(_ringBuffer))
+ bnext = 0;
+ if (bnext != _getIndex) {
+ _ringBuffer[_putIndex] = event.kbd.ascii;
+ _putIndex = bnext;
+ }
+ }
+ }
+ break;
+ case Common::KEYCODE_s:
+ if (event.kbd.hasFlags(Common::KBD_CTRL)) {
+ if (gameStatus.viewState == V_PLAY) {
+ if (gameStatus.gameOverFl)
+ Utils::gameOverMsg();
+ else
+ _vm->_file->saveGame(-1, Common::String());
+ }
+ } else {
+ if (!gameStatus.storyModeFl) { // Keyboard disabled
+ // Add printable keys to ring buffer
+ uint16 bnext = _putIndex + 1;
+ if (bnext >= sizeof(_ringBuffer))
+ bnext = 0;
+ if (bnext != _getIndex) {
+ _ringBuffer[_putIndex] = event.kbd.ascii;
+ _putIndex = bnext;
+ }
+ }
+ }
+ break;
default: // Any other key
if (!gameStatus.storyModeFl) { // Keyboard disabled
// Add printable keys to ring buffer
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