aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/avalanche/animation.cpp8
-rw-r--r--engines/avalanche/gyro.cpp2
-rw-r--r--engines/avalanche/gyro.h8
-rw-r--r--engines/avalanche/lucerna.cpp4
-rw-r--r--engines/avalanche/menu.cpp10
-rw-r--r--engines/avalanche/pingo.cpp7
-rw-r--r--engines/avalanche/scrolls.cpp31
7 files changed, 11 insertions, 59 deletions
diff --git a/engines/avalanche/animation.cpp b/engines/avalanche/animation.cpp
index ed6f92f006..e2f772145b 100644
--- a/engines/avalanche/animation.cpp
+++ b/engines/avalanche/animation.cpp
@@ -248,9 +248,7 @@ void AnimationType::bounce() {
_anim->stopWalking();
else
stopWalk();
- _anim->_vm->_gyro->_onCanDoPageSwap = false;
_anim->_vm->_lucerna->drawDirection();
- _anim->_vm->_gyro->_onCanDoPageSwap = true;
}
int8 AnimationType::getSign(int16 val) {
@@ -375,7 +373,6 @@ byte Animation::checkFeet(int16 x1, int16 x2, int16 oy, int16 y, byte yl) {
// if not alive then begin checkfeet:=0; exit; end;
byte a = 0;
- //setactivepage(2);
if (x1 < 0)
x1 = 0;
if (x2 > 639)
@@ -398,7 +395,6 @@ byte Animation::checkFeet(int16 x1, int16 x2, int16 oy, int16 y, byte yl) {
}
}
- //setactivepage(1 - cp);
return a;
}
@@ -950,8 +946,6 @@ void Animation::updateSpeed() {
_sprites[0]._moveX = (_sprites[0]._moveX / 3) * _sprites[0]._speedX;
- //setactivepage(3);
-
if (_sprites[0]._speedX == _vm->_gyro->kRun)
_vm->_graphics->_surface.drawLine(371, 199, 373, 199, kColorYellow);
else
@@ -961,8 +955,6 @@ void Animation::updateSpeed() {
_vm->_graphics->_surface.drawLine(336, 199, 338, 199, kColorLightblue);
else
_vm->_graphics->_surface.drawLine(371, 199, 373, 199, kColorLightblue);
-
- //setactivepage(1 - cp);
}
void Animation::changeDirection(byte t, byte dir) {
diff --git a/engines/avalanche/gyro.cpp b/engines/avalanche/gyro.cpp
index 0754ae3ca7..e338ecddbc 100644
--- a/engines/avalanche/gyro.cpp
+++ b/engines/avalanche/gyro.cpp
@@ -166,7 +166,7 @@ byte Gyro::_whereIs[29] = {
kRoomWiseWomans // The Wise Woman.
};
-Gyro::Gyro(AvalancheEngine *vm) : _interrogation(0), _onCanDoPageSwap(true) {
+Gyro::Gyro(AvalancheEngine *vm) : _interrogation(0) {
_vm = vm;
// Needed because of Lucerna::load_also()
diff --git a/engines/avalanche/gyro.h b/engines/avalanche/gyro.h
index 43809becee..16d7df22ba 100644
--- a/engines/avalanche/gyro.h
+++ b/engines/avalanche/gyro.h
@@ -235,21 +235,13 @@ public:
};
static const uint16 kNotes[12];
-
static const TuneType kTune;
-
-
// If this is greater than zero, the next line you type is stored in the DNA in a position dictated by the value.
// If a scroll comes up, or you leave the room, it's automatically set to zero.
byte _interrogation;
-
static byte _whereIs[29];
- // Variable static constant for overriding the ability of On to switch pages.
- // You may know better than On which page to switch to.
- bool _onCanDoPageSwap;
-
// Former DNA structure
byte _carryNum; // How many objects you're carrying...
bool _objects[kObjectNum]; // ...and which ones they are.
diff --git a/engines/avalanche/lucerna.cpp b/engines/avalanche/lucerna.cpp
index b50a5160ba..98a9775323 100644
--- a/engines/avalanche/lucerna.cpp
+++ b/engines/avalanche/lucerna.cpp
@@ -605,10 +605,8 @@ void Lucerna::enterRoom(byte room, byte ped) {
case kRoomMap:
// You're entering the map.
dawn();
- //setactivepage(cp);
if (ped > 0)
zoomOut(_vm->_gyro->_peds[ped]._x, _vm->_gyro->_peds[ped]._y);
- //setactivepage(1 - cp);
if ((_vm->_gyro->_objects[Gyro::kObjectWine - 1]) && (_vm->_gyro->_wineState != 3)) {
_vm->_scrolls->displayScrollChain('q', 9); // Don't want to waste the wine!
@@ -867,9 +865,7 @@ void Lucerna::thinkAbout(byte object, bool type) {
CursorMan.showMouse(false);
#if 0
- setactivepage(3);
putimage(x, y, p, 0);
- setactivepage(1 - cp);
#endif
CursorMan.showMouse(true);
diff --git a/engines/avalanche/menu.cpp b/engines/avalanche/menu.cpp
index 2a537eb456..4be9573015 100644
--- a/engines/avalanche/menu.cpp
+++ b/engines/avalanche/menu.cpp
@@ -123,8 +123,6 @@ void MenuItem::displayOption(byte y, bool highlit) {
void MenuItem::display() {
CursorMan.showMouse(false);
- //setactivepage(cp);
- //setvisualpage(cp);
//setfillstyle(1, menu_b);
//setcolor(menu_border);
_firstlix = true;
@@ -143,12 +141,11 @@ void MenuItem::display() {
_dr->_vm->_gyro->_defaultLed = 1;
_dr->_vm->_gyro->_currentMouse = 177;
- //mousepage(cp);
+
CursorMan.showMouse(true); // 4 = fletch
}
void MenuItem::wipe() {
- //setactivepage(cp);
CursorMan.showMouse(false);
_dr->drawMenuText(_dr->_menuBar._menuItems[_dr->_activeMenuItem._activeNum]._xpos, 1, _dr->_menuBar._menuItems[_dr->_activeMenuItem._activeNum]._trigger, _dr->_menuBar._menuItems[_dr->_activeMenuItem._activeNum]._title, true, false);
@@ -168,11 +165,9 @@ void MenuItem::moveHighlight(int8 inc) {
return;
_highlightNum = highlightNum;
}
- //setactivepage(cp);
CursorMan.showMouse(false);
displayOption(_oldY, false);
displayOption(_highlightNum, true);
- //setactivepage(1 - cp);
_oldY = _highlightNum;
CursorMan.showMouse(true);
}
@@ -225,8 +220,6 @@ void MenuBar::createMenuItem(char trig, Common::String title, char altTrig, Menu
}
void MenuBar::draw() {
- //setactivepage(3);
-
_dr->_vm->_graphics->_surface.fillRect(Common::Rect(0, 0, 640, 10), _dr->kMenuBackgroundColor);
byte savecp = _dr->_vm->_gyro->_cp;
@@ -703,7 +696,6 @@ void Menu::update() { // TODO: Optimize it ASAP!!! It really needs it...
_vm->updateEvents();
while (_vm->_lucerna->_holdLeftMouse);
-
while (!_vm->shouldQuit()) {
do {
_vm->updateEvents();
diff --git a/engines/avalanche/pingo.cpp b/engines/avalanche/pingo.cpp
index 8fa1ef0d6a..0e6ec52f31 100644
--- a/engines/avalanche/pingo.cpp
+++ b/engines/avalanche/pingo.cpp
@@ -57,7 +57,7 @@ const
var fv:byte; gd,gm:int16; r:char;
begin;
dusk; delavvy;
- setactivepage(3); mousepage(3); setvisualpage(3); off;
+ off;
cleardevice; setfillstyle(xhatchfill,11);
settextstyle(1,0,4); settextjustify(1,1);
dplot(320,10,title);
@@ -78,7 +78,7 @@ begin;
newpointer(6); { TTHand }
dawn; on; setbkcolor(1); repeat check until (mpress>0) or keypressed;
while keypressed do r:=readkey; setbkcolor(0); settextjustify(0,0);
- dusk; setvisualpage(0); setactivepage(0); mousepage(0); dawn;
+ dusk; dawn;
copy02;
#endif
@@ -126,11 +126,8 @@ void Pingo::winningPic() {
}
#endif
- warning("STUB: Pingo::winningPic()");
-
f.close();
- //setvisualpage(0);
warning("STUB: Pingo::winningPic()");
_vm->_lucerna->dawn();
diff --git a/engines/avalanche/scrolls.cpp b/engines/avalanche/scrolls.cpp
index fdcf5202fc..b2a81a7b2e 100644
--- a/engines/avalanche/scrolls.cpp
+++ b/engines/avalanche/scrolls.cpp
@@ -378,14 +378,9 @@ void Scrolls::drawSign(Common::String fn, int16 xl, int16 yl, int16 y) {
}
void Scrolls::drawScroll(ScrollsFunctionType modeFunc) {
- int16 ex;
-
- //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!
-
int16 lx = 0;
int16 ly = (_vm->_gyro->_scrollNum) * 6;
+ int16 ex;
for (int i = 0; i < _vm->_gyro->_scrollNum; i++) {
ex = _vm->_gyro->_scroll[i].size() * 8;
if (lx < ex)
@@ -489,7 +484,6 @@ void Scrolls::drawScroll(ScrollsFunctionType modeFunc) {
}
_vm->_gyro->_underScroll = my * 2 + 6; // Multiplying because of the doubled screen height.
- //setvisualpage(1 - cp);
ringBell();
//my = getpixel(0, 0);
_vm->_gyro->_dropsOk = false;
@@ -499,13 +493,10 @@ void Scrolls::drawScroll(ScrollsFunctionType modeFunc) {
unDodgem();
_vm->_gyro->_dropsOk = true;
- //setvisualpage(cp);
- //mousepage(cp);
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.
CursorMan.showMouse(true);
//settextjustify(0, 0); // sink
resetScrollDriver();
@@ -518,15 +509,8 @@ void Scrolls::drawScroll(ScrollsFunctionType modeFunc) {
void Scrolls::drawBubble(ScrollsFunctionType modeFunc) {
Common::Point points[3];
// byte *rp1, *rp2; // replace: 1=bubble, 2=pointer
- int16 xc; // x correction
-
- //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!
- //mousepage(1 - cp); // Mousepage
CursorMan.showMouse(false);
-
int16 xl = 0;
int16 yl = _vm->_gyro->_scrollNum * 5;
for (int i = 0; i < _vm->_gyro->_scrollNum; i++) {
@@ -539,7 +523,7 @@ void Scrolls::drawBubble(ScrollsFunctionType modeFunc) {
int16 xw = xl + 18;
int16 yw = yl + 7;
int16 my = yw * 2 - 2;
- xc = 0;
+ int16 xc = 0;
if ((_vm->_gyro->_talkX - xw) < 0)
xc = -(_vm->_gyro->_talkX - xw);
@@ -585,9 +569,7 @@ void Scrolls::drawBubble(ScrollsFunctionType modeFunc) {
_vm->_graphics->drawText(_vm->_graphics->_scrolls, _vm->_gyro->_scroll[i], _vm->_gyro->_font, 8, x - offset * 4, (i * 10) + 12, _vm->_gyro->_talkFontColor);
}
- //setvisualpage(1 - cp);
ringBell();
- _vm->_gyro->_onCanDoPageSwap = false;
CursorMan.showMouse(true);
_vm->_gyro->_dropsOk = false;
@@ -597,12 +579,13 @@ void Scrolls::drawBubble(ScrollsFunctionType modeFunc) {
CursorMan.showMouse(false);
_vm->_gyro->_dropsOk = true;
- //setvisualpage(cp);
CursorMan.showMouse(true); // sink;
- _vm->_gyro->_onCanDoPageSwap = true;
resetScrollDriver();
- /*if (_vm->_gyro->mpress > 0)
- _vm->_gyro->after_the_scroll = true;*/
+
+#if 0
+ if (_vm->_gyro->mpress > 0)
+ _vm->_gyro->after_the_scroll = true;
+#endif
}
bool Scrolls::displayQuestion(Common::String question) {