aboutsummaryrefslogtreecommitdiff
path: root/engines/avalanche
diff options
context:
space:
mode:
authoruruk2013-08-05 17:35:17 +0200
committeruruk2013-08-05 17:35:17 +0200
commita971cf3a3997dd71282c5566bb2f5ee062c190bf (patch)
treeafd3e090c6c8c1bb9ebce98da12b3cb4cd4eb167 /engines/avalanche
parentba00b2a7d9b08265023d3b478c24c44f43c2e33f (diff)
downloadscummvm-rg350-a971cf3a3997dd71282c5566bb2f5ee062c190bf.tar.gz
scummvm-rg350-a971cf3a3997dd71282c5566bb2f5ee062c190bf.tar.bz2
scummvm-rg350-a971cf3a3997dd71282c5566bb2f5ee062c190bf.zip
AVALANCHE: Implement Scrolls::say().
Diffstat (limited to 'engines/avalanche')
-rw-r--r--engines/avalanche/scrolls2.cpp69
-rw-r--r--engines/avalanche/scrolls2.h1
2 files changed, 66 insertions, 4 deletions
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 634ee1035d..4a62f24936 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -129,7 +129,7 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { /* Fancy FAST screenwrit
break;
default: {
for (yy = 0; yy < 12; yy ++)
- itw[yy][ox] = ~ch[cfont][z[xx]][yy + 1];
+ itw[yy][ox] = ~ch[cfont][z[xx]][yy + 2];
ox++;
_vm->_logger->log_scrollchar(Common::String(z[xx]));
}
@@ -151,6 +151,18 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { /* Fancy FAST screenwrit
lz++;
}
+ y++;
+ for (byte fv = 0; fv < z.size(); fv++)
+ for (byte ff = 0; ff < 12; ff++) {
+ byte pixel = itw[ff][fv]; // Note that it's the bitwise NOT operator!
+ for (byte bit = 0; bit < 8; bit++) {
+ byte pixelBit = (pixel >> bit) & 1;
+ *_vm->_graphics->getPixel(x * 8 + fv * 8 + 7 - bit, y + ff) = pixelBit + (pixelBit << 1) + (pixelBit << 2);
+ // We don't have to bother with the planes, since they all have the same value. See the original.
+ // Note that it's the bitwise OR operator!
+ }
+ }
+
/*yp = x + y * 80 + (1 - _vm->_gyro->cp) * _vm->_gyro->pagetop;
for (yy = 0; yy < 12; yy++) {
yp += 80;
@@ -162,14 +174,63 @@ void Scrolls::say(int16 x, int16 y, Common::String z) { /* Fancy FAST screenwrit
move(itw[yy], mem[0xa000 * yp], lz);
}
}*/
-
-
- warning("STUB: Scrolls::say()");
}
/* Here are the procedures that Scroll calls */ /* So they must be... */ /*$F+*/
void Scrolls::normscroll() {
+ Common::String egg = Common::String(kControlParagraph) + kControlLeftJustified + kControlNegative + kControlBell + kControlBackspace + "***";
+ Common::String e = "(c) 1994";
+ char r;
+ bool oktoexit;
+
+ state(3);
+ _vm->_gyro->seescroll = true;
+ _vm->_gyro->off_virtual();
+ _vm->_gyro->on();
+ _vm->_gyro->newpointer(4);
+ _vm->_lucerna->mousepage(1 - _vm->_gyro->cp);
+
+ if (_vm->_gyro->demo)
+ _vm->_basher->get_demorec();
+
+// do {
+// do {
+// _vm->_gyro->check(); /* was "checkclick;" */
+//
+//#ifdef RECORD slowdown(); basher::count += 1; #endif
+//
+// if (_vm->_gyro->demo) {
+// if (_vm->_basher->demo_ready())
+// break;
+// if (_vm->_enhanced->keypressede())
+// return;
+// } else if (_vm->_enhanced->keypressede())
+// break;
+// } while (!((mrelease > 0) || (buttona1()) || (buttonb1())));
+//
+//
+// if (mrelease == 0) {
+// inkey();
+// if (aboutscroll) {
+// move(e[2 - 1], e[1 - 1], 7);
+// e[8 - 1] = inchar;
+// if (egg == e) easteregg();
+// }
+// oktoexit = set::of('\15', '\33', '+', '#', eos).has(inchar);
+// if (! oktoexit) errorled();
+// }
+//
+// } while (!((oktoexit) || (mrelease > 0)));
+//
+//#ifdef RECORD record_one(); #endif
+//
+ //_vm->_gyro->screturn = r == '#'; /* "back door" */
+ state(0);
+ _vm->_gyro->seescroll = false;
+ _vm->_lucerna->mousepage(_vm->_gyro->cp);
+ _vm->_gyro->off();
+
warning("STUB: Scrolls::normscroll()");
}
diff --git a/engines/avalanche/scrolls2.h b/engines/avalanche/scrolls2.h
index 6fa2be97d6..b267ff68f6 100644
--- a/engines/avalanche/scrolls2.h
+++ b/engines/avalanche/scrolls2.h
@@ -89,6 +89,7 @@ private:
static const char kControlToBuffer = 4; // ^D
static const char kControlItalic = 6; // ^F
static const char kControlBell = 7; // ^G
+ static const char kControlBackspace = 8; // ^H
static const char kControlInsertSpaces = 9; // ^I
static const char kControlLeftJustified = 12; // ^L
static const char kControlNewLine = 13; // ^M