[Scummvm-cvs-logs] CVS: scummvm script_v1.cpp,1.25,1.26

Vincent Hamm yazoo at users.sourceforge.net
Thu Feb 14 14:10:09 CET 2002


Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv11699

Modified Files:
	script_v1.cpp 
Log Message:
Fixed RoomOps for Zak256 and indy3

Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** script_v1.cpp	14 Feb 2002 20:47:47 -0000	1.25
--- script_v1.cpp	14 Feb 2002 22:09:47 -0000	1.26
***************
*** 1379,1388 ****
  	int a,b,c,d,e;
  
  	_opcode = fetchScriptByte();
  
  	switch(_opcode & 0x1F) {
  	case 1: /* room scroll */
! 		a = getVarOrDirectWord(0x80);
! 		b = getVarOrDirectWord(0x40);
  		if (a < 160) a=160;
  		if (b < 160) b=160;
--- 1379,1397 ----
  	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 */
! 		if(!(_features & GF_OLD256))
! 		{
! 			a = getVarOrDirectWord(0x80);
! 			b = getVarOrDirectWord(0x40);
! 		}
  		if (a < 160) a=160;
  		if (b < 160) b=160;
***************
*** 1394,1399 ****
  	case 2: /* room color */
                  if(_features & GF_SMALL_HEADER) {
!                         a = getVarOrDirectWord(0x80);
!                         b = getVarOrDirectWord(0x40);
                          checkRange(256, 0, a, "o5_roomOps: 2: Illegal room color slot (%d)");
                          _currentPalette[a]=b;
--- 1403,1411 ----
  	case 2: /* room color */
                  if(_features & GF_SMALL_HEADER) {
! 			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;
***************
*** 1405,1416 ****
  
  	case 3: /* set screen */
! 		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);
                         checkRange(256, 0, a, "o5_roomOps: 2: Illegal room color slot (%d)");
                         _currentPalette[a]=b; /*FIXME: should be shadow palette */
--- 1417,1434 ----
  
  	case 3: /* set screen */
! 		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) {
! 		       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 */





More information about the Scummvm-git-logs mailing list