aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Hamm2002-02-14 22:09:47 +0000
committerVincent Hamm2002-02-14 22:09:47 +0000
commit0ad2121e7422ead4475c98bcac4cc9ee6f061ed4 (patch)
tree176d728c3d49834e94d35a4052cd9b0b77d7ed87
parentcca0057a88f66b623ffd9825b805013272335582 (diff)
downloadscummvm-rg350-0ad2121e7422ead4475c98bcac4cc9ee6f061ed4.tar.gz
scummvm-rg350-0ad2121e7422ead4475c98bcac4cc9ee6f061ed4.tar.bz2
scummvm-rg350-0ad2121e7422ead4475c98bcac4cc9ee6f061ed4.zip
Fixed RoomOps for Zak256 and indy3
svn-id: r3584
-rw-r--r--script_v1.cpp34
1 files changed, 26 insertions, 8 deletions
diff --git a/script_v1.cpp b/script_v1.cpp
index c571d22b37..994280fa53 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;