aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authoruruk2013-09-15 13:21:03 +0200
committeruruk2013-09-15 13:21:03 +0200
commita81b499062bf968b94bfaaa96d84aa893bf87343 (patch)
tree5e968bdb23e8def26a8b47604089249ab7d97604 /engines
parent7ee6e8699f97e691ea89266781f1c77437764658 (diff)
downloadscummvm-rg350-a81b499062bf968b94bfaaa96d84aa893bf87343.tar.gz
scummvm-rg350-a81b499062bf968b94bfaaa96d84aa893bf87343.tar.bz2
scummvm-rg350-a81b499062bf968b94bfaaa96d84aa893bf87343.zip
AVALANCHE: Get rid of Enid.
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/acci.cpp5
-rw-r--r--engines/avalanche/animation.cpp3
-rw-r--r--engines/avalanche/avalanche.cpp2
-rw-r--r--engines/avalanche/avalanche.h2
-rw-r--r--engines/avalanche/avalot.cpp1
-rw-r--r--engines/avalanche/dropdown.cpp3
-rw-r--r--engines/avalanche/enid.cpp302
-rw-r--r--engines/avalanche/enid.h78
-rw-r--r--engines/avalanche/lucerna.cpp1
-rw-r--r--engines/avalanche/module.mk1
-rw-r--r--engines/avalanche/timer.cpp3
11 files changed, 5 insertions, 396 deletions
diff --git a/engines/avalanche/acci.cpp b/engines/avalanche/acci.cpp
index 3b633c1dfa..a90e1f0a21 100644
--- a/engines/avalanche/acci.cpp
+++ b/engines/avalanche/acci.cpp
@@ -35,7 +35,6 @@
#include "avalanche/scrolls.h"
#include "avalanche/timer.h"
#include "avalanche/animation.h"
-#include "avalanche/enid.h"
#include "avalanche/celer.h"
#include "avalanche/pingo.h"
#include "avalanche/sequence.h"
@@ -1432,7 +1431,7 @@ void Acci::giveGeidaTheLute() {
_vm->_scrolls->displayScrollChain('q', 64); // She plays it.
_vm->_timer->addTimer(1, Timer::kProcGiveLuteToGeida, Timer::kReasonGeidaSings);
- _vm->_enid->backToBootstrap(4);
+ //_vm->_enid->backToBootstrap(4); TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then!
}
void Acci::playHarp() {
@@ -2106,7 +2105,7 @@ void Acci::doThat() {
}
break;
case kVerbCodeDir:
- _vm->_enid->dir(_realWords[1]);
+ //_vm->_enid->dir(_realWords[1]); TODO: Replace it with proper ScummVM-friendly function(s)!
break;
case kVerbCodeDie:
_vm->_lucerna->gameOver();
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index 526f6a8517..5f89ccb224 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -36,7 +36,6 @@
#include "avalanche/celer.h"
#include "avalanche/sequence.h"
#include "avalanche/timer.h"
-#include "avalanche/enid.h"
#include "common/scummsys.h"
#include "common/textconsole.h"
@@ -782,7 +781,7 @@ void Animation::callSpecial(uint16 which) {
_vm->_lucerna->dusk();
_sprites[0].turn(kDirRight); // you'll see this after we get back from bootstrap
_vm->_timer->addTimer(1, Timer::kProcGhostRoomPhew, Timer::kReasonGhostRoomPhew);
- _vm->_enid->backToBootstrap(3);
+ //_vm->_enid->backToBootstrap(3); TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then!
break;
case 5:
if (_vm->_gyro->_friarWillTieYouUp) {
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index 9f2f46e8ce..c6f74f80f0 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -65,7 +65,6 @@ AvalancheEngine::~AvalancheEngine() {
delete _pingo;
delete _scrolls;
delete _lucerna;
- delete _enid;
delete _celer;
delete _sequence;
delete _timer;
@@ -85,7 +84,6 @@ Common::ErrorCode AvalancheEngine::initialize() {
_pingo = new Pingo(this);
_scrolls = new Scrolls(this);
_lucerna = new Lucerna(this);
- _enid = new Enid(this);
_celer = new Celer(this);
_sequence = new Sequence(this);
_timer = new Timer(this);
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 30eaee03fd..8da159165d 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -38,7 +38,6 @@
#include "avalanche/pingo.h"
#include "avalanche/scrolls.h"
#include "avalanche/lucerna.h"
-#include "avalanche/enid.h"
#include "avalanche/celer.h"
#include "avalanche/sequence.h"
#include "avalanche/timer.h"
@@ -74,7 +73,6 @@ public:
Pingo *_pingo;
Scrolls *_scrolls;
Lucerna *_lucerna;
- Enid *_enid;
Celer *_celer;
Sequence *_sequence;
Timer *_timer;
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index a52186d4e2..788b41897e 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -40,7 +40,6 @@
#include "avalanche/pingo.h"
#include "avalanche/timer.h"
#include "avalanche/celer.h"
-#include "avalanche/enid.h"
#include "avalanche/closing.h"
#include "common/str.h"
diff --git a/engines/avalanche/dropdown.cpp b/engines/avalanche/dropdown.cpp
index 2e070e6b0b..5efa63e591 100644
--- a/engines/avalanche/dropdown.cpp
+++ b/engines/avalanche/dropdown.cpp
@@ -34,7 +34,6 @@
#include "avalanche/gyro.h"
#include "avalanche/acci.h"
#include "avalanche/animation.h"
-#include "avalanche/enid.h"
#include "common/textconsole.h"
@@ -590,7 +589,7 @@ void Dropdown::runMenuFile() {
warning("STUB: Dropdown::runMenuFile()");
break;
case 4:
- _vm->_enid->backToBootstrap(2);
+ //_vm->_enid->backToBootstrap(2); TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then!
break;
case 5:
_vm->_lucerna->callVerb(Acci::kVerbCodeQuit);
diff --git a/engines/avalanche/enid.cpp b/engines/avalanche/enid.cpp
deleted file mode 100644
index 4e8071a109..0000000000
--- a/engines/avalanche/enid.cpp
+++ /dev/null
@@ -1,302 +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.
- */
-
-/* ENID Edna's manager. Loads/saves files. */
-
-#include "avalanche/avalanche.h"
-
-#include "avalanche/enid.h"
-#include "avalanche/scrolls.h"
-#include "avalanche/lucerna.h"
-#include "avalanche/animation.h"
-#include "avalanche/timer.h"
-#include "avalanche/celer.h"
-#include "avalanche/sequence.h"
-
-#include "common/textconsole.h"
-
-namespace Avalanche {
-
-Enid::Enid(AvalancheEngine *vm) {
- _vm = vm;
-}
-
-// CHECKME: useless?
-#if 0
-const Common::String Enid::kCrlf = Common::String(char(15)) + Common::String(char(12));
-const char Enid::kTab = '\t';
-const char Enid::kEof = '\n';
-
-const Common::String Enid::kEdnaFirst =
- Common::String("This is an EDNA-based file, saved by a Thorsoft game. Good luck!") + // 64
- kCrlf + kEof + kCrlf + kCrlf + // 7
- kTab + "Glory to God in the highest," + kCrlf + // 31
- kTab + "and on earth peace, goodwill toward men." + // 42
- kCrlf + kTab + kTab + kTab + kTab + // 6
- "Luke 2:14." + // 10
- kCrlf + kCrlf + kCrlf + // 6
- "1234567890" +kCrlf; // 11
-
-const Common::String Enid::kEdnaId = Common::String("TT\xB1\x30\x01\x75\xB1\x99\xB1");
-const int16 Enid::kAge = 18;
-const Common::String Enid::kWasHere = "Thomas was here ";
-const Enid::FourType Enid::kAvariciusFile = "Avvy";
-
-/**
- * Expand month name
- * @remarks Originally called 'addon'
- */
-void Enid::expandMonthName(Common::String x) {
- _month += x;
-}
-
-Common::String Enid::expandDate(byte d, byte m, uint16 y) {
- const Common::String months[12] = {
- "Jan#", "Febr#", "March", "April", "May", "June", "July", "August",
- "Septem*", "Octo*", "Novem*", "Decem*"
- };
-
- Common::String expanddate_result;
- _month = months[m];
- switch (_month[_month.size()]) {
- case '#':
- expandMonthName("uary");
- break;
- case '*':
- expandMonthName("ber");
- break;
- }
-
- _day = _vm->_gyro->strf(d);
-
- // d is always positive
- if ((d <= 9) || ((d >= 21) && (d <= 31))) {
- switch (d % 10) {
- case 1:
- _day = _day + "st";
- break;
- case 2:
- _day = _day + "nd";
- break;
- case 3:
- _day = _day + "rd";
- break;
- default:
- _day = _day + "th";
- }
- }
-
- expanddate_result = _day + ' ' + _month + ' ' + _vm->_gyro->strf(y);
- return expanddate_result;
-}
-
-void Enid::showBug(char icon, Common::String strn) {
- _vm->_scrolls->display(Common::String("\7\6\23") + icon + "\26\r" + strn + '\15');
-}
-
-bool Enid::testBug(byte what) {
- bool test_bug_result;
- if (what == 0) {
- test_bug_result = false;
- return test_bug_result;
- }
- switch (what) {
- case 2:
- showBug('7', "Error in filename!");
- break;
- case 101:
- showBug('6', "Disk full!");
- break;
- case 150:
- showBug('4', "Disk is write-protected!");
- break;
- default:
- showBug('B', "Saving error!");
- }
- test_bug_result = true;
- return test_bug_result;
-}
-
-void Enid::ednaSave(Common::String name) {
- warning("STUB: Enid::ednaSave()");
-}
-
-void Enid::loadError(Common::String x, char icon) {
- if (_vm->_gyro->holdthedawn) {
- _vm->_gyro->holdthedawn = false;
- _vm->_lucerna->dawn();
- }
- _vm->_scrolls->display(Common::String('\7') + '\6' + '\23' + icon + '\26' + "Loading error: " + "\r\r\22" + x);
- _bug = true;
-}
-
-void Enid::ednaLoad(Common::String name) {
- warning("STUB: Enid::ednaLoad()");
-}
-
-void Enid::showHeader() {
- _vm->_scrolls->display(Common::String("Dir: ") + _path + "\r\r\4");
-}
-
-void Enid::avvyBackground() {
- // Not really a filing procedure,
- // but it's only called just before edna_load, so I thought I'd put it
- // in Enid instead of, say, Lucerna.
-
-#if 0
- port[$3c4]:=2; port[$3ce]:=4; port[$3C5]:=1; port[$3CF]:=1; { Blue. }
-
- asm
- mov dx,$3c4; mov al,2; out dx,al; { Set up the VGA to use the "blue" }
- mov dx,$3ce; mov al,4; out dx,al; { register. }
- mov dx,$3c5; mov al,1; out dx,al;
- mov dx,$3cf; out dx,al;
-
- mov bx,$A000; call far ptr @drawup;
- mov bx,$A400; call far ptr @drawup;
-
- jmp @the_end;
-
- @drawup:
-
- mov es,bx; { The segment to copy it to... }
- mov di,$370; { The offset (10 pixels down, plus 1 offset.) }
-
- mov cx,10;
- mov ax,$AA4A; call far ptr @sameline; { Print "AVVY" }
- mov ax,$AEAA; call far ptr @sameline;
- mov ax,$A4EA; call far ptr @sameline;
- mov ax,$44A4; call far ptr @sameline;
-
- mov cx,9;
- mov ax,$AAA4; call far ptr @sameline; { Print "YAVV" }
- mov ax,$AAEA; call far ptr @sameline;
- mov ax,$AA4E; call far ptr @sameline;
- mov ax,$444A; call far ptr @sameline;
-
- mov ax,$4AAA; call far ptr @sameline; { Print "VYAV" }
- mov ax,$AAAE; call far ptr @sameline;
- mov ax,$EAA4; call far ptr @sameline;
- mov ax,$A444; call far ptr @sameline;
-
- mov ax,$A4AA; call far ptr @sameline; { Print "VVYA" }
- mov ax,$EAAA; call far ptr @sameline;
- mov ax,$4EAA; call far ptr @sameline;
- mov ax,$4A44; call far ptr @sameline;
-
- ret;
-
-
- { Replicate the same line many times. }
-
- @sameline:
- { Requires:
- what to copy in AX,
- how many lines in CX, and
- original offset in DI. }
- push cx;
- push di;
-
- @samelineloop:
-
- push cx;
- mov cx,40; { No. of times to repeat it on one line. }
-
- repz stosw; { Fast uint16-copying }
-
- pop cx;
-
- add di,1200; { The next one will be 16 lines down. }
-
- loop @samelineloop;
- pop di;
- add di,80;
- pop cx;
-
- ret;
-
- @the_end:
- end;
-#endif
-}
-
-void Enid::toSundry(Sundry &sund) {
- sund._qEnidFilename = _vm->_gyro->_enidFilename;
- sund._qSoundFx = _vm->_gyro->_soundFx;
- sund._qThinks = _vm->_gyro->_thinks;
- sund._qThinkThing = _vm->_gyro->_thinkThing;
-}
-
-void Enid::fromSundry(Sundry sund) {
- _vm->_gyro->_enidFilename = sund._qEnidFilename;
- _vm->_gyro->_soundFx = sund._qSoundFx;
- _vm->_gyro->_thinks = sund._qThinks;
- _vm->_gyro->_thinkThing = sund._qThinkThing;
-}
-
-void Enid::restoreDna() {
-// uint16 here, fv;
-// sundry sund;
-
- warning("STUB: Enid::restoreDna()");
-}
-
-void Enid::ednaReload() {
-
- restoreDna();
-
- _vm->_gyro->_seeScroll = true; // This prevents display of the new sprites before the
- // new picture is loaded.
-
- _vm->_lucerna->majorRedraw();
-
- _vm->_gyro->_whereIs[Gyro::kPeopleAvalot - 150] = _vm->_gyro->_room;
-
- _vm->_gyro->_alive = true;
-
- _vm->_lucerna->refreshObjectList();
-
- if (_vm->_gyro->_holdTheDawn) {
- _vm->_gyro->_holdTheDawn = false;
- _vm->_lucerna->dawn();
- }
-}
-
-bool Enid::thereWasAProblem() {
- return _bug;
-}
-
-#endif
-
-void Enid::dir(Common::String where) { // OK, it worked in Avaricius, let's do it in Avalot!
- warning("STUB: Enid::dir()");
-}
-void Enid::backToBootstrap(byte what) {
- warning("STUB: Enid::back_to_bootstrap()");
-}
-
-} // End of namespace Avalanche.
diff --git a/engines/avalanche/enid.h b/engines/avalanche/enid.h
deleted file mode 100644
index 97e249e187..0000000000
--- a/engines/avalanche/enid.h
+++ /dev/null
@@ -1,78 +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.
- */
-
-/* ENID Edna's manager. Loads/saves files. */
-
-#ifndef AVALANCHE_ENID2_H
-#define AVALANCHE_ENID2_H
-
-#include "common/scummsys.h"
-
-namespace Avalanche {
-class AvalancheEngine;
-
-class Enid {
-public:
- Enid(AvalancheEngine *vm);
- void dir(Common::String where);
- void backToBootstrap(byte what);
-
-private:
- AvalancheEngine *_vm;
-
-// CHECKME: useless?
-// static const Common::String kCrlf;
-// static const char kTab, kEof;
-// static const Common::String kEdnaFirst, kEdnaId, kWasHere;
-// static const int16 kAge;
-// void expandMonthName(Common::String x);
-// Common::String expandDate(byte d, byte m, uint16 y);
-// void ednaSave(Common::String name);
-// void showBug(char icon, Common::String strn);
-// bool testBug(byte what);
-// void loadError(Common::String x, char icon);
-// void ednaLoad(Common::String name);
-// void showHeader();
-// void toSundry(sundry &sund);
-// void fromSundry(sundry sund);
-// void avvyBackground();
-// void ednaReload(); // From Bootstrap's storage.
-// void restoreDna();
-// bool thereWasAProblem();
-
-// typedef char FourType[5];
-// static const FourType kAvariciusFile;
-
-// bool _bug;
-// Common::String _path, _groi;
-// Common::String _month, _day;
-
-};
-
-} // End of namespace Avalanche.
-
-#endif // AVALANCHE_ENID2_H
diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp
index 31a8874341..e848442c5c 100644
--- a/engines/avalanche/lucerna.cpp
+++ b/engines/avalanche/lucerna.cpp
@@ -34,7 +34,6 @@
#include "avalanche/scrolls.h"
#include "avalanche/timer.h"
#include "avalanche/animation.h"
-#include "avalanche/enid.h"
#include "avalanche/celer.h"
#include "avalanche/pingo.h"
#include "avalanche/sequence.h"
diff --git a/engines/avalanche/module.mk b/engines/avalanche/module.mk
index aabf34c4af..0da172cf9f 100644
--- a/engines/avalanche/module.mk
+++ b/engines/avalanche/module.mk
@@ -11,7 +11,6 @@ MODULE_OBJS = \
pingo.o \
scrolls.o \
lucerna.o \
- enid.o \
celer.o \
sequence.o \
timer.o \
diff --git a/engines/avalanche/timer.cpp b/engines/avalanche/timer.cpp
index 736a5812ce..efe5bf30b7 100644
--- a/engines/avalanche/timer.cpp
+++ b/engines/avalanche/timer.cpp
@@ -35,7 +35,6 @@
#include "avalanche/scrolls.h"
#include "avalanche/acci.h"
#include "avalanche/sequence.h"
-#include "avalanche/enid.h"
#include "avalanche/pingo.h"
#include "common/textconsole.h"
@@ -350,7 +349,7 @@ void Timer::hangAround2() {
_vm->_gyro->_tiedUp = false;
- _vm->_enid->backToBootstrap(1); // Call the shoot-'em-up.
+ // _vm->_enid->backToBootstrap(1); Call the shoot-'em-up. TODO: Replace it with proper ScummVM-friendly function(s)! Do not remove until then!
}
void Timer::afterTheShootemup() {