aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-07-02 13:20:23 +0200
committeruruk2013-07-02 13:20:23 +0200
commit76423aa712006363ef02be0cddd592e9cba4f710 (patch)
tree671cba5948562b7adf65fcdf5ab9a56388538f73 /engines/avalanche
parent7526af940cbf338c05a40875571da75b762eb956 (diff)
downloadscummvm-rg350-76423aa712006363ef02be0cddd592e9cba4f710.tar.gz
scummvm-rg350-76423aa712006363ef02be0cddd592e9cba4f710.tar.bz2
scummvm-rg350-76423aa712006363ef02be0cddd592e9cba4f710.zip
AVALANCHE: Add Closing.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/avalanche.cpp1
-rw-r--r--engines/avalanche/avalanche.h2
-rw-r--r--engines/avalanche/closing2.cpp91
-rw-r--r--engines/avalanche/closing2.h74
4 files changed, 168 insertions, 0 deletions
diff --git a/engines/avalanche/avalanche.cpp b/engines/avalanche/avalanche.cpp
index eade42bbc6..a55ab3eefa 100644
--- a/engines/avalanche/avalanche.cpp
+++ b/engines/avalanche/avalanche.cpp
@@ -63,6 +63,7 @@ namespace Avalanche {
_acci.setParent(this); _acci.init();
_basher.setParent(this);
_dropdown.setParent(this);
+ _closing.setParent(this);
}
AvalancheEngine::~AvalancheEngine() {
diff --git a/engines/avalanche/avalanche.h b/engines/avalanche/avalanche.h
index 46ceeba79f..51081a05bf 100644
--- a/engines/avalanche/avalanche.h
+++ b/engines/avalanche/avalanche.h
@@ -46,6 +46,7 @@
#include "avalanche/acci2.h"
#include "avalanche/basher2.h"
#include "avalanche/dropdown2.h"
+#include "avalanche/closing2.h"
#include "engines/engine.h"
#include "engines/advancedDetector.h"
@@ -78,6 +79,7 @@ public:
Acci _acci;
Basher _basher;
Dropdown _dropdown;
+ Closing _closing;
AvalancheEngine(OSystem *syst, const AvalancheGameDescription *gd);
~AvalancheEngine();
diff --git a/engines/avalanche/closing2.cpp b/engines/avalanche/closing2.cpp
new file mode 100644
index 0000000000..3336a5f954
--- /dev/null
+++ b/engines/avalanche/closing2.cpp
@@ -0,0 +1,91 @@
+/* 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.
+ */
+
+/* CLOSING The closing screen and error handler. */
+
+#include "avalanche/avalanche.h"
+
+#include "avalanche/closing2.h"
+#include "avalanche/gyro2.h"
+#include "avalanche/lucerna2.h"
+
+#include "common/textconsole.h"
+#include "common/random.h"
+
+namespace Avalanche {
+
+Closing::Closing() {
+ warning("STUB: Closing::Closing()");
+}
+
+void Closing::setParent(AvalancheEngine *vm) {
+ _vm = vm;
+}
+
+void Closing::get_screen(byte which) {
+ warning("STUB: Closing::get_screen()");
+}
+
+void Closing::show_screen() {
+ warning("STUB: Closing::show_screen()");
+}
+
+void Closing::quit_with(byte which, byte errorlev) {
+ warning("STUB: Closing::quit_with()");
+}
+
+void Closing::put_in(Common::String x, uint16 where) {
+ warning("STUB: Closing::put_in()");
+}
+
+void Closing::end_of_program() {
+ const Common::String nouns[12] = {
+ "sackbut", "harpsichord", "camel", "conscience", "ice-cream", "serf",
+ "abacus", "castle", "carrots", "megaphone", "manticore", "drawbridge"
+ };
+
+ const Common::String verbs[12] = {
+ "haunt", "daunt", "tickle", "gobble", "erase", "provoke", "surprise",
+ "ignore", "stare at", "shriek at", "frighten", "quieten"
+ };
+
+ Common::String result;
+
+ //nosound;
+ warning("STUB: Closing::end_of_program()");
+
+ get_screen(scr_nagscreen);
+ result = nouns[_vm->_rnd->getRandomNumber(12)] + " will " + verbs[_vm->_rnd->getRandomNumber(12)] + " you";
+ put_in(result, 1628);
+ show_screen(); /* No halt- it's already set up. */
+}
+
+void Closing::bug_handler() {
+ warning("STUB: Closing::bug_handler()");
+}
+
+} // End of namespace Avalanche.
diff --git a/engines/avalanche/closing2.h b/engines/avalanche/closing2.h
new file mode 100644
index 0000000000..122a8e23a9
--- /dev/null
+++ b/engines/avalanche/closing2.h
@@ -0,0 +1,74 @@
+/* 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.
+ */
+
+/* CLOSING The closing screen and error handler. */
+
+#ifndef CLOSING2_H
+#define CLOSING2_H
+
+#include "common/scummsys.h"
+#include "common/str.h"
+
+namespace Avalanche {
+class AvalancheEngine;
+
+class Closing {
+public:
+ static const int16 scr_bugalert = 1;
+ static const int16 scr_ramcram = 2;
+ static const int16 scr_nagscreen = 3;
+ static const int16 scr_twocopies = 5;
+
+ Closing();
+
+ void setParent(AvalancheEngine *vm);
+
+ void quit_with(byte which, byte errorlev);
+
+ void end_of_program();
+
+private:
+ AvalancheEngine *_vm;
+
+ typedef Common::String scrtype;
+
+ scrtype q /*absolute $B8FA:0*/; /* Nobody's using the graphics memory now. */
+ //file<scrtype> f;
+ void *exitsave;
+
+ void get_screen(byte which);
+
+ void show_screen();
+
+ void put_in(Common::String x, uint16 where);
+
+ void bug_handler();
+};
+
+} // End of namespace Avalanche.
+
+#endif // CLOSING2_H