[Scummvm-cvs-logs] scummvm master -> dc8dc450fb7844ec3be2a45e6061981ea526fd4a

Strangerke Strangerke at scummvm.org
Fri Nov 22 21:58:49 CET 2013


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
11c15bea00 AVALANCHE: Janitorial - Remove extra blank lines
95ee8cb9f5 AVALANCHE: Janitorial - Fix Alignment in Nim
dc8dc450fb AVALANCHE: Janitorial - Align some comments in Parser


Commit: 11c15bea004cac31ade82679c31958c63f22a5ce
    https://github.com/scummvm/scummvm/commit/11c15bea004cac31ade82679c31958c63f22a5ce
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-11-22T12:40:16-08:00

Commit Message:
AVALANCHE: Janitorial - Remove extra blank lines

Changed paths:
    engines/avalanche/avalot.cpp
    engines/avalanche/console.cpp
    engines/avalanche/dialogs.cpp
    engines/avalanche/enums.h
    engines/avalanche/graphics.cpp
    engines/avalanche/parser.cpp
    engines/avalanche/parser.h



diff --git a/engines/avalanche/avalot.cpp b/engines/avalanche/avalot.cpp
index 568f950..27c0244 100644
--- a/engines/avalanche/avalot.cpp
+++ b/engines/avalanche/avalot.cpp
@@ -199,7 +199,6 @@ void Clock::chime() {
 	}
 }
 
-
 void AvalancheEngine::handleKeyDown(Common::Event &event) {
 	_sound->click();
 
@@ -576,7 +575,6 @@ void AvalancheEngine::exitRoom(byte x) {
 		_lastRoomNotMap = _room;
 }
 
-
 /**
  * Only when entering a NEW town! Not returning to the last one,
  * but choosing another from the map.
@@ -1341,7 +1339,6 @@ void AvalancheEngine::drawDirection() { // It's data is loaded in load_digits().
 	CursorMan.showMouse(true);
 }
 
-
 void AvalancheEngine::gameOver() {
 	_userMovesAvvy = false;
 
diff --git a/engines/avalanche/console.cpp b/engines/avalanche/console.cpp
index 656cc19..e4b5211 100644
--- a/engines/avalanche/console.cpp
+++ b/engines/avalanche/console.cpp
@@ -50,5 +50,4 @@ bool AvalancheConsole::Cmd_MagicLines(int argc, const char **argv) {
 	return false;
 }
 
-
 } // End of namespace Avalanche
diff --git a/engines/avalanche/dialogs.cpp b/engines/avalanche/dialogs.cpp
index e5d2bf6..24faa47 100644
--- a/engines/avalanche/dialogs.cpp
+++ b/engines/avalanche/dialogs.cpp
@@ -190,7 +190,6 @@ void Dialogs::scrollModeNormal() {
 				break;
 		} while (!((mrelease > 0) || (buttona1()) || (buttonb1())));
 
-
 		if (mrelease == 0) {
 			inkey();
 			if (aboutscroll) {
diff --git a/engines/avalanche/enums.h b/engines/avalanche/enums.h
index dbb3d70..2b5db67 100644
--- a/engines/avalanche/enums.h
+++ b/engines/avalanche/enums.h
@@ -127,7 +127,6 @@ static const int16 kScreenHeight = 200;
 static const int16 kWalk = 3;
 static const int16 kRun = 5;
 
-
 } // End of namespace Avalanche
 
 #endif // AVALANCHE_ENUMS_H
diff --git a/engines/avalanche/graphics.cpp b/engines/avalanche/graphics.cpp
index e5a3d11..8415128 100644
--- a/engines/avalanche/graphics.cpp
+++ b/engines/avalanche/graphics.cpp
@@ -36,15 +36,15 @@ namespace Avalanche {
 const byte GraphicManager::kEgaPaletteIndex[16] = {0, 1, 2, 3, 4, 5, 20, 7, 56, 57, 58, 59, 60, 61, 62, 63};
 
 const MouseHotspotType GraphicManager::kMouseHotSpots[9] = {
-	{8,0}, // 0 - up-arrow
-	{0,0}, // 1 - screwdriver
+	{8,0},  // 0 - up-arrow
+	{0,0},  // 1 - screwdriver
 	{15,6}, // 2 - right-arrow
-	{0,0}, // 3 - fletch
-	{8,7}, // 4 - hourglass
-	{4,0}, // 5 - TTHand
-	{8,5}, // 6 - Mark's crosshairs
-	{8,7}, // 7 - I-beam
-	{0,0} // 8 - question mark
+	{0,0},  // 3 - fletch
+	{8,7},  // 4 - hourglass
+	{4,0},  // 5 - TTHand
+	{8,5},  // 6 - Mark's crosshairs
+	{8,7},  // 7 - I-beam
+	{0,0}   // 8 - question mark
 };
 
 GraphicManager::GraphicManager(AvalancheEngine *vm) {
@@ -127,7 +127,6 @@ void GraphicManager::loadMouse(byte which) {
 	cursor.create(16, 32, Graphics::PixelFormat::createFormatCLUT8());
 	cursor.fillRect(Common::Rect(0, 0, 16, 32), 255);
 
-
 	// The AND mask.
 	f.seek(kMouseSize * 2 * which + 134);
 
diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index cca79ff..852a063 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -749,8 +749,6 @@ void Parser::storeInterrogation(byte interrogation) {
 		_vm->_timer->cardiffSurvey();
 }
 
-
-
 void Parser::parse() {
 	// First parsing - word identification
 	if (!_thats.empty())
@@ -763,7 +761,6 @@ void Parser::parse() {
 	_person = kPeoplePardon;
 	clearWords();
 
-
 	// A cheat mode attempt.
 	if (_inputText[0] == '.') {
 		cheatParse(_inputText);
@@ -1669,7 +1666,6 @@ void Parser::doThat() {
 		// "Slip" object
 		_thing -= 49;
 
-
 	if ((_verb != kVerbCodeLoad) && (_verb != kVerbCodeSave) && (_verb != kVerbCodeQuit) && (_verb != kVerbCodeInfo) && (_verb != kVerbCodeHelp)
 	&& (_verb != kVerbCodeLarrypass) && (_verb != kVerbCodePhaon) && (_verb != kVerbCodeBoss) && (_verb != kVerbCodeCheat) && (_verb != kVerbCodeRestart)
 	&& (_verb != kVerbCodeDir) && (_verb != kVerbCodeScore) && (_verb != kVerbCodeHiscores) && (_verb != kVerbCodeSmartAlec)) {
diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h
index bdb5ab9..dfbe2dc 100644
--- a/engines/avalanche/parser.h
+++ b/engines/avalanche/parser.h
@@ -34,7 +34,6 @@
 #include "common/str.h"
 #include "common/serializer.h"
 
-
 namespace Avalanche {
 class AvalancheEngine;
 


Commit: 95ee8cb9f51a2632e67ebcf3be5b663837badb97
    https://github.com/scummvm/scummvm/commit/95ee8cb9f51a2632e67ebcf3be5b663837badb97
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-11-22T12:56:13-08:00

Commit Message:
AVALANCHE: Janitorial - Fix Alignment in Nim

Changed paths:
    engines/avalanche/nim.h



diff --git a/engines/avalanche/nim.h b/engines/avalanche/nim.h
index 087f1e8..fba34f5 100644
--- a/engines/avalanche/nim.h
+++ b/engines/avalanche/nim.h
@@ -48,21 +48,21 @@ private:
 	bool clicked;
 	byte row;
 	byte number;
-   	bool squeak;
+	bool squeak;
 	int8 mNum, mRow;
 
 	void chalk(int x,int y, Common::String z);
 	void setup();
-   	void plotStone(byte x,byte y);
+	void plotStone(byte x,byte y);
 	void board();
 	void startMove();
- 	void showChanges();
-   	void blip();
+	void showChanges();
+	void blip();
 	void checkMouse();
-  	void less();
+	void less();
 	void takeSome();
-   	void endOfGame();
-   	void dogFood();
+	void endOfGame();
+	void dogFood();
 	bool find(byte x);
 	void findAp(byte start,byte stepsize);
 };


Commit: dc8dc450fb7844ec3be2a45e6061981ea526fd4a
    https://github.com/scummvm/scummvm/commit/dc8dc450fb7844ec3be2a45e6061981ea526fd4a
Author: Strangerke (strangerke at scummvm.org)
Date: 2013-11-22T12:57:02-08:00

Commit Message:
AVALANCHE: Janitorial - Align some comments in Parser

Changed paths:
    engines/avalanche/parser.cpp
    engines/avalanche/parser.h



diff --git a/engines/avalanche/parser.cpp b/engines/avalanche/parser.cpp
index 852a063..d5f5791 100644
--- a/engines/avalanche/parser.cpp
+++ b/engines/avalanche/parser.cpp
@@ -522,10 +522,17 @@ void Parser::cursorOff() {
 	_cursorState = false;
 }
 
+/**
+ * Asks the parsekey proc in Dropdown if it knows it.
+ */
 void Parser::tryDropdown() {
-	warning("STUB: Parser::tryDropdown()"); // TODO: Implement at the same time with Dropdown's keyboard handling.
+    // TODO: Implement at the same time with Dropdown's keyboard handling.
+	warning("STUB: Parser::tryDropdown()");
 }
 
+/**
+ * Returns the index of the first appearance of crit in src.
+ */
 int16 Parser::getPos(const Common::String &crit, const Common::String &src) {
 	if (src.contains(crit))
 		return strstr(src.c_str(),crit.c_str()) - src.c_str();
@@ -625,6 +632,9 @@ void Parser::cheatParse(Common::String codes) {
 	warning("STUB: Parser::cheatParse()");
 }
 
+/**
+ * Strips punctuation from word.
+ */
 void Parser::stripPunctuation(Common::String &word) {
 	const char punct[] = "~`!@#$%^&*()_+-={}[]:\"|;'\\,./<>?";
 
@@ -945,6 +955,9 @@ void Parser::parse() {
 	}
 }
 
+/**
+ * Examine a standard object-thing
+ */
 void Parser::examineObject() {
 	if (_thing != _vm->_thinks)
 		_vm->thinkAbout(_thing, AvalancheEngine::kThing);
@@ -1175,6 +1188,9 @@ void Parser::swallow() {
 	}
 }
 
+/**
+ * this lists the other people in the room.
+ */
 void Parser::peopleInRoom() {
 	// First compute the number of people in the room.
 	byte numPeople = 0;
@@ -1212,6 +1228,9 @@ void Parser::peopleInRoom() {
 	_vm->_dialogs->displayText(tmpStr + " here.");
 }
 
+/**
+ * This is called when you say "look".
+ */
 void Parser::lookAround() {
 	_vm->_dialogs->displayText(*_vm->_also[0][1]);
 	switch (_vm->_room) {
@@ -1316,6 +1335,9 @@ void Parser::openDoor() {
 		_vm->_dialogs->displayText("Door? What door?");
 }
 
+/**
+ * Called when you call kVerbCodeput.
+ */
 void Parser::putProc() {
 	if (!isHolding())
 		return;
@@ -1422,6 +1444,7 @@ void Parser::goToCauldron() {
 
 /**
  * Check is it's possible to give something to Spludwick
+ * The result of this function is whether or not he says "Hey, thanks!".
  * @remarks	Originally called 'give2spludwick'
  */
 bool Parser::giveToSpludwick() {
@@ -1501,6 +1524,9 @@ void Parser::already() {
 	_vm->_dialogs->displayText("You're already standing!");
 }
 
+/**
+ * Called when you ask Avvy to stand.
+ */
 void Parser::standUp() {
 	switch (_vm->_room) {
 	case kRoomYours:
diff --git a/engines/avalanche/parser.h b/engines/avalanche/parser.h
index dfbe2dc..fe46170 100644
--- a/engines/avalanche/parser.h
+++ b/engines/avalanche/parser.h
@@ -39,11 +39,11 @@ class AvalancheEngine;
 
 class Parser {
 public:
-	static const byte kPardon = 254; // Didn't understand / wasn't given.
 	static const int16 kParserWordsNum = 277; // How many words does the parser know?
+	static const int16 kFirstPassword = 88;   // words[kFirstPassword] should equal "TIROS".
+	static const byte kPardon = 254;          // Didn't understand / wasn't given.
 	static const byte kNothing = 250;
-	static const byte kMoved = 0; // This word was moved. (Usually because it was the subject of conversation.)
-	static const int16 kFirstPassword = 88; // words[kFirstPassword] should equal "TIROS".
+	static const byte kMoved = 0;             // This word was moved. (Usually because it was the subject of conversation.)
 
 	struct VocabEntry {
 		byte _number;
@@ -62,9 +62,9 @@ public:
 	byte _thing;
 	People _person;
 	bool _polite;
-	Common::String _inputText; // Original name: current
+	Common::String _inputText;
 	Common::String _inputTextBackup;
-	byte _inputTextPos; // Original name: curpos
+	byte _inputTextPos;
 	bool _quote;
 	bool _cursorState;
 	bool _weirdWord;
@@ -86,8 +86,8 @@ public:
 	void plotText();
 	void cursorOn();
 	void cursorOff();
-	void tryDropdown(); // This asks the parsekey proc in Dropdown if it knows it.
-	int16 getPos(const Common::String &crit, const Common::String &src); // Returns the index of the first appearance of crit in src.
+	void tryDropdown();
+	int16 getPos(const Common::String &crit, const Common::String &src);
 	void doVerb(VerbCode id);
 
 	void resetVariables();
@@ -106,10 +106,10 @@ private:
 
 	Common::String _thats;
 	byte _thing2;
-	byte _sworeNum; // number of times you've sworn
+	byte _sworeNum;     // number of times you've sworn
 	byte _alcoholLevel; // Your blood alcohol level.
-	byte _playedNim; // How many times you've played Nim.
-	bool _boughtOnion; // Have you bought an onion yet?
+	byte _playedNim;    // How many times you've played Nim.
+	bool _boughtOnion;  // Have you bought an onion yet?
 
 	byte wordNum(Common::String word);
 	void replace(Common::String oldChars, byte newChar);
@@ -119,14 +119,14 @@ private:
 
 	void clearWords();
 	void cheatParse(Common::String codes);
-	void stripPunctuation(Common::String &word); // Strips punctuation from word.
-	void displayWhat(byte target, bool animate, bool &ambiguous); // << It's an adjective!
+	void stripPunctuation(Common::String &word);
+	void displayWhat(byte target, bool animate, bool &ambiguous);
 	bool doPronouns();
 	void properNouns();
-	void lookAround(); // This is called when you say "look".
+	void lookAround();
 	void openDoor();
 	void storeInterrogation(byte interrogation);
-	void examineObject(); // Examine a standard object-thing
+	void examineObject();
 	bool isPersonHere();
 	void exampers();
 	bool isHolding();
@@ -134,14 +134,14 @@ private:
 	void examine();
 	void inventory();
 	void swallow();
-	void peopleInRoom(); // This lists the other people in the room.
-	void putProc();  // Called when you call kVerbCodeput.
+	void peopleInRoom();
+	void putProc();
 	void notInOrder();
 	void goToCauldron();
-	bool giveToSpludwick(); // The result of this fn is whether or not he says "Hey, thanks!".
+	bool giveToSpludwick();
 	void cardiffClimbing();
 	void already();
-	void standUp(); // Called when you ask Avvy to stand.
+	void standUp();
 	void getProc(char thing);
 	void giveGeidaTheLute();
 	void playHarp();






More information about the Scummvm-git-logs mailing list