aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/videoplayer.cpp2
-rw-r--r--engines/hugo/object.cpp2
-rw-r--r--engines/hugo/schedule.cpp6
-rw-r--r--engines/toon/anim.cpp4
-rw-r--r--engines/toon/audio.cpp6
-rw-r--r--engines/toon/picture.cpp2
-rw-r--r--engines/toon/resource.cpp2
-rw-r--r--engines/toon/script_func.cpp4
-rw-r--r--engines/toon/tools.cpp2
-rw-r--r--engines/toon/toon.cpp12
10 files changed, 21 insertions, 21 deletions
diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 651c9a3154..c03218460c 100644
--- a/engines/gob/videoplayer.cpp
+++ b/engines/gob/videoplayer.cpp
@@ -262,7 +262,7 @@ void VideoPlayer::waitSoundEnd(int slot) {
video->decoder->finishSound();
- while(video->decoder->isSoundPlaying())
+ while (video->decoder->isSoundPlaying())
_vm->_util->longDelay(1);
}
diff --git a/engines/hugo/object.cpp b/engines/hugo/object.cpp
index e5c7b4bf90..bc99abf410 100644
--- a/engines/hugo/object.cpp
+++ b/engines/hugo/object.cpp
@@ -283,7 +283,7 @@ void ObjectHandler::freeObjects() {
free(_uses);
}
- for(int16 i = 0; i < _objCount; i++) {
+ for (int16 i = 0; i < _objCount; i++) {
free(_objects[i].stateDataIndex);
_objects[i].stateDataIndex = 0;
}
diff --git a/engines/hugo/schedule.cpp b/engines/hugo/schedule.cpp
index dc20ca117d..384b3ace8f 100644
--- a/engines/hugo/schedule.cpp
+++ b/engines/hugo/schedule.cpp
@@ -297,7 +297,7 @@ void Scheduler::readAct(Common::ReadStream &in, act &curAct) {
curAct.a3.timer = in.readSint16BE();
curAct.a3.promptIndex = in.readSint16BE();
numSubAct = in.readUint16BE();
- curAct.a3.responsePtr = (int *) malloc(sizeof(int) * numSubAct);
+ curAct.a3.responsePtr = (int *)malloc(sizeof(int) * numSubAct);
for (int k = 0; k < numSubAct; k++)
curAct.a3.responsePtr[k] = in.readSint16BE();
curAct.a3.actPassIndex = in.readUint16BE();
@@ -566,7 +566,7 @@ void Scheduler::loadActListArr(Common::ReadStream &in) {
for (int i = 0; i < numElem; i++) {
numSubElem = in.readUint16BE();
if (varnt == _vm->_gameVariant)
- _actListArr[i] = (act *) malloc(sizeof(act) * (numSubElem + 1));
+ _actListArr[i] = (act *)malloc(sizeof(act) * (numSubElem + 1));
for (int j = 0; j < numSubElem; j++) {
if (varnt == _vm->_gameVariant) {
readAct(in, _actListArr[i][j]);
@@ -1557,7 +1557,7 @@ void Scheduler_v1d::decodeString(char *line) {
debugC(1, kDebugSchedule, "decodeString(%s)", line);
uint16 linelength = strlen(line);
- for(uint16 i = 0; i < linelength; i++) {
+ for (uint16 i = 0; i < linelength; i++) {
line[i] = (line[i] + _cypher.c_str()[i % _cypher.size()]) % '~';
if (line[i] < ' ')
line[i] += ' ';
diff --git a/engines/toon/anim.cpp b/engines/toon/anim.cpp
index 07d51ef1b9..a529001af5 100644
--- a/engines/toon/anim.cpp
+++ b/engines/toon/anim.cpp
@@ -693,7 +693,7 @@ AnimationManager::AnimationManager(ToonEngine *vm) : _vm(vm) {
bool AnimationManager::hasInstance(AnimationInstance* instance) {
for (uint32 i = 0; i < _instances.size(); i++) {
- if(_instances[i] == instance)
+ if (_instances[i] == instance)
return true;
}
return false;
@@ -709,7 +709,7 @@ void AnimationManager::addInstance(AnimationInstance *instance) {
// if the instance already exists, we skip the add
for (uint32 i = 0; i < _instances.size(); i++) {
- if(_instances[i] == instance)
+ if (_instances[i] == instance)
return;
}
diff --git a/engines/toon/audio.cpp b/engines/toon/audio.cpp
index 4a4a84e62c..5b2d06b74d 100644
--- a/engines/toon/audio.cpp
+++ b/engines/toon/audio.cpp
@@ -65,7 +65,7 @@ void AudioManager::muteMusic(bool muted) {
}
void AudioManager::muteVoice(bool muted) {
- if(voiceStillPlaying() && _channels[2]) {
+ if (voiceStillPlaying() && _channels[2]) {
_channels[2]->setVolume(muted ? 0 : 255);
}
_voiceMuted = muted;
@@ -272,7 +272,7 @@ AudioStreamInstance::~AudioStreamInstance() {
int AudioStreamInstance::readBuffer(int16 *buffer, const int numSamples) {
debugC(5, kDebugAudio, "readBuffer(buffer, %d)", numSamples);
- if(_stopped)
+ if (_stopped)
return 0;
handleFade(numSamples);
@@ -598,7 +598,7 @@ void AudioManager::updateAmbientSFX()
for (int32 i = 0; i < 4; i++) {
AudioAmbientSFX* ambient = &_ambientSFXs[i];
if (ambient->_enabled && (ambient->_channel < 0 || !(_channels[ambient->_channel] && _channels[ambient->_channel]->isPlaying()))) {
- if(ambient->_mode == 1) {
+ if (ambient->_mode == 1) {
if (_vm->randRange(0, 32767) < ambient->_delay) {
ambient->_channel = playSFX(ambient->_id, ambient->_volume, false);
}
diff --git a/engines/toon/picture.cpp b/engines/toon/picture.cpp
index 295e304765..6367165d6f 100644
--- a/engines/toon/picture.cpp
+++ b/engines/toon/picture.cpp
@@ -323,7 +323,7 @@ void Picture::drawLineOnMask(int32 x, int32 y, int32 x2, int32 y2, bool walkable
int32 rx = bx >> 16;
int32 ry = by >> 16;
- if( rx >= 0 && rx < _width-1 && ry >= 0 && ry < _height) { // sanity check: some lines in the game
+ if ( rx >= 0 && rx < _width-1 && ry >= 0 && ry < _height) { // sanity check: some lines in the game
// were drawing outside the screen causing corruption
if (!walkable) {
_data[_width * ry + rx] &= 0xe0;
diff --git a/engines/toon/resource.cpp b/engines/toon/resource.cpp
index cef916c7de..384a363d7d 100644
--- a/engines/toon/resource.cpp
+++ b/engines/toon/resource.cpp
@@ -41,7 +41,7 @@ Resources::~Resources() {
delete temp;
}
- while(!_pakFiles.empty()) {
+ while (!_pakFiles.empty()) {
PakFile *temp = _pakFiles.back();
_pakFiles.pop_back();
delete temp;
diff --git a/engines/toon/script_func.cpp b/engines/toon/script_func.cpp
index 005a299502..b6a374ab5c 100644
--- a/engines/toon/script_func.cpp
+++ b/engines/toon/script_func.cpp
@@ -223,7 +223,7 @@ ScriptFunc::ScriptFunc(ToonEngine *vm) {
}
ScriptFunc::~ScriptFunc(void) {
- while(!_opcodes.empty()) {
+ while (!_opcodes.empty()) {
const OpcodeV2 *temp = _opcodes.back();
_opcodes.pop_back();
delete temp;
@@ -990,7 +990,7 @@ int32 ScriptFunc::sys_Cmd_Set_Scene_Animation_Active_Flag(EMCState *state) {
if (sceneAnim->_active) {
sceneAnim->_animInstance->setVisible(activeFlag > 0);
- if(activeFlag) {
+ if (activeFlag) {
_vm->getAnimationManager()->addInstance(sceneAnim->_animInstance);
}
}
diff --git a/engines/toon/tools.cpp b/engines/toon/tools.cpp
index c2ee8acf8a..added39940 100644
--- a/engines/toon/tools.cpp
+++ b/engines/toon/tools.cpp
@@ -383,7 +383,7 @@ int32 RncDecoder::unpackM1(const void *input, uint16 inputSize, void *output) {
uint16 b;
if (_inputByteLeft <= 2)
b = 0;
- else if(_inputByteLeft == 3)
+ else if (_inputByteLeft == 3)
b = *(_srcPtr + 2);
else
b = READ_LE_UINT16(_srcPtr + 2);
diff --git a/engines/toon/toon.cpp b/engines/toon/toon.cpp
index cff6c24469..4631e5f0d0 100644
--- a/engines/toon/toon.cpp
+++ b/engines/toon/toon.cpp
@@ -191,11 +191,11 @@ void ToonEngine::parseInput() {
_audioManager->stopCurrentVoice();
}
if (event.kbd.keycode == Common::KEYCODE_F5 && !hasModifier) {
- if(canSaveGameStateCurrently())
+ if (canSaveGameStateCurrently())
saveGame(-1, Common::String());
}
if (event.kbd.keycode == Common::KEYCODE_F6 && !hasModifier) {
- if(canLoadGameStateCurrently())
+ if (canLoadGameStateCurrently())
loadGame(-1);
}
if (event.kbd.ascii == 't' && !hasModifier) {
@@ -509,7 +509,7 @@ void ToonEngine::copyToVirtualScreen(bool updateScreen) {
Common::Rect rect = _oldDirtyRects[i];
rect.translate(-state()->_currentScrollValue, 0);
offX = 0;
- if(rect.right <= 0)
+ if (rect.right <= 0)
continue;
if (rect.left < 0) {
offX = -rect.left;
@@ -663,7 +663,7 @@ bool ToonEngine::showMainmenu(bool &loadedGame) {
while (!clickRelease) {
- if(_dirtyAll) {
+ if (_dirtyAll) {
mainmenuPicture->draw(*_mainSurface, 0, 0, 0, 0);
addDirtyRect(0, 0, TOON_SCREEN_WIDTH, TOON_SCREEN_HEIGHT);
} else {
@@ -936,7 +936,7 @@ ToonEngine::~ToonEngine() {
delete _animationManager;
delete _moviePlayer;
- if(_mainSurface) {
+ if (_mainSurface) {
_mainSurface->free();
delete _mainSurface;
}
@@ -4677,7 +4677,7 @@ void ToonEngine::makeLineWalkable(int32 x, int32 y, int32 x2, int32 y2) {
}
void ToonEngine::playRoomMusic() {
- if(_gameState->_inConversation) {
+ if (_gameState->_inConversation) {
const char* music = getSpecialConversationMusic(_gameState->_currentConversationId);
if (music) {
_audioManager->playMusic(_gameState->_locations[_gameState->_currentScene]._name, music);