mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
TITANIC: Parser fixes
This commit is contained in:
parent
1846ef7850
commit
8abe97dfda
@ -40,7 +40,8 @@ void CTitleEngine::setup(int val1, int val2) {
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
||||
STtitleEngine::STtitleEngine(): CTitleEngine(), _responseP(nullptr) {
|
||||
STtitleEngine::STtitleEngine(): CTitleEngine(),
|
||||
_responseP(nullptr), _stream(nullptr) {
|
||||
}
|
||||
|
||||
STtitleEngine::~STtitleEngine() {
|
||||
|
@ -29,11 +29,14 @@ namespace Titanic {
|
||||
TTconceptNode::TTconceptNode() : _concept0P(_concepts[0]), _concept1P(_concepts[1]),
|
||||
_concept2P(_concepts[2]), _concept3P(_concepts[3]), _concept4P(_concepts[4]),
|
||||
_concept5P(_concepts[5]), _field18(0), _field1C(0), _nextP(nullptr), _status(0) {
|
||||
Common::fill(&_concepts[0], &_concepts[6], (TTconcept *)nullptr);
|
||||
}
|
||||
|
||||
TTconceptNode::TTconceptNode(const TTconceptNode &src) : _concept0P(_concepts[0]), _concept1P(_concepts[1]),
|
||||
_concept2P(_concepts[2]), _concept3P(_concepts[3]), _concept4P(_concepts[4]),
|
||||
_concept5P(_concepts[5]), _field18(0), _field1C(0), _nextP(nullptr), _status(0) {
|
||||
Common::fill(&_concepts[0], &_concepts[6], (TTconcept *)nullptr);
|
||||
|
||||
if (src._status) {
|
||||
_status = SS_5;
|
||||
} else {
|
||||
|
@ -489,7 +489,7 @@ int TTparser::findFrames(TTsentence *sentence) {
|
||||
break;
|
||||
|
||||
TTword *srcWord = nullptr;
|
||||
TTword *word = _owner->_vocab->getWord(wordString, &word);
|
||||
TTword *word = _owner->_vocab->getWord(wordString, &srcWord);
|
||||
sentence->storeVocabHit(srcWord);
|
||||
|
||||
if (!word && ctr == 1) {
|
||||
|
@ -111,7 +111,7 @@ TTstring TTstring::tokenize(const char *delim) {
|
||||
const char *strP = _data->_string.c_str();
|
||||
const char *splitP = nullptr, *chP;
|
||||
|
||||
for (const char *d = delim; d; ++d) {
|
||||
for (const char *d = delim; *d; ++d) {
|
||||
chP = strchr(strP, *d);
|
||||
if (chP && (splitP == nullptr || chP < splitP))
|
||||
splitP = chP;
|
||||
@ -122,7 +122,9 @@ TTstring TTstring::tokenize(const char *delim) {
|
||||
_data->_string = CString(splitP + 1);
|
||||
return result;
|
||||
} else {
|
||||
return TTstring();
|
||||
TTstring result(strP);
|
||||
_data->_string = CString();
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user