diff options
author | Nicola Mettifogo | 2007-09-02 18:34:11 +0000 |
---|---|---|
committer | Nicola Mettifogo | 2007-09-02 18:34:11 +0000 |
commit | 21e4f4f1760e204de6e8d0a413f8e8f8987dd083 (patch) | |
tree | 1902fcb1756b1226e05dc12a4bfabead8ba9215d /engines/parallaction/objects.cpp | |
parent | f1f324cee424cb97da1a14789db2806002ba3f6e (diff) | |
download | scummvm-rg350-21e4f4f1760e204de6e8d0a413f8e8f8987dd083.tar.gz scummvm-rg350-21e4f4f1760e204de6e8d0a413f8e8f8987dd083.tar.bz2 scummvm-rg350-21e4f4f1760e204de6e8d0a413f8e8f8987dd083.zip |
Simplified global label management and added subtitles for BRA.
svn-id: r28828
Diffstat (limited to 'engines/parallaction/objects.cpp')
-rw-r--r-- | engines/parallaction/objects.cpp | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/engines/parallaction/objects.cpp b/engines/parallaction/objects.cpp index 195d814265..c856d419e3 100644 --- a/engines/parallaction/objects.cpp +++ b/engines/parallaction/objects.cpp @@ -131,8 +131,6 @@ Zone::Zone() { Zone::~Zone() { // printf("~Zone(%s)\n", _label._text); - _label._cnv.free(); - switch (_type & 0xFFFF) { case kZoneExamine: free(u.examine->_filename); @@ -198,15 +196,40 @@ uint16 Zone::height() const { } Label::Label() { - _text = NULL; + resetPosition(); + _text = 0; } Label::~Label() { + free(); +} + +void Label::free() { _cnv.free(); if (_text) - free(_text); + ::free(_text); + _text = 0; + + resetPosition(); } +void Label::resetPosition() { + _pos.x = -1000; + _pos.y = -1000; + _old.x = -1000; + _old.y = -1000; +} + +void Label::getRect(Common::Rect &r, bool old) { + r.setWidth(_cnv.w); + r.setHeight(_cnv.h); + + if (old) { + r.moveTo(_old); + } else { + r.moveTo(_pos); + } +} Answer::Answer() { _text = NULL; |