[Scummvm-cvs-logs] SF.net SVN: scummvm:[52229] scummvm/trunk/engines/hugo/parser.cpp
strangerke at users.sourceforge.net
strangerke at users.sourceforge.net
Fri Aug 20 18:25:49 CEST 2010
Revision: 52229
http://scummvm.svn.sourceforge.net/scummvm/?rev=52229&view=rev
Author: strangerke
Date: 2010-08-20 16:25:48 +0000 (Fri, 20 Aug 2010)
Log Message:
-----------
Hugo : Add toggle sound, plus little clean up
Modified Paths:
--------------
scummvm/trunk/engines/hugo/parser.cpp
Modified: scummvm/trunk/engines/hugo/parser.cpp
===================================================================
--- scummvm/trunk/engines/hugo/parser.cpp 2010-08-20 16:02:00 UTC (rev 52228)
+++ scummvm/trunk/engines/hugo/parser.cpp 2010-08-20 16:25:48 UTC (rev 52229)
@@ -82,26 +82,27 @@
}
break;
case Common::KEYCODE_F1: // User Help (DOS)
- if (_checkDoubleF1Fl) {
+ if (_checkDoubleF1Fl)
_vm.file().instructions();
- _checkDoubleF1Fl = false;
- } else {
+ else
_vm.screen().userHelp();
- _checkDoubleF1Fl = true;
- }
+ _checkDoubleF1Fl = !_checkDoubleF1Fl;
break;
case Common::KEYCODE_F6: // Inventory
showDosInventory();
break;
case Common::KEYCODE_F8: // Turbo mode
- _config.turboFl ^= 1;
+ _config.turboFl = !_config.turboFl;
break;
case Common::KEYCODE_F2: // Toggle sound
+ _vm.sound().toggleSound();
+ _vm.sound().toggleMusic();
+ break;
case Common::KEYCODE_F3: // Repeat last line
case Common::KEYCODE_F4: // Save game
case Common::KEYCODE_F5: // Restore game
case Common::KEYCODE_F9: // Boss button
- warning("STUB: KeyHandler() - F2-F9 (DOS)");
+ warning("STUB: KeyHandler() - F3-F9 (DOS)");
break;
default: // Any other key
if (!gameStatus.storyModeFl) { // Keyboard disabled
@@ -173,7 +174,7 @@
if ((tick++ % (TPS / BLINKS)) == 0) {
// Strangerke : Useless ?
// updateFl = true; // Force an update
- cursor = cursor == '_' ? ' ' : '_';
+ cursor = (cursor == '_') ? ' ' : '_';
}
// See if recall button pressed
@@ -185,7 +186,7 @@
}
sprintf(_statusLine, ">%s%c", cmdLine, cursor);
- sprintf(_scoreLine, "F1-Help %s Score: %d of %d", (_config.turboFl) ? "T" : " ", _vm.getScore(), _vm.getMaxScore());
+ sprintf(_scoreLine, "F1-Help %s Score: %d of %d Sound %s", (_config.turboFl) ? "T" : " ", _vm.getScore(), _vm.getMaxScore(), (_config.soundFl) ? "On" : "Off");
// See if "look" button pressed
if (gameStatus.lookFl) {
@@ -690,9 +691,9 @@
if (_vm._objects[i].carriedFl) {
len = strlen(_vm._arrayNouns[_vm._objects[i].nounIndex][1]);
if (index++ & 1) /* Right hand column */
- len2 = len > len2 ? len : len2;
+ len2 = (len > len2) ? len : len2;
else
- len1 = len > len1 ? len : len1;
+ len1 = (len > len1) ? len : len1;
}
len1 += 1; /* For gap between columns */
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