mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-06 09:48:39 +00:00
TITANIC: Added TTconcept deleteSiblings
This commit is contained in:
parent
bcfebf8f0f
commit
1ffb8ff92b
@ -97,6 +97,15 @@ TTconcept::~TTconcept() {
|
|||||||
g_vm->_exeResources._owner->setParserConcept(this, nullptr);
|
g_vm->_exeResources._owner->setParserConcept(this, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TTconcept::deleteSiblings() {
|
||||||
|
for (TTconcept *currP = _nextP, *nextP; currP; currP = nextP) {
|
||||||
|
nextP = currP->_nextP;
|
||||||
|
delete currP;
|
||||||
|
}
|
||||||
|
|
||||||
|
_nextP = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
bool TTconcept::setStatus() {
|
bool TTconcept::setStatus() {
|
||||||
if (_string1.isValid() && _string2.isValid()) {
|
if (_string1.isValid() && _string2.isValid()) {
|
||||||
_status = SS_VALID;
|
_status = SS_VALID;
|
||||||
|
@ -81,6 +81,11 @@ public:
|
|||||||
TTconcept(TTconcept &src);
|
TTconcept(TTconcept &src);
|
||||||
~TTconcept();
|
~TTconcept();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Destroys any attached sibling concepts to the given concept
|
||||||
|
*/
|
||||||
|
void deleteSiblings();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares the name of the associated word, if any,
|
* Compares the name of the associated word, if any,
|
||||||
* to the passed string
|
* to the passed string
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
namespace Titanic {
|
namespace Titanic {
|
||||||
|
|
||||||
TTparser::TTparser(CScriptHandler *owner) : _owner(owner), _sentenceSub(nullptr),
|
TTparser::TTparser(CScriptHandler *owner) : _owner(owner), _sentenceSub(nullptr),
|
||||||
_sentence(nullptr), _fieldC(0), _field10(0), _field14(0), _field18(0),
|
_sentence(nullptr), _fieldC(0), _field10(0), _field14(0),
|
||||||
_nodesP(nullptr), _conceptP(nullptr) {
|
_currentWordP(nullptr), _nodesP(nullptr), _conceptP(nullptr) {
|
||||||
loadArrays();
|
loadArrays();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,6 +41,13 @@ TTparser::~TTparser() {
|
|||||||
_nodesP->deleteSiblings();
|
_nodesP->deleteSiblings();
|
||||||
delete _nodesP;
|
delete _nodesP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_conceptP) {
|
||||||
|
_conceptP->deleteSiblings();
|
||||||
|
delete _conceptP;
|
||||||
|
}
|
||||||
|
|
||||||
|
delete _currentWordP;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TTparser::loadArrays() {
|
void TTparser::loadArrays() {
|
||||||
|
@ -162,7 +162,7 @@ public:
|
|||||||
int _fieldC;
|
int _fieldC;
|
||||||
int _field10;
|
int _field10;
|
||||||
int _field14;
|
int _field14;
|
||||||
int _field18;
|
TTword *_currentWordP;
|
||||||
public:
|
public:
|
||||||
TTparser(CScriptHandler *owner);
|
TTparser(CScriptHandler *owner);
|
||||||
~TTparser();
|
~TTparser();
|
||||||
|
Loading…
Reference in New Issue
Block a user