[Scummvm-cvs-logs] CVS: scummvm gfx.cpp,1.60,1.61 script.cpp,1.39,1.40 script_v1.cpp,1.67,1.68
James Brown
ender at users.sourceforge.net
Fri Apr 5 09:01:52 CEST 2002
Update of /cvsroot/scummvm/scummvm
In directory usw-pr-cvs1:/tmp/cvs-serv17882
Modified Files:
gfx.cpp script.cpp script_v1.cpp
Log Message:
Fix Indy3/Loom override bugs. THIS MAY BREAK OTHER GAMES. Please test.
Index: gfx.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gfx.cpp,v
retrieving revision 1.60
retrieving revision 1.61
diff -C2 -d -r1.60 -r1.61
*** gfx.cpp 3 Apr 2002 17:40:32 -0000 1.60
--- gfx.cpp 5 Apr 2002 16:41:01 -0000 1.61
***************
*** 2085,2089 ****
byte Scumm::isMaskActiveAt(int l, int t, int r, int b, byte *mem) {
int w,h,i;
!
l>>=3;
if (l<0) l = 0;
--- 2085,2090 ----
byte Scumm::isMaskActiveAt(int l, int t, int r, int b, byte *mem) {
int w,h,i;
! if(_features & GF_SMALL_HEADER)
! return 0;
l>>=3;
if (l<0) l = 0;
Index: script.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -C2 -d -r1.39 -r1.40
*** script.cpp 20 Mar 2002 22:58:41 -0000 1.39
--- script.cpp 5 Apr 2002 16:41:01 -0000 1.40
***************
*** 441,455 ****
if (ss->cutsceneOverride)
error("Object %d ending with active cutscene/override", ss->number);
-
- /* I wonder if the removal of this breaks anything.
- * put ss->number and ss->status at another place if using this
- * stopObjectScript(ss->number); */
} else {
! if (ss->cutsceneOverride)
! // FIXME: Loom workaround, fix properly :) - khalek
! if ((_gameId == GID_LOOM256) && (ss->number==44))
! this->exitCutscene();
! else
! error("Script %d ending with active cutscene/override", ss->number);
}
ss->number = 0;
--- 441,447 ----
if (ss->cutsceneOverride)
error("Object %d ending with active cutscene/override", ss->number);
} else {
! if (ss->cutsceneOverride)
! error("Script %d ending with active cutscene/override (%d)", ss->number, ss->cutsceneOverride);
}
ss->number = 0;
***************
*** 760,767 ****
int16 args[16];
! memset(args, 0, sizeof(args));
!
! ss->cutsceneOverride--;
args[0] = vm.cutSceneData[vm.cutSceneStackPointer];
_vars[VAR_OVERRIDE] = 0;
--- 752,759 ----
int16 args[16];
! memset(args, 0, sizeof(args));
+ ss->cutsceneOverride--;
+ printf("Ending cs(%d) from %d\n", ss->cutsceneOverride, _currentScript);
args[0] = vm.cutSceneData[vm.cutSceneStackPointer];
_vars[VAR_OVERRIDE] = 0;
***************
*** 782,786 ****
int scr = _currentScript;
vm.slot[scr].cutsceneOverride++;
!
if (++vm.cutSceneStackPointer > sizeof(vm.cutSceneData)/sizeof(vm.cutSceneData[0]))
error("Cutscene stack overflow");
--- 774,778 ----
int scr = _currentScript;
vm.slot[scr].cutsceneOverride++;
! printf("Starting cs(%d) from %d\n", vm.slot[scr].cutsceneOverride, _currentScript);
if (++vm.cutSceneStackPointer > sizeof(vm.cutSceneData)/sizeof(vm.cutSceneData[0]))
error("Cutscene stack overflow");
***************
*** 899,905 ****
idx = vm.cutSceneStackPointer;
ptr = &vm.cutScenePtr[idx];
! if (!*ptr) {
vm.slot[_currentScript].cutsceneOverride++;
! }
*ptr = _scriptPointer - _scriptOrgPointer;
vm.cutSceneScript[idx] = _currentScript;
--- 891,898 ----
idx = vm.cutSceneStackPointer;
ptr = &vm.cutScenePtr[idx];
! /* if (!*ptr) { // ENDER - FIXME - We don't need this?
vm.slot[_currentScript].cutsceneOverride++;
! }
! */
*ptr = _scriptPointer - _scriptOrgPointer;
vm.cutSceneScript[idx] = _currentScript;
***************
*** 916,922 ****
idx = vm.cutSceneStackPointer;
ptr = &vm.cutScenePtr[idx];
! if (*ptr) {
! vm.slot[_currentScript].cutsceneOverride--;
! }
*ptr = 0;
vm.cutSceneScript[idx] = 0;
--- 909,916 ----
idx = vm.cutSceneStackPointer;
ptr = &vm.cutScenePtr[idx];
! /* if (!*ptr) { // ENDER - FIXME - We don't need this?
! // vm.slot[_currentScript].cutsceneOverride--;
! //printf("ending override: %d on script %d\n", vm.slot[_currentScript].cutsceneOverride, _currentScript);
! } */
*ptr = 0;
vm.cutSceneScript[idx] = 0;
***************
*** 1027,1031 ****
ss->status = 2;
ss->freezeCount = 0;
! ss->cutsceneOverride--;
_vars[VAR_OVERRIDE] = 1;
vm.cutScenePtr[vm.cutSceneStackPointer] = 0;
--- 1021,1028 ----
ss->status = 2;
ss->freezeCount = 0;
!
! if (ss->cutsceneOverride > 0)
! ss->cutsceneOverride--;
!
_vars[VAR_OVERRIDE] = 1;
vm.cutScenePtr[vm.cutSceneStackPointer] = 0;
Index: script_v1.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/script_v1.cpp,v
retrieving revision 1.67
retrieving revision 1.68
diff -C2 -d -r1.67 -r1.68
*** script_v1.cpp 5 Apr 2002 08:13:53 -0000 1.67
--- script_v1.cpp 5 Apr 2002 16:41:02 -0000 1.68
***************
*** 1,2535 ****
! /* ScummVM - Scumm Interpreter
! * Copyright (C) 2001 Ludvig Strigeus
! * Copyright (C) 2001/2002 The ScummVM project
! *
! * This program is free software; you can redistribute it and/or
! * modify it under the terms of the GNU General Public License
! * as published by the Free Software Foundation; either version 2
! * of the License, or (at your option) any later version.
!
! * This program is distributed in the hope that it will be useful,
[...5041 lines suppressed...]
! }
! warning("Unsupported oldRoomEffect");
! }
!
! void Scumm::o5_pickupObjectOld() {
! int obj = getVarOrDirectWord(0x80);
!
! if(getObjectIndex(obj) == -1)
! return;
!
! // warning("adding %d from %d to inventoryOld", obj, _currentRoom);
! addObjectToInventory(obj,_currentRoom);
! // warning("added to inventoryOld");
! removeObjectFromRoom(obj);
! putOwner(obj, _vars[VAR_EGO]);
! putClass(obj, 32, 1);
! putState(obj, 1);
! clearDrawObjectQueue();
! runHook(1);
! }
More information about the Scummvm-git-logs
mailing list