mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-18 16:03:05 +00:00
Fixed RoomOps for Zak256 and indy3
svn-id: r3584
This commit is contained in:
parent
cca0057a88
commit
0ad2121e74
@ -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 */
|
||||
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) {
|
||||
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 */
|
||||
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 */
|
||||
// _fullRedraw = 1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user