aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/animation.cpp22
-rw-r--r--engines/sherlock/decompress.cpp78
-rw-r--r--engines/sherlock/detection.cpp4
-rw-r--r--engines/sherlock/events.cpp4
-rw-r--r--engines/sherlock/graphics.cpp8
-rw-r--r--engines/sherlock/inventory.cpp52
-rw-r--r--engines/sherlock/journal.cpp32
-rw-r--r--engines/sherlock/map.cpp8
-rw-r--r--engines/sherlock/objects.cpp28
-rw-r--r--engines/sherlock/objects.h4
-rw-r--r--engines/sherlock/people.cpp10
-rw-r--r--engines/sherlock/people.h16
-rw-r--r--engines/sherlock/resources.cpp12
-rw-r--r--engines/sherlock/resources.h2
-rw-r--r--engines/sherlock/saveload.cpp18
-rw-r--r--engines/sherlock/scalpel/darts.cpp18
-rw-r--r--engines/sherlock/scalpel/scalpel.cpp38
-rw-r--r--engines/sherlock/scene.cpp34
-rw-r--r--engines/sherlock/screen.cpp16
-rw-r--r--engines/sherlock/settings.cpp46
-rw-r--r--engines/sherlock/sherlock.cpp4
-rw-r--r--engines/sherlock/sound.h2
-rw-r--r--engines/sherlock/talk.cpp50
-rw-r--r--engines/sherlock/user_interface.cpp130
24 files changed, 318 insertions, 318 deletions
diff --git a/engines/sherlock/animation.cpp b/engines/sherlock/animation.cpp
index 62e6e4bebf..fc84680d5e 100644
--- a/engines/sherlock/animation.cpp
+++ b/engines/sherlock/animation.cpp
@@ -26,30 +26,30 @@
namespace Sherlock {
-// The following are a list of filenames played in the prologue that have
+// The following are a list of filenames played in the prologue that have
// special effects associated with them at specific frames
#define FRAMES_END 32000
#define PROLOGUE_NAMES_COUNT 6
#define TITLE_NAMES_COUNT 7
-static const char *const PROLOGUE_NAMES[6] = {
- "subway1", "subway2", "finale2", "suicid", "coff3", "coff4"
+static const char *const PROLOGUE_NAMES[6] = {
+ "subway1", "subway2", "finale2", "suicid", "coff3", "coff4"
};
-static const int PROLOGUE_FRAMES[6][9] = {
+static const int PROLOGUE_FRAMES[6][9] = {
{ 4, 26, 54, 72, 92, 134, FRAMES_END },
{ 2, 80, 95, 117, 166, FRAMES_END },
{ 1, FRAMES_END },
{ 42, FRAMES_END },
{ FRAMES_END },
- { FRAMES_END }
+ { FRAMES_END }
};
// Title animations file list
-static const char *const TITLE_NAMES[7] = {
- "27pro1", "14note", "coff1", "coff2", "coff3", "coff4", "14kick"
+static const char *const TITLE_NAMES[7] = {
+ "27pro1", "14note", "coff1", "coff2", "coff3", "coff4", "14kick"
};
-static const int TITLE_FRAMES[7][9] = {
+static const int TITLE_FRAMES[7][9] = {
{ 29, 131, FRAMES_END },
{ 55, 80, 95, 117, 166, FRAMES_END },
{ 15, FRAMES_END },
@@ -67,7 +67,7 @@ Animation::Animation(SherlockEngine *vm): _vm(vm) {
/**
* Play a full-screen animation
*/
-bool Animation::play(const Common::String &filename, int minDelay, int fade,
+bool Animation::play(const Common::String &filename, int minDelay, int fade,
bool setPalette, int speed) {
Events &events = *_vm->_events;
Screen &screen = *_vm->_screen;
@@ -98,7 +98,7 @@ bool Animation::play(const Common::String &filename, int minDelay, int fade,
// Load initial image
Common::String vdaName = baseName + ".vda";
ImageFile images(vdaName, true, true);
-
+
events.wait(minDelay);
if (fade != 0 && fade != 255)
screen.fadeToBlack();
@@ -166,7 +166,7 @@ bool Animation::play(const Common::String &filename, int minDelay, int fade,
break;
}
}
-
+
events.clearEvents();
sound.stopSound();
delete stream;
diff --git a/engines/sherlock/decompress.cpp b/engines/sherlock/decompress.cpp
index 61110be840..b319bc90c8 100644
--- a/engines/sherlock/decompress.cpp
+++ b/engines/sherlock/decompress.cpp
@@ -36,47 +36,47 @@ Common::SeekableReadStream *decompressLZ(Common::SeekableReadStream &source, int
outSize = source.readSint32LE();
}
- byte lzWindow[4096];
- uint16 lzWindowPos;
- uint16 cmd;
-
- byte *outBuffer = new byte[outSize];
- byte *outBufferEnd = outBuffer + outSize;
- Common::MemoryReadStream *outS = new Common::MemoryReadStream(outBuffer, outSize, DisposeAfterUse::YES);
-
- memset(lzWindow, 0xFF, 0xFEE);
- lzWindowPos = 0xFEE;
- cmd = 0;
+ byte lzWindow[4096];
+ uint16 lzWindowPos;
+ uint16 cmd;
- while (1) {
- cmd >>= 1;
- if (!(cmd & 0x100)) {
- cmd = source.readByte() | 0xFF00;
- }
- if (cmd & 1) {
- byte literal = source.readByte();
- *outBuffer++ = literal;
- lzWindow[lzWindowPos] = literal;
- lzWindowPos = (lzWindowPos + 1) & 0x0FFF;
- } else {
- int copyPos, copyLen;
- copyPos = source.readByte();
- copyLen = source.readByte();
- copyPos = copyPos | ((copyLen & 0xF0) << 4);
- copyLen = (copyLen & 0x0F) + 3;
- while (copyLen--) {
- byte literal = lzWindow[copyPos];
- copyPos = (copyPos + 1) & 0x0FFF;
- *outBuffer++ = literal;
- lzWindow[lzWindowPos] = literal;
- lzWindowPos = (lzWindowPos + 1) & 0x0FFF;
- }
- }
- if (outBuffer >= outBufferEnd)
- break;
- }
+ byte *outBuffer = new byte[outSize];
+ byte *outBufferEnd = outBuffer + outSize;
+ Common::MemoryReadStream *outS = new Common::MemoryReadStream(outBuffer, outSize, DisposeAfterUse::YES);
- return outS;
+ memset(lzWindow, 0xFF, 0xFEE);
+ lzWindowPos = 0xFEE;
+ cmd = 0;
+
+ while (1) {
+ cmd >>= 1;
+ if (!(cmd & 0x100))
+ cmd = source.readByte() | 0xFF00;
+
+ if (cmd & 1) {
+ byte literal = source.readByte();
+ *outBuffer++ = literal;
+ lzWindow[lzWindowPos] = literal;
+ lzWindowPos = (lzWindowPos + 1) & 0x0FFF;
+ } else {
+ int copyPos, copyLen;
+ copyPos = source.readByte();
+ copyLen = source.readByte();
+ copyPos = copyPos | ((copyLen & 0xF0) << 4);
+ copyLen = (copyLen & 0x0F) + 3;
+ while (copyLen--) {
+ byte literal = lzWindow[copyPos];
+ copyPos = (copyPos + 1) & 0x0FFF;
+ *outBuffer++ = literal;
+ lzWindow[lzWindowPos] = literal;
+ lzWindowPos = (lzWindowPos + 1) & 0x0FFF;
+ }
+ }
+ if (outBuffer >= outBufferEnd)
+ break;
+ }
+
+ return outS;
}
} // namespace Sherlock
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp
index 14fc04cc73..734db007ba 100644
--- a/engines/sherlock/detection.cpp
+++ b/engines/sherlock/detection.cpp
@@ -148,13 +148,13 @@ int SherlockMetaEngine::getMaximumSaveSlot() const {
/**
* Deletes a savegame in the specified slot
*/
-void SherlockMetaEngine::removeSaveState(const char *target, int slot) const {
+void SherlockMetaEngine::removeSaveState(const char *target, int slot) const {
Common::String filename = Sherlock::SaveManager(nullptr, target).generateSaveName(slot);
g_system->getSavefileManager()->removeSavefile(filename);
}
/**
- * Given a specified savegame slot, returns extended information for the save
+ * Given a specified savegame slot, returns extended information for the save
*/
SaveStateDescriptor SherlockMetaEngine::querySaveMetaInfos(const char *target, int slot) const {
Common::String filename = Sherlock::SaveManager(nullptr, target).generateSaveName(slot);
diff --git a/engines/sherlock/events.cpp b/engines/sherlock/events.cpp
index a4fc93edd9..4e3f81e588 100644
--- a/engines/sherlock/events.cpp
+++ b/engines/sherlock/events.cpp
@@ -95,7 +95,7 @@ void Events::hideCursor() {
}
/**
- * Returns the cursor
+ * Returns the cursor
*/
CursorId Events::getCursor() const {
return _cursorId;
@@ -200,7 +200,7 @@ bool Events::checkForNextFrameCounter() {
/**
* Get a pending keypress
*/
-Common::KeyState Events::getKey() {
+Common::KeyState Events::getKey() {
Common::KeyState keyState = _pendingKeys.pop();
if ((keyState.flags & Common::KBD_SHIFT) != 0)
keyState.ascii = toupper(keyState.ascii);
diff --git a/engines/sherlock/graphics.cpp b/engines/sherlock/graphics.cpp
index 2095e7d35d..132d3fa089 100644
--- a/engines/sherlock/graphics.cpp
+++ b/engines/sherlock/graphics.cpp
@@ -72,7 +72,7 @@ void Surface::blitFrom(const Graphics::Surface &src) {
void Surface::blitFrom(const Graphics::Surface &src, const Common::Point &pt) {
Common::Rect drawRect(0, 0, src.w, src.h);
Common::Point destPt = pt;
-
+
if (destPt.x < 0) {
drawRect.left += -destPt.x;
destPt.x = 0;
@@ -125,7 +125,7 @@ void Surface::transBlitFrom(const Graphics::Surface &src, const Common::Point &p
bool flipped, int overrideColor) {
Common::Rect drawRect(0, 0, src.w, src.h);
Common::Rect destRect(pt.x, pt.y, pt.x + src.w, pt.y + src.h);
-
+
// Clip the display area to on-screen
if (!clip(drawRect, destRect))
// It's completely off-screen
@@ -166,7 +166,7 @@ void Surface::fillRect(int x1, int y1, int x2, int y2, byte color) {
* Fill a given area of the surface with a given color
*/
void Surface::fillRect(const Common::Rect &r, byte color) {
- Graphics::Surface::fillRect(r, color);
+ Graphics::Surface::fillRect(r, color);
addDirtyRect(r);
}
@@ -198,7 +198,7 @@ bool Surface::clip(Common::Rect &srcBounds, Common::Rect &destBounds) {
srcBounds.left += -destBounds.left;
destBounds.left = 0;
}
-
+
return true;
}
diff --git a/engines/sherlock/inventory.cpp b/engines/sherlock/inventory.cpp
index 935a306619..99db461ea4 100644
--- a/engines/sherlock/inventory.cpp
+++ b/engines/sherlock/inventory.cpp
@@ -26,8 +26,8 @@
namespace Sherlock {
InventoryItem::InventoryItem(int requiredFlag, const Common::String &name,
- const Common::String &description, const Common::String &examine) :
- _requiredFlag(requiredFlag), _name(name), _description(description),
+ const Common::String &description, const Common::String &examine) :
+ _requiredFlag(requiredFlag), _name(name), _description(description),
_examine(examine), _lookFlag(0) {
}
@@ -74,7 +74,7 @@ void Inventory::freeInv() {
void Inventory::freeGraphics() {
for (uint idx = 0; idx < MAX_VISIBLE_INVENTORY; ++idx)
delete _invShapes[idx];
-
+
Common::fill(&_invShapes[0], &_invShapes[MAX_VISIBLE_INVENTORY], (ImageFile *)nullptr);
_invGraphicsLoaded = false;
}
@@ -98,7 +98,7 @@ void Inventory::loadInv() {
_names.push_back(name);
}
-
+
delete stream;
loadGraphics();
@@ -181,7 +181,7 @@ void Inventory::putInv(int slamIt) {
// Draw the item image
Graphics::Surface &img = (*_invShapes[itemNum])[0]._frame;
- bb.transBlitFrom(img, Common::Point(6 + itemNum * 52 + ((47 - img.w) / 2),
+ bb.transBlitFrom(img, Common::Point(6 + itemNum * 52 + ((47 - img.w) / 2),
163 + ((33 - img.h) / 2)));
}
@@ -206,7 +206,7 @@ void Inventory::putInv(int slamIt) {
* 0 = plain inventory mode
* 2 = use inventory mode
* 3 = give inventory mode
- * 128 = Draw window in the back buffer, but don't display it
+ * 128 = Draw window in the back buffer, but don't display it
*/
void Inventory::drawInventory(int flag) {
Screen &screen = *_vm->_screen;
@@ -224,7 +224,7 @@ void Inventory::drawInventory(int flag) {
Surface &bb = *screen._backBuffer;
bb.fillRect(Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, CONTROLS_Y1 + 10), BORDER_COLOR);
bb.fillRect(Common::Rect(0, CONTROLS_Y1 + 10, 2, SHERLOCK_SCREEN_HEIGHT), BORDER_COLOR);
- bb.fillRect(Common::Rect(SHERLOCK_SCREEN_WIDTH - 2, CONTROLS_Y1 + 10,
+ bb.fillRect(Common::Rect(SHERLOCK_SCREEN_WIDTH - 2, CONTROLS_Y1 + 10,
SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT), BORDER_COLOR);
bb.fillRect(Common::Rect(0, SHERLOCK_SCREEN_HEIGHT - 2, SHERLOCK_SCREEN_WIDTH,
SHERLOCK_SCREEN_HEIGHT), BORDER_COLOR);
@@ -232,21 +232,21 @@ void Inventory::drawInventory(int flag) {
INV_BACKGROUND);
// Draw the buttons
- screen.makeButton(Common::Rect(INVENTORY_POINTS[0][0], CONTROLS_Y1, INVENTORY_POINTS[0][1],
+ screen.makeButton(Common::Rect(INVENTORY_POINTS[0][0], CONTROLS_Y1, INVENTORY_POINTS[0][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[0][2] - screen.stringWidth("Exit") / 2, "Exit");
screen.makeButton(Common::Rect(INVENTORY_POINTS[1][0], CONTROLS_Y1, INVENTORY_POINTS[1][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[1][2] - screen.stringWidth("Look") / 2, "Look");
- screen.makeButton(Common::Rect(INVENTORY_POINTS[2][0], CONTROLS_Y1, INVENTORY_POINTS[2][1],
+ screen.makeButton(Common::Rect(INVENTORY_POINTS[2][0], CONTROLS_Y1, INVENTORY_POINTS[2][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[2][2] - screen.stringWidth("Use") / 2, "Use");
- screen.makeButton(Common::Rect(INVENTORY_POINTS[3][0], CONTROLS_Y1, INVENTORY_POINTS[3][1],
+ screen.makeButton(Common::Rect(INVENTORY_POINTS[3][0], CONTROLS_Y1, INVENTORY_POINTS[3][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[3][2] - screen.stringWidth("Give") / 2, "Give");
- screen.makeButton(Common::Rect(INVENTORY_POINTS[4][0], CONTROLS_Y1, INVENTORY_POINTS[4][1],
+ screen.makeButton(Common::Rect(INVENTORY_POINTS[4][0], CONTROLS_Y1, INVENTORY_POINTS[4][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[4][2], "^^");
- screen.makeButton(Common::Rect(INVENTORY_POINTS[5][0], CONTROLS_Y1, INVENTORY_POINTS[5][1],
+ screen.makeButton(Common::Rect(INVENTORY_POINTS[5][0], CONTROLS_Y1, INVENTORY_POINTS[5][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[5][2], "^");
- screen.makeButton(Common::Rect(INVENTORY_POINTS[6][0], CONTROLS_Y1, INVENTORY_POINTS[6][1],
+ screen.makeButton(Common::Rect(INVENTORY_POINTS[6][0], CONTROLS_Y1, INVENTORY_POINTS[6][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[6][2], "_");
- screen.makeButton(Common::Rect(INVENTORY_POINTS[7][0], CONTROLS_Y1, INVENTORY_POINTS[7][1],
+ screen.makeButton(Common::Rect(INVENTORY_POINTS[7][0], CONTROLS_Y1, INVENTORY_POINTS[7][1],
CONTROLS_Y1 + 10), INVENTORY_POINTS[7][2], "__");
if (tempFlag == 128)
@@ -289,43 +289,43 @@ void Inventory::invCommands(bool slamIt) {
UserInterface &ui = *_vm->_ui;
if (slamIt) {
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[0][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[0][2], CONTROLS_Y1),
_invMode == 0 ? COMMAND_HIGHLIGHTED :COMMAND_FOREGROUND,
true, "Exit");
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[1][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[1][2], CONTROLS_Y1),
_invMode == 1 ? COMMAND_HIGHLIGHTED :COMMAND_FOREGROUND,
true, "Look");
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[2][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[2][2], CONTROLS_Y1),
_invMode == 2 ? COMMAND_HIGHLIGHTED : COMMAND_FOREGROUND,
true, "Use");
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[3][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[3][2], CONTROLS_Y1),
_invMode == 3 ? COMMAND_HIGHLIGHTED : COMMAND_FOREGROUND,
true, "Give");
- screen.print(Common::Point(INVENTORY_POINTS[4][2], CONTROLS_Y1 + 1),
+ screen.print(Common::Point(INVENTORY_POINTS[4][2], CONTROLS_Y1 + 1),
_invIndex == 0 ? COMMAND_NULL : COMMAND_FOREGROUND,
"^^");
- screen.print(Common::Point(INVENTORY_POINTS[5][2], CONTROLS_Y1 + 1),
+ screen.print(Common::Point(INVENTORY_POINTS[5][2], CONTROLS_Y1 + 1),
_invIndex == 0 ? COMMAND_NULL : COMMAND_FOREGROUND,
"^");
- screen.print(Common::Point(INVENTORY_POINTS[6][2], CONTROLS_Y1 + 1),
+ screen.print(Common::Point(INVENTORY_POINTS[6][2], CONTROLS_Y1 + 1),
(_holdings - _invIndex <= 6) ? COMMAND_NULL : COMMAND_FOREGROUND,
"_");
- screen.print(Common::Point(INVENTORY_POINTS[7][2], CONTROLS_Y1 + 1),
+ screen.print(Common::Point(INVENTORY_POINTS[7][2], CONTROLS_Y1 + 1),
(_holdings - _invIndex <= 6) ? COMMAND_NULL : COMMAND_FOREGROUND,
"__");
if (_invMode != 1)
ui.clearInfo();
} else {
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[0][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[0][2], CONTROLS_Y1),
_invMode == 0 ? COMMAND_HIGHLIGHTED : COMMAND_FOREGROUND,
false, "Exit");
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[1][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[1][2], CONTROLS_Y1),
_invMode == 1 ? COMMAND_HIGHLIGHTED : COMMAND_FOREGROUND,
false, "Look");
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[2][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[2][2], CONTROLS_Y1),
_invMode == 2 ? COMMAND_HIGHLIGHTED : COMMAND_FOREGROUND,
false, "Use");
- screen.buttonPrint(Common::Point(INVENTORY_POINTS[3][2], CONTROLS_Y1),
+ screen.buttonPrint(Common::Point(INVENTORY_POINTS[3][2], CONTROLS_Y1),
_invMode == 3 ? COMMAND_HIGHLIGHTED : COMMAND_FOREGROUND,
false, "Give");
screen.gPrint(Common::Point(INVENTORY_POINTS[4][2], CONTROLS_Y1),
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index dfff6e9bb7..26aaa7a1a0 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -29,7 +29,7 @@ namespace Sherlock {
#define LINES_PER_PAGE 11
// Positioning of buttons in the journal view
-const int JOURNAL_POINTS[9][3] = {
+const int JOURNAL_POINTS[9][3] = {
{ 6, 68, 37 },
{ 69, 131, 100 },
{ 132, 192, 162 },
@@ -38,7 +38,7 @@ const int JOURNAL_POINTS[9][3] = {
{ 6, 82, 44 },
{ 83, 159, 121 },
{ 160, 236, 198 },
- { 237, 313, 275 }
+ { 237, 313, 275 }
};
const int SEARCH_POINTS[3][3] = {
@@ -101,7 +101,7 @@ void Journal::loadJournalLocations() {
Common::SeekableReadStream *dir = res.load("talk.lib");
dir->skip(4); // Skip header
-
+
// Get the numer of entries
_directory.resize(dir->readUint16LE());
@@ -198,8 +198,8 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
const char *lineP = journalString.c_str() + journalString.size() - 1;
while (width > 230 || *lineP != ' ')
width -= screen.charWidth(*lineP--);
-
- // Split the header into two lines, and add a '@' prefix
+
+ // Split the header into two lines, and add a '@' prefix
// to the second line as well
journalString = Common::String(journalString.c_str(), lineP) + "\n@" +
Common::String(lineP + 1);
@@ -217,7 +217,7 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
journalString += "asked ";
else
journalString += "said to ";
-
+
switch (talk._talkTo) {
case 1:
journalString += "me";
@@ -364,7 +364,7 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
case WALK_TO_COORDS:
case MOVE_MOUSE:
- replyP += 4;
+ replyP += 4;
break;
case SET_FLAG:
@@ -422,13 +422,13 @@ int Journal::loadJournalFile(bool alreadyLoaded) {
// past it, so the @ won't be included in the line width calculation
if (*startP == '@')
++startP;
-
+
// Build up chacters until a full line is found
int width = 0;
const char *endP = startP;
while (width < 230 && *endP && *endP != '\n' && (endP - startP) < 79)
width += screen.charWidth(*endP++);
-
+
// If word wrapping, move back to end of prior word
if (width >= 230 || (endP - startP) >= 79) {
while (*--endP != ' ')
@@ -520,7 +520,7 @@ void Journal::drawInterface() {
}
doArrows();
-
+
// Show the entire screen
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
}
@@ -650,7 +650,7 @@ bool Journal::doJournal(int direction, int howFar) {
case 2:
case 3:
- // Move howFar lines ahead unless the end of the journal is reached,
+ // Move howFar lines ahead unless the end of the journal is reached,
// or a searched for keyword is found
for (temp = 0; (temp < (howFar / LINES_PER_PAGE)) && !endJournal && !searchSuccessful; ++temp) {
// Handle animating mouse cursor
@@ -687,7 +687,7 @@ bool Journal::doJournal(int direction, int howFar) {
_sub = 0;
maxLines = loadJournalFile(false);
}
- } while (!endJournal && !maxLines);
+ } while (!endJournal && !maxLines);
}
++lineNum;
@@ -919,7 +919,7 @@ bool Journal::handleEvents(int key) {
doJournal(1, (_page - 1) * LINES_PER_PAGE);
else
doJournal(1, 10 * LINES_PER_PAGE);
-
+
doArrows();
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
}
@@ -952,7 +952,7 @@ bool Journal::handleEvents(int key) {
if (((found == BTN_SEARCH && events._released) || key == 'S') && !_journal.empty()) {
screen.buttonPrint(Common::Point(JOURNAL_POINTS[5][2], JOURNAL_BUTTONS_Y + 11), COMMAND_FOREGROUND, true, "Search");
bool notFound = false;
-
+
do {
int dir;
@@ -1076,7 +1076,7 @@ int Journal::getFindName(bool printError) {
xp = 15 + screen.stringWidth(name);
yp = 186;
-
+
do {
events._released = false;
Button found = BTN_NONE;
@@ -1141,7 +1141,7 @@ int Journal::getFindName(bool printError) {
}
if (keyState.keycode >= Common::KEYCODE_SPACE && keyState.keycode <= Common::KEYCODE_z
- && keyState.keycode != Common::KEYCODE_AT && name.size() < 50
+ && keyState.keycode != Common::KEYCODE_AT && name.size() < 50
&& (xp + screen.charWidth(keyState.keycode)) < 296) {
screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), BUTTON_MIDDLE);
screen.print(Common::Point(xp, yp), TALK_FOREGROUND, "%c", (char)keyState.keycode);
diff --git a/engines/sherlock/map.cpp b/engines/sherlock/map.cpp
index 4f04312ba7..3879e904fa 100644
--- a/engines/sherlock/map.cpp
+++ b/engines/sherlock/map.cpp
@@ -180,7 +180,7 @@ int Map::show() {
// Ignore scrolling attempts until the screen is drawn
if (!_drawMap) {
Common::Point pt = events.mousePos();
-
+
// Check for vertical map scrolling
if ((pt.y > (SHERLOCK_SCREEN_HEIGHT - 10) && _bigPos.y < 200) || (pt.y < 10 && _bigPos.y > 0)) {
if (pt.y > (SHERLOCK_SCREEN_HEIGHT - 10))
@@ -336,7 +336,7 @@ void Map::showPlaces() {
if (pt.x >= _bigPos.x && (pt.x - _bigPos.x) < SHERLOCK_SCREEN_WIDTH
&& pt.y >= _bigPos.y && (pt.y - _bigPos.y) < SHERLOCK_SCREEN_HEIGHT) {
if (_vm->readFlags(idx)) {
- screen._backBuffer1.transBlitFrom((*_iconShapes)[pt._translate],
+ screen._backBuffer1.transBlitFrom((*_iconShapes)[pt._translate],
Common::Point(pt.x - _bigPos.x - 6, pt.y - _bigPos.y - 12));
}
}
@@ -372,7 +372,7 @@ void Map::showPlaceName(int idx, bool highlighted) {
if (!_cursorIndex) {
saveIcon(people[AL]._imageFrame, _lDrawnPos);
-
+
bool flipped = people[AL]._sequenceNumber == MAP_DOWNLEFT || people[AL]._sequenceNumber == MAP_LEFT
|| people[AL]._sequenceNumber == MAP_UPLEFT;
screen._backBuffer1.transBlitFrom(people[AL]._imageFrame->_frame, _lDrawnPos, flipped);
@@ -510,7 +510,7 @@ void Map::saveIcon(ImageFrame *src, const Common::Point &pt) {
size.x += pos.x;
pos.x = 0;
}
-
+
if (pos.y < 0) {
size.y += pos.y;
pos.y = 0;
diff --git a/engines/sherlock/objects.cpp b/engines/sherlock/objects.cpp
index 8a7ae49e34..40c8b954cb 100644
--- a/engines/sherlock/objects.cpp
+++ b/engines/sherlock/objects.cpp
@@ -72,7 +72,7 @@ void Sprite::clear() {
* Updates the image frame poiner for the sprite
*/
void Sprite::setImageFrame() {
- int imageNumber = (*_sequences)[_sequenceNumber][_frameNumber] +
+ int imageNumber = (*_sequences)[_sequenceNumber][_frameNumber] +
(*_sequences)[_sequenceNumber][0] - 2;
_imageFrame = &(*_images)[imageNumber];
}
@@ -171,7 +171,7 @@ void Sprite::adjustSprite() {
if (people._hSavedFacing > 100 && people._hSavedPos.x < 1)
people._hSavedPos.x = 100;
}
- }
+ }
}
}
@@ -241,7 +241,7 @@ void Sprite::checkSprite() {
if (obj._aType == PAL_CHANGE)
// Invert percentage
palPercent = 100 - palPercent;
-
+
for (int idx = palStart; idx < (palStart + palLength); ++idx)
screen._sMap[idx] = screen._cMap[idx] * palPercent / 100;
@@ -320,7 +320,7 @@ void Sprite::checkSprite() {
walkPos.x = objBounds.left - CLEAR_DIST_X;
}
- walkPos.y = (_delta.y >= 0) ? objBounds.top - CLEAR_DIST_Y :
+ walkPos.y = (_delta.y >= 0) ? objBounds.top - CLEAR_DIST_Y :
objBounds.bottom + CLEAR_DIST_Y;
} else {
// Impact occurred due to horizontal movement
@@ -362,11 +362,11 @@ void Sprite::checkSprite() {
/*----------------------------------------------------------------*/
/**
- * Synchronize the data for a savegame
+ * Synchronize the data for a savegame
*/
void ActionType::synchronize(Common::SeekableReadStream &s) {
char buffer[12];
-
+
_cAnimNum = s.readByte();
_cAnimSpeed = s.readByte();
if (_cAnimSpeed & 0x80)
@@ -388,7 +388,7 @@ UseType::UseType() {
}
/**
- * Synchronize the data for a savegame
+ * Synchronize the data for a savegame
*/
void UseType::synchronize(Common::SeekableReadStream &s) {
char buffer[12];
@@ -489,7 +489,7 @@ void Object::synchronize(Common::SeekableReadStream &s) {
_oldSize.y = s.readUint16LE();
_goto.x = s.readSint16LE();
_goto.y = s.readSint16LE();
-
+
_pickup = s.readByte();
_defaultCommand = s.readByte();
_lookFlag = s.readUint16LE();
@@ -500,7 +500,7 @@ void Object::synchronize(Common::SeekableReadStream &s) {
_status = s.readUint16LE();
_misc = s.readByte();
_maxFrames = s.readUint16LE();
- _flags = s.readByte();
+ _flags = s.readByte();
_aOpen.synchronize(s);
_aType = (AType)s.readByte();
_lookFrames = s.readByte();
@@ -518,7 +518,7 @@ void Object::synchronize(Common::SeekableReadStream &s) {
s.skip(1);
_aMove.synchronize(s);
s.skip(8);
-
+
for (int idx = 0; idx < 4; ++idx)
_use[idx].synchronize(s);
}
@@ -861,8 +861,8 @@ int Object::checkNameForCodes(const Common::String &name, const char *const mess
// A: Add onto existing co-ordinates
Common::String sx(name.c_str() + 2, name.c_str() + 5);
Common::String sy(name.c_str() + 6, name.c_str() + 9);
-
- if (ch == 'G')
+
+ if (ch == 'G')
_position = Common::Point(atoi(sx.c_str()), atoi(sy.c_str()));
else
_position += Common::Point(atoi(sx.c_str()), atoi(sy.c_str()));
@@ -1055,7 +1055,7 @@ int Object::pickUpObject(const char *const messages[]) {
if (!printed) {
ui._infoFlag++;
ui.clearInfo();
-
+
Common::String itemName = _description;
itemName.setChar(tolower(itemName[0]), 0);
screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "Picked up %s", itemName.c_str());
@@ -1096,7 +1096,7 @@ const Common::Rect Object::getOldBounds() const {
/*----------------------------------------------------------------*/
/**
- * Synchronize the data for a savegame
+ * Synchronize the data for a savegame
*/
void CAnim::synchronize(Common::SeekableReadStream &s) {
char buffer[12];
diff --git a/engines/sherlock/objects.h b/engines/sherlock/objects.h
index 10b491e5d7..861858c58e 100644
--- a/engines/sherlock/objects.h
+++ b/engines/sherlock/objects.h
@@ -75,7 +75,7 @@ enum {
#define MAX_FRAME 30
// code put into sequences to defines 1-10 type seqs
-#define SEQ_TO_CODE 67
+#define SEQ_TO_CODE 67
#define FLIP_CODE (64 + 128)
#define SOUND_CODE (34 + 128)
@@ -216,7 +216,7 @@ public:
int _seqTo; // Allows 1-5, 8-3 type sequences encoded in 2 bytes
uint _descOffset; // Tells where description starts in DescText
int _seqCounter2; // Counter of calling frame sequence
- uint _seqSize; // Tells where description starts
+ uint _seqSize; // Tells where description starts
ActionType _aMove;
UseType _use[4];
diff --git a/engines/sherlock/people.cpp b/engines/sherlock/people.cpp
index 84194059e1..ee5f3bcb80 100644
--- a/engines/sherlock/people.cpp
+++ b/engines/sherlock/people.cpp
@@ -33,7 +33,7 @@ namespace Sherlock {
// Characer animation sequences
static const uint8 CHARACTER_SEQUENCES[MAX_HOLMES_SEQUENCE][MAX_FRAME] = {
{ 29, 1, 2, 3, 4, 5, 6, 7, 0 }, // Walk Right
- { 22, 1, 2, 3, 4, 5, 6, 7, 0 }, // Walk Down
+ { 22, 1, 2, 3, 4, 5, 6, 7, 0 }, // Walk Down
{ 29, 1, 2, 3, 4, 5, 6, 7, 0 }, // Walk Left
{ 15, 1, 2, 3, 4, 5, 6, 7, 0 }, // Walk Up
{ 42, 1, 2, 3, 4, 5, 0 }, // Goto Stand Right
@@ -116,7 +116,7 @@ const char PORTRAITS[MAX_PEOPLE][5] = {
{ "NIGE" }, // Nigel Jameson
{ "JONA" }, // Jonas (newspaper seller)
{ "DUGA" }, // Constable Dugan
- { "INSP" } // Inspector Lestrade (Scotland Yard)
+ { "INSP" } // Inspector Lestrade (Scotland Yard)
};
const char *const NAMES[MAX_PEOPLE] = {
@@ -421,7 +421,7 @@ void People::setWalking() {
if (!_player._walkCount)
gotoStand(_player);
- // If the sequence is the same as when we started, then Holmes was
+ // If the sequence is the same as when we started, then Holmes was
// standing still and we're trying to re-stand him, so reset Holmes'
// rame to the old frame number from before it was reset to 0
if (_player._sequenceNumber == oldDirection)
@@ -429,7 +429,7 @@ void People::setWalking() {
}
/**
- * Bring a moving character to a standing position. If the Scalpel chessboard
+ * Bring a moving character to a standing position. If the Scalpel chessboard
* is being displayed, then the chraracter will always face down.
*/
void People::gotoStand(Sprite &sprite) {
@@ -516,7 +516,7 @@ void People::walkToCoords(const Common::Point &destPos, int destDir) {
*/
void People::goAllTheWay() {
Scene &scene = *_vm->_scene;
- Common::Point srcPt(_player._position.x / 100 + _player.frameWidth() / 2,
+ Common::Point srcPt(_player._position.x / 100 + _player.frameWidth() / 2,
_player._position.y / 100);
// Get the zone the player is currently in
diff --git a/engines/sherlock/people.h b/engines/sherlock/people.h
index f1ed3496a1..01ecd1a09a 100644
--- a/engines/sherlock/people.h
+++ b/engines/sherlock/people.h
@@ -32,11 +32,11 @@ namespace Sherlock {
// People definitions
enum PeopleId {
- PLAYER = 0,
- AL = 0,
- PEG = 1,
+ PLAYER = 0,
+ AL = 0,
+ PEG = 1,
NUM_OF_PEOPLE = 2, // Holmes and Watson
- MAX_PEOPLE = 66 // Total of all NPCs
+ MAX_PEOPLE = 66 // Total of all NPCs
};
// Animation sequence identifiers for characters
@@ -92,13 +92,13 @@ public:
People(SherlockEngine *vm);
~People();
- Person &operator[](PeopleId id) {
+ Person &operator[](PeopleId id) {
assert(id < NUM_OF_PEOPLE);
- return _data[id];
+ return _data[id];
}
- Person &operator[](int idx) {
+ Person &operator[](int idx) {
assert(idx < NUM_OF_PEOPLE);
- return _data[idx];
+ return _data[idx];
}
bool isHolmesActive() const { return _walkLoaded && _holmesOn; }
diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp
index 0be5bc814d..715ca492ae 100644
--- a/engines/sherlock/resources.cpp
+++ b/engines/sherlock/resources.cpp
@@ -116,8 +116,8 @@ Resources::Resources() {
* Adds the specified file to the cache. If it's a library file, takes care of
* loading it's index for future use
*/
-void Resources::addToCache(const Common::String &filename) {
- _cache.load(filename);
+void Resources::addToCache(const Common::String &filename) {
+ _cache.load(filename);
// Check to see if the file is a library
Common::SeekableReadStream *stream = load(filename);
@@ -270,10 +270,10 @@ void ImageFile::setVm(SherlockEngine *vm) {
ImageFile::ImageFile(const Common::String &name, bool skipPal, bool animImages) {
Common::SeekableReadStream *stream = _vm->_res->load(name);
-
+
Common::fill(&_palette[0], &_palette[PALETTE_SIZE], 0);
load(*stream, skipPal, animImages);
-
+
delete stream;
}
@@ -327,7 +327,7 @@ void ImageFile::load(Common::SeekableReadStream &stream, bool skipPalette, bool
// Load data for frame and decompress it
byte *data = new byte[frame._size];
stream.read(data, frame._size);
- decompressFrame(frame, data);
+ decompressFrame(frame, data);
delete[] data;
push_back(frame);
@@ -344,7 +344,7 @@ void ImageFile::loadPalette(Common::SeekableReadStream &stream) {
stream.skip(1); // Skip paletteBase byte
bool rleEncoded = stream.readByte() == 1;
int size = v1 * v2;
-
+
if ((size - 12) == PALETTE_SIZE && !rleEncoded) {
// Found palette, so read it in
stream.seek(2 + 12, SEEK_CUR);
diff --git a/engines/sherlock/resources.h b/engines/sherlock/resources.h
index b173884322..d53351e085 100644
--- a/engines/sherlock/resources.h
+++ b/engines/sherlock/resources.h
@@ -42,7 +42,7 @@ struct LibraryEntry {
int _index;
LibraryEntry() : _index(0), _offset(0), _size(0) {}
- LibraryEntry(int index, uint32 offset, uint32 size) :
+ LibraryEntry(int index, uint32 offset, uint32 size) :
_index(index), _offset(offset), _size(size) {}
};
typedef Common::HashMap<Common::String, LibraryEntry, Common::IgnoreCase_Hash, Common::IgnoreCase_EqualTo> LibraryIndex;
diff --git a/engines/sherlock/saveload.cpp b/engines/sherlock/saveload.cpp
index 71e21618ae..61fe9f30bf 100644
--- a/engines/sherlock/saveload.cpp
+++ b/engines/sherlock/saveload.cpp
@@ -40,7 +40,7 @@ const int ENV_POINTS[6][3] = {
/*----------------------------------------------------------------*/
-SaveManager::SaveManager(SherlockEngine *vm, const Common::String &target) :
+SaveManager::SaveManager(SherlockEngine *vm, const Common::String &target) :
_vm(vm), _target(target) {
_saveThumb = nullptr;
_envMode = SAVEMODE_NONE;
@@ -71,7 +71,7 @@ void SaveManager::drawInterface() {
screen._backBuffer1.fillRect(Common::Rect(0, 199, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT), BORDER_COLOR);
screen._backBuffer1.fillRect(Common::Rect(2, CONTROLS_Y + 10, SHERLOCK_SCREEN_WIDTH - 2, SHERLOCK_SCREEN_HEIGHT - 2), INV_BACKGROUND);
- screen.makeButton(Common::Rect(ENV_POINTS[0][0], CONTROLS_Y, ENV_POINTS[0][1], CONTROLS_Y + 10),
+ screen.makeButton(Common::Rect(ENV_POINTS[0][0], CONTROLS_Y, ENV_POINTS[0][1], CONTROLS_Y + 10),
ENV_POINTS[0][2] - screen.stringWidth("Exit") / 2, "Exit");
screen.makeButton(Common::Rect(ENV_POINTS[1][0], CONTROLS_Y, ENV_POINTS[1][1], CONTROLS_Y + 10),
ENV_POINTS[1][2] - screen.stringWidth("Load") / 2, "Load");
@@ -92,9 +92,9 @@ void SaveManager::drawInterface() {
for (int idx = _savegameIndex; idx < _savegameIndex + 5; ++idx)
{
- screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
+ screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
INV_FOREGROUND, "%d.", idx + 1);
- screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
+ screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
INV_FOREGROUND, "%s", _savegames[idx].c_str());
}
@@ -317,7 +317,7 @@ void SaveManager::loadGame(int slot) {
generateSaveName(slot));
if (!saveFile)
return;
-
+
// Load the savaegame header
SherlockSavegameHeader header;
if (!readSavegameHeader(saveFile, header))
@@ -405,12 +405,12 @@ bool SaveManager::checkGameOnScreen(int slot) {
SHERLOCK_SCREEN_HEIGHT - 1), INV_BACKGROUND);
for (int idx = _savegameIndex; idx < (_savegameIndex + 5); ++idx) {
- screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
+ screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
INV_FOREGROUND, "%d.", idx + 1);
screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (idx - _savegameIndex) * 10),
INV_FOREGROUND, "%s", _savegames[idx].c_str());
}
-
+
screen.slamRect(Common::Rect(3, CONTROLS_Y + 11, 318, SHERLOCK_SCREEN_HEIGHT));
byte color = !_savegameIndex ? COMMAND_NULL : COMMAND_FOREGROUND;
@@ -432,7 +432,7 @@ bool SaveManager::getFilename(int slot) {
Talk &talk = *_vm->_talk;
int xp, yp;
bool flag = false;
-
+
screen.buttonPrint(Common::Point(ENV_POINTS[0][2], CONTROLS_Y), COMMAND_NULL, true, "Exit");
screen.buttonPrint(Common::Point(ENV_POINTS[1][2], CONTROLS_Y), COMMAND_NULL, true, "Load");
screen.buttonPrint(Common::Point(ENV_POINTS[2][2], CONTROLS_Y), COMMAND_NULL, true, "Save");
@@ -480,7 +480,7 @@ bool SaveManager::getFilename(int slot) {
if (keyState.keycode == Common::KEYCODE_BACKSPACE && saveName.size() > 0) {
// Delete character of save name
- screen.vgaBar(Common::Rect(xp - screen.charWidth(saveName.lastChar()), yp - 1,
+ screen.vgaBar(Common::Rect(xp - screen.charWidth(saveName.lastChar()), yp - 1,
xp + 8, yp + 9), INV_BACKGROUND);
xp -= screen.charWidth(saveName.lastChar());
screen.vgaBar(Common::Rect(xp, yp - 1, xp + 8, yp + 9), INV_FOREGROUND);
diff --git a/engines/sherlock/scalpel/darts.cpp b/engines/sherlock/scalpel/darts.cpp
index 4b48a1dacf..3516a7ae78 100644
--- a/engines/sherlock/scalpel/darts.cpp
+++ b/engines/sherlock/scalpel/darts.cpp
@@ -45,8 +45,8 @@ enum {
PLAYER_COLOR = 11
};
-const char *const OPPONENT_NAMES[5] = {
- "Skipper", "Willy", "Micky", "Tom", "Bartender"
+const char *const OPPONENT_NAMES[5] = {
+ "Skipper", "Willy", "Micky", "Tom", "Bartender"
};
/*----------------------------------------------------------------*/
@@ -83,7 +83,7 @@ void Darts::playDarts() {
do {
int score, roundStartScore;
roundStartScore = score = playerNumber == 0 ? _dartScore1 : _dartScore2;
-
+
// Show player details
showNames(playerNumber);
showStatus(playerNumber);
@@ -296,7 +296,7 @@ int Darts::throwDart(int dartNum, int computer) {
int width, height;
events.clearKeyboard();
-
+
erasePowerBars();
screen.print(Common::Point(DART_INFO_X, DART_INFO_Y), DART_COL_FORE, "Dart # %d", dartNum);
@@ -322,10 +322,10 @@ int Darts::throwDart(int dartNum, int computer) {
// If it's a computer player, choose a dart destination
if (computer)
targetNum = getComputerDartDest(computer - 1);
-
+
width = doPowerBar(Common::Point(DARTBARHX, DARTHORIZY), DART_BAR_FORE, targetNum.x, false);
height = 101 - doPowerBar(Common::Point(DARTBARVX, DARTHEIGHTY), DART_BAR_FORE, targetNum.y, true);
-
+
// For human players, slight y adjustment
if (computer == 0)
height += 2;
@@ -429,7 +429,7 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i
// Reached target power for a computer player
done = true;
else if (goToPower == 0) {
- // Check for pres
+ // Check for pres
if (dartHit())
done = true;
}
@@ -472,7 +472,7 @@ bool Darts::dartHit() {
events.clearKeyboard();
return true;
}
-
+
_oldDartButtons = events._pressed;
events.setButtonState();
@@ -497,7 +497,7 @@ int Darts::dartScore(const Common::Point &pt) {
}
/**
- * Calculates where a computer player is trying to throw their dart, and choose the actual
+ * Calculates where a computer player is trying to throw their dart, and choose the actual
* point that was hit with some margin of error
*/
Common::Point Darts::getComputerDartDest(int playerNum) {
diff --git a/engines/sherlock/scalpel/scalpel.cpp b/engines/sherlock/scalpel/scalpel.cpp
index 3fe094bcf4..6ba6b33340 100644
--- a/engines/sherlock/scalpel/scalpel.cpp
+++ b/engines/sherlock/scalpel/scalpel.cpp
@@ -28,21 +28,21 @@ namespace Sherlock {
namespace Scalpel {
#define NUM_PLACES 100
-const int MAP_X[NUM_PLACES] = {
- 0, 368, 0, 219, 0, 282, 0, 43, 0, 0, 396, 408, 0, 0, 0, 568, 37, 325,
- 28, 0, 263, 36, 148, 469, 342, 143, 443, 229, 298, 0, 157, 260, 432,
- 174, 0, 351, 0, 528, 0, 136, 0, 0, 0, 555, 165, 0, 506, 0, 0, 344, 0, 0
+const int MAP_X[NUM_PLACES] = {
+ 0, 368, 0, 219, 0, 282, 0, 43, 0, 0, 396, 408, 0, 0, 0, 568, 37, 325,
+ 28, 0, 263, 36, 148, 469, 342, 143, 443, 229, 298, 0, 157, 260, 432,
+ 174, 0, 351, 0, 528, 0, 136, 0, 0, 0, 555, 165, 0, 506, 0, 0, 344, 0, 0
};
-const int MAP_Y[NUM_PLACES] = {
+const int MAP_Y[NUM_PLACES] = {
0, 147, 0, 166, 0, 109, 0, 61, 0, 0, 264, 70, 0, 0, 0, 266, 341, 30, 275,
- 0, 294, 146, 311, 230, 184, 268, 133, 94, 207, 0, 142, 142, 330, 255, 0,
- 37, 0, 70, 0, 116, 0, 0, 0, 50, 21, 0, 303, 0, 0, 229, 0, 0
+ 0, 294, 146, 311, 230, 184, 268, 133, 94, 207, 0, 142, 142, 330, 255, 0,
+ 37, 0, 70, 0, 116, 0, 0, 0, 50, 21, 0, 303, 0, 0, 229, 0, 0
};
const int MAP_TRANSLATE[NUM_PLACES] = {
0, 0, 0, 1, 0, 2, 0, 3, 4, 0, 4, 6, 0, 0, 0, 8, 9, 10, 11, 0, 12, 13, 14, 7,
15, 16, 17, 18, 19, 0, 20, 21, 22, 23, 0, 24, 0, 25, 0, 26, 0, 0, 0, 27,
- 28, 0, 29, 0, 0, 30, 0
+ 28, 0, 29, 0, 0, 30, 0
};
const byte MAP_SEQUENCES[3][MAX_FRAME] = {
@@ -251,7 +251,7 @@ void ScalpelEngine::showOpening() {
*/
bool ScalpelEngine::showCityCutscene() {
byte palette[PALETTE_SIZE];
-
+
_sound->playMusic("prolog1.mus");
_titleOverride = "title.lib";
_soundOverride = "title.snd";
@@ -286,7 +286,7 @@ bool ScalpelEngine::showCityCutscene() {
ImageFile titleImages("title.vgs", true);
_screen->_backBuffer1.copyFrom(*_screen);
_screen->_backBuffer2.copyFrom(*_screen);
-
+
// The Lost Files of
_screen->_backBuffer1.transBlitFrom(titleImages[0], Common::Point(75, 6));
// Sherlock Holmes
@@ -473,7 +473,7 @@ void ScalpelEngine::loadInventory() {
inv._holdings = 2;
inv.push_back(InventoryItem(0, "Message", "A message requesting help", "_ITEM03A"));
inv.push_back(InventoryItem(0, "Holmes Card", "A number of business cards", "_ITEM07A"));
-
+
// Hidden items
inv.push_back(InventoryItem(95, "Tickets", "Opera Tickets", "_ITEM10A"));
inv.push_back(InventoryItem(138, "Cuff Link", "Cuff Link", "_ITEM04A"));
@@ -524,7 +524,7 @@ void ScalpelEngine::startScene() {
// 2: Blackwood's capture
// 52: Rescuing Anna
// 53: Moorehead's death / subway train
- // 55: Fade out and exit
+ // 55: Fade out and exit
// 70: Brumwell suicide
switch (_scene->_goToScene) {
case 2:
@@ -678,7 +678,7 @@ void ScalpelEngine::eraseMirror12() {
void ScalpelEngine::doMirror12() {
People &people = *_people;
Common::Point pt((*_people)[AL]._position.x / 100, (*_people)[AL]._position.y / 100);
- int frameNum = (*people[AL]._sequences)[people[AL]._sequenceNumber][people[AL]._frameNumber] +
+ int frameNum = (*people[AL]._sequences)[people[AL]._sequenceNumber][people[AL]._frameNumber] +
(*people[AL]._sequences)[people[AL]._sequenceNumber][0] - 2;
switch ((*_people)[AL]._sequenceNumber) {
@@ -733,17 +733,17 @@ void ScalpelEngine::doMirror12() {
_screen->_backBuffer1.transBlitFrom(imageFrame, pt + Common::Point(38, -imageFrame._frame.h - 25), flipped);
// Redraw the mirror borders to prevent the drawn image of Holmes from appearing outside of the mirror
- _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(114, 18),
+ _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(114, 18),
Common::Rect(114, 18, 137, 114));
- _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(137, 70),
+ _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(137, 70),
Common::Rect(137, 70, 142, 114));
- _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(142, 71),
+ _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(142, 71),
Common::Rect(142, 71, 159, 114));
- _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(159, 72),
+ _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(159, 72),
Common::Rect(159, 72, 170, 116));
- _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(170, 73),
+ _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(170, 73),
Common::Rect(170, 73, 184, 114));
- _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(184, 18),
+ _screen->_backBuffer1.blitFrom(_screen->_backBuffer2, Common::Point(184, 18),
Common::Rect(184, 18, 212, 114));
}
}
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 857dff4951..c1a73fee90 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -256,7 +256,7 @@ bool Scene::loadScene(const Common::String &filename) {
// Read information
Common::SeekableReadStream *infoStream = !_lzwMode ? rrmStream :
- decompressLZ(*rrmStream, bgHeader._numImages * 569 +
+ decompressLZ(*rrmStream, bgHeader._numImages * 569 +
bgHeader._descSize + bgHeader._seqSize);
_bgShapes.resize(bgHeader._numStructs);
@@ -271,7 +271,7 @@ bool Scene::loadScene(const Common::String &filename) {
if (bgHeader._seqSize) {
_sequenceBuffer.resize(bgHeader._seqSize);
infoStream->read(&_sequenceBuffer[0], bgHeader._seqSize);
- }
+ }
if (_lzwMode)
delete infoStream;
@@ -390,7 +390,7 @@ bool Scene::loadScene(const Common::String &filename) {
rrmStream->read(screen._cMap, PALETTE_SIZE);
for (int idx = 0; idx < PALETTE_SIZE; ++idx)
screen._cMap[idx] = VGA_COLOR_TRANS(screen._cMap[idx]);
-
+
Common::copy(screen._cMap, screen._cMap + PALETTE_SIZE, screen._sMap);
// Read in the background
@@ -522,7 +522,7 @@ void Scene::checkSceneFlags(bool flag) {
for (uint idx = 0; idx < _bgShapes.size(); ++idx) {
Object &o = _bgShapes[idx];
-
+
if (o._requiredFlag) {
if (!_vm->readFlags(_bgShapes[idx]._requiredFlag)) {
// Kill object
@@ -655,7 +655,7 @@ void Scene::transitionToScene() {
if (obj._type != NO_SHAPE) {
topLeft += obj._imageFrame->_offset;
bottomRight.x = topLeft.x + obj._imageFrame->_frame.w;
- bottomRight.y = topLeft.y + obj._imageFrame->_frame.h;
+ bottomRight.y = topLeft.y + obj._imageFrame->_frame.h;
} else {
bottomRight = topLeft + obj._noShapeSize;
}
@@ -768,7 +768,7 @@ void Scene::updateBackground() {
// Draw all canimations which are normal and behind the person
for (uint idx = 0; idx < _canimShapes.size(); ++idx) {
if (_canimShapes[idx]._type == ACTIVE_BG_SHAPE && _canimShapes[idx]._misc == NORMAL_BEHIND)
- screen._backBuffer->transBlitFrom(*_canimShapes[idx]._imageFrame, _canimShapes[idx]._position,
+ screen._backBuffer->transBlitFrom(*_canimShapes[idx]._imageFrame, _canimShapes[idx]._position,
_canimShapes[idx]._flags & 2);
}
@@ -778,7 +778,7 @@ void Scene::updateBackground() {
player._sequenceNumber == WALK_UPLEFT || player._sequenceNumber == STOP_UPLEFT ||
player._sequenceNumber == WALK_DOWNRIGHT || player._sequenceNumber == STOP_DOWNRIGHT;
- screen._backBuffer->transBlitFrom(*player._imageFrame, Common::Point(player._position.x / 100,
+ screen._backBuffer->transBlitFrom(*player._imageFrame, Common::Point(player._position.x / 100,
player._position.y / 100 - player.frameHeight()), flipped);
}
@@ -793,7 +793,7 @@ void Scene::updateBackground() {
for (uint idx = 0; idx < _canimShapes.size(); ++idx) {
if ((_canimShapes[idx]._type == ACTIVE_BG_SHAPE || _canimShapes[idx]._type == STATIC_BG_SHAPE) &&
_canimShapes[idx]._misc == NORMAL_FORWARD)
- screen._backBuffer->transBlitFrom(*_canimShapes[idx]._imageFrame, _canimShapes[idx]._position,
+ screen._backBuffer->transBlitFrom(*_canimShapes[idx]._imageFrame, _canimShapes[idx]._position,
_canimShapes[idx]._flags & 2);
}
@@ -812,7 +812,7 @@ void Scene::updateBackground() {
for (uint idx = 0; idx < _canimShapes.size(); ++idx) {
if ((_canimShapes[idx]._type == ACTIVE_BG_SHAPE || _canimShapes[idx]._type == STATIC_BG_SHAPE) &&
_canimShapes[idx]._misc == FORWARD)
- screen._backBuffer->transBlitFrom(*_canimShapes[idx]._imageFrame, _canimShapes[idx]._position,
+ screen._backBuffer->transBlitFrom(*_canimShapes[idx]._imageFrame, _canimShapes[idx]._position,
_canimShapes[idx]._flags & 2);
}
@@ -966,7 +966,7 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
rrmStream->seek(rrmStream->readUint32LE());
// Load the canimation into the cache
- Common::SeekableReadStream *imgStream = !_lzwMode ? rrmStream->readStream(cAnim._size) :
+ Common::SeekableReadStream *imgStream = !_lzwMode ? rrmStream->readStream(cAnim._size) :
decompressLZ(*rrmStream, cAnim._size);
res.addToCache(fname, *imgStream);
@@ -1059,7 +1059,7 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
if (playRate < 0)
// Reverse direction - set to end sequence
cObj._frameNumber = tFrames - 1;
-
+
if (cObj._frameNumber <= 26)
gotoCode = cObj._sequences[cObj._frameNumber + 3];
@@ -1108,7 +1108,7 @@ void Scene::doBgAnim() {
Common::Point mousePos = events.mousePos();
talk._talkToAbort = false;
-
+
// Animate the mouse cursor
if (cursorId >= WAIT) {
if (++cursorId > (WAIT + 2))
@@ -1229,7 +1229,7 @@ void Scene::doBgAnim() {
people[AL].adjustSprite();
// Flag the bg shapes which need to be redrawn
- checkBgShapes(people[AL]._imageFrame,
+ checkBgShapes(people[AL]._imageFrame,
Common::Point(people[AL]._position.x / 100, people[AL]._position.y / 100));
if (_currentScene == 12 && _vm->getGameID() == GType_SerratedScalpel)
@@ -1241,7 +1241,7 @@ void Scene::doBgAnim() {
if (o._type == ACTIVE_BG_SHAPE && o._misc == BEHIND)
screen._backBuffer->transBlitFrom(*o._imageFrame, o._position, o._flags & 2);
}
-
+
// Draw all canimations which are behind the person
for (uint idx = 0; idx < _canimShapes.size(); ++idx) {
Object &o = _canimShapes[idx];
@@ -1335,7 +1335,7 @@ void Scene::doBgAnim() {
people[AL]._type = INVALID;
} else {
screen.flushImage(people[AL]._imageFrame,
- Common::Point(people[AL]._position.x / 100,
+ Common::Point(people[AL]._position.x / 100,
people[AL]._position.y / 100 - people[AL].frameHeight()),
&people[AL]._oldPosition.x, &people[AL]._oldPosition.y,
&people[AL]._oldSize.x, &people[AL]._oldSize.y);
@@ -1364,7 +1364,7 @@ void Scene::doBgAnim() {
screen.flushImage(people._portrait._imageFrame, people._portrait._position,
&people._portrait._oldPosition.x, &people._portrait._oldPosition.y,
&people._portrait._oldSize.x, &people._portrait._oldSize.y);
-
+
if (people._portrait._type == REMOVE)
people._portrait._type = INVALID;
}
@@ -1410,7 +1410,7 @@ void Scene::doBgAnim() {
screen.resetDisplayBounds();
// Check if the method was called for calling a portrait, and a talk was
- // interrupting it. This talk file would not have been executed at the time,
+ // interrupting it. This talk file would not have been executed at the time,
// since we needed to finish the 'doBgAnim' to finish clearing the portrait
if (people._clearingThePortrait && talk._scriptMoreFlag == 3) {
// Reset the flags and call to talk
diff --git a/engines/sherlock/screen.cpp b/engines/sherlock/screen.cpp
index 1f56261150..72045a83fb 100644
--- a/engines/sherlock/screen.cpp
+++ b/engines/sherlock/screen.cpp
@@ -222,12 +222,12 @@ void Screen::randomTransition() {
if (offset < (SHERLOCK_SCREEN_WIDTH * SHERLOCK_SCREEN_HEIGHT))
*((byte *)getPixels() + offset) = *((const byte *)_backBuffer->getPixels() + offset);
-
+
if (idx != 0 && (idx % 100) == 0) {
// Ensure there's a full screen dirty rect for the next frame update
if (_dirtyRects.empty())
addDirtyRect(Common::Rect(0, 0, this->w, this->h));
-
+
events.pollEvents();
events.delay(1);
}
@@ -245,10 +245,10 @@ void Screen::verticalTransition() {
byte table[SHERLOCK_SCREEN_WIDTH];
Common::fill(&table[0], &table[SHERLOCK_SCREEN_WIDTH], 0);
-
- for (int yp = 0; yp < SHERLOCK_SCREEN_HEIGHT; ++yp) {
+
+ for (int yp = 0; yp < SHERLOCK_SCREEN_HEIGHT; ++yp) {
for (int xp = 0; xp < SHERLOCK_SCREEN_WIDTH; ++xp) {
- int temp = (table[xp] >= 197) ? SHERLOCK_SCREEN_HEIGHT - table[xp] :
+ int temp = (table[xp] >= 197) ? SHERLOCK_SCREEN_HEIGHT - table[xp] :
_vm->getRandomNumber(3) + 1;
if (temp) {
@@ -384,7 +384,7 @@ void Screen::gPrint(const Common::Point &pt, byte color, const char *format, ...
int Screen::stringWidth(const Common::String &str) {
int width = 0;
- for (const char *c = str.c_str(); *c; ++c)
+ for (const char *c = str.c_str(); *c; ++c)
width += charWidth(*c);
return width;
@@ -442,7 +442,7 @@ void Screen::makeButton(const Common::Rect &bounds, int textX,
bb.fillRect(Common::Rect(bounds.left + 1, bounds.top + 1, bounds.right - 1, bounds.bottom - 1), BUTTON_MIDDLE);
gPrint(Common::Point(textX, bounds.top), COMMAND_HIGHLIGHTED, "%c", str[0]);
- gPrint(Common::Point(textX + charWidth(str[0]), bounds.top),
+ gPrint(Common::Point(textX + charWidth(str[0]), bounds.top),
COMMAND_FOREGROUND, "%s", str.c_str() + 1);
}
@@ -481,7 +481,7 @@ void Screen::makePanel(const Common::Rect &r) {
_backBuffer->hLine(r.left + 1, r.top + 1, r.right - 3, BUTTON_TOP);
_backBuffer->vLine(r.left, r.top, r.bottom - 1, BUTTON_TOP);
_backBuffer->vLine(r.left + 1, r.top + 1, r.bottom - 2, BUTTON_TOP);
-
+
_backBuffer->vLine(r.right - 1, r.top, r.bottom - 1, BUTTON_BOTTOM);
_backBuffer->vLine(r.right - 2, r.top + 1, r.bottom - 2, BUTTON_BOTTOM);
_backBuffer->hLine(r.left, r.bottom - 1, r.right - 1, BUTTON_BOTTOM);
diff --git a/engines/sherlock/settings.cpp b/engines/sherlock/settings.cpp
index e19aefd9c5..2a4d332edf 100644
--- a/engines/sherlock/settings.cpp
+++ b/engines/sherlock/settings.cpp
@@ -25,7 +25,7 @@
namespace Sherlock {
-const int SETUP_POINTS[12][4] = {
+const int SETUP_POINTS[12][4] = {
{ 4, 154, 101, 53 }, // Exit
{ 4, 165, 101, 53 }, // Music Toggle
{ 219, 165, 316, 268 }, // Voice Toggle
@@ -76,40 +76,40 @@ void Settings::drawInteface(bool flag) {
SETUP_POINTS[0][3] - screen.stringWidth("Exit") / 2, "Exit");
tempStr = Common::String::format("Music %s", SETUP_STRS0[sound._music]);
- screen.makeButton(Common::Rect(SETUP_POINTS[1][0], SETUP_POINTS[1][1], SETUP_POINTS[1][2], SETUP_POINTS[1][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[1][0], SETUP_POINTS[1][1], SETUP_POINTS[1][2], SETUP_POINTS[1][1] + 10),
SETUP_POINTS[1][3] - screen.stringWidth(tempStr) / 2, tempStr);
tempStr = Common::String::format("Voices %s", SETUP_STRS0[sound._voices]);
- screen.makeButton(Common::Rect(SETUP_POINTS[2][0], SETUP_POINTS[2][1], SETUP_POINTS[2][2], SETUP_POINTS[2][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[2][0], SETUP_POINTS[2][1], SETUP_POINTS[2][2], SETUP_POINTS[2][1] + 10),
SETUP_POINTS[2][3] - screen.stringWidth(tempStr) / 2, tempStr);
tempStr = Common::String::format("Sound Effects %s", SETUP_STRS0[sound._digitized]);
- screen.makeButton(Common::Rect(SETUP_POINTS[3][0], SETUP_POINTS[3][1], SETUP_POINTS[3][2], SETUP_POINTS[3][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[3][0], SETUP_POINTS[3][1], SETUP_POINTS[3][2], SETUP_POINTS[3][1] + 10),
SETUP_POINTS[3][3] - screen.stringWidth(tempStr) / 2, tempStr);
tempStr = Common::String::format("Auto Help %s", SETUP_STRS5[ui._helpStyle]);
- screen.makeButton(Common::Rect(SETUP_POINTS[4][0], SETUP_POINTS[4][1], SETUP_POINTS[4][2], SETUP_POINTS[4][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[4][0], SETUP_POINTS[4][1], SETUP_POINTS[4][2], SETUP_POINTS[4][1] + 10),
SETUP_POINTS[4][3] - screen.stringWidth(tempStr) / 2, tempStr);
- screen.makeButton(Common::Rect(SETUP_POINTS[5][0], SETUP_POINTS[5][1], SETUP_POINTS[5][2], SETUP_POINTS[5][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[5][0], SETUP_POINTS[5][1], SETUP_POINTS[5][2], SETUP_POINTS[5][1] + 10),
SETUP_POINTS[5][3] - screen.stringWidth("New Font Style") / 2, "New Font Style");
// WORKAROUND: We don't support the joystick in ScummVM, so draw the next two buttons as disabled
tempStr = "Joystick Off";
- screen.makeButton(Common::Rect(SETUP_POINTS[6][0], SETUP_POINTS[6][1], SETUP_POINTS[6][2], SETUP_POINTS[6][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[6][0], SETUP_POINTS[6][1], SETUP_POINTS[6][2], SETUP_POINTS[6][1] + 10),
SETUP_POINTS[6][3] - screen.stringWidth(tempStr) / 2, tempStr);
screen.buttonPrint(Common::Point(SETUP_POINTS[6][3], SETUP_POINTS[6][1]), COMMAND_NULL, false, tempStr);
tempStr = "Calibrate Joystick";
- screen.makeButton(Common::Rect(SETUP_POINTS[7][0], SETUP_POINTS[7][1], SETUP_POINTS[7][2], SETUP_POINTS[7][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[7][0], SETUP_POINTS[7][1], SETUP_POINTS[7][2], SETUP_POINTS[7][1] + 10),
SETUP_POINTS[7][3] - screen.stringWidth(tempStr) / 2, tempStr);
screen.buttonPrint(Common::Point(SETUP_POINTS[7][3], SETUP_POINTS[7][1]), COMMAND_NULL, false, tempStr);
tempStr = Common::String::format("Fade %s", screen._fadeStyle ? "by Pixel" : "Directly");
- screen.makeButton(Common::Rect(SETUP_POINTS[8][0], SETUP_POINTS[8][1], SETUP_POINTS[8][2], SETUP_POINTS[8][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[8][0], SETUP_POINTS[8][1], SETUP_POINTS[8][2], SETUP_POINTS[8][1] + 10),
SETUP_POINTS[8][3] - screen.stringWidth(tempStr) / 2, tempStr);
-
+
tempStr = Common::String::format("Windows %s", ui._windowStyle ? "Slide" : "Appear");
- screen.makeButton(Common::Rect(SETUP_POINTS[9][0], SETUP_POINTS[9][1], SETUP_POINTS[9][2], SETUP_POINTS[9][1] + 10),
+ screen.makeButton(Common::Rect(SETUP_POINTS[9][0], SETUP_POINTS[9][1], SETUP_POINTS[9][2], SETUP_POINTS[9][1] + 10),
SETUP_POINTS[9][3] - screen.stringWidth(tempStr) / 2, tempStr);
tempStr = Common::String::format("Portraits %s", SETUP_STRS0[people._portraitsOn]);
@@ -121,7 +121,7 @@ void Settings::drawInteface(bool flag) {
SETUP_POINTS[11][3] - screen.stringWidth(tempStr) / 2, tempStr);
screen.buttonPrint(Common::Point(SETUP_POINTS[11][3], SETUP_POINTS[11][1]), COMMAND_NULL, false, tempStr);
- // Show the window immediately, or slide it on-screen
+ // Show the window immediately, or slide it on-screen
if (!flag) {
if (!ui._windowStyle) {
screen.slamRect(Common::Rect(0, CONTROLS_Y1, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
@@ -150,7 +150,7 @@ int Settings::drawButtons(const Common::Point &pt, int _key) {
for (int idx = 0; idx < 12; ++idx) {
if ((pt.x > SETUP_POINTS[idx][0] && pt.x < SETUP_POINTS[idx][2] && pt.y > SETUP_POINTS[idx][1]
- && pt.y < (SETUP_POINTS[idx][1] + 10) && (events._released || events._released))
+ && pt.y < (SETUP_POINTS[idx][1] + 10) && (events._released || events._released))
|| (_key == SETUP_NAMES[idx][0])) {
found = idx;
color = COMMAND_HIGHLIGHTED;
@@ -160,23 +160,23 @@ int Settings::drawButtons(const Common::Point &pt, int _key) {
// Print the button text
switch (idx) {
- case 1:
+ case 1:
tempStr = Common::String::format("Music %s", SETUP_STRS0[sound._music]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
- case 2:
+ case 2:
tempStr = Common::String::format("Voices %s", SETUP_STRS0[sound._voices]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
- case 3:
+ case 3:
tempStr = Common::String::format("Sound Effects %s", SETUP_STRS0[sound._digitized]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
- case 4:
+ case 4:
tempStr = Common::String::format("Auto Help %s", SETUP_STRS2[ui._helpStyle]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
- case 6:
+ case 6:
tempStr = "Joystick Off";
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), COMMAND_NULL, true, tempStr);
break;
@@ -184,23 +184,23 @@ int Settings::drawButtons(const Common::Point &pt, int _key) {
tempStr = "Calibrate Joystick";
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), COMMAND_NULL, true, tempStr);
break;
- case 8:
+ case 8:
tempStr = Common::String::format("Fade %s", SETUP_STRS1[screen._fadeStyle]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
- case 9:
+ case 9:
tempStr = Common::String::format("Windows %s", SETUP_STRS3[ui._windowStyle]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
- case 10:
+ case 10:
tempStr = Common::String::format("Portraits %s", SETUP_STRS0[people._portraitsOn]);
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, tempStr);
break;
- case 11:
+ case 11:
tempStr = "Key Pad Slow";
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), COMMAND_NULL, true, tempStr);
break;
- default:
+ default:
screen.buttonPrint(Common::Point(SETUP_POINTS[idx][3], SETUP_POINTS[idx][1]), color, true, SETUP_NAMES[idx]);
break;
}
diff --git a/engines/sherlock/sherlock.cpp b/engines/sherlock/sherlock.cpp
index 5a73b4fd1d..1a6e84b186 100644
--- a/engines/sherlock/sherlock.cpp
+++ b/engines/sherlock/sherlock.cpp
@@ -119,7 +119,7 @@ Common::Error SherlockEngine::run() {
}
while (!shouldQuit()) {
- // Prepare for scene, and handle any game-specific scenes. This allows
+ // Prepare for scene, and handle any game-specific scenes. This allows
// for game specific cutscenes or mini-games that aren't standard scenes
startScene();
if (shouldQuit())
@@ -131,7 +131,7 @@ Common::Error SherlockEngine::run() {
// Reset the data for the player character (Sherlock)
_people->reset();
- // Initialize and load the scene.
+ // Initialize and load the scene.
_scene->selectScene();
// Scene handling loop
diff --git a/engines/sherlock/sound.h b/engines/sherlock/sound.h
index 1fd4c29b12..5c2e8808ee 100644
--- a/engines/sherlock/sound.h
+++ b/engines/sherlock/sound.h
@@ -64,7 +64,7 @@ public:
int loadSong(int songNumber);
void startSong();
void freeSong();
-
+
void playMusic(const Common::String &name);
void stopMusic();
void stopSndFuncPtr(int v1, int v2);
diff --git a/engines/sherlock/talk.cpp b/engines/sherlock/talk.cpp
index b1f4d4e546..55a79f8170 100644
--- a/engines/sherlock/talk.cpp
+++ b/engines/sherlock/talk.cpp
@@ -86,7 +86,7 @@ TalkSequences::TalkSequences(const byte *data) {
}
void TalkSequences::clear() {
- Common::fill(&_data[0], &_data[MAX_TALK_SEQUENCES], 0);
+ Common::fill(&_data[0], &_data[MAX_TALK_SEQUENCES], 0);
}
/*----------------------------------------------------------------*/
@@ -121,10 +121,10 @@ void Talk::setSequences(const byte *talkSequences, const byte *stillSequences, i
/**
* Called whenever a conversation or item script needs to be run. For standard conversations,
- * it opens up a description window similar to how 'talk' does, but shows a 'reply' directly
- * instead of waiting for a statement option.
+ * it opens up a description window similar to how 'talk' does, but shows a 'reply' directly
+ * instead of waiting for a statement option.
* @remarks It seems that at some point, all item scripts were set up to use this as well.
- * In their case, the conversation display is simply suppressed, and control is passed on to
+ * In their case, the conversation display is simply suppressed, and control is passed on to
* doScript to implement whatever action is required.
*/
void Talk::talkTo(const Common::String &filename) {
@@ -185,7 +185,7 @@ void Talk::talkTo(const Common::String &filename) {
SequenceEntry &ss = _savedSequences[idx];
for (uint idx2 = 0; idx2 < ss._sequences.size(); ++idx2)
scene._bgShapes[ss._objNum]._sequences[idx2] = ss._sequences[idx2];
-
+
// Reset the object's frame to the beginning of the sequence
scene._bgShapes[ss._objNum]._frameNumber = 0;
}
@@ -314,7 +314,7 @@ void Talk::talkTo(const Common::String &filename) {
ui.clearInfo();
}
- // Handle replies until there's no further linked file,
+ // Handle replies until there's no further linked file,
// or the link file isn't a reply first cnversation
while (!_vm->shouldQuit()) {
clearSequences();
@@ -336,7 +336,7 @@ void Talk::talkTo(const Common::String &filename) {
setTalkMap();
}
-
+
// Check for a linked file
if (!statement._linkFile.empty() && !_scriptMoreFlag) {
Common::String linkFilename = statement._linkFile;
@@ -385,7 +385,7 @@ void Talk::talkTo(const Common::String &filename) {
screen.buttonPrint(Common::Point(119, CONTROLS_Y), color, true, "Exit");
} else {
screen.buttonPrint(Common::Point(119, CONTROLS_Y), color, false, "Exit");
-
+
if (!ui._windowStyle) {
screen.slamRect(Common::Rect(0, CONTROLS_Y,
SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT));
@@ -451,7 +451,7 @@ void Talk::talkTo(const Common::String &filename) {
/**
* Main method for handling conversations when a character to talk to has been
- * selected. It will make Holmes walk to the person to talk to, draws the
+ * selected. It will make Holmes walk to the person to talk to, draws the
* interface window for the conversation and passes on control to give the
* player a list of options to make a selection from
*/
@@ -497,7 +497,7 @@ void Talk::talk(int objNum) {
events.setCursor(WAIT);
if (obj._lookPosition.y != 0)
// Need to walk to character first
- people.walkToCoords(Common::Point(obj._lookPosition.x, obj._lookPosition.y * 100),
+ people.walkToCoords(Common::Point(obj._lookPosition.x, obj._lookPosition.y * 100),
obj._lookFacing);
events.setCursor(ARROW);
@@ -587,7 +587,7 @@ void Talk::loadTalkFile(const Common::String &filename) {
_statements.resize(talkStream->readByte());
for (uint idx = 0; idx < _statements.size(); ++idx)
_statements[idx].synchronize(*talkStream);
-
+
delete talkStream;
if (!sound._voices)
@@ -607,7 +607,7 @@ void Talk::stripVoiceCommands() {
if (statement._reply[idx] == SFX_COMMAND) {
// Replace instruction character with a space, and delete the
// rest of the name following it
- statement._reply = Common::String(statement._reply.c_str(),
+ statement._reply = Common::String(statement._reply.c_str(),
statement._reply.c_str() + idx) + " " +
Common::String(statement._reply.c_str() + 9);
}
@@ -673,7 +673,7 @@ void Talk::drawInterface() {
}
/**
- * Display a list of statements in a window at the bottom of the scren that the
+ * Display a list of statements in a window at the bottom of the scren that the
* player can select from.
*/
bool Talk::displayTalk(bool slamIt) {
@@ -681,7 +681,7 @@ bool Talk::displayTalk(bool slamIt) {
int yp = CONTROLS_Y + 14;
int lineY = -1;
_moreTalkDown = _moreTalkUp = false;
-
+
for (uint idx = 0; idx < _statements.size(); ++idx) {
_statements[idx]._talkPos.top = _statements[idx]._talkPos.bottom = -1;
}
@@ -708,7 +708,7 @@ bool Talk::displayTalk(bool slamIt) {
screen.vgaBar(Common::Rect(5, CONTROLS_Y + 11, 15, CONTROLS_Y + 22), INV_BACKGROUND);
} else {
screen.buttonPrint(Common::Point(159, CONTROLS_Y), COMMAND_NULL, false, "Up");
- screen._backBuffer1.fillRect(Common::Rect(5, CONTROLS_Y + 11,
+ screen._backBuffer1.fillRect(Common::Rect(5, CONTROLS_Y + 11,
15, CONTROLS_Y + 22), INV_BACKGROUND);
}
}
@@ -720,9 +720,9 @@ bool Talk::displayTalk(bool slamIt) {
if (statement._talkMap != -1) {
bool flag = _talkHistory[_converseNum][idx];
- lineY = talkLine(idx, statement._talkMap, flag ? TALK_NULL : INV_FOREGROUND,
+ lineY = talkLine(idx, statement._talkMap, flag ? TALK_NULL : INV_FOREGROUND,
yp, slamIt);
-
+
if (lineY != -1) {
statement._talkPos.top = yp;
yp = lineY;
@@ -834,7 +834,7 @@ int Talk::talkLine(int lineNum, int stateNum, byte color, int lineY, bool slamIt
// Move to next line, if any
lineY += 9;
lineStartP = lineEndP;
-
+
if (!*lineEndP)
break;
} else {
@@ -911,7 +911,7 @@ void Talk::pushSequence(int speaker) {
seqEntry._seqTo = obj._seqTo;
}
}
-
+
_sequenceStack.push(seqEntry);
if (_scriptStack.size() >= 5)
error("script stack overflow");
@@ -923,7 +923,7 @@ void Talk::pushSequence(int speaker) {
void Talk::setSequence(int speaker) {
People &people = *_vm->_people;
Scene &scene = *_vm->_scene;
-
+
// If no speaker is specified, then nothing needs to be done
if (speaker == -1)
return;
@@ -965,7 +965,7 @@ void Talk::setStillSeq(int speaker) {
int objNum = people.findSpeaker(speaker);
if (objNum != -1) {
Object &obj = scene._bgShapes[objNum];
-
+
if (obj._seqSize < MAX_TALK_SEQUENCES) {
warning("Tried to copy too few still frames");
} else {
@@ -1206,7 +1206,7 @@ void Talk::doScript(const Common::String &script) {
++str;
_scriptCurrentIndex = str - scriptStart;
- people.walkToCoords(Common::Point(((str[0] - 1) * 256 + str[1] - 1) * 100,
+ people.walkToCoords(Common::Point(((str[0] - 1) * 256 + str[1] - 1) * 100,
str[2] * 100), str[3] - 1);
if (_talkToAbort)
return;
@@ -1270,7 +1270,7 @@ void Talk::doScript(const Common::String &script) {
++str;
break;
}
-
+
case SFX_COMMAND:
++str;
if (sound._voices) {
@@ -1305,7 +1305,7 @@ void Talk::doScript(const Common::String &script) {
int flag = (str[0] - 1) * 256 + str[1] - 1 - (str[1] == 1 ? 1 : 0);
++str;
wait = 0;
-
+
bool result = flag < 0x8000;
if (_vm->readFlags(flag & 0x7fff) != result) {
do {
@@ -1761,7 +1761,7 @@ void Talk::popStack() {
void Talk::synchronize(Common::Serializer &s) {
for (int idx = 0; idx < MAX_TALK_FILES; ++idx) {
TalkHistoryEntry &he = _talkHistory[idx];
-
+
for (int flag = 0; flag < 16; ++flag)
s.syncAsByte(he._data[flag]);
}
diff --git a/engines/sherlock/user_interface.cpp b/engines/sherlock/user_interface.cpp
index a134b95196..f048e280a8 100644
--- a/engines/sherlock/user_interface.cpp
+++ b/engines/sherlock/user_interface.cpp
@@ -27,7 +27,7 @@
namespace Sherlock {
// Main user interface menu control locations
-const int MENU_POINTS[12][4] = {
+const int MENU_POINTS[12][4] = {
{ 13, 153, 72, 165 },
{ 13, 169, 72, 181 },
{ 13, 185, 72, 197 },
@@ -39,11 +39,11 @@ const int MENU_POINTS[12][4] = {
{ 165, 185, 233, 197 },
{ 249, 153, 305, 165 },
{ 249, 169, 305, 181 },
- { 249, 185, 305, 197 }
+ { 249, 185, 305, 197 }
};
// Inventory control locations */
-const int INVENTORY_POINTS[8][3] = {
+const int INVENTORY_POINTS[8][3] = {
{ 4, 50, 29 },
{ 52, 99, 77 },
{ 101, 140, 123 },
@@ -51,7 +51,7 @@ const int INVENTORY_POINTS[8][3] = {
{ 189, 219, 198 },
{ 221, 251, 234 },
{ 253, 283, 266 },
- { 285, 315, 294 }
+ { 285, 315, 294 }
};
const char COMMANDS[13] = "LMTPOCIUGJFS";
@@ -59,23 +59,23 @@ const char INVENTORY_COMMANDS[9] = { "ELUG-+,." };
const char *const PRESS_KEY_FOR_MORE = "Press any Key for More.";
const char *const PRESS_KEY_TO_CONTINUE = "Press any Key to Continue.";
-const char *const MOPEN[] = {
- "This cannot be opened", "It is already open", "It is locked", "Wait for Watson", " ", "."
+const char *const MOPEN[] = {
+ "This cannot be opened", "It is already open", "It is locked", "Wait for Watson", " ", "."
};
-const char *const MCLOSE[] = {
- "This cannot be closed", "It is already closed", "The safe door is in the way"
+const char *const MCLOSE[] = {
+ "This cannot be closed", "It is already closed", "The safe door is in the way"
};
-const char *const MMOVE[] = {
+const char *const MMOVE[] = {
"This cannot be moved", "It is bolted to the floor", "It is too heavy", "The other crate is in the way"
};
const char *const MPICK[] = {
"Nothing of interest here", "It is bolted down", "It is too big to carry", "It is too heavy",
- "I think a girl would be more your type", "Those flowers belong to Penny", "She's far too young for you!",
- "I think a girl would be more your type!", "Government property for official use only"
+ "I think a girl would be more your type", "Those flowers belong to Penny", "She's far too young for you!",
+ "I think a girl would be more your type!", "Government property for official use only"
};
-const char *const MUSE[] = {
- "You can't do that", "It had no effect", "You can't reach it", "OK, the door looks bigger! Happy?",
- "Doors don't smoke"
+const char *const MUSE[] = {
+ "You can't do that", "It had no effect", "You can't reach it", "OK, the door looks bigger! Happy?",
+ "Doors don't smoke"
};
/*----------------------------------------------------------------*/
@@ -198,7 +198,7 @@ void UserInterface::handleInput() {
} else if (pt.y < CONTROLS_Y &&
((events._rightReleased && _helpStyle) || (events._released && !_helpStyle)) &&
(_bgFound != -1 && _bgFound < 1000) &&
- (scene._bgShapes[_bgFound]._defaultCommand ||
+ (scene._bgShapes[_bgFound]._defaultCommand ||
!scene._bgShapes[_bgFound]._description.empty())) {
// If there is no default command, set it to Look
if (scene._bgShapes[_bgFound]._defaultCommand)
@@ -208,7 +208,7 @@ void UserInterface::handleInput() {
events._released = true;
events._pressed = events._oldButtons = false;
_help = _oldHelp = -1;
-
+
if (_menuMode == LOOK_MODE) {
// Set the flag to tell the game that this was a right-click
// call to look and should exit without the look button being pressed
@@ -323,7 +323,7 @@ void UserInterface::handleInput() {
//
// Do input processing
//
- if (events._pressed || events._released || events._rightPressed ||
+ if (events._pressed || events._released || events._rightPressed ||
_keycode != Common::KEYCODE_INVALID || _pause) {
if (((events._released && (_helpStyle || _help == -1)) || (events._rightReleased && !_helpStyle)) &&
(pt.y <= CONTROLS_Y) && (_menuMode == STD_MODE)) {
@@ -390,7 +390,7 @@ void UserInterface::handleInput() {
// As long as there isn't an open window, do main input processing.
// Windows are opened when in TALK, USE, INV, and GIVE modes
- if ((!_windowOpen && !_menuCounter && pt.y > CONTROLS_Y) ||
+ if ((!_windowOpen && !_menuCounter && pt.y > CONTROLS_Y) ||
_keycode != Common::KEYCODE_INVALID) {
if (events._pressed || events._released || _pause ||
_keycode != Common::KEYCODE_INVALID)
@@ -426,7 +426,7 @@ void UserInterface::restoreButton(int num) {
screen._backBuffer1.blitFrom(screen._backBuffer2, pt,
Common::Rect(pt.x, pt.y, pt.x + 90, pt.y + 19));
screen.slamArea(pt.x, pt.y, pt.x + frame.w, pt.y + frame.h);
-
+
if (!_menuCounter) {
_infoFlag++;
clearInfo();
@@ -461,7 +461,7 @@ void UserInterface::pushButton(int num) {
*/
void UserInterface::toggleButton(int num) {
Screen &screen = *_vm->_screen;
-
+
if (_menuMode != (num + 1)) {
_menuMode = (MenuMode)(num + 1);
_oldKey = COMMANDS[num];
@@ -534,7 +534,7 @@ void UserInterface::examine() {
if (pt.y < (CONTROLS_Y + 9)) {
Object &obj = scene._bgShapes[_bgFound];
-
+
if (obj._lookcAnim != 0) {
int canimSpeed = ((obj._lookcAnim & 0xe0) >> 5) + 1;
scene._cAnimFramePause = obj._lookFrames;
@@ -669,13 +669,13 @@ void UserInterface::lookScreen(const Common::Point &pt) {
}
int xStart = (SHERLOCK_SCREEN_WIDTH - x) / 2;
- screen.print(Common::Point(xStart, INFO_LINE + 1),
+ screen.print(Common::Point(xStart, INFO_LINE + 1),
INFO_FOREGROUND, "Give ");
- screen.print(Common::Point(xStart + width, INFO_LINE + 1),
+ screen.print(Common::Point(xStart + width, INFO_LINE + 1),
TALK_FOREGROUND, inv[_selector]._name.c_str());
- screen.print(Common::Point(xStart + width + width1, INFO_LINE + 1),
+ screen.print(Common::Point(xStart + width + width1, INFO_LINE + 1),
INFO_FOREGROUND, " to ");
- screen.print(Common::Point(xStart + width + width1 + width2, INFO_LINE + 1),
+ screen.print(Common::Point(xStart + width + width1 + width2, INFO_LINE + 1),
INFO_FOREGROUND, tempStr.c_str());
}
} else {
@@ -795,16 +795,16 @@ void UserInterface::doEnvControl() {
if (_selector != _oldSelector) {
if (_oldSelector != -1 && _oldSelector >= saves._savegameIndex && _oldSelector < (saves._savegameIndex + 5)) {
- screen.print(Common::Point(6, CONTROLS_Y + 12 + (_oldSelector - saves._savegameIndex) * 10),
+ screen.print(Common::Point(6, CONTROLS_Y + 12 + (_oldSelector - saves._savegameIndex) * 10),
INV_FOREGROUND, "%d.", _oldSelector + 1);
- screen.print(Common::Point(24, CONTROLS_Y + 12 + (_oldSelector - saves._savegameIndex) * 10),
+ screen.print(Common::Point(24, CONTROLS_Y + 12 + (_oldSelector - saves._savegameIndex) * 10),
INV_FOREGROUND, "%s", saves._savegames[_oldSelector].c_str());
}
if (_selector != -1) {
- screen.print(Common::Point(6, CONTROLS_Y + 12 + (_selector - saves._savegameIndex) * 10),
+ screen.print(Common::Point(6, CONTROLS_Y + 12 + (_selector - saves._savegameIndex) * 10),
TALK_FOREGROUND, "%d.", _selector + 1);
- screen.print(Common::Point(24, CONTROLS_Y + 12 + (_selector - saves._savegameIndex) * 10),
+ screen.print(Common::Point(24, CONTROLS_Y + 12 + (_selector - saves._savegameIndex) * 10),
TALK_FOREGROUND, "%s", saves._savegames[_selector].c_str());
}
@@ -815,7 +815,7 @@ void UserInterface::doEnvControl() {
if ((found == 0 && events._released) || _key == 'E') {
banishWindow();
_windowBounds.top = CONTROLS_Y1;
-
+
events._pressed = events._released = _keyboardInput = false;
_keycode = Common::KEYCODE_INVALID;
} else if ((found == 1 && events._released) || _key == 'L') {
@@ -839,13 +839,13 @@ void UserInterface::doEnvControl() {
_keyboardInput = false;
} else {
if (!talk._talkToAbort) {
- screen._backBuffer1.fillRect(Common::Rect(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10,
+ screen._backBuffer1.fillRect(Common::Rect(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10,
SHERLOCK_SCREEN_WIDTH - 2, CONTROLS_Y + 20 + (_selector - saves._savegameIndex) * 10), INV_BACKGROUND);
- screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10), INV_FOREGROUND,
+ screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10), INV_FOREGROUND,
"%d.", _selector + 1);
- screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10), INV_FOREGROUND,
+ screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10), INV_FOREGROUND,
"%s", saves._savegames[_selector].c_str());
-
+
screen.slamArea(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10, 311, 10);
_selector = _oldSelector = -1;
}
@@ -887,7 +887,7 @@ void UserInterface::doEnvControl() {
bool moreKeys;
do {
saves._savegameIndex++;
- screen._backBuffer1.fillRect(Common::Rect(3, CONTROLS_Y + 11, SHERLOCK_SCREEN_WIDTH - 2,
+ screen._backBuffer1.fillRect(Common::Rect(3, CONTROLS_Y + 11, SHERLOCK_SCREEN_WIDTH - 2,
SHERLOCK_SCREEN_HEIGHT - 1), INV_BACKGROUND);
for (int idx = saves._savegameIndex; idx < (saves._savegameIndex + 5); ++idx) {
@@ -898,10 +898,10 @@ void UserInterface::doEnvControl() {
screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (idx - saves._savegameIndex) * 10), color,
"%d.", idx + 1);
- screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (idx - saves._savegameIndex) * 10), color,
+ screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (idx - saves._savegameIndex) * 10), color,
"%s", saves._savegames[idx].c_str());
}
-
+
screen.slamRect(Common::Rect(3, CONTROLS_Y + 11, SHERLOCK_SCREEN_WIDTH - 2, SHERLOCK_SCREEN_HEIGHT));
color = (!saves._savegameIndex) ? COMMAND_NULL : COMMAND_FOREGROUND;
@@ -1007,11 +1007,11 @@ void UserInterface::doEnvControl() {
_keyboardInput = false;
} else {
if (!talk._talkToAbort) {
- screen._backBuffer1.fillRect(Common::Rect(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10,
+ screen._backBuffer1.fillRect(Common::Rect(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10,
317, CONTROLS_Y + 20 + (_selector - saves._savegameIndex) * 10), INV_BACKGROUND);
- screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10),
+ screen.gPrint(Common::Point(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10),
INV_FOREGROUND, "%d.", _selector + 1);
- screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10),
+ screen.gPrint(Common::Point(24, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10),
INV_FOREGROUND, "%s", saves._savegames[_selector].c_str());
screen.slamArea(6, CONTROLS_Y + 11 + (_selector - saves._savegameIndex) * 10, 311, 10);
_selector = _oldSelector = -1;
@@ -1201,14 +1201,14 @@ void UserInterface::doInvControl() {
// If it's -1, then no inventory item is highlighted yet. Otherwise,
// an object in the scene has been clicked.
- if (_selector != -1 && inv._invMode == INVMODE_LOOK
+ if (_selector != -1 && inv._invMode == INVMODE_LOOK
&& mousePos.y >(CONTROLS_Y1 + 11))
inv.doInvJF();
if (talk._talkToAbort)
return;
- // Now check for the Use and Give actions. If inv_mode is 3,
+ // Now check for the Use and Give actions. If inv_mode is 3,
// that means GIVE is in effect, _selector is the object being
// given, and _find is the target.
// The same applies to USE, except if _selector is -1, then USE
@@ -1242,7 +1242,7 @@ void UserInterface::doInvControl() {
else
// Now inv object has been highlighted
checkUseAction(&scene._bgShapes[_find]._use[0], "*SELF*", MUSE, _find, temp - 2);
-
+
_selector = _oldSelector = -1;
}
}
@@ -1251,14 +1251,14 @@ void UserInterface::doInvControl() {
}
/**
- * Handles waiting whilst an object's description window is open.
+ * Handles waiting whilst an object's description window is open.
*/
void UserInterface::doLookControl() {
Events &events = *_vm->_events;
Inventory &inv = *_vm->_inventory;
Screen &screen = *_vm->_screen;
- _key = _oldKey = -1;
+ _key = _oldKey = -1;
_keyboardInput = _keycode != Common::KEYCODE_INVALID;
if (events._released || events._rightReleased || _keyboardInput) {
@@ -1268,7 +1268,7 @@ void UserInterface::doLookControl() {
if (!_descStr.empty()) {
printObjectDesc(_descStr, false);
} else if (!_lookHelp) {
- // Need to close the window and depress the Look button
+ // Need to close the window and depress the Look button
Common::Point pt(MENU_POINTS[0][0], MENU_POINTS[0][1]);
screen._backBuffer2.blitFrom((*_controls)[0]._frame, pt);
banishWindow(true);
@@ -1348,7 +1348,7 @@ void UserInterface::doMainControl() {
if (_temp == 12)
_key = -1;
-
+
if (events._rightPressed) {
_temp = 12;
_key = -1;
@@ -1356,7 +1356,7 @@ void UserInterface::doMainControl() {
} else if (!events._released) {
_key = -1;
}
-
+
// Check if the button being pointed to has changed
if (_oldKey != _key && !_windowOpen) {
// Clear the info line
@@ -1431,7 +1431,7 @@ void UserInterface::doMainControl() {
// Display the dialog
saves.drawInterface();
-
+
_selector = _oldSelector = -1;
_windowOpen = true;
break;
@@ -1550,7 +1550,7 @@ void UserInterface::doTalkControl() {
screen.buttonPrint(Common::Point(119, CONTROLS_Y), COMMAND_HIGHLIGHTED, true, "Exit");
else if (_endKeyActive)
screen.buttonPrint(Common::Point(119, CONTROLS_Y), COMMAND_FOREGROUND, true, "Exit");
-
+
if (mousePos.x > 140 && mousePos.x < 170 && mousePos.y > CONTROLS_Y && mousePos.y < (CONTROLS_Y + 10) && talk._moreTalkUp)
screen.buttonPrint(Common::Point(159, CONTROLS_Y), COMMAND_HIGHLIGHTED, true, "Up");
else if (talk._moreTalkUp)
@@ -1613,13 +1613,13 @@ void UserInterface::doTalkControl() {
}
if (events._released || _keyboardInput) {
- if (((Common::Rect(99, CONTROLS_Y, 138, CONTROLS_Y + 10).contains(mousePos) && events._released)
+ if (((Common::Rect(99, CONTROLS_Y, 138, CONTROLS_Y + 10).contains(mousePos) && events._released)
|| _key == 'E') && _endKeyActive) {
talk.freeTalkVars();
talk.pullSequence();
banishWindow();
_windowBounds.top = CONTROLS_Y1;
- } else if (((Common::Rect(140, CONTROLS_Y, 179, CONTROLS_Y + 10).contains(mousePos) && events._released)
+ } else if (((Common::Rect(140, CONTROLS_Y, 179, CONTROLS_Y + 10).contains(mousePos) && events._released)
|| _key == 'U') && talk._moreTalkUp) {
while (talk._statements[--talk._talkIndex]._talkMap == -1)
;
@@ -1655,7 +1655,7 @@ void UserInterface::doTalkControl() {
// Flag the response as having been used
talk._talkHistory[talk._converseNum][_selector] = true;
-
+
clearWindow();
screen.print(Common::Point(16, CONTROLS_Y + 12), TALK_FOREGROUND, "Sherlock Holmes");
talk.talkLine(_selector + 128, talk._statements[_selector]._talkMap, COMMAND_FOREGROUND, CONTROLS_Y + 21, true);
@@ -1784,7 +1784,7 @@ void UserInterface::doTalkControl() {
/**
* Handles events when the Journal is active.
* @remarks Whilst this would in theory be better in the Journal class, since it displays in
- * the user interface, it uses so many internal UI fields, that it sort of made some sense
+ * the user interface, it uses so many internal UI fields, that it sort of made some sense
* to put it in the UserInterface class.
*/
void UserInterface::journalControl() {
@@ -1801,7 +1801,7 @@ void UserInterface::journalControl() {
do {
_key = -1;
events.setButtonState();
-
+
// Handle keypresses
if (events.kbHit()) {
Common::KeyState keyState = events.getKey();
@@ -1859,7 +1859,7 @@ void UserInterface::printObjectDesc(const Common::String &str, bool firstTime) {
if (!_invLookFlag) {
// See if this look was called by a right button click or not
if (!_lookHelp) {
- // If it wasn't a right button click, then we need depress
+ // If it wasn't a right button click, then we need depress
// the look button before we close the window. So save a copy of the
// menu area, and draw the controls onto it
Surface tempSurface((*_controls)[0]._frame.w, (*_controls)[0]._frame.h);
@@ -1945,7 +1945,7 @@ void UserInterface::printObjectDesc(const Common::String &str, bool firstTime) {
do {
width += screen.charWidth(*msgP++);
} while (width < 300 && *msgP);
-
+
if (*msgP)
--msgP;
else
@@ -2036,7 +2036,7 @@ void UserInterface::summonWindow(const Surface &bgSurface, bool slideUp) {
} else {
// Gradually slide down the display of the window
for (int idx = 1; idx <= bgSurface.h; idx += 2) {
- screen._backBuffer->blitFrom(bgSurface,
+ screen._backBuffer->blitFrom(bgSurface,
Common::Point(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.h),
Common::Rect(0, bgSurface.h - idx, bgSurface.w, bgSurface.h));
screen.slamRect(Common::Rect(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.h,
@@ -2047,7 +2047,7 @@ void UserInterface::summonWindow(const Surface &bgSurface, bool slideUp) {
}
// Final display of the entire window
- screen._backBuffer->blitFrom(bgSurface, Common::Point(0,
+ screen._backBuffer->blitFrom(bgSurface, Common::Point(0,
SHERLOCK_SCREEN_HEIGHT - bgSurface.h),
Common::Rect(0, 0, bgSurface.w, bgSurface.h));
screen.slamArea(0, SHERLOCK_SCREEN_HEIGHT - bgSurface.h, bgSurface.w, bgSurface.h);
@@ -2100,7 +2100,7 @@ void UserInterface::banishWindow(bool slideUp) {
Common::Point(0, CONTROLS_Y),
Common::Rect(0, CONTROLS_Y, SHERLOCK_SCREEN_WIDTH, CONTROLS_Y + idx));
- screen.slamArea(0, CONTROLS_Y + idx - 2, SHERLOCK_SCREEN_WIDTH,
+ screen.slamArea(0, CONTROLS_Y + idx - 2, SHERLOCK_SCREEN_WIDTH,
SHERLOCK_SCREEN_HEIGHT - CONTROLS_Y - idx + 2);
events.delay(10);
}
@@ -2162,7 +2162,7 @@ void UserInterface::checkUseAction(const UseType *use, const Common::String &inv
_infoFlag = true;
clearInfo();
_infoFlag = true;
-
+
// Display error message
_menuCounter = 30;
screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "You can't do that to yourself.");
@@ -2191,7 +2191,7 @@ void UserInterface::checkUseAction(const UseType *use, const Common::String &inv
if (targetNum != -1) {
// Found a target, so do the action
const UseType &action = use[targetNum];
-
+
events.setCursor(WAIT);
if (action._useFlag)
@@ -2274,7 +2274,7 @@ void UserInterface::checkAction(ActionType &action, const char *const messages[]
cAnimNum = 9;
else
cAnimNum = action._cAnimNum - 1;
-
+
int dir = -1;
if (action._cAnimNum != 99) {
CAnim &anim = scene._cAnim[cAnimNum];
@@ -2299,7 +2299,7 @@ void UserInterface::checkAction(ActionType &action, const char *const messages[]
bool printed = false;
for (int nameIdx = 0; nameIdx < 4; ++nameIdx) {
- if (action._names[nameIdx].hasPrefix("*") && action._names[nameIdx].size() >= 2
+ if (action._names[nameIdx].hasPrefix("*") && action._names[nameIdx].size() >= 2
&& toupper(action._names[nameIdx][1]) == 'W') {
if (obj.checkNameForCodes(Common::String(action._names[nameIdx].c_str() + 2), messages)) {
if (!talk._talkToAbort)
@@ -2367,7 +2367,7 @@ void UserInterface::checkAction(ActionType &action, const char *const messages[]
screen.print(Common::Point(0, INFO_LINE + 1), INFO_FOREGROUND, "Done...");
// Set how long to show the message
- _menuCounter = 30;
+ _menuCounter = 30;
}
}
}