aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/gyro2.h4
-rw-r--r--engines/avalanche/lucerna2.cpp23
2 files changed, 23 insertions, 4 deletions
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index e83e0a96b9..3852ef3bf2 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -523,8 +523,8 @@ public:
bool ontoolbar, seescroll;
char objlist[10];
- void * digit[10];
- void *rwlite[9];
+ byte *digit[10]; // digitsize and rwlitesize are defined in Lucerna::load_digits() !!!
+ byte *rwlite[9]; // Maybe it will be needed to move them to the class itself instead.
byte oldrw;
Common::String lastscore;
byte cmp; /* current mouse-void **/
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index 29fac293e6..da2aaae027 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -744,7 +744,7 @@ void Lucerna::thinkabout(char z, bool th) { /* Hey!!! Get it and put it!!! *
p = new byte[picsize];
if (!f.open("folk.avd")) {
- warning("AVALANCHE: Lucerna: File not found: thinks.avd");
+ warning("AVALANCHE: Lucerna: File not found: folk.avd");
return;
}
@@ -779,7 +779,26 @@ void Lucerna::thinkabout(char z, bool th) { /* Hey!!! Get it and put it!!! *
}
void Lucerna::load_digits() { /* Load the scoring digits & rwlites */
- warning("STUB: Lucerna::load_digits()");
+ const byte digitsize = 134;
+ const byte rwlitesize = 126;
+
+ if (!f.open("digit.avd")) {
+ warning("AVALANCHE: Lucerna: File not found: digit.avd");
+ return;
+ }
+
+ for (byte fv = 0; fv < 10; fv ++) {
+ _vm->_gyro.digit[fv] = new byte[digitsize];
+ for (byte i = 0; i < digitsize; i++)
+ _vm->_gyro.digit[fv][i] = f.readByte();
+ }
+
+ for (byte ff = 0; ff < 9; ff ++) {
+ _vm->_gyro.digit[ff] = new byte[rwlitesize];
+ for (byte i = 0; i < rwlitesize; i++)
+ _vm->_gyro.digit[ff][i] = f.readByte();
+ }
+ f.close();
}
void Lucerna::toolbar() {