aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorSven Hesse2009-07-17 00:55:56 +0000
committerSven Hesse2009-07-17 00:55:56 +0000
commit6c4e87a1d889ffdb6c97393d6d31db3138c291c8 (patch)
tree591bd93a42954cf5f3195aebe1894988b28bec37 /engines
parent922f721108b2a77c47add7055ff4fb5119f1c745 (diff)
downloadscummvm-rg350-6c4e87a1d889ffdb6c97393d6d31db3138c291c8.tar.gz
scummvm-rg350-6c4e87a1d889ffdb6c97393d6d31db3138c291c8.tar.bz2
scummvm-rg350-6c4e87a1d889ffdb6c97393d6d31db3138c291c8.zip
Making TOTResourceItem::size unsigned, fixing a graphics bug that crept in
svn-id: r42552
Diffstat (limited to 'engines')
-rw-r--r--engines/gob/resources.cpp6
-rw-r--r--engines/gob/resources.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/engines/gob/resources.cpp b/engines/gob/resources.cpp
index eeb880485f..c52b65f0d7 100644
--- a/engines/gob/resources.cpp
+++ b/engines/gob/resources.cpp
@@ -255,7 +255,7 @@ bool Resources::loadTOTResourceTable() {
TOTResourceItem &item = _totResourceTable->items[i];
item.offset = stream->readSint32LE();
- item.size = stream->readSint16LE();
+ item.size = stream->readUint16LE();
item.width = stream->readSint16LE();
item.height = stream->readSint16LE();
@@ -645,7 +645,7 @@ Resource *Resources::getEXTResource(uint16 id) const {
}
byte *Resources::getTOTData(TOTResourceItem &totItem) const {
- if (totItem.size < 0)
+ if (totItem.size == 0)
return 0;
int32 offset = _totResourceTable->dataOffset + totItem.offset - _totResStart;
@@ -657,7 +657,7 @@ byte *Resources::getTOTData(TOTResourceItem &totItem) const {
}
byte *Resources::getIMData(TOTResourceItem &totItem) const {
- if (totItem.size < 0)
+ if (totItem.size == 0)
return 0;
int32 indexOffset = totItem.index * 4;
diff --git a/engines/gob/resources.h b/engines/gob/resources.h
index 80acef645c..d316be83e5 100644
--- a/engines/gob/resources.h
+++ b/engines/gob/resources.h
@@ -109,7 +109,7 @@ private:
struct TOTResourceItem {
ResourceType type;
- int16 size;
+ uint16 size;
int16 width;
int16 height;
union {