diff options
author | Travis Howell | 2004-08-30 00:10:36 +0000 |
---|---|---|
committer | Travis Howell | 2004-08-30 00:10:36 +0000 |
commit | 704ad7f63b70cfe90d968127bf7140a590f79d9f (patch) | |
tree | 3c20a55ef33e697c2390da35d0d539379a1d3177 /scumm | |
parent | c7a7f00577e610e349d088f67acb5c7b9f12b9ba (diff) | |
download | scummvm-rg350-704ad7f63b70cfe90d968127bf7140a590f79d9f.tar.gz scummvm-rg350-704ad7f63b70cfe90d968127bf7140a590f79d9f.tar.bz2 scummvm-rg350-704ad7f63b70cfe90d968127bf7140a590f79d9f.zip |
Correct resource value, to match original.
Adjust rtLast
svn-id: r14833
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/gfx.cpp | 6 | ||||
-rw-r--r-- | scumm/resource.cpp | 14 | ||||
-rw-r--r-- | scumm/scumm.cpp | 2 | ||||
-rw-r--r-- | scumm/scumm.h | 3 |
4 files changed, 14 insertions, 11 deletions
diff --git a/scumm/gfx.cpp b/scumm/gfx.cpp index 67df4cc569..6fdd74e0c2 100644 --- a/scumm/gfx.cpp +++ b/scumm/gfx.cpp @@ -482,7 +482,7 @@ void ScummEngine::initBGBuffers(int height) { } if (_heversion >= 70) - room = getResourceAddress(rtRoomStart, _roomResource); + room = getResourceAddress(rtRoomImage, _roomResource); else room = getResourceAddress(rtRoom, _roomResource); @@ -550,7 +550,7 @@ void ScummEngine::redrawBGAreas() { val = 0; if (_heversion >= 70) { - byte *room = getResourceAddress(rtRoomStart, _roomResource) + _IM00_offs; + byte *room = getResourceAddress(rtRoomImage, _roomResource) + _IM00_offs; if (findResource(MKID('BMAP'), room) != NULL) { if (_fullRedraw) { _BgNeedsRedraw = 0; @@ -614,7 +614,7 @@ void ScummEngine::redrawBGStrip(int start, int num) { gdi._C64ObjectMode = false; } if (_heversion >= 70) - room = getResourceAddress(rtRoomStart, _roomResource); + room = getResourceAddress(rtRoomImage, _roomResource); else room = getResourceAddress(rtRoom, _roomResource); diff --git a/scumm/resource.cpp b/scumm/resource.cpp index 599a2c6525..7fc256c688 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -2033,7 +2033,7 @@ byte *ScummEngine::createResource(int type, int idx, uint32 size) { } bool ScummEngine::validateResource(const char *str, int type, int idx) const { - if (type < rtFirst || type > 19 || (uint) idx >= (uint) res.num[type]) { + if (type < rtFirst || type > rtLast || (uint) idx >= (uint) res.num[type]) { warning("%s Illegal Glob type %s (%d) num %d", str, resTypeFromId(type), type, idx); return false; } @@ -2669,12 +2669,16 @@ const char *resTypeFromId(int id) { return "Matrix"; case rtBox: return "Box"; - case rtLast: - return "Last"; - case rtNumTypes: - return "NumTypes"; + case rtObjectName: + return "ObjectName"; + case rtRoomScripts: + return "RoomScripts"; + case rtRoomImage: + return "RoomImage"; case rtImage: return "Image"; + case rtNumTypes: + return "NumTypes"; default: sprintf(buf, "%d", id); return buf; diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index c6ddc9179c..1718870855 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -2377,7 +2377,7 @@ void ScummEngine::initRoomSubBlocks() { // Determine the room and room script base address roomResPtr = roomptr = getResourceAddress(rtRoom, _roomResource); if (_heversion >= 70) - roomStartPtr = getResourceAddress(rtRoomStart, _roomResource); + roomStartPtr = getResourceAddress(rtRoomImage, _roomResource); else if (_version == 8) roomResPtr = getResourceAddress(rtRoomScripts, _roomResource); if (!roomptr || !roomResPtr) diff --git a/scumm/scumm.h b/scumm/scumm.h index ca9523e797..43e89058b1 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -212,10 +212,9 @@ enum ResTypes { rtBox = 15, rtObjectName = 16, rtRoomScripts = 17, - rtRoomStart = 17, - rtLast = 17, rtRoomImage = 18, rtImage = 19, + rtLast = 19, rtNumTypes = 20 }; |