1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359
|
/* 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.
*
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#include "common/str.h"
#include "common/util.h"
#include "scumm/help.h"
#include "scumm/scumm.h"
#include "common/translation.h"
namespace Scumm {
int ScummHelp::numPages(byte gameId) {
switch (gameId) {
case GID_MANIAC:
case GID_ZAK:
return 4;
case GID_INDY4:
return 5;
case GID_INDY3:
return 6;
case GID_LOOM:
case GID_MONKEY_EGA:
case GID_MONKEY_VGA:
case GID_MONKEY:
case GID_MONKEY2:
case GID_TENTACLE:
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:
case GID_PUTTPUTT:
*/
default:
return 2;
}
}
#define ADD_BIND(k,d) do { key[i] = k; dsc[i] = d; i++; } while (0)
#define ADD_TEXT(d) ADD_BIND("",d)
#define ADD_LINE ADD_BIND("","")
void ScummHelp::updateStrings(byte gameId, byte version, Common::Platform platform,
int page, String &title, String *&key, String *&dsc) {
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"));
if (version >= 5)
ADD_BIND(".", _("Skip line of text"));
ADD_BIND(_("Esc"), _("Skip cutscene"));
ADD_BIND(_("Space"), _("Pause game"));
ADD_BIND(String(_("Ctrl")) + " 0-9", _("Load saved game 1-10"));
ADD_BIND(String(_("Alt")) + " 0-9", _("Save game 1-10"));
#ifdef MACOSX
ADD_BIND("Cmd q", _("Quit"));
#else
ADD_BIND(String(_("Alt")) + " x, " + _("Ctrl") + " z", _("Quit"));
#endif
ADD_BIND(String(_("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"));
break;
case 2:
title = _("Special keyboard commands:");
ADD_BIND("~, #", _("Show / Hide console"));
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"));
ADD_LINE;
ADD_LINE;
// FIXME: This should use word-wrapping, and should not assume
// that the font is mono-spaced.
ADD_TEXT(_("* Note that using ctrl-f and"));
ADD_TEXT(_(" ctrl-g are not recommended"));
ADD_TEXT(_(" since they may cause crashes"));
ADD_TEXT(_(" or incorrect game behavior."));
break;
case 3:
if (gameId == GID_LOOM)
title = _("Spinning drafts on the keyboard:");
else
title = _("Main game controls:");
switch (gameId) {
case GID_ZAK:
case GID_MANIAC:
if (platform == Common::kPlatformNES) {
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"));
break;
}
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"));
if (gameId == GID_MANIAC) {
ADD_BIND("r", _("Unlock"));
ADD_BIND("f", _("New kid"));
} else {
ADD_BIND("r", _("Put on"));
ADD_BIND("f", _("Take off"));
}
ADD_BIND("v", _("Use"));
ADD_BIND("t", _("Turn on"));
ADD_BIND("g", _("Turn off"));
if (gameId == GID_MANIAC)
ADD_BIND("b", _("Fix"));
else
ADD_BIND("b", _("Switch"));
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"));
ADD_BIND("b", _("To Henry / To Indy"));
break;
case GID_LOOM:
// I18N: These are different musical notes
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:
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)"));
if (platform == Common::kPlatformSegaCD) {
ADD_BIND(_("KeyUp"), _("Highlight prev dialogue"));
ADD_BIND(_("KeyDown"), _("Highlight next dialogue"));
}
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"));
// I18N: Comm is a communication device
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;
default:
break;
}
break;
case 4:
title = _("Other game controls:");
if (version <= 2) {
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"));
ADD_LINE;
} else if (gameId == GID_INDY3 || gameId == GID_ZAK) {
// Indy3, or FM-TOWNS Zak
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"));
ADD_LINE;
}
if (gameId == GID_MANIAC) {
ADD_TEXT(_("Switching characters:"));
ADD_BIND("F1", "Dave");
ADD_BIND("F2", _("Second kid"));
ADD_BIND("F3", _("Third kid"));
} else if (gameId == GID_ZAK) {
ADD_TEXT(_("Switching characters:"));
ADD_BIND("F1", "Zak");
ADD_BIND("F2", "Annie");
ADD_BIND("F3", "Melissa");
ADD_BIND("F4", "Leslie");
}
if (gameId == GID_INDY4) {
ADD_BIND("i", _("Toggle Inventory/IQ Points display"));
ADD_BIND("f", _("Toggle Keyboard/Mouse Fighting (*)"));
ADD_LINE;
ADD_TEXT(_("* Keyboard Fighting is always on,"));
ADD_TEXT(_(" so despite the in-game message this"));
ADD_TEXT(_(" actually toggles Mouse Fighting Off/On"));
}
break;
case 5:
switch (gameId) {
case GID_INDY3:
case GID_INDY4:
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"));
if (gameId == GID_INDY4) {
ADD_BIND("0", _("Sucker punch"));
}
ADD_LINE;
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;
default:
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;
default:
break;
}
break;
default:
break;
}
while (i < HELP_NUM_LINES) {
ADD_LINE;
}
}
#undef ADD_BIND
#undef ADD_TEXT
#undef ADD_LINE
} // End of namespace Scumm
|