From 2620d6836c001f2f295cb6efd6beab78f5a3c50f Mon Sep 17 00:00:00 2001 From: Travis Howell Date: Sun, 8 Mar 2009 08:45:21 +0000 Subject: 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 --- engines/agos/zones.cpp | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) (limited to 'engines/agos/zones.cpp') 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; -- cgit v1.2.3