diff options
author | Torbjörn Andersson | 2005-09-08 14:08:04 +0000 |
---|---|---|
committer | Torbjörn Andersson | 2005-09-08 14:08:04 +0000 |
commit | b6a5b0acaf353992a5949e4b1abf98fe43ce768a (patch) | |
tree | 5f885c1f70ba53b2997c3854c96ac6cf6e766a02 | |
parent | 71a1bb190a1c52e2d37a380d79fec74065056654 (diff) | |
download | scummvm-rg350-b6a5b0acaf353992a5949e4b1abf98fe43ce768a.tar.gz scummvm-rg350-b6a5b0acaf353992a5949e4b1abf98fe43ce768a.tar.bz2 scummvm-rg350-b6a5b0acaf353992a5949e4b1abf98fe43ce768a.zip |
Whitespace changes
svn-id: r18788
-rw-r--r-- | sky/control.cpp | 39 | ||||
-rw-r--r-- | sky/disk.cpp | 6 | ||||
-rw-r--r-- | sky/logic.cpp | 4 | ||||
-rw-r--r-- | sky/screen.cpp | 22 | ||||
-rw-r--r-- | sky/sound.cpp | 2 | ||||
-rw-r--r-- | sky/text.cpp | 4 |
6 files changed, 45 insertions, 32 deletions
diff --git a/sky/control.cpp b/sky/control.cpp index cc2306aeba..6735bcd2d3 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -68,7 +68,8 @@ void ConResource::drawToScreen(bool doMask) { uint8 *screenPos = _y * GAME_SCREEN_WIDTH + _x + _screen; uint8 *updatePos = screenPos; - if (!_spriteData) return; + if (!_spriteData) + return; uint8 *spriteData = ((uint8 *)_spriteData) + sizeof(dataFileHeader); spriteData += _spriteData->s_sp_size * _curSprite; if (doMask) { @@ -114,7 +115,8 @@ void TextResource::drawToScreen(bool doMask) { doMask = true; uint16 cnty, cntx, cpWidth, cpHeight; - if ((_oldX == _x) && (_oldY == _y) && (_spriteData)) return; + if ((_oldX == _x) && (_oldY == _y) && (_spriteData)) + return; if (_oldX < GAME_SCREEN_WIDTH) { cpWidth = (PAN_LINE_WIDTH > (GAME_SCREEN_WIDTH - _oldX))?(GAME_SCREEN_WIDTH - _oldX):(PAN_LINE_WIDTH); if (_spriteData && (cpWidth > _spriteData->s_width)) @@ -327,7 +329,7 @@ void Control::buttonControl(ConResource *pButton) { _textSprite = NULL; _curButtonText = 0; _text->setSprite(NULL); - return ; + return; } if (_curButtonText != pButton->_text) { if (_textSprite) free(_textSprite); @@ -446,7 +448,7 @@ void Control::doLoadSavePanel(void) { void Control::doControlPanel(void) { if (SkyEngine::isDemo()) { - return ; + return; } initPanel(); @@ -756,14 +758,16 @@ void Control::toggleMusic(void) { uint16 Control::shiftDown(uint8 speed) { if (speed == SLOW) { - if (_firstText >= MAX_SAVE_GAMES - MAX_ON_SCREEN) return 0; + if (_firstText >= MAX_SAVE_GAMES - MAX_ON_SCREEN) + return 0; _firstText++; } else { if (_firstText <= MAX_SAVE_GAMES - 2 * MAX_ON_SCREEN) _firstText += MAX_ON_SCREEN; else if (_firstText < MAX_SAVE_GAMES - MAX_ON_SCREEN) _firstText = MAX_SAVE_GAMES - MAX_ON_SCREEN; - else return 0; + else + return 0; } return SHIFTED; } @@ -771,12 +775,17 @@ uint16 Control::shiftDown(uint8 speed) { uint16 Control::shiftUp(uint8 speed) { if (speed == SLOW) { - if (_firstText > 0) _firstText--; - else return 0; + if (_firstText > 0) + _firstText--; + else + return 0; } else { - if (_firstText >= MAX_ON_SCREEN) _firstText -= MAX_ON_SCREEN; - else if (_firstText > 0) _firstText = 0; - else return 0; + if (_firstText >= MAX_ON_SCREEN) + _firstText -= MAX_ON_SCREEN; + else if (_firstText > 0) + _firstText = 0; + else + return 0; } return SHIFTED; } @@ -931,7 +940,8 @@ uint16 Control::saveRestorePanel(bool allowSave) { bool Control::checkKeyList(uint8 key) { static const uint8 charList[14] = " ,().='-&+!?\""; for (uint chCnt = 0; chCnt < ARRAYSIZE(charList); chCnt++) - if (charList[chCnt] == key) return true; + if (charList[chCnt] == key) + return true; return false; } @@ -939,7 +949,8 @@ void Control::handleKeyPress(uint8 key, uint8 *textBuf) { if (key == 8) { // backspace for (uint8 cnt = 0; cnt < 6; cnt++) - if (!textBuf[cnt]) return; + if (!textBuf[cnt]) + return; while (textBuf[1]) textBuf++; @@ -1462,7 +1473,7 @@ uint16 Control::quickXRestore(uint16 slot) { _skyText->fnSetFont(_savedCharSet); removePanel(); - return result; + return result; } void Control::restartGame(void) { diff --git a/sky/disk.cpp b/sky/disk.cpp index 02c5d82e6a..506c4a9354 100644 --- a/sky/disk.cpp +++ b/sky/disk.cpp @@ -232,8 +232,8 @@ void Disk::prefetchFile(uint16 fileNr) { fEntry = &((*fEntry)->next); } if (found) { - debug(1,"Disk::prefetchFile: File %d was already prefetched",fileNr); - return ; + debug(1, "Disk::prefetchFile: File %d was already prefetched", fileNr); + return; } uint8 *temp = loadFile(fileNr); *fEntry = new PrefFile; @@ -382,7 +382,7 @@ void Disk::fnMiniLoad(uint16 fileNum) { uint16 cnt = 0; while (_loadedFilesList[cnt]) { if (_loadedFilesList[cnt] == fileNum) - return ; + return; cnt++; } _loadedFilesList[cnt] = fileNum & 0x7FFFU; diff --git a/sky/logic.cpp b/sky/logic.cpp index a68373cc87..e3d2df68d2 100644 --- a/sky/logic.cpp +++ b/sky/logic.cpp @@ -2341,7 +2341,7 @@ bool Logic::fnBlankScreen(uint32 a, uint32 b, uint32 c) { bool Logic::fnPrintCredit(uint32 a, uint32 b, uint32 c) { - lowTextManager_t creditText = _skyText->lowTextManager(a , 240, 0, 248, true); + lowTextManager_t creditText = _skyText->lowTextManager(a, 240, 0, 248, true); Compact *credCompact = _skyCompact->fetchCpt(creditText.compactNum); credCompact->xcood = 168; if ((a == 558) && (c == 215)) @@ -2500,7 +2500,7 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas if (speechUsed && (!(SkyEngine::_systemVars.systemFlags & SF_ALLOW_TEXT))) { target->spTime = 10; target->logic = L_TALK; - return ; + return; } //now form the text sprite diff --git a/sky/screen.cpp b/sky/screen.cpp index 11a4c1a98f..42708f01bb 100644 --- a/sky/screen.cpp +++ b/sky/screen.cpp @@ -177,11 +177,12 @@ void Screen::convertPalette(uint8 *inPal, uint8* outPal) { //convert 3 byte 0..6 void Screen::recreate(void) { // check the game grid for changed blocks - if (!Logic::_scriptVariables[LAYER_0_ID]) return ; + if (!Logic::_scriptVariables[LAYER_0_ID]) + return; uint8 *gridPos = _gameGrid; uint8 *screenData = (uint8 *)SkyEngine::fetchItem(Logic::_scriptVariables[LAYER_0_ID]); if (!screenData) { - error("Screen::recreate():\nSkyEngine::fetchItem(Logic::_scriptVariables[LAYER_0_ID](%X)) returned NULL",Logic::_scriptVariables[LAYER_0_ID]); + error("Screen::recreate():\nSkyEngine::fetchItem(Logic::_scriptVariables[LAYER_0_ID](%X)) returned NULL", Logic::_scriptVariables[LAYER_0_ID]); } uint8 *screenPos = _currentScreen; @@ -640,7 +641,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { if (spriteInfo == NULL) { warning("Screen::drawSprite Can't draw sprite. Data %d was not loaded", sprCompact->frame >> 6); sprCompact->status = 0; - return ; + return; } dataFileHeader *sprDataFile = (dataFileHeader *)spriteInfo; _sprWidth = sprDataFile->s_width; @@ -653,7 +654,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { spriteY = -spriteY; if (_sprHeight <= (uint32)spriteY) { _sprWidth = 0; - return ; + return; } _sprHeight -= spriteY; spriteData += sprDataFile->s_width * spriteY; @@ -664,7 +665,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { botClip = -botClip; if (_sprHeight <= (uint32)botClip) { _sprWidth = 0; - return ; + return; } _sprHeight -= botClip; } @@ -675,7 +676,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { spriteX = -spriteX; if (_sprWidth <= (uint32)spriteX) { _sprWidth = 0; - return ; + return; } _sprWidth -= spriteX; _maskX1 = spriteX; @@ -686,7 +687,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { rightClip = (-rightClip) + 1; if (_sprWidth <= (uint32)rightClip) { _sprWidth = 0; - return ; + return; } _sprWidth -= rightClip; _maskX2 = rightClip; @@ -701,7 +702,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { if ((_sprX + _sprWidth > 320) || (_sprY + _sprHeight > 192)) { warning("Screen::drawSprite fatal error: got x = %d, y = %d, w = %d, h = %d",_sprX, _sprY, _sprWidth, _sprHeight); _sprWidth = 0; - return ; + return; } for (uint16 cnty = 0; cnty < _sprHeight; cnty++) { @@ -726,7 +727,8 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) { void Screen::vectorToGame(uint8 gridVal) { - if (_sprWidth == 0) return ; + if (_sprWidth == 0) + return; uint8 *trgGrid = _gameGrid + _sprY * GRID_X +_sprX; for (uint32 cnty = 0; cnty < _sprHeight; cnty++) { for (uint32 cntx = 0; cntx < _sprWidth; cntx++) @@ -762,7 +764,7 @@ void Screen::vertMaskSub(uint16 *grid, uint32 gridOfs, uint8 *screenPtr, uint32 void Screen::verticalMask(void) { if (_sprWidth == 0) - return ; + return; uint32 startGridOfs = (_sprY + _sprHeight - 1) * GRID_X + _sprX; uint8 *startScreenPtr = (_sprY + _sprHeight - 1) * GRID_H * GAME_SCREEN_WIDTH + _sprX * GRID_W + _currentScreen; diff --git a/sky/sound.cpp b/sky/sound.cpp index 59c2a2033c..c2f407b515 100644 --- a/sky/sound.cpp +++ b/sky/sound.cpp @@ -1090,7 +1090,7 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) { if (sound > _soundsTotal) { debug(5, "Sound::playSound %d ignored, only %d sfx in file", sound, _soundsTotal); - return ; + return; } volume = ((volume & 0x7F) + 1) << 1; diff --git a/sky/text.cpp b/sky/text.cpp index dcc9165755..0e177a87e6 100644 --- a/sky/text.cpp +++ b/sky/text.cpp @@ -307,12 +307,12 @@ void Text::fnTextModule(uint32 textInfoId, uint32 textNo) { void Text::getText(uint32 textNr) { //load text #"textNr" into textBuffer if (patchMessage(textNr)) - return ; + return; uint32 sectionNo = (textNr & 0x0F000) >> 12; if (SkyEngine::_itemList[FIRST_TEXT_SEC + sectionNo] == (void **)NULL) { //check if already loaded - debug(5, "Loading Text item(s) for Section %d", (sectionNo>>2)); + debug(5, "Loading Text item(s) for Section %d", (sectionNo >> 2)); uint32 fileNo = sectionNo + ((SkyEngine::_systemVars.language * NO_OF_TEXT_SECTIONS) + 60600); SkyEngine::_itemList[FIRST_TEXT_SEC + sectionNo] = (void **)_skyDisk->loadFile((uint16)fileNo); |