/* 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 3 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, see .
*
*/
/*
* This code is based on original Hugo Trilogy source code
*
* Copyright (c) 1989-1995 David P. Gray
*
*/
// parser.c - handles all keyboard/command input
#include "common/debug.h"
#include "common/system.h"
#include "hugo/hugo.h"
#include "hugo/parser.h"
#include "hugo/file.h"
#include "hugo/schedule.h"
#include "hugo/util.h"
#include "hugo/sound.h"
#include "hugo/object.h"
#include "hugo/text.h"
namespace Hugo {
Parser_v2d::Parser_v2d(HugoEngine *vm) : Parser_v1d(vm) {
}
Parser_v2d::~Parser_v2d() {
}
/**
* Parse the user's line of text input. Generate events as necessary
*/
void Parser_v2d::lineHandler() {
debugC(1, kDebugParser, "lineHandler()");
Status &gameStatus = _vm->getGameStatus();
// Toggle God Mode
if (!strncmp(_vm->_line, "PPG", 3)) {
_vm->_sound->playSound(!_vm->_soundTest, kSoundPriorityHigh);
gameStatus._godModeFl = !gameStatus._godModeFl;
return;
}
Utils::strlwr(_vm->_line); // Convert to lower case
// God Mode cheat commands:
// goto Takes hero to named screen
// fetch