aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobia Tesan2014-02-22 12:10:51 +0100
committerTobia Tesan2014-10-15 21:36:46 +0200
commitf525514da576be7f5c645c38ff121b764378349e (patch)
treeb1b3356cf99a5271c262d3ef657f29bc4f229d16
parent578edde66fc87eb1d4f630cbd1a9e402172440fa (diff)
downloadscummvm-rg350-f525514da576be7f5c645c38ff121b764378349e.tar.gz
scummvm-rg350-f525514da576be7f5c645c38ff121b764378349e.tar.bz2
scummvm-rg350-f525514da576be7f5c645c38ff121b764378349e.zip
WINTERMUTE: Use BaseGame->expandStringByStringTable(&Common::String) in SubtitleCard
-rw-r--r--engines/wintermute/video/subtitle_card.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/engines/wintermute/video/subtitle_card.cpp b/engines/wintermute/video/subtitle_card.cpp
index fb2ac06a84..28fb6544f2 100644
--- a/engines/wintermute/video/subtitle_card.cpp
+++ b/engines/wintermute/video/subtitle_card.cpp
@@ -31,17 +31,14 @@
namespace Wintermute {
-SubtitleCard::SubtitleCard(BaseGame *inGame,
- const Common::String &text,
- const uint &startFrame,
- const uint &endFrame) : _gameRef(inGame),
- _startFrame(startFrame),
+SubtitleCard::SubtitleCard(BaseGame *inGame,
+ const Common::String &text,
+ const uint &startFrame,
+ const uint &endFrame) : _gameRef(inGame),
+ _startFrame(startFrame),
_endFrame(endFrame) {
- // TODO: Fix expandStringByStringTable instead of this ugly hack
- char *tmp = new char[text.size()];
- strcpy(tmp, text.c_str());
- _gameRef->expandStringByStringTable(&tmp);
- _text = Common::String(tmp);
+ _text = text;
+ _gameRef->expandStringByStringTable(_text);
}
uint32 SubtitleCard::getStartFrame() const {