aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorJohannes Schickel2012-03-05 20:02:05 +0100
committerJohannes Schickel2012-03-05 20:08:59 +0100
commit9671b44df8ecd1db46758508b1303d8ab3f515dd (patch)
treee0d78f84659e53b49ae6628de6b2aa21361afa78 /engines
parent865c54c125f0b5b0af1cd251cf07ec596dd4631a (diff)
downloadscummvm-rg350-9671b44df8ecd1db46758508b1303d8ab3f515dd.tar.gz
scummvm-rg350-9671b44df8ecd1db46758508b1303d8ab3f515dd.tar.bz2
scummvm-rg350-9671b44df8ecd1db46758508b1303d8ab3f515dd.zip
KYRA: Some formatting fixes.
Diffstat (limited to 'engines')
-rw-r--r--engines/kyra/gui_rpg.cpp5
-rw-r--r--engines/kyra/kyra_rpg.cpp16
-rw-r--r--engines/kyra/kyra_v1.h2
-rw-r--r--engines/kyra/saveload_rpg.cpp2
-rw-r--r--engines/kyra/scene_rpg.cpp6
-rw-r--r--engines/kyra/screen_eob.cpp2
-rw-r--r--engines/kyra/text_rpg.cpp26
7 files changed, 31 insertions, 28 deletions
diff --git a/engines/kyra/gui_rpg.cpp b/engines/kyra/gui_rpg.cpp
index a8b94032d0..be40050bb1 100644
--- a/engines/kyra/gui_rpg.cpp
+++ b/engines/kyra/gui_rpg.cpp
@@ -40,7 +40,8 @@ void KyraRpgEngine::removeInputTop() {
}
void KyraRpgEngine::gui_drawBox(int x, int y, int w, int h, int frameColor1, int frameColor2, int fillColor) {
- w--; h--;
+ w--;
+ h--;
if (fillColor != -1)
screen()->fillRect(x + 1, y + 1, x + w - 1, y + h - 1, fillColor);
@@ -128,6 +129,6 @@ bool KyraRpgEngine::clickedShape(int shapeIndex) {
return false;
}
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // defined(ENABLE_EOB) || defined(ENABLE_LOL)
diff --git a/engines/kyra/kyra_rpg.cpp b/engines/kyra/kyra_rpg.cpp
index 8857f64f7e..f1d9550e8f 100644
--- a/engines/kyra/kyra_rpg.cpp
+++ b/engines/kyra/kyra_rpg.cpp
@@ -217,11 +217,11 @@ void KyraRpgEngine::drawDialogueButtons() {
if (gameFlags().use16ColorMode) {
gui_drawBox(x, ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) & ~7) - 1, 74, 10, 0xee, 0xcc, -1);
screen()->printText(_dialogueButtonString[i], (x + 37 - (screen()->getTextWidth(_dialogueButtonString[i])) / 2) & ~3,
- ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xc1 : 0xe1, 0);
+ ((_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2) & ~7, _dialogueHighlightedButton == i ? 0xc1 : 0xe1, 0);
} else {
gui_drawBox(x, (_dialogueButtonYoffs + _dialogueButtonPosY[i]), _dialogueButtonWidth, guiSettings()->buttons.height, guiSettings()->colors.frame1, guiSettings()->colors.frame2, guiSettings()->colors.fill);
screen()->printText(_dialogueButtonString[i], x + (_dialogueButtonWidth >> 1) - (screen()->getTextWidth(_dialogueButtonString[i])) / 2,
- (_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2, _dialogueHighlightedButton == i ? _dialogueButtonLabelColor1 : _dialogueButtonLabelColor2, 0);
+ (_dialogueButtonYoffs + _dialogueButtonPosY[i]) + 2, _dialogueHighlightedButton == i ? _dialogueButtonLabelColor1 : _dialogueButtonLabelColor2, 0);
}
}
screen()->setFont(of);
@@ -255,11 +255,11 @@ uint16 KyraRpgEngine::processDialogue() {
}
if (snd_updateCharacterSpeech() != 2) {
- res = 1;
- if (!shouldQuit()) {
- removeInputTop();
- gui_notifyButtonListChanged();
- }
+ res = 1;
+ if (!shouldQuit()) {
+ removeInputTop();
+ gui_notifyButtonListChanged();
+ }
}
} else {
int e = checkInput(0, false, 0) & 0xFF;
@@ -362,6 +362,6 @@ void KyraRpgEngine::updateEnvironmentalSfx(int soundId) {
snd_processEnvironmentalSoundEffect(soundId, _currentBlock);
}
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB || ENABLE_LOL
diff --git a/engines/kyra/kyra_v1.h b/engines/kyra/kyra_v1.h
index 11173a45c7..0033969047 100644
--- a/engines/kyra/kyra_v1.h
+++ b/engines/kyra/kyra_v1.h
@@ -119,7 +119,7 @@ struct GameFlags {
bool useAltShapeHeader : 1; // alternative shape header (uses 2 bytes more, those are unused though)
bool isTalkie : 1;
bool isOldFloppy : 1;
- bool useHiRes : 1;
+ bool useHiRes : 1;
bool use16ColorMode : 1;
bool useDigSound : 1;
bool useInstallerPackage : 1;
diff --git a/engines/kyra/saveload_rpg.cpp b/engines/kyra/saveload_rpg.cpp
index f3eef0d811..d22c50dbeb 100644
--- a/engines/kyra/saveload_rpg.cpp
+++ b/engines/kyra/saveload_rpg.cpp
@@ -122,6 +122,6 @@ void KyraRpgEngine::releaseFlyingObjectTempData(LevelTempData *tmp) {
delete[] p;
}
-} // End of namespace Kyra
+} // End of namespace Kyra
#endif // ENABLE_EOB || ENABLE_LOL
diff --git a/engines/kyra/scene_rpg.cpp b/engines/kyra/scene_rpg.cpp
index b015b10cd9..3a694e05fe 100644
--- a/engines/kyra/scene_rpg.cpp
+++ b/engines/kyra/scene_rpg.cpp
@@ -133,7 +133,7 @@ void KyraRpgEngine::generateBlockDrawingBuffer() {
_sceneDrawVarLeft = _dscBlockMap[_currentDirection + 8];
/*******************************************
- * _visibleBlocks map *
+ * _visibleBlocks map *
* *
* | | | | | | *
* 00 | 01 | 02 | 03 | 04 | 05 | 06 *
@@ -337,7 +337,7 @@ bool KyraRpgEngine::checkSceneUpdateNeed(int block) {
}
}
- if (_currentBlock == block){
+ if (_currentBlock == block) {
_sceneUpdateRequired = true;
return true;
}
@@ -626,7 +626,7 @@ void KyraRpgEngine::completeDoorOperations() {
do {
_levelBlockProperties[b].walls[_openDoorState[i].wall] += _openDoorState[i].state;
_levelBlockProperties[b].walls[_openDoorState[i].wall ^ 2] += _openDoorState[i].state;
- } while (!(_wllWallFlags[_levelBlockProperties[b].walls[_openDoorState[i].wall]] & 0x30));
+ } while (!(_wllWallFlags[_levelBlockProperties[b].walls[_openDoorState[i].wall]] & 0x30));
_openDoorState[i].block = 0;
}
diff --git a/engines/kyra/screen_eob.cpp b/engines/kyra/screen_eob.cpp
index 9fae729bc4..e06ca42c40 100644
--- a/engines/kyra/screen_eob.cpp
+++ b/engines/kyra/screen_eob.cpp
@@ -147,7 +147,7 @@ void Screen_EoB::setMouseCursor(int x, int y, const byte *shape, const uint8 *ov
uint8 *cursor = new uint8[mouseW * _pageScaleFactor[6] * mouseH * _pageScaleFactor[6]];
// We use memset and copyBlockToPage instead of fillRect to make sure that the
// color key 0xFF doesn't get converted into EGA color
- memset (cursor, colorKey, mouseW * _pageScaleFactor[6] * mouseH * _pageScaleFactor[6]);
+ memset(cursor, colorKey, mouseW * _pageScaleFactor[6] * mouseH * _pageScaleFactor[6]);
copyBlockToPage(6, 0, 0, mouseW, mouseH, cursor);
drawShape(6, shape, 0, 0, 0, 2, ovl);
CursorMan.showMouse(false);
diff --git a/engines/kyra/text_rpg.cpp b/engines/kyra/text_rpg.cpp
index d0f7b5e532..b004270055 100644
--- a/engines/kyra/text_rpg.cpp
+++ b/engines/kyra/text_rpg.cpp
@@ -46,7 +46,7 @@ TextDisplayer_rpg::TextDisplayer_rpg(KyraRpgEngine *engine, Screen *scr) : _vm(e
_textDimData = new TextDimData[_screen->screenDimTableCount()];
- for (int i = 0; i < _screen->screenDimTableCount(); i++){
+ for (int i = 0; i < _screen->screenDimTableCount(); i++) {
const ScreenDim *d = _screen->getScreenDim(i);
_textDimData[i].color1 = d->unk8;
_textDimData[i].color2 = d->unkA;
@@ -189,7 +189,7 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
break;
case 11:
- _sjisLineBreakFlag=_sjisLineBreakFlag;
+ _sjisLineBreakFlag = _sjisLineBreakFlag;
// TODO (UNUSED)
break;
@@ -204,27 +204,27 @@ void TextDisplayer_rpg::displayText(char *str, ...) {
break;
case 18:
- _sjisLineBreakFlag=_sjisLineBreakFlag;
+ _sjisLineBreakFlag = _sjisLineBreakFlag;
// TODO (UNUSED)
break;
case 23:
- _sjisLineBreakFlag=_sjisLineBreakFlag;
+ _sjisLineBreakFlag = _sjisLineBreakFlag;
// TODO (UNUSED)
break;
case 24:
- _sjisLineBreakFlag=_sjisLineBreakFlag;
+ _sjisLineBreakFlag = _sjisLineBreakFlag;
// TODO (UNUSED)
break;
case 26:
- _sjisLineBreakFlag=_sjisLineBreakFlag;
+ _sjisLineBreakFlag = _sjisLineBreakFlag;
// TODO (UNUSED)
break;
case 28:
- _sjisLineBreakFlag=_sjisLineBreakFlag;
+ _sjisLineBreakFlag = _sjisLineBreakFlag;
// TODO (UNUSED)
break;
@@ -286,14 +286,16 @@ void TextDisplayer_rpg::readNextPara() {
// All necessary conversions take place somewhere else. This code actually causes issues if the character conversions
// don't take place before calling displayText(). So we disable it for now. If some (not yet supported) localized
// versions depend on this code we'll have to look at this again.
- /* if ((_vm->game() != GI_LOL) && (d & 0x80)) {
+#if 0
+ if ((_vm->game() != GI_LOL) && (d & 0x80)) {
d &= 0x7f;
c = d & 7;
d = (d & 0x78) >> 3;
uint8 l = d;
c = _table1[(l << 3) + c];
d = _table2[l];
- }*/
+ }
+#endif
_ctrl[1] = d;
_ctrl[2] = c;
@@ -465,8 +467,8 @@ void TextDisplayer_rpg::printLine(char *str) {
}
void TextDisplayer_rpg::printDialogueText(int stringId, const char *pageBreakString) {
- const char * str = (const char *)(_screen->getCPagePtr(5) + READ_LE_UINT16(&_screen->getCPagePtr(5)[(stringId - 1) << 1]));
- assert (strlen(str) < kEoBTextBufferSize);
+ const char *str = (const char *)(_screen->getCPagePtr(5) + READ_LE_UINT16(&_screen->getCPagePtr(5)[(stringId - 1) << 1]));
+ assert(strlen(str) < kEoBTextBufferSize);
Common::strlcpy(_dialogueBuffer, str, kEoBTextBufferSize);
displayText(_dialogueBuffer);
@@ -481,7 +483,7 @@ void TextDisplayer_rpg::printDialogueText(int stringId, const char *pageBreakStr
}
void TextDisplayer_rpg::printDialogueText(const char *str, bool wait) {
- assert (strlen(str) < kEoBTextBufferSize);
+ assert(strlen(str) < kEoBTextBufferSize);
Common::strlcpy(_dialogueBuffer, str, kEoBTextBufferSize);
strcpy(_dialogueBuffer, str);