aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/ad
diff options
context:
space:
mode:
authorEinar Johan Trøan Sømåen2013-04-17 19:34:09 +0200
committerEinar Johan Trøan Sømåen2013-04-17 19:42:05 +0200
commitcbae39ab8773908fd5945c4f93468148fb5d76ea (patch)
tree941cb71eaa41412ca2034729dbaa44ab1ced4c2e /engines/wintermute/ad
parent75443da53f053365e18f2e66f7a10ce0d3c66707 (diff)
downloadscummvm-rg350-cbae39ab8773908fd5945c4f93468148fb5d76ea.tar.gz
scummvm-rg350-cbae39ab8773908fd5945c4f93468148fb5d76ea.tar.bz2
scummvm-rg350-cbae39ab8773908fd5945c4f93468148fb5d76ea.zip
WINTERMUTE: Move settings from BaseGame to separate struct.
Diffstat (limited to 'engines/wintermute/ad')
-rw-r--r--engines/wintermute/ad/ad_game.cpp3
-rw-r--r--engines/wintermute/ad/ad_node_state.cpp3
-rw-r--r--engines/wintermute/ad/ad_object.cpp5
3 files changed, 4 insertions, 7 deletions
diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index b9775ba7d1..3730b23fc2 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -43,7 +43,6 @@
#include "engines/wintermute/base/base_object.h"
#include "engines/wintermute/base/base_parser.h"
#include "engines/wintermute/base/sound/base_sound.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/base_transition_manager.h"
#include "engines/wintermute/base/base_sprite.h"
@@ -522,7 +521,7 @@ bool AdGame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
if (res) {
res->_iD = id;
res->setText(text);
- _stringTable->expand(&res->_text);
+ expandStringByStringTable(&res->_text);
if (!val1->isNULL()) {
res->setIcon(val1->getString());
}
diff --git a/engines/wintermute/ad/ad_node_state.cpp b/engines/wintermute/ad/ad_node_state.cpp
index 34e220569f..c741dec54f 100644
--- a/engines/wintermute/ad/ad_node_state.cpp
+++ b/engines/wintermute/ad/ad_node_state.cpp
@@ -29,7 +29,6 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/ad/ad_node_state.h"
#include "engines/wintermute/ad/ad_entity.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_sprite.h"
#include "engines/wintermute/utils/utils.h"
#include "engines/wintermute/platform_osystem.h"
@@ -122,7 +121,7 @@ void AdNodeState::setCaption(const char *caption, int caseVal) {
_caption[caseVal - 1] = new char[strlen(caption) + 1];
if (_caption[caseVal - 1]) {
strcpy(_caption[caseVal - 1], caption);
- _gameRef->_stringTable->expand(&_caption[caseVal - 1]);
+ _gameRef->expandStringByStringTable(&_caption[caseVal - 1]);
}
}
diff --git a/engines/wintermute/ad/ad_object.cpp b/engines/wintermute/ad/ad_object.cpp
index a41ed9fbc3..f2cf90a075 100644
--- a/engines/wintermute/ad/ad_object.cpp
+++ b/engines/wintermute/ad/ad_object.cpp
@@ -38,7 +38,6 @@
#include "engines/wintermute/base/base_game.h"
#include "engines/wintermute/base/base_frame.h"
#include "engines/wintermute/base/base_sprite.h"
-#include "engines/wintermute/base/base_string_table.h"
#include "engines/wintermute/base/base_sub_frame.h"
#include "engines/wintermute/base/base_surface_storage.h"
#include "engines/wintermute/base/font/base_font.h"
@@ -901,7 +900,7 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
_sentence->_sound = nullptr;
_sentence->setText(text);
- _gameRef->_stringTable->expand(&_sentence->_text);
+ _gameRef->expandStringByStringTable(&_sentence->_text);
_sentence->setStances(stances);
_sentence->_duration = duration;
_sentence->_align = Align;
@@ -913,7 +912,7 @@ void AdObject::talk(const char *text, const char *sound, uint32 duration, const
// try to locate speech file automatically
bool deleteSound = false;
if (!sound) {
- char *key = _gameRef->_stringTable->getKey(text);
+ char *key = _gameRef->getKeyFromStringTable(text);
if (key) {
sound = ((AdGame *)_gameRef)->findSpeechFile(key);
delete[] key;