More whitespace changes.

svn-id: r23496
This commit is contained in:
Torbjörn Andersson 2006-07-14 13:33:58 +00:00
parent fb3a3f75aa
commit 6358547a43
47 changed files with 92 additions and 92 deletions

View File

@ -183,8 +183,8 @@ bool OSystem_SDL::pollEvent(Event &event) {
return true;
}
while(SDL_PollEvent(&ev)) {
switch(ev.type) {
while (SDL_PollEvent(&ev)) {
switch (ev.type) {
case SDL_KEYDOWN:{
b = event.kbd.flags = SDLModToOSystemKeyFlags(SDL_GetModState());

View File

@ -944,8 +944,8 @@ void OSystem_SDL::makeChecksums(const byte *buf) {
/* the 8x8 blocks in buf are enumerated starting in the top left corner and
* reading each line at a time from left to right */
for(y = 0; y != last_y; y++, buf += _screenWidth * (8 - 1))
for(x = 0; x != last_x; x++, buf += 8) {
for (y = 0; y != last_y; y++, buf += _screenWidth * (8 - 1))
for (x = 0; x != last_x; x++, buf += 8) {
// Adler32 checksum algorithm (from RFC1950, used by gzip and zlib).
// This computes the Adler32 checksum of a 8x8 pixel block. Note
// that we can do the modulo operation (which is the slowest part)
@ -990,8 +990,8 @@ void OSystem_SDL::addDirtyRgnAuto(const byte *buf) {
int x, y, w;
uint32 *ck = _dirtyChecksums;
for(y = 0; y != _screenHeight / 8; y++) {
for(x = 0; x != _screenWidth / 8; x++, ck++) {
for (y = 0; y != _screenHeight / 8; y++) {
for (x = 0; x != _screenWidth / 8; x++, ck++) {
if (ck[0] != ck[_cksumNum]) {
/* found a dirty 8x8 block, now go as far to the right as possible,
and at the same time, unmark the dirty status by setting old to new. */

View File

@ -193,7 +193,7 @@ bool Debugger<T>::RunCommand(const char *inputOrig) {
if (!strncmp(_dvars[i].name, param[0], strlen(_dvars[i].name))) {
if (num_params > 1) {
// Alright, we need to check the TYPE of the variable to deref and stuff... the array stuff is a bit ugly :)
switch(_dvars[i].type) {
switch (_dvars[i].type) {
// Integer
case DVAR_BYTE:
*(byte *)_dvars[i].variable = atoi(param[1]);
@ -226,7 +226,7 @@ bool Debugger<T>::RunCommand(const char *inputOrig) {
}
} else {
// And again, type-dependent prints/defrefs. The array one is still ugly.
switch(_dvars[i].type) {
switch (_dvars[i].type) {
// Integer
case DVAR_BYTE:
DebugPrintf("(byte)%s = %d\n", param[0], *(const byte *)_dvars[i].variable);

View File

@ -1458,7 +1458,7 @@ void KyraEngine::gui_fadePalette() {
_screen->_currentPalette[i] /= 2;
}
while( menuPalIndexes[index] != -1) {
while (menuPalIndexes[index] != -1) {
memcpy(&_screen->_currentPalette[menuPalIndexes[index]*3], &_screen->getPalette(2)[menuPalIndexes[index]*3], 3);
index++;
}

View File

@ -883,7 +883,7 @@ int KyraEngine::handleSceneChange(int xpos, int ypos, int unk1, int frameReset)
ypos = _sceneExits.westYPos;
_pathfinderFlag = 7;
}
} else if(xpos >= 308) {
} else if (xpos >= 308) {
if (_roomTable[sceneId].eastExit != 0xFFFF) {
xpos = 307;
ypos = _sceneExits.eastYPos;

View File

@ -759,9 +759,9 @@ void KyraEngine::loadMainScreen(int page) {
_screen->loadBitmap("MAIN15.CPS", page, page, 0);
else if ((_features & GF_ENGLISH) && (_features & GF_TALKIE))
_screen->loadBitmap("MAIN_ENG.CPS", page, page, 0);
else if(_features & GF_FRENCH)
else if (_features & GF_FRENCH)
_screen->loadBitmap("MAIN_FRE.CPS", page, page, 0);
else if(_features & GF_GERMAN)
else if (_features & GF_GERMAN)
_screen->loadBitmap("MAIN_GER.CPS", page, page, 0);
else if (_features & GF_SPANISH)
_screen->loadBitmap("MAIN_SPA.CPS", page, page, 0);

View File

@ -39,7 +39,7 @@ void KyraEngine::waitForChatToFinish(int16 chatDuration, const char *chatStr, ui
uint8 currPage;
OSystem::Event event;
//while( towns_isEscKeyPressed() )
//while (towns_isEscKeyPressed() )
//towns_getKey();
uint32 timeToEnd = strlen(chatStr) * 8 * _tickLength + _system->getMillis();

View File

@ -241,7 +241,7 @@ void Anim::load(uint16 animId, const byte *animResourceData, size_t animResource
char *buf=(char*)anim->resourceData;
FILE*f;
f=fopen(s,"wb");
for(long i=0;i<flen;i++)
for (long i = 0; i < flen; i++)
fputc(buf[i],f);
fclose(f);*/

View File

@ -125,8 +125,8 @@ int Events::handleContinuous(Event *event) {
Surface *backGroundSurface;
BGInfo bgInfo;
Rect rect;
if(event->duration != 0) {
event_pc = ((double)event->duration - event->time) / event->duration;
if (event->duration != 0) {
event_pc = ((double)event->duration - event->time) / event->duration;
} else {
event_pc = 1.0;
}
@ -207,8 +207,8 @@ int Events::handleImmediate(Event *event) {
bool event_done = false;
// Duration might be 0 so dont do division then
if(event->duration != 0) {
event_pc = ((double)event->duration - event->time) / event->duration;
if (event->duration != 0) {
event_pc = ((double)event->duration - event->time) / event->duration;
} else {
// Just make sure that event_pc is 1.0 so event_done is true
event_pc = 1.0;

View File

@ -145,7 +145,7 @@ static int detectGame(const FSList *fslist, Common::Language language, Common::P
tstr = file->_key;
tstr.toLowercase();
if(!filesMD5.contains(tstr)) {
if (!filesMD5.contains(tstr)) {
if (testFile.open(file->_key)) {
testFile.close();

View File

@ -168,7 +168,7 @@ void Surface::transitionDissolve(const byte *sourceBuffer, const Common::Rect &s
}
void Gfx::initPalette() {
if(_vm->getGameType() != GType_IHNM)
if (_vm->getGameType() != GType_IHNM)
return;
ResourceContext *resourceContext = _vm->_resource->getContext(GAME_RESOURCEFILE);
@ -184,7 +184,7 @@ void Gfx::initPalette() {
MemoryReadStream metaS(resourcePointer, resourceLength);
for(int i = 0; i < 256; i++) {
for (int i = 0; i < 256; i++) {
_globalPalette[i].red = metaS.readByte();
_globalPalette[i].green = metaS.readByte();
_globalPalette[i].blue = metaS.readByte();

View File

@ -1905,7 +1905,7 @@ void Interface::drawPanelButtonText(Surface *ds, InterfacePanel *panel, PanelBut
Rect rect;
textId = panelButton->id;
switch(panelButton->id) {
switch (panelButton->id) {
case kTextReadingSpeed:
if (_vm->getFeatures() & GF_CD_FX) {
if (_vm->_subtitlesEnabled)

View File

@ -471,7 +471,7 @@ void Puzzle::solicitHint(void) {
}
void Puzzle::handleReply(int reply) {
switch(reply) {
switch (reply) {
case 0: // Quit the puzzle
exitPuzzle();
break;

View File

@ -377,11 +377,11 @@ void Resource::clearContexts() {
if (_contexts == NULL) {
return;
}
for(i = 0; i < _contextsCount; i++) {
for (i = 0; i < _contextsCount; i++) {
context = &_contexts[i];
delete context->file;
if (context->table != NULL) {
for(j = 0; j < context->count; j++) {
for (j = 0; j < context->count; j++) {
delete context->table[j].patchData;
}
}
@ -398,7 +398,7 @@ uint32 Resource::convertResourceId(uint32 resourceId) {
return resourceId - 2;
} else {
if (resourceId == 1535 || resourceId == 1536) {
error ("Wrong resource number %d for Mac ITE", resourceId);
error("Wrong resource number %d for Mac ITE", resourceId);
}
}
}

View File

@ -1968,7 +1968,7 @@ void ScummEngine_v100he::o100_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
switch(args[1]) {
switch (args[1]) {
case 0:
_sprite->setSpriteFlagXFlipped(spriteId, args[0]);
break;
@ -2434,7 +2434,7 @@ void ScummEngine_v100he::o100_getSpriteGroupInfo() {
type = pop();
spriteGroupId = pop();
if (spriteGroupId) {
switch(type) {
switch (type) {
case 0:
push(_sprite->getGroupXMul(spriteGroupId));
break;
@ -2775,7 +2775,7 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
flags = pop();
spriteId = pop();
if (spriteId) {
switch(flags) {
switch (flags) {
case 0:
push(_sprite->getSpriteFlagXFlipped(spriteId));
break;

View File

@ -999,7 +999,7 @@ void ScummEngine_v60he::o60_openFile() {
}
if (slot != -1) {
switch(mode) {
switch (mode) {
case 1:
// TODO / FIXME: Consider using listSavefiles to avoid unneccessary openForLoading calls
_hInFileTable[slot] = _saveFileMan->openForLoading(filename);

View File

@ -594,7 +594,7 @@ void ScummEngine_v72he::decodeScriptString(byte *dst, bool scriptString) {
chr = string[num++];
if (chr == '%') {
chr = string[num++];
switch(chr) {
switch (chr) {
case 'b':
//dst += sprintf((char *)dst, "%b", args[val++]);
break;
@ -1738,7 +1738,7 @@ void ScummEngine_v72he::o72_openFile() {
}
if (slot != -1) {
switch(mode) {
switch (mode) {
case 1:
// TODO / FIXME: Consider using listSavefiles to avoid unneccessary openForLoading calls
_hInFileTable[slot] = _saveFileMan->openForLoading(filename);

View File

@ -952,7 +952,7 @@ void ScummEngine_v90he::o90_getSpriteInfo() {
flags = pop();
spriteId = pop();
if (spriteId) {
switch(flags) {
switch (flags) {
case 0:
push(_sprite->getSpriteFlagXFlipped(spriteId));
break;
@ -1167,7 +1167,7 @@ void ScummEngine_v90he::o90_setSpriteInfo() {
spriteId++;
for (; spriteId <= _curMaxSpriteId; spriteId++)
switch(args[1]) {
switch (args[1]) {
case 0:
_sprite->setSpriteFlagXFlipped(spriteId, args[0]);
break;
@ -1479,7 +1479,7 @@ void ScummEngine_v90he::o90_getSpriteGroupInfo() {
type = pop();
spriteGroupId = pop();
if (spriteGroupId) {
switch(type) {
switch (type) {
case 0:
push(_sprite->getGroupXMul(spriteGroupId));
break;

View File

@ -369,7 +369,7 @@ void SoundHE::processSoundCode() {
assert(codePtr);
codePtr += _heChannel[chan].codeOffs;
while(1) {
while (1) {
size = READ_LE_UINT16(codePtr);
time = READ_LE_UINT32(codePtr + 2);
@ -414,7 +414,7 @@ void SoundHE::processSoundCode() {
void SoundHE::processSoundOpcodes(int sound, byte *codePtr, int *soundVars) {
int arg, opcode, var, val;
while(READ_LE_UINT16(codePtr) != 0) {
while (READ_LE_UINT16(codePtr) != 0) {
codePtr += 2;
opcode = READ_LE_UINT16(codePtr); codePtr += 2;
opcode = (opcode & 0xFFF) >> 4;

View File

@ -370,7 +370,7 @@ int Sprite::getSpriteGeneralProperty(int spriteId, int type) {
// XXX U32 related check
switch(type) {
switch (type) {
case 0x7B:
return _spriteTable[spriteId].imgFlags;
case 0x7D:
@ -677,7 +677,7 @@ void Sprite::setSpriteFlagAutoAnim(int spriteId, int value) {
void Sprite::setSpriteFlagUpdateType(int spriteId, int value) {
checkRange(_varNumSprites, 1, spriteId, "Invalid sprite %d");
switch(value) {
switch (value) {
case 2:
_spriteTable[spriteId].flags &= ~(kSFMarkDirty);
_spriteTable[spriteId].flags |= kSFBlitDirectly;
@ -740,7 +740,7 @@ void Sprite::setSpriteGeneralProperty(int spriteId, int type, int value) {
// XXX U32 related check
switch(type) {
switch (type) {
case 0x7B:
_spriteTable[spriteId].imgFlags = value;
_spriteTable[spriteId].flags |= kSFChanged | kSFNeedRedraw;

View File

@ -1917,7 +1917,7 @@ void Wiz::processWizImage(const WizParameters *params) {
if (params->processFlags & kWPFUseFile) {
Common::File f;
switch(params->fileWriteMode) {
switch (params->fileWriteMode) {
case 2:
_vm->VAR(119) = -1;
break;

View File

@ -171,7 +171,7 @@ void IMuseDigital::playDigMusic(const char *songName, const imuseDigTable *table
fadeOutMusic(120);
switch(table->opcode) {
switch (table->opcode) {
case 0:
case 5:
case 6:
@ -425,7 +425,7 @@ int IMuseDigital::getSoundIdByName(const char *soundName) {
void IMuseDigital::playFtMusic(const char *songName, int opcode, int volume) {
fadeOutMusic(200);
switch(opcode) {
switch (opcode) {
case 0:
case 4:
break;

View File

@ -60,7 +60,7 @@ void ImuseDigiSndMgr::countElements(byte *ptr, int &numRegions, int &numJumps, i
do {
tag = READ_BE_UINT32(ptr); ptr += 4;
switch(tag) {
switch (tag) {
case MKID_BE('TEXT'):
case MKID_BE('STOP'):
case MKID_BE('FRMT'):
@ -154,7 +154,7 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, soundStruct *sound) {
}
offset += 4;
len >>= 8;
switch(code) {
switch (code) {
case 0:
quit = true;
break;
@ -211,7 +211,7 @@ void ImuseDigiSndMgr::prepareSound(byte *ptr, soundStruct *sound) {
do {
tag = READ_BE_UINT32(ptr); ptr += 4;
switch(tag) {
switch (tag) {
case MKID_BE('FRMT'):
ptr += 12;
sound->bits = READ_BE_UINT32(ptr); ptr += 4;

View File

@ -331,7 +331,7 @@ void ScummEngine::processKbd(bool smushMode) {
if (_voiceMode == 3)
_voiceMode = 0;
switch(_voiceMode) {
switch (_voiceMode) {
case 0:
sprintf(buf, "Speech Only");
ConfMan.setBool("speech_mute", false);

View File

@ -501,7 +501,7 @@ int32 Insane::calcBenDamage(bool arg_0, bool arg_4) {
void Insane::actor02Reaction(int32 buttons) {
int32 tmp, tmp2;
switch(_actor[0].act[2].state) {
switch (_actor[0].act[2].state) {
case 1:
smlayer_setActorLayer(0, 2, 5);
_actor[0].weaponClass = 2;

View File

@ -178,7 +178,7 @@ int32 Insane::enemy0handler(int32 actor1, int32 actor2, int32 probability) {
break;
}
} else {
switch(_vm->_rnd.getRandomNumber(14)) {
switch (_vm->_rnd.getRandomNumber(14)) {
case 2:
if (!_enemyState[EN_ROTT1][2]) {
_enemyState[EN_ROTT1][2] = 1;
@ -342,7 +342,7 @@ int32 Insane::enemy1handler(int32 actor1, int32 actor2, int32 probability) {
break;
}
} else {
switch(_vm->_rnd.getRandomNumber(14)) {
switch (_vm->_rnd.getRandomNumber(14)) {
case 2:
if (!_enemyState[EN_ROTT2][2]) {
_enemyState[EN_ROTT2][2] = 1;
@ -1353,7 +1353,7 @@ void Insane::actor11Reaction(int32 buttons) {
chooseEnemyWeaponAnim(buttons);
switch(_actor[1].tilt) {
switch (_actor[1].tilt) {
case -3:
if (_actor[1].act[1].state != 41 || _actor[1].weaponClass != _actor[1].animWeaponClass) {
setEnemyAnimation(1, 6);
@ -1617,7 +1617,7 @@ void Insane::setEnemyState(void) {
void Insane::actor12Reaction(int32 buttons) {
int32 tmp, tmp2;
switch(_actor[1].act[2].state) {
switch (_actor[1].act[2].state) {
case 1:
smlayer_setActorLayer(1, 2, 5);
_actor[1].weaponClass = 2;

View File

@ -344,7 +344,7 @@ int Insane::loadSceneData(int scene, int flag, int phase) {
break;
case 3:
case 13:
switch(_currEnemy) {
switch (_currEnemy) {
case EN_TORQUE:
smlayer_loadSound(59, flag, phase);
smlayer_loadSound(93, flag, phase);

View File

@ -824,7 +824,7 @@ Common::String ScummEngine::generateFilename(const int room) const {
if (_heV7DiskOffsets)
disk = _heV7DiskOffsets[room];
switch(disk) {
switch (disk) {
case 2:
id = 'b';
snprintf(buf, sizeof(buf), "%s.(b)", _filenamePattern.pattern);

View File

@ -65,7 +65,7 @@ uint32 BaseChunk::getSize() const {
}
bool BaseChunk::seek(int32 delta, seek_type dir) {
switch(dir) {
switch (dir) {
case seek_cur:
_curPos += delta;
break;

View File

@ -519,7 +519,7 @@ void Codec37Decoder::decode(byte *dst, const byte *src) {
maketable(pitch, src[1]);
int32 tmp;
switch(src[0]) {
switch (src[0]) {
case 0:
if ((_deltaBufs[_curtable] - _deltaBuf) > 0) {
memset(_deltaBuf, 0, _deltaBufs[_curtable] - _deltaBuf);

View File

@ -573,7 +573,7 @@ bool Codec47Decoder::decode(byte *dst, const byte *src) {
gfx_data += 32896;
}
switch(src[2]) {
switch (src[2]) {
case 0:
memcpy(_curBuf, gfx_data, _frameSize);
break;

View File

@ -140,7 +140,7 @@ bool ImuseChannel::handleStop(Chunk &src) {
bool ImuseChannel::handleMap(Chunk &map) {
while (!map.eof()) {
Chunk *sub = map.subBlock();
switch(sub->getType()) {
switch (sub->getType()) {
case TYPE_FRMT:
handleFormat(*sub);
break;
@ -213,7 +213,7 @@ bool ImuseChannel::handleSubTags(int32 &offset) {
Chunk::type type = READ_BE_UINT32(_tbuffer + offset);
uint32 size = READ_BE_UINT32(_tbuffer + offset + 4);
uint32 available_size = _tbufferSize - offset;
switch(type) {
switch (type) {
case TYPE_MAP_:
_inData = false;
if (available_size >= (size + 8)) {

View File

@ -52,7 +52,7 @@ bool SaudChannel::handleSubTags(int32 &offset) {
uint32 size = READ_BE_UINT32(_tbuffer + offset + 4);
uint32 available_size = _tbufferSize - offset;
switch(type) {
switch (type) {
case TYPE_STRK:
_inData = false;
if (available_size >= (size + 8)) {

View File

@ -227,7 +227,7 @@ void SmushPlayer::timerCallback(void *refCon) {
((SmushPlayer *)refCon)->_inTimerCount++;
#endif
#ifdef __SYMBIAN32__
if(((SmushPlayer *)refCon)->_closeOnTextTick) {
if (((SmushPlayer *)refCon)->_closeOnTextTick) {
delete ((SmushPlayer *)refCon)->_base;
((SmushPlayer *)refCon)->_base = NULL;
((SmushPlayer *)refCon)->_closeOnTextTick = false;
@ -313,7 +313,7 @@ void SmushPlayer::release() {
#ifdef __SYMBIAN32__
_closeOnTextTick = true;
// Wait for _closeOnTextTick to be set to false to indicate file closure
while(_closeOnTextTick) {
while (_closeOnTextTick) {
User::After(15624);
}
#endif

View File

@ -1546,7 +1546,7 @@ void SimonEngine::video_putchar_drawchar(WindowBlock *window, uint x, uint y, by
h = 8;
w = 6;
switch(_language) {
switch (_language) {
case Common::RU_RUS:
src = russian_video_font + (chr - 0x20) * 8;
break;

View File

@ -176,7 +176,7 @@ void SimonEngine::animateSpritesByY() {
vsp++;
}
while(1) {
while (1) {
y = spriteTable[0][0];
slot = spriteTable[0][1];

View File

@ -92,7 +92,7 @@ void SimonEngine::oracleTextUp() {
if (_textWindow->scrollY > _oracleMaxScrollY) // For scroll up
_oracleMaxScrollY = _textWindow->scrollY;
while(1) {
while (1) {
if (_textWindow->scrollY == _oracleMaxScrollY)
break;
_textWindow->textRow = 105;
@ -126,7 +126,7 @@ void SimonEngine::oracleTextDown() {
if (_textWindow->scrollY > _oracleMaxScrollY) // For scroll up
_oracleMaxScrollY = _textWindow->scrollY;
while(1) {
while (1) {
if (_textWindow->scrollY == 0)
break;
@ -293,8 +293,8 @@ void SimonEngine::listSaveGames(int n) {
z++;
}
while(1) {
OK=1;
while (1) {
OK = 1;
if (getBitFlag(93) || getBitFlag(94)) {
OK = 0;
if (j > z)

View File

@ -641,7 +641,7 @@ void SimonEngine::inventoryUp(WindowBlock *window) {
_marks = 0;
checkUp(window);
loadSprite(4, 9, 21, 0 ,0, 0);
while(1) {
while (1) {
if (_currentBoxNumber != 0x7FFB || !getBitFlag(89))
break;
checkUp(window);
@ -668,7 +668,7 @@ void SimonEngine::inventoryDown(WindowBlock *window) {
_marks = 0;
checkDown(window);
loadSprite(4, 9, 23, 0, 0, 0);
while(1) {
while (1) {
if (_currentBoxNumber != 0x7FFC || !getBitFlag(89))
break;
checkDown(window);

View File

@ -529,7 +529,7 @@ uint16 Control::handleClick(ConResource *pButton) {
char quitDos[] = "Quit to DOS?";
char restart[] = "Restart?";
switch(pButton->_onClick) {
switch (pButton->_onClick) {
case DO_NOTHING:
return 0;
case REST_GAME_PANEL:

View File

@ -825,7 +825,7 @@ bool Intro::commandFlirt(uint16 *&data) {
while ((_skyScreen->seqFramesLeft() < *data)) {
data++;
uint16 command = *data++;
switch(command) {
switch (command) {
case IC_PREPARE_TEXT:
_skyText->displayText(*data++, _textBuf, true, INTRO_TEXT_WIDTH, 255);
break;

View File

@ -59,7 +59,7 @@ struct Chunk {
if (size % 2) {
size++;
}
while(!_input->eos() && !eos()) {
while (!_input->eos() && !eos()) {
readByte();
}
}
@ -244,7 +244,7 @@ void decodeILBM(Common::ReadStream &input, Surface &surface, byte *&colors) {
formChunk.incBytesRead(8);
chunk.readHeader();
switch(chunk.id) {
switch (chunk.id) {
case ID_BMHD:
bitmapHeader.width = chunk.readUint16();
bitmapHeader.height = chunk.readUint16();

View File

@ -78,7 +78,7 @@ KeysDialog::KeysDialog(const Common::String &title)
}
void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
switch(cmd) {
switch (cmd) {
case kListSelectionChangedCmd:
if (_actionsList->getSelected() >= 0) {
@ -86,14 +86,14 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
#ifdef __SYMBIAN32__
uint16 key = Actions::Instance()->getMapping(_actionsList->getSelected());
if(key != 0) {
if (key != 0) {
// ScummVM mappings for F1-F9 are different from SDL so remap back to sdl
if(key >= 315 && key <= 323) {
if (key >= 315 && key <= 323) {
key = key - 315 + SDLK_F1;
}
}
if(key != 0)
if (key != 0)
sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey)key));
else
sprintf(selection, "Associated key : none");
@ -114,9 +114,9 @@ void KeysDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 data) {
_actionSelected = _actionsList->getSelected();
#ifdef __SYMBIAN32__
uint16 key = Actions::Instance()->getMapping(_actionSelected);
if(key != 0) {
if (key != 0) {
// ScummVM mappings for F1-F9 are different from SDL so remap back to sdl
if(key >= 315 && key <= 323) {
if (key >= 315 && key <= 323) {
key = key - 315 + SDLK_F1;
}
@ -163,7 +163,7 @@ void KeysDialog::handleKeyUp(uint16 ascii, int keycode, int modifiers) {
Actions::Instance()->setMapping((ActionType)_actionSelected, ascii);
#ifdef __SYMBIAN32__
if(ascii != 0)
if (ascii != 0)
sprintf(selection, "Associated key : %s", SDL_GetKeyName((SDLKey) keycode));
else
sprintf(selection, "Associated key : none");

View File

@ -192,10 +192,10 @@ void Eval::getToken() {
if (_input[_pos] == '"') {
_pos++;
while(_input[_pos] != '"' && _input[_pos] != '\n')
while (_input[_pos] != '"' && _input[_pos] != '\n')
*temp++ = _input[_pos++];
if(_input[_pos] == '\n')
if (_input[_pos] == '\n')
exprError(eMissingQuote);
_pos++;

View File

@ -373,7 +373,7 @@ void EditGameDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 dat
case kCmdGlobalAudioOverride:
setAudioSettingsState(data != 0);
setSubtitleSettingsState(data != 0);
if(_globalVolumeOverride == NULL)
if (_globalVolumeOverride == NULL)
setVolumeSettingsState(data != 0);
draw();
break;

View File

@ -68,17 +68,17 @@ void GuiObject::handleScreenChanged() {
_w = g_gui.evaluator()->getVar(_name + ".w");
_h = g_gui.evaluator()->getVar(_name + ".h");
if(_x < 0)
if (_x < 0)
error("Widget <%s> has x < 0", _name.c_str());
if(_x >= g_system->getOverlayWidth())
if (_x >= g_system->getOverlayWidth())
error("Widget <%s> has x > %d", _name.c_str(), g_system->getOverlayWidth());
if(_x + _w > g_system->getOverlayWidth())
if (_x + _w > g_system->getOverlayWidth())
error("Widget <%s> has x + w > %d (%d)", _name.c_str(), g_system->getOverlayWidth(), _x + _w);
if(_y < 0)
if (_y < 0)
error("Widget <%s> has y < 0", _name.c_str());
if(_y >= g_system->getOverlayWidth())
if (_y >= g_system->getOverlayWidth())
error("Widget <%s> has y > %d", _name.c_str(), g_system->getOverlayHeight());
if(_y + _h > g_system->getOverlayWidth())
if (_y + _h > g_system->getOverlayWidth())
error("Widget <%s> has y + h > %d (%d)", _name.c_str(), g_system->getOverlayHeight(), _y + _h);
}
}

View File

@ -208,7 +208,7 @@ int MidiDriver::detectMusicDriver(int flags) {
}
MidiDriver *MidiDriver::createMidi(int midiDriver) {
switch(midiDriver) {
switch (midiDriver) {
case MD_NULL: return MidiDriver_NULL_create();
case MD_ADLIB: return MidiDriver_ADLIB_create(g_engine->_mixer);

View File

@ -90,7 +90,7 @@ byte *loadVOCFromStream(Common::ReadStream &stream, int &size, int &rate, int &l
len |= stream.readByte() << 8;
len |= stream.readByte() << 16;
switch(code) {
switch (code) {
case 1: {
int time_constant = stream.readByte();
int packing = stream.readByte();