mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-20 19:21:46 +00:00
JANITORIAL: Fix some formatting glitches in gob, hugo and toon
This commit is contained in:
parent
e080594a7b
commit
b60a706751
@ -262,7 +262,7 @@ void VideoPlayer::waitSoundEnd(int slot) {
|
||||
|
||||
video->decoder->finishSound();
|
||||
|
||||
while(video->decoder->isSoundPlaying())
|
||||
while (video->decoder->isSoundPlaying())
|
||||
_vm->_util->longDelay(1);
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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] += ' ';
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -41,7 +41,7 @@ Resources::~Resources() {
|
||||
delete temp;
|
||||
}
|
||||
|
||||
while(!_pakFiles.empty()) {
|
||||
while (!_pakFiles.empty()) {
|
||||
PakFile *temp = _pakFiles.back();
|
||||
_pakFiles.pop_back();
|
||||
delete temp;
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user