diff options
author | Einar Johan Trøan Sømåen | 2012-12-09 12:49:23 +0100 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-12-09 12:49:23 +0100 |
commit | 2ede3f58a0c0522665daa8cff745da0a9b62c0b6 (patch) | |
tree | 637e2249c5586ed451b47ac9b132e71328502b5e /engines/wintermute/ad/ad_game.cpp | |
parent | 7ff74312a0c0c698a1c7044f82bb02c8db7794d3 (diff) | |
download | scummvm-rg350-2ede3f58a0c0522665daa8cff745da0a9b62c0b6.tar.gz scummvm-rg350-2ede3f58a0c0522665daa8cff745da0a9b62c0b6.tar.bz2 scummvm-rg350-2ede3f58a0c0522665daa8cff745da0a9b62c0b6.zip |
WINTERMUTE: Privatize members of AdResponseBox
Diffstat (limited to 'engines/wintermute/ad/ad_game.cpp')
-rw-r--r-- | engines/wintermute/ad/ad_game.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp index 4481b774c1..904aad9fdb 100644 --- a/engines/wintermute/ad/ad_game.cpp +++ b/engines/wintermute/ad/ad_game.cpp @@ -542,7 +542,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, res->_responseType = RESPONSE_ONCE_GAME; } - _responseBox->_responses.add(res); + _responseBox->addResponse(res); } } else { script->runtimeError("Game.AddResponse: response box is not defined"); @@ -584,15 +584,15 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, if (_responseBox) { _responseBox->weedResponses(); - if (_responseBox->_responses.size() == 0) { + if (_responseBox->getNumResponses() == 0) { stack->pushNULL(); return STATUS_OK; } - if (_responseBox->_responses.size() == 1 && autoSelectLast) { - stack->pushInt(_responseBox->_responses[0]->_iD); - _responseBox->handleResponse(_responseBox->_responses[0]); + if (_responseBox->getNumResponses() == 1 && autoSelectLast) { + stack->pushInt(_responseBox->getIdForResponseNum(0)); + _responseBox->handleResponseNum(0); _responseBox->clearResponses(); return STATUS_OK; } @@ -617,7 +617,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, stack->correctParams(0); if (_responseBox) { _responseBox->weedResponses(); - stack->pushInt(_responseBox->_responses.size()); + stack->pushInt(_responseBox->getNumResponses()); } else { script->runtimeError("Game.GetNumResponses: response box is not defined"); stack->pushNULL(); @@ -754,8 +754,8 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack, ////////////////////////////////////////////////////////////////////////// else if (strcmp(name, "GetResponsesWindow") == 0 || strcmp(name, "GetResponseWindow") == 0) { stack->correctParams(0); - if (_responseBox && _responseBox->_window) { - stack->pushNative(_responseBox->_window, true); + if (_responseBox && _responseBox->getResponseWindow()) { + stack->pushNative(_responseBox->getResponseWindow(), true); } else { stack->pushNULL(); } @@ -983,10 +983,10 @@ ScValue *AdGame::scGetProperty(const Common::String &name) { // LastResponse (RO) ////////////////////////////////////////////////////////////////////////// else if (name == "LastResponse") { - if (!_responseBox || !_responseBox->_lastResponseText) { + if (!_responseBox || !_responseBox->getLastResponseText()) { _scValue->setString(""); } else { - _scValue->setString(_responseBox->_lastResponseText); + _scValue->setString(_responseBox->getLastResponseText()); } return _scValue; } @@ -995,10 +995,10 @@ ScValue *AdGame::scGetProperty(const Common::String &name) { // LastResponseOrig (RO) ////////////////////////////////////////////////////////////////////////// else if (name == "LastResponseOrig") { - if (!_responseBox || !_responseBox->_lastResponseTextOrig) { + if (!_responseBox || !_responseBox->getLastResponseTextOrig()) { _scValue->setString(""); } else { - _scValue->setString(_responseBox->_lastResponseTextOrig); + _scValue->setString(_responseBox->getLastResponseTextOrig()); } return _scValue; } |