[Scummvm-cvs-logs] SF.net SVN: scummvm:[39579] scummvm/trunk/engines/scumm/script_v5.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Sat Mar 21 00:02:40 CET 2009
Revision: 39579
http://scummvm.svn.sourceforge.net/scummvm/?rev=39579&view=rev
Author: fingolfin
Date: 2009-03-20 23:02:40 +0000 (Fri, 20 Mar 2009)
Log Message:
-----------
SCUMM: cleanup
Modified Paths:
--------------
scummvm/trunk/engines/scumm/script_v5.cpp
Modified: scummvm/trunk/engines/scumm/script_v5.cpp
===================================================================
--- scummvm/trunk/engines/scumm/script_v5.cpp 2009-03-20 23:02:20 UTC (rev 39578)
+++ scummvm/trunk/engines/scumm/script_v5.cpp 2009-03-20 23:02:40 UTC (rev 39579)
@@ -1832,16 +1832,15 @@
ensureResourceLoaded(resType[op - 1], resid);
break;
case 4: // SO_LOAD_ROOM
+ ensureResourceLoaded(rtRoom, resid);
if (_game.version == 3) {
- ensureResourceLoaded(rtRoom, resid);
if (resid > 0x7F)
resid = _resourceMapper[resid & 0x7F];
if (_currentRoom != resid) {
_res->setResourceCounter(rtRoom, resid, 1);
}
- } else
- ensureResourceLoaded(rtRoom, resid);
+ }
break;
case 5: // SO_NUKE_SCRIPT
@@ -1941,8 +1940,9 @@
void ScummEngine_v5::o5_roomOps() {
int a = 0, b = 0, c, d, e;
+ const bool paramsBeforeOpcode = (_game.version == 3 && _game.platform != Common::kPlatformPCEngine);
- if (_game.version == 3 && _game.platform != Common::kPlatformPCEngine) {
+ if (paramsBeforeOpcode) {
a = getVarOrDirectWord(PARAM_1);
b = getVarOrDirectWord(PARAM_2);
}
@@ -1950,7 +1950,7 @@
_opcode = fetchScriptByte();
switch (_opcode & 0x1F) {
case 1: // SO_ROOM_SCROLL
- if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) {
+ if (!paramsBeforeOpcode) {
a = getVarOrDirectWord(PARAM_1);
b = getVarOrDirectWord(PARAM_2);
}
@@ -1967,7 +1967,7 @@
break;
case 2: // SO_ROOM_COLOR
if (_game.features & GF_SMALL_HEADER) {
- if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) {
+ if (!paramsBeforeOpcode) {
a = getVarOrDirectWord(PARAM_1);
b = getVarOrDirectWord(PARAM_2);
}
@@ -1980,7 +1980,7 @@
break;
case 3: // SO_ROOM_SCREEN
- if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) {
+ if (!paramsBeforeOpcode) {
a = getVarOrDirectWord(PARAM_1);
b = getVarOrDirectWord(PARAM_2);
}
@@ -1988,7 +1988,7 @@
break;
case 4: // SO_ROOM_PALETTE
if (_game.features & GF_SMALL_HEADER) {
- if (_game.version != 3 || _game.platform == Common::kPlatformPCEngine) {
+ if (!paramsBeforeOpcode) {
a = getVarOrDirectWord(PARAM_1);
b = getVarOrDirectWord(PARAM_2);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list