aboutsummaryrefslogtreecommitdiff
path: root/engines/gob
diff options
context:
space:
mode:
authorPaul Gilbert2018-08-17 20:30:20 -0700
committerPaul Gilbert2018-08-17 20:30:20 -0700
commit11e33ba3fc1b65789358485fa50cdbc0cf26aac7 (patch)
treeebb245cf6617e1ac0b35bf3681307bcbc541b230 /engines/gob
parentc8d3af3874d7c814a9f1f03ad740c3e9f8386eaa (diff)
downloadscummvm-rg350-11e33ba3fc1b65789358485fa50cdbc0cf26aac7.tar.gz
scummvm-rg350-11e33ba3fc1b65789358485fa50cdbc0cf26aac7.tar.bz2
scummvm-rg350-11e33ba3fc1b65789358485fa50cdbc0cf26aac7.zip
JANITORIAL: Removing trailing spaces after int casts
Diffstat (limited to 'engines/gob')
-rw-r--r--engines/gob/detection/detection.cpp2
-rw-r--r--engines/gob/game.cpp2
-rw-r--r--engines/gob/goblin.cpp12
-rw-r--r--engines/gob/inter_v2.cpp16
-rw-r--r--engines/gob/sound/soundmixer.cpp4
-rw-r--r--engines/gob/surface.cpp2
-rw-r--r--engines/gob/util.cpp2
7 files changed, 20 insertions, 20 deletions
diff --git a/engines/gob/detection/detection.cpp b/engines/gob/detection/detection.cpp
index 864a701aa6..70fea401f2 100644
--- a/engines/gob/detection/detection.cpp
+++ b/engines/gob/detection/detection.cpp
@@ -151,7 +151,7 @@ const Gob::GOBGameDescription *GobMetaEngine::detectOnceUponATime(const Common::
if ((gameType == Gob::kOnceUponATimeInvalid) || (platform == Gob::kOnceUponATimePlatformInvalid)) {
warning("GobMetaEngine::detectOnceUponATime(): Detection failed (%d, %d)",
- (int) gameType, (int) platform);
+ (int)gameType, (int)platform);
return 0;
}
diff --git a/engines/gob/game.cpp b/engines/gob/game.cpp
index d8e39e6c38..86fb207379 100644
--- a/engines/gob/game.cpp
+++ b/engines/gob/game.cpp
@@ -796,7 +796,7 @@ int16 Game::checkKeys(int16 *pMouseX, int16 *pMouseY,
if (_vm->_mult->_multData && _vm->_inter->_variables &&
(VAR(58) != 0)) {
- if (_vm->_mult->_multData->frameStart != (int) VAR(58) - 1)
+ if (_vm->_mult->_multData->frameStart != (int)VAR(58) - 1)
_vm->_mult->_multData->frameStart++;
else
_vm->_mult->_multData->frameStart = 0;
diff --git a/engines/gob/goblin.cpp b/engines/gob/goblin.cpp
index 5f697d21fb..058e73b514 100644
--- a/engines/gob/goblin.cpp
+++ b/engines/gob/goblin.cpp
@@ -724,8 +724,8 @@ void Goblin::adjustDest(int16 posX, int16 posY) {
}
}
- _pressedMapX = CLIP((int) _pressedMapX, 0, _vm->_map->getMapWidth() - 1);
- _pressedMapY = CLIP((int) _pressedMapY, 0, _vm->_map->getMapHeight() - 1);
+ _pressedMapX = CLIP((int)_pressedMapX, 0, _vm->_map->getMapWidth() - 1);
+ _pressedMapY = CLIP((int)_pressedMapY, 0, _vm->_map->getMapHeight() - 1);
}
void Goblin::adjustTarget() {
@@ -745,8 +745,8 @@ void Goblin::adjustTarget() {
_pressedMapX++;
}
}
- _pressedMapX = CLIP((int) _pressedMapX, 0, _vm->_map->getMapWidth() - 1);
- _pressedMapY = CLIP((int) _pressedMapY, 0, _vm->_map->getMapHeight() - 1);
+ _pressedMapX = CLIP((int)_pressedMapX, 0, _vm->_map->getMapWidth() - 1);
+ _pressedMapY = CLIP((int)_pressedMapY, 0, _vm->_map->getMapHeight() - 1);
}
void Goblin::targetDummyItem(Gob_Object *gobDesc) {
@@ -896,8 +896,8 @@ void Goblin::targetItem() {
}
}
}
- _pressedMapX = CLIP((int) _pressedMapX, 0, _vm->_map->getMapWidth() - 1);
- _pressedMapY = CLIP((int) _pressedMapY, 0, _vm->_map->getMapHeight() - 1);
+ _pressedMapX = CLIP((int)_pressedMapX, 0, _vm->_map->getMapWidth() - 1);
+ _pressedMapY = CLIP((int)_pressedMapY, 0, _vm->_map->getMapHeight() - 1);
}
void Goblin::moveFindItem(int16 posX, int16 posY) {
diff --git a/engines/gob/inter_v2.cpp b/engines/gob/inter_v2.cpp
index 1e8eddeef0..d61b1c94d1 100644
--- a/engines/gob/inter_v2.cpp
+++ b/engines/gob/inter_v2.cpp
@@ -872,13 +872,13 @@ void Inter_v2::o2_scroll() {
int16 curX;
int16 curY;
- startX = CLIP((int) _vm->_game->_script->readValExpr(), 0,
+ startX = CLIP((int)_vm->_game->_script->readValExpr(), 0,
_vm->_video->_surfWidth - _vm->_width);
- startY = CLIP((int) _vm->_game->_script->readValExpr(), 0,
+ startY = CLIP((int)_vm->_game->_script->readValExpr(), 0,
_vm->_video->_surfHeight - _vm->_height);
- endX = CLIP((int) _vm->_game->_script->readValExpr(), 0,
+ endX = CLIP((int)_vm->_game->_script->readValExpr(), 0,
_vm->_video->_surfWidth - _vm->_width);
- endY = CLIP((int) _vm->_game->_script->readValExpr(), 0,
+ endY = CLIP((int)_vm->_game->_script->readValExpr(), 0,
_vm->_video->_surfHeight - _vm->_height);
stepX = _vm->_game->_script->readValExpr();
stepY = _vm->_game->_script->readValExpr();
@@ -886,10 +886,10 @@ void Inter_v2::o2_scroll() {
curX = startX;
curY = startY;
while (!_vm->shouldQuit() && ((curX != endX) || (curY != endY))) {
- curX = stepX > 0 ? MIN(curX + stepX, (int) endX) :
- MAX(curX + stepX, (int) endX);
- curY = stepY > 0 ? MIN(curY + stepY, (int) endY) :
- MAX(curY + stepY, (int) endY);
+ curX = stepX > 0 ? MIN(curX + stepX, (int)endX) :
+ MAX(curX + stepX, (int)endX);
+ curY = stepY > 0 ? MIN(curY + stepY, (int)endY) :
+ MAX(curY + stepY, (int)endY);
_vm->_draw->_scrollOffsetX = curX;
_vm->_draw->_scrollOffsetY = curY;
diff --git a/engines/gob/sound/soundmixer.cpp b/engines/gob/sound/soundmixer.cpp
index b5c26898ba..ef073e564b 100644
--- a/engines/gob/sound/soundmixer.cpp
+++ b/engines/gob/sound/soundmixer.cpp
@@ -86,7 +86,7 @@ void SoundMixer::stop(int16 fadeLength) {
_fade = true;
_fadeVol = 65536;
- _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0));
+ _fadeSamples = (int)(fadeLength * (((double) _rate) / 10.0));
_fadeVolStep = MAX((int32) 1, (int32) (65536 / _fadeSamples));
_curFadeSamples = 0;
}
@@ -133,7 +133,7 @@ void SoundMixer::setSample(SoundDesc &sndDesc, int16 repCount, int16 frequency,
} else {
_fade = true;
_fadeVol = 0;
- _fadeSamples = (int) (fadeLength * (((double) _rate) / 10.0));
+ _fadeSamples = (int)(fadeLength * (((double) _rate) / 10.0));
_fadeVolStep = - MAX((int32) 1, (int32) (65536 / _fadeSamples));
}
}
diff --git a/engines/gob/surface.cpp b/engines/gob/surface.cpp
index ed83e8255c..a2c5614962 100644
--- a/engines/gob/surface.cpp
+++ b/engines/gob/surface.cpp
@@ -766,7 +766,7 @@ bool Surface::loadImage(Common::SeekableReadStream &stream, ImageType type) {
return loadJPEG(stream);
default:
- warning("Surface::loadImage(): Unknown image type: %d", (int) type);
+ warning("Surface::loadImage(): Unknown image type: %d", (int)type);
return false;
}
diff --git a/engines/gob/util.cpp b/engines/gob/util.cpp
index 6bb4274421..8ca8e03b9b 100644
--- a/engines/gob/util.cpp
+++ b/engines/gob/util.cpp
@@ -496,7 +496,7 @@ void Util::setScrollOffset(int16 x, int16 y) {
void Util::insertStr(const char *str1, char *str2, int16 pos) {
int len1 = strlen(str1);
int len2 = strlen(str2);
- int from = MIN((int) pos, len2);
+ int from = MIN((int)pos, len2);
for (int i = len2; i >= from; i--)
str2[len1 + i] = str2[i];