aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/parser_v1d.cpp
diff options
context:
space:
mode:
authorArnaud Boutonné2011-02-12 08:13:35 +0000
committerArnaud Boutonné2011-02-12 08:13:35 +0000
commit69d907151bf466f67d4e4546a5690befc65ebac4 (patch)
tree8939f72f9fa276280d4dd492776a210c20142cb8 /engines/hugo/parser_v1d.cpp
parent191d21678588d22d5c09e97d20f7a87225622c07 (diff)
downloadscummvm-rg350-69d907151bf466f67d4e4546a5690befc65ebac4.tar.gz
scummvm-rg350-69d907151bf466f67d4e4546a5690befc65ebac4.tar.bz2
scummvm-rg350-69d907151bf466f67d4e4546a5690befc65ebac4.zip
HUGO: Cleanup based on Fingolfin comments
svn-id: r55887
Diffstat (limited to 'engines/hugo/parser_v1d.cpp')
-rw-r--r--engines/hugo/parser_v1d.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/engines/hugo/parser_v1d.cpp b/engines/hugo/parser_v1d.cpp
index 8819100ee6..1565490ce3 100644
--- a/engines/hugo/parser_v1d.cpp
+++ b/engines/hugo/parser_v1d.cpp
@@ -55,7 +55,7 @@ Parser_v1d::~Parser_v1d() {
* Locate word in list of nouns and return ptr to string in noun list
* If n is NULL, start at beginning of list, else with n
*/
-char *Parser_v1d::findNextNoun(char *noun) const {
+const char *Parser_v1d::findNextNoun(const char *noun) const {
debugC(1, kDebugParser, "findNextNoun(%s)", noun);
int currNounIndex = -1;
@@ -80,7 +80,7 @@ char *Parser_v1d::findNextNoun(char *noun) const {
* If object not near, return suitable string; may be similar object closer
* If radius is -1, treat radius as infinity
*/
-bool Parser_v1d::isNear_v1(char *verb, char *noun, object_t *obj, char *comment) const {
+bool Parser_v1d::isNear_v1(const char *verb, const char *noun, object_t *obj, char *comment) const {
debugC(1, kDebugParser, "isNear(%s, %s, obj, %s)", verb, noun, comment);
if (!noun && !obj->verbOnlyFl) { // No noun specified & object not context senesitive
@@ -142,7 +142,7 @@ bool Parser_v1d::isNear_v1(char *verb, char *noun, object_t *obj, char *comment)
* say_ok needed for special case of take/drop which may be handled not only
* here but also in a cmd_list with a donestr string simultaneously
*/
-bool Parser_v1d::isGenericVerb_v1(char *word, object_t *obj) {
+bool Parser_v1d::isGenericVerb_v1(const char *word, object_t *obj) {
debugC(1, kDebugParser, "isGenericVerb(%s, object_t *obj)", word);
if (!obj->genericCmd)
@@ -183,7 +183,7 @@ bool Parser_v1d::isGenericVerb_v1(char *word, object_t *obj) {
* and if it passes, perform the actions in the action list. If the verb
* is catered for, return TRUE
*/
-bool Parser_v1d::isObjectVerb_v1(char *word, object_t *obj) {
+bool Parser_v1d::isObjectVerb_v1(const char *word, object_t *obj) {
debugC(1, kDebugParser, "isObjectVerb(%s, object_t *obj)", word);
// First, find matching verb in cmd list
@@ -233,7 +233,7 @@ bool Parser_v1d::isObjectVerb_v1(char *word, object_t *obj) {
* Print text for possible background object. Return TRUE if match found
* Only match if both verb and noun found. Test_ca will match verb-only
*/
-bool Parser_v1d::isBackgroundWord_v1(char *noun, char *verb, objectList_t obj) const {
+bool Parser_v1d::isBackgroundWord_v1(const char *noun, const char *verb, objectList_t obj) const {
debugC(1, kDebugParser, "isBackgroundWord(%s, %s, object_list_t obj)", noun, verb);
if (!noun)
@@ -283,7 +283,7 @@ void Parser_v1d::dropObject(object_t *obj) {
* Print text for possible background object. Return TRUE if match found
* If test_noun TRUE, must have a noun given
*/
-bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, char *noun, char *verb, objectList_t obj) const {
+bool Parser_v1d::isCatchallVerb_v1(bool testNounFl, const char *noun, const char *verb, objectList_t obj) const {
debugC(1, kDebugParser, "isCatchallVerb(%d, %s, %s, object_list_t obj)", (testNounFl) ? 1 : 0, noun, verb);
if (_maze.enabledFl)
@@ -397,8 +397,8 @@ void Parser_v1d::lineHandler() {
}
// Find the first verb in the line
- char *verb = findVerb();
- char *noun = 0; // Noun not found yet
+ const char *verb = findVerb();
+ const char *noun = 0; // Noun not found yet
char farComment[kCompLineSize * 5] = ""; // hold 5 line comment if object not nearby
if (verb) { // OK, verb found. Try to match with object