aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/cge_main.cpp4
-rw-r--r--engines/cge/events.cpp2
-rw-r--r--engines/cge/talk.cpp15
-rw-r--r--engines/cge/talk.h2
-rw-r--r--engines/cge/vga13h.cpp2
-rw-r--r--engines/cge/vmenu.cpp4
6 files changed, 22 insertions, 7 deletions
diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp
index c800d242ae..a4d110eac6 100644
--- a/engines/cge/cge_main.cpp
+++ b/engines/cge/cge_main.cpp
@@ -1715,7 +1715,9 @@ bool CGEEngine::showTitle(const char *name) {
return false;
Bitmap::_pal = Vga::_sysPal;
- BMP_PTR LB[] = { new Bitmap(name, true), NULL };
+ BMP_PTR *LB = new BMP_PTR[2];
+ LB[0] = new Bitmap(name, true);
+ LB[1] = NULL;
Bitmap::_pal = NULL;
bool usr_ok = false;
diff --git a/engines/cge/events.cpp b/engines/cge/events.cpp
index 6168dd15a8..71110c4067 100644
--- a/engines/cge/events.cpp
+++ b/engines/cge/events.cpp
@@ -154,7 +154,7 @@ Mouse::Mouse(CGEEngine *vm) : Sprite(vm, NULL), _busy(NULL), _hold(NULL), _hx(0)
_buttons = 0;
_busy = NULL;
_active = false;
-
+ _flags._kill = true;
setSeq(ms);
BMP_PTR *MC = new BMP_PTR[3];
diff --git a/engines/cge/talk.cpp b/engines/cge/talk.cpp
index f41e31dce6..b6f276c452 100644
--- a/engines/cge/talk.cpp
+++ b/engines/cge/talk.cpp
@@ -99,7 +99,8 @@ void Font::save() {
Talk::Talk(CGEEngine *vm, const char *tx, TBOX_STYLE mode)
: Sprite(vm, NULL), _mode(mode), _vm(vm) {
- _ts[0] = _ts[1] = NULL;
+
+ _ts = NULL;
_flags._syst = true;
update(tx);
}
@@ -107,7 +108,7 @@ Talk::Talk(CGEEngine *vm, const char *tx, TBOX_STYLE mode)
Talk::Talk(CGEEngine *vm)
: Sprite(vm, NULL), _mode(PURE), _vm(vm) {
- _ts[0] = _ts[1] = NULL;
+ _ts = NULL;
_flags._syst = true;
}
@@ -141,7 +142,7 @@ void Talk::update(const char *tx) {
const char *p;
uint8 *m;
- if (!_ts[0]) {
+ if (!_ts) {
uint16 k = 2 * hmarg;
mh = 2 * vmarg + FONT_HIG;
for (p = tx; *p; p++) {
@@ -155,7 +156,10 @@ void Talk::update(const char *tx) {
}
if (k > mw)
mw = k;
+
+ _ts = new BMP_PTR[2];
_ts[0] = box(mw, mh);
+ _ts[1] = NULL;
}
m = _ts[0]->_m + ln * mw + hmarg;
@@ -286,6 +290,11 @@ void Talk::putLine(int line, const char *text) {
InfoLine::InfoLine(CGEEngine *vm, uint16 w) : Talk(vm), _oldTxt(NULL), _vm(vm) {
+ if (!_ts) {
+ _ts = new BMP_PTR[2];
+ _ts[1] = NULL;
+ }
+
_ts[0] = new Bitmap(w, FONT_HIG, TEXT_BG);
setShapeList(_ts);
}
diff --git a/engines/cge/talk.h b/engines/cge/talk.h
index 2f70471359..4d30047ea1 100644
--- a/engines/cge/talk.h
+++ b/engines/cge/talk.h
@@ -71,7 +71,7 @@ enum TBOX_STYLE { PURE, RECT, ROUND };
class Talk : public Sprite {
protected:
TBOX_STYLE _mode;
- Bitmap *_ts[2];
+ BMP_PTR *_ts;
Bitmap *box(uint16 w, uint16 h);
public:
Talk(CGEEngine *vm, const char *tx, TBOX_STYLE mode);
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp
index 2530bf970a..6e0493695a 100644
--- a/engines/cge/vga13h.cpp
+++ b/engines/cge/vga13h.cpp
@@ -619,7 +619,7 @@ Sprite *Sprite::contract() {
if (_flags._bDel && e->_shpList) {
int i;
for (i = 0; e->_shpList[i]; i++)
- delete e->_shpList[i];
+ delete e->_shpList[i];
delete[] e->_shpList;
}
if (memType(e->_seq) == NEAR_MEM)
diff --git a/engines/cge/vmenu.cpp b/engines/cge/vmenu.cpp
index 8fef6307b1..f802916657 100644
--- a/engines/cge/vmenu.cpp
+++ b/engines/cge/vmenu.cpp
@@ -59,8 +59,12 @@ MenuBar::MenuBar(CGEEngine *vm, uint16 w) : Talk(vm), _vm(vm) {
p1 += w;
p2 -= w;
}
+
+ _ts = new BMP_PTR[2];
_ts[0] = new Bitmap(w, h, p);
+ _ts[1] = NULL;
setShapeList(_ts);
+
_flags._slav = true;
_flags._tran = true;
_flags._kill = true;