Skip to content

Commit

Permalink
Merge pull request #8 from sirlemonhead/sherlock
Browse files Browse the repository at this point in the history
SHERLOCK: Fix code formatting issues and comment spelling mistakes
  • Loading branch information
dreammaster committed May 18, 2015
2 parents 0aebac9 + da9333a commit ffe82a4
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion engines/sherlock/animation.cpp
Expand Up @@ -28,7 +28,7 @@ namespace Sherlock {

static const int NO_FRAMES = FRAMES_END;

Animation::Animation(SherlockEngine *vm): _vm(vm) {
Animation::Animation(SherlockEngine *vm) : _vm(vm) {
}

/**
Expand Down
1 change: 0 additions & 1 deletion engines/sherlock/animation.h
Expand Up @@ -44,7 +44,6 @@ class Animation {
Common::Array<Common::Array<int> > _titleFrames;

const int *checkForSoundFrames(const Common::String &filename);
public:
public:
Animation(SherlockEngine *vm);

Expand Down
6 changes: 3 additions & 3 deletions engines/sherlock/detection.cpp
Expand Up @@ -66,7 +66,7 @@ static const ADExtraGuiOptionsMap optionsList[] = {
GAMEOPTION_ORIGINAL_SAVES,
{
_s("Use original savegame dialog"),
_s("Files button in-game shows original savegame dialog rather than ScummVM menu"),
_s("Files button in-game shows original savegame dialog rather than the ScummVM menu"),
"originalsaveload",
false
}
Expand Down Expand Up @@ -197,7 +197,7 @@ SaveStateDescriptor SherlockMetaEngine::querySaveMetaInfos(const char *target, i


#if PLUGIN_ENABLED_DYNAMIC(SHERLOCK)
REGISTER_PLUGIN_DYNAMIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
REGISTER_PLUGIN_DYNAMIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
#else
REGISTER_PLUGIN_STATIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
REGISTER_PLUGIN_STATIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
#endif
4 changes: 2 additions & 2 deletions engines/sherlock/inventory.cpp
Expand Up @@ -128,7 +128,7 @@ void Inventory::loadGraphics() {

/**
* Searches through the list of names that correspond to the inventory items
* and returns the numer that matches the passed name
* and returns the number that matches the passed name
*/
int Inventory::findInv(const Common::String &name) {
for (int idx = 0; idx < (int)_names.size(); ++idx) {
Expand All @@ -150,7 +150,7 @@ void Inventory::putInv(int slamIt) {
UserInterface &ui = *_vm->_ui;

// If an inventory item has disappeared (due to using it or giving it),
// a blank space slot may haave appeared. If so, adjust the inventory
// a blank space slot may have appeared. If so, adjust the inventory
if (_invIndex > 0 && _invIndex > (_holdings - 6)) {
--_invIndex;
freeGraphics();
Expand Down
8 changes: 3 additions & 5 deletions engines/sherlock/journal.cpp
Expand Up @@ -250,7 +250,7 @@ void Journal::loadJournalFile(bool alreadyLoaded) {

// Is it a control character?
if (c < 128) {
// Nope. Set flag for allowing control coes to insert spaces
// Nope. Set flag for allowing control codes to insert spaces
ctrlSpace = true;
assert(c >= ' ');

Expand Down Expand Up @@ -900,7 +900,6 @@ bool Journal::handleEvents(int key) {
}
screen.buttonPrint(Common::Point(JOURNAL_POINTS[7][2], JOURNAL_BUTTONS_Y + 11), color, true, "Last Page");


// Print Text button
if (pt.x > JOURNAL_POINTS[8][0] && pt.x < JOURNAL_POINTS[8][1] && pt.y >= (JOURNAL_BUTTONS_Y + 11) &&
pt.y < (JOURNAL_BUTTONS_Y + 20) && !_journal.empty()) {
Expand All @@ -924,14 +923,14 @@ bool Journal::handleEvents(int key) {
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
}

if (((found == BTN_UP && events._released) || key =='U') && _up) {
if (((found == BTN_UP && events._released) || key == 'U') && _up) {
// Scroll up
drawJournal(1, LINES_PER_PAGE);
doArrows();
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
}

if (((found == BTN_DOWN && events._released) || key =='D') && _down) {
if (((found == BTN_DOWN && events._released) || key == 'D') && _down) {
// Scroll down
drawJournal(2, LINES_PER_PAGE);
doArrows();
Expand All @@ -953,7 +952,6 @@ bool Journal::handleEvents(int key) {
screen.buttonPrint(Common::Point(JOURNAL_POINTS[5][2], JOURNAL_BUTTONS_Y + 11), COMMAND_FOREGROUND, true, "Search");
bool notFound = false;


do {
int dir;
if ((dir = getFindName(notFound)) != 0) {
Expand Down
4 changes: 2 additions & 2 deletions engines/sherlock/people.cpp
Expand Up @@ -119,7 +119,7 @@ const char PORTRAITS[MAX_PEOPLE][5] = {
{ "INSP" } // Inspector Lestrade (Scotland Yard)
};

const char *const NAMES[MAX_PEOPLE] = {
const char *const NAMES[MAX_PEOPLE] = {
"Sherlock Holmes",
"Dr. Watson",
"Inspector Lestrade",
Expand Down Expand Up @@ -221,7 +221,7 @@ People::~People() {
* Reset the player data
*/
void People::reset() {
// Note: The engine has theoretical support for two player charactersm but only the first one is used.
// Note: The engine has theoretical support for two player characters but only the first one is used.
// Watson is, instead, handled by a different sprite in each scene, with a very simple initial movement, if any
Sprite &p = _data[PLAYER];

Expand Down
4 changes: 2 additions & 2 deletions engines/sherlock/people.h
Expand Up @@ -53,12 +53,12 @@ enum {
MAP_DOWN = 5, MAP_DOWNLEFT = 6, MAP_LEFT = 2, MAP_UPLEFT = 8
};

extern const char *const NAMES[MAX_PEOPLE];
extern const char *const NAMES[MAX_PEOPLE];
extern const char PORTRAITS[MAX_PEOPLE][5];

class SherlockEngine;

class Person: public Sprite {
class Person : public Sprite {
public:
Person() : Sprite() {}

Expand Down
2 changes: 1 addition & 1 deletion engines/sherlock/scene.cpp
Expand Up @@ -964,7 +964,7 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
if (talk._talkToAbort)
return 1;

// Add new anim shape entry for displaying the animationo
// Add new anim shape entry for displaying the animation
_canimShapes.push_back(Object());
Object &cObj = _canimShapes[_canimShapes.size() - 1];

Expand Down

0 comments on commit ffe82a4

Please sign in to comment.