diff options
author | Travis Howell | 2009-03-08 08:45:21 +0000 |
---|---|---|
committer | Travis Howell | 2009-03-08 08:45:21 +0000 |
commit | 2620d6836c001f2f295cb6efd6beab78f5a3c50f (patch) | |
tree | 81d5055b74abfc7b0be105bee13b39e6505fce91 /engines/agos/zones.cpp | |
parent | 7bfab75a0814d0655a2504bf4c461df0000da0e4 (diff) | |
download | scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.tar.gz scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.tar.bz2 scummvm-rg350-2620d6836c001f2f295cb6efd6beab78f5a3c50f.zip |
Add initial support for Personal Nightmare.
Thanks to dreammaster for file decompression and icon decoding code.
NOTE: setjmp/longjmp code will require conversion for portability.
svn-id: r39216
Diffstat (limited to 'engines/agos/zones.cpp')
-rw-r--r-- | engines/agos/zones.cpp | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/engines/agos/zones.cpp b/engines/agos/zones.cpp index 79199c90f1..4e3d5b0007 100644 --- a/engines/agos/zones.cpp +++ b/engines/agos/zones.cpp @@ -63,29 +63,34 @@ static const uint8 zoneTable[160] = { 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, }; -void AGOSEngine::loadZone(uint16 zoneNum) { +void AGOSEngine::loadZone(uint16 zoneNum, bool useError) { VgaPointersEntry *vpe; CHECK_BOUNDS(zoneNum, _vgaBufferPointers); - vpe = _vgaBufferPointers + zoneNum; - if (vpe->vgaFile1 != NULL) - return; + if (getGameType() == GType_PN) { + // Only a single zone is used in Personal Nightmare + vpe = _vgaBufferPointers; + vc27_resetSprite(); + } else { + vpe = _vgaBufferPointers + zoneNum; + if (vpe->vgaFile1 != NULL) + return; + } - // Loading order is important - // due to resource managment + // Loading order is important due to resource managment if (getPlatform() == Common::kPlatformAmiga && getGameType() == GType_WW && zoneTable[zoneNum] == 3) { uint8 num = (zoneNum >= 85) ? 94 : 18; - loadVGAVideoFile(num, 2); + loadVGAVideoFile(num, 2, useError); } else { - loadVGAVideoFile(zoneNum, 2); + loadVGAVideoFile(zoneNum, 2, useError); } vpe->vgaFile2 = _block; vpe->vgaFile2End = _blockEnd; - loadVGAVideoFile(zoneNum, 1); + loadVGAVideoFile(zoneNum, 1, useError); vpe->vgaFile1 = _block; vpe->vgaFile1End = _blockEnd; |