aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/rect.h10
-rw-r--r--engines/drascula/talk.cpp2
-rw-r--r--engines/m4/converse.cpp4
-rw-r--r--engines/m4/resource.cpp2
-rw-r--r--engines/parallaction/objects.h2
-rw-r--r--gui/ThemeRenderer.cpp3
6 files changed, 17 insertions, 6 deletions
diff --git a/common/rect.h b/common/rect.h
index f71124434a..01a0a0d431 100644
--- a/common/rect.h
+++ b/common/rect.h
@@ -124,6 +124,16 @@ struct Rect {
return contains(p.x, p.y);
}
+ /*! @brief check if the given rect is _fully_ contained inside this rectangle
+
+ @param r The rectangle to check
+
+ @retur true if the given rect is inside, false otherwise
+ */
+ bool contains(const Rect &r) const {
+ return (left < r.left) && (right > r.right) && (top < r.top) && (bottom > r.bottom);
+ }
+
/*! @brief check if given rectangle intersects with this rectangle
@param r the rectangle to check
diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp
index 4d3187a0fd..a89c5ff734 100644
--- a/engines/drascula/talk.cpp
+++ b/engines/drascula/talk.cpp
@@ -60,7 +60,7 @@ void DrasculaEngine::talk_igor(int index, int talkerType) {
int x_talk1[8] = { 56, 86, 116, 146, 176, 206, 236, 266 };
int x_talk3[4] = { 80, 102, 124, 146 };
int x_talk4[4] = { 119, 158, 197, 236 };
- int face;
+ int face = 0;
int length = strlen(said);
color_abc(kColorWhite);
diff --git a/engines/m4/converse.cpp b/engines/m4/converse.cpp
index 729af6c40f..024cd591f5 100644
--- a/engines/m4/converse.cpp
+++ b/engines/m4/converse.cpp
@@ -379,8 +379,8 @@ void Converse::loadConversation(const char *convName) {
uint32 header = convS->readUint32LE();
uint32 size;
uint32 chunk;
- uint32 data;
- uint32 i;
+ uint32 data = 0;
+ uint32 i = 0;
ConvEntry* curEntry = NULL;
ConvEntry* replyEntry = NULL;
int32 currentWeightedEntry = -1;
diff --git a/engines/m4/resource.cpp b/engines/m4/resource.cpp
index 57816b6600..5070a2b79c 100644
--- a/engines/m4/resource.cpp
+++ b/engines/m4/resource.cpp
@@ -310,7 +310,7 @@ const char *MADSResourceManager::getResourceFilename(const char *resourceName) {
Common::SeekableReadStream *MADSResourceManager::loadResource(const char *resourceName, bool loadFlag) {
Common::File hagFile;
- uint32 offset, size;
+ uint32 offset = 0, size = 0;
// If the first character is a '@' then look for an external file
diff --git a/engines/parallaction/objects.h b/engines/parallaction/objects.h
index afa6cc5ed5..c2c2c154b5 100644
--- a/engines/parallaction/objects.h
+++ b/engines/parallaction/objects.h
@@ -94,7 +94,7 @@ enum ZoneFlags {
enum CommandFlags {
- kFlagsAll = 0xFFFFFFFFU,
+ kFlagsAll = 0x7FFFFFFFU,
kFlagsVisited = 1,
kFlagsExit = 0x10000000,
diff --git a/gui/ThemeRenderer.cpp b/gui/ThemeRenderer.cpp
index 1ca3d4fcc4..0b02f88a2c 100644
--- a/gui/ThemeRenderer.cpp
+++ b/gui/ThemeRenderer.cpp
@@ -586,6 +586,7 @@ void ThemeRenderer::updateScreen() {
}
renderDirtyScreen();
+// _vectorRenderer->copyWholeFrame(_system);
}
void ThemeRenderer::renderDirtyScreen() {
@@ -595,7 +596,7 @@ void ThemeRenderer::renderDirtyScreen() {
Common::List<Common::Rect>::const_iterator i, j;
for (i = _dirtyScreen.begin(); i != _dirtyScreen.end(); ++i) {
for (j = i; j != _dirtyScreen.end(); ++j)
- if (j != i && i->intersects(*j))
+ if (j != i && i->contains(*j))
j = _dirtyScreen.reverse_erase(j);
_vectorRenderer->copyFrame(_system, *i);