[Scummvm-cvs-logs] CVS: scummvm/sky control.cpp,1.97,1.98 disk.cpp,1.69,1.70 logic.cpp,1.155,1.156 screen.cpp,1.68,1.69 sound.cpp,1.54,1.55 text.cpp,1.70,1.71
Torbjörn Andersson
eriktorbjorn at users.sourceforge.net
Thu Sep 8 07:09:00 CEST 2005
Update of /cvsroot/scummvm/scummvm/sky
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31106
Modified Files:
control.cpp disk.cpp logic.cpp screen.cpp sound.cpp text.cpp
Log Message:
Whitespace changes
Index: control.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/control.cpp,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -d -r1.97 -r1.98
--- control.cpp 30 Jul 2005 21:11:40 -0000 1.97
+++ control.cpp 8 Sep 2005 14:08:04 -0000 1.98
@@ -68,7 +68,8 @@
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 @@
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 @@
_textSprite = NULL;
_curButtonText = 0;
_text->setSprite(NULL);
- return ;
+ return;
}
if (_curButtonText != pButton->_text) {
if (_textSprite) free(_textSprite);
@@ -446,7 +448,7 @@
void Control::doControlPanel(void) {
if (SkyEngine::isDemo()) {
- return ;
+ return;
}
initPanel();
@@ -756,14 +758,16 @@
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::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 @@
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 @@
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 @@
_skyText->fnSetFont(_savedCharSet);
removePanel();
- return result;
+ return result;
}
void Control::restartGame(void) {
Index: disk.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/disk.cpp,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -d -r1.69 -r1.70
--- disk.cpp 30 Jul 2005 21:11:40 -0000 1.69
+++ disk.cpp 8 Sep 2005 14:08:04 -0000 1.70
@@ -232,8 +232,8 @@
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 @@
uint16 cnt = 0;
while (_loadedFilesList[cnt]) {
if (_loadedFilesList[cnt] == fileNum)
- return ;
+ return;
cnt++;
}
_loadedFilesList[cnt] = fileNum & 0x7FFFU;
Index: logic.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/logic.cpp,v
retrieving revision 1.155
retrieving revision 1.156
diff -u -d -r1.155 -r1.156
--- logic.cpp 30 Jul 2005 21:11:40 -0000 1.155
+++ logic.cpp 8 Sep 2005 14:08:04 -0000 1.156
@@ -2341,7 +2341,7 @@
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 @@
if (speechUsed && (!(SkyEngine::_systemVars.systemFlags & SF_ALLOW_TEXT))) {
target->spTime = 10;
target->logic = L_TALK;
- return ;
+ return;
}
//now form the text sprite
Index: screen.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/screen.cpp,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -d -r1.68 -r1.69
--- screen.cpp 30 Jul 2005 21:11:40 -0000 1.68
+++ screen.cpp 8 Sep 2005 14:08:04 -0000 1.69
@@ -177,11 +177,12 @@
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 @@
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 @@
spriteY = -spriteY;
if (_sprHeight <= (uint32)spriteY) {
_sprWidth = 0;
- return ;
+ return;
}
_sprHeight -= spriteY;
spriteData += sprDataFile->s_width * spriteY;
@@ -664,7 +665,7 @@
botClip = -botClip;
if (_sprHeight <= (uint32)botClip) {
_sprWidth = 0;
- return ;
+ return;
}
_sprHeight -= botClip;
}
@@ -675,7 +676,7 @@
spriteX = -spriteX;
if (_sprWidth <= (uint32)spriteX) {
_sprWidth = 0;
- return ;
+ return;
}
_sprWidth -= spriteX;
_maskX1 = spriteX;
@@ -686,7 +687,7 @@
rightClip = (-rightClip) + 1;
if (_sprWidth <= (uint32)rightClip) {
_sprWidth = 0;
- return ;
+ return;
}
_sprWidth -= rightClip;
_maskX2 = rightClip;
@@ -701,7 +702,7 @@
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::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::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;
Index: sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/sound.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- sound.cpp 30 Jul 2005 21:11:41 -0000 1.54
+++ sound.cpp 8 Sep 2005 14:08:04 -0000 1.55
@@ -1090,7 +1090,7 @@
if (sound > _soundsTotal) {
debug(5, "Sound::playSound %d ignored, only %d sfx in file", sound, _soundsTotal);
- return ;
+ return;
}
volume = ((volume & 0x7F) + 1) << 1;
Index: text.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sky/text.cpp,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- text.cpp 30 Jul 2005 21:11:41 -0000 1.70
+++ text.cpp 8 Sep 2005 14:08:04 -0000 1.71
@@ -307,12 +307,12 @@
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);
More information about the Scummvm-git-logs
mailing list