aboutsummaryrefslogtreecommitdiff
path: root/engines/kyra/kyra_lok.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2011-12-26 21:19:29 +0100
committerJohannes Schickel2011-12-26 21:34:22 +0100
commit9b51b138db7ccc8dbc55ca200f1a4aff688f6d89 (patch)
treeb72b3dd34a186bc7ec128d82d975715fe1c4c8c4 /engines/kyra/kyra_lok.cpp
parent1ba4f0a1a8965ee141987693770d2bcd3b74c292 (diff)
downloadscummvm-rg350-9b51b138db7ccc8dbc55ca200f1a4aff688f6d89.tar.gz
scummvm-rg350-9b51b138db7ccc8dbc55ca200f1a4aff688f6d89.tar.bz2
scummvm-rg350-9b51b138db7ccc8dbc55ca200f1a4aff688f6d89.zip
KYRA: Some formatting fixes.
Diffstat (limited to 'engines/kyra/kyra_lok.cpp')
-rw-r--r--engines/kyra/kyra_lok.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/engines/kyra/kyra_lok.cpp b/engines/kyra/kyra_lok.cpp
index 84990bcfb8..c195f0275a 100644
--- a/engines/kyra/kyra_lok.cpp
+++ b/engines/kyra/kyra_lok.cpp
@@ -40,8 +40,8 @@ namespace Kyra {
KyraEngine_LoK::KyraEngine_LoK(OSystem *system, const GameFlags &flags)
: KyraEngine_v1(system, flags) {
- _seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm =
- _seq_MalcolmTree = _seq_WestwoodLogo = _seq_Demo1 = _seq_Demo2 = _seq_Demo3 =
+ _seq_Forest = _seq_KallakWriting = _seq_KyrandiaLogo = _seq_KallakMalcolm = 0;
+ _seq_MalcolmTree = _seq_WestwoodLogo = _seq_Demo1 = _seq_Demo2 = _seq_Demo3 = 0;
_seq_Demo4 = 0;
_seq_WSATable = _seq_CPSTable = _seq_COLTable = _seq_textsTable = 0;
@@ -215,7 +215,7 @@ Common::Error KyraEngine_LoK::init() {
_currentCharacter = 0;
_characterList = new Character[11];
assert(_characterList);
- memset(_characterList, 0, sizeof(Character)*11);
+ memset(_characterList, 0, sizeof(Character) * 11);
for (int i = 0; i < 11; ++i)
memset(_characterList[i].inventoryItems, 0xFF, sizeof(_characterList[i].inventoryItems));
@@ -370,7 +370,7 @@ void KyraEngine_LoK::startup() {
// XXX
for (int i = 0; i < 12; ++i) {
int size = _screen->getRectSize(3, 24);
- _shapes[361+i] = new byte[size];
+ _shapes[361 + i] = new byte[size];
}
_itemBkgBackUp[0] = new uint8[_screen->getRectSize(3, 24)];
@@ -582,23 +582,23 @@ void KyraEngine_LoK::setupShapes123(const Shape *shapeTable, int endShape, int f
uint8 curImage = 0xFF;
int curPageBackUp = _screen->_curPage;
- _screen->_curPage = 8; // we are using page 8 here in the original page 2 was backuped and then used for this stuff
+ _screen->_curPage = 8; // we are using page 8 here in the original page 2 was backuped and then used for this stuff
int shapeFlags = 2;
if (flags)
shapeFlags = 3;
- for (int i = 123; i < 123+endShape; ++i) {
- uint8 newImage = shapeTable[i-123].imageIndex;
+ for (int i = 123; i < 123 + endShape; ++i) {
+ uint8 newImage = shapeTable[i - 123].imageIndex;
if (newImage != curImage && newImage != 0xFF) {
assert(_characterImageTable);
_screen->loadBitmap(_characterImageTable[newImage], 8, 8, 0);
curImage = newImage;
}
- _shapes[i] = _screen->encodeShape(shapeTable[i-123].x<<3, shapeTable[i-123].y, shapeTable[i-123].w<<3, shapeTable[i-123].h, shapeFlags);
- assert(i-7 < _defaultShapeTableSize);
- _defaultShapeTable[i-7].xOffset = shapeTable[i-123].xOffset;
- _defaultShapeTable[i-7].yOffset = shapeTable[i-123].yOffset;
- _defaultShapeTable[i-7].w = shapeTable[i-123].w;
- _defaultShapeTable[i-7].h = shapeTable[i-123].h;
+ _shapes[i] = _screen->encodeShape(shapeTable[i - 123].x << 3, shapeTable[i - 123].y, shapeTable[i - 123].w << 3, shapeTable[i - 123].h, shapeFlags);
+ assert(i - 7 < _defaultShapeTableSize);
+ _defaultShapeTable[i - 7].xOffset = shapeTable[i - 123].xOffset;
+ _defaultShapeTable[i - 7].yOffset = shapeTable[i - 123].yOffset;
+ _defaultShapeTable[i - 7].w = shapeTable[i - 123].w;
+ _defaultShapeTable[i - 7].h = shapeTable[i - 123].h;
}
_screen->_curPage = curPageBackUp;
}
@@ -788,7 +788,7 @@ void KyraEngine_LoK::updateMousePointer(bool forceUpdate) {
}
if (mouse.x >= _entranceMouseCursorTracks[0] && mouse.y >= _entranceMouseCursorTracks[1]
- && mouse.x <= _entranceMouseCursorTracks[2] && mouse.y <= _entranceMouseCursorTracks[3]) {
+ && mouse.x <= _entranceMouseCursorTracks[2] && mouse.y <= _entranceMouseCursorTracks[3]) {
switch (_entranceMouseCursorTracks[4]) {
case 0:
newMouseState = -6;
@@ -844,7 +844,7 @@ void KyraEngine_LoK::updateMousePointer(bool forceUpdate) {
if (_itemInHand == kItemNone)
_screen->setMouseCursor(1, 1, _shapes[0]);
else
- _screen->setMouseCursor(8, 15, _shapes[216+_itemInHand]);
+ _screen->setMouseCursor(8, 15, _shapes[216 + _itemInHand]);
_screen->showMouse();
}
}
@@ -884,8 +884,8 @@ int KyraEngine_LoK::checkForNPCScriptRun(int xpos, int ypos) {
int charLeft = 0, charRight = 0, charTop = 0, charBottom = 0;
int scaleFactor = _scaleTable[currentChar->y1];
- int addX = (((scaleFactor*8)*3)>>8)>>1;
- int addY = ((scaleFactor*3)<<4)>>8;
+ int addX = (((scaleFactor * 8) * 3) >> 8) >> 1;
+ int addY = ((scaleFactor * 3) << 4) >> 8;
charLeft = currentChar->x1 - addX;
charRight = currentChar->x1 + addX;
@@ -908,7 +908,7 @@ int KyraEngine_LoK::checkForNPCScriptRun(int xpos, int ypos) {
charRight = currentChar->x1 + 11;
charTop = currentChar->y1 - 48;
// if (!i)
- // charBottom = currentChar->y2 - 16;
+ // charBottom = currentChar->y2 - 16;
// else
charBottom = currentChar->y1;
@@ -968,13 +968,13 @@ void KyraEngine_LoK::readSettings() {
// The default talk speed is 60. This should be mapped to "Normal".
if (talkspeed == 0)
- _configTextspeed = 3; // Clickable
+ _configTextspeed = 3; // Clickable
if (talkspeed <= 50)
- _configTextspeed = 0; // Slow
+ _configTextspeed = 0; // Slow
else if (talkspeed <= 150)
- _configTextspeed = 1; // Normal
+ _configTextspeed = 1; // Normal
else
- _configTextspeed = 2; // Fast
+ _configTextspeed = 2; // Fast
KyraEngine_v1::readSettings();
}
@@ -983,16 +983,16 @@ void KyraEngine_LoK::writeSettings() {
int talkspeed;
switch (_configTextspeed) {
- case 0: // Slow
+ case 0: // Slow
talkspeed = 1;
break;
- case 1: // Normal
+ case 1: // Normal
talkspeed = 60;
break;
- case 2: // Fast
+ case 2: // Fast
talkspeed = 255;
break;
- default: // Clickable
+ default: // Clickable
talkspeed = 0;
}