mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 12:12:16 +00:00
WINTERMUTE: Don't bother inheriting BaseGame in SubtitleCard
This commit is contained in:
parent
f1ae8e6e8d
commit
5f25cf1bd7
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user