aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/avalanche/avalot.cpp3
-rw-r--r--engines/avalanche/dropdown2.cpp7
-rw-r--r--engines/avalanche/gyro2.cpp20
-rw-r--r--engines/avalanche/gyro2.h8
-rw-r--r--engines/avalanche/lucerna2.cpp59
-rw-r--r--engines/avalanche/parser.cpp8
-rw-r--r--engines/avalanche/scrolls2.cpp50
7 files changed, 34 insertions, 121 deletions
diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index d3779cbc24..ced7150265 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -70,8 +70,7 @@ void Avalot::setup() {
_vm->_gyro->to_do = 0;
_vm->_gyro->lmo = false;
_vm->_scrolls->resetscroll();
- _vm->_gyro->setup_vmc();
- _vm->_gyro->on_virtual();
+ CursorMan.showMouse(true);
gd = 3;
gm = 0;
//initgraph(gd: gm: "");
diff --git a/engines/avalanche/dropdown2.cpp b/engines/avalanche/dropdown2.cpp
index 89eb231280..b19b2534f2 100644
--- a/engines/avalanche/dropdown2.cpp
+++ b/engines/avalanche/dropdown2.cpp
@@ -58,14 +58,13 @@ headtype *headtype::init(char trig, char alttrig, Common::String name, byte p, f
}
void headtype::display() {
- _dr->_vm->_gyro->off(); /*MT*/
+ CursorMan.showMouse(false); /*MT*/
_dr->chalk(xpos, 1, trigger, title, true);
- _dr->_vm->_gyro->on(); /*MT*/
+ CursorMan.showMouse(true); /*MT*/
}
void headtype::highlight() {
- _dr->_vm->_gyro->off();
- _dr->_vm->_gyro->off_virtual();
+ CursorMan.showMouse(false);
//nosound();
//setactivepage(cp);
diff --git a/engines/avalanche/gyro2.cpp b/engines/avalanche/gyro2.cpp
index cea5902889..8d42e1bd92 100644
--- a/engines/avalanche/gyro2.cpp
+++ b/engines/avalanche/gyro2.cpp
@@ -283,18 +283,10 @@ void Gyro::on() {
warning("STUB: Gyro::on()");
}
-void Gyro::on_virtual() {
- warning("STUB: Gyro::on_virtual()");
-}
-
void Gyro::off() {
warning("STUB: Gyro::off()");
}
-void Gyro::off_virtual() {
- warning("STUB: Gyro::off_virtual()");
-}
-
void Gyro::xycheck() {
warning("STUB: Gyro::xycheck()");
}
@@ -609,18 +601,6 @@ void Gyro::hang_around_for_a_while() {
slowdown();
}
-/* Super_Off and Super_On are two very useful procedures. Super_Off switches
- the mouse cursor off, WHATEVER it's like. Super_On restores it again
- afterwards. */
-
-void Gyro::super_off() {
- warning("STUB: Gyro::super_off()");
-}
-
-void Gyro::super_on() {
- warning("STUB: Gyro::super_on()");
-}
-
bool Gyro::mouse_near_text() {
return (my > 144) && (my < 188);
}
diff --git a/engines/avalanche/gyro2.h b/engines/avalanche/gyro2.h
index e54452f0d2..5f268dc80c 100644
--- a/engines/avalanche/gyro2.h
+++ b/engines/avalanche/gyro2.h
@@ -619,10 +619,6 @@ public:
void off();
- void on_virtual();
-
- void off_virtual();
-
void xycheck(); // Only updates mx & my, not all other mouse vars.
void hopto(int16 x, int16 y); // Moves mouse pointer to x,y.
@@ -673,10 +669,6 @@ public:
void hang_around_for_a_while();
- void super_off();
-
- void super_on();
-
bool mouse_near_text();
private:
diff --git a/engines/avalanche/lucerna2.cpp b/engines/avalanche/lucerna2.cpp
index c8863b343b..afbbc1b053 100644
--- a/engines/avalanche/lucerna2.cpp
+++ b/engines/avalanche/lucerna2.cpp
@@ -84,21 +84,8 @@ void Lucerna::draw_also_lines() {
byte ff;
byte squeaky_code;
- switch (_vm->_gyro->visible) {
- case _vm->_gyro->m_virtual: {
- squeaky_code = 1;
- _vm->_gyro->off_virtual();
- }
- break;
- case _vm->_gyro->m_no:
- squeaky_code = 2;
- break;
- case _vm->_gyro->m_yes: {
- squeaky_code = 3;
- _vm->_gyro->off();
- }
- break;
- }
+
+ CursorMan.showMouse(false);
_vm->_graphics->_magics.fillRect(Common::Rect(0, 0, 640, 200), 0);
_vm->_graphics->_magics.frameRect(Common::Rect(0, 45, 639, 161), 15);
@@ -107,16 +94,8 @@ void Lucerna::draw_also_lines() {
if (_vm->_gyro->lines[ff].x1 != 32767 /*maxint*/)
_vm->_graphics->_magics.drawLine(_vm->_gyro->lines[ff].x1, _vm->_gyro->lines[ff].y1, _vm->_gyro->lines[ff].x2, _vm->_gyro->lines[ff].y2, _vm->_gyro->lines[ff].col);
- switch (squeaky_code) {
- case 1 :
- _vm->_gyro->on_virtual();
- break;
- case 2 :
- break; // Zzz... it was off anyway.
- case 3 :
- _vm->_gyro->on();
- break;
- }
+
+ CursorMan.showMouse(true);
}
@@ -236,13 +215,8 @@ void Lucerna::load(byte n) { /* Load2, actually */
byte a1; /*absolute $A000:17184;*/
byte bit;
Common::String xx;
- bool was_virtual;
-
- was_virtual = _vm->_gyro->visible == _vm->_gyro->m_virtual;
- if (was_virtual)
- _vm->_gyro->off_virtual();
- else
- _vm->_gyro->off();
+
+ CursorMan.showMouse(false);
_vm->_gyro->clear_vmc();
@@ -297,10 +271,7 @@ void Lucerna::load(byte n) { /* Load2, actually */
_vm->_logger->log_newroom(_vm->_gyro->roomname);
- if (was_virtual)
- _vm->_gyro->on_virtual();
- else
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
}
@@ -791,7 +762,7 @@ void Lucerna::thinkabout(byte z, bool th) { /* Hey!!! Get it and put it!!! *
f.close();
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
/*setactivepage(3);
putimage(x, y, p, 0);
@@ -800,7 +771,7 @@ void Lucerna::thinkabout(byte z, bool th) { /* Hey!!! Get it and put it!!! *
for (byte fv = 0; fv <= 1; fv ++)
_vm->_trip->getset[fv].remember(thinkspace);
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
_vm->_gyro->thinkthing = th;
}
@@ -872,7 +843,7 @@ void Lucerna::showscore() {
}
numbers[2] = score;
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
//setactivepage(3);
@@ -885,7 +856,7 @@ void Lucerna::showscore() {
//setactivepage(1 - cp);
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
for (byte i = 0; i < 3; i++)
_vm->_gyro->lastscore[i] = numbers[i];
}
@@ -1064,7 +1035,7 @@ void Lucerna::showrw() { // It's data is loaded in load_digits().
if (_vm->_gyro->oldrw == _vm->_gyro->dna.rw)
return;
_vm->_gyro->oldrw = _vm->_gyro->dna.rw;
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
/* for (byte page_ = 0; page_ <= 1; page_ ++) {
setactivepage(page_);
@@ -1073,7 +1044,7 @@ void Lucerna::showrw() { // It's data is loaded in load_digits().
_vm->_graphics->drawPicture(_vm->_gyro->rwlite[_vm->_gyro->dna.rw], 0, 161);
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
//setactivepage(1 - cp);
warning("STUB: Lucerna::showrw()");
@@ -1167,13 +1138,13 @@ void Lucerna::flip_page() {
void Lucerna::delavvy() {
byte page_;
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
triptype &with = _vm->_trip->tr[0];
/*for (page_ = 0; page_ <= 1; page_ ++)
mblit(with.x / 8, with.y, (with.x + with._info.xl) / 8 + 1, with.y + with._info.yl, 3, page_);*/
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
}
void Lucerna::gameover() {
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index 4ce8249eb0..c996a304eb 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -87,7 +87,7 @@ void Parser::handleReturn() {
void Parser::plotText() {
if (_vm->_gyro->mouse_near_text())
- _vm->_gyro->super_off();
+ CursorMan.showMouse(false);
cursorOff();
@@ -96,7 +96,7 @@ void Parser::plotText() {
_vm->_graphics->drawText(_vm->_graphics->_surface, _vm->_parser->_inputText, _vm->_gyro->characters, 8, 24, 161, white);
cursorOn();
- _vm->_gyro->super_on();
+ CursorMan.showMouse(true);
}
void Parser::cursorOn() {
@@ -140,7 +140,7 @@ void Parser::drawCursor() {
void Parser::wipeText() {
if (_vm->_gyro->mouse_near_text())
- _vm->_gyro->super_off();
+ CursorMan.showMouse(false);
cursorOff();
@@ -149,7 +149,7 @@ void Parser::wipeText() {
_quote = true;
_inputTextPos = 0;
cursorOn();
- _vm->_gyro->super_on();
+ CursorMan.showMouse(true);
}
} // End of namespace Avalanche
diff --git a/engines/avalanche/scrolls2.cpp b/engines/avalanche/scrolls2.cpp
index 8e42419bd1..a5dd7d088f 100644
--- a/engines/avalanche/scrolls2.cpp
+++ b/engines/avalanche/scrolls2.cpp
@@ -90,11 +90,11 @@ void Scrolls::state(byte x) { /* Sets "Ready" light to whatever */
//}
warning("STUB: Scrolls::state()");
- _vm->_gyro->super_off();
+ CursorMan.showMouse(false);
_vm->_graphics->drawBar(419, 195, 438, 197, color);
- _vm->_gyro->super_on();
+ CursorMan.showMouse(true);
_vm->_gyro->ledstatus = x;
}
@@ -149,8 +149,7 @@ void Scrolls::normscroll() {
state(3);
_vm->_gyro->seescroll = true;
- _vm->_gyro->off_virtual();
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
_vm->_gyro->newpointer(4);
_vm->_lucerna->mousepage(1 - _vm->_gyro->cp);
@@ -210,7 +209,7 @@ void Scrolls::normscroll() {
state(0);
_vm->_gyro->seescroll = false;
_vm->_lucerna->mousepage(_vm->_gyro->cp);
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
warning("STUB: Scrolls::normscroll()");
}
@@ -334,7 +333,6 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
bool centre;
byte icon_indent = 0;
- _vm->_gyro->off_virtual();
//setvisualpage(cp);
//setactivepage(1 - cp);
_vm->_gyro->oncandopageswap = false; /* On can now no longer swap pages. So we can do what we want without its interference! */
@@ -357,7 +355,7 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
_vm->_graphics->_scrolls.copyFrom(_vm->_graphics->_surface);
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
// The right corners of the scroll.
_vm->_graphics->drawPieSlice(_vm->_graphics->_scrolls, mx + lx, my - ly, 0, 90, 15, lightgray);
@@ -462,12 +460,12 @@ void Scrolls::drawscroll(func2 gotoit) { // This is one of the oldest procs in t
_vm->_logger->log_divider();
//setvisualpage(cp);
//mousepage(cp);
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
/* mblit(ex-46,ey-6,ex+lx*2+15,ey+ly*2+6,3,0);*/
//mblit((ex - 46) / 8, ey - 6, 1 + (ex + lx * 2 + 15) / 8, ey + ly * 2 + 6, cp, 1 - cp);
//blitfix();
_vm->_gyro->oncandopageswap = true; // Normality again.
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
//settextjustify(0, 0); /*sink*/
resetscrolldriver();
if (_vm->_gyro->mpress > 0)
@@ -488,7 +486,7 @@ void Scrolls::bubble(func2 gotoit) {
_vm->_gyro->oncandopageswap = false; /* On can now no longer swap pages. So we can do what we want without its interference! */
//mousepage(1 - cp); /* Mousepage */
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
xl = 0;
yl = _vm->_gyro->scrolln * 5;
@@ -555,17 +553,17 @@ void Scrolls::bubble(func2 gotoit) {
//setvisualpage(1 - cp);
dingdongbell();
_vm->_gyro->oncandopageswap = false;
- _vm->_gyro->on();
+ CursorMan.showMouse(true);
_vm->_gyro->dropsok = false;
// This does the actual drawing to the screen.
(this->*gotoit)();
- _vm->_gyro->off();
+ CursorMan.showMouse(false);
_vm->_gyro->dropsok = true;
/*setvisualpage(cp);
- _vm->_gyro->on(); /*sink;*/
+ CursorMan.showMouse(true); /*sink;*/
_vm->_gyro->oncandopageswap = true;
resetscrolldriver();
if (_vm->_gyro->mpress > 0)
@@ -684,15 +682,8 @@ void Scrolls::calldrivers() {
_vm->_lucerna->sprite_run();
call_spriterun = false;
- was_virtual = _vm->_gyro->visible == _vm->_gyro->m_virtual;
- if (was_virtual)
- _vm->_gyro->off_virtual();
-
drawscroll(&Avalanche::Scrolls::normscroll);
- if (was_virtual)
- _vm->_gyro->on_virtual();
-
resetscroll();
if (_vm->_gyro->screturn)
@@ -732,15 +723,8 @@ void Scrolls::calldrivers() {
natural();
}
- was_virtual = _vm->_gyro->visible == _vm->_gyro->m_virtual;
- if (was_virtual)
- _vm->_gyro->off_virtual();
-
bubble(&Avalanche::Scrolls::normscroll);
- if (was_virtual)
- _vm->_gyro->on_virtual();
-
resetscroll();
if (_vm->_gyro->screturn)
@@ -814,15 +798,8 @@ void Scrolls::calldrivers() {
_vm->_gyro->scrolln++;
_vm->_gyro->scroll[_vm->_gyro->scrolln - 1] = kControlQuestion;
- was_virtual = _vm->_gyro->visible == _vm->_gyro->m_virtual;
- if (was_virtual)
- _vm->_gyro->off_virtual();
-
drawscroll(&Avalanche::Scrolls::dialogue);
- if (was_virtual)
- _vm->_gyro->on_virtual();
-
resetscroll();
}
break;
@@ -891,13 +868,8 @@ void Scrolls::musical_scroll() {
was_virtual = _vm->_gyro->visible == _vm->_gyro->m_virtual;
- if (was_virtual)
- _vm->_gyro->off_virtual();
-
drawscroll(&Avalanche::Scrolls::music_scroll);
- if (was_virtual)
- _vm->_gyro->on_virtual();
resetscroll();
}