aboutsummaryrefslogtreecommitdiff
path: root/engines/macventure/macventure.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/macventure/macventure.cpp')
-rw-r--r--engines/macventure/macventure.cpp17
1 files changed, 5 insertions, 12 deletions
diff --git a/engines/macventure/macventure.cpp b/engines/macventure/macventure.cpp
index 1244c83d16..76a4791572 100644
--- a/engines/macventure/macventure.cpp
+++ b/engines/macventure/macventure.cpp
@@ -393,12 +393,7 @@ void MacVentureEngine::handleObjectSelect(ObjID objID, WindowReference win, bool
} else {
if (objID == 0) {
unselectAll();
- //if (windata.type == kAnimateBack) {
- //doLasso(win, event, canDrag);
- //}
- //else {
- objID = win;
- //}
+ objID = win;
}
if (objID > 0) {
int currentObjectIndex = findObjectInArray(objID, _currentSelection);
@@ -543,10 +538,9 @@ bool MacVenture::MacVentureEngine::runScriptEngine() {
updateState(true);
}
}
- if (_selectedControl == 1)
+ if (_selectedControl == 1) {
_gameChanged = false;
-
- else if (isGameRunning()) {
+ } else if (isGameRunning()) {
if (_scriptEngine->runControl(kTick, _selectedControl, _destObject, _deltaPoint)) {
_haltedAtEnd = true;
return true;
@@ -1024,7 +1018,7 @@ ObjID MacVentureEngine::getParent(ObjID objID) {
Common::Rect MacVentureEngine::getObjBounds(ObjID objID) {
Common::Point pos = getObjPosition(objID);
- WindowReference win = findParentWindow(objID);
+ WindowReference win = findParentWindow(objID);
if (win != kNoWindow) { // If it's not in a window YET, we don't really care about the border
BorderBounds bounds = borderBounds(_gui->getWindowData(win).type); // HACK
pos.x += bounds.leftOffset;
@@ -1045,8 +1039,7 @@ uint MacVentureEngine::getOverlapPercent(ObjID one, ObjID other) {
Common::Rect oneBounds = getObjBounds(one);
Common::Rect otherBounds = getObjBounds(other);
if (otherBounds.intersects(oneBounds) ||
- oneBounds.intersects(otherBounds))
- {
+ oneBounds.intersects(otherBounds)) {
uint areaOne = oneBounds.width() * oneBounds.height();
uint areaOther = otherBounds.width() * otherBounds.height();
return (areaOther * 100 / areaOne) | 0;