mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
TITANIC: Added TTconcept id methods
This commit is contained in:
parent
76c84afdfe
commit
73e2e8f429
@ -273,4 +273,12 @@ TTconcept *TTconcept::findByWordClass(WordClass wordClass) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
bool TTconcept::isWordId(int id) const {
|
||||
return this && _wordP && _wordP->_id == id;
|
||||
}
|
||||
|
||||
int TTconcept::getWordId() const {
|
||||
return this && _wordP ? _wordP->_id : 0;
|
||||
}
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
@ -135,6 +135,16 @@ public:
|
||||
* Find a word by it's class
|
||||
*/
|
||||
TTconcept *findByWordClass(WordClass wordClass);
|
||||
|
||||
/**
|
||||
* Returns true if the concept has a word with a given Id
|
||||
*/
|
||||
bool isWordId(int id) const;
|
||||
|
||||
/**
|
||||
* If a word is associated, return it's Id
|
||||
*/
|
||||
int getWordId() const;
|
||||
};
|
||||
|
||||
} // End of namespace Titanic
|
||||
|
@ -48,7 +48,9 @@ public:
|
||||
*/
|
||||
virtual TTword *copy() const;
|
||||
|
||||
virtual bool proc19(int val) const { return _field30 == val; }
|
||||
virtual bool comparePronounTo(int val) const {
|
||||
return _field30 == val;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dumps data associated with the word to file
|
||||
|
@ -124,6 +124,13 @@ public:
|
||||
*/
|
||||
bool compareTo(const char *str) const;
|
||||
|
||||
/**
|
||||
* Compares the word's text to a passed string
|
||||
*/
|
||||
bool compareTo(TTstring *str) const {
|
||||
return compareTo(str->c_str());
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the status of the word
|
||||
*/
|
||||
@ -176,7 +183,7 @@ public:
|
||||
virtual bool proc16() const { return false; }
|
||||
virtual bool proc17() const { return false; }
|
||||
virtual bool proc18() const { return false; }
|
||||
virtual bool proc19(int val) const { return false; }
|
||||
virtual bool comparePronounTo(int val) const { return false; }
|
||||
virtual int proc20() const { return 0; }
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user