aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra
diff options
context:
space:
mode:
authorEugene Sandulenko2009-01-01 15:06:43 +0000
committerEugene Sandulenko2009-01-01 15:06:43 +0000
commit696897b0583ad52ebc6f7666525277847619a8ce (patch)
tree5ac2be2991e94dce32c5bb7fdb0dcc4188221503 /engines/kyra
parent05d3633eb32ead8e11435b85a9db1ddaa1482fcb (diff)
downloadscummvm-rg350-696897b0583ad52ebc6f7666525277847619a8ce.tar.gz
scummvm-rg350-696897b0583ad52ebc6f7666525277847619a8ce.tar.bz2
scummvm-rg350-696897b0583ad52ebc6f7666525277847619a8ce.zip
Whoa! Removing trailing spaces.
svn-id: r35648
Diffstat (limited to 'engines/kyra')
-rw-r--r--engines/kyra/animator_hof.cpp4
-rw-r--r--engines/kyra/animator_mr.cpp4
-rw-r--r--engines/kyra/debugger.cpp4
-rw-r--r--engines/kyra/detection.cpp30
-rw-r--r--engines/kyra/gui.cpp4
-rw-r--r--engines/kyra/gui_hof.cpp24
-rw-r--r--engines/kyra/gui_lok.cpp2
-rw-r--r--engines/kyra/gui_mr.cpp32
-rw-r--r--engines/kyra/gui_v2.cpp12
-rw-r--r--engines/kyra/gui_v2.h2
-rw-r--r--engines/kyra/items_mr.cpp12
-rw-r--r--engines/kyra/kyra_hof.cpp18
-rw-r--r--engines/kyra/kyra_hof.h4
-rw-r--r--engines/kyra/kyra_mr.cpp20
-rw-r--r--engines/kyra/kyra_mr.h8
-rw-r--r--engines/kyra/kyra_v1.cpp6
-rw-r--r--engines/kyra/kyra_v1.h2
-rw-r--r--engines/kyra/kyra_v2.cpp2
-rw-r--r--engines/kyra/kyra_v2.h2
-rw-r--r--engines/kyra/lol.cpp106
-rw-r--r--engines/kyra/lol.h24
-rw-r--r--engines/kyra/resource.cpp2
-rw-r--r--engines/kyra/resource_intern.cpp52
-rw-r--r--engines/kyra/saveload.cpp2
-rw-r--r--engines/kyra/saveload_hof.cpp6
-rw-r--r--engines/kyra/saveload_lok.cpp6
-rw-r--r--engines/kyra/saveload_mr.cpp4
-rw-r--r--engines/kyra/scene_hof.cpp4
-rw-r--r--engines/kyra/scene_mr.cpp2
-rw-r--r--engines/kyra/screen.cpp34
-rw-r--r--engines/kyra/screen.h4
-rw-r--r--engines/kyra/screen_lok.h2
-rw-r--r--engines/kyra/screen_lol.cpp4
-rw-r--r--engines/kyra/screen_lol.h2
-rw-r--r--engines/kyra/screen_v2.cpp8
-rw-r--r--engines/kyra/screen_v2.h4
-rw-r--r--engines/kyra/script_hof.cpp32
-rw-r--r--engines/kyra/script_lok.cpp2
-rw-r--r--engines/kyra/script_mr.cpp10
-rw-r--r--engines/kyra/script_tim.cpp38
-rw-r--r--engines/kyra/script_tim.h16
-rw-r--r--engines/kyra/sequences_hof.cpp28
-rw-r--r--engines/kyra/sequences_mr.cpp6
-rw-r--r--engines/kyra/sound.h6
-rw-r--r--engines/kyra/sound_adlib.cpp2
-rw-r--r--engines/kyra/sound_digital.cpp8
-rw-r--r--engines/kyra/sound_midi.cpp10
-rw-r--r--engines/kyra/sound_towns.cpp66
-rw-r--r--engines/kyra/staticres.cpp22
-rw-r--r--engines/kyra/text_mr.cpp22
-rw-r--r--engines/kyra/timer.cpp2
-rw-r--r--engines/kyra/vqa.cpp2
-rw-r--r--engines/kyra/wsamovie.cpp2
53 files changed, 366 insertions, 366 deletions
diff --git a/engines/kyra/animator_hof.cpp b/engines/kyra/animator_hof.cpp
index c5d44d10af..5cc44f1b38 100644
--- a/engines/kyra/animator_hof.cpp
+++ b/engines/kyra/animator_hof.cpp
@@ -124,10 +124,10 @@ void KyraEngine_HoF::updateItemAnimations() {
bool nextFrame = false;
if (_itemAnimData[0].itemIndex == -1 || _inventorySaved)
- return;
+ return;
const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem];
- ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
+ ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
_nextAnimItem = ++_nextAnimItem % _itemAnimDataSize;
uint32 ctime = _system->getMillis();
diff --git a/engines/kyra/animator_mr.cpp b/engines/kyra/animator_mr.cpp
index 9702499fe7..5a26f9bcfd 100644
--- a/engines/kyra/animator_mr.cpp
+++ b/engines/kyra/animator_mr.cpp
@@ -201,7 +201,7 @@ void KyraEngine_MR::updateItemAnimations() {
bool nextFrame = false;
if (_itemAnimData[0].itemIndex == -1)
- return;
+ return;
const ItemAnimData_v2 *s = &_itemAnimData[_nextAnimItem];
ActiveItemAnim *a = &_activeItemAnim[_nextAnimItem];
@@ -438,7 +438,7 @@ void KyraEngine_MR::setCharacterAnimDim(int w, int h) {
_charBackUpWidth2 = _animObjects[0].width2;
_charBackUpHeight = _animObjects[0].height;
_charBackUpHeight2 = _animObjects[0].height2;
-
+
_animObjects[0].width2 = (w - _charBackUpWidth) / 2;
_animObjects[0].height2 = h - _charBackUpHeight;
_animObjects[0].width = w;
diff --git a/engines/kyra/debugger.cpp b/engines/kyra/debugger.cpp
index 7ae5414d82..94238f31b8 100644
--- a/engines/kyra/debugger.cpp
+++ b/engines/kyra/debugger.cpp
@@ -449,8 +449,8 @@ bool Debugger_HoF::cmd_passcodes(int argc, const char **argv) {
DebugPrintf("value must be either 1 (on) or 0 (off)\n");
return true;
}
-
- _vm->_dbgPass = val;
+
+ _vm->_dbgPass = val;
} else {
DebugPrintf("Syntax: pass_codes <0/1>\n");
}
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 6902c03a81..d0a73800e6 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -478,7 +478,7 @@ const KYRAGameDescription adGameDescs[] = {
KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
- {
+ {
{
"kyra2",
"CD",
@@ -490,7 +490,7 @@ const KYRAGameDescription adGameDescs[] = {
KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
- {
+ {
{
"kyra2",
"CD",
@@ -502,7 +502,7 @@ const KYRAGameDescription adGameDescs[] = {
KYRA2_CD_FAN_FLAGS(Common::IT_ITA, Common::EN_ANY)
},
- {
+ {
{
"kyra2",
"CD",
@@ -608,9 +608,9 @@ const KYRAGameDescription adGameDescs[] = {
},
// Kyra3
-
+
// non installed version
- {
+ {
{
"kyra3",
0,
@@ -657,7 +657,7 @@ const KYRAGameDescription adGameDescs[] = {
},
// installed version
- {
+ {
{
"kyra3",
0,
@@ -704,7 +704,7 @@ const KYRAGameDescription adGameDescs[] = {
},
// Mac version
- {
+ {
{
"kyra3",
0,
@@ -843,7 +843,7 @@ const KYRAGameDescription adGameDescs[] = {
},
KYRA3_CD_FAN_FLAGS(Common::IT_ITA, Common::FR_FRA)
},
-
+
// Lands of Lore CD
{
{
@@ -860,7 +860,7 @@ const KYRAGameDescription adGameDescs[] = {
},
LOL_CD_FLAGS
},
-
+
{
{
"lol",
@@ -876,7 +876,7 @@ const KYRAGameDescription adGameDescs[] = {
},
LOL_CD_FLAGS
},
-
+
{
{
"lol",
@@ -908,7 +908,7 @@ const KYRAGameDescription adGameDescs[] = {
},
LOL_CD_FLAGS
},
-
+
{
{
"lol",
@@ -924,7 +924,7 @@ const KYRAGameDescription adGameDescs[] = {
},
LOL_CD_FLAGS
},
-
+
{
{
"lol",
@@ -1144,7 +1144,7 @@ SaveStateList KyraMetaEngine::listSaves(const char *target) const {
for (Common::StringList::const_iterator file = filenames.begin(); file != filenames.end(); file++) {
// Obtain the last 3 digits of the filename, since they correspond to the save slot
int slotNum = atoi(file->c_str() + file->size() - 3);
-
+
if (slotNum >= 0 && slotNum <= 999) {
Common::InSaveFile *in = saveFileMan->openForLoading(file->c_str());
if (in) {
@@ -1184,7 +1184,7 @@ SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int s
error = Kyra::KyraEngine_v1::readSaveHeader(in, true, header);
delete in;
-
+
if (error == Kyra::KyraEngine_v1::kRSHENoError) {
SaveStateDescriptor desc(slot, header.description);
@@ -1195,7 +1195,7 @@ SaveStateDescriptor KyraMetaEngine::querySaveMetaInfos(const char *target, int s
return desc;
}
}
-
+
return SaveStateDescriptor();
}
diff --git a/engines/kyra/gui.cpp b/engines/kyra/gui.cpp
index 7ec667dfe3..a0ce40f491 100644
--- a/engines/kyra/gui.cpp
+++ b/engines/kyra/gui.cpp
@@ -153,7 +153,7 @@ void GUI::initMenu(Menu &menu) {
scrollUpButton->buttonCallback = getScrollUpButtonHandler();
scrollUpButton->nextButton = 0;
scrollUpButton->mouseWheel = -1;
-
+
_menuButtonList = addButtonToList(_menuButtonList, scrollUpButton);
updateMenuButton(scrollUpButton);
@@ -348,7 +348,7 @@ void GUI::checkTextfieldInput() {
if (event.kbd.keycode == 'q' && event.kbd.flags == Common::KBD_CTRL)
_vm->quitGame();
else
- _keyPressed = event.kbd;
+ _keyPressed = event.kbd;
running = false;
break;
diff --git a/engines/kyra/gui_hof.cpp b/engines/kyra/gui_hof.cpp
index c134745956..7930dbf2a0 100644
--- a/engines/kyra/gui_hof.cpp
+++ b/engines/kyra/gui_hof.cpp
@@ -320,7 +320,7 @@ void KyraEngine_HoF::scrollInventoryWheel() {
int KyraEngine_HoF::bookButton(Button *button) {
if (!queryGameFlag(1)) {
- objectChat(getTableString(0xEB, _cCodeBuffer, 1), 0, 0x83, 0xEB);
+ objectChat(getTableString(0xEB, _cCodeBuffer, 1), 0, 0x83, 0xEB);
return 0;
}
@@ -418,7 +418,7 @@ void KyraEngine_HoF::loadBookBkgd() {
strcpy(filename, (_bookBkgd == 0) ? "_BOOKD.CPS" : "_BOOKC.CPS");
_bookBkgd ^= 1;
-
+
if (_flags.isTalkie) {
if (!_bookCurPage)
strcpy(filename, "_XBOOKB.CPS");
@@ -475,7 +475,7 @@ void KyraEngine_HoF::showBookPage() {
rightPage = _res->fileData(filename, 0);
}
}
-
+
int rightPageY = _bookPageYOffset[_bookCurPage+1];
_screen->hideMouse();
@@ -508,7 +508,7 @@ void KyraEngine_HoF::bookLoop() {
bookButtons[4].buttonCallback = BUTTON_FUNCTOR(KyraEngine_HoF, this, &KyraEngine_HoF::bookNextPage);
Button *buttonList = 0;
-
+
for (uint i = 0; i < ARRAYSIZE(bookButtons); ++i)
buttonList = _gui->addButtonToList(buttonList, &bookButtons[i]);
@@ -539,7 +539,7 @@ void KyraEngine_HoF::bookDecodeText(uint8 *str) {
while (*op != 0x1A) {
while (*op != 0x1A && *op != 0x0D)
*dst++ = *op++;
-
+
if (*op == 0x1A)
break;
@@ -619,7 +619,7 @@ int KyraEngine_HoF::cauldronButton(Button *button) {
return 0;
if (queryGameFlag(0xE4)) {
- snd_playSoundEffect(0x0D);
+ snd_playSoundEffect(0x0D);
return 0;
}
@@ -724,7 +724,7 @@ int GUI_HoF::optionsButton(Button *button) {
initMenuLayout(_saveMenu);
initMenuLayout(_savenameMenu);
initMenuLayout(_deathMenu);
-
+
_currentMenu = &_mainMenu;
if (_vm->_menuDirectlyToLoad) {
@@ -732,7 +732,7 @@ int GUI_HoF::optionsButton(Button *button) {
setupPalette();
_loadedSave = false;
-
+
loadMenu(0);
if (_loadedSave) {
@@ -1004,7 +1004,7 @@ int GUI_HoF::gameOptionsTalkie(Button *caller) {
if (_vm->_lang != lang) {
_reloadTemporarySave = true;
-
+
Graphics::Surface thumb;
createScreenThumbnail(thumb);
_vm->saveGameState(999, "Autosave", &thumb);
@@ -1053,7 +1053,7 @@ void GUI_HoF::setupOptionsButtons() {
case 0:
_gameOptions.item[1].itemId = 31;
break;
-
+
case 1:
_gameOptions.item[1].itemId = 32;
break;
@@ -1079,7 +1079,7 @@ int GUI_HoF::sliderHandler(Button *caller) {
assert(button >= 0 && button <= 3);
int oldVolume = 0;
-
+
if (_vm->gameFlags().isTalkie) {
oldVolume = _vm->getVolume(KyraEngine_v1::kVolumeEntry(button));
} else {
@@ -1151,7 +1151,7 @@ int GUI_HoF::sliderHandler(Button *caller) {
_vm->_configTextspeed = newVolume;
}
}
-
+
drawSliderBar(button, _vm->_buttonShapes[17]);
if (playSoundEffect)
_vm->snd_playSoundEffect(0x18);
diff --git a/engines/kyra/gui_lok.cpp b/engines/kyra/gui_lok.cpp
index 6af4841084..665c38115b 100644
--- a/engines/kyra/gui_lok.cpp
+++ b/engines/kyra/gui_lok.cpp
@@ -275,7 +275,7 @@ int GUI_LoK::processButtonList(Button *list, uint16 inputFlag, int8 mouseWheel)
list->flags2 &= 0xFFFE;
processButton(list);
}
-
+
if (list->flags2 & 4) {
list->flags2 &= 0xFFFB;
processButton(list);
diff --git a/engines/kyra/gui_mr.cpp b/engines/kyra/gui_mr.cpp
index e3f250c20e..38b8c5a5a3 100644
--- a/engines/kyra/gui_mr.cpp
+++ b/engines/kyra/gui_mr.cpp
@@ -189,10 +189,10 @@ void KyraEngine_MR::showInventory() {
redrawInventory(30);
drawMalcolmsMoodPointer(-1, 30);
drawScore(30, 215, 191);
-
+
if (queryGameFlag(0x97))
drawJestersStaff(1, 30);
-
+
_screen->hideMouse();
if (_itemInHand < 0) {
@@ -238,7 +238,7 @@ void KyraEngine_MR::showInventory() {
times = 0;
waitTill = _system->getMillis() + _tickLength;
}
-
+
height += _inventoryScrollSpeed;
y -= _inventoryScrollSpeed;
}
@@ -260,10 +260,10 @@ void KyraEngine_MR::hideInventory() {
_inventoryState = false;
updateCLState();
initMainButtonList(true);
-
+
_screen->copyBlockToPage(3, 0, 0, 320, 56, _interface);
_screen->hideMouse();
-
+
restorePage3();
flagAnimObjsForRefresh();
drawAnimObjects();
@@ -306,7 +306,7 @@ void KyraEngine_MR::hideInventory() {
times = 0;
waitTill = _system->getMillis() + _tickLength;
}
-
+
y += _inventoryScrollSpeed;
y2 += _inventoryScrollSpeed;
}
@@ -479,9 +479,9 @@ void KyraEngine_MR::redrawInventory(int page) {
_screen->showMouse();
_screen->_curPage = pageBackUp;
-
+
if (page == 0 || page == 1)
- _screen->updateScreen();
+ _screen->updateScreen();
}
void KyraEngine_MR::clearInventorySlot(int slot, int page) {
@@ -602,7 +602,7 @@ int KyraEngine_MR::buttonMoodChange(Button *button) {
drawMalcolmsMoodText();
updateDlgIndex();
-
+
EMCData data;
EMCState state;
memset(&data, 0, sizeof(data));
@@ -717,7 +717,7 @@ void KyraEngine_MR::showAlbum() {
_album.leftPage.wsa->setX(_albumWSAX[_album.nextPage+0]);
_album.leftPage.wsa->setY(_albumWSAY[_album.nextPage+0]);
_album.leftPage.wsa->setDrawPage(2);
-
+
_album.leftPage.wsa->displayFrame(_album.leftPage.curFrame, 0x4000);
}
if (_album.rightPage.wsa->opened()) {
@@ -865,7 +865,7 @@ void KyraEngine_MR::processAlbum() {
Button *buttonList = 0;
for (int i = 0; i < 5; ++i)
buttonList = _gui->addButtonToList(buttonList, &albumButtons[i]);
-
+
_album.leftPage.timer = _album.rightPage.timer = _system->getMillis();
albumNewPage();
_album.running = true;
@@ -876,7 +876,7 @@ void KyraEngine_MR::processAlbum() {
removeInputTop();
musicUpdate(0);
-
+
if (_album.curPage != _album.nextPage) {
int oldPage = _album.curPage;
_album.curPage = _album.nextPage;
@@ -930,7 +930,7 @@ void KyraEngine_MR::albumNewPage() {
int id = _album.curPage / 2 + 100;
albumChat((const char *)getTableEntry(_album.file, id), 205, id);
-
+
if (id == 107) {
_screen->copyRegion(76, 100, 76, 100, 244, 100, 2, 0, Screen::CR_NO_P_CHECK);
albumChat((const char *)getTableEntry(_album.file, 108), 205, 108);
@@ -1303,7 +1303,7 @@ int GUI_MR::optionsButton(Button *button) {
initMenuLayout(_saveMenu);
initMenuLayout(_savenameMenu);
initMenuLayout(_deathMenu);
-
+
_currentMenu = &_mainMenu;
_vm->musicUpdate(0);
@@ -1312,7 +1312,7 @@ int GUI_MR::optionsButton(Button *button) {
backUpPage1(_vm->_screenBuffer);
_loadedSave = false;
-
+
--_loadMenu.numberOfItems;
loadMenu(0);
++_loadMenu.numberOfItems;
@@ -1503,7 +1503,7 @@ void GUI_MR::setupOptionsButtons() {
case 0:
_gameOptions.item[1].itemId = 31;
break;
-
+
case 1:
_gameOptions.item[1].itemId = 32;
break;
diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp
index 500d816cb9..012a5b901b 100644
--- a/engines/kyra/gui_v2.cpp
+++ b/engines/kyra/gui_v2.cpp
@@ -65,7 +65,7 @@ void GUI_v2::processButton(Button *button) {
}
return;
}
-
+
int entry = button->flags2 & 5;
byte val1 = 0, val2 = 0, val3 = 0;
@@ -365,7 +365,7 @@ int GUI_v2::processButtonList(Button *buttonList, uint16 inputFlag, int8 mouseWh
if ((*buttonList->buttonCallback.get())(buttonList))
break;
}
-
+
if (buttonList->flags & 0x20)
break;
}
@@ -544,7 +544,7 @@ int GUI_v2::toggleWalkspeed(Button *caller) {
int GUI_v2::toggleText(Button *caller) {
updateMenuButton(caller);
-
+
if (_vm->textEnabled()) {
if (_vm->speechEnabled())
_vm->_configVoice = 1;
@@ -636,7 +636,7 @@ int GUI_v2::clickSaveSlot(Button *caller) {
int index = caller->index - _menuButtons[0].index;
assert(index >= 0 && index <= 6);
MenuItem &item = _saveMenu.item[index];
-
+
if (item.saveSlot >= 0) {
if (_isDeleteMenu) {
_slotToDelete = item.saveSlot;
@@ -701,7 +701,7 @@ int GUI_v2::deleteMenu(Button *caller) {
processHighlights(_saveMenu, _vm->_mouseX, _vm->_mouseY);
getInput();
}
-
+
if (_slotToDelete < 1) {
restorePage1(_vm->_screenBuffer);
backUpPage1(_vm->_screenBuffer);
@@ -729,7 +729,7 @@ int GUI_v2::deleteMenu(Button *caller) {
Common::String oldName = _vm->getSavegameFilename(*i);
Common::String newName = _vm->getSavegameFilename(*i-1);
_vm->_saveFileMan->renameSavefile(oldName.c_str(), newName.c_str());
- }
+ }
_saveMenu.menuNameId = _vm->gameFlags().isTalkie ? 9 : 17;
return 0;
}
diff --git a/engines/kyra/gui_v2.h b/engines/kyra/gui_v2.h
index a8e14d8831..3c162c8cc2 100644
--- a/engines/kyra/gui_v2.h
+++ b/engines/kyra/gui_v2.h
@@ -128,7 +128,7 @@ protected:
virtual void restorePalette() {}
virtual char *getTableString(int id) = 0;
-
+
virtual uint8 textFieldColor1() const = 0;
virtual uint8 textFieldColor2() const = 0;
virtual uint8 textFieldColor3() const = 0;
diff --git a/engines/kyra/items_mr.cpp b/engines/kyra/items_mr.cpp
index 299c826e80..f93ecc8d0c 100644
--- a/engines/kyra/items_mr.cpp
+++ b/engines/kyra/items_mr.cpp
@@ -138,7 +138,7 @@ bool KyraEngine_MR::processItemDrop(uint16 sceneId, uint16 item, int x, int y, i
itemPos = -1;
if (itemPos >= 0) {
- exchangeMouseItem(itemPos, 1);
+ exchangeMouseItem(itemPos, 1);
return true;
}
@@ -304,7 +304,7 @@ void KyraEngine_MR::itemDropDown(int startX, int startY, int dstX, int dstY, int
}
restoreGfxRect32x32(x, y);
- }
+ }
}
_itemList[itemSlot].x = dstX;
@@ -439,7 +439,7 @@ bool KyraEngine_MR::itemListMagic(int handItem, int itemSlot) {
} else {
setGameFlag(0x1AE);
}
-
+
_timer->setCountdown(12, 1);
_timer->enable(12);
}
@@ -458,7 +458,7 @@ bool KyraEngine_MR::itemListMagic(int handItem, int itemSlot) {
_screen->hideMouse();
deleteItemAnimEntry(itemSlot);
addItemToAnimList(itemSlot);
-
+
if (newItem == 0xFE)
removeHandItem();
else if (newItem != 0xFF)
@@ -468,7 +468,7 @@ bool KyraEngine_MR::itemListMagic(int handItem, int itemSlot) {
if (_lang != 1)
updateItemCommand(resItem, 3, 0xFF);
- // Unlike the original we give points for when combining with scene items
+ // Unlike the original we give points for when combining with scene items
if (resItem == 7) {
updateScore(35, 100);
delay(60*_tickLength, true);
@@ -519,7 +519,7 @@ bool KyraEngine_MR::itemInventoryMagic(int handItem, int invSlot) {
_screen->hideMouse();
clearInventorySlot(invSlot, 0);
drawInventorySlot(0, resItem, invSlot);
-
+
if (newItem == 0xFE)
removeHandItem();
else if (newItem != 0xFF)
diff --git a/engines/kyra/kyra_hof.cpp b/engines/kyra/kyra_hof.cpp
index 316e341a14..48986f1bda 100644
--- a/engines/kyra/kyra_hof.cpp
+++ b/engines/kyra/kyra_hof.cpp
@@ -97,7 +97,7 @@ KyraEngine_HoF::KyraEngine_HoF(OSystem *system, const GameFlags &flags) : KyraEn
_itemAnimData = 0;
_demoAnimData = 0;
_nextAnimItem = 0;
-
+
for (int i = 0; i < 15; i++)
memset(&_activeItemAnim[i], 0, sizeof(ActiveItemAnim));
@@ -212,7 +212,7 @@ void KyraEngine_HoF::pauseEngineIntern(bool pause) {
}
_nextIdleAnim += pausedTime;
-
+
for (int x = 0; x < _itemAnimDataSize; x++)
_activeItemAnim[x].nextFrame += pausedTime;
@@ -270,7 +270,7 @@ Common::Error KyraEngine_HoF::init() {
for (int i = 0; i < 2; i++)
addShapeToPool(shapes, i, i);
-
+
delete[] shapes;
_screen->setMouseCursor(0, 0, getShapePtr(0));
@@ -284,7 +284,7 @@ Common::Error KyraEngine_HoF::go() {
if (_flags.isDemo && !_flags.isTalkie) {
if (_flags.gameID == GI_LOL)
- seq_playSequences(kSequenceLolDemoScene1, kSequenceLolDemoScene6);
+ seq_playSequences(kSequenceLolDemoScene1, kSequenceLolDemoScene6);
else
seq_playSequences(kSequenceDemoVirgin, kSequenceDemoFisher);
_menuChoice = 4;
@@ -322,7 +322,7 @@ Common::Error KyraEngine_HoF::go() {
if (!shouldQuit())
runLoop();
cleanup();
-
+
if (_showOutro)
seq_playSequences(kSequenceFunters, kSequenceFrash);
}
@@ -1202,7 +1202,7 @@ int KyraEngine_HoF::inputSceneChange(int x, int y, int unk1, int unk2) {
int vocH = _flags.isTalkie ? 131 : -1;
if (_pathfinderFlag) {
- if (findItem(curScene, 13) >= 0 && _unk3 <= -3) {
+ if (findItem(curScene, 13) >= 0 && _unk3 <= -3) {
strId = 252;
} else if (_itemInHand == 72) {
strId = 257;
@@ -1539,7 +1539,7 @@ void KyraEngine_HoF::snd_playSoundEffect(int track, int volume) {
// TODO ?? Maybe there is a way to let users select whether they want
// voc, midi or adl sfx (even though it makes no sense to choose anything but voc).
- // The PC-98 version has support for non-pcm sound effects, but only for tracks
+ // The PC-98 version has support for non-pcm sound effects, but only for tracks
// which also have voc files. The syntax would be:
// KyraEngine_v1::snd_playSoundEffect(vocIndex);
}
@@ -1748,7 +1748,7 @@ void KyraEngine_HoF::cauldronItemAnim(int item) {
}
snd_playSoundEffect(0x17);
-
+
for (int i = 16; i > 0; i -= 2, curY += 2) {
_screen->setNewShapeHeight(shape, i);
restoreGfxRect32x32(x, y);
@@ -1992,7 +1992,7 @@ void KyraEngine_HoF::writeSettings() {
case 3:
_flags.lang = Common::JA_JPN;
break;
-
+
case 0:
default:
_flags.lang = Common::EN_ANY;
diff --git a/engines/kyra/kyra_hof.h b/engines/kyra/kyra_hof.h
index 31dc38b110..b1902103a6 100644
--- a/engines/kyra/kyra_hof.h
+++ b/engines/kyra/kyra_hof.h
@@ -724,7 +724,7 @@ protected:
int o2_displayWsaSequentialFrames(EMCState *script);
int o2_displayWsaSequence(EMCState *script);
int o2_addItemToInventory(EMCState *script);
- int o2_drawShape(EMCState *script);
+ int o2_drawShape(EMCState *script);
int o2_addItemToCurScene(EMCState *script);
int o2_loadSoundFile(EMCState *script);
int o2_removeSlotFromInventory(EMCState *script);
@@ -863,7 +863,7 @@ protected:
const uint16 *_ingameTalkObjIndex;
int _ingameTalkObjIndexSize;
const char *const *_ingameTimJpStr;
- int _ingameTimJpStrSize;
+ int _ingameTimJpStrSize;
const HofSeqData *_sequences;
const ItemAnimData_v2 *_itemAnimData;
int _itemAnimDataSize;
diff --git a/engines/kyra/kyra_mr.cpp b/engines/kyra/kyra_mr.cpp
index 6e5bba3dc0..acc0421a59 100644
--- a/engines/kyra/kyra_mr.cpp
+++ b/engines/kyra/kyra_mr.cpp
@@ -209,7 +209,7 @@ Common::Error KyraEngine_MR::init() {
KyraEngine_v1::init();
initStaticResource();
-
+
_debugger = new Debugger_v2(this);
assert(_debugger);
@@ -229,7 +229,7 @@ Common::Error KyraEngine_MR::init() {
_screen->setFont(Screen::FID_6_FNT);
_screen->setAnimBlockPtr(3500);
_screen->setScreenDim(0);
-
+
_res->loadFileToBuf("PALETTE.COL", _screen->getPalette(0), 768);
_screen->setScreenPalette(_screen->getPalette(0));
@@ -545,7 +545,7 @@ void KyraEngine_MR::playStudioSFX(const char *str) {
void KyraEngine_MR::preinit() {
debugC(9, kDebugLevelMain, "KyraEngine_MR::preinit()");
-
+
_itemBuffer1 = new int8[72];
_itemBuffer2 = new int8[144];
initMouseShapes();
@@ -583,7 +583,7 @@ void KyraEngine_MR::startup() {
_screen->setFont(Screen::FID_6_FNT);
- _stringBuffer = new char[500];
+ _stringBuffer = new char[500];
//XXX
musicUpdate(0);
//XXX
@@ -676,7 +676,7 @@ void KyraEngine_MR::startup() {
assert(_sceneList);
memset(_sceneList, 0, sizeof(SceneDesc)*98);
_sceneListSize = 98;
-
+
musicUpdate(0);
runStartupScript(1, 0);
_res->exists("MOODOMTR.WSA", true);
@@ -1014,7 +1014,7 @@ void KyraEngine_MR::runLoop() {
}
checkAutosave();
-
+
if (_system->getMillis() >= _nextIdleAnim)
showIdleAnim();
@@ -1054,7 +1054,7 @@ void KyraEngine_MR::handleInput(int x, int y) {
}
setNextIdleAnimTimer();
-
+
int skip = 0;
if (checkCharCollision(x, y) && _unk3 >= -1 && runSceneScript2()) {
@@ -1381,7 +1381,7 @@ char *KyraEngine_MR::appendLanguage(char *buf, int lang, int bufSize) {
int KyraEngine_MR::loadLanguageFile(const char *file, uint8 *&buffer) {
debugC(9, kDebugLevelMain, "KyraEngine_MR::loadLanguageFile('%s', %p)", file, (const void*)buffer);
- delete[] buffer;
+ delete[] buffer;
buffer = 0;
uint32 size = 0;
@@ -1487,7 +1487,7 @@ void KyraEngine_MR::scoreIncrease(int count, const char *str) {
drawScore(0, 215, 191);
_screen->updateScreen();
delay(20, true);
-
+
snd_playSoundEffect(0x0E, 0xC8);
drawOld = 0;
}
@@ -1498,7 +1498,7 @@ void KyraEngine_MR::scoreIncrease(int count, const char *str) {
#pragma mark -
void KyraEngine_MR::changeChapter(int newChapter, int sceneId, int malcolmShapes, int facing) {
- debugC(9, kDebugLevelMain, "KyraEngine_MR::changeChapter(%d, %d, %d, %d)", newChapter, sceneId, malcolmShapes, facing);
+ debugC(9, kDebugLevelMain, "KyraEngine_MR::changeChapter(%d, %d, %d, %d)", newChapter, sceneId, malcolmShapes, facing);
resetItemList();
_currentChapter = newChapter;
diff --git a/engines/kyra/kyra_mr.h b/engines/kyra/kyra_mr.h
index a0e0af93b0..6c06a84433 100644
--- a/engines/kyra/kyra_mr.h
+++ b/engines/kyra/kyra_mr.h
@@ -252,7 +252,7 @@ private:
void drawMalcolmsMoodText();
void drawMalcolmsMoodPointer(int frame, int page);
void drawJestersStaff(int type, int page);
-
+
void drawScore(int page, int x, int y);
void drawScoreCounting(int oldScore, int newScore, int drawOld, const int x);
int getScoreX(const char *str);
@@ -494,7 +494,7 @@ private:
// special script code
bool _useFrameTable;
-
+
int o3a_setCharacterFrame(EMCState *script);
// special shape code
@@ -523,7 +523,7 @@ private:
int _score;
int _scoreMax;
-
+
const uint8 *_scoreTable;
int _scoreTableSize;
@@ -564,7 +564,7 @@ private:
void printAlbumPageText();
void printAlbumText(int page, const char *str, int x, int y, uint8 c0);
-
+
void processAlbum();
void albumNewPage();
diff --git a/engines/kyra/kyra_v1.cpp b/engines/kyra/kyra_v1.cpp
index b7b3fc60b7..eb0f929096 100644
--- a/engines/kyra/kyra_v1.cpp
+++ b/engines/kyra/kyra_v1.cpp
@@ -411,7 +411,7 @@ void KyraEngine_v1::registerDefaultSettings() {
void KyraEngine_v1::readSettings() {
_configWalkspeed = ConfMan.getInt("walkspeed");
_configMusic = 0;
-
+
if (!ConfMan.getBool("music_mute")) {
if (_flags.platform == Common::kPlatformFMTowns || _flags.platform == Common::kPlatformPC98)
_configMusic = ConfMan.getBool("cdaudio") ? 2 : 1;
@@ -501,7 +501,7 @@ void KyraEngine_v1::setVolume(kVolumeEntry vol, uint8 value) {
case kVolumeSfx:
ConfMan.setInt("sfx_volume", convertValueToMixer(value));
break;
-
+
case kVolumeSpeech:
ConfMan.setInt("speech_volume", convertValueToMixer(value));
break;
@@ -524,7 +524,7 @@ uint8 KyraEngine_v1::getVolume(kVolumeEntry vol) {
case kVolumeSfx:
return convertValueFromMixer(ConfMan.getInt("sfx_volume"));
break;
-
+
case kVolumeSpeech:
if (speechEnabled())
return convertValueFromMixer(ConfMan.getInt("speech_volume"));
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index e38f0b0633..af7e0385cc 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -290,7 +290,7 @@ protected:
static const int8 _addYPosTable[];
// Character
-
+
static const int8 _charAddXPosTable[];
static const int8 _charAddYPosTable[];
diff --git a/engines/kyra/kyra_v2.cpp b/engines/kyra/kyra_v2.cpp
index 158206f73f..57f5cc029f 100644
--- a/engines/kyra/kyra_v2.cpp
+++ b/engines/kyra/kyra_v2.cpp
@@ -40,7 +40,7 @@ KyraEngine_v2::KyraEngine_v2(OSystem *system, const GameFlags &flags, const Engi
_itemList = 0;
_itemListSize = 0;
-
+
_characterShapeFile = -1;
_updateCharPosNextUpdate = 0;
diff --git a/engines/kyra/kyra_v2.h b/engines/kyra/kyra_v2.h
index 2d261d8c7b..bb3afe1b22 100644
--- a/engines/kyra/kyra_v2.h
+++ b/engines/kyra/kyra_v2.h
@@ -267,7 +267,7 @@ protected:
int _characterShapeFile;
virtual void loadCharacterShapes(int shapes) = 0;
-
+
// pathfinder
int _movFacingTable[600];
int _pathfinderFlag;
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index 19a0a851e7..8daf1d857f 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -36,7 +36,7 @@ namespace Kyra {
LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraEngine_v1(system, flags) {
_screen = 0;
-
+
switch (_flags.lang) {
case Common::EN_ANY:
case Common::EN_USA:
@@ -59,7 +59,7 @@ LoLEngine::LoLEngine(OSystem *system, const GameFlags &flags) : KyraEngine_v1(sy
}
memset(_shapes, 0, sizeof(_shapes));
-
+
_chargenWSA = 0;
_lastUsedStringBuffer = 0;
_landsFile = 0;
@@ -74,7 +74,7 @@ LoLEngine::~LoLEngine() {
delete _screen;
delete _tim;
-
+
for (Common::Array<const TIMOpcode*>::iterator i = _timIntroOpcodes.begin(); i != _timIntroOpcodes.end(); ++i)
delete *i;
_timIntroOpcodes.clear();
@@ -90,10 +90,10 @@ Common::Error LoLEngine::init() {
_screen->setResolution();
KyraEngine_v1::init();
-
+
_tim = new TIMInterpreter(this, _screen, _system);
assert(_tim);
-
+
_screen->setAnimBlockPtr(10000);
_screen->setScreenDim(0);
@@ -210,9 +210,9 @@ void LoLEngine::preInit() {
_eventList.clear();
//loadTalkFile(0);
-
+
char filename[32];
- snprintf(filename, sizeof(filename), "LANDS.%s", _languageExt[_lang]);
+ snprintf(filename, sizeof(filename), "LANDS.%s", _languageExt[_lang]);
_res->exists(filename, true);
_landsFile = _res->fileData(filename, 0);
@@ -233,7 +233,7 @@ int LoLEngine::mainMenu() {
bool hasSave = saveFileLoadable(0);
MainMenu::StaticData data = {
- { 0, 0, 0, 0, 0 },
+ { 0, 0, 0, 0, 0 },
{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0x3D, 0x9F },
{ 0x2C, 0x19, 0x48, 0x2C },
Screen::FID_9_FNT, 1
@@ -253,9 +253,9 @@ int LoLEngine::mainMenu() {
for (int i = 0; i < 5; ++i) {
if (hasSave)
- data.strings[i] = getLangString(mainMenuStrings[1 + tableOffs][i]);
+ data.strings[i] = getLangString(mainMenuStrings[1 + tableOffs][i]);
else
- data.strings[i] = getLangString(mainMenuStrings[tableOffs][i]);
+ data.strings[i] = getLangString(mainMenuStrings[tableOffs][i]);
}
MainMenu *menu = new MainMenu(this);
@@ -333,9 +333,9 @@ void LoLEngine::setupPrologueData(bool load) {
"INTRO.PAK", "INTROVOC.CMP", 0
};
- const char * const *fileList = _flags.isTalkie ? fileListCD :
+ const char * const *fileList = _flags.isTalkie ? fileListCD :
(_flags.useInstallerPackage ? fileListFloppy : fileListFloppyExtracted);
-
+
char filename[32];
for (uint i = 0; fileList[i]; ++i) {
@@ -347,7 +347,7 @@ void LoLEngine::setupPrologueData(bool load) {
}
strcat(filename, fileList[i]);
-
+
if (load) {
if (!_res->loadPakFile(filename))
error("Couldn't load file: '%s'", filename);
@@ -358,7 +358,7 @@ void LoLEngine::setupPrologueData(bool load) {
_screen->clearPage(0);
_screen->clearPage(3);
-
+
if (load) {
_chargenWSA = new WSAMovie_v2(this, _screen);
assert(_chargenWSA);
@@ -414,12 +414,12 @@ void LoLEngine::showIntro() {
}
_screen->showMouse();
_sound->voiceStop();
-
+
_eventList.clear();
-
+
_tim->unload(intro);
_tim->clearLangData();
-
+
_screen->fadePalette(_screen->getPalette(1), 30, 0);
}
@@ -427,7 +427,7 @@ int LoLEngine::chooseCharacter() {
debugC(9, kDebugLevelMain, "LoLEngine::chooseCharacter()");
_tim->setLangData("LOLINTRO.DIP");
-
+
_screen->loadFont(Screen::FID_9_FNT, "FONT9P.FNT");
_screen->loadBitmap("ITEMICN.SHP", 3, 3, 0);
@@ -438,7 +438,7 @@ int LoLEngine::chooseCharacter() {
_screen->loadBitmap("CHAR.CPS", 2, 2, _screen->getPalette(0));
_screen->loadBitmap("BACKGRND.CPS", 4, 4, _screen->getPalette(0));
-
+
if (!_chargenWSA->open("CHARGEN.WSA", 1, 0))
error("Couldn't load CHARGEN.WSA");
_chargenWSA->setX(113);
@@ -448,7 +448,7 @@ int LoLEngine::chooseCharacter() {
_screen->setFont(Screen::FID_9_FNT);
_screen->_curPage = 2;
-
+
for (int i = 0; i < 4; ++i)
_screen->fprintStringIntro(_charPreviews[i].name, _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120);
@@ -457,16 +457,16 @@ int LoLEngine::chooseCharacter() {
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 56, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[1]);
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 64, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[2]);
}
-
+
_screen->fprintStringIntro(_tim->getCTableEntry(51), 36, 173, 0x98, 0x00, 0x9C, 0x20);
_screen->fprintStringIntro(_tim->getCTableEntry(53), 36, 181, 0x98, 0x00, 0x9C, 0x20);
_screen->fprintStringIntro(_tim->getCTableEntry(55), 36, 189, 0x98, 0x00, 0x9C, 0x20);
-
+
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
_screen->_curPage = 0;
-
+
_screen->fadePalette(_screen->getPalette(0), 30, 0);
-
+
bool kingIntro = true;
while (!shouldQuit()) {
if (kingIntro)
@@ -515,10 +515,10 @@ int LoLEngine::chooseCharacter() {
void LoLEngine::kingSelectionIntro() {
debugC(9, kDebugLevelMain, "LoLEngine::kingSelectionIntro()");
-
+
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
int y = 38;
-
+
_screen->fprintStringIntro(_tim->getCTableEntry(57), 8, y, 0x32, 0x00, 0x9C, 0x20);
_screen->fprintStringIntro(_tim->getCTableEntry(58), 8, y + 10, 0x32, 0x00, 0x9C, 0x20);
_screen->fprintStringIntro(_tim->getCTableEntry(59), 8, y + 20, 0x32, 0x00, 0x9C, 0x20);
@@ -526,11 +526,11 @@ void LoLEngine::kingSelectionIntro() {
_screen->fprintStringIntro(_tim->getCTableEntry(61), 8, y + 40, 0x32, 0x00, 0x9C, 0x20);
_sound->voicePlay("KING01");
-
+
_chargenWSA->setX(113);
_chargenWSA->setY(0);
_chargenWSA->setDrawPage(0);
-
+
int index = 4;
while (_sound->voiceIsPlaying("KING01") && _charSelection == -1 && !shouldQuit() && !skipFlag()) {
index = MAX(index, 4);
@@ -550,9 +550,9 @@ void LoLEngine::kingSelectionIntro() {
index = (index + 1) % 22;
}
-
+
resetSkipFlag();
-
+
_chargenWSA->displayFrame(0x10, 0, 0, 0);
_screen->updateScreen();
_sound->voiceStop("KING01");
@@ -560,19 +560,19 @@ void LoLEngine::kingSelectionIntro() {
void LoLEngine::kingSelectionReminder() {
debugC(9, kDebugLevelMain, "LoLEngine::kingSelectionReminder()");
-
+
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
int y = 48;
-
+
_screen->fprintStringIntro(_tim->getCTableEntry(62), 8, y, 0x32, 0x00, 0x9C, 0x20);
_screen->fprintStringIntro(_tim->getCTableEntry(63), 8, y + 10, 0x32, 0x00, 0x9C, 0x20);
-
+
_sound->voicePlay("KING02");
-
+
_chargenWSA->setX(113);
_chargenWSA->setY(0);
_chargenWSA->setDrawPage(0);
-
+
int index = 0;
while (_sound->voiceIsPlaying("KING02") && _charSelection == -1 && !shouldQuit() && index < 15) {
_chargenWSA->displayFrame(_chargenFrameTable[index+9], 0, 0, 0);
@@ -628,7 +628,7 @@ void LoLEngine::kingSelectionOutro() {
void LoLEngine::processCharacterSelection() {
debugC(9, kDebugLevelMain, "LoLEngine::processCharacterSelection()");
-
+
_charSelection = -1;
while (!shouldQuit() && _charSelection == -1) {
uint32 nextKingMessage = _system->getMillis() + 900 * _tickLength;
@@ -681,22 +681,22 @@ int LoLEngine::selectionCharInfo(int character) {
strcpy(filename, "FACE09.SHP");
vocFilename[3] = 'A';
break;
-
+
case 1:
strcpy(filename, "FACE01.SHP");
vocFilename[3] = 'M';
break;
-
+
case 2:
strcpy(filename, "FACE08.SHP");
vocFilename[3] = 'K';
break;
-
+
case 3:
strcpy(filename, "FACE05.SHP");
vocFilename[3] = 'C';
break;
-
+
default:
break;
};
@@ -713,9 +713,9 @@ int LoLEngine::selectionCharInfo(int character) {
_screen->fprintStringIntro(_tim->getCTableEntry(idx+2), 50, 147, 0x53, 0x00, 0xCF, 0x20);
_screen->fprintStringIntro(_tim->getCTableEntry(idx+3), 50, 157, 0x53, 0x00, 0xCF, 0x20);
_screen->fprintStringIntro(_tim->getCTableEntry(idx+4), 50, 167, 0x53, 0x00, 0xCF, 0x20);
-
+
_screen->fprintStringIntro(_tim->getCTableEntry(69), 100, 168, 0x32, 0x00, 0xCF, 0x20);
-
+
selectionCharInfoIntro(vocFilename);
if (_charSelectionInfoResult == -1) {
while (_charSelectionInfoResult == -1) {
@@ -723,7 +723,7 @@ int LoLEngine::selectionCharInfo(int character) {
_system->delayMillis(10);
}
}
-
+
if (_charSelectionInfoResult != 1) {
_charSelectionInfoResult = -1;
_screen->copyRegion(0, 122, 0, 122, 320, 78, 2, 0, Screen::CR_NO_P_CHECK);
@@ -743,7 +743,7 @@ int LoLEngine::selectionCharInfo(int character) {
_screen->fprintStringIntro(_tim->getCTableEntry(68), 3, 68, 0x32, 0x00, 0x9C, 0x20);
resetSkipFlag();
- kingSelectionOutro();
+ kingSelectionOutro();
return character;
}
@@ -751,7 +751,7 @@ void LoLEngine::selectionCharInfoIntro(char *file) {
debugC(9, kDebugLevelMain, "LoLEngine::selectionCharInfoIntro(%p)", (const void *)file);
int index = 0;
file[4] = '0';
-
+
while (_charSelectionInfoResult == -1 && !shouldQuit()) {
if (!_sound->voicePlay(file))
break;
@@ -789,21 +789,21 @@ int LoLEngine::getCharSelection() {
return i;
}
}
-
+
return -1;
}
int LoLEngine::selectionCharAccept() {
int inputFlag = checkInput(0, false) & 0xCF;
removeInputTop();
-
+
if (inputFlag == 200) {
if (88 <= _mouseX && _mouseX <= 128 && 180 <= _mouseY && _mouseY <= 194)
return 1;
if (196 <= _mouseX && _mouseX <= 236 && 180 <= _mouseY && _mouseY <= 194)
return 0;
}
-
+
return -1;
}
@@ -818,13 +818,13 @@ void LoLEngine::setupOpcodeTable() {
Common::Array<const TIMOpcode*> *timTable = 0;
SetTimOpcodeTable(_timIntroOpcodes);
-
+
// 0x00
OpcodeTim(tlol_setupPaletteFade);
OpcodeTimUnImpl();
OpcodeTim(tlol_loadPalette);
OpcodeTim(tlol_setupPaletteFadeEx);
-
+
// 0x04
OpcodeTim(tlol_processWsaFrame);
OpcodeTim(tlol_displayText);
@@ -865,15 +865,15 @@ int LoLEngine::tlol_processWsaFrame(const TIM *tim, const uint16 *param) {
const int x2 = param[2];
const int y2 = param[3];
const int factor = MAX<int>(0, (int16)param[4]);
-
+
const int x1 = anim->x;
const int y1 = anim->y;
-
+
int w1 = anim->wsa->width();
int h1 = anim->wsa->height();
int w2 = (w1 * factor) / 100;
int h2 = (h1 * factor) / 100;
-
+
anim->wsa->setDrawPage(2);
anim->wsa->setX(x1);
anim->wsa->setY(y1);
diff --git a/engines/kyra/lol.h b/engines/kyra/lol.h
index a984fdc36f..a6b7378b0f 100644
--- a/engines/kyra/lol.h
+++ b/engines/kyra/lol.h
@@ -22,7 +22,7 @@
* $Id$
*
*/
-
+
#ifndef KYRA_LOL_H
#define KYRA_LOL_H
@@ -41,7 +41,7 @@ class LoLEngine : public KyraEngine_v1 {
public:
LoLEngine(OSystem *system, const GameFlags &flags);
~LoLEngine();
-
+
Screen *screen();
private:
Screen_LoL *_screen;
@@ -61,13 +61,13 @@ private:
void setupPrologueData(bool load);
void showIntro();
-
+
struct CharacterPrev {
const char *name;
int x, y;
int attrib[3];
};
-
+
static const CharacterPrev _charPreviews[];
WSAMovie_v2 *_chargenWSA;
@@ -81,29 +81,29 @@ private:
void updateSelectionAnims();
int selectionCharInfo(int character);
void selectionCharInfoIntro(char *file);
-
+
int getCharSelection();
int selectionCharAccept();
-
+
int _charSelection;
int _charSelectionInfoResult;
-
+
uint32 _selectionAnimTimers[4];
uint8 _selectionAnimFrames[4];
static const uint8 _selectionAnimIndexTable[];
-
+
static const uint16 _selectionPosTable[];
static const uint8 _selectionChar1IdxTable[];
static const uint8 _selectionChar2IdxTable[];
static const uint8 _selectionChar3IdxTable[];
static const uint8 _selectionChar4IdxTable[];
-
+
static const uint8 _reminderChar1IdxTable[];
static const uint8 _reminderChar2IdxTable[];
static const uint8 _reminderChar3IdxTable[];
static const uint8 _reminderChar4IdxTable[];
-
+
static const uint8 _charInfoFrameTable[];
// timer
@@ -121,7 +121,7 @@ private:
int tlol_setupPaletteFadeEx(const TIM *tim, const uint16 *param);
int tlol_processWsaFrame(const TIM *tim, const uint16 *param);
int tlol_displayText(const TIM *tim, const uint16 *param);
-
+
// translation
int _lang;
@@ -137,7 +137,7 @@ private:
// graphics
uint8 *_shapes[138];
-
+
// unneeded
void setWalkspeed(uint8) {}
void setHandItem(uint16) {}
diff --git a/engines/kyra/resource.cpp b/engines/kyra/resource.cpp
index 85378659da..061cb7e602 100644
--- a/engines/kyra/resource.cpp
+++ b/engines/kyra/resource.cpp
@@ -184,7 +184,7 @@ bool Resource::loadFileList(const Common::String &filedata) {
if (filename.hasSuffix(".PAK")) {
if (!exists(filename.c_str()) && _vm->gameFlags().isDemo) {
- // the demo version supplied with Kyra3 does not
+ // the demo version supplied with Kyra3 does not
// contain all pak files listed in filedata.fdt
// so we don't do anything here if they are non
// existant.
diff --git a/engines/kyra/resource_intern.cpp b/engines/kyra/resource_intern.cpp
index 827af4892f..ebe874ae2f 100644
--- a/engines/kyra/resource_intern.cpp
+++ b/engines/kyra/resource_intern.cpp
@@ -212,7 +212,7 @@ struct PlainArchiveListSearch {
Common::Archive *ResLoaderPak::load(Common::SharedPtr<Common::ArchiveMember> memberFile, Common::SeekableReadStream &stream) const {
int32 filesize = stream.size();
-
+
int32 startoffset = 0, endoffset = 0;
bool switchEndian = false;
bool firstFile = true;
@@ -400,7 +400,7 @@ bool ResLoaderTlk::isLoadable(const Common::String &filename, Common::SeekableRe
Common::Archive *ResLoaderTlk::load(Common::SharedPtr<Common::ArchiveMember> file, Common::SeekableReadStream &stream) const {
uint16 entries = stream.readUint16LE();
PlainArchive::FileInputList files;
-
+
for (uint i = 0; i < entries; ++i) {
PlainArchive::InputEntry entry;
@@ -451,7 +451,7 @@ private:
};
void FileExpanderSource::advSrcBitsBy1() {
- _key >>= 1;
+ _key >>= 1;
if (!--_bitsLeft) {
if (_dataPtr < _endofBuffer)
_key = ((*_dataPtr++) << 8 ) | (_key & 0xff);
@@ -479,7 +479,7 @@ uint16 FileExpanderSource::getKeyMasked(uint8 newIndex) {
if (_index > 8) {
newIndex = _index - 8;
- res = (_key & 0xff) & mskTable[8];
+ res = (_key & 0xff) & mskTable[8];
advSrcBitsByIndex(8);
_index = newIndex;
res |= (((_key & 0xff) & mskTable[_index]) << 8);
@@ -518,7 +518,7 @@ uint16 FileExpanderSource::keyMaskedAlign(uint16 val) {
void FileExpanderSource::advSrcRefresh() {
_key = READ_LE_UINT16(_dataPtr);
if (_dataPtr < _endofBuffer - 1)
- _dataPtr += 2;
+ _dataPtr += 2;
_bitsLeft = 8;
}
@@ -566,7 +566,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
0x10, 0x11, 0x12, 0x00, 0x08, 0x07, 0x09, 0x06, 0x0A,
0x05, 0x0B, 0x04, 0x0C, 0x03, 0x0D, 0x02, 0x0E, 0x01, 0x0F
};
-
+
memset(_tables[0], 0, 3914);
uint8 *d = dst;
@@ -591,10 +591,10 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
tableSize0 = _src->getKeyMasked(5) + 257;
tableSize1 = _src->getKeyMasked(5) + 1;
memset(_tables[7], 0, 19);
-
+
const uint8 *itbl = indexTable;
int numbytes = _src->getKeyMasked(4) + 4;
-
+
while (numbytes--)
_tables[7][*itbl++] = _src->getKeyMasked(3);
@@ -615,7 +615,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
uint8 tmpI = 0;
if (cmd == 16) {
cmd = _src->getKeyMasked(2) + 3;
- tmpI = *(tmp - 1);
+ tmpI = *(tmp - 1);
} else if (cmd == 17) {
cmd = _src->getKeyMasked(3) + 3;
} else {
@@ -630,7 +630,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
error("decompression failure");
}
}
-
+
memcpy(_tables[1], _tables[0] + tableSize0, tableSize1);
generateTables(0, 2, 3, tableSize0);
generateTables(1, 4, 5, tableSize1);
@@ -640,7 +640,7 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
postprocess = false;
needrefresh = true;
} else if (mode == 0){
- uint8 *d2 = _tables[0];
+ uint8 *d2 = _tables[0];
memset(d2, 8, 144);
memset(d2 + 144, 9, 112);
memset(d2 + 256, 7, 24);
@@ -659,9 +659,9 @@ bool FileExpander::process(uint8 *dst, const uint8 *src, uint32 outsize, uint32
if (!postprocess)
continue;
-
+
int16 cmd = 0;
-
+
do {
cmd = ((int16*) _tables[2])[_src->getKeyLower()];
_src->advSrcBitsByIndex(cmd < 0 ? calcCmdAndIndex(_tables[3], cmd) : _tables[0][cmd]);
@@ -721,8 +721,8 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
const uint8 *s = tbl1;
memset(_tables16[0], 0, 32);
-
- for (int i = 0; i < cnt; i++)
+
+ for (int i = 0; i < cnt; i++)
_tables16[0][(*s++)]++;
_tables16[1][1] = 0;
@@ -758,12 +758,12 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
if (t > 0) {
uint16 v1 = *d;
uint16 v2 = 0;
-
+
do {
v2 = (v2 << 1) | (v1 & 1);
v1 >>= 1;
} while (--t && v1);
-
+
t++;
uint8 c1 = (v1 & 1);
while (t--) {
@@ -775,7 +775,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
*d++ = v2;
} else {
d++;
- }
+ }
}
memset(tbl2, 0, 512);
@@ -794,7 +794,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
if (t && t < 9) {
inc = 1 << t;
uint16 o = *d;
-
+
do {
s2[o] = cnt;
o += inc;
@@ -824,7 +824,7 @@ void FileExpander::generateTables(uint8 srcIndex, uint8 dstIndex, uint8 dstIndex
} while (--t);
*s2 = cnt;
}
- d--;
+ d--;
} while (--cnt >= 0);
}
@@ -909,7 +909,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
delete tmpFile;
tmpFile = 0;
-
+
pos += cs;
if (cs == size) {
if (!bytesleft) {
@@ -960,7 +960,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
}
uint32 size = (i == a->lastFile) ? a->endOffset : tmpFile->size();
-
+
if (startFile) {
startFile = false;
pos = a->startOffset + kExecSize;
@@ -1009,7 +1009,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
tmpFile->seek(pos, SEEK_SET);
}
}
-
+
sprintf(filenameExt, extension.c_str(), i + 1);
filenameTemp = a->filename + Common::String(filenameExt);
@@ -1022,12 +1022,12 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
}
uint32 id = READ_LE_UINT32(hdr);
-
+
if (id == 0x04034B50) {
compressionType = hdr[8];
insize = READ_LE_UINT32(hdr + 18);
outsize = READ_LE_UINT32(hdr + 22);
-
+
uint16 filestrlen = READ_LE_UINT16(hdr + 26);
*(hdr + 30 + filestrlen) = 0;
entryStr = Common::String((const char *)(hdr + 30));
@@ -1047,7 +1047,7 @@ Common::Archive *InstallerLoader::load(Resource *owner, const Common::String &fi
if ((pos + insize) > size) {
// this is for files that are split between two archive files
inPart1 = size - pos;
- inPart2 = insize - inPart1;
+ inPart2 = insize - inPart1;
tmpFile->read(inbuffer, inPart1);
} else {
tmpFile->read(inbuffer, insize);
diff --git a/engines/kyra/saveload.cpp b/engines/kyra/saveload.cpp
index 2c410a6ff6..f9cbe09db7 100644
--- a/engines/kyra/saveload.cpp
+++ b/engines/kyra/saveload.cpp
@@ -64,7 +64,7 @@ KyraEngine_v1::kReadSaveHeaderError KyraEngine_v1::readSaveHeader(Common::Seekab
in->seek(0, SEEK_SET);
in->read(descriptionBuffer, descriptionSize[i]);
descriptionBuffer[descriptionSize[i]] = 0;
-
+
type = in->readUint32BE();
header.version = in->readUint16LE();
if (type == MKID_BE('MBL3') && header.version == 100) {
diff --git a/engines/kyra/saveload_hof.cpp b/engines/kyra/saveload_hof.cpp
index d1407c1d91..ba39ee28a3 100644
--- a/engines/kyra/saveload_hof.cpp
+++ b/engines/kyra/saveload_hof.cpp
@@ -146,7 +146,7 @@ Common::Error KyraEngine_HoF::loadGameState(int slot) {
warning("Trying to load savegame from original interpreter, while this is possible, it is not officially supported");
bool setFlag1EE = (queryGameFlag(0x1EE) != 0);
-
+
_deathHandler = -1;
if (!_unkSceneScreenFlag1) {
_sound->beginFadeOut();
@@ -203,7 +203,7 @@ Common::Error KyraEngine_HoF::loadGameState(int slot) {
for (int i = 0; i < 31; ++i)
_newSceneDlgState[i] = in.readUint16();
}
-
+
_cauldronUseCount = in.readSint16();
if (header.originalSave)
@@ -312,7 +312,7 @@ Common::Error KyraEngine_HoF::loadGameState(int slot) {
_mainCharX = _mainCharacter.x2 = _mainCharacter.x1;
_mainCharY = _mainCharacter.y2 = _mainCharacter.y1;
_mainCharacter.facing = 4;
-
+
enterNewScene(_mainCharacter.sceneId, _mainCharacter.facing, 0, 0, 1);
setHandItem(_itemInHand);
diff --git a/engines/kyra/saveload_lok.cpp b/engines/kyra/saveload_lok.cpp
index c437960907..3548723610 100644
--- a/engines/kyra/saveload_lok.cpp
+++ b/engines/kyra/saveload_lok.cpp
@@ -203,7 +203,7 @@ Common::Error KyraEngine_LoK::loadGameState(int slot) {
_screen->updateScreen();
setMousePos(brandonX, brandonY);
-
+
if (in->err() || in->eos()) {
warning("Load failed ('%s', '%s').", fileName, header.description.c_str());
return Common::kUnknownError;
@@ -223,14 +223,14 @@ Common::Error KyraEngine_LoK::saveGameState(int slot, const char *saveName, cons
debugC(9, kDebugLevelMain, "KyraEngine_LoK::saveGame(%d, '%s', %p)", slot, saveName, (const void *)thumb);
const char *fileName = getSavegameFilename(slot);
-
+
if (shouldQuit())
return Common::kNoError;
Common::OutSaveFile *out = openSaveForWriting(fileName, saveName, thumb);
if (!out)
return _saveFileMan->getError();
-
+
for (int i = 0; i < 11; i++) {
out->writeUint16BE(_characterList[i].sceneId);
out->writeByte(_characterList[i].height);
diff --git a/engines/kyra/saveload_mr.cpp b/engines/kyra/saveload_mr.cpp
index f2f10d635a..5193800b1d 100644
--- a/engines/kyra/saveload_mr.cpp
+++ b/engines/kyra/saveload_mr.cpp
@@ -184,7 +184,7 @@ Common::Error KyraEngine_MR::loadGameState(int slot) {
for (int i = 0; i < 30; ++i)
in.read(_conversationState[i], 30);
-
+
if (!header.originalSave) {
in.read(_newSceneDlgState, 40);
} else {
@@ -309,7 +309,7 @@ Common::Error KyraEngine_MR::loadGameState(int slot) {
_badConsciencePosition = false;
_goodConscienceShown = false;
_goodConsciencePosition = false;
-
+
enterNewScene(_mainCharacter.sceneId, _mainCharacter.facing, 0, 0, 1);
setHandItem(_itemInHand);
diff --git a/engines/kyra/scene_hof.cpp b/engines/kyra/scene_hof.cpp
index b6c25a46c7..ad1632a231 100644
--- a/engines/kyra/scene_hof.cpp
+++ b/engines/kyra/scene_hof.cpp
@@ -91,7 +91,7 @@ void KyraEngine_HoF::enterNewScene(uint16 newScene, int facing, int unk1, int un
waitTime = _system->getMillis() + 1000;
_sound->beginFadeOut();
}
-
+
_chatAltFlag = false;
if (!unk3) {
@@ -255,7 +255,7 @@ void KyraEngine_HoF::enterNewSceneUnk2(int unk1) {
updateCharacterAnim(0);
refreshAnimObjectsIfNeed();
}
- } else if (_mainCharX != -1 && _mainCharY != -1) {
+ } else if (_mainCharX != -1 && _mainCharY != -1) {
if (_characterFrameTable[_mainCharacter.facing] == 25)
_mainCharacter.facing = 5;
_mainCharacter.animFrame = _characterFrameTable[_mainCharacter.facing];
diff --git a/engines/kyra/scene_mr.cpp b/engines/kyra/scene_mr.cpp
index 1ceb47155d..238e5ee447 100644
--- a/engines/kyra/scene_mr.cpp
+++ b/engines/kyra/scene_mr.cpp
@@ -765,7 +765,7 @@ int KyraEngine_MR::runSceneScript1(int x, int y) {
return 0;
if (_deathHandler >= 0)
return 0;
-
+
_emc->init(&_sceneScriptState, &_sceneScriptData);
_sceneScriptState.regs[1] = x;
_sceneScriptState.regs[2] = y;
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 44e66691a2..cd2227f130 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -80,8 +80,8 @@ bool Screen::init() {
if (_vm->gameFlags().useHiResOverlay) {
_useOverlays = true;
_useSJIS = (_vm->gameFlags().lang == Common::JA_JPN);
- _sjisInvisibleColor = (_vm->gameFlags().gameID == GI_KYRA1) ? 0x80 : 0xF6;
-
+ _sjisInvisibleColor = (_vm->gameFlags().gameID == GI_KYRA1) ? 0x80 : 0xF6;
+
for (int i = 0; i < SCREEN_OVLS_NUM; ++i) {
if (!_sjisOverlayPtrs[i]) {
_sjisOverlayPtrs[i] = new uint8[SCREEN_OVL_SJIS_SIZE];
@@ -440,7 +440,7 @@ int Screen::fadePalStep(const uint8 *palette, int diff) {
uint8 fadePal[768];
memcpy(fadePal, _screenPalette, 768);
-
+
bool needRefresh = false;
const int colors = (_vm->gameFlags().platform == Common::kPlatformAmiga ? 32 : 256) * 3;
for (int i = 0; i < colors; ++i) {
@@ -463,7 +463,7 @@ int Screen::fadePalStep(const uint8 *palette, int diff) {
fadePal[i] = (uint8)c2;
}
}
-
+
if (needRefresh)
setScreenPalette(fadePal);
@@ -1153,7 +1153,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
_dsTableLoopCount = 0;
_dsTable2 = 0;
_dsDrawLayer = 0;
-
+
uint8 *table3 = 0;
uint8 *table4 = 0;
@@ -1242,7 +1242,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
&Screen::drawShapePlotType3_7, // used by Kyra 1 (invisibility)
&Screen::drawShapePlotType8, // used by Kyra 2
&Screen::drawShapePlotType9, // used by Kyra 1 + 3
- 0,
+ 0,
&Screen::drawShapePlotType11_15, // used by Kyra 1 (invisibility) + Kyra 3 (shadow)
&Screen::drawShapePlotType12, // used by Kyra 2
&Screen::drawShapePlotType13, // used by Kyra 1
@@ -1253,7 +1253,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
};
int scaleCounterV = 0;
-
+
f = flags & 0x0f;
_dsProcessMargin = dsMarginFunc[f];
_dsScaleSkip = dsSkipFunc[f];
@@ -1304,7 +1304,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
if (flags & DSF_SCALE) {
shapeHeight = (shapeHeight * _dsScaleH) >> 8;
shpWidthScaled1 = shpWidthScaled2 = (shapeWidth * _dsScaleW) >> 8;
-
+
if (!shapeHeight || !shpWidthScaled1) {
va_end(args);
return;
@@ -1321,10 +1321,10 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
uint16 frameSize = READ_LE_UINT16(src); src += 2;
int colorTableColors = ((_vm->gameFlags().gameID != GI_KYRA1) && (shapeFlags & 4)) ? *src++ : 16;
-
+
if (!(flags & 0x8000) && (shapeFlags & 1))
_dsTable2 = src;
-
+
if (flags & 0x400)
src += colorTableColors;
@@ -1479,7 +1479,7 @@ int Screen::drawShapeMarginNoScaleUpwind(uint8 *&dst, const uint8 *&src, int &cn
continue;
cnt = cnt + 1 - (*src++);
}
-
+
cnt++;
dst -= cnt;
return 0;
@@ -1491,7 +1491,7 @@ int Screen::drawShapeMarginNoScaleDownwind(uint8 *&dst, const uint8 *&src, int &
continue;
cnt = cnt + 1 - (*src++);
}
-
+
cnt++;
dst += cnt;
return 0;
@@ -1598,7 +1598,7 @@ void Screen::drawShapeProcessLineNoScaleUpwind(uint8 *&dst, const uint8 *&src, i
c = *src++;
dst += c;
cnt -= c;
- }
+ }
} while (cnt > 0);
}
@@ -1613,7 +1613,7 @@ void Screen::drawShapeProcessLineNoScaleDownwind(uint8 *&dst, const uint8 *&src,
c = *src++;
dst -= c;
cnt -= c;
- }
+ }
} while (cnt > 0);
}
@@ -1715,7 +1715,7 @@ void Screen::drawShapePlotType6(uint8 *dst, uint8 cmd) {
int t = _drawShapeVar4 + _drawShapeVar5;
if (t & 0xff00) {
cmd = dst[_drawShapeVar3];
- t &= 0xff;
+ t &= 0xff;
} else {
cmd = _dsTable2[cmd];
}
@@ -1794,7 +1794,7 @@ void Screen::drawShapePlotType14(uint8 *dst, uint8 cmd) {
uint32 relOffs = dst - _dsDstPage;
int t = (_shapePages[0][relOffs] & 0x7f) & 0x87;
if (_dsDrawLayer < t) {
- cmd = _shapePages[1][relOffs];
+ cmd = _shapePages[1][relOffs];
} else {
t = _drawShapeVar4 + _drawShapeVar5;
if (t & 0xff00) {
@@ -2701,7 +2701,7 @@ void Screen::loadBitmap(const char *filename, int tempPage, int dstPage, uint8 *
warning("couldn't load bitmap: '%s'", filename);
return;
}
-
+
if (skip)
srcData += 4;
diff --git a/engines/kyra/screen.h b/engines/kyra/screen.h
index 58744a9d2a..8299262d0e 100644
--- a/engines/kyra/screen.h
+++ b/engines/kyra/screen.h
@@ -322,7 +322,7 @@ protected:
void drawShapePlotType0(uint8 *dst, uint8 cmd);
void drawShapePlotType1(uint8 *dst, uint8 cmd);
- void drawShapePlotType3_7(uint8 *dst, uint8 cmd);
+ void drawShapePlotType3_7(uint8 *dst, uint8 cmd);
void drawShapePlotType4(uint8 *dst, uint8 cmd);
void drawShapePlotType5(uint8 *dst, uint8 cmd);
void drawShapePlotType6(uint8 *dst, uint8 cmd);
@@ -331,7 +331,7 @@ protected:
void drawShapePlotType11_15(uint8 *dst, uint8 cmd);
void drawShapePlotType12(uint8 *dst, uint8 cmd);
void drawShapePlotType13(uint8 *dst, uint8 cmd);
- void drawShapePlotType14(uint8 *dst, uint8 cmd);
+ void drawShapePlotType14(uint8 *dst, uint8 cmd);
typedef int (Screen::*DsMarginSkipFunc)(uint8 *&dst, const uint8 *&src, int &cnt);
typedef void (Screen::*DsLineFunc)(uint8 *&dst, const uint8 *&src, int &cnt, int scaleState);
diff --git a/engines/kyra/screen_lok.h b/engines/kyra/screen_lok.h
index 5b4b8a9266..136c098160 100644
--- a/engines/kyra/screen_lok.h
+++ b/engines/kyra/screen_lok.h
@@ -40,7 +40,7 @@ public:
bool init();
int getRectSize(int w, int h);
-
+
void setScreenDim(int dim);
const ScreenDim *getScreenDim(int dim);
diff --git a/engines/kyra/screen_lol.cpp b/engines/kyra/screen_lol.cpp
index 1698c54bbf..8e7abee545 100644
--- a/engines/kyra/screen_lol.cpp
+++ b/engines/kyra/screen_lol.cpp
@@ -79,9 +79,9 @@ void Screen_LoL::fprintStringIntro(const char *format, int x, int y, uint8 c1, u
va_list args;
va_start(args, flags);
- vsnprintf(buffer, sizeof(buffer), format, args);
+ vsnprintf(buffer, sizeof(buffer), format, args);
va_end(args);
-
+
if ((flags & 0x0F00) == 0x100)
x -= getTextWidth(buffer) >> 1;
if ((flags & 0x0F00) == 0x200)
diff --git a/engines/kyra/screen_lol.h b/engines/kyra/screen_lol.h
index 07c5b89604..bba748813a 100644
--- a/engines/kyra/screen_lol.h
+++ b/engines/kyra/screen_lol.h
@@ -35,7 +35,7 @@ class LoLEngine;
class Screen_LoL : public Screen_v2 {
public:
Screen_LoL(LoLEngine *vm, OSystem *system);
-
+
void setScreenDim(int dim);
const ScreenDim *getScreenDim(int dim);
diff --git a/engines/kyra/screen_v2.cpp b/engines/kyra/screen_v2.cpp
index c6ea6a93e8..b2952ee113 100644
--- a/engines/kyra/screen_v2.cpp
+++ b/engines/kyra/screen_v2.cpp
@@ -57,7 +57,7 @@ uint8 *Screen_v2::generateOverlay(const uint8 *palette, uint8 *buffer, int start
uint8 processedPalette[3];
const uint8 *src = palette + i*3;
byte col;
-
+
col = *src++;
col -= ((((col - col1) * factor) << 1) >> 8) & 0xFF;
processedPalette[0] = col;
@@ -487,13 +487,13 @@ bool Screen_v2::calcBounds(int w0, int h0, int &x1, int &y1, int &w1, int &h1, i
void Screen_v2::checkedPageUpdate(int srcPage, int dstPage) {
debugC(9, kDebugLevelScreen, "Screen_v2::checkedPageUpdate(%d, %d)", srcPage, dstPage);
-
+
const uint32 *src = (const uint32 *)getPagePtr(srcPage);
uint32 *dst = (uint32 *)getPagePtr(dstPage);
uint32 *page0 = (uint32 *)getPagePtr(0);
-
+
bool updated = false;
-
+
for (int y = 0; y < 200; ++y) {
for (int x = 0; x < 80; ++x, ++src, ++dst, ++page0) {
if (*src != *dst) {
diff --git a/engines/kyra/screen_v2.h b/engines/kyra/screen_v2.h
index 7bbdc4b6c3..d95bff35d1 100644
--- a/engines/kyra/screen_v2.h
+++ b/engines/kyra/screen_v2.h
@@ -46,7 +46,7 @@ public:
uint8 *generateOverlay(const uint8 *palette, uint8 *buffer, int color, uint16 factor);
void applyOverlay(int x, int y, int w, int h, int pageNum, const uint8 *overlay);
int findLeastDifferentColor(const uint8 *paletteEntry, const uint8 *palette, uint16 numColors);
-
+
virtual void getFadeParams(const uint8 *palette, int delay, int &delayInc, int &diff);
// shape handling
@@ -78,5 +78,5 @@ protected:
} // end of namespace Kyra
-#endif
+#endif
diff --git a/engines/kyra/script_hof.cpp b/engines/kyra/script_hof.cpp
index e3a8bf95bc..4eb727a617 100644
--- a/engines/kyra/script_hof.cpp
+++ b/engines/kyra/script_hof.cpp
@@ -279,7 +279,7 @@ int KyraEngine_HoF::o2_wsaOpen(EMCState *script) {
int KyraEngine_HoF::o2_displayWsaSequentialFrames(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_displayWsaSequentialFrames(%p) (%d, %d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5), stackPos(6));
-
+
uint16 frameDelay = stackPos(2) * _tickLength;
uint16 currentFrame = stackPos(3);
uint16 lastFrame = stackPos(4);
@@ -289,10 +289,10 @@ int KyraEngine_HoF::o2_displayWsaSequentialFrames(EMCState *script) {
_wsaSlots[index]->setX(stackPos(0));
_wsaSlots[index]->setY(stackPos(1));
_wsaSlots[index]->setDrawPage(0);
-
+
_screen->hideMouse();
- while (currentFrame <= lastFrame) {
+ while (currentFrame <= lastFrame) {
uint32 endTime = _system->getMillis() + frameDelay;
_wsaSlots[index]->displayFrame(currentFrame++, copyParam, 0, 0);
if (!skipFlag()) {
@@ -309,7 +309,7 @@ int KyraEngine_HoF::o2_displayWsaSequentialFrames(EMCState *script) {
int KyraEngine_HoF::o2_displayWsaSequence(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_displayWsaSequence(%p) (%d, %d, %d, %d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2), stackPos(3), stackPos(4), stackPos(5));
-
+
const int frameDelay = stackPos(2) * _tickLength;
const int index = stackPos(3);
const bool doUpdate = (stackPos(4) != 0);
@@ -318,13 +318,13 @@ int KyraEngine_HoF::o2_displayWsaSequence(EMCState *script) {
_wsaSlots[index]->setX(stackPos(0));
_wsaSlots[index]->setY(stackPos(1));
_wsaSlots[index]->setDrawPage(0);
-
+
_screen->hideMouse();
int currentFrame = 0;
const int lastFrame = _wsaSlots[index]->frames();
- while (currentFrame <= lastFrame) {
+ while (currentFrame <= lastFrame) {
uint32 endTime = _system->getMillis() + frameDelay;
_wsaSlots[index]->displayFrame(currentFrame++, copyParam, 0, 0);
if (!skipFlag()) {
@@ -740,7 +740,7 @@ int KyraEngine_HoF::o2_setCauldronState(EMCState *script) {
int KyraEngine_HoF::o2_showItemString(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_HoF::o2_showItemString(%p) (%d, %d)", (const void *)script, stackPos(0), stackPos(1));
const int item = stackPos(0);
-
+
int string = 0;
if (stackPos(1) == 1) {
if (_lang == 1)
@@ -798,7 +798,7 @@ int KyraEngine_HoF::o2_showLetter(EMCState *script) {
_res->loadFileToBuf(filename, _screen->getPalette(0), 768);
_screen->fadeToBlack(0x14);
-
+
sprintf(filename, "LETTER%.1d.%s", letter, _languageExtension[_lang]);
uint8 *letterBuffer = _res->fileData(filename, 0);
if (!letterBuffer) {
@@ -1142,11 +1142,11 @@ int KyraEngine_HoF::o2_mushroomEffect(EMCState *script) {
memcpy(_screen->getPalette(2), _screen->_currentPalette, 768);
for (int i = 1; i < 768; i += 3)
- _screen->_currentPalette[i] = 0;
+ _screen->_currentPalette[i] = 0;
snd_playSoundEffect(106);
_screen->fadePalette(_screen->_currentPalette, 90, &_updateFunctor);
memcpy(_screen->_currentPalette, _screen->getPalette(2), 768);
-
+
for (int i = 0; i < 768; i += 3) {
_screen->_currentPalette[i] = _screen->_currentPalette[i + 1] = 0;
_screen->_currentPalette[i + 2] += (((int8)_screen->_currentPalette[i + 2]) >> 1);
@@ -1155,9 +1155,9 @@ int KyraEngine_HoF::o2_mushroomEffect(EMCState *script) {
}
snd_playSoundEffect(106);
_screen->fadePalette(_screen->_currentPalette, 90, &_updateFunctor);
-
+
memcpy(_screen->_currentPalette, _screen->getPalette(2), 768);
- _screen->fadePalette(_screen->_currentPalette, 30, &_updateFunctor);
+ _screen->fadePalette(_screen->_currentPalette, 30, &_updateFunctor);
return 0;
}
@@ -1232,7 +1232,7 @@ int KyraEngine_HoF::o2_setupSceneAnimation(EMCState *script) {
obj->shapePtr = _sceneShapeTable[anim.shapeIndex];
else
obj->shapePtr = 0;
-
+
if (anim.flags & 0x40) {
obj->shapeIndex3 = anim.shapeIndex;
obj->animNum = index;
@@ -1267,10 +1267,10 @@ int KyraEngine_HoF::o2_stopSceneAnimation(EMCState *script) {
refreshAnimObjectsIfNeed();
obj.enabled = 0;
_animList = deleteAnimListEntry(_animList, &_animObjects[1+index]);
-
+
if (_sceneAnimMovie[index]->opened())
_sceneAnimMovie[index]->close();
-
+
return 0;
}
@@ -1425,7 +1425,7 @@ int KyraEngine_HoF::o2_demoFinale(EMCState *script) {
_sound->beginFadeOut();
_screen->fadeToBlack();
-
+
_runFlag = 0;
return 0;
}
diff --git a/engines/kyra/script_lok.cpp b/engines/kyra/script_lok.cpp
index 5cd35a6063..4901b5e1c4 100644
--- a/engines/kyra/script_lok.cpp
+++ b/engines/kyra/script_lok.cpp
@@ -1356,7 +1356,7 @@ int KyraEngine_LoK::o1_waitForConfirmationMouseClick(EMCState *script) {
_animator->updateAllObjectShapes();
updateInput();
-
+
int input = checkInput(_buttonList, false) & 0xFF;
removeInputTop();
if (input == 200)
diff --git a/engines/kyra/script_mr.cpp b/engines/kyra/script_mr.cpp
index 3273d3b89f..ddad2d28c3 100644
--- a/engines/kyra/script_mr.cpp
+++ b/engines/kyra/script_mr.cpp
@@ -358,7 +358,7 @@ int KyraEngine_MR::o3_drawSceneShape(EMCState *script) {
int KyraEngine_MR::o3_drawSceneShapeOnPage(EMCState *script) {
debugC(3, kDebugLevelScriptFuncs, "KyraEngine_MR::o3_drawSceneShapeOnPage(%p) (%d, %d, %d)", (const void *)script, stackPos(0), stackPos(1), stackPos(2));
const int shape = stackPos(0);
-
+
int x = _sceneShapeDescs[shape].drawX;
int y = _sceneShapeDescs[shape].drawY;
_screen->drawShape(stackPos(2), _sceneShapes[shape], x, y, 2, (stackPos(1) != 0) ? 1 : 0);
@@ -397,7 +397,7 @@ int KyraEngine_MR::o3_updateConversations(EMCState *script) {
case 0:
dlgIndex -= 34;
break;
-
+
case 1:
dlgIndex -= 54;
break;
@@ -616,7 +616,7 @@ int KyraEngine_MR::o3_setSceneAnimPosAndFrame(EMCState *script) {
const int newY2 = stackPos(2);
const int newX = stackPos(3);
const int newY = stackPos(4);
-
+
if (newX2 >= 0)
anim.x2 = newX2;
if (newY2 >= 0)
@@ -767,7 +767,7 @@ int KyraEngine_MR::o3_daggerWarning(EMCState *script) {
const char *str = 0;
int x = 0;
-
+
str = (const char *)getTableEntry(_cCodeFile, 120);
x = _text->getCenterStringX(str, 0xF, 0x68);
_text->printText(str, x, 174, 0xFF, 0xF0, 0x00);
@@ -1370,7 +1370,7 @@ void KyraEngine_MR::setupOpcodeTable() {
Opcode(o3_dummy);
OpcodeUnImpl();
Opcode(o3_dummy);
-
+
SetOpcodeTable(_opcodesAnimation);
// 0x00
Opcode(o2a_setAnimationShapes);
diff --git a/engines/kyra/script_tim.cpp b/engines/kyra/script_tim.cpp
index b10a6adbba..24f7fce576 100644
--- a/engines/kyra/script_tim.cpp
+++ b/engines/kyra/script_tim.cpp
@@ -82,13 +82,13 @@ TIMInterpreter::TIMInterpreter(KyraEngine_v1 *vm, Screen_v2 *screen, OSystem *sy
_commands = commandProcs;
_commandsSize = ARRAYSIZE(commandProcs);
-
+
memset(&_animations, 0, sizeof(_animations));
_langData = 0;
_textDisplayed = false;
_textAreaBuffer = new uint8[320*40];
assert(_textAreaBuffer);
-
+
_palDelayInc = _palDiff = _palDelayAcc = 0;
}
@@ -134,10 +134,10 @@ TIM *TIMInterpreter::load(const char *filename, const Common::Array<const TIMOpc
avtlChunkSize >>= 1;
for (uint i = 0; i < avtlChunkSize; ++i)
tim->avtl[i] = READ_LE_UINT16(tim->avtl + i);
-
+
int num = (avtlChunkSize < TIM::kCountFuncs) ? avtlChunkSize : (int)TIM::kCountFuncs;
for (int i = 0; i < num; ++i)
- tim->func[i].avtl = tim->avtl + tim->avtl[i];
+ tim->func[i].avtl = tim->avtl + tim->avtl[i];
strncpy(tim->filename, filename, 13);
@@ -328,7 +328,7 @@ void TIMInterpreter::setupTextPalette(uint index, int fadePalette) {
palette[1] = c2;
palette[2] = c3;
}
-
+
if (!fadePalette && !_palDiff) {
_screen->setScreenPalette(_screen->getPalette(0));
} else {
@@ -347,14 +347,14 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char
char file[32];
snprintf(file, 32, "%s.WSA", filename);
-
+
if (_vm->resource()->exists(file)) {
anim->wsa = new WSAMovie_v2(_vm, _screen);
assert(anim->wsa);
anim->wsa->open(file, wsaOpenFlags, (index == 1) ? _screen->getPalette(0) : 0);
}
-
+
if (anim->wsa && anim->wsa->opened()) {
if (x == -1)
anim->x = x = 0;
@@ -382,7 +382,7 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char
anim->wsa->setY(y);
anim->wsa->setDrawPage(0);
anim->wsa->displayFrame(0, 0, 0, 0);
- }
+ }
if (wsaFlags & 2)
_screen->fadePalette(_screen->getPalette(0), 30, 0);
@@ -406,7 +406,7 @@ TIMInterpreter::Animation *TIMInterpreter::initAnimStruct(int index, const char
if (wsaFlags & 2)
_screen->fadePalette(_screen->getPalette(0), 30, 0);
}
-
+
return anim;
}
@@ -460,13 +460,13 @@ int TIMInterpreter::cmd_initWSA(const uint16 *param) {
const int index = param[0];
TIM::WSASlot &slot = _currentTim->wsa[index];
-
+
slot.x = int16(param[2]);
slot.y = int16(param[3]);
slot.offscreen = param[4];
slot.wsaFlags = param[5];
const char *filename = (const char *)(_currentTim->text + READ_LE_UINT16(_currentTim->text + (param[1]<<1)));
-
+
slot.anim = initAnimStruct(index, filename, slot.x, slot.y, 10, slot.offscreen, slot.wsaFlags);
return 1;
}
@@ -475,12 +475,12 @@ int TIMInterpreter::cmd_uninitWSA(const uint16 *param) {
const int index = param[0];
TIM::WSASlot &slot = _currentTim->wsa[index];
-
+
if (!slot.anim)
return 0;
-
+
Animation &anim = _animations[index];
-
+
if (slot.offscreen) {
delete anim.wsa;
anim.wsa = 0;
@@ -492,7 +492,7 @@ int TIMInterpreter::cmd_uninitWSA(const uint16 *param) {
memset(&anim, 0, sizeof(Animation));
memset(&slot, 0, sizeof(TIM::WSASlot));
}
-
+
return 1;
}
@@ -516,7 +516,7 @@ int TIMInterpreter::cmd_stopFunc(const uint16 *param) {
int TIMInterpreter::cmd_wsaDisplayFrame(const uint16 *param) {
Animation &anim = _animations[param[0]];
const int frame = param[1];
-
+
anim.wsa->setX(anim.x);
anim.wsa->setY(anim.y);
anim.wsa->setDrawPage((anim.wsaCopyParams & 0x4000) != 0 ? 2 : 8);
@@ -553,7 +553,7 @@ int TIMInterpreter::cmd_playVocFile(const uint16 *param) {
_vm->sound()->voicePlay(_vocFiles[index].c_str()/*, volume*/, true);
else
_vm->snd_playSoundEffect(index, volume);
-
+
return 1;
}
@@ -579,7 +579,7 @@ int TIMInterpreter::cmd_setLoopIp(const uint16 *param) {
int TIMInterpreter::cmd_continueLoop(const uint16 *param) {
TIM::Function &func = _currentTim->func[_currentFunc];
-
+
if (!func.loopIp)
return -2;
@@ -591,7 +591,7 @@ int TIMInterpreter::cmd_continueLoop(const uint16 *param) {
uint32 waitTime = (random * factor) / 0x8000;
func.nextTime += waitTime * _vm->tickLength();
}
-
+
return 1;
}
diff --git a/engines/kyra/script_tim.h b/engines/kyra/script_tim.h
index 68ef23fd6c..3299622a19 100644
--- a/engines/kyra/script_tim.h
+++ b/engines/kyra/script_tim.h
@@ -91,10 +91,10 @@ public:
TIM *load(const char *filename, const Common::Array<const TIMOpcode*> *opcodes);
void unload(TIM *&tim) const;
-
+
void setLangData(const char *filename);
void clearLangData() { delete[] _langData; _langData = 0; }
-
+
const char *getCTableEntry(uint idx) const;
void resetFinishedFlag() { _finished = false; }
@@ -104,7 +104,7 @@ public:
void stopCurFunc() { if (_currentTim) cmd_stopCurFunc(0); }
void refreshTimersAfterPause(uint32 elapsedTime);
-
+
void displayText(uint16 textId, int16 flags);
void setupTextPalette(uint index, int fadePalette);
@@ -118,15 +118,15 @@ private:
int _currentFunc;
bool _finished;
-
+
Common::String _vocFiles[120];
-
+
Animation _animations[TIM::kWSASlots];
-
+
Animation *initAnimStruct(int index, const char *filename, int x, int y, int, int offscreenBuffer, uint16 wsaFlags);
-
+
char _audioFilename[32];
-
+
uint8 *_langData;
char *getTableEntry(uint idx);
bool _textDisplayed;
diff --git a/engines/kyra/sequences_hof.cpp b/engines/kyra/sequences_hof.cpp
index 7d0feaed16..7048225891 100644
--- a/engines/kyra/sequences_hof.cpp
+++ b/engines/kyra/sequences_hof.cpp
@@ -309,7 +309,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
_eventList.clear();
if (_menuChoice == 2) {
- seqNum = kSequenceTitle;
+ seqNum = kSequenceTitle;
_menuChoice = 0;
}
}
@@ -319,7 +319,7 @@ void KyraEngine_HoF::seq_playSequences(int startSeq, int endSeq) {
_eventList.clear();
_screen->fadeToBlack();
}
-
+
if (!_menuChoice)
delay(1200);
@@ -1798,7 +1798,7 @@ int KyraEngine_HoF::seq_demoDig(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
int KyraEngine_HoF::seq_lolDemoScene1(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
uint8 *tmpPal = _screen->getPalette(2);
-
+
if (!(_seqFrameCounter % 100)) {
if (_seqFrameCounter == 0) {
_sound->haltTrack();
@@ -1808,12 +1808,12 @@ int KyraEngine_HoF::seq_lolDemoScene1(WSAMovie_v2 *wsaObj, int x, int y, int frm
for (int i = 3; i < 0x300; i++) {
tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
if (tmpPal[i] > 0x3f)
- tmpPal[i] = 0x3f;
+ tmpPal[i] = 0x3f;
}
seq_playTalkText(_rnd.getRandomBit());
_screen->setScreenPalette(tmpPal);
_screen->updateScreen();
- delay(8);
+ delay(8);
} else {
_screen->setScreenPalette(_screen->getPalette(0));
_screen->updateScreen();
@@ -1853,7 +1853,7 @@ int KyraEngine_HoF::seq_lolDemoScene3(WSAMovie_v2 *wsaObj, int x, int y, int frm
seq_playTalkText(6);
else if (frm == 26)
seq_playTalkText(7);
-
+
_seqFrameCounter++;
return frm;
}
@@ -1887,7 +1887,7 @@ int KyraEngine_HoF::seq_lolDemoScene4(WSAMovie_v2 *wsaObj, int x, int y, int frm
default:
break;
}
-
+
_seqFrameCounter++;
return frm;
}
@@ -1929,7 +1929,7 @@ int KyraEngine_HoF::seq_lolDemoText5(WSAMovie_v2 *wsaObj, int x, int y, int frm)
}
int KyraEngine_HoF::seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm) {
- while (_seqScrollTextCounter < 0x122) {
+ while (_seqScrollTextCounter < 0x122) {
_seqEndTime = _system->getMillis() + 6 * _tickLength;
if (!_seqFrameCounter) {
_screen->loadBitmap("adtext.cps", 4, 4, 0);
@@ -1947,17 +1947,17 @@ int KyraEngine_HoF::seq_lolDemoScene6(WSAMovie_v2 *wsaObj, int x, int y, int frm
for (int i = 3; i < 0x300; i++) {
tmpPal[i] = ((int)tmpPal[i] * 120) / 64;
if (tmpPal[i] > 0x3f)
- tmpPal[i] = 0x3f;
+ tmpPal[i] = 0x3f;
}
seq_playTalkText(_rnd.getRandomBit());
_screen->setScreenPalette(tmpPal);
_screen->updateScreen();
delay(8);
}
-
+
if (_seqFrameCounter == 40 || _seqFrameCounter == 80 || _seqFrameCounter == 150 || _seqFrameCounter == 300)
seq_playTalkText(3);
-
+
_screen->copyPage(12, 2);
seq_scrollPage(70, 130);
_screen->copyPage(2, 0);
@@ -2767,7 +2767,7 @@ void KyraEngine_HoF::seq_scrollPage(int bottom, int top) {
if (dstH > 0) {
if (_demoAnimData) {
for (int i = 0; i < 4; i++) {
- const ItemAnimData_v1 *def = &_demoAnimData[i];
+ const ItemAnimData_v1 *def = &_demoAnimData[i];
ActiveItemAnim *a = &_activeItemAnim[i];
_screen->fillRect(12, def->y - 8, 28, def->y + 8, 0, 4);
@@ -2830,7 +2830,7 @@ void KyraEngine_HoF::seq_init() {
_res->unloadAllPakFiles();
_res->loadPakFile(StaticResource::staticDataFilename());
_res->loadFileList(_sequencePakList, _sequencePakListSize);
-
+
if (_flags.platform == Common::kPlatformPC98)
_sound->loadSoundFile("sound.dat");
@@ -2851,7 +2851,7 @@ void KyraEngine_HoF::seq_init() {
numShp++;
addShapeToPool(_screen->getPtrToShape(_animShapeFiledata, numShp), numShp);
} while (getShapePtr(numShp));
- } else {
+ } else {
MainMenu::StaticData data = {
{ _sequenceStrings[97], _sequenceStrings[96], _sequenceStrings[95], _sequenceStrings[98], 0 },
{ 0x01, 0x04, 0x0C, 0x04, 0x00, 0xd7, 0xd6 },
diff --git a/engines/kyra/sequences_mr.cpp b/engines/kyra/sequences_mr.cpp
index f41ed9c2f3..eb4c881e55 100644
--- a/engines/kyra/sequences_mr.cpp
+++ b/engines/kyra/sequences_mr.cpp
@@ -50,7 +50,7 @@ void KyraEngine_MR::showBadConscience() {
if (_goodConscienceShown)
_badConsciencePosition = !_goodConsciencePosition;
-
+
int anim = _badConscienceAnim + (_badConsciencePosition ? 0 : 8);
TalkObject &talkObject = _talkObjectList[1];
@@ -118,7 +118,7 @@ void KyraEngine_MR::showGoodConscience() {
_goodConscienceShown = true;
++_goodConscienceAnim;
_goodConscienceAnim %= 5;
-
+
setNextIdleAnimTimer();
_goodConsciencePosition = (_mainCharacter.x1 <= 160);
@@ -214,7 +214,7 @@ void KyraEngine_MR::eelScript() {
case 2:
runAnimationScript("EELS03.EMC", 0, 0, 1, 1);
break;
-
+
case 3:
runAnimationScript("EELS04.EMC", 0, 0, 1, 1);
break;
diff --git a/engines/kyra/sound.h b/engines/kyra/sound.h
index b456e96185..fc2e38d114 100644
--- a/engines/kyra/sound.h
+++ b/engines/kyra/sound.h
@@ -222,7 +222,7 @@ protected:
enum {
kNumChannelHandles = 4
};
-
+
struct SoundChannel {
Common::String file;
Audio::SoundHandle channelHandle;
@@ -438,7 +438,7 @@ public:
virtual kType getMusicType() const { return kPC98; }
bool init();
-
+
void process() {}
void loadSoundFile(uint file) {}
void loadSoundFile(Common::String) {}
@@ -484,7 +484,7 @@ protected:
uint8 *_musicTrackData;
uint8 *_sfxTrackData;
- TownsPC98_OpnDriver *_driver;
+ TownsPC98_OpnDriver *_driver;
};
class MixedSoundDriver : public Sound {
diff --git a/engines/kyra/sound_adlib.cpp b/engines/kyra/sound_adlib.cpp
index 32b09ecd2d..1509f530a3 100644
--- a/engines/kyra/sound_adlib.cpp
+++ b/engines/kyra/sound_adlib.cpp
@@ -2311,7 +2311,7 @@ void SoundAdlibPC::play(uint8 track) {
++pauseCount;
_vm->pauseEngine(false);
}
-
+
while ((_driver->callback(16, 0) & 8)) {
// We call the system delay and not the game delay to avoid concurrency issues.
_vm->_system->delayMillis(10);
diff --git a/engines/kyra/sound_digital.cpp b/engines/kyra/sound_digital.cpp
index 20f3a7f9f9..b21336e993 100644
--- a/engines/kyra/sound_digital.cpp
+++ b/engines/kyra/sound_digital.cpp
@@ -56,7 +56,7 @@ private:
int32 _fadeSamples;
int32 _fadeCount;
int _fading;
-
+
bool _endOfData;
};
@@ -69,13 +69,13 @@ void KyraAudioStream::beginFadeOut(uint32 millis) {
int KyraAudioStream::readBuffer(int16 *buffer, const int numSamples) {
int samplesRead = _impl->readBuffer(buffer, numSamples);
-
+
if (_fading) {
int samplesProcessed = 0;
for (; samplesProcessed < samplesRead; ++samplesProcessed) {
// To help avoid overflows for long fade times, we divide both
// _fadeSamples and _fadeCount when calculating the new sample.
-
+
int32 div = _fadeSamples / 256;
if (_fading) {
*buffer = (*buffer * (_fadeCount / 256)) / div;
@@ -429,7 +429,7 @@ int SoundDigital::playSound(const char *filename, uint8 priority, Audio::Mixer::
if (volume > 255)
volume = 255;
volume = (volume * Audio::Mixer::kMaxChannelVolume) / 255;
-
+
if (type == Audio::Mixer::kSpeechSoundType && _vm->heliumMode())
use->stream->setRate(32765);
diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index 357a1d1a0a..8870c2e516 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -176,7 +176,7 @@ void MidiOutput::send(uint32 b) {
byte param2 = (b >> 16) & 0xFF;
if (event == 0xE0) { // Pitch-Wheel
- _channels[channel].pitchWheel =
+ _channels[channel].pitchWheel =
_sources[_curSource].channelPW[channel] = (param2 << 8) | param1;
} else if (event == 0xC0) { // Program change
_channels[channel].program =
@@ -382,7 +382,7 @@ int MidiOutput::lockChannel() {
notes = _channels[i].noteCount;
}
}
-
+
if (channel == -1) {
if (flags & kChannelProtected)
flags &= ~kChannelProtected;
@@ -425,7 +425,7 @@ void MidiOutput::unlockChannel(int channel) {
void MidiOutput::stopNotesOnChannel(int channel) {
for (int i = 0; i < 4; ++i) {
- SoundSource &sound = _sources[i];
+ SoundSource &sound = _sources[i];
for (int j = 0; j < 32; ++j) {
if (sound.notes[j].channel == channel) {
sound.notes[j].channel = 0xFF;
@@ -520,7 +520,7 @@ bool SoundMidiPC::init() {
else
pakFile = "INTROVOC.PAK";
}
-
+
if (!midiFile)
return true;
@@ -701,7 +701,7 @@ void SoundMidiPC::onTimer(void *data) {
for (int i = 0; i < 16; ++i)
midi->_output->stopNotesOnChannel(i);
for (int i = 0; i < 4; ++i)
- midi->_output->deinitSource(i);
+ midi->_output->deinitSource(i);
midi->_output->setSoundSource(0);
midi->_music->stopPlaying();
diff --git a/engines/kyra/sound_towns.cpp b/engines/kyra/sound_towns.cpp
index 34c2c9c490..5edf662bd4 100644
--- a/engines/kyra/sound_towns.cpp
+++ b/engines/kyra/sound_towns.cpp
@@ -1174,7 +1174,7 @@ void TownsPC98_OpnOperator::keyOn() {
void TownsPC98_OpnOperator::keyOff() {
if (!_playing)
return;
-
+
_playing = false;
if (_state != s_ready)
_state = s_releasing;
@@ -1361,7 +1361,7 @@ public:
virtual void fadeStep();
void reset();
- const uint8 _idFlag;
+ const uint8 _idFlag;
protected:
void setupVibrato();
@@ -1623,7 +1623,7 @@ protected:
private:
void nextTick(int32 *buffer, uint32 bufferSize);
void generateOutput(int32 &leftSample, int32 &rightSample, int32 *del, int32 *feed);
-
+
struct ChanInternal {
uint16 frqTemp;
bool enableLeft;
@@ -1637,7 +1637,7 @@ private:
TownsPC98_OpnSquareSineSource *_ssg;
TownsPC98_OpnPercussionSource *_prc;
ChanInternal *_chanInternal;
-
+
uint8 *_oprRates;
uint8 *_oprRateshift;
uint8 *_oprAttackDecay;
@@ -1653,7 +1653,7 @@ private:
struct OpnTimer {
bool enabled;
uint16 value;
-
+
int32 smpTillCb;
uint32 smpTillCbRem;
int32 smpPerCb;
@@ -1699,7 +1699,7 @@ public:
void timerCallbackB();
void timerCallbackA();
-
+
bool looping() { return _looping == _updateChannelsFlag ? true : false; }
bool musicPlaying() { return _musicPlaying; }
@@ -1751,7 +1751,7 @@ protected:
uint16 _sfxOffsets[2];
static const uint8 _drvTables[];
-
+
bool _ready;
};
@@ -1897,7 +1897,7 @@ void TownsPC98_OpnChannel::processEvents() {
void TownsPC98_OpnChannel::processFrequency() {
if (_flags & CHS_RECALCFREQ) {
-
+
_frequency = (((const uint16*)_drv->_opnFreqTable)[_frqBlockMSB & 0x0f] + _frqLSB) | (((_frqBlockMSB & 0x70) >> 1) << 8);
_drv->writeReg(_part, _regOffset + 0xa4, (_frequency >> 8));
@@ -1970,7 +1970,7 @@ void TownsPC98_OpnChannel::reset() {
_ticksLeft = 1;
_flags = (_flags & ~CHS_EOT) | CHS_ALLOFF;
-
+
_totalLevel = 0;
_algorithm = 0;
_flags = CHS_EOT;
@@ -1986,7 +1986,7 @@ void TownsPC98_OpnChannel::reset() {
_ssgTargetLvl = 0;
_ssgStep = 0;
_ssgTicksLeft = 0;
-
+
_vbrInitDelayHi = 0;
_vbrInitDelayLo = 0;
_vbrModInitVal = 0;
@@ -2101,7 +2101,7 @@ bool TownsPC98_OpnChannel::control_f8_toggleVibrato(uint8 para) {
uint8 skipChannels = para / 36;
uint8 entry = para % 36;
TownsPC98_OpnDriver::TownsPC98_OpnChannel *t = &chan[skipChannels];
-
+
t->unnamedEntries[entry] = *_dataPtr++;*/
}
return true;
@@ -2571,7 +2571,7 @@ TownsPC98_OpnSquareSineSource::TownsPC98_OpnSquareSineSource(const uint32 timerb
_reg[7] = &_chanEnable;
_reg[8] = &_channels[0].vol;
_reg[9] = &_channels[1].vol;
- _reg[10] = &_channels[2].vol;
+ _reg[10] = &_channels[2].vol;
reset();
}
@@ -2731,7 +2731,7 @@ void TownsPC98_OpnSquareSineSource::updatesRegs() {
TownsPC98_OpnPercussionSource::TownsPC98_OpnPercussionSource(const uint32 timerbase) :
_tickLength(timerbase * 2), _timer(0), _ready(false) {
-
+
memset(_rhChan, 0, sizeof(RhtChannel) * 6);
_reg = new uint8 *[40];
@@ -2908,7 +2908,7 @@ void TownsPC98_OpnPercussionSource::advanceInput(RhtChannel *ins) {
60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337,
371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552
};
-
+
uint8 cur = (int8) *ins->pos++;
for (int i = 0; i < 2; i++) {
@@ -2928,7 +2928,7 @@ TownsPC98_OpnCore::TownsPC98_OpnCore(Audio::Mixer *mixer, OpnType type) :
_regProtectionFlag(false), _ready(false) {
memset(&_timers[0], 0, sizeof(OpnTimer));
- memset(&_timers[1], 0, sizeof(OpnTimer));
+ memset(&_timers[1], 0, sizeof(OpnTimer));
_timers[0].cb = &TownsPC98_OpnCore::timerCallbackA;
_timers[1].cb = &TownsPC98_OpnCore::timerCallbackB;
_timerbase = (uint32)(_baserate * 1000000.0f);
@@ -2956,7 +2956,7 @@ bool TownsPC98_OpnCore::init() {
}
generateTables();
-
+
TownsPC98_OpnOperator **opr = new TownsPC98_OpnOperator*[_numChan << 2];
for (int i = 0; i < (_numChan << 2); i++)
opr[i] = new TownsPC98_OpnOperator(_timerbase, _oprRates, _oprRateshift, _oprAttackDecay, _oprFrq, _oprSinTbl, _oprLevelOut, _oprDetune);
@@ -2985,7 +2985,7 @@ bool TownsPC98_OpnCore::init() {
return true;
}
-void TownsPC98_OpnCore::reset() {
+void TownsPC98_OpnCore::reset() {
for (int i = 0; i < _numChan; i++) {
for (int ii = 0; ii < 4; ii++)
_chanInternal[i].opr[ii]->reset();
@@ -3010,14 +3010,14 @@ void TownsPC98_OpnCore::writeReg(uint8 part, uint8 regAddress, uint8 value) {
return;
static const uint8 oprOrdr[] = { 0, 2, 1, 3 };
-
+
uint8 h = regAddress & 0xf0;
uint8 l = (regAddress & 0x0f);
ChanInternal *c = 0;
TownsPC98_OpnOperator **co = 0;
TownsPC98_OpnOperator *o = 0;
-
+
if (regAddress > 0x2F) {
c = &_chanInternal[(l & 3) + 3 * part];
co = c->opr;
@@ -3052,7 +3052,7 @@ void TownsPC98_OpnCore::writeReg(uint8 part, uint8 regAddress, uint8 value) {
_timers[0].value = (_timers[0].value & 0xff00) | value;
} else if (l == 5) {
// Timer A
- _timers[0].value = (_timers[0].value & 0xff) | (value << 8);
+ _timers[0].value = (_timers[0].value & 0xff) | (value << 8);
} else if (l == 6) {
// Timer B
_timers[1].value = value & 0xff;
@@ -3071,12 +3071,12 @@ void TownsPC98_OpnCore::writeReg(uint8 part, uint8 regAddress, uint8 value) {
if (value & 10) {
_timers[0].smpTillCb = _timers[0].smpPerCb;
_timers[0].smpTillCbRem = _timers[0].smpTillCbRem;
- }
+ }
if (value & 20) {
_timers[1].smpTillCb = _timers[1].smpPerCb;
_timers[1].smpTillCbRem = _timers[1].smpTillCbRem;
- }
+ }
} else if (l == 2) {
// LFO
warning("TownsPC98_OpnDriver: TRYING TO USE LFO (NOT SUPPORTED)");
@@ -3316,12 +3316,12 @@ void TownsPC98_OpnCore::nextTick(int32 *buffer, uint32 bufferSize) {
for (uint32 ii = 0; ii < bufferSize ; ii++) {
int32 phbuf1, phbuf2, output;
phbuf1 = phbuf2 = output = 0;
-
+
int32 *leftSample = &buffer[ii * 2];
int32 *rightSample = &buffer[ii * 2 + 1];
int32 *del = &_chanInternal[i].feedbuf[2];
int32 *feed = _chanInternal[i].feedbuf;
-
+
switch (_chanInternal[i].algorithm) {
case 0:
o[0]->generateOutput(0, feed, phbuf1);
@@ -3393,19 +3393,19 @@ void TownsPC98_OpnCore::nextTick(int32 *buffer, uint32 bufferSize) {
}
TownsPC98_OpnDriver::TownsPC98_OpnDriver(Audio::Mixer *mixer, OpnType type) : TownsPC98_OpnCore(mixer, type),
- _channels(0), _ssgChannels(0), _sfxChannels(0), _rhythmChannel(0),
- _trackPtr(0), _sfxData(0), _sfxOffs(0), _ssgPatches(0),
+ _channels(0), _ssgChannels(0), _sfxChannels(0), _rhythmChannel(0),
+ _trackPtr(0), _sfxData(0), _sfxOffs(0), _ssgPatches(0),
_opnCarrier(_drvTables + 76), _opnFreqTable(_drvTables + 108), _opnFreqTableSSG(_drvTables + 132),
_opnFxCmdLen(_drvTables + 36), _opnLvlPresets(_drvTables + (type == OD_TOWNS ? 52 : 84)),
-
+
_updateChannelsFlag(type == OD_TYPE26 ? 0x07 : 0x3F), _finishedChannelsFlag(0),
_updateSSGFlag(type == OD_TOWNS ? 0x00 : 0x07), _finishedSSGFlag(0),
_updateRhythmFlag(type == OD_TYPE86 ? 0x01 : 0x00), _finishedRhythmFlag(0),
_updateSfxFlag(type == OD_TOWNS ? 0x00 : 0x06), _finishedSfxFlag(0),
-
+
_musicTickCounter(0),
-
+
_musicPlaying(false), _sfxPlaying(false), _fading(false), _looping(0), _ready(false) {
}
@@ -3526,7 +3526,7 @@ void TownsPC98_OpnDriver::loadMusicData(uint8 *data, bool loadPaused) {
_patches = src_a + 4;
_finishedChannelsFlag = _finishedSSGFlag = _finishedRhythmFlag = 0;
- _musicPlaying = (loadPaused ? false : true);
+ _musicPlaying = (loadPaused ? false : true);
unlock();
}
@@ -3596,7 +3596,7 @@ void TownsPC98_OpnDriver::fadeStep() {
if (_updateChannelsFlag & _channels[j]->_idFlag)
_channels[j]->fadeStep();
}
-
+
for (int j = 0; j < _numSSG; j++) {
if (_updateSSGFlag & _ssgChannels[j]->_idFlag)
_ssgChannels[j]->fadeStep();
@@ -3637,7 +3637,7 @@ void TownsPC98_OpnDriver::timerCallbackB() {
_ssgChannels[i]->processFrequency();
}
}
-
+
if (_hasPercussion)
if (_updateRhythmFlag & _rhythmChannel->_idFlag)
_rhythmChannel->processEvents();
@@ -4139,7 +4139,7 @@ bool SoundTownsPC98_v2::init() {
if (_musicEnabled &&
(res->exists("track1.mp3") || res->exists("track1.ogg") || res->exists("track1.flac") || res->exists("track1.fla")))
_musicEnabled = 2;
-
+
return _driver->init();
}
diff --git a/engines/kyra/staticres.cpp b/engines/kyra/staticres.cpp
index 6653a6b47e..f97f5c808a 100644
--- a/engines/kyra/staticres.cpp
+++ b/engines/kyra/staticres.cpp
@@ -777,7 +777,7 @@ bool StaticResource::loadHofSequenceData(const char *filename, void *&ptr, int &
tmp_f[ii].index = file->readUint16BE();
tmp_f[ii].delay = file->readUint16BE();
}
-
+
tmp_n[i].wsaControl = (const FrameControl*) tmp_f;
size += (num_c * sizeof(FrameControl));
@@ -807,7 +807,7 @@ bool StaticResource::loadShapeAnimData_v1(const char *filename, void *&ptr, int
if (!file)
return false;
- size = file->readByte();
+ size = file->readByte();
ItemAnimData_v1 *loadTo = new ItemAnimData_v1[size];
assert(loadTo);
@@ -1251,7 +1251,7 @@ void KyraEngine_HoF::initStaticResource() {
_sequencePakList = _staticres->loadStrings(k2SeqplayPakFiles, _sequencePakListSize);
_ingamePakList = _staticres->loadStrings(k2IngamePakFiles, _ingamePakListSize);
- _sequenceStrings = _staticres->loadStrings(k2SeqplayStrings, _sequenceStringsSize);
+ _sequenceStrings = _staticres->loadStrings(k2SeqplayStrings, _sequenceStringsSize);
_ingameSoundList = _staticres->loadStrings(k2IngameSfxFiles, _ingameSoundListSize);
_ingameSoundIndex = (const uint16 *)_staticres->loadRawData(k2IngameSfxIndex, _ingameSoundIndexSize);
_musicFileListIntro = _staticres->loadStrings(k2SeqplayIntroTracks, _musicFileListIntroSize);
@@ -1395,9 +1395,9 @@ void KyraEngine_MR::initStaticResource() {
int tmp = 0;
_mainMenuStrings = _staticres->loadStrings(k3MainMenuStrings, _mainMenuStringsSize);
_soundList = _staticres->loadStrings(k3MusicFiles, _soundListSize);
- _scoreTable = _staticres->loadRawData(k3ScoreTable, _scoreTableSize);
+ _scoreTable = _staticres->loadRawData(k3ScoreTable, _scoreTableSize);
_sfxFileList = _staticres->loadStrings(k3SfxFiles, _sfxFileListSize);
- _sfxFileMap = _staticres->loadRawData(k3SfxMap, _sfxFileMapSize);
+ _sfxFileMap = _staticres->loadRawData(k3SfxMap, _sfxFileMapSize);
_itemAnimData = _staticres->loadShapeAnimData_v2(k3ItemAnimData, tmp);
_itemMagicTable = _staticres->loadRawData(k3ItemMagicTable, tmp);
_itemStringMap = _staticres->loadRawData(k3ItemStringMap, _itemStringMapSize);
@@ -1499,13 +1499,13 @@ void GUI_LoK::initStaticResource() {
_menu[0].item[2].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::gameControlsMenu);
_menu[0].item[3].callback = quitPlayingFunctor;
_menu[0].item[4].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::resumeGame);
-
+
GUI_V1_MENU(_menu[1], -1, -1, 0x140, 0x38, 248, 249, 250, 0, 254,-1, 8, 0, 2, -1, -1, -1, -1);
GUI_V1_MENU_ITEM(_menu[1].item[0], 1, 0, 0, 0, 0x18, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
GUI_V1_MENU_ITEM(_menu[1].item[1], 1, 0, 0, 0, 0xD8, 0, 0x1E, 0x48, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[1].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmYes);
_menu[1].item[1].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::quitConfirmNo);
-
+
GUI_V1_MENU(_menu[2], -1, -1, 0x120, 0xA0, 248, 249, 250, 0, 251, -1, 8, 0, 6, 132, 22, 132, 124);
GUI_V1_MENU_ITEM(_menu[2].item[0], 1, 0, 0, 0, -1, 255, 0x27, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
GUI_V1_MENU_ITEM(_menu[2].item[1], 1, 0, 0, 0, -1, 255, 0x38, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
@@ -1514,13 +1514,13 @@ void GUI_LoK::initStaticResource() {
GUI_V1_MENU_ITEM(_menu[2].item[4], 1, 0, 0, 0, -1, 255, 0x6B, 0x100, 0x0F, 252, 253, 5, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
GUI_V1_MENU_ITEM(_menu[2].item[5], 1, 0, 0, 0, 0xB8, 0, 0x86, 0x58, 0x0F, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[2].item[5].callback = cancelSubMenuFunctor;
-
+
GUI_V1_MENU(_menu[3], -1, -1, 288, 67, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1);
GUI_V1_MENU_ITEM(_menu[3].item[0], 1, 0, 0, 0, 24, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
GUI_V1_MENU_ITEM(_menu[3].item[1], 1, 0, 0, 0, 179, 0, 44, 85, 15, 252, 253, -1, 255, 248, 249, 250, -1, 0, 0, 0, 0, 0);
_menu[3].item[0].callback = BUTTON_FUNCTOR(GUI_LoK, this, &GUI_LoK::savegameConfirm);
_menu[3].item[1].callback = cancelSubMenuFunctor;
-
+
GUI_V1_MENU(_menu[4], -1, -1, 0xD0, 0x4C, 248, 249, 250, 0, 251, -1, 8, 0, 2, -1, -1, -1, -1);
GUI_V1_MENU_ITEM(_menu[4].item[0], 1, 0, 0, 0, -1, -1, 0x1E, 0xB4, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
GUI_V1_MENU_ITEM(_menu[4].item[1], 1, 0, 0, 0, -1, -1, 0x2F, 0xB4, 0x0F, 252, 253, -1, 0, 248, 249, 250, -1, 0, 0, 0, 0, 0);
@@ -1917,7 +1917,7 @@ void GUI_HoF::initStaticData() {
_choiceMenu.item[i].enabled = false;
for (int i = 0; i < 7; ++i)
_choiceMenu.item[i].itemId = menuStr[3 * 8 + i + 1];
-
+
GUI_V2_MENU(_loadMenu, -1, -1, 0x120, 0xA0, 0xF8, 0xF9, 0xFA, menuStr[4 * 8], 0xFB, -1, 8, 0, 6, 0x84, 0x16, 0x84, 0x7C);
GUI_V2_MENU_ITEM(_loadMenu.item[0], 1, 0x29, -1, 0x27, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
GUI_V2_MENU_ITEM(_loadMenu.item[1], 1, 0x2A, -1, 0x38, 0x100, 0xF, 0xFC, 0xFD, 5, 0xF8, 0xF9, 0xFA, -1, 0, 0, 0, 0);
@@ -2103,7 +2103,7 @@ const char *KyraEngine_MR::_languageExtension[] = {
"TRF",
"TRG"/*,
"TRI", Italian and Spanish were never included, the supported fan translations are using
- "TRS" English/French extensions thus overwriting these languages */
+ "TRS" English/French extensions thus overwriting these languages */
};
const int KyraEngine_MR::_languageExtensionSize = ARRAYSIZE(KyraEngine_MR::_languageExtension);
diff --git a/engines/kyra/text_mr.cpp b/engines/kyra/text_mr.cpp
index 41b4c30245..dc3e1235c6 100644
--- a/engines/kyra/text_mr.cpp
+++ b/engines/kyra/text_mr.cpp
@@ -58,8 +58,8 @@ char *TextDisplayer_MR::preprocessString(const char *str) {
offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
p += count + offs;
// No update of textWidth here
- }
-
+ }
+
if (textWidth > (2*maxTextWidth)) {
count = getCharLength(p, textWidth/3);
offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
@@ -68,13 +68,13 @@ char *TextDisplayer_MR::preprocessString(const char *str) {
}
count = getCharLength(p, textWidth/2);
- offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
+ offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
p += count + offs;
textWidth = _screen->getTextWidth(p);
if (textWidth > maxTextWidth) {
count = getCharLength(p, textWidth/2);
- offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
+ offs = dropCRIntoString(p, count, getCharLength(p, maxTextWidth));
}
}
@@ -250,7 +250,7 @@ void KyraEngine_MR::objectChatInit(const char *str, int object, int vocHigh, int
debugC(9, kDebugLevelMain, "KyraEngine_MR::objectChatInit('%s', %d, %d, %d)", str, object, vocHigh, vocLow);
str = _text->preprocessString(str);
int lineNum = _text->buildMessageSubstrings(str);
-
+
int xPos = 0, yPos = 0;
if (!object) {
@@ -508,7 +508,7 @@ void KyraEngine_MR::albumChat(const char *str, int vocHigh, int vocLow) {
_talkObjectList[1].x = 190;
_talkObjectList[1].y = 188;
-
+
_chatVocHigh = _chatVocLow = -1;
_albumChatActive = true;
albumChatInit(str, 1, vocHigh, vocLow);
@@ -543,7 +543,7 @@ void KyraEngine_MR::albumChatInit(const char *str, int object, int vocHigh, int
str = _text->preprocessString(str);
int lineNum = _text->buildMessageSubstrings(str);
-
+
int xPos = 0, yPos = 0;
if (!object) {
@@ -670,7 +670,7 @@ void KyraEngine_MR::updateDlgBuffer() {
snprintf(dlgFile, 16, "CH%.02d-S%.02d.", _currentChapter, _mainCharacter.dlgIndex);
appendLanguage(dlgFile, _lang, 16);
snprintf(cnvFile, 16, "CH%.02d-S%.02d.CNV", _currentChapter, _mainCharacter.dlgIndex);
-
+
delete _cnvFile;
delete _dlgBuffer;
@@ -750,7 +750,7 @@ void KyraEngine_MR::processDialog(int vocHighIndex, int vocHighBase, int funcNum
while (running) {
uint16 cmd = _cnvFile->readUint16LE();
int object = cmd - 12;
-
+
if (cmd == 10) {
break;
} else if (cmd == 4) {
@@ -901,12 +901,12 @@ void KyraEngine_MR::randomSceneChat() {
void KyraEngine_MR::runDialog(int dlgIndex, int funcNum) {
debugC(9, kDebugLevelMain, "KyraEngine_MR::runDialog(%d, %d)", dlgIndex, funcNum);
-
+
switch (_currentChapter-2) {
case 0:
dlgIndex -= 34;
break;
-
+
case 1:
dlgIndex -= 54;
break;
diff --git a/engines/kyra/timer.cpp b/engines/kyra/timer.cpp
index 777871d65a..da7e22f684 100644
--- a/engines/kyra/timer.cpp
+++ b/engines/kyra/timer.cpp
@@ -199,7 +199,7 @@ void TimerManager::setNextRun(uint8 id, uint32 nextRun) {
Iterator timer = Common::find_if(_timers.begin(), _timers.end(), TimerEqual(id));
if (timer != _timers.end()) {
- timer->nextRun = nextRun;
+ timer->nextRun = nextRun;
return;
}
diff --git a/engines/kyra/vqa.cpp b/engines/kyra/vqa.cpp
index 0f6440fd47..851f36f742 100644
--- a/engines/kyra/vqa.cpp
+++ b/engines/kyra/vqa.cpp
@@ -657,7 +657,7 @@ void VQAMovie::play() {
if (_vm->_mixer->isSoundHandleActive(_sound))
elapsedTime = _vm->_mixer->getSoundElapsedTime(_sound);
- else
+ else
elapsedTime = _system->getMillis() - startTick;
if (elapsedTime >= (i * 1000) / _header.frameRate)
diff --git a/engines/kyra/wsamovie.cpp b/engines/kyra/wsamovie.cpp
index 110755c3ba..818f3c691f 100644
--- a/engines/kyra/wsamovie.cpp
+++ b/engines/kyra/wsamovie.cpp
@@ -503,7 +503,7 @@ void WSAMovie_v2::displayFrame(int frameNum, ...) {
const uint8 *unkPtr1 = va_arg(args, const uint8*);
const uint8 *unkPtr2 = va_arg(args, const uint8*);
va_end(args);
-
+
_screen->copyWsaRect(_x, _y, _width, _height, 0, plotFunc, _offscreenBuffer, unk1, unkPtr1, unkPtr2);
_screen->_curPage = pageBackUp;