aboutsummaryrefslogtreecommitdiff
path: root/sky
diff options
context:
space:
mode:
authorEugene Sandulenko2005-07-30 21:11:48 +0000
committerEugene Sandulenko2005-07-30 21:11:48 +0000
commit6b4484472b79dc7ea7d1ce545a28fba7d3b7696f (patch)
treec44c4e61f18ddd537f7082cb48869cf33d422fbd /sky
parent86ab70b149e5cd00cf54f2e41896e2c4e16795e4 (diff)
downloadscummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.gz
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.tar.bz2
scummvm-rg350-6b4484472b79dc7ea7d1ce545a28fba7d3b7696f.zip
Remove trailing whitespaces.
svn-id: r18604
Diffstat (limited to 'sky')
-rw-r--r--sky/autoroute.cpp4
-rw-r--r--sky/compact.cpp10
-rw-r--r--sky/control.cpp106
-rw-r--r--sky/control.h2
-rw-r--r--sky/debug.cpp30
-rw-r--r--sky/debug.h6
-rw-r--r--sky/disk.cpp16
-rw-r--r--sky/disk.h2
-rw-r--r--sky/grid.cpp10
-rw-r--r--sky/logic.cpp80
-rw-r--r--sky/logic.h6
-rw-r--r--sky/mouse.cpp22
-rw-r--r--sky/mouse.h6
-rw-r--r--sky/music/adlibchannel.cpp6
-rw-r--r--sky/music/adlibmusic.cpp6
-rw-r--r--sky/music/gmchannel.cpp6
-rw-r--r--sky/music/musicbase.cpp14
-rw-r--r--sky/music/musicbase.h4
-rw-r--r--sky/rnc_deco.cpp22
-rw-r--r--sky/rnc_deco.h8
-rw-r--r--sky/screen.cpp28
-rw-r--r--sky/screen.h4
-rw-r--r--sky/sky.cpp24
-rw-r--r--sky/sky.h4
-rw-r--r--sky/sound.cpp18
-rw-r--r--sky/struc.h10
-rw-r--r--sky/text.cpp78
27 files changed, 266 insertions, 266 deletions
diff --git a/sky/autoroute.cpp b/sky/autoroute.cpp
index 4e2536c88e..baa681cc36 100644
--- a/sky/autoroute.cpp
+++ b/sky/autoroute.cpp
@@ -198,7 +198,7 @@ uint16 *AutoRoute::makeRouteData(uint8 startX, uint8 startY, uint8 destX, uint8
uint16 lastVal = (*routePos) - 1;
while (lastVal) { // lastVal == 0 means route is done.
dataTrg -= 2;
-
+
int16 walkDirection = 0;
for (uint8 cnt = 0; cnt < 4; cnt++)
if (lastVal == *(routePos + _routeDirections[cnt])) {
@@ -258,7 +258,7 @@ uint16 AutoRoute::autoRoute(Compact *cpt) {
coordinates (2/14). This is normally not too tragic, but in the
scene when foster gets thrown out by Lamb (first time you enter
the pipe factory), the game would enter an infinite loop. */
- _routeGrid[(destY + 1) * ROUTE_GRID_WIDTH + destX + 1] = 0;
+ _routeGrid[(destY + 1) * ROUTE_GRID_WIDTH + destX + 1] = 0;
// hide this part joey from the grid
} else
return 1; // AR destination is an unaccessible block
diff --git a/sky/compact.cpp b/sky/compact.cpp
index 13dbc0d241..533fd09af2 100644
--- a/sky/compact.cpp
+++ b/sky/compact.cpp
@@ -125,7 +125,7 @@ SkyCompact::SkyCompact(void) {
dialog.runModal();
error("Unable to find \"sky.cpt\" file\nPlease download it from www.scummvm.org");
}
-
+
uint16 fileVersion = _cptFile->readUint16LE();
if (fileVersion != 0)
error("unknown \"sky.cpt\" version");
@@ -145,7 +145,7 @@ SkyCompact::SkyCompact(void) {
_cptTypes[i] = (uint16 *)malloc(_dataListLen[i] * sizeof(uint16));
_compacts[i] = (Compact**)malloc(_dataListLen[i] * sizeof(Compact*));
}
-
+
uint32 rawSize = _cptFile->readUint32LE() * sizeof(uint16);
uint16 *rawPos = _rawBuf = (uint16*)malloc(rawSize);
@@ -163,7 +163,7 @@ SkyCompact::SkyCompact(void) {
for (uint32 ecnt = 0; ecnt < _dataListLen[lcnt]; ecnt++) {
_cptSizes[lcnt][ecnt] = READ_LE_UINT16(srcPos++);
if (_cptSizes[lcnt][ecnt]) {
- _cptTypes[lcnt][ecnt] = READ_LE_UINT16(srcPos++);
+ _cptTypes[lcnt][ecnt] = READ_LE_UINT16(srcPos++);
_compacts[lcnt][ecnt] = (Compact*)rawPos;
_cptNames[lcnt][ecnt] = asciiPos;
asciiPos += strlen(asciiPos) + 1;
@@ -290,7 +290,7 @@ uint16 *SkyCompact::getGrafixPtr(Compact *cpt) {
uint16 *gfxBase = (uint16*)fetchCpt(cpt->grafixProgId);
if (gfxBase == NULL)
return NULL;
-
+
return gfxBase + cpt->grafixProgPos;
}
@@ -315,7 +315,7 @@ MegaSet *SkyCompact::getMegaSet(Compact *cpt) {
/**
\brief Returns the turn table for direction \a dir
from Compact \a cpt in \a megaSet.
-
+
Functionally equivalent to:
\verbatim
clear eax
diff --git a/sky/control.cpp b/sky/control.cpp
index 6d94ef5bfc..cc2306aeba 100644
--- a/sky/control.cpp
+++ b/sky/control.cpp
@@ -111,7 +111,7 @@ void TextResource::flushForRedraw(void) {
}
void TextResource::drawToScreen(bool doMask) {
-
+
doMask = true;
uint16 cnty, cntx, cpWidth, cpHeight;
if ((_oldX == _x) && (_oldY == _y) && (_spriteData)) return;
@@ -137,7 +137,7 @@ void TextResource::drawToScreen(bool doMask) {
if (cpWidth > _spriteData->s_width)
cpWidth = _spriteData->s_width;
cpHeight = (_spriteData->s_height > (GAME_SCREEN_HEIGHT - _y))?(GAME_SCREEN_HEIGHT - _y):(_spriteData->s_height);
-
+
uint8 *screenPos = _screen + _y * GAME_SCREEN_WIDTH + _x;
uint8 *copyDest = _oldScreen;
uint8 *copySrc = ((uint8 *)_spriteData) + sizeof(dataFileHeader);
@@ -176,7 +176,7 @@ void ControlStatus::setToText(const char *newText) {
displayText_t disText = _skyText->displayText(tmpLine, NULL, true, STATUS_WIDTH, 255);
_textData = (dataFileHeader *)disText.textData;
_statusText->setSprite(_textData);
- _statusText->drawToScreen(WITH_MASK);
+ _statusText->drawToScreen(WITH_MASK);
}
void ControlStatus::setToText(uint16 textNum) {
@@ -257,7 +257,7 @@ void Control::initPanel(void) {
_sprites.slode = _skyDisk->loadFile(60506);
_sprites.slode2 = _skyDisk->loadFile(60507);
_sprites.slide2 = _skyDisk->loadFile(60508);
- if (SkyEngine::_systemVars.gameVersion < 368)
+ if (SkyEngine::_systemVars.gameVersion < 368)
_sprites.musicBodge = NULL;
else
_sprites.musicBodge = _skyDisk->loadFile(60509);
@@ -349,7 +349,7 @@ void Control::buttonControl(ConResource *pButton) {
}
void Control::drawTextCross(uint32 flags) {
-
+
_bodge->drawToScreen(NO_MASK);
if (!(flags & SF_ALLOW_SPEECH))
drawCross(151, 124);
@@ -458,11 +458,11 @@ void Control::doControlPanel(void) {
_skyScreen->setPalette(60509);
else
_skyScreen->setPalette(60510);
-
+
drawMainPanel();
_savedMouse = _skyMouse->giveCurrentMouseType();
-
+
_skyMouse->spriteMouse(MOUSE_NORMAL, 0, 0);
bool quitPanel = false;
_lastButton = -1;
@@ -584,7 +584,7 @@ uint16 Control::handleClick(ConResource *pButton) {
_system->quit();
}
return 0;
- default:
+ default:
error("Control::handleClick: unknown routine: %X",pButton->_onClick);
}
}
@@ -605,7 +605,7 @@ bool Control::getYesNo(char *text) {
textY = MPNL_Y + 44 + (28 - dlgTextDat->s_height) / 2;
} else
dlgTextDat = NULL;
-
+
TextResource *dlgText = new TextResource(dlgTextDat, 1, 0, MPNL_X+2, textY, 0, DO_NOTHING, _system, _screenBuf);
dlgText->drawToScreen(WITH_MASK);
@@ -826,7 +826,7 @@ uint16 Control::saveRestorePanel(bool allowSave) {
for (cnt = 0; cnt < MAX_ON_SCREEN + 1; cnt++)
textSprites[cnt] = NULL;
_firstText = 0;
-
+
loadDescriptions(saveGameTexts);
_selectedGame = 0;
@@ -882,7 +882,7 @@ uint16 Control::saveRestorePanel(bool allowSave) {
if (_mouseClicked && lookList[cnt]->_onClick) {
_mouseClicked = false;
-
+
clickRes = handleClick(lookList[cnt]);
if (clickRes == SHIFTED) {
@@ -924,7 +924,7 @@ uint16 Control::saveRestorePanel(bool allowSave) {
if (allowSave) {
_system->setFeatureState(OSystem::kFeatureVirtualKeyboard, false);
}
-
+
return clickRes;
}
@@ -1002,7 +1002,7 @@ void Control::showSprites(dataFileHeader **nameSprites, bool allowSave) {
drawResource->drawToScreen(WITH_MASK);
}
_system->copyRectToScreen(_screenBuf + (GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT) * GAME_SCREEN_WIDTH + GAME_NAME_X, GAME_SCREEN_WIDTH, GAME_NAME_X, GAME_NAME_Y + cnt * PAN_CHAR_HEIGHT, PAN_LINE_WIDTH, PAN_CHAR_HEIGHT);
- } else
+ } else
drawResource->drawToScreen(NO_MASK);
}
delete drawResource;
@@ -1044,7 +1044,7 @@ bool Control::loadSaveAllowed(void) {
return false; // texts get lost during load/save, so don't allow it during choosing
if (Logic::_scriptVariables[SCREEN] >= 101)
return false; // same problem with LINC terminals
- if ((Logic::_scriptVariables[SCREEN] >= 82) &&
+ if ((Logic::_scriptVariables[SCREEN] >= 82) &&
(Logic::_scriptVariables[SCREEN] != 85) &&
(Logic::_scriptVariables[SCREEN] < 90))
return false; // don't allow saving in final rooms
@@ -1091,7 +1091,7 @@ void Control::saveDescriptions(uint8 *srcBuf) {
outf->write(tmpBuf, tmpPos - tmpBuf);
delete outf;
}
- free(tmpBuf);
+ free(tmpBuf);
}
void Control::doAutoSave(void) {
@@ -1219,7 +1219,7 @@ void Control::importOldCompact(Compact* destCpt, uint8 **srcPos, uint16 numElems
destCpt->grafixProgId = ((uint16*)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST))[target];
else if (graphType == OG_COMPACTELEM)
destCpt->grafixProgId = *(uint16*)_skyCompact->getCompactElem(destCpt, target);
- else
+ else
error("Illegal GrafixProg type encountered for compact %s", name);
}
if (saveType & SAVE_TURNP) {
@@ -1604,43 +1604,43 @@ char Control::_quitTexts[16][35] = {
};
uint8 Control::_crossImg[594] = {
- 0xFF, 0xFF, 0xFF, 0xFF, 0x09, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x0B, 0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0x56, 0x58, 0x58, 0x50, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4F, 0x54, 0x09, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x4E, 0x50, 0x54, 0x61, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x50, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0x61, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
+ 0xFF, 0x61, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x61, 0xFF,
+ 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x61, 0xFF, 0xFF, 0xFF,
0xFF, 0xFF
};
diff --git a/sky/control.h b/sky/control.h
index 68edf85c00..c9fcd742bd 100644
--- a/sky/control.h
+++ b/sky/control.h
@@ -195,7 +195,7 @@ private:
void drawMainPanel(void);
void delay(unsigned int amount);
-
+
void animClick(ConResource *pButton);
bool getYesNo(char *text);
void buttonControl(ConResource *pButton);
diff --git a/sky/debug.cpp b/sky/debug.cpp
index 99dec64521..ce91105511 100644
--- a/sky/debug.cpp
+++ b/sky/debug.cpp
@@ -1277,7 +1277,7 @@ void Debug::mcode(uint32 mcode, uint32 a, uint32 b, uint32 c) {
-Debugger::Debugger(Logic *logic, Mouse *mouse, Screen *screen, SkyCompact *skyCompact)
+Debugger::Debugger(Logic *logic, Mouse *mouse, Screen *screen, SkyCompact *skyCompact)
: _logic(logic), _mouse(mouse), _screen(screen), _skyCompact(skyCompact), _showGrid(false) {
DCmd_Register("exit", &Debugger::Cmd_Exit);
DCmd_Register("help", &Debugger::Cmd_Help);
@@ -1345,7 +1345,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
DebugPrintf("Example: %s foster\n", argv[0]);
return true;
}
-
+
int i;
int numCompacts = ARRAYSIZE(section_0_compacts);
@@ -1355,7 +1355,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
}
return true;
}
-
+
Compact *cpt = 0;
for (i = 0; i < numCompacts; ++i) {
@@ -1383,7 +1383,7 @@ bool Debugger::Cmd_ShowCompact(int argc, const char **argv) {
} else {
DebugPrintf("Unknown compact: '%s'\n", argv[1]);
}
-
+
return true;
}
@@ -1392,16 +1392,16 @@ bool Debugger::Cmd_LogicCommand(int argc, const char **argv) {
DebugPrintf("Example: %s fn_printf 42\n", argv[0]);
return true;
}
-
+
int numMCodes = ARRAYSIZE(mcodes);
-
+
if (0 == strcmp(argv[1], "list")) {
for (int i = 0; i < numMCodes; ++i) {
DebugPrintf("%s\n", mcodes[i]);
}
return true;
}
-
+
uint32 arg1 = 0, arg2 = 0, arg3 = 0;
switch (argc) {
@@ -1412,7 +1412,7 @@ bool Debugger::Cmd_LogicCommand(int argc, const char **argv) {
case 3:
arg1 = atoi(argv[2]);
}
-
+
for (int i = 0; i < numMCodes; ++i) {
if (0 == strcmp(mcodes[i], argv[1])) {
_logic->fnExec(i, arg1, arg2, arg3);
@@ -1421,7 +1421,7 @@ bool Debugger::Cmd_LogicCommand(int argc, const char **argv) {
}
DebugPrintf("Unknown function: '%s'\n", argv[1]);
-
+
return true;
}
@@ -1437,15 +1437,15 @@ bool Debugger::Cmd_ScriptVar(int argc, const char **argv) {
DebugPrintf("Example: %s lamb_friend <value>\n", argv[0]);
return true;
}
-
- int numScriptVars = ARRAYSIZE(scriptVars);
+
+ int numScriptVars = ARRAYSIZE(scriptVars);
if (0 == strcmp(argv[1], "list")) {
for (int i = 0; i < numScriptVars; ++i) {
DebugPrintf("%s\n", scriptVars[i]);
}
return true;
- }
+ }
for (int i = 0; i < numScriptVars; ++i) {
if (0 == strcmp(scriptVars[i], argv[1])) {
@@ -1453,13 +1453,13 @@ bool Debugger::Cmd_ScriptVar(int argc, const char **argv) {
Logic::_scriptVariables[i] = atoi(argv[2]);
}
DebugPrintf("%s = %d\n", argv[1], Logic::_scriptVariables[i]);
-
+
return true;
}
}
DebugPrintf("Unknown ScriptVar: '%s'\n", argv[1]);
-
+
return true;
}
@@ -1471,7 +1471,7 @@ bool Debugger::Cmd_Section(int argc, const char **argv) {
const int baseId[] = { START_ONE, START_S6, START_29, START_SC31, START_SC66, START_SC90, START_SC81 };
int section = atoi(argv[1]);
-
+
if (section >= 0 && section <= 6) {
_logic->fnEnterSection(section == 6 ? 4 : section, 0, 0);
_logic->fnAssignBase(ID_FOSTER, baseId[section], 0);
diff --git a/sky/debug.h b/sky/debug.h
index 967a397116..2e0acfcd95 100644
--- a/sky/debug.h
+++ b/sky/debug.h
@@ -38,7 +38,7 @@ public:
Debugger(Logic *logic, Mouse *mouse, Screen *screen, SkyCompact *skyCompact);
virtual ~Debugger(); // we need this here for __SYMBIAN32__ archaic gcc/UIQ
bool showGrid() { return _showGrid; }
-
+
protected:
virtual void preEnter();
virtual void postEnter();
@@ -52,7 +52,7 @@ protected:
bool Cmd_Info(int argc, const char **argv);
bool Cmd_ScriptVar(int argc, const char **argv);
bool Cmd_Section(int argc, const char **argv);
-
+
Logic *_logic;
Mouse *_mouse;
Screen *_screen;
@@ -61,7 +61,7 @@ protected:
bool _showGrid;
};
-
+
class Debug {
public:
static void fetchCompact(uint32 a);
diff --git a/sky/disk.cpp b/sky/disk.cpp
index 3f1fa68f7e..02c5d82e6a 100644
--- a/sky/disk.cpp
+++ b/sky/disk.cpp
@@ -60,7 +60,7 @@ Disk::Disk(const Common::String &gameDataPath) {
warning("entriesRead != dinnerTableEntries. [%d/%d]", entriesRead, _dinnerTableEntries);
_dataDiskHandle->open(dataFilename);
- if (!_dataDiskHandle->isOpen())
+ if (!_dataDiskHandle->isOpen())
error("Error opening %s%s", gameDataPath.c_str(), dataFilename);
printf("Found BASS version v0.0%d (%d dnr entries)\n", determineGameVersion(), _dinnerTableEntries);
@@ -99,7 +99,7 @@ void Disk::flushPrefetched(void) {
}
bool Disk::fileExists(uint16 fileNr) {
-
+
return (getFileInfo(fileNr) != NULL);
}
@@ -112,7 +112,7 @@ uint8 *Disk::loadFile(uint16 fileNr) {
if (prefData)
return prefData;
- debug(2, "load file %d,%d (%d)", (fileNr >> 11), (fileNr & 2047), fileNr);
+ debug(2, "load file %d,%d (%d)", (fileNr >> 11), (fileNr & 2047), fileNr);
uint8 *fileInfoPtr = getFileInfo(fileNr);
if (fileInfoPtr == NULL) {
@@ -244,7 +244,7 @@ void Disk::prefetchFile(uint16 fileNr) {
}
uint8 *Disk::givePrefetched(uint16 fileNr, uint32 *fSize) {
-
+
PrefFile **fEntry = &_prefRoot;
bool found = false;
while ((*fEntry) && (!found)) {
@@ -266,7 +266,7 @@ uint8 *Disk::givePrefetched(uint16 fileNr, uint32 *fSize) {
}
uint8 *Disk::getFileInfo(uint16 fileNr) {
-
+
uint16 i;
uint16 *dnrTbl16Ptr = (uint16 *)_dinnerTableArea;
@@ -286,7 +286,7 @@ void Disk::fnCacheChip(uint16 *fList) {
// fnCacheChip is called after fnCacheFast
uint16 cnt = 0;
while (_buildList[cnt])
- cnt++;
+ cnt++;
uint16 fCnt = 0;
do {
_buildList[cnt + fCnt] = fList[fCnt] & 0x7FFFU;
@@ -324,7 +324,7 @@ void Disk::fnCacheFiles(void) {
targCnt++;
} else {
free(SkyEngine::_itemList[_loadedFilesList[lCnt] & 2047]);
- SkyEngine::_itemList[_loadedFilesList[lCnt] & 2047] = NULL;
+ SkyEngine::_itemList[_loadedFilesList[lCnt] & 2047] = NULL;
}
lCnt++;
}
@@ -423,7 +423,7 @@ uint32 Disk::determineGameVersion() {
case 243:
// pc gamer demo (v0.0109)
return 109;
- case 247:
+ case 247:
//floppy demo (v0.0267)
return 267;
case 1404:
diff --git a/sky/disk.h b/sky/disk.h
index 4a702a044d..d686cb94f2 100644
--- a/sky/disk.h
+++ b/sky/disk.h
@@ -78,7 +78,7 @@ protected:
Common::File *_dataDiskHandle;
Common::File *_dnrHandle;
RncDecoder _rncDecoder;
-
+
uint16 _buildList[MAX_FILES_IN_LIST];
uint32 _loadedFilesList[MAX_FILES_IN_LIST];
};
diff --git a/sky/grid.cpp b/sky/grid.cpp
index f3e6468f55..c44d25c727 100644
--- a/sky/grid.cpp
+++ b/sky/grid.cpp
@@ -166,18 +166,18 @@ bool Grid::getGridValues(Compact *cpt, uint8 *resGrid, uint32 *resBitNum, uint32
bool Grid::getGridValues(uint32 x, uint32 y, uint32 width, Compact *cpt, uint8 *resGrid, uint32 *resBitNum, uint32 *resWidth) {
uint32 bitPos;
- if (y < TOP_LEFT_Y)
+ if (y < TOP_LEFT_Y)
return false; // off screen
y -= TOP_LEFT_Y;
y >>= 3; // convert to blocks
- if (y >= GAME_SCREEN_HEIGHT >> 3)
+ if (y >= GAME_SCREEN_HEIGHT >> 3)
return false; // off screen
bitPos = y * 40;
width++;
x >>= 3; // convert to blocks
-
+
if (x < (TOP_LEFT_X >> 3)) { // at least partially off screen
- if (x + width < (TOP_LEFT_X >> 3))
+ if (x + width < (TOP_LEFT_X >> 3))
return false; // completely off screen
else {
width -= (TOP_LEFT_X >> 3) - x;
@@ -186,7 +186,7 @@ bool Grid::getGridValues(uint32 x, uint32 y, uint32 width, Compact *cpt, uint8 *
} else
x -= TOP_LEFT_X >> 3;
- if ((GAME_SCREEN_WIDTH >> 3) <= x)
+ if ((GAME_SCREEN_WIDTH >> 3) <= x)
return false; // off screen
if ((GAME_SCREEN_WIDTH >> 3) < x + width) // partially off screen
width = (GAME_SCREEN_WIDTH >> 3) - x;
diff --git a/sky/logic.cpp b/sky/logic.cpp
index ad31e658a6..a68373cc87 100644
--- a/sky/logic.cpp
+++ b/sky/logic.cpp
@@ -173,9 +173,9 @@ void Logic::logicScript() {
}
void Logic::autoRoute() {
-
+
_compact->downFlag = _skyAutoRoute->autoRoute(_compact);
- if ((_compact->downFlag == 2) && _skyCompact->cptIsId(_compact, CPT_JOEY) &&
+ if ((_compact->downFlag == 2) && _skyCompact->cptIsId(_compact, CPT_JOEY) &&
(_compact->mode == 0) && (_compact->baseSub == JOEY_OUT_OF_LIFT)) {
// workaround for script bug #1064113. Details unclear...
_compact->downFlag = 0;
@@ -514,7 +514,7 @@ void Logic::talk() {
// TODO: Check for mouse clicking
// Are we allowed to click
-
+
if (_skyMouse->wasClicked())
for (int i = 0; i < ARRAYSIZE(clickTable); i++)
if (clickTable[i] == (uint16)_scriptVariables[CUR_ID]) {
@@ -523,7 +523,7 @@ void Logic::talk() {
if ((SkyEngine::_systemVars.systemFlags & SF_ALLOW_TEXT) &&
(_compact->spTextId > 0) &&
(_compact->spTextId < 0xFFFF)) {
-
+
_skyCompact->fetchCpt(_compact->spTextId)->status = 0;
}
if (_skyCompact->getGrafixPtr(_compact)) {
@@ -747,7 +747,7 @@ bool Logic::collide(Compact *cpt) {
y -= 8; // bring them up a line
if (y == _compact->ycood)
return true;
-
+
return false;
case 2: // looking left
@@ -764,7 +764,7 @@ bool Logic::collide(Compact *cpt) {
return false;
case 3: // looking right
- case 4: // talking (not sure if this makes sense...)
+ case 4: // talking (not sure if this makes sense...)
if (y != _compact->ycood)
return false;
@@ -1171,7 +1171,7 @@ void Logic::initScriptVariables() {
memcpy(_scriptVariables + 352, forwardList1b288, sizeof(forwardList1b288));
else
memcpy(_scriptVariables + 352, forwardList1b, sizeof(forwardList1b));
-
+
memcpy(_scriptVariables + 656, forwardList2b, sizeof(forwardList2b));
memcpy(_scriptVariables + 721, forwardList3b, sizeof(forwardList3b));
memcpy(_scriptVariables + 663, forwardList4b, sizeof(forwardList4b));
@@ -1182,7 +1182,7 @@ uint16 Logic::mouseScript(uint32 scrNum, Compact *scriptComp) {
Compact *tmpComp = _compact;
_compact = scriptComp;
- uint16 retVal = script((uint16)(scrNum & 0xFFFF), (uint16)(scrNum >> 16));
+ uint16 retVal = script((uint16)(scrNum & 0xFFFF), (uint16)(scrNum >> 16));
_compact = tmpComp;
return retVal;
}
@@ -1388,7 +1388,7 @@ bool Logic::fnDrawScreen(uint32 a, uint32 b, uint32 c) {
debug(5, "Call: fnDrawScreen(%X, %X)",a,b);
SkyEngine::_systemVars.currentPalette = a;
_skyScreen->fnDrawScreen(a, b);
-
+
if (Logic::_scriptVariables[SCREEN] == 32) {
/* workaround for script bug #786482
Under certain circumstances, which never got completely cleared,
@@ -1523,14 +1523,14 @@ bool Logic::fnGetTo(uint32 targetPlaceId, uint32 mode, uint32 c) {
_compact->upFlag = (uint16)mode; // save mode for action script
_compact->mode += 4; // next level up
Compact *cpt = _skyCompact->fetchCpt(_compact->place);
- if (!cpt) {
+ if (!cpt) {
warning("can't find _compact's getToTable. Place compact is NULL");
- return false;
+ return false;
}
uint16 *getToTable = (uint16*)_skyCompact->fetchCpt(cpt->getToTableId);
- if (!getToTable) {
+ if (!getToTable) {
warning("Place compact's getToTable is NULL!");
- return false;
+ return false;
}
while (*getToTable != targetPlaceId)
@@ -1653,7 +1653,7 @@ bool Logic::fnClearStop(uint32 a, uint32 b, uint32 c) {
}
bool Logic::fnPointerText(uint32 a, uint32 b, uint32 c) {
-
+
_skyText->fnPointerText(a, _skyMouse->giveMouseX(), _skyMouse->giveMouseY());
return true;
}
@@ -1713,7 +1713,7 @@ bool Logic::fnSpeakWaitDir(uint32 a, uint32 b, uint32 c) {
}
bool Logic::fnChooser(uint32 a, uint32 b, uint32 c) {
-
+
// setup the text questions to be clicked on
// read from TEXT1 until 0
@@ -1728,11 +1728,11 @@ bool Logic::fnChooser(uint32 a, uint32 b, uint32 c) {
uint32 textNum = *p++;
struct lowTextManager_t lowText = _skyText->lowTextManager(textNum, GAME_SCREEN_WIDTH, 0, 241, 0);
-
+
uint8 *data = lowText.textData;
// stipple the text
-
+
uint32 size = ((dataFileHeader *)data)->s_height * ((dataFileHeader *)data)->s_width;
uint32 index = 0;
uint32 width = ((dataFileHeader *)data)->s_width;
@@ -1740,7 +1740,7 @@ bool Logic::fnChooser(uint32 a, uint32 b, uint32 c) {
data += sizeof(dataFileHeader);
while (index < size) {
- if (index % width <= 1)
+ if (index % width <= 1)
index ^= 1; //index++;
if (!data[index])
data[index] = 1;
@@ -1832,7 +1832,7 @@ bool Logic::fnClearRequest(uint32 target, uint32 b, uint32 c) {
bool Logic::fnCheckRequest(uint32 a, uint32 b, uint32 c) {
/// check for interaction request
-
+
if (!_compact->request)
return true;
@@ -1993,7 +1993,7 @@ bool Logic::fnNoSpriteEngine(uint32 a, uint32 b, uint32 c) {
/// stop the compact printing
/// remove foreground, background & sort
_compact->status &= 0xfff8;
- return true;
+ return true;
}
bool Logic::fnNoSpritesA6(uint32 us, uint32 b, uint32 c) {
@@ -2001,7 +2001,7 @@ bool Logic::fnNoSpritesA6(uint32 us, uint32 b, uint32 c) {
/// remove foreground, background & sort
Compact *cpt = _skyCompact->fetchCpt(us);
cpt->status &= 0xfff8;
- return true;
+ return true;
}
bool Logic::fnResetId(uint32 id, uint32 resetBlock, uint32 c) {
@@ -2043,7 +2043,7 @@ bool Logic::fnPause(uint32 cycles, uint32 b, uint32 c) {
bool Logic::fnRunAnimMod(uint32 animNo, uint32 b, uint32 c) {
_compact->grafixProgId = animNo;
_compact->grafixProgPos = 0;
-
+
_compact->offset = *_skyCompact->getGrafixPtr(_compact);
_compact->grafixProgPos++;
_compact->logic = L_MOD_ANIMATE;
@@ -2128,7 +2128,7 @@ bool Logic::fnAskThis(uint32 textNo, uint32 animNo, uint32 c) {
}
bool Logic::fnRandom(uint32 a, uint32 b, uint32 c) {
- _scriptVariables[RND] = _rnd.getRandomNumber(65536) & a;
+ _scriptVariables[RND] = _rnd.getRandomNumber(65536) & a;
return true;
}
@@ -2139,7 +2139,7 @@ bool Logic::fnPersonHere(uint32 id, uint32 room, uint32 c) {
}
bool Logic::fnToggleMouse(uint32 a, uint32 b, uint32 c) {
-
+
_skyCompact->fetchCpt(a)->status ^= ST_MOUSE;
return true;
}
@@ -2194,7 +2194,7 @@ bool Logic::fnCustomJoey(uint32 id, uint32 b, uint32 c) {
/// get access to another megas compact as easily
Compact *cpt = _skyCompact->fetchCpt(id);
-
+
_scriptVariables[PLAYER_X] = cpt->xcood;
_scriptVariables[PLAYER_Y] = cpt->ycood;
_scriptVariables[PLAYER_MOOD] = cpt->mood;
@@ -2271,7 +2271,7 @@ bool Logic::fnEyeball(uint32 id, uint32 b, uint32 c) {
bool Logic::fnLeaveSection(uint32 sectionNo, uint32 b, uint32 c) {
if (SkyEngine::isDemo())
_skyControl->showGameQuitMsg();
-
+
if (sectionNo == 5) //linc section - has different mouse icons
_skyMouse->replaceMouseCursors(60301);
@@ -2298,18 +2298,18 @@ bool Logic::fnEnterSection(uint32 sectionNo, uint32 b, uint32 c) {
_skyGrid->loadGrids();
SkyEngine::_systemVars.systemFlags &= ~SF_GAME_RESTORED;
}
-
+
return true;
}
bool Logic::fnRestoreGame(uint32 a, uint32 b, uint32 c) {
-
+
_skyControl->doLoadSavePanel();
return false;
}
bool Logic::fnRestartGame(uint32 a, uint32 b, uint32 c) {
-
+
_skyControl->restartGame();
return false;
}
@@ -2353,7 +2353,7 @@ bool Logic::fnPrintCredit(uint32 a, uint32 b, uint32 c) {
}
bool Logic::fnLookAt(uint32 a, uint32 b, uint32 c) {
-
+
struct lowTextManager_t textInfo = _skyText->lowTextManager(a, 240, 0, 248, true);
Compact *textCpt = _skyCompact->fetchCpt(textInfo.compactNum);
textCpt->xcood = 168;
@@ -2363,11 +2363,11 @@ bool Logic::fnLookAt(uint32 a, uint32 b, uint32 c) {
_skyScreen->spriteEngine();
_skyScreen->flip();
- fnNoHuman(0, 0, 0);
+ fnNoHuman(0, 0, 0);
_skyMouse->lockMouse();
_skyMouse->waitMouseNotPressed();
-
+
_skyMouse->unlockMouse();
fnAddHuman(0, 0, 0);
textCpt->status = 0;
@@ -2476,12 +2476,12 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
animNum += target->megaSet / NEXT_MEGA_SET;
animNum &= 0xFF;
-
+
uint16 *talkTable = (uint16*)_skyCompact->fetchCpt(CPT_TALK_TABLE_LIST);
target->grafixProgId = talkTable[animNum];
target->grafixProgPos = 0;
uint16 *animPtr = _skyCompact->getGrafixPtr(target);
-
+
if (animPtr) {
target->offset = *animPtr++;
target->getToFlag = *animPtr++;
@@ -2499,7 +2499,7 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
// language than english
if (speechUsed && (!(SkyEngine::_systemVars.systemFlags & SF_ALLOW_TEXT))) {
target->spTime = 10;
- target->logic = L_TALK;
+ target->logic = L_TALK;
return ;
}
@@ -2514,7 +2514,7 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
//we need the talkers sprite information
textCompact->screen = target->screen; //put our screen in
- if (_scriptVariables[SCREEN] == target->screen) { // Only use coordinates if we are on the current screen
+ if (_scriptVariables[SCREEN] == target->screen) { // Only use coordinates if we are on the current screen
//talking on-screen
byte *targetGfx = (byte *)SkyEngine::fetchItem(target->frame >> 6);
uint16 xPos = target->xcood + ((struct dataFileHeader *)targetGfx)->s_offset_x;
@@ -2530,15 +2530,15 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
xPos = TOP_LEFT_X + FULL_SCREEN_WIDTH;
xPos -= FIXED_TEXT_WIDTH;
}
-
+
textCompact->xcood = xPos;
uint16 yPos = target->ycood + ((struct dataFileHeader *)targetGfx)->s_offset_y - 6 - ((struct dataFileHeader *)textGfx)->s_height;
-
+
if (yPos < TOP_LEFT_Y)
yPos = TOP_LEFT_Y;
textCompact->ycood = yPos;
-
+
} else {
//talking off-screen
target->spTextId = 0; //don't kill any text 'cos none was made
@@ -2551,7 +2551,7 @@ void Logic::stdSpeak(Compact *target, uint32 textNum, uint32 animNum, uint32 bas
target->spTime = 10;
else
target->spTime = (uint16)_skyText->_dtLetters + 5;
- target->logic = L_TALK;
+ target->logic = L_TALK;
}
} // End of namespace Sky
diff --git a/sky/logic.h b/sky/logic.h
index e6260f90bb..16cc3a1dce 100644
--- a/sky/logic.h
+++ b/sky/logic.h
@@ -144,14 +144,14 @@ public:
void useControlInstance(Control *control) { _skyControl = control; };
uint16 mouseScript(uint32 scrNum, Compact *scriptComp);
-
+
static uint32 _scriptVariables[NUM_SKY_SCRIPTVARS];
Grid *_skyGrid;
uint16 script(uint16 scriptNo, uint16 offset);
void initScreen0(void);
void parseSaveData(uint32 *data);
-
+
protected:
void push(uint32);
uint32 pop();
@@ -313,7 +313,7 @@ protected:
uint32 _currentSection;
Common::RandomSource _rnd;
-
+
SkyCompact *_skyCompact;
Screen *_skyScreen;
Disk *_skyDisk;
diff --git a/sky/mouse.cpp b/sky/mouse.cpp
index 24ce9627fe..7ee62b93b9 100644
--- a/sky/mouse.cpp
+++ b/sky/mouse.cpp
@@ -95,7 +95,7 @@ Mouse::Mouse(OSystem *system, Disk *skyDisk, SkyCompact *skyCompact) {
_currentCursor = 6;
_mouseX = GAME_SCREEN_WIDTH / 2;
_mouseY = GAME_SCREEN_HEIGHT / 2;
-
+
_miceData = _skyDisk->loadFile(MICE_FILE);
//load in the object mouse file
@@ -121,9 +121,9 @@ bool Mouse::fnAddHuman(void) {
if (_mouseY < 2) //stop mouse activating top line
_mouseY = 2;
-
+
_system->warpMouse(_mouseX, _mouseY);
-
+
//force the pointer engine into running a get-off
//even if it's over nothing
@@ -133,7 +133,7 @@ bool Mouse::fnAddHuman(void) {
//I am going to try it anyway
if (Logic::_scriptVariables[GET_OFF])
_skyLogic->script((uint16)Logic::_scriptVariables[GET_OFF],(uint16)(Logic::_scriptVariables[GET_OFF] >> 16));
-
+
Logic::_scriptVariables[SPECIAL_ITEM] = 0xFFFFFFFF;
Logic::_scriptVariables[GET_OFF] = RESET_MOUSE;
}
@@ -141,7 +141,7 @@ bool Mouse::fnAddHuman(void) {
return true;
}
-void Mouse::fnSaveCoods(void) {
+void Mouse::fnSaveCoods(void) {
Logic::_scriptVariables[SAFEX] = _mouseX + TOP_LEFT_X;
Logic::_scriptVariables[SAFEY] = _mouseY + TOP_LEFT_Y;
}
@@ -180,7 +180,7 @@ void Mouse::waitMouseNotPressed(void) {
}
void Mouse::spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY) {
-
+
_currentCursor = frameNum;
byte *newCursor = _miceData;
@@ -200,7 +200,7 @@ void Mouse::spriteMouse(uint16 frameNum, uint8 mouseX, uint8 mouseY) {
void Mouse::mouseEngine(uint16 mouseX, uint16 mouseY) {
_mouseX = mouseX;
_mouseY = mouseY;
-
+
_logicClick = (_mouseB > 0); // click signal is available for Logic for one gamecycle
if (!Logic::_scriptVariables[MOUSE_STOP]) {
@@ -209,7 +209,7 @@ void Mouse::mouseEngine(uint16 mouseX, uint16 mouseY) {
if (Logic::_scriptVariables[MOUSE_STATUS] & (1 << 2)) //buttons enabled?
buttonEngine1();
}
- }
+ }
_mouseB = 0; //don't save up buttons
}
@@ -244,7 +244,7 @@ void Mouse::pointerEngine(uint16 xPos, uint16 yPos) {
} while (*currentList != 0);
if (Logic::_scriptVariables[SPECIAL_ITEM] != 0) {
Logic::_scriptVariables[SPECIAL_ITEM] = 0;
-
+
if (Logic::_scriptVariables[GET_OFF])
_skyLogic->script((uint16)Logic::_scriptVariables[GET_OFF],(uint16)(Logic::_scriptVariables[GET_OFF] >> 16));
Logic::_scriptVariables[GET_OFF] = 0;
@@ -252,7 +252,7 @@ void Mouse::pointerEngine(uint16 xPos, uint16 yPos) {
}
void Mouse::buttonPressed(uint8 button) {
-
+
_mouseB = button;
}
@@ -303,7 +303,7 @@ void Mouse::fnOpenCloseHand(bool open) {
uint32 size = ((dataFileHeader*)_objectMouseData)->s_sp_size;
uint8 *srcData;
uint8 *destData;
-
+
srcData = (uint8 *)_objectMouseData + size * cursor + sizeof(dataFileHeader);
destData = (uint8 *)_miceData + sizeof(dataFileHeader);
memcpy(destData, srcData, size);
diff --git a/sky/mouse.h b/sky/mouse.h
index 66291113a6..91f72d27f5 100644
--- a/sky/mouse.h
+++ b/sky/mouse.h
@@ -60,17 +60,17 @@ public:
bool wasClicked(void);
void logicClick(void) { _logicClick = true; };
void resetCursor();
-
+
protected:
void pointerEngine(uint16 xPos, uint16 yPos);
void buttonEngine1(void);
bool _logicClick;
-
+
uint16 _mouseB; //mouse button
uint16 _mouseX; //actual mouse coordinates
- uint16 _mouseY;
+ uint16 _mouseY;
uint16 _currentCursor;
diff --git a/sky/music/adlibchannel.cpp b/sky/music/adlibchannel.cpp
index c0a54bd49c..b57b0cfe37 100644
--- a/sky/music/adlibchannel.cpp
+++ b/sky/music/adlibchannel.cpp
@@ -108,7 +108,7 @@ void AdlibChannel::stopNote(void) {
}
int32 AdlibChannel::getNextEventTime(void) {
- int32 retV = 0;
+ int32 retV = 0;
uint8 cnt, lVal = 0;
for (cnt = 0; cnt < 4; cnt++) {
lVal = _musicData[_channelData.eventDataPtr];
@@ -127,7 +127,7 @@ uint8 AdlibChannel::process(uint16 aktTime) {
if (!_channelData.channelActive) {
return 0;
}
-
+
uint8 returnVal = 0;
_channelData.nextEventTime -= aktTime;
@@ -143,7 +143,7 @@ uint8 AdlibChannel::process(uint16 aktTime) {
case 0: com90_caseNoteOff(); break;
case 1: com90_stopChannel(); break;
case 2: com90_setupInstrument(); break;
- case 3:
+ case 3:
returnVal = com90_updateTempo();
break;
case 5: com90_getFreqOffset(); break;
diff --git a/sky/music/adlibmusic.cpp b/sky/music/adlibmusic.cpp
index 57f507ff46..68718ef082 100644
--- a/sky/music/adlibmusic.cpp
+++ b/sky/music/adlibmusic.cpp
@@ -28,11 +28,11 @@ namespace Sky {
AdlibMusic::AdlibMusic(Audio::Mixer *pMixer, Disk *pDisk)
: MusicBase(pDisk) {
-
+
_driverFileBase = 60202;
_mixer = pMixer;
_sampleRate = pMixer->getOutputRate();
-
+
_opl = makeAdlibOPL(_sampleRate);
_mixer->setupPremix(this);
@@ -91,7 +91,7 @@ void AdlibMusic::setupPointers(void) {
// disk demo uses a different adlib driver version, some offsets have changed
//_musicDataLoc = (_musicData[0x11CC] << 8) | _musicData[0x11CB];
//_initSequence = _musicData + 0xEC8;
-
+
_musicDataLoc = READ_LE_UINT16(_musicData + 0x1200);
_initSequence = _musicData + 0xEFB;
} else if (SkyEngine::_systemVars.gameVersion == 267) {
diff --git a/sky/music/gmchannel.cpp b/sky/music/gmchannel.cpp
index ec50a160e3..7c79c0578a 100644
--- a/sky/music/gmchannel.cpp
+++ b/sky/music/gmchannel.cpp
@@ -67,7 +67,7 @@ void GmChannel::stopNote(void) {
int32 GmChannel::getNextEventTime(void) {
- int32 retV = 0;
+ int32 retV = 0;
uint8 cnt, lVal = 0;
for (cnt = 0; cnt < 4; cnt++) {
lVal = _musicData[_channelData.eventDataPtr];
@@ -85,7 +85,7 @@ uint8 GmChannel::process(uint16 aktTime) {
if (!_channelData.channelActive)
return 0;
-
+
uint8 returnVal = 0;
_channelData.nextEventTime -= aktTime;
@@ -102,7 +102,7 @@ uint8 GmChannel::process(uint16 aktTime) {
case 0: com90_caseNoteOff(); break;
case 1: com90_stopChannel(); break;
case 2: com90_setupInstrument(); break;
- case 3:
+ case 3:
returnVal = com90_updateTempo();
break;
case 5: com90_getPitch(); break;
diff --git a/sky/music/musicbase.cpp b/sky/music/musicbase.cpp
index 29c2b73c19..ed296c4e47 100644
--- a/sky/music/musicbase.cpp
+++ b/sky/music/musicbase.cpp
@@ -82,19 +82,19 @@ void MusicBase::musicCommand(uint16 command) {
return ;
}
switch(command >> 8) {
- case 0:
+ case 0:
debug(1,"Music: got call to startAdlibDriver(). Not necessary in this implementation.");
break;
- case 1:
+ case 1:
debug(1,"Music: got call to stopDriver(). Not necessary in this implementation.");
break;
case 2:
debug(1,"Music: got call to SetTempo(). Tempo is fixed in this implementation.");
break;
- case 3:
+ case 3:
debug(1,"Music: ignored direct call to driverPoll().");
break;
- case 4:
+ case 4:
startMusic(command & 0xFF);
break;
case 6:
@@ -103,10 +103,10 @@ void MusicBase::musicCommand(uint16 command) {
case 7:
stopMusic();
break;
- case 13:
- setFMVolume(command & 0xFF);
+ case 13:
+ setFMVolume(command & 0xFF);
break;
- default:
+ default:
debug(1,"musicCommand %d ignored.",command >> 8);
}
}
diff --git a/sky/music/musicbase.h b/sky/music/musicbase.h
index ea438d2bb5..0fda141d2f 100644
--- a/sky/music/musicbase.h
+++ b/sky/music/musicbase.h
@@ -59,7 +59,7 @@ public:
virtual void setVolume(uint8 volume) = 0;
uint8 giveVolume(void) { return (uint8)_musicVolume; };
uint8 giveCurrentMusic(void) { return _currentMusic; };
-
+
protected:
Disk *_skyDisk;
@@ -77,7 +77,7 @@ protected:
Actions _onNextPoll;
ChannelBase *_channels[10];
Common::Mutex _mutex;
-
+
virtual void setupPointers(void) = 0;
virtual void setupChannels(uint8 *channelData) = 0;
diff --git a/sky/rnc_deco.cpp b/sky/rnc_deco.cpp
index 92612d22f7..c026cd6768 100644
--- a/sky/rnc_deco.cpp
+++ b/sky/rnc_deco.cpp
@@ -47,7 +47,7 @@ void RncDecoder::initCrc() {
uint16 tmp2 = 0;
for (tmp2 = 0; tmp2 < 0x100; tmp2++) {
- tmp1 = tmp2;
+ tmp1 = tmp2;
for (cnt = 8; cnt > 0; cnt--) {
if (tmp1 % 2) {
tmp1 >>= 1;
@@ -68,9 +68,9 @@ uint16 RncDecoder::crcBlock(const uint8 *block, uint32 size) {
for (i = 0; i < size; i++) {
tmp = *block++;
- crc ^= tmp;
- tmp = (uint8)((crc >> 8) & 0x00FF);
- crc &= 0x00FF;
+ crc ^= tmp;
+ tmp = (uint8)((crc >> 8) & 0x00FF);
+ crc &= 0x00FF;
crc = *(uint16 *)&crcTable8[crc << 1];
crc ^= tmp;
}
@@ -84,7 +84,7 @@ uint16 RncDecoder::inputBits(uint8 amount) {
int16 newBitCount = _bitCount;
uint16 remBits, returnVal;
- returnVal = ((1 << amount) - 1) & newBitBuffl;
+ returnVal = ((1 << amount) - 1) & newBitBuffl;
newBitCount -= amount;
if (newBitCount < 0) {
@@ -92,7 +92,7 @@ uint16 RncDecoder::inputBits(uint8 amount) {
remBits = (newBitBuffh << (16 - newBitCount));
newBitBuffh >>= newBitCount;
newBitBuffl >>= newBitCount;
- newBitBuffl |= remBits;
+ newBitBuffl |= remBits;
_srcPtr += 2;
newBitBuffh = READ_LE_UINT16(_srcPtr);
amount -= newBitCount;
@@ -170,7 +170,7 @@ int32 RncDecoder::unpackM1(const void *input, void *output, uint16 key) {
uint16 counts = 0;
uint16 crcUnpacked = 0;
uint16 crcPacked = 0;
-
+
_bitBuffl = 0;
_bitBuffh = 0;
@@ -196,9 +196,9 @@ int32 RncDecoder::unpackM1(const void *input, void *output, uint16 key) {
if (crcBlock(inputptr, packLen) != crcPacked)
return PACKED_CRC;
- inputptr = (((const uint8 *)input) + HEADER_LEN);
+ inputptr = (((const uint8 *)input) + HEADER_LEN);
_srcPtr = inputptr;
-
+
inputHigh = ((const uint8 *)input) + packLen + HEADER_LEN;;
outputLow = (uint8 *)output;
outputHigh = *(((const uint8 *)input) + 16) + unpackLen + outputLow;
@@ -215,7 +215,7 @@ int32 RncDecoder::unpackM1(const void *input, void *output, uint16 key) {
_bitBuffl = READ_LE_UINT16(_srcPtr);
inputBits(2);
-
+
do {
makeHufftable(_rawTable);
makeHufftable(_posTable);
@@ -242,7 +242,7 @@ int32 RncDecoder::unpackM1(const void *input, void *output, uint16 key) {
if (counts > 1) {
inputOffset = inputValue(_posTable) + 1;
inputLength = inputValue(_lenTable) + MIN_LENGTH;
-
+
// Don't use memcpy here! because input and output overlap.
uint8 *tmpPtr = (_dstPtr-inputOffset);
while (inputLength--)
diff --git a/sky/rnc_deco.h b/sky/rnc_deco.h
index 092ec46821..0e34d4dfab 100644
--- a/sky/rnc_deco.h
+++ b/sky/rnc_deco.h
@@ -35,7 +35,7 @@ protected:
uint16 _posTable[64];
uint16 _lenTable[64];
uint16 _crcTable[256];
-
+
uint16 _bitBuffl;
uint16 _bitBuffh;
uint8 _bitCount;
@@ -46,15 +46,15 @@ protected:
public:
RncDecoder();
~RncDecoder();
- int32 unpackM1(const void *input, void *output, uint16 key);
-
+ int32 unpackM1(const void *input, void *output, uint16 key);
+
protected:
void initCrc();
uint16 crcBlock(const uint8 *block, uint32 size);
uint16 inputBits(uint8 amount);
void makeHufftable(uint16 *table);
uint16 inputValue(uint16 *table);
-
+
};
} // End of namespace Sky
diff --git a/sky/screen.cpp b/sky/screen.cpp
index 8b7e593ae7..11a4c1a98f 100644
--- a/sky/screen.cpp
+++ b/sky/screen.cpp
@@ -66,7 +66,7 @@ Screen::Screen(OSystem *pSystem, Disk *pDisk, SkyCompact *skyCompact) {
_currentScreen = NULL;
_scrollScreen = NULL;
- //blank the first 240 colors of the palette
+ //blank the first 240 colors of the palette
memset(tmpPal, 0, GAME_COLOURS * 4);
//set the remaining colors
@@ -74,7 +74,7 @@ Screen::Screen(OSystem *pSystem, Disk *pDisk, SkyCompact *skyCompact) {
tmpPal[4 * GAME_COLOURS + i * 4] = (_top16Colours[i * 3] << 2) + (_top16Colours[i * 3] >> 4);
tmpPal[4 * GAME_COLOURS + i * 4 + 1] = (_top16Colours[i * 3 + 1] << 2) + (_top16Colours[i * 3 + 1] >> 4);
tmpPal[4 * GAME_COLOURS + i * 4 + 2] = (_top16Colours[i * 3 + 2] << 2) + (_top16Colours[i * 3 + 2] >> 4);
- tmpPal[4 * GAME_COLOURS + i * 4 + 3] = 0x00;
+ tmpPal[4 * GAME_COLOURS + i * 4 + 3] = 0x00;
}
//set the palette
@@ -94,7 +94,7 @@ Screen::~Screen(void) {
}
void Screen::clearScreen(void) {
-
+
memset(_currentScreen, 0, FULL_SCREEN_WIDTH * FULL_SCREEN_HEIGHT);
_system->copyRectToScreen(_currentScreen, GAME_SCREEN_WIDTH, 0, 0, GAME_SCREEN_WIDTH, GAME_SCREEN_HEIGHT);
_system->updateScreen();
@@ -102,7 +102,7 @@ void Screen::clearScreen(void) {
//set a new palette, pal is a pointer to dos vga rgb components 0..63
void Screen::setPalette(uint8 *pal) {
-
+
convertPalette(pal, _palette);
_system->setPalette(_palette, 0, GAME_COLOURS);
_system->updateScreen();
@@ -149,7 +149,7 @@ void Screen::showScreen(uint16 fileNum) {
if (_currentScreen)
free(_currentScreen);
_currentScreen = _skyDisk->loadFile(fileNum);
-
+
if (_currentScreen)
showScreen(_currentScreen);
else
@@ -300,7 +300,7 @@ void Screen::paletteFadeUp(uint16 fileNr) {
void Screen::paletteFadeUp(uint8 *pal) {
byte tmpPal[1024];
-
+
convertPalette(pal, tmpPal);
uint32 delayTime = _system->getMillis();
@@ -317,7 +317,7 @@ void Screen::paletteFadeUp(uint8 *pal) {
if (waitTime < 0)
waitTime = 0;
_system->delayMillis((uint)waitTime);
- }
+ }
}
void Screen::fnFadeUp(uint32 palNum, uint32 scroll) {
@@ -522,7 +522,7 @@ void Screen::spriteEngine(void) {
doSprites(BACK);
sortSprites();
- doSprites(FORE);
+ doSprites(FORE);
}
void Screen::sortSprites(void) {
@@ -550,7 +550,7 @@ void Screen::sortSprites(void) {
Compact *spriteComp = _skyCompact->fetchCpt(drawListData[0]);
if ((spriteComp->status & 4) && // is it sortable playfield?(!?!)
(spriteComp->screen == Logic::_scriptVariables[SCREEN])) { // on current screen
- dataFileHeader *spriteData =
+ dataFileHeader *spriteData =
(dataFileHeader *)SkyEngine::fetchItem(spriteComp->frame >> 6);
if (!spriteData) {
debug(9,"Missing file %d", spriteComp->frame >> 6);
@@ -564,7 +564,7 @@ void Screen::sortSprites(void) {
}
drawListData++;
}
- }
+ }
} while (nextDrawList);
// made_list:
if (spriteCnt > 1) { // bubble sort
@@ -612,7 +612,7 @@ void Screen::doSprites(uint8 layer) {
// not_new_list
Compact *spriteData = _skyCompact->fetchCpt(drawList[0]);
drawList++;
- if ((spriteData->status & (1 << layer)) &&
+ if ((spriteData->status & (1 << layer)) &&
(spriteData->screen == Logic::_scriptVariables[SCREEN])) {
uint8 *toBeDrawn = (uint8 *)SkyEngine::fetchItem(spriteData->frame >> 6);
if (!toBeDrawn) {
@@ -703,7 +703,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) {
_sprWidth = 0;
return ;
}
-
+
for (uint16 cnty = 0; cnty < _sprHeight; cnty++) {
for (uint16 cntx = 0; cntx < _sprWidth; cntx++)
if (spriteData[cntx + _maskX1])
@@ -714,7 +714,7 @@ void Screen::drawSprite(uint8 *spriteInfo, Compact *sprCompact) {
// Convert the sprite coordinate/size values to blocks for vertical mask and/or vector to game
_sprWidth += _sprX + GRID_W-1;
_sprHeight += _sprY + GRID_H-1;
-
+
_sprX >>= GRID_W_SHIFT;
_sprWidth >>= GRID_W_SHIFT;
_sprY >>= GRID_H_SHIFT;
@@ -802,7 +802,7 @@ void Screen::showGrid(uint8 *gridBuf) {
uint32 gridData = 0;
uint8 bitsLeft = 0;
- for (uint16 cnty = 0; cnty < GAME_SCREEN_HEIGHT >> 3; cnty++) {
+ for (uint16 cnty = 0; cnty < GAME_SCREEN_HEIGHT >> 3; cnty++) {
for (uint16 cntx = 0; cntx < GAME_SCREEN_WIDTH >> 3; cntx++) {
if (!bitsLeft) {
bitsLeft = 32;
diff --git a/sky/screen.h b/sky/screen.h
index 5ad5db860b..1125779da4 100644
--- a/sky/screen.h
+++ b/sky/screen.h
@@ -62,7 +62,7 @@ public:
void showScreen(uint16 fileNum);
void showScreen(uint8 *pScreen);
-
+
void handleTimer(void);
void startSequence(uint16 fileNum);
void startSequenceItem(uint16 itemNum);
@@ -116,7 +116,7 @@ private:
//- more regular screen.asm + layer.asm routines
void convertPalette(uint8 *inPal, uint8* outPal);
void palette_fadedown_helper(uint32 *pal, uint num);
-
+
//- sprite.asm routines
// fixme: get rid of these globals
uint32 _sprWidth, _sprHeight, _sprX, _sprY, _maskX1, _maskX2;
diff --git a/sky/sky.cpp b/sky/sky.cpp
index 29bc9e5c69..06fb8e54d9 100644
--- a/sky/sky.cpp
+++ b/sky/sky.cpp
@@ -65,7 +65,7 @@ extern bool isSmartphone(void);
promise. But then they did look closer and see'th the aweful truth;
it's code was assembly and messy (rareth was its comments). And so large
were it's includes that did at first seem small; queereth also was its
- compact(s). Then they did findeth another version, and this was slightly
+ compact(s). Then they did findeth another version, and this was slightly
different from the first. Then a third, and this was different again.
All different, but not really better, for all were not really compatible.
But, eventually, it did come to pass that Steel Sky was implemented on
@@ -149,7 +149,7 @@ void SkyEngine::errorString(const char *buf1, char *buf2) {
}
void SkyEngine::initVirgin() {
-
+
_skyScreen->setPalette(60111);
_skyScreen->showScreen(60110);
}
@@ -212,7 +212,7 @@ int SkyEngine::go() {
if (ConfMan.hasKey("save_slot") && ConfMan.getInt("save_slot") >= 0)
result = _skyControl->quickXRestore(ConfMan.getInt("save_slot"));
- if (result != GAME_RESTORED) {
+ if (result != GAME_RESTORED) {
bool introSkipped = false;
if (_systemVars.gameVersion > 267) {// don't do intro for floppydemos
_skyIntro = new Intro(_skyDisk, _skyScreen, _skyMusic, _skySound, _skyText, _mixer, _system);
@@ -229,13 +229,13 @@ int SkyEngine::go() {
if (introSkipped)
_skyControl->restartGame();
}
-
+
_lastSaveTime = _system->getMillis();
while (1) {
if (_debugger->isAttached())
_debugger->onFrame();
-
+
int32 frameTime = (int32)_system->getMillis();
if (_system->getMillis() - _lastSaveTime > 5 * 60 * 1000) {
@@ -249,7 +249,7 @@ int SkyEngine::go() {
_skyMouse->mouseEngine((uint16)_mouseX, (uint16)_mouseY);
handleKey();
while (_systemVars.paused) {
- _system->updateScreen();
+ _system->updateScreen();
delay(300);
handleKey();
}
@@ -270,7 +270,7 @@ int SkyEngine::go() {
else
delay((frameTime + _systemVars.gameSpeed) - _system->getMillis());
}
-
+
return 0;
}
@@ -289,7 +289,7 @@ int SkyEngine::init(GameDetector &detector) {
_skyDisk = new Disk(_gameDataPath);
_skySound = new Sound(_mixer, _skyDisk, ConfMan.getInt("sfx_volume"));
-
+
_systemVars.gameVersion = _skyDisk->determineGameVersion();
int midiDriver = MidiDriver::detectMusicDriver(MDT_ADLIB | MDT_NATIVE | MDT_PREFER_NATIVE);
@@ -330,7 +330,7 @@ int SkyEngine::init(GameDetector &detector) {
loadFixedItems();
_skyLogic = new Logic(_skyCompact, _skyScreen, _skyDisk, _skyText, _skyMusic, _skyMouse, _skySound);
_skyMouse->useLogicInstance(_skyLogic);
-
+
// initialize timer *after* _skyScreen has been initialized.
_timer->installTimerProc(&timerHandler, 1000000 / 50, this); //call 50 times per second
@@ -385,7 +385,7 @@ int SkyEngine::init(GameDetector &detector) {
}
void SkyEngine::initItemList() {
-
+
//See List.asm for (cryptic) item # descriptions
for (int i = 0; i < 300; i++)
@@ -396,7 +396,7 @@ void SkyEngine::initItemList() {
// leave these as NULL.
/*_itemList[119] = (void **)SkyCompact::data_0; // Compacts - Section 0
_itemList[120] = (void **)SkyCompact::data_1; // Compacts - Section 1
-
+
if (isDemo()) {
_itemList[121] = _itemList[122] = _itemList[123] = _itemList[124] = _itemList[125] = (void **)SkyCompact::data_0;
} else {
@@ -425,7 +425,7 @@ void SkyEngine::loadFixedItems(void) {
_itemList[269] = _skyDisk->loadFile(269);
_itemList[271] = _skyDisk->loadFile(271);
_itemList[272] = _skyDisk->loadFile(272);
- }
+ }
}
void *SkyEngine::fetchItem(uint32 num) {
diff --git a/sky/sky.h b/sky/sky.h
index 8572cd3266..eebf9d9b85 100644
--- a/sky/sky.h
+++ b/sky/sky.h
@@ -72,10 +72,10 @@ protected:
Control *_skyControl;
SkyCompact *_skyCompact;
Debugger *_debugger;
-
+
MusicBase *_skyMusic;
Intro *_skyIntro;
-
+
public:
SkyEngine(GameDetector *detector, OSystem *syst);
virtual ~SkyEngine();
diff --git a/sky/sound.cpp b/sky/sound.cpp
index 7712969e76..59c2a2033c 100644
--- a/sky/sound.cpp
+++ b/sky/sound.cpp
@@ -1036,9 +1036,9 @@ void Sound::playSound(uint32 id, byte *sound, uint32 size, Audio::SoundHandle *h
byte flags = 0;
flags |= Audio::Mixer::FLAG_UNSIGNED|Audio::Mixer::FLAG_AUTOFREE;
size -= sizeof(struct dataFileHeader);
- byte *buffer = (byte *)malloc(size);
- memcpy(buffer, sound+sizeof(struct dataFileHeader), size);
-
+ byte *buffer = (byte *)malloc(size);
+ memcpy(buffer, sound+sizeof(struct dataFileHeader), size);
+
_mixer->stopID(id);
_mixer->playRaw(handle, buffer, size, 11025, flags, id);
}
@@ -1087,7 +1087,7 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) {
warning("Sound::playSound(%04X, %04X) called with a section having been loaded", sound, volume);
return;
}
-
+
if (sound > _soundsTotal) {
debug(5, "Sound::playSound %d ignored, only %d sfx in file", sound, _soundsTotal);
return ;
@@ -1095,7 +1095,7 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) {
volume = ((volume & 0x7F) + 1) << 1;
sound &= 0xFF;
-
+
// note: all those tables are big endian. Don't ask me why. *sigh*
uint16 sampleRate = (_sampleRates[sound << 2] << 8) | _sampleRates[(sound << 2) | 1];
if (sampleRate > 11025)
@@ -1113,7 +1113,7 @@ void Sound::playSound(uint16 sound, uint16 volume, uint8 channel) {
loopEnd = dataSize;
flags |= Audio::Mixer::FLAG_LOOP;
}
-
+
if (channel == 0)
_mixer->playRaw(&_ingameSound0, _soundData + dataOfs, dataSize, sampleRate, flags, SOUND_CH0, volume, 0, loopSta, loopEnd);
else
@@ -1139,7 +1139,7 @@ void Sound::fnStartFx(uint32 sound, uint8 channel) {
if (roomList[i].room != 0xff) // if room list empty then do all rooms
while (roomList[i].room != screen) { // check rooms
i++;
- if (roomList[i].room == 0xff)
+ if (roomList[i].room == 0xff)
return;
}
@@ -1184,7 +1184,7 @@ void Sound::checkFxQueue(void) {
}
void Sound::restoreSfx(void) {
-
+
// queue sfx, so they will be started when the player exits the control panel
memset(_sfxQueue, 0, sizeof(_sfxQueue));
uint8 queueSlot = 0;
@@ -1218,7 +1218,7 @@ bool Sound::startSpeech(uint16 textNum) {
if (!(SkyEngine::_systemVars.systemFlags & SF_ALLOW_SPEECH))
return false;
uint16 speechFileNum = _speechConvertTable[textNum >> 12] + (textNum & 0xFFF);
-
+
uint8 *speechData = _skyDisk->loadFile(speechFileNum + 50000);
if (!speechData) {
debug(9,"File %d (speechFile %d from section %d) wasn't found", speechFileNum + 50000, textNum & 0xFFF, textNum >> 12);
diff --git a/sky/struc.h b/sky/struc.h
index a740e111dc..342af98726 100644
--- a/sky/struc.h
+++ b/sky/struc.h
@@ -30,7 +30,7 @@ struct lowTextManager_t {
};
struct displayText_t {
- byte *textData;
+ byte *textData;
uint32 textWidth;
};
@@ -113,7 +113,7 @@ struct Compact {
uint16 flag; // 21: a use any time flag
uint16 mood; // 22: high level - stood or not
-
+
uint16 grafixProgId; // 23
uint16 grafixProgPos;// 24
@@ -159,9 +159,9 @@ struct Compact {
uint16 megaSet; // 54
MegaSet megaSet0; // 55
- MegaSet megaSet1; //
- MegaSet megaSet2; //
- MegaSet megaSet3; //
+ MegaSet megaSet1; //
+ MegaSet megaSet2; //
+ MegaSet megaSet3; //
} GCC_PACK;
#if !defined(__GNUC__)
diff --git a/sky/text.cpp b/sky/text.cpp
index 7e1f2582e1..dcc9165755 100644
--- a/sky/text.cpp
+++ b/sky/text.cpp
@@ -33,7 +33,7 @@ namespace Sky {
#define FIRST_TEXT_BUFFER 274
#define NO_OF_TEXT_SECTIONS 8 // 8 sections per language
#define CHAR_SET_FILE 60150
-#define MAX_SPEECH_SECTION 7
+#define MAX_SPEECH_SECTION 7
#define CHAR_SET_HEADER 128
#define MAX_NO_LINES 10
@@ -46,7 +46,7 @@ Text::Text(Disk *skyDisk, SkyCompact *skyCompact) {
_mainCharacterSet.addr = _skyDisk->loadFile(CHAR_SET_FILE);
_mainCharacterSet.charHeight = MAIN_CHAR_HEIGHT;
_mainCharacterSet.charSpacing = 0;
-
+
fnSetFont(0);
if (!SkyEngine::isDemo()) {
@@ -268,7 +268,7 @@ void Text::patchLINCCharset() {
}
}
-void Text::fnSetFont(uint32 fontNr) {
+void Text::fnSetFont(uint32 fontNr) {
struct charSet *newCharSet;
@@ -313,41 +313,41 @@ void Text::getText(uint32 textNr) { //load text #"textNr" into textBuffer
if (SkyEngine::_itemList[FIRST_TEXT_SEC + sectionNo] == (void **)NULL) { //check if already loaded
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);
}
_textItemPtr = (uint8 *)SkyEngine::_itemList[FIRST_TEXT_SEC + sectionNo];
- uint32 offset = 0;
+ uint32 offset = 0;
uint32 nr32MsgBlocks = (textNr & 0x0fe0);
- uint32 skipBytes;
+ uint32 skipBytes;
byte *blockPtr;
- bool bitSeven;
+ bool bitSeven;
- if (nr32MsgBlocks) {
+ if (nr32MsgBlocks) {
blockPtr = (byte *)(_textItemPtr + 4);
nr32MsgBlocks >>= 5;
do {
offset += READ_LE_UINT16(blockPtr);
blockPtr += 2;
- } while (--nr32MsgBlocks);
+ } while (--nr32MsgBlocks);
}
- uint32 remItems = textNr;
+ uint32 remItems = textNr;
textNr &= 0x1f;
if (textNr) {
-
+
remItems &= 0x0fe0;
remItems += READ_LE_UINT16(_textItemPtr);
- blockPtr = _textItemPtr + remItems;
+ blockPtr = _textItemPtr + remItems;
do {
skipBytes = *blockPtr++;
bitSeven = (bool)((skipBytes >> (7)) & 0x1);
skipBytes &= ~(1UL << 7);
- if (bitSeven)
+ if (bitSeven)
skipBytes <<= 3;
offset += skipBytes;
@@ -357,23 +357,23 @@ void Text::getText(uint32 textNr) { //load text #"textNr" into textBuffer
uint32 numBits = offset;
offset >>= 2;
- offset += READ_LE_UINT16(_textItemPtr + 2);
+ offset += READ_LE_UINT16(_textItemPtr + 2);
_textItemPtr += offset;
//bit pointer: 0->8, 1->6, 2->4 ...
numBits &= 3;
- numBits ^= 3;
+ numBits ^= 3;
numBits++;
numBits <<= 1;
_inputValue = *_textItemPtr++;
char *dest = (char *)_textBuffer;
char textChar;
- _shiftBits = (uint8) numBits;
+ _shiftBits = (uint8) numBits;
do {
textChar = getTextChar();
- *dest++ = textChar;
+ *dest++ = textChar;
} while (textChar);
}
@@ -409,8 +409,8 @@ bool Text::getTBit() {
} else {
_inputValue = *_textItemPtr++;
_shiftBits = 7;
- }
-
+ }
+
return (bool)(((_inputValue) >> (_shiftBits)) & 1);
}
@@ -427,10 +427,10 @@ displayText_t Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
char *curPos = textPtr;
char *lastSpace = curPos;
byte *centerTblPtr = _centreTable;
- uint16 lineWidth = 0;
+ uint16 lineWidth = 0;
_dtCol = color;
- _dtLineWidth = pixelWidth;
+ _dtLineWidth = pixelWidth;
_dtLines = 0;
_dtLetters = 1;
_dtData = dest;
@@ -451,7 +451,7 @@ displayText_t Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
tmpPtr = strstr(textPtr, "MANIFESTACION-ARTISTICA.");
if (tmpPtr)
strcpy(tmpPtr, "MANIFESTACION ARTISTICA.");
-
+
while (textChar >= 0x20) {
if ((_curCharSet == 1) && (textChar >= 0x80))
textChar = 0x20;
@@ -489,12 +489,12 @@ displayText_t Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
error("Maximum no. of lines exceeded!");
_dtLineSize = pixelWidth * _charHeight;
- uint32 numBytes = (_dtLineSize * _dtLines) + sizeof(struct dataFileHeader) + 4;
+ uint32 numBytes = (_dtLineSize * _dtLines) + sizeof(struct dataFileHeader) + 4;
if (_dtData == NULL)
_dtData = (byte *)malloc(numBytes);
- uint8 *curDest = _dtData;
+ uint8 *curDest = _dtData;
uint32 bytesToClear = numBytes; //no of bytes to clear
bytesToClear -= sizeof(struct dataFileHeader); //don't touch the header.
@@ -518,7 +518,7 @@ displayText_t Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
do {
if (_dtCentre) {
- uint32 width = (_dtLineWidth - READ_LE_UINT32(centerTblPtr)) >> 1;
+ uint32 width = (_dtLineWidth - READ_LE_UINT32(centerTblPtr)) >> 1;
centerTblPtr += 4;
curDest += width;
}
@@ -535,15 +535,15 @@ displayText_t Text::displayText(char *textPtr, uint8 *dest, bool centre, uint16
struct displayText_t ret;
ret.textData = _dtData;
- ret.textWidth = _dtLastWidth;
+ ret.textWidth = _dtLastWidth;
return ret;
}
void Text::makeGameCharacter(uint8 textChar, uint8 *charSetPtr, uint8 *&dest, uint8 color) {
- bool maskBit, dataBit;
+ bool maskBit, dataBit;
uint8 charWidth = (uint8)((*(charSetPtr + textChar)) + 1 - _dtCharSpacing);
- uint16 data, mask;
+ uint16 data, mask;
byte *charSpritePtr = charSetPtr + (CHAR_SET_HEADER + ((_charHeight << 2) * textChar));
byte *startPos = dest;
byte *curPos = startPos;
@@ -555,19 +555,19 @@ void Text::makeGameCharacter(uint8 textChar, uint8 *charSetPtr, uint8 *&dest, ui
data = READ_BE_UINT16(charSpritePtr);
mask = READ_BE_UINT16(charSpritePtr + 2);
charSpritePtr += 4;
-
+
for (int j = 0; j < charWidth; j++) {
-
+
maskBit = (mask & 0x8000) != 0; //check mask
mask <<= 1;
dataBit = (data & 0x8000) != 0; //check data
data <<= 1;
- if (maskBit)
- if (dataBit)
+ if (maskBit)
+ if (dataBit)
*curPos = color;
else
- *curPos = 240; //black edge
+ *curPos = 240; //black edge
curPos++;
}
@@ -577,7 +577,7 @@ void Text::makeGameCharacter(uint8 textChar, uint8 *charSetPtr, uint8 *&dest, ui
}
//update position
- dest = startPos + charWidth + _dtCharSpacing * 2 - 1;
+ dest = startPos + charWidth + _dtCharSpacing * 2 - 1;
}
@@ -594,7 +594,7 @@ lowTextManager_t Text::lowTextManager(uint32 textNum, uint16 width, uint16 logic
Compact *cpt = _skyCompact->fetchCpt(compactNum);
- while (cpt->status != 0) {
+ while (cpt->status != 0) {
compactNum++;
cpt = _skyCompact->fetchCpt(compactNum);
}
@@ -602,12 +602,12 @@ lowTextManager_t Text::lowTextManager(uint32 textNum, uint16 width, uint16 logic
cpt->flag = (uint16)(compactNum - FIRST_TEXT_COMPACT) + FIRST_TEXT_BUFFER;
byte *oldText = (byte *)SkyEngine::_itemList[cpt->flag];
- SkyEngine::_itemList[cpt->flag] = (void **)textData;
+ SkyEngine::_itemList[cpt->flag] = (void **)textData;
if (oldText != NULL)
free (oldText);
- cpt->logic = logicNum;
+ cpt->logic = logicNum;
cpt->status = ST_LOGIC | ST_FOREGROUND | ST_RECREATE;
cpt->screen = (uint16) Logic::_scriptVariables[SCREEN];
@@ -681,7 +681,7 @@ bool Text::patchMessage(uint32 textNum) {
if (_patchedMessages[cnt + patchIdx].textNr == textNum) {
strcpy(_textBuffer, _patchedMessages[cnt + patchIdx].text);
return true;
- }
+ }
}
return false;
}
@@ -689,7 +689,7 @@ bool Text::patchMessage(uint32 textNum) {
const PatchMessage Text::_patchedMessages[NUM_PATCH_MSG] = {
{ 28724, "Testo e Parlato" }, // - italian
{ 28707, "Solo Testo" },
- { 28693, "Solo Parlato" },
+ { 28693, "Solo Parlato" },
{ 28724, "Text och tal" }, // - swedish
{ 28707, "Endast text" },
{ 28693, "Endast tal" },