diff options
author | Strangerke | 2011-06-27 01:03:47 +0200 |
---|---|---|
committer | Strangerke | 2011-06-27 01:03:47 +0200 |
commit | 083d6ff6122cb2faf0a4330eb480bb9f77afa255 (patch) | |
tree | e8dae7dcccf1946d5df3518ff0e1221d6a881896 /engines/cge/text.cpp | |
parent | e0673c113563ab9fc28d08c07a3bcb5c3b98fa1c (diff) | |
download | scummvm-rg350-083d6ff6122cb2faf0a4330eb480bb9f77afa255.tar.gz scummvm-rg350-083d6ff6122cb2faf0a4330eb480bb9f77afa255.tar.bz2 scummvm-rg350-083d6ff6122cb2faf0a4330eb480bb9f77afa255.zip |
CGE: remove some if(n)def DEMO by using a new flag. Added CGEEngine in several classes in order to do so.
Diffstat (limited to 'engines/cge/text.cpp')
-rw-r--r-- | engines/cge/text.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/engines/cge/text.cpp b/engines/cge/text.cpp index a8bf0d0cf8..6d7341af0a 100644 --- a/engines/cge/text.cpp +++ b/engines/cge/text.cpp @@ -42,7 +42,7 @@ namespace CGE { TEXT *Text; TALK *Talk = NULL; -TEXT::TEXT(const char *fname, int size) { +TEXT::TEXT(CGEEngine *vm, const char *fname, int size) : _vm(vm) { Cache = new HAN[size]; MergeExt(FileName, fname, SAY_EXT); if (!INI_FILE::Exist(FileName)) @@ -55,7 +55,7 @@ TEXT::TEXT(const char *fname, int size) { } -TEXT::~TEXT(void) { +TEXT::~TEXT() { Clear(); delete[] Cache; } @@ -180,14 +180,14 @@ char *TEXT::getText(int ref) { } -void Say(const char *txt, SPRITE *spr) { +void TEXT::Say(const char *txt, SPRITE *spr) { KillText(); - Talk = new TALK(txt, ROUND); + Talk = new TALK(_vm, txt, ROUND); if (Talk) { bool east = spr->Flags.East; int x = (east) ? (spr->X + spr->W - 2) : (spr->X + 2); int y = spr->Y + 2; - SPRITE *spike = new SPRITE(SP); + SPRITE *spike = new SPRITE(_vm, SP); uint16 sw = spike->W; if (east) { @@ -221,9 +221,9 @@ void Say(const char *txt, SPRITE *spr) { } } -void Inf(const char *txt) { +void CGEEngine::Inf(const char *txt) { KillText(); - Talk = new TALK(txt, RECT); + Talk = new TALK(this, txt, RECT); if (Talk) { Talk->Flags.Kill = true; Talk->Flags.BDel = true; |