aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-07-10 12:34:46 +0200
committeruruk2013-07-10 12:34:46 +0200
commitc90357724fa6602b3b54bfcac401b520226a2740 (patch)
tree763a568c4596606c45befd6a36419363b72c33f7 /engines/avalanche
parent223c2d82e56c3fc20100090a3263627b3066d73c (diff)
downloadscummvm-rg350-c90357724fa6602b3b54bfcac401b520226a2740.tar.gz
scummvm-rg350-c90357724fa6602b3b54bfcac401b520226a2740.tar.bz2
scummvm-rg350-c90357724fa6602b3b54bfcac401b520226a2740.zip
AVALANCHE: Implement Basher's initialization.
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/basher2.cpp35
-rw-r--r--engines/avalanche/basher2.h4
-rw-r--r--engines/avalanche/gyro2.h4
3 files changed, 35 insertions, 8 deletions
diff --git a/engines/avalanche/basher2.cpp b/engines/avalanche/basher2.cpp
index 61ad226495..176cbfcc31 100644
--- a/engines/avalanche/basher2.cpp
+++ b/engines/avalanche/basher2.cpp
@@ -48,15 +48,36 @@
#include "common/textconsole.h"
namespace Avalanche {
-
-Basher::Basher() {
- warning("STUB: Basher::Basher()");
-}
+
void Basher::setParent(AvalancheEngine *vm) {
_vm = vm;
}
+void Basher::init() {
+ /* new(previous);*/
+ if (!_vm->_gyro.last.empty())
+ _vm->_gyro.last.clear();
+
+ normal_edit();
+
+ if (_vm->_gyro.demo) {
+ if (!_vm->_gyro.demofile.open("demo.avd")) {
+ warning("AVALANCHE: Basher: File not found: demo.avd");
+ throw "AVALANCHE: Basher: File not found: demo.avd"; // TODO: Some proper exception handling will be needed here.
+ }
+ }
+
+// Not sure that the following part will be used ever...
+#ifdef RECORD
+ count = 0;
+ if (!_vm->_gyro.demofile_save.open("demo.avd")) {
+ warning("AVALANCHE: Basher: File not found: demo.avd");
+ throw "AVALANCHE: Basher: File not found: demo.avd"; // TODO: Some proper exception handling will be needed here.
+ }
+#endif
+}
+
void Basher::plottext() {
warning("STUB: Basher::plottext()");
}
@@ -161,7 +182,11 @@ void Basher::filename_edit() {
}
void Basher::normal_edit() {
- warning("STUB: Basher::normal_edit()");
+ entering_filename = false;
+ /*if (!_vm->_gyro.current.empty())
+ _vm->_gyro.current.clear();*/
+ left_margin = 1;
+ _vm->_gyro.curpos = 1;
}
} // End of namespace Avalanche.
diff --git a/engines/avalanche/basher2.h b/engines/avalanche/basher2.h
index 326ea93dc5..1a97a8568e 100644
--- a/engines/avalanche/basher2.h
+++ b/engines/avalanche/basher2.h
@@ -45,10 +45,10 @@ public:
- Basher();
-
void setParent(AvalancheEngine *vm);
+ void init();
+
void plottext();
void keyboard_link();
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index 3852ef3bf2..5c40b421cb 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -32,6 +32,7 @@
#include "common/str.h"
#include "common/scummsys.h"
+#include "common/file.h"
#include "avalanche/roomnums.h"
#include "avalanche/color.h"
@@ -582,7 +583,8 @@ public:
/* For the demo: */
demo_type demo_rec;
- //file<demo_type> demofile; // http://www.freepascal.org/docs-html/ref/refsu21.html#x45-520003.3.4
+ Common::File demofile; // of demo_type
+ Common::DumpFile demofile_save; // uruk added it - first use located in constructor of Basher
char last_person; /* Last person to have been selected using the People
menu. */