aboutsummaryrefslogtreecommitdiff
path: root/engines/lab/engine.cpp
diff options
context:
space:
mode:
authorStrangerke2015-12-07 17:46:37 +0100
committerWillem Jan Palenstijn2015-12-23 21:33:54 +0100
commit5bc48cbbddc47ba3d1893776178c19bd33dbee4c (patch)
tree11d8ea4391aee37c0af4cb0caa602851ec72e94f /engines/lab/engine.cpp
parent320e658cb1e1d266cb3bf91ad9202ff83f88a9ad (diff)
downloadscummvm-rg350-5bc48cbbddc47ba3d1893776178c19bd33dbee4c.tar.gz
scummvm-rg350-5bc48cbbddc47ba3d1893776178c19bd33dbee4c.tar.bz2
scummvm-rg350-5bc48cbbddc47ba3d1893776178c19bd33dbee4c.zip
LAB: Move utility functions to a separate class
Diffstat (limited to 'engines/lab/engine.cpp')
-rw-r--r--engines/lab/engine.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/lab/engine.cpp b/engines/lab/engine.cpp
index ee61e2ff26..07c49d5a05 100644
--- a/engines/lab/engine.cpp
+++ b/engines/lab/engine.cpp
@@ -941,7 +941,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
_curFileName = _newFileName;
else if (doActionRule(curPos, TAKE - 1, 0, &_cptr))
_curFileName = _newFileName;
- else if (curPos.y < (_graphics->VGAScaleY(149) + _graphics->SVGACord(2)))
+ else if (curPos.y < (_utils->vgaScaleY(149) + _utils->svgaCord(2)))
drawStaticMessage(kTextNothing);
} else if ((actionMode == 1) /* Manipulate an object */ ||
(actionMode == 2) /* Open up a "door" */ ||
@@ -949,7 +949,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
if (doActionRule(curPos, actionMode, _roomNum, &_cptr))
_curFileName = _newFileName;
else if (!doActionRule(curPos, actionMode, 0, &_cptr)) {
- if (curPos.y < (_graphics->VGAScaleY(149) + _graphics->SVGACord(2)))
+ if (curPos.y < (_utils->vgaScaleY(149) + _utils->svgaCord(2)))
drawStaticMessage(kTextNothing);
}
} else if (actionMode == 4) { /* Look at closeups */
@@ -957,15 +957,15 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
setCurClose(curPos, &tempcptr);
if (_cptr == tempcptr) {
- if (curPos.y < (_graphics->VGAScaleY(149) + _graphics->SVGACord(2)))
+ if (curPos.y < (_utils->vgaScaleY(149) + _utils->svgaCord(2)))
drawStaticMessage(kTextNothing);
} else if (tempcptr->_graphicName) {
if (*(tempcptr->_graphicName)) {
_anim->_doBlack = true;
_cptr = tempcptr;
- } else if (curPos.y < (_graphics->VGAScaleY(149) + _graphics->SVGACord(2)))
+ } else if (curPos.y < (_utils->vgaScaleY(149) + _utils->svgaCord(2)))
drawStaticMessage(kTextNothing);
- } else if (curPos.y < (_graphics->VGAScaleY(149) + _graphics->SVGACord(2)))
+ } else if (curPos.y < (_utils->vgaScaleY(149) + _utils->svgaCord(2)))
drawStaticMessage(kTextNothing);
} else if ((actionMode == 5) &&
_conditions->in(curInv)) { /* Use an item on something else */
@@ -974,7 +974,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
if (!_conditions->in(curInv))
decIncInv(&curInv, false);
- } else if (curPos.y < (_graphics->VGAScaleY(149) + _graphics->SVGACord(2)))
+ } else if (curPos.y < (_utils->vgaScaleY(149) + _utils->svgaCord(2)))
drawStaticMessage(kTextNothing);
}
}
@@ -1008,7 +1008,7 @@ bool LabEngine::from_crumbs(uint32 tmpClass, uint16 code, uint16 Qualifier, Comm
}
if (hcptr)
- _event->setMousePos(Common::Point(_graphics->scaleX((hcptr->x1 + hcptr->x2) / 2), _graphics->scaleY((hcptr->y1 + hcptr->y2) / 2)));
+ _event->setMousePos(Common::Point(_utils->scaleX((hcptr->x1 + hcptr->x2) / 2), _utils->scaleY((hcptr->y1 + hcptr->y2) / 2)));
} else if ((msgClass == MOUSEBUTTONS) && (IEQUALIFIER_RBUTTON & Qualifier)) {
eatMessages();
_alternate = !_alternate;