diff options
author | Tobia Tesan | 2014-02-22 11:18:05 +0100 |
---|---|---|
committer | Tobia Tesan | 2014-10-15 21:36:46 +0200 |
commit | 5f25cf1bd731ed2bae852610c74a9917942ab883 (patch) | |
tree | 932cd3000270860ffe12e5895f1cb1ee205e4c32 /engines/wintermute/video | |
parent | f1ae8e6e8d89f53e8fcd6ffb7eb3faf1e5ab8993 (diff) | |
download | scummvm-rg350-5f25cf1bd731ed2bae852610c74a9917942ab883.tar.gz scummvm-rg350-5f25cf1bd731ed2bae852610c74a9917942ab883.tar.bz2 scummvm-rg350-5f25cf1bd731ed2bae852610c74a9917942ab883.zip |
WINTERMUTE: Don't bother inheriting BaseGame in SubtitleCard
Diffstat (limited to 'engines/wintermute/video')
-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; |