mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-16 15:08:59 +00:00
WINTERMUTE: Const'fy members of class SubtitleCard
This commit is contained in:
parent
856e281bf1
commit
578edde66f
@ -31,27 +31,28 @@
|
||||
|
||||
namespace Wintermute {
|
||||
|
||||
|
||||
SubtitleCard::SubtitleCard(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame) {
|
||||
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 = inGame;
|
||||
_gameRef->expandStringByStringTable(&tmp);
|
||||
_text = Common::String(tmp);
|
||||
_startFrame = startFrame;
|
||||
_endFrame = endFrame;
|
||||
}
|
||||
|
||||
uint32 SubtitleCard::getStartFrame() {
|
||||
uint32 SubtitleCard::getStartFrame() const {
|
||||
return _startFrame;
|
||||
}
|
||||
|
||||
uint32 SubtitleCard::getEndFrame() {
|
||||
uint32 SubtitleCard::getEndFrame() const {
|
||||
return _endFrame;
|
||||
}
|
||||
|
||||
Common::String SubtitleCard::getText() {
|
||||
Common::String SubtitleCard::getText() const {
|
||||
return _text;
|
||||
}
|
||||
|
||||
|
@ -38,13 +38,13 @@ class BaseGame;
|
||||
class SubtitleCard {
|
||||
public:
|
||||
SubtitleCard(BaseGame *inGame, const Common::String &text, const uint &startFrame, const uint &endFrame);
|
||||
uint32 getEndFrame();
|
||||
uint32 getStartFrame();
|
||||
Common::String getText();
|
||||
uint32 getEndFrame() const;
|
||||
uint32 getStartFrame() const;
|
||||
Common::String getText() const;
|
||||
private:
|
||||
BaseGame* _gameRef;
|
||||
uint32 _endFrame;
|
||||
uint32 _startFrame;
|
||||
const BaseGame* _gameRef;
|
||||
const uint32 _endFrame;
|
||||
const uint32 _startFrame;
|
||||
Common::String _text;
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user