[Scummvm-cvs-logs] scummvm master -> b60a706751348433457d1e5f3f39f07c20afa483

Strangerke Strangerke at scummvm.org
Thu Sep 8 08:01:26 CEST 2011


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b60a706751 JANITORIAL: Fix some formatting glitches in gob, hugo and toon


Commit: b60a706751348433457d1e5f3f39f07c20afa483
    https://github.com/scummvm/scummvm/commit/b60a706751348433457d1e5f3f39f07c20afa483
Author: Strangerke (strangerke at scummvm.org)
Date: 2011-09-07T22:55:40-07:00

Commit Message:
JANITORIAL: Fix some formatting glitches in gob, hugo and toon

Changed paths:
    engines/gob/videoplayer.cpp
    engines/hugo/object.cpp
    engines/hugo/schedule.cpp
    engines/toon/anim.cpp
    engines/toon/audio.cpp
    engines/toon/picture.cpp
    engines/toon/resource.cpp
    engines/toon/script_func.cpp
    engines/toon/tools.cpp
    engines/toon/toon.cpp



diff --git a/engines/gob/videoplayer.cpp b/engines/gob/videoplayer.cpp
index 651c9a3..c032184 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 e5c7b4b..bc99abf 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 dc20ca1..384b3ac 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 07d51ef..a529001 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 4a4a84e..5b2d06b 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 295e304..6367165 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 cef916c..384a363 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 005a299..b6a374a 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 c2ee8ac..added39 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 cff6c24..4631e5f 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);






More information about the Scummvm-git-logs mailing list