aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/director/archive.cpp2
-rw-r--r--engines/director/lingo/lingo-code.cpp4
-rw-r--r--engines/director/score.cpp12
3 files changed, 11 insertions, 7 deletions
diff --git a/engines/director/archive.cpp b/engines/director/archive.cpp
index 6e1da0c8b7..ff97d3fce1 100644
--- a/engines/director/archive.cpp
+++ b/engines/director/archive.cpp
@@ -445,7 +445,7 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
debugC(2, kDebugLoading, "KEY*: index: %d id: %d resTag: %s", index, id, tag2str(resTag));
const Resource &res = resources[index];
- debug(3, "Found RIFX resource: '%s' 0x%04x, %d @ 0x%08x (%d)", tag2str(resTag), id, res.size, res.offset, res.offset);
+ debug(3, "Found RIFX resource: '%s' id: 0x%04x, %d @ 0x%08x (%d)", tag2str(resTag), id, res.size, res.offset, res.offset);
_types[resTag][id] = res;
}
diff --git a/engines/director/lingo/lingo-code.cpp b/engines/director/lingo/lingo-code.cpp
index 37a333ba10..dd5977673e 100644
--- a/engines/director/lingo/lingo-code.cpp
+++ b/engines/director/lingo/lingo-code.cpp
@@ -729,6 +729,8 @@ void Lingo::c_repeatwithcode(void) {
if (!g_lingo->_returning)
g_lingo->_pc = end; /* next stmt */
+
+ delete counter;
}
void Lingo::c_exitRepeat(void) {
@@ -972,6 +974,8 @@ void Lingo::c_global() {
s->global = true;
g_lingo->_pc += g_lingo->calcStringAlignment(name.c_str());
+
+ delete s;
}
void Lingo::c_instance() {
diff --git a/engines/director/score.cpp b/engines/director/score.cpp
index 66e5e2a172..1c78745330 100644
--- a/engines/director/score.cpp
+++ b/engines/director/score.cpp
@@ -842,13 +842,13 @@ void Score::loadFontMap(Common::SeekableSubReadStreamEndian &stream) {
}
Common::Rect Score::readRect(Common::ReadStreamEndian &stream) {
- Common::Rect *rect = new Common::Rect();
- rect->top = stream.readUint16();
- rect->left = stream.readUint16();
- rect->bottom = stream.readUint16();
- rect->right = stream.readUint16();
+ Common::Rect rect;
+ rect.top = stream.readUint16();
+ rect.left = stream.readUint16();
+ rect.bottom = stream.readUint16();
+ rect.right = stream.readUint16();
- return *rect;
+ return rect;
}
void Score::startLoop() {