diff options
author | uruk | 2013-09-04 21:10:29 +0200 |
---|---|---|
committer | uruk | 2013-09-04 21:10:29 +0200 |
commit | 15947cec7ddfad7993b746c796f4f7dd9ff01a0a (patch) | |
tree | 2d49468b8118877f9435a6cb97f61a3509e66f68 /engines/avalanche | |
parent | 90494e01fd89d9e5d7ea33e31664173590e0e250 (diff) | |
download | scummvm-rg350-15947cec7ddfad7993b746c796f4f7dd9ff01a0a.tar.gz scummvm-rg350-15947cec7ddfad7993b746c796f4f7dd9ff01a0a.tar.bz2 scummvm-rg350-15947cec7ddfad7993b746c796f4f7dd9ff01a0a.zip |
AVALANCHE: Get rid of Enhanced. Further renamings and refactoring in Avalanche and Avalot.
Diffstat (limited to 'engines/avalanche')
-rw-r--r-- | engines/avalanche/avalanche.cpp | 2 | ||||
-rw-r--r-- | engines/avalanche/avalanche.h | 43 | ||||
-rw-r--r-- | engines/avalanche/avalot.h | 4 | ||||
-rw-r--r-- | engines/avalanche/enhanced2.cpp | 64 | ||||
-rw-r--r-- | engines/avalanche/enhanced2.h | 60 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.cpp | 24 | ||||
-rw-r--r-- | engines/avalanche/lucerna2.h | 2 | ||||
-rw-r--r-- | engines/avalanche/module.mk | 1 | ||||
-rw-r--r-- | engines/avalanche/parser.cpp | 7 | ||||
-rw-r--r-- | engines/avalanche/scrolls2.cpp | 1 |
10 files changed, 7 insertions, 201 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp index b99090cbc5..d6145819c3 100644 --- a/engines/avalanche/avalanche.cpp +++ b/engines/avalanche/avalanche.cpp @@ -63,7 +63,6 @@ AvalancheEngine::~AvalancheEngine() { delete _avalot; delete _gyro; - delete _enhanced; delete _pingo; delete _scrolls; delete _visa; @@ -84,7 +83,6 @@ Common::ErrorCode AvalancheEngine::initialize() { _avalot = new Avalot(this); _gyro = new Gyro(this); - _enhanced = new Enhanced(this); _pingo = new Pingo(this); _scrolls = new Scrolls(this); _visa = new Visa(this); diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h index ddedb5a787..839618dbc6 100644 --- a/engines/avalanche/avalanche.h +++ b/engines/avalanche/avalanche.h @@ -35,7 +35,6 @@ #include "avalanche/avalot.h" #include "avalanche/gyro2.h" -#include "avalanche/enhanced2.h" #include "avalanche/pingo2.h" #include "avalanche/scrolls2.h" #include "avalanche/visa2.h" @@ -73,7 +72,6 @@ public: Avalot *_avalot; Gyro *_gyro; - Enhanced *_enhanced; Pingo *_pingo; Scrolls *_scrolls; Visa *_visa; @@ -87,15 +85,12 @@ public: Dropdown *_dropdown; Closing *_closing; - OSystem *_system; - AvalancheEngine(OSystem *syst, const AvalancheGameDescription *gd); ~AvalancheEngine(); Common::ErrorCode initialize(); - GUI::Debugger *getDebugger(); Common::RandomSource *_rnd; @@ -103,29 +98,20 @@ public: const AvalancheGameDescription *_gameDescription; uint32 getFeatures() const; const char *getGameId() const; - Common::Platform getPlatform() const; - bool hasFeature(EngineFeature f) const; const char *getCopyrightString() const; - - void synchronize(Common::Serializer &sz); - virtual bool canSaveGameStateCurrently(); Common::Error saveGameState(int slot, const Common::String &desc); bool saveGame(const int16 slot, const Common::String &desc); - Common::String getSaveFileName(const int slot); - virtual bool canLoadGameStateCurrently(); Common::Error loadGameState(int slot); bool loadGame(const int16 slot); Common::String expandDate(int d, int m, int y); - - void updateEvents(); bool getEvent(Common::Event &event); // A wrapper around _eventMan->pollEvent(), so we can use it in Scrolls::normscroll() for example. Common::Point getMousePos(); @@ -140,19 +126,13 @@ private: AvalancheConsole *_console; Common::Platform _platform; - - - // From bootstrp: enum Elm {kNormal, kMusical, kElmpoyten, kRegi}; static const int16 kRunShootemup = 1, kRunDosshell = 2, kRunGhostroom = 3, kRunGolden = 4; - static const char kRuncodes[2][3]; - static const int16 kReset = 0; - static const bool kJsb = true, kNoJsb = false, kBflight = true, kNoBflight = false; struct { @@ -162,54 +142,31 @@ private: } _storage; Common::String _arguments, _demoArgs, _argsWithNoFilename; - bool _firstTime; - byte _originalMode; byte *_old1c; - Common::String _segofs; - bool _zoomy; - int32 _soundcard, _speed, _baseaddr, _irq, _dma; void cursorOff(); - void cursorOn(); - void quit(); - Common::String commandCom(); - void explain(byte error); - void bFlight(); - void bFlightOn(); - void bFlightOff(); - Common::String elmToStr(Elm how); - void run(Common::String what, bool withJsb, bool withBflight, Elm how); - void getArguments(); - void getSlope(); - void callMenu(); - void runAvalot(); - void runDemo(); - void dosShell(); - bool keyPressed(); - void flushBuffer(); - void demo(); }; diff --git a/engines/avalanche/avalot.h b/engines/avalanche/avalot.h index 231d6c9f37..00f2edc758 100644 --- a/engines/avalanche/avalot.h +++ b/engines/avalanche/avalot.h @@ -40,10 +40,8 @@ class Avalot { public: Avalot(AvalancheEngine *vm); - void setup(); - void handleKeyDown(Common::Event &event); // To replace Basher::keyboard_link() and Basher::typein(). - + void setup(); void run(Common::String arg); private: diff --git a/engines/avalanche/enhanced2.cpp b/engines/avalanche/enhanced2.cpp deleted file mode 100644 index d6187a0ece..0000000000 --- a/engines/avalanche/enhanced2.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* 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. - * - */ - -/* - * This code is based on the original source code of Lord Avalot d'Argent version 1.3. - * Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman. - */ - -#include "avalanche/avalanche.h" - -#include "avalanche/enhanced2.h" - -#include "common/textconsole.h" - -namespace Avalanche { - -Enhanced::Enhanced(AvalancheEngine *vm) { - _vm = vm; -} - - -bool Enhanced::isenh() { - warning("STUB: Enhanced::isenh()"); - return true; -} - -void Enhanced::readkeye() { - warning("STUB: Enhanced::readkeye()"); -} - -bool Enhanced::keypressede() { -/* - function fancystuff:boolean; - inline( $B4/ $11/ { MOV AH,11 } - $CD/ $16/ { INT 16 } - $B8/ $00/ $00/ { MOV AX, 0000 } - $74/ $01/ { JZ 0112 (or wherever- the next byte after $40, anyway) } - $40); { INC AX } -*/ - - warning("STUB: Enhanced::keypressede()"); - return true; -} - -} // End of namespace Avalanche diff --git a/engines/avalanche/enhanced2.h b/engines/avalanche/enhanced2.h deleted file mode 100644 index ed7f1e6fb4..0000000000 --- a/engines/avalanche/enhanced2.h +++ /dev/null @@ -1,60 +0,0 @@ -/* 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. - * - */ - -/* - * This code is based on the original source code of Lord Avalot d'Argent version 1.3. - * Copyright (c) 1994-1995 Mike, Mark and Thomas Thurman. - */ - - - -// Not sure if this unit will be used at all in the end... - -#ifndef ENHANCED2_H -#define ENHANCED2_H - -#include "common/scummsys.h" - -namespace Avalanche { -class AvalancheEngine; - -class Enhanced { -public: - byte shiftstate; /*ABSOLUTE $40:$17;*/ - bool atbios; // BIOS type - char inchar, extd; - - Enhanced(AvalancheEngine *vm); - - void readkeye(); - - bool keypressede(); -private: - AvalancheEngine *_vm; - - bool isenh(); - -}; - -} // End of namespace Avalanche - -#endif // ENHANCED2_H diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp index 883cf20233..4517e6a258 100644 --- a/engines/avalanche/lucerna2.cpp +++ b/engines/avalanche/lucerna2.cpp @@ -32,7 +32,6 @@ #include "avalanche/lucerna2.h" #include "avalanche/gyro2.h" #include "avalanche/scrolls2.h" -#include "avalanche/enhanced2.h" #include "avalanche/visa2.h" #include "avalanche/timeout2.h" #include "avalanche/trip6.h" @@ -61,10 +60,10 @@ Lucerna::Lucerna(AvalancheEngine *vm) : fxhidden(false) { void Lucerna::init() { _vm->_gyro->oh = 17717; _vm->_gyro->om = 17717; - if (_vm->_enhanced->atbios) + /*if (_vm->_enhanced->atbios) _vm->_gyro->atkey = "f1"; else - _vm->_gyro->atkey = "alt-"; + _vm->_gyro->atkey = "alt-";*/ } void Lucerna::callverb(byte n) { @@ -966,25 +965,6 @@ void Lucerna::mouseway(const Common::Point &cursorPos) { } } -void Lucerna::inkey() { - if (_vm->_gyro->demo) - return; /* Demo handles this itself. */ - - if (_vm->_gyro->mousetext == "") { - /* read keyboard */ - _vm->_enhanced->readkeye(); - if ((_vm->_enhanced->inchar == ' ') && ((_vm->_enhanced->shiftstate & 8) > 0)) { - _vm->_enhanced->inchar = '\0'; - _vm->_enhanced->extd = '#'; /* alt-spacebar = alt-H */ - } - } else { - if (_vm->_gyro->mousetext[0] == '`') - _vm->_gyro->mousetext.setChar(13,0); /* Backquote = return in a macro */ - _vm->_enhanced->inchar = _vm->_gyro->mousetext[0]; - _vm->_gyro->mousetext = Common::String(_vm->_gyro->mousetext.c_str() + 2, 253); - } -} - void Lucerna::posxy() { warning("STUB: Lucerna::posxy()"); } diff --git a/engines/avalanche/lucerna2.h b/engines/avalanche/lucerna2.h index db9e43191f..f20b0d01d6 100644 --- a/engines/avalanche/lucerna2.h +++ b/engines/avalanche/lucerna2.h @@ -72,8 +72,6 @@ public: void mouseway(const Common::Point &cursorPos); - void inkey(); - void posxy(); void fxtoggle(); diff --git a/engines/avalanche/module.mk b/engines/avalanche/module.mk index 9698025280..993e1cae2f 100644 --- a/engines/avalanche/module.mk +++ b/engines/avalanche/module.mk @@ -8,7 +8,6 @@ MODULE_OBJS = \ console.o \ detection.o \ gyro2.o \ - enhanced2.o \ pingo2.o \ scrolls2.o \ visa2.o \ diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp index e6cbdabce8..6ccacc005f 100644 --- a/engines/avalanche/parser.cpp +++ b/engines/avalanche/parser.cpp @@ -43,9 +43,10 @@ void Parser::init() { void Parser::handleInputText(const Common::Event &event) { byte inChar = event.kbd.ascii; - if (_vm->_dropdown->_activeMenuItem._activeNow) { + warning("STUB: Parser::handleInputText()"); + /*if (_vm->_dropdown->_activeMenuItem._activeNow) { _vm->_dropdown->parseKey(inChar, _vm->_enhanced->extd); - } else { + } else {*/ if (_inputText.size() < 76) { if ((inChar == '"') || (inChar == '`')) { if (_quote) @@ -60,7 +61,7 @@ void Parser::handleInputText(const Common::Event &event) { plotText(); } else _vm->_gyro->blip(); - } + //} } void Parser::handleBackspace() { diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp index 32ad1c9085..0df3c78f61 100644 --- a/engines/avalanche/scrolls2.cpp +++ b/engines/avalanche/scrolls2.cpp @@ -31,7 +31,6 @@ #include "avalanche/scrolls2.h" #include "avalanche/gyro2.h" -#include "avalanche/enhanced2.h" #include "avalanche/lucerna2.h" #include "avalanche/trip6.h" #include "avalanche/acci2.h" |