aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sherlock/detection.cpp2
-rw-r--r--engines/sherlock/journal.cpp18
-rw-r--r--engines/sherlock/scalpel/darts.cpp8
-rw-r--r--engines/sherlock/scalpel/scalpel.h4
-rw-r--r--engines/sherlock/scene.cpp8
5 files changed, 19 insertions, 21 deletions
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp
index da3ad4628f..ea68d79a1b 100644
--- a/engines/sherlock/detection.cpp
+++ b/engines/sherlock/detection.cpp
@@ -118,7 +118,7 @@ static const ADExtraGuiOptionsMap optionsList[] = {
class SherlockMetaEngine : public AdvancedMetaEngine {
public:
- SherlockMetaEngine() : AdvancedMetaEngine(Sherlock::gameDescriptions, sizeof(Sherlock::SherlockGameDescription),
+ SherlockMetaEngine() : AdvancedMetaEngine(Sherlock::gameDescriptions, sizeof(Sherlock::SherlockGameDescription),
sherlockGames, optionsList) {}
virtual const char *getName() const {
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp
index f3754db95f..ba6a809b44 100644
--- a/engines/sherlock/journal.cpp
+++ b/engines/sherlock/journal.cpp
@@ -496,7 +496,7 @@ void Journal::drawJournalFrame() {
screen.makeButton(Common::Rect(JOURNAL_POINTS[8][0], JOURNAL_BUTTONS_Y + 11,
JOURNAL_POINTS[8][1], JOURNAL_BUTTONS_Y + 21),
JOURNAL_POINTS[8][2] - screen.stringWidth("Print Text") / 2, "Print Text");
- screen.buttonPrint(Common::Point(JOURNAL_POINTS[8][2], JOURNAL_BUTTONS_Y + 11),
+ screen.buttonPrint(Common::Point(JOURNAL_POINTS[8][2], JOURNAL_BUTTONS_Y + 11),
COMMAND_NULL, false, "Print Text");
}
@@ -918,7 +918,7 @@ bool Journal::handleEvents(int key) {
drawJournal(1, LINES_PER_PAGE);
doArrows();
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
-
+
} else if (((btn == BTN_DOWN && events._released) || key == 'D') && _down) {
// Scroll down
drawJournal(2, LINES_PER_PAGE);
@@ -934,7 +934,7 @@ bool Journal::handleEvents(int key) {
doArrows();
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
-
+
} else if (((btn == 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;
@@ -965,7 +965,7 @@ bool Journal::handleEvents(int key) {
}
} while (!doneFlag);
doneFlag = false;
-
+
} else if (((btn == BTN_FIRST_PAGE && events._released) || key == 'F') && _up) {
// First page
_index = _sub = 0;
@@ -976,7 +976,7 @@ bool Journal::handleEvents(int key) {
drawJournal(0, 0);
doArrows();
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
-
+
} else if (((btn == BTN_LAST_PAGE && events._released) || key == 'L') && _down) {
// Last page
if ((_page + 10) > _maxPage)
@@ -1114,15 +1114,15 @@ int Journal::getSearchString(bool printError) {
xp -= screen.charWidth(name.lastChar());
screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), INV_FOREGROUND);
name.deleteLastChar();
-
+
} else if (keyState.keycode == Common::KEYCODE_RETURN) {
done = 1;
-
+
} else if (keyState.keycode == Common::KEYCODE_ESCAPE) {
screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), BUTTON_MIDDLE);
done = -1;
-
- } else if (keyState.ascii >= ' ' && keyState.ascii <= 'z' && keyState.keycode != Common::KEYCODE_AT &&
+
+ } else if (keyState.ascii >= ' ' && keyState.ascii <= 'z' && keyState.keycode != Common::KEYCODE_AT &&
name.size() < JOURNAL_SEACRH_MAX_CHARS && (xp + screen.charWidth(keyState.ascii)) < JOURNAL_SEARCH_RIGHT) {
char ch = toupper(keyState.ascii);
screen.vgaBar(Common::Rect(xp, yp, xp + 8, yp + 9), BUTTON_MIDDLE);
diff --git a/engines/sherlock/scalpel/darts.cpp b/engines/sherlock/scalpel/darts.cpp
index 23ca95454f..96d272fed0 100644
--- a/engines/sherlock/scalpel/darts.cpp
+++ b/engines/sherlock/scalpel/darts.cpp
@@ -413,11 +413,9 @@ int Darts::doPowerBar(const Common::Point &pt, byte color, int goToPower, bool i
if (sound._musicOn) {
if (!(idx % 3))
sound.waitTimerRoland(1);
- } else {
- if (!(idx % 8))
- events.wait(1);
- }
-
+ } else if (!(idx % 8))
+ events.wait(1);
+
++idx;
} while (!done);
diff --git a/engines/sherlock/scalpel/scalpel.h b/engines/sherlock/scalpel/scalpel.h
index 14e30ff996..8743bfb7a9 100644
--- a/engines/sherlock/scalpel/scalpel.h
+++ b/engines/sherlock/scalpel/scalpel.h
@@ -31,9 +31,9 @@ namespace Sherlock {
namespace Scalpel {
enum { BLACKWOOD_CAPTURE = 2, BAKER_STREET = 4, DRAWING_ROOM = 12, STATION = 17, PUB_INTERIOR = 19,
- LAWYER_OFFICE = 27, BAKER_ST_EXTERIOR = 39, RESCUE_ANNA = 52, MOOREHEAD_DEATH = 53, EXIT_GAME = 55,
+ LAWYER_OFFICE = 27, BAKER_ST_EXTERIOR = 39, RESCUE_ANNA = 52, MOOREHEAD_DEATH = 53, EXIT_GAME = 55,
BRUMWELL_SUICIDE = 70, OVERHEAD_MAP2 = 98, DARTS_GAME = 99, OVERHEAD_MAP = 100 };
-
+
class ScalpelEngine : public SherlockEngine {
private:
Darts *_darts;
diff --git a/engines/sherlock/scene.cpp b/engines/sherlock/scene.cpp
index 573dfff2b1..f97b791724 100644
--- a/engines/sherlock/scene.cpp
+++ b/engines/sherlock/scene.cpp
@@ -262,7 +262,7 @@ bool Scene::loadScene(const Common::String &filename) {
}
} else {
Common::SeekableReadStream *infoStream;
-
+
// Read shapes
infoStream = Resources::decompressLZ(*rrmStream, bgHeader._numStructs * 569);
@@ -271,7 +271,7 @@ bool Scene::loadScene(const Common::String &filename) {
_bgShapes[idx].load(*infoStream);
delete infoStream;
-
+
// Read description texts
if (bgHeader._descSize) {
infoStream = Resources::decompressLZ(*rrmStream, bgHeader._descSize);
@@ -764,7 +764,7 @@ void Scene::updateBackground() {
for (uint idx = 0; idx < _bgShapes.size(); ++idx) {
if ((_bgShapes[idx]._type == ACTIVE_BG_SHAPE || _bgShapes[idx]._type == STATIC_BG_SHAPE) &&
_bgShapes[idx]._misc == NORMAL_FORWARD)
- screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position,
+ screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position,
_bgShapes[idx]._flags & OBJ_FLIPPED);
}
@@ -784,7 +784,7 @@ void Scene::updateBackground() {
if ((_bgShapes[idx]._type == ACTIVE_BG_SHAPE || _bgShapes[idx]._type == STATIC_BG_SHAPE) &&
_bgShapes[idx]._misc == FORWARD)
- screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position,
+ screen._backBuffer->transBlitFrom(*_bgShapes[idx]._imageFrame, _bgShapes[idx]._position,
_bgShapes[idx]._flags & OBJ_FLIPPED);
}