2007-05-30 21:56:52 +00:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
|
|
|
*
|
|
|
|
* ScummVM is the legal property of its developers, whose names
|
|
|
|
* are too numerous to list here. Please refer to the COPYRIGHT
|
|
|
|
* file distributed with this source distribution.
|
2003-06-14 21:18:14 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2005-10-18 01:30:26 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2003-06-14 21:18:14 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2007-09-19 08:40:12 +00:00
|
|
|
|
2006-01-14 09:28:38 +00:00
|
|
|
|
|
|
|
#include "common/str.h"
|
|
|
|
#include "common/util.h"
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
#include "scumm/help.h"
|
|
|
|
#include "scumm/scumm.h"
|
2010-11-23 22:47:20 +00:00
|
|
|
#include "common/translation.h"
|
2003-06-14 21:18:14 +00:00
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
namespace Scumm {
|
|
|
|
|
2003-06-14 21:18:14 +00:00
|
|
|
int ScummHelp::numPages(byte gameId) {
|
|
|
|
switch (gameId) {
|
|
|
|
case GID_MANIAC:
|
|
|
|
case GID_ZAK:
|
|
|
|
return 4;
|
|
|
|
case GID_INDY3:
|
|
|
|
return 6;
|
|
|
|
case GID_LOOM:
|
|
|
|
case GID_MONKEY_EGA:
|
|
|
|
case GID_MONKEY_VGA:
|
|
|
|
case GID_MONKEY:
|
|
|
|
case GID_MONKEY2:
|
|
|
|
case GID_INDY4:
|
2008-01-28 00:14:17 +00:00
|
|
|
case GID_TENTACLE:
|
2003-06-14 21:18:14 +00:00
|
|
|
case GID_SAMNMAX:
|
|
|
|
case GID_DIG:
|
|
|
|
case GID_FT:
|
|
|
|
case GID_CMI:
|
|
|
|
return 3;
|
|
|
|
/* TODO - I don't know the controls for these games
|
|
|
|
case GID_PUTTDEMO:
|
2003-07-15 00:20:04 +00:00
|
|
|
case GID_PUTTPUTT:
|
2005-07-30 21:11:48 +00:00
|
|
|
*/
|
2003-06-14 21:18:14 +00:00
|
|
|
default:
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-05-08 21:49:52 +00:00
|
|
|
#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while (0)
|
2003-06-14 21:18:14 +00:00
|
|
|
#define ADD_TEXT(d) ADD_BIND("",d)
|
|
|
|
#define ADD_LINE ADD_BIND("","")
|
|
|
|
|
2006-01-14 09:28:38 +00:00
|
|
|
void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platform,
|
|
|
|
int page, String &title, String *&key, String *&dsc) {
|
2003-06-14 21:18:14 +00:00
|
|
|
key = new String[HELP_NUM_LINES];
|
|
|
|
dsc = new String[HELP_NUM_LINES];
|
|
|
|
int i = 0;
|
|
|
|
switch (page) {
|
|
|
|
case 1:
|
2010-11-23 22:47:20 +00:00
|
|
|
title = _("Common keyboard commands:");
|
|
|
|
ADD_BIND("F5", _("Save / Load dialog"));
|
2003-07-07 22:33:07 +00:00
|
|
|
if (version >= 5)
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND(".", _("Skip line of text"));
|
|
|
|
ADD_BIND(_("Esc"), _("Skip cutscene"));
|
|
|
|
ADD_BIND(_("Space"), _("Pause game"));
|
2011-03-22 22:07:15 +00:00
|
|
|
ADD_BIND(String(_("Ctrl")) + " 0-9", _("Load game state 1-10"));
|
|
|
|
ADD_BIND(String(_("Alt")) + " 0-9", _("Save game state 1-10"));
|
2003-06-15 11:32:14 +00:00
|
|
|
#ifdef MACOSX
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("Cmd q", _("Quit"));
|
2003-07-15 00:20:04 +00:00
|
|
|
#else
|
2011-03-22 22:07:15 +00:00
|
|
|
ADD_BIND(String(_("Alt")) + " x, " + _("Ctrl") + " z", _("Quit"));
|
2003-06-15 11:32:14 +00:00
|
|
|
#endif
|
2011-03-22 22:07:15 +00:00
|
|
|
ADD_BIND(String(_("Alt")) + " " + _("Enter"), _("Toggle fullscreen"));
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("[, ]", _("Music volume up / down"));
|
|
|
|
ADD_BIND("-, +", _("Text speed slower / faster"));
|
|
|
|
ADD_BIND(_("Enter"), _("Simulate left mouse button"));
|
|
|
|
ADD_BIND(_("Tab"), _("Simulate right mouse button"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case 2:
|
2010-11-23 22:47:20 +00:00
|
|
|
title = _("Special keyboard commands:");
|
|
|
|
ADD_BIND("~, #", _("Show / Hide console"));
|
2011-03-22 22:07:15 +00:00
|
|
|
ADD_BIND(String(_("Ctrl")) + " d", _("Start the debugger"));
|
|
|
|
ADD_BIND(String(_("Ctrl")) + " s", _("Show memory consumption"));
|
|
|
|
ADD_BIND(String(_("Ctrl")) + " f", _("Run in fast mode (*)"));
|
|
|
|
ADD_BIND(String(_("Ctrl")) + " g", _("Run in really fast mode (*)"));
|
|
|
|
ADD_BIND(String(_("Ctrl")) + " m", _("Toggle mouse capture"));
|
|
|
|
ADD_BIND(String(_("Ctrl")) + " " + _("Alt") + " 1-8", _("Switch between graphics filters"));
|
|
|
|
ADD_BIND(String(_("Ctrl")) + " " + _("Alt") + " +, -", _("Increase / Decrease scale factor"));
|
|
|
|
ADD_BIND(String(_("Ctrl")) + " " + _("Alt") + " a", _("Toggle aspect-ratio correction"));
|
2003-06-14 21:18:14 +00:00
|
|
|
ADD_LINE;
|
|
|
|
ADD_LINE;
|
2005-05-17 06:20:50 +00:00
|
|
|
// FIXME: This should use word-wrapping, and should not assume
|
|
|
|
// that the font is mono-spaced.
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_TEXT(_("* Note that using ctrl-f and"));
|
|
|
|
ADD_TEXT(_(" ctrl-g are not recommended"));
|
|
|
|
ADD_TEXT(_(" since they may cause crashes"));
|
2011-05-25 14:31:37 +00:00
|
|
|
ADD_TEXT(_(" or incorrect game behavior."));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case 3:
|
2006-01-23 20:09:25 +00:00
|
|
|
if (gameId == GID_LOOM)
|
2010-11-23 22:47:20 +00:00
|
|
|
title = _("Spinning drafts on the keyboard:");
|
2003-06-14 21:18:14 +00:00
|
|
|
else
|
2010-11-23 22:47:20 +00:00
|
|
|
title = _("Main game controls:");
|
2003-06-14 21:18:14 +00:00
|
|
|
switch (gameId) {
|
|
|
|
case GID_ZAK:
|
|
|
|
case GID_MANIAC:
|
2007-02-13 20:56:48 +00:00
|
|
|
if (platform == Common::kPlatformNES) {
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("q", _("Push"));
|
|
|
|
ADD_BIND("a", _("Pull"));
|
|
|
|
ADD_BIND("z", _("Give"));
|
|
|
|
ADD_BIND("w", _("Open"));
|
|
|
|
ADD_BIND("s", _("Close"));
|
|
|
|
ADD_BIND("x", _("Go to"));
|
|
|
|
ADD_BIND("e", _("Get"));
|
|
|
|
ADD_BIND("d", _("Use"));
|
|
|
|
ADD_BIND("c", _("Read"));
|
|
|
|
ADD_BIND("r", _("New kid"));
|
|
|
|
ADD_BIND("f", _("Turn on"));
|
|
|
|
ADD_BIND("v", _("Turn off"));
|
2005-10-16 22:12:00 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("q", _("Push"));
|
|
|
|
ADD_BIND("a", _("Pull"));
|
|
|
|
ADD_BIND("z", _("Give"));
|
|
|
|
ADD_BIND("w", _("Open"));
|
|
|
|
ADD_BIND("s", _("Close"));
|
|
|
|
ADD_BIND("x", _("Read"));
|
|
|
|
ADD_BIND("e", _("Walk to"));
|
|
|
|
ADD_BIND("d", _("Pick up"));
|
|
|
|
ADD_BIND("c", _("What is"));
|
2003-07-15 00:20:04 +00:00
|
|
|
if (gameId == GID_MANIAC) {
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("r", _("Unlock"));
|
|
|
|
ADD_BIND("f", _("New kid"));
|
2003-07-15 00:20:04 +00:00
|
|
|
} else {
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("r", _("Put on"));
|
|
|
|
ADD_BIND("f", _("Take off"));
|
2003-06-14 21:18:14 +00:00
|
|
|
}
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("v", _("Use"));
|
|
|
|
ADD_BIND("t", _("Turn on"));
|
|
|
|
ADD_BIND("g", _("Turn off"));
|
2003-07-15 00:20:04 +00:00
|
|
|
if (gameId == GID_MANIAC)
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("b", _("Fix"));
|
2003-07-15 00:20:04 +00:00
|
|
|
else
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("b", _("Switch"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_INDY3:
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("q", _("Push"));
|
|
|
|
ADD_BIND("a", _("Pull"));
|
|
|
|
ADD_BIND("z", _("Give"));
|
|
|
|
ADD_BIND("w", _("Open"));
|
|
|
|
ADD_BIND("s", _("Close"));
|
|
|
|
ADD_BIND("x", _("Look"));
|
|
|
|
ADD_BIND("e", _("Walk to"));
|
|
|
|
ADD_BIND("d", _("Pick up"));
|
|
|
|
ADD_BIND("c", _("What is"));
|
|
|
|
ADD_BIND("r", _("Use"));
|
|
|
|
ADD_BIND("f", _("Turn on"));
|
|
|
|
ADD_BIND("v", _("Turn off"));
|
|
|
|
ADD_BIND("t", _("Talk"));
|
|
|
|
ADD_BIND("g", _("Travel"));
|
|
|
|
ADD_BIND("b", _("To Henry / To Indy"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_LOOM:
|
2011-08-20 14:11:47 +00:00
|
|
|
// I18N: These are different musical notes
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("q, c", _("play C minor on distaff"));
|
|
|
|
ADD_BIND("w, d", _("play D on distaff"));
|
|
|
|
ADD_BIND("e, e", _("play E on distaff"));
|
|
|
|
ADD_BIND("r, f", _("play F on distaff"));
|
|
|
|
ADD_BIND("t, g", _("play G on distaff"));
|
|
|
|
ADD_BIND("y, a", _("play A on distaff"));
|
|
|
|
ADD_BIND("u, b", _("play B on distaff"));
|
|
|
|
ADD_BIND("i, C", _("play C major on distaff"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_MONKEY_EGA:
|
|
|
|
case GID_MONKEY_VGA:
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("o", _("Open"));
|
|
|
|
ADD_BIND("c", _("Close"));
|
|
|
|
ADD_BIND("s", _("puSh"));
|
|
|
|
ADD_BIND("y", _("pull (Yank)"));
|
|
|
|
ADD_BIND("w", _("Walk to"));
|
|
|
|
ADD_BIND("p", _("Pick up"));
|
|
|
|
ADD_BIND("t", _("Talk to"));
|
|
|
|
ADD_BIND("g", _("Give"));
|
|
|
|
ADD_BIND("u", _("Use"));
|
|
|
|
ADD_BIND("l", _("Look at"));
|
|
|
|
ADD_BIND("n", _("turn oN"));
|
|
|
|
ADD_BIND("f", _("turn oFf"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_MONKEY:
|
|
|
|
case GID_MONKEY2:
|
|
|
|
case GID_INDY4:
|
|
|
|
case GID_TENTACLE:
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("g", _("Give"));
|
|
|
|
ADD_BIND("o", _("Open"));
|
|
|
|
ADD_BIND("c", _("Close"));
|
|
|
|
ADD_BIND("p", _("Pick up"));
|
|
|
|
ADD_BIND("l", _("Look at"));
|
|
|
|
ADD_BIND("t", _("Talk to"));
|
|
|
|
ADD_BIND("u", _("Use"));
|
|
|
|
ADD_BIND("s", _("puSh"));
|
|
|
|
ADD_BIND("y", _("pull (Yank)"));
|
2006-01-14 09:28:38 +00:00
|
|
|
if (platform == Common::kPlatformSegaCD) {
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND(_("KeyUp"), _("Highlight prev dialogue"));
|
|
|
|
ADD_BIND(_("KeyDown"), _("Highlight next dialogue"));
|
2003-07-15 07:29:41 +00:00
|
|
|
}
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_SAMNMAX:
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("w", _("Walk"));
|
|
|
|
ADD_BIND("t", _("Talk"));
|
|
|
|
ADD_BIND("u", _("Use"));
|
|
|
|
ADD_BIND("i", _("Inventory"));
|
|
|
|
ADD_BIND("o", _("Object"));
|
|
|
|
ADD_BIND("p", _("Pick up"));
|
|
|
|
ADD_BIND("l", _("Look"));
|
|
|
|
ADD_BIND("b", _("Black and White / Color"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_FT:
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("e", _("Eyes"));
|
|
|
|
ADD_BIND("t", _("Tongue"));
|
|
|
|
ADD_BIND("i", _("Inventory"));
|
|
|
|
ADD_BIND("p", _("Punch"));
|
|
|
|
ADD_BIND("k", _("Kick"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_DIG:
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("e", _("Examine"));
|
|
|
|
ADD_BIND("t", _("Regular cursor"));
|
|
|
|
ADD_BIND("i", _("Inventory"));
|
2011-08-20 14:11:47 +00:00
|
|
|
// I18N: Comm is a communication device
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("c", _("Comm"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_CMI:
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("F1", _("Save / Load / Options"));
|
|
|
|
ADD_BIND("e", _("Examine"));
|
|
|
|
ADD_BIND("t", _("Talk to"));
|
|
|
|
ADD_BIND("i", _("Inventory"));
|
|
|
|
ADD_BIND("u", _("Use"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 4:
|
2010-11-23 22:47:20 +00:00
|
|
|
title = _("Other game controls:");
|
2006-01-23 20:09:25 +00:00
|
|
|
if (version <= 2) {
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_TEXT(_("Inventory:"));
|
|
|
|
ADD_BIND("u", _("Scroll list up"));
|
|
|
|
ADD_BIND("j", _("Scroll list down"));
|
|
|
|
ADD_BIND("i", _("Upper left item"));
|
|
|
|
ADD_BIND("k", _("Lower left item"));
|
|
|
|
ADD_BIND("o", _("Upper right item"));
|
|
|
|
ADD_BIND("l", _("Lower right item"));
|
2003-07-15 00:20:04 +00:00
|
|
|
ADD_LINE;
|
2006-01-23 20:09:25 +00:00
|
|
|
} else if (gameId == GID_INDY3 || gameId == GID_ZAK) {
|
|
|
|
// Indy3, or FM-TOWNS Zak
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_TEXT(_("Inventory:"));
|
|
|
|
ADD_BIND("y", _("Upper left item"));
|
|
|
|
ADD_BIND("h", _("Middle left item"));
|
|
|
|
ADD_BIND("n", _("Lower left item"));
|
|
|
|
ADD_BIND("u", _("Upper right item"));
|
|
|
|
ADD_BIND("j", _("Middle right item"));
|
|
|
|
ADD_BIND("m", _("Lower right item"));
|
|
|
|
ADD_BIND("o", _("Scroll list up"));
|
|
|
|
ADD_BIND("l", _("Scroll list down"));
|
2007-03-24 00:57:48 +00:00
|
|
|
ADD_LINE;
|
|
|
|
}
|
|
|
|
if (gameId == GID_MANIAC) {
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_TEXT(_("Switching characters:"));
|
2007-03-24 00:57:48 +00:00
|
|
|
ADD_BIND("F1", "Dave");
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_BIND("F2", _("Second kid"));
|
|
|
|
ADD_BIND("F3", _("Third kid"));
|
2007-03-24 00:57:48 +00:00
|
|
|
} else if (gameId == GID_ZAK) {
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_TEXT(_("Switching characters:"));
|
2007-03-24 00:57:48 +00:00
|
|
|
ADD_BIND("F1", "Zak");
|
|
|
|
ADD_BIND("F2", "Annie");
|
|
|
|
ADD_BIND("F3", "Melissa");
|
|
|
|
ADD_BIND("F4", "Leslie");
|
2003-06-14 21:18:14 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
switch (gameId) {
|
|
|
|
case GID_INDY3:
|
2010-11-23 22:47:20 +00:00
|
|
|
title = _("Fighting controls (numpad):");
|
|
|
|
ADD_BIND("7", _("Step back"));
|
|
|
|
ADD_BIND("4", _("Step back"));
|
|
|
|
ADD_BIND("1", _("Step back"));
|
|
|
|
ADD_BIND("8", _("Block high"));
|
|
|
|
ADD_BIND("5", _("Block middle"));
|
|
|
|
ADD_BIND("2", _("Block low"));
|
|
|
|
ADD_BIND("9", _("Punch high"));
|
|
|
|
ADD_BIND("6", _("Punch middle"));
|
|
|
|
ADD_BIND("3", _("Punch low"));
|
2003-06-14 21:18:14 +00:00
|
|
|
ADD_LINE;
|
2003-07-15 00:20:04 +00:00
|
|
|
ADD_LINE;
|
2010-11-23 22:47:20 +00:00
|
|
|
ADD_TEXT(_("These are for Indy on left."));
|
|
|
|
ADD_TEXT(_("When Indy is on the right,"));
|
|
|
|
ADD_TEXT(_("7, 4, and 1 are switched with"));
|
|
|
|
ADD_TEXT(_("9, 6, and 3, respectively."));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
switch (gameId) {
|
|
|
|
case GID_INDY3:
|
2010-11-23 22:47:20 +00:00
|
|
|
title = _("Biplane controls (numpad):");
|
|
|
|
ADD_BIND("7", _("Fly to upper left"));
|
|
|
|
ADD_BIND("4", _("Fly to left"));
|
|
|
|
ADD_BIND("1", _("Fly to lower left"));
|
|
|
|
ADD_BIND("8", _("Fly upwards"));
|
|
|
|
ADD_BIND("5", _("Fly straight"));
|
|
|
|
ADD_BIND("2", _("Fly down"));
|
|
|
|
ADD_BIND("9", _("Fly to upper right"));
|
|
|
|
ADD_BIND("6", _("Fly to right"));
|
|
|
|
ADD_BIND("3", _("Fly to lower right"));
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
while (i < HELP_NUM_LINES) {
|
|
|
|
ADD_LINE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#undef ADD_BIND
|
|
|
|
#undef ADD_TEXT
|
|
|
|
#undef ADD_LINE
|
|
|
|
|
2003-10-03 18:33:57 +00:00
|
|
|
} // End of namespace Scumm
|