SHERLOCK: Fix code formatting issues and comment spelling mistakes
This commit is contained in:
parent
5e351b6bf3
commit
da9333a924
8 changed files with 14 additions and 17 deletions
|
@ -28,7 +28,7 @@ namespace Sherlock {
|
||||||
|
|
||||||
static const int NO_FRAMES = FRAMES_END;
|
static const int NO_FRAMES = FRAMES_END;
|
||||||
|
|
||||||
Animation::Animation(SherlockEngine *vm): _vm(vm) {
|
Animation::Animation(SherlockEngine *vm) : _vm(vm) {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -44,7 +44,6 @@ private:
|
||||||
Common::Array<Common::Array<int> > _titleFrames;
|
Common::Array<Common::Array<int> > _titleFrames;
|
||||||
|
|
||||||
const int *checkForSoundFrames(const Common::String &filename);
|
const int *checkForSoundFrames(const Common::String &filename);
|
||||||
public:
|
|
||||||
public:
|
public:
|
||||||
Animation(SherlockEngine *vm);
|
Animation(SherlockEngine *vm);
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ static const ADExtraGuiOptionsMap optionsList[] = {
|
||||||
GAMEOPTION_ORIGINAL_SAVES,
|
GAMEOPTION_ORIGINAL_SAVES,
|
||||||
{
|
{
|
||||||
_s("Use original savegame dialog"),
|
_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",
|
"originalsaveload",
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ SaveStateDescriptor SherlockMetaEngine::querySaveMetaInfos(const char *target, i
|
||||||
|
|
||||||
|
|
||||||
#if PLUGIN_ENABLED_DYNAMIC(SHERLOCK)
|
#if PLUGIN_ENABLED_DYNAMIC(SHERLOCK)
|
||||||
REGISTER_PLUGIN_DYNAMIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
|
REGISTER_PLUGIN_DYNAMIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
|
||||||
#else
|
#else
|
||||||
REGISTER_PLUGIN_STATIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
|
REGISTER_PLUGIN_STATIC(SHERLOCK, PLUGIN_TYPE_ENGINE, SherlockMetaEngine);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -128,7 +128,7 @@ void Inventory::loadGraphics() {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Searches through the list of names that correspond to the inventory items
|
* 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) {
|
int Inventory::findInv(const Common::String &name) {
|
||||||
for (int idx = 0; idx < (int)_names.size(); ++idx) {
|
for (int idx = 0; idx < (int)_names.size(); ++idx) {
|
||||||
|
@ -150,7 +150,7 @@ void Inventory::putInv(int slamIt) {
|
||||||
UserInterface &ui = *_vm->_ui;
|
UserInterface &ui = *_vm->_ui;
|
||||||
|
|
||||||
// If an inventory item has disappeared (due to using it or giving it),
|
// 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)) {
|
if (_invIndex > 0 && _invIndex > (_holdings - 6)) {
|
||||||
--_invIndex;
|
--_invIndex;
|
||||||
freeGraphics();
|
freeGraphics();
|
||||||
|
|
|
@ -248,7 +248,7 @@ void Journal::loadJournalFile(bool alreadyLoaded) {
|
||||||
|
|
||||||
// Is it a control character?
|
// Is it a control character?
|
||||||
if (c < 128) {
|
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;
|
ctrlSpace = true;
|
||||||
assert(c >= ' ');
|
assert(c >= ' ');
|
||||||
|
|
||||||
|
@ -898,7 +898,6 @@ bool Journal::handleEvents(int key) {
|
||||||
}
|
}
|
||||||
screen.buttonPrint(Common::Point(JOURNAL_POINTS[7][2], JOURNAL_BUTTONS_Y + 11), color, true, "Last Page");
|
screen.buttonPrint(Common::Point(JOURNAL_POINTS[7][2], JOURNAL_BUTTONS_Y + 11), color, true, "Last Page");
|
||||||
|
|
||||||
|
|
||||||
// Print Text button
|
// Print Text button
|
||||||
if (pt.x > JOURNAL_POINTS[8][0] && pt.x < JOURNAL_POINTS[8][1] && pt.y >= (JOURNAL_BUTTONS_Y + 11) &&
|
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()) {
|
pt.y < (JOURNAL_BUTTONS_Y + 20) && !_journal.empty()) {
|
||||||
|
@ -922,14 +921,14 @@ bool Journal::handleEvents(int key) {
|
||||||
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
|
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
|
// Scroll up
|
||||||
drawJournal(1, LINES_PER_PAGE);
|
drawJournal(1, LINES_PER_PAGE);
|
||||||
doArrows();
|
doArrows();
|
||||||
screen.slamArea(0, 0, SHERLOCK_SCREEN_WIDTH, SHERLOCK_SCREEN_HEIGHT);
|
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
|
// Scroll down
|
||||||
drawJournal(2, LINES_PER_PAGE);
|
drawJournal(2, LINES_PER_PAGE);
|
||||||
doArrows();
|
doArrows();
|
||||||
|
@ -951,7 +950,6 @@ bool Journal::handleEvents(int key) {
|
||||||
screen.buttonPrint(Common::Point(JOURNAL_POINTS[5][2], JOURNAL_BUTTONS_Y + 11), COMMAND_FOREGROUND, true, "Search");
|
screen.buttonPrint(Common::Point(JOURNAL_POINTS[5][2], JOURNAL_BUTTONS_Y + 11), COMMAND_FOREGROUND, true, "Search");
|
||||||
bool notFound = false;
|
bool notFound = false;
|
||||||
|
|
||||||
|
|
||||||
do {
|
do {
|
||||||
int dir;
|
int dir;
|
||||||
if ((dir = getFindName(notFound)) != 0) {
|
if ((dir = getFindName(notFound)) != 0) {
|
||||||
|
|
|
@ -119,7 +119,7 @@ const char PORTRAITS[MAX_PEOPLE][5] = {
|
||||||
{ "INSP" } // Inspector Lestrade (Scotland Yard)
|
{ "INSP" } // Inspector Lestrade (Scotland Yard)
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *const NAMES[MAX_PEOPLE] = {
|
const char *const NAMES[MAX_PEOPLE] = {
|
||||||
"Sherlock Holmes",
|
"Sherlock Holmes",
|
||||||
"Dr. Watson",
|
"Dr. Watson",
|
||||||
"Inspector Lestrade",
|
"Inspector Lestrade",
|
||||||
|
@ -221,7 +221,7 @@ People::~People() {
|
||||||
* Reset the player data
|
* Reset the player data
|
||||||
*/
|
*/
|
||||||
void People::reset() {
|
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
|
// Watson is, instead, handled by a different sprite in each scene, with a very simple initial movement, if any
|
||||||
Sprite &p = _data[PLAYER];
|
Sprite &p = _data[PLAYER];
|
||||||
|
|
||||||
|
|
|
@ -53,12 +53,12 @@ enum {
|
||||||
MAP_DOWN = 5, MAP_DOWNLEFT = 6, MAP_LEFT = 2, MAP_UPLEFT = 8
|
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];
|
extern const char PORTRAITS[MAX_PEOPLE][5];
|
||||||
|
|
||||||
class SherlockEngine;
|
class SherlockEngine;
|
||||||
|
|
||||||
class Person: public Sprite {
|
class Person : public Sprite {
|
||||||
public:
|
public:
|
||||||
Person() : Sprite() {}
|
Person() : Sprite() {}
|
||||||
|
|
||||||
|
|
|
@ -964,7 +964,7 @@ int Scene::startCAnim(int cAnimNum, int playRate) {
|
||||||
if (talk._talkToAbort)
|
if (talk._talkToAbort)
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
// Add new anim shape entry for displaying the animationo
|
// Add new anim shape entry for displaying the animation
|
||||||
_canimShapes.push_back(Object());
|
_canimShapes.push_back(Object());
|
||||||
Object &cObj = _canimShapes[_canimShapes.size() - 1];
|
Object &cObj = _canimShapes[_canimShapes.size() - 1];
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue