diff options
-rw-r--r-- | engines/wintermute/video/subtitle_card.cpp | 7 | ||||
-rw-r--r-- | engines/wintermute/video/subtitle_card.h | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/engines/wintermute/video/subtitle_card.cpp b/engines/wintermute/video/subtitle_card.cpp index 971b2c019c..c0ad8cc1d7 100644 --- a/engines/wintermute/video/subtitle_card.cpp +++ b/engines/wintermute/video/subtitle_card.cpp @@ -28,16 +28,19 @@ #include "engines/wintermute/video/subtitle_card.h" #include "engines/wintermute/base/base_game.h" + namespace Wintermute { -SubtitleCard::SubtitleCard(BaseGame *inGame): BaseClass(inGame) { +SubtitleCard::SubtitleCard(BaseGame *inGame) { + _gameRef = inGame; _startFrame = _endFrame = 0; } -SubtitleCard::SubtitleCard(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame): BaseClass(inGame) { +SubtitleCard::SubtitleCard(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame) { // TODO: Fix expandStringByStringTable instead of this ugly hack char *tmp = new char[text.size()]; strcpy(tmp, text.c_str()); + _gameRef = inGame; _gameRef->expandStringByStringTable(&tmp); _text = Common::String(tmp); _startFrame = startFrame; diff --git a/engines/wintermute/video/subtitle_card.h b/engines/wintermute/video/subtitle_card.h index 5390d64fcb..94543d93fa 100644 --- a/engines/wintermute/video/subtitle_card.h +++ b/engines/wintermute/video/subtitle_card.h @@ -29,11 +29,13 @@ #ifndef WINTERMUTE_SUBTITLECARD_H #define WINTERMUTE_SUBTITLECARD_H -#include "engines/wintermute/base/base.h" +#include "common/str.h" namespace Wintermute { -class SubtitleCard : public BaseClass { +class BaseGame; + +class SubtitleCard { public: SubtitleCard(BaseGame *inGame); SubtitleCard(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame); @@ -41,6 +43,7 @@ public: uint32 getStartFrame(); Common::String getText(); private: + BaseGame* _gameRef; uint32 _endFrame; uint32 _startFrame; Common::String _text; |