2003-06-14 21:18:14 +00:00
|
|
|
/* ScummVM - Scumm Interpreter
|
2004-01-06 12:45:34 +00:00
|
|
|
* Copyright (C) 2002-2004 The ScummVM project
|
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
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*
|
2003-11-26 17:48:07 +00:00
|
|
|
* $Header$
|
|
|
|
*
|
2003-06-14 21:18:14 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "stdafx.h"
|
2003-10-03 18:33:57 +00:00
|
|
|
#include "scumm/help.h"
|
|
|
|
#include "scumm/scumm.h"
|
2003-06-14 21:18:14 +00:00
|
|
|
#include "common/str.h"
|
|
|
|
|
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:
|
|
|
|
case GID_ZAK256:
|
|
|
|
return 4;
|
|
|
|
break;
|
|
|
|
case GID_INDY3:
|
|
|
|
return 6;
|
|
|
|
break;
|
|
|
|
case GID_LOOM:
|
|
|
|
case GID_LOOM256:
|
|
|
|
case GID_MONKEY_EGA:
|
|
|
|
case GID_MONKEY_VGA:
|
2003-07-15 00:20:04 +00:00
|
|
|
case GID_MONKEY_SEGA:
|
2003-06-14 21:18:14 +00:00
|
|
|
case GID_MONKEY:
|
|
|
|
case GID_MONKEY2:
|
|
|
|
case GID_INDY4:
|
|
|
|
case GID_TENTACLE:
|
|
|
|
case GID_SAMNMAX:
|
|
|
|
case GID_DIG:
|
|
|
|
case GID_FT:
|
|
|
|
case GID_CMI:
|
|
|
|
return 3;
|
|
|
|
break;
|
|
|
|
/* TODO - I don't know the controls for these games
|
|
|
|
case GID_PUTTDEMO:
|
2003-07-15 00:20:04 +00:00
|
|
|
case GID_PUTTPUTT:
|
2003-06-14 21:18:14 +00:00
|
|
|
*/
|
|
|
|
default:
|
|
|
|
return 2;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2003-07-07 22:33:07 +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("","")
|
|
|
|
|
2003-07-15 00:20:04 +00:00
|
|
|
void ScummHelp::updateStrings(byte gameId, byte version, 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:
|
|
|
|
title = "Common keyboard commands:";
|
|
|
|
ADD_BIND("F5", "Save / Load dialog");
|
2003-07-07 22:33:07 +00:00
|
|
|
if (version >= 5)
|
|
|
|
ADD_BIND(".", "Skip line of text");
|
2003-06-14 21:18:14 +00:00
|
|
|
ADD_BIND("Esc", "Skip cutscene");
|
|
|
|
ADD_BIND("Space", "Pause game");
|
|
|
|
ADD_BIND("Ctrl 0-9", "Load game state 1-10");
|
|
|
|
ADD_BIND("Alt 0-9", "Save game state 1-10");
|
2003-06-15 11:32:14 +00:00
|
|
|
#ifdef MACOSX
|
|
|
|
ADD_BIND("Cmd q", "Quit");
|
2003-07-15 00:20:04 +00:00
|
|
|
#else
|
|
|
|
ADD_BIND("Alt x, Ctrl z", "Quit");
|
2003-06-15 11:32:14 +00:00
|
|
|
#endif
|
2003-06-14 21:18:14 +00:00
|
|
|
ADD_BIND("Alt Enter", "Toggle fullscreen");
|
|
|
|
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");
|
|
|
|
ADD_BIND("Arrow Keys", "Simulate mouse movement");
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
title = "Special keyboard commands:";
|
|
|
|
ADD_BIND("~, #", "Show / Hide console");
|
|
|
|
ADD_BIND("Ctrl d", "Start the debugger");
|
|
|
|
ADD_BIND("Ctrl s", "Show memory consumption");
|
2003-07-15 00:20:04 +00:00
|
|
|
ADD_BIND("Ctrl f", "Run in fast mode (*)");
|
|
|
|
ADD_BIND("Ctrl g", "Run in really fast mode (*)");
|
2003-12-26 06:31:36 +00:00
|
|
|
ADD_BIND("Ctrl m", "Toggle mouse capture");
|
|
|
|
ADD_BIND("Ctrl Alt 1-8", "Switch between graphics filters");
|
2003-12-26 06:38:45 +00:00
|
|
|
ADD_BIND("Ctrl Alt +, -", "Increase / Decrease scale factor");
|
2003-07-15 00:20:04 +00:00
|
|
|
ADD_BIND("Ctrl Alt a", "Toggle aspect-ratio correction");
|
2003-06-14 21:18:14 +00:00
|
|
|
ADD_LINE;
|
|
|
|
ADD_LINE;
|
|
|
|
ADD_TEXT("* Note that using ctrl-f and");
|
2003-07-15 00:20:04 +00:00
|
|
|
ADD_TEXT(" ctrl-g are not recommended");
|
|
|
|
ADD_TEXT(" since they may cause crashes");
|
|
|
|
ADD_TEXT(" or incorrect game behaviour.");
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
if (gameId == GID_LOOM || gameId == GID_LOOM256)
|
|
|
|
title = "Spinning drafts on the keyboard:";
|
|
|
|
else
|
|
|
|
title = "Main game controls:";
|
|
|
|
switch (gameId) {
|
|
|
|
case GID_ZAK:
|
|
|
|
case GID_ZAK256:
|
|
|
|
case GID_MANIAC:
|
|
|
|
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) {
|
2003-11-05 20:47:32 +00:00
|
|
|
ADD_BIND("r", "Unlock");
|
|
|
|
ADD_BIND("f", "New kid");
|
2003-07-15 00:20:04 +00:00
|
|
|
} else {
|
|
|
|
ADD_BIND("r", "Put on");
|
|
|
|
ADD_BIND("f", "Take off");
|
2003-06-14 21:18:14 +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)
|
|
|
|
ADD_BIND("b", "Fix");
|
|
|
|
else
|
|
|
|
ADD_BIND("b", "Switch");
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_INDY3:
|
|
|
|
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");
|
2003-07-15 00:20:04 +00:00
|
|
|
ADD_BIND("b", "To Henry / To Indy");
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_LOOM:
|
|
|
|
case GID_LOOM256:
|
|
|
|
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");
|
|
|
|
break;
|
|
|
|
case GID_MONKEY_EGA:
|
|
|
|
case GID_MONKEY_VGA:
|
|
|
|
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");
|
|
|
|
break;
|
|
|
|
case GID_MONKEY:
|
2003-07-15 00:54:33 +00:00
|
|
|
case GID_MONKEY_SEGA:
|
2003-06-14 21:18:14 +00:00
|
|
|
case GID_MONKEY2:
|
|
|
|
case GID_INDY4:
|
|
|
|
case GID_TENTACLE:
|
|
|
|
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)");
|
2003-07-15 07:29:41 +00:00
|
|
|
if (gameId == GID_MONKEY_SEGA) {
|
|
|
|
// FIXME look at scripts to figure all options out...
|
|
|
|
// keys 1->4 seem to do something as well
|
|
|
|
ADD_BIND("6", "Highlight prev dialogue");
|
|
|
|
ADD_BIND("7", "Highlight next dialogue");
|
|
|
|
}
|
2003-06-14 21:18:14 +00:00
|
|
|
break;
|
|
|
|
case GID_SAMNMAX:
|
|
|
|
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");
|
|
|
|
break;
|
|
|
|
case GID_FT:
|
|
|
|
ADD_BIND("e", "Eyes");
|
|
|
|
ADD_BIND("t", "Tongue");
|
|
|
|
ADD_BIND("i", "Inventory");
|
|
|
|
ADD_BIND("p", "Punch");
|
|
|
|
ADD_BIND("k", "Kick");
|
|
|
|
break;
|
|
|
|
case GID_DIG:
|
|
|
|
ADD_BIND("e", "Examine");
|
|
|
|
ADD_BIND("t", "Regular cursor");
|
|
|
|
ADD_BIND("i", "Inventory");
|
|
|
|
ADD_BIND("c", "Comm");
|
|
|
|
break;
|
|
|
|
case GID_CMI:
|
|
|
|
ADD_BIND("F1", "Save / Load / Options");
|
|
|
|
ADD_BIND("e", "Examine");
|
|
|
|
ADD_BIND("t", "Talk to");
|
|
|
|
ADD_BIND("i", "Inventory");
|
|
|
|
ADD_BIND("u", "Use");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 4:
|
|
|
|
switch (gameId) {
|
|
|
|
case GID_MANIAC:
|
|
|
|
case GID_ZAK:
|
2003-07-15 00:20:04 +00:00
|
|
|
title = "Other game controls:";
|
|
|
|
ADD_TEXT("Inventory: (not yet implemented)");
|
2003-06-14 21:18:14 +00:00
|
|
|
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;
|
|
|
|
ADD_TEXT("Switching characters:");
|
|
|
|
if (gameId == GID_MANIAC) {
|
|
|
|
ADD_BIND("F1", "Dave");
|
|
|
|
ADD_BIND("F2", "Second kid");
|
|
|
|
ADD_BIND("F3", "Third kid");
|
|
|
|
} else {
|
|
|
|
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 GID_INDY3:
|
2003-07-15 00:20:04 +00:00
|
|
|
case GID_ZAK256:
|
|
|
|
title = "Other game controls:";
|
|
|
|
ADD_TEXT("Inventory:");
|
2003-06-14 21:18:14 +00:00
|
|
|
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");
|
2003-07-15 00:20:04 +00:00
|
|
|
if (gameId == GID_ZAK256) {
|
|
|
|
ADD_LINE;
|
|
|
|
ADD_TEXT("Switching characters:");
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 5:
|
|
|
|
switch (gameId) {
|
|
|
|
case GID_INDY3:
|
|
|
|
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");
|
|
|
|
ADD_LINE;
|
2003-07-15 00:20:04 +00:00
|
|
|
ADD_LINE;
|
2003-06-14 21:18:14 +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.");
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 6:
|
|
|
|
switch (gameId) {
|
|
|
|
case GID_INDY3:
|
|
|
|
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");
|
|
|
|
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
|