[Scummvm-cvs-logs] CVS: scummvm script_v1.cpp,1.77,1.78 scummvm.cpp,1.114,1.115
James Brown
ender at users.sourceforge.net
Tue Apr 16 09:26:09 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv21318
Modified Files:
script_v1.cpp scummvm.cpp
Log Message:
Fix Indy4. Make invalid actor warnings -d only.
FIXME note: Need to track down why these invalid calls are happening
in the first place.
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.77
retrieving revision 1.78
diff -C2 -d -r1.77 -r1.78
*** script_v1.cpp 16 Apr 2002 12:18:49 -0000 1.77
--- script_v1.cpp 16 Apr 2002 16:25:56 -0000 1.78
***************
*** 1255,1262 ****
{
int temp;
getResultPos();
temp = getVarOrDirectByte(0x80);
! setResult(derefActorSafe(temp, "o5_getActorRoom")->room);
}
--- 1255,1267 ----
{
int temp;
+ Actor *act;
getResultPos();
temp = getVarOrDirectByte(0x80);
+
+ act = derefActorSafe(temp, "o5_getActorRoom");
+ if (!act)
+ return;
! setResult(act->room);
}
Index: scummvm.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scummvm.cpp,v
retrieving revision 1.114
retrieving revision 1.115
diff -C2 -d -r1.114 -r1.115
*** scummvm.cpp 16 Apr 2002 12:18:50 -0000 1.114
--- scummvm.cpp 16 Apr 2002 16:25:57 -0000 1.115
***************
*** 903,909 ****
{
if (id < 1 || id >= NUM_ACTORS) {
! warning
! ("Invalid actor %d in %s (script %d, opcode 0x%x) - This is potentially a BIG problem.",
! id, errmsg, vm.slot[_curExecScript].number, _opcode);
return NULL;
}
--- 903,908 ----
{
if (id < 1 || id >= NUM_ACTORS) {
! if (_debugMode)
! warning("Invalid actor %d in %s (script %d, opcode 0x%x) - This is potentially a BIG problem.", id, errmsg, vm.slot[_curExecScript].number, _opcode);
return NULL;
}
More information about the Scummvm-git-logs
mailing list