From 0ad2121e7422ead4475c98bcac4cc9ee6f061ed4 Mon Sep 17 00:00:00 2001 From: Vincent Hamm Date: Thu, 14 Feb 2002 22:09:47 +0000 Subject: [PATCH] Fixed RoomOps for Zak256 and indy3 svn-id: r3584 --- script_v1.cpp | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) diff --git a/script_v1.cpp b/script_v1.cpp index c571d22b37a..994280fa534 100644 --- a/script_v1.cpp +++ b/script_v1.cpp @@ -1378,12 +1378,21 @@ void Scumm::o5_resourceRoutines() { void Scumm::o5_roomOps() { int a,b,c,d,e; + if(_features & GF_OLD256) + { + a = getVarOrDirectByte(0x80); + b = getVarOrDirectByte(0x40); + } + _opcode = fetchScriptByte(); switch(_opcode & 0x1F) { case 1: /* room scroll */ - a = getVarOrDirectWord(0x80); - b = getVarOrDirectWord(0x40); + if(!(_features & GF_OLD256)) + { + a = getVarOrDirectWord(0x80); + b = getVarOrDirectWord(0x40); + } if (a < 160) a=160; if (b < 160) b=160; if (a > _scrWidth-160) a=_scrWidth-160; @@ -1393,8 +1402,11 @@ void Scumm::o5_roomOps() { break; case 2: /* room color */ if(_features & GF_SMALL_HEADER) { - a = getVarOrDirectWord(0x80); - b = getVarOrDirectWord(0x40); + if(!(_features & GF_OLD256)) + { + a = getVarOrDirectWord(0x80); + b = getVarOrDirectWord(0x40); + } checkRange(256, 0, a, "o5_roomOps: 2: Illegal room color slot (%d)"); _currentPalette[a]=b; _fullRedraw = 1; @@ -1404,14 +1416,20 @@ void Scumm::o5_roomOps() { break; case 3: /* set screen */ - a = getVarOrDirectWord(0x80); - b = getVarOrDirectWord(0x40); + if(!(_features & GF_OLD256)) + { + a = getVarOrDirectWord(0x80); + b = getVarOrDirectWord(0x40); + } initScreens(0,a,320,b); break; case 4: /* set palette color */ if(_features & GF_SMALL_HEADER) { - a = getVarOrDirectWord(0x80); - b = getVarOrDirectWord(0x40); + if(!(_features & GF_OLD256)) + { + a = getVarOrDirectWord(0x80); + b = getVarOrDirectWord(0x40); + } checkRange(256, 0, a, "o5_roomOps: 2: Illegal room color slot (%d)"); _currentPalette[a]=b; /*FIXME: should be shadow palette */ // _fullRedraw = 1;