diff options
author | uruk | 2013-08-05 15:25:44 +0200 |
---|---|---|
committer | uruk | 2013-08-05 15:25:44 +0200 |
commit | ba00b2a7d9b08265023d3b478c24c44f43c2e33f (patch) | |
tree | 2de9a0cd389f72dd80962208baa621679f4a4c82 | |
parent | 15f6ba8b2aa3883e47e07bdb131d9ed65a21ee5b (diff) | |
download | scummvm-rg350-ba00b2a7d9b08265023d3b478c24c44f43c2e33f.tar.gz scummvm-rg350-ba00b2a7d9b08265023d3b478c24c44f43c2e33f.tar.bz2 scummvm-rg350-ba00b2a7d9b08265023d3b478c24c44f43c2e33f.zip |
AVALANCHE: Mostly cosmetic modifications in Visa, stub Timeout::arkata_shouts() until dixi() works, partially implement Scrolls::say().
-rw-r--r-- | engines/avalanche/scrolls2.cpp | 65 | ||||
-rw-r--r-- | engines/avalanche/timeout2.cpp | 3 | ||||
-rw-r--r-- | engines/avalanche/visa2.cpp | 7 |
3 files changed, 69 insertions, 6 deletions
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp index bf039d6322..634ee1035d 100644 --- a/engines/avalanche/scrolls2.cpp +++ b/engines/avalanche/scrolls2.cpp @@ -103,6 +103,67 @@ void Scrolls::easteregg() { } void Scrolls::say(int16 x, int16 y, Common::String z) { /* Fancy FAST screenwriting */ + const byte locol = 2; + byte xx, yy, ox, bit, lz, t; + int16 yp; + bool offset; + byte itw[12][80]; + + offset = x % 8 == 4; + x = x / 8; + lz = z.size(); + ox = 0; + _vm->_logger->log_scrollline(); + + for (xx = 0; xx < lz; xx++) { + switch (z[xx]) { + case kControlRoman: { + cfont = roman; + _vm->_logger->log_roman(); + } + break; + case kControlItalic: { + cfont = italic; + _vm->_logger->log_italic(); + } + break; + default: { + for (yy = 0; yy < 12; yy ++) + itw[yy][ox] = ~ch[cfont][z[xx]][yy + 1]; + ox++; + _vm->_logger->log_scrollchar(Common::String(z[xx])); + } + } + } + + lz = ox; + if (offset) { + /* offsetting routine */ + for (yy = 0; yy < 12; yy++) { + bit = 240; + itw[yy][lz] = 255; + for (xx = 0; xx < lz; xx++) { + t = itw[yy][xx]; + itw[yy][xx] = bit + t / 16; + bit = t << 4; + } + } + lz++; + } + + /*yp = x + y * 80 + (1 - _vm->_gyro->cp) * _vm->_gyro->pagetop; + for (yy = 0; yy < 12; yy++) { + yp += 80; + for (bit = 0; bit <= locol; bit ++) { + port[0x3c4] = 2; + port[0x3ce] = 4; + port[0x3c5] = 1 << bit; + port[0x3cf] = bit; + move(itw[yy], mem[0xa000 * yp], lz); + } + }*/ + + warning("STUB: Scrolls::say()"); } @@ -227,7 +288,7 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t byte b, groi; int16 lx, ly, mx, my, ex, ey; bool centre; - byte icon_indent; + byte icon_indent = 0; _vm->_gyro->off_virtual(); //setvisualpage(cp); @@ -456,7 +517,7 @@ void Scrolls::calldrivers() { } } - for (fv = 0; fv <= _vm->_gyro->bufsize; fv++) + for (fv = 0; fv < _vm->_gyro->bufsize; fv++) if (mouthnext) { if (_vm->_gyro->buffer[fv] == kControlRegister) param = 0; diff --git a/engines/avalanche/timeout2.cpp b/engines/avalanche/timeout2.cpp index 1574a95b30..e23114dccb 100644 --- a/engines/avalanche/timeout2.cpp +++ b/engines/avalanche/timeout2.cpp @@ -607,7 +607,8 @@ void Timeout::arkata_shouts() { if (_vm->_gyro->dna.teetotal) return; - _vm->_visa->dixi('q', 76); + // _vm->_visa->dixi('q', 76); + warning("STUB: Timeout::arkata_shouts()"); set_up_timer(160, procarkata_shouts, reason_arkata_shouts); } diff --git a/engines/avalanche/visa2.cpp b/engines/avalanche/visa2.cpp index 5938f523d8..e2f83d636d 100644 --- a/engines/avalanche/visa2.cpp +++ b/engines/avalanche/visa2.cpp @@ -50,12 +50,12 @@ bool Visa::report_dixi_errors = true; void Visa::unskrimble() { for (uint16 fv = 0; fv < _vm->_gyro->bufsize; fv++) - _vm->_gyro->buffer[fv] = (char)((!(_vm->_gyro->buffer[fv]) - fv) % 256); + _vm->_gyro->buffer[fv] = (~(_vm->_gyro->buffer[fv]) - fv + 1) % 256; } void Visa::do_the_bubble() { _vm->_gyro->bufsize++; - _vm->_gyro->buffer[_vm->_gyro->bufsize] = 2; + _vm->_gyro->buffer[_vm->_gyro->bufsize - 1] = 2; } void Visa::dixi(char block, byte point) { @@ -101,7 +101,8 @@ void Visa::dixi(char block, byte point) { sezfile.close(); unskrimble(); - if (bubbling) do_the_bubble(); + if (bubbling) + do_the_bubble(); _vm->_scrolls->calldrivers(); } |