aboutsummaryrefslogtreecommitdiff
path: root/engines/illusions
diff options
context:
space:
mode:
authorEric Fry2018-06-26 22:28:52 +1000
committerEugene Sandulenko2018-07-20 06:43:33 +0000
commit7cadb7ad0ce7b24c28d3fa9d842f7083ae5b9056 (patch)
tree0fe9404404510cadb1586dd1a43e35cda3c1c25f /engines/illusions
parentaa241b8ef37a09972171159045c9f2efe0c167e9 (diff)
downloadscummvm-rg350-7cadb7ad0ce7b24c28d3fa9d842f7083ae5b9056.tar.gz
scummvm-rg350-7cadb7ad0ce7b24c28d3fa9d842f7083ae5b9056.tar.bz2
scummvm-rg350-7cadb7ad0ce7b24c28d3fa9d842f7083ae5b9056.zip
ILLUSIONS: Formatting
Diffstat (limited to 'engines/illusions')
-rw-r--r--engines/illusions/camera.cpp2
-rw-r--r--engines/illusions/duckman/menusystem_duckman.cpp12
-rw-r--r--engines/illusions/input.cpp4
-rw-r--r--engines/illusions/menusystem.cpp2
-rw-r--r--engines/illusions/pathfinder.cpp4
-rw-r--r--engines/illusions/resources/backgroundresource.cpp4
-rw-r--r--engines/illusions/sound.cpp2
7 files changed, 15 insertions, 15 deletions
diff --git a/engines/illusions/camera.cpp b/engines/illusions/camera.cpp
index 2aa8e74f7f..1f7ea32d64 100644
--- a/engines/illusions/camera.cpp
+++ b/engines/illusions/camera.cpp
@@ -87,7 +87,7 @@ void Camera::set(Common::Point &panPoint, WidthHeight &dimensions) {
void Camera::panCenterObject(uint32 objectId, int16 panSpeed) {
Common::Point *actorPosition = _vm->getObjectActorPositionPtr(objectId);
if (_vm->getGameId() == kGameIdDuckman) {
- if(objectId == Illusions::CURSOR_OBJECT_ID) {
+ if (objectId == Illusions::CURSOR_OBJECT_ID) {
_activeState._cameraMode = 2;
_activeState._trackingLimits.x = 156;
_activeState._trackingLimits.y = 96;
diff --git a/engines/illusions/duckman/menusystem_duckman.cpp b/engines/illusions/duckman/menusystem_duckman.cpp
index c773afc554..4d63147321 100644
--- a/engines/illusions/duckman/menusystem_duckman.cpp
+++ b/engines/illusions/duckman/menusystem_duckman.cpp
@@ -251,7 +251,7 @@ BaseMenu *DuckmanMenuSystem::createAddRemoveInventoryMenu() {
BaseMenu *menu = new BaseMenu(this, 0x00120002, 0, 0, 0, 17, 1);
menu->addText("Add/Remove Inventory");
menu->addText("-----------------");
- for(int i=0;i < 21;i++) {
+ for (int i = 0; i < 21; i++) {
menu->addMenuItem(new MenuItem(kDebugInventoryItems[i].name, new MenuActionInventoryAddRemove(this, _vm, i)));
}
menu->addMenuItem(new MenuItem("Back", new MenuActionLeaveMenu(this)));
@@ -318,13 +318,13 @@ void DuckmanMenuSystem::playSoundEffect(int sfxId) {
_vm->playSoundEffect(sfxId);
}
- MenuActionInventoryAddRemove::MenuActionInventoryAddRemove(BaseMenuSystem *menuSystem, IllusionsEngine_Duckman *vm, uint choiceIndex)
- : BaseMenuAction(menuSystem), _choiceIndex(choiceIndex), _vm(vm) {
+MenuActionInventoryAddRemove::MenuActionInventoryAddRemove(BaseMenuSystem *menuSystem, IllusionsEngine_Duckman *vm, uint choiceIndex)
+ : BaseMenuAction(menuSystem), _choiceIndex(choiceIndex), _vm(vm) {
}
void MenuActionInventoryAddRemove::execute() {
if (_vm->_scriptResource->_properties.get(kDebugInventoryItems[_choiceIndex].propertyId)) {
- if(_vm->_cursor._objectId == kDebugInventoryItems[_choiceIndex].objectId) {
+ if (_vm->_cursor._objectId == kDebugInventoryItems[_choiceIndex].objectId) {
_vm->stopCursorHoldingObject();
}
_vm->_scriptResource->_properties.set(kDebugInventoryItems[_choiceIndex].propertyId, false);
@@ -360,7 +360,7 @@ int MenuActionUpdateSlider::calcNewSliderValue(int newOffset) {
int start = 0;
int end = 0;
int currentPosition = 0;
- for(int i = 0; i < text.size(); i++) {
+ for (int i = 0; i < text.size(); i++) {
switch (text[i]) {
case '{' : start = i; break;
case '}' : end = i; break;
@@ -385,7 +385,7 @@ int MenuActionUpdateSlider::calcNewSliderValue(int newOffset) {
void MenuActionUpdateSlider::setSliderValue(uint8 newValue) {
int start = 0;
Common::String text = _menuItem->getText();
- for(int i = 0; i < text.size(); i++) {
+ for (int i = 0; i < text.size(); i++) {
switch (text[i]) {
case '{' : start = i; break;
case '|' : text.setChar('~', i); break;
diff --git a/engines/illusions/input.cpp b/engines/illusions/input.cpp
index 21042dcc1c..712f417a19 100644
--- a/engines/illusions/input.cpp
+++ b/engines/illusions/input.cpp
@@ -180,8 +180,8 @@ void Input::handleKey(Common::KeyCode key, int mouseButton, bool down) {
_newKeys = 0;
_newButtons = ~prevButtonStates & _buttonStates;
- if ( !down && !isCheatModeActive() ) {
- if( _cheatCodeIndex < 7 && key == kCheatCode[_cheatCodeIndex] ) {
+ if ( !down && !isCheatModeActive()) {
+ if ( _cheatCodeIndex < 7 && key == kCheatCode[_cheatCodeIndex]) {
_cheatCodeIndex++;
} else {
_cheatCodeIndex = 0;
diff --git a/engines/illusions/menusystem.cpp b/engines/illusions/menusystem.cpp
index 762f50417d..79cbdd401d 100644
--- a/engines/illusions/menusystem.cpp
+++ b/engines/illusions/menusystem.cpp
@@ -554,7 +554,7 @@ void BaseMenuSystem::redrawMenuText(BaseMenu *menu) {
bool BaseMenuSystem::calcMenuItemTextPositionAtPoint(Common::Point pt, int &offset) {
uint menuItemIndex;
- if(!calcMenuItemIndexAtPoint(pt, menuItemIndex)) {
+ if (!calcMenuItemIndexAtPoint(pt, menuItemIndex)) {
return false;
}
diff --git a/engines/illusions/pathfinder.cpp b/engines/illusions/pathfinder.cpp
index b0b43a0e4f..04ee493428 100644
--- a/engines/illusions/pathfinder.cpp
+++ b/engines/illusions/pathfinder.cpp
@@ -139,10 +139,10 @@ void PathFinder::findValidDestPt(Common::Point &destPt) {
for (uint i = 0; i < _walkRects->size(); ++i) {
PathLine currRect = (*_walkRects)[i];
//TODO fix this hack. Used here to get xmas tree scene to work.
- if(currRect.p1.x > _screenRect.p1.x) {
+ if (currRect.p1.x > _screenRect.p1.x) {
currRect.p1.x = _screenRect.p1.x;
}
- if(currRect.p0.x < _screenRect.p0.x) {
+ if (currRect.p0.x < _screenRect.p0.x) {
currRect.p0.x = _screenRect.p0.x;
}
WidthHeight rectDimensions = calcRectDimensions(currRect);
diff --git a/engines/illusions/resources/backgroundresource.cpp b/engines/illusions/resources/backgroundresource.cpp
index 3ad7085bee..a35f06e20f 100644
--- a/engines/illusions/resources/backgroundresource.cpp
+++ b/engines/illusions/resources/backgroundresource.cpp
@@ -468,9 +468,9 @@ void BackgroundInstance::initSurface() {
_surfaces[i] = _vm->_screen->allocSurface(bgInfo->_surfInfo);
drawTiles(_surfaces[i], bgInfo->_tileMap, bgInfo->_tilePixels);
#if 0
- if(_bgRes->_pathWalkRectsCount > 0) {
+ if (_bgRes->_pathWalkRectsCount > 0) {
PathLines *pl = _bgRes->_pathWalkRects->_rects;
- for(int j=0;j < pl->size(); j++) {
+ for (int j=0; j < pl->size(); j++) {
PathLine pathLine = (*pl)[j];
debug(0, "walk path rect line[%d]. (%d,%d)->(%d,%d)", j, pathLine.p0.x, pathLine.p0.y, pathLine.p1.x, pathLine.p1.y);
_surfaces[i]->drawLine(pathLine.p0.x, pathLine.p0.y, pathLine.p1.x, pathLine.p1.y, 5);
diff --git a/engines/illusions/sound.cpp b/engines/illusions/sound.cpp
index bc65e37784..aed389a24d 100644
--- a/engines/illusions/sound.cpp
+++ b/engines/illusions/sound.cpp
@@ -212,7 +212,7 @@ bool VoicePlayer::isCued() {
}
void VoicePlayer::pause(bool paused) {
- if(isPlaying()) {
+ if (isPlaying()) {
g_system->getMixer()->pauseHandle(_soundHandle, paused);
}
}