Exemple #1
0
TTconcept::TTconcept() : _string1(" "), _string2(" "),
		_scriptP(nullptr), _wordP(nullptr), _status(SS_VALID) {
	if (setStatus())
		setScriptType(ST_UNKNOWN_SCRIPT);
	else
		reset();
}
Exemple #2
0
void TTconcept::reset() {
	delete _wordP;
	_wordP = nullptr;
	_scriptP = nullptr;

	int oldStatus = _status;
	setScriptType(ST_UNKNOWN_SCRIPT);
	_status = oldStatus;
}
Exemple #3
0
TTconcept::TTconcept(TTscriptBase *script, ScriptType scriptType) :
		_string1(" "), _string2(" "), _wordP(nullptr), _scriptP(nullptr) {
	if (!script->getStatus()) {
		setScriptType(scriptType);
		_scriptP = script;

		if (scriptType == ST_UNKNOWN_SCRIPT && script->_id == 1)
			_scriptType = ST_ROOM_SCRIPT;
	}

	if (_status)
		reset();
}
Exemple #4
0
TTconcept::TTconcept(TTword *word, ScriptType scriptType) :
		_string1(" "), _string2(" "), _wordP(nullptr), _scriptP(nullptr),
		_status(SS_VALID) {
	if (!word || !setStatus() || word->getStatus()) {
		_status = SS_5;
	} else {
		_status = initializeWordRef(word);
		if (!_status)
			setScriptType(scriptType);
	}

	if (_status)
		reset();
}