[Scummvm-tracker] [ScummVM :: Bugs] #15047: SCUMM: DIG: "Holding an object"-state gets cancelled by cutscene override
ScummVM :: Bugs
trac at scummvm.org
Sun May 19 20:14:54 UTC 2024
#15047: SCUMM: DIG: "Holding an object"-state gets cancelled by cutscene override
----------------------------------+----------------------------
Reporter: mike-SpeedyAdventures | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: Engine: SCUMM
Version: | Resolution:
Keywords: | Game: The Dig
----------------------------------+----------------------------
Comment (by AndywinXp):
Not sure what's causing this. The scripts starting in room 23 (Nexus) as
soon as the wire action is started are: 2020, 69 and 211. 2020 is the one
setting the override, 69 is the global script handling turning (I think?),
and I couldn't find 211.
Here is script 2020 (SCUMM syntax provided by nutcracker):
{{{
script 2020 { ; LSCR LECF_0001\LFLF_0023\ROOM\LSCR_2020
stop-script 2000
stop-script 2001
stop-script 129
stop-script 130
class-of 179 is 160
state-of 211 is 0
class-of 211 is 160
cut-scene (2)
override &[00000150]
camera-pan-to 100
wait-for-camera
actor 3 \
costume 71 \
ignore-boxes \
scale 255 \
always-zclip 0
actor 3 \
talk-animation 4 5
actor 3 \
special-draw 1
actor 3 \
direction 180
put-actor 3 at 477,0 in-room 23
do-animation 3 9
break-here 19 times
[00000150]:
if !( s_selectedActor ) jump &[00000415]
override off
print-line \
" "
stop-script 131
stop-script 132
stop-script 133
stop-script 134
stop-script 135
stop-script 136
do-animation 3 255
do-animation 3 3
stop-script 32
if ( class-of 5 is 136 ) {
stop-script 143
stop-script 144
stop-script 145
stop-script 146
stop-script 147
stop-script 148
if ( (actor-room 5) == V.10 ) {
do-animation 5 255
do-animation 5 3
}
stop-script 34
}
if ( class-of 4 is 136 ) {
stop-script 137
stop-script 138
stop-script 139
stop-script 140
stop-script 141
stop-script 142
if ( (actor-room 4) == V.10 ) {
do-animation 4 255
do-animation 4 3
}
stop-script 33
}
actor 3 \
costume 71 \
ignore-boxes \
scale 255 \
always-zclip 0
actor 3 \
talk-animation 4 5
actor 3 \
special-draw 1
actor 3 \
direction 180
put-actor 3 at 477,0 in-room 23
camera-at 100
jump &[00000416]
[00000415]:
override off
[00000416]:
do-animation 3 7
end-cut-scene
start-script 18 ( 153 )
start-script 73 ( 153 )
say-line 3 "/NEXUS.117/Now I've got the free end of the
wire."
class-of 179 is 160
V.233 = 2004
wait-for-message
end-script
}
}}}
And here is one thing we are currently missing from the override functions
from the disasm, but which doesn't seem to fix anything:
{{{
void ScummEngine::beginOverride() {
const int idx = vm.cutSceneStackPointer;
assert(0 <= idx && idx < kMaxCutsceneNum);
+ if (_game.version >= 5 && !vm.cutScenePtr[idx]) {
+ ++vm.slot[_currentScript].cutsceneOverride;
+ }
vm.cutScenePtr[idx] = _scriptPointer - _scriptOrgPointer;
vm.cutSceneScript[idx] = _currentScript;
// Skip the jump instruction following the override instruction
// (the jump is responsible for "skipping" cutscenes, and the
reason
// why we record the current script position in vm.cutScenePtr).
fetchScriptByte();
fetchScriptWord();
if (_game.version >= 5)
VAR(VAR_OVERRIDE) = 0;
}
void ScummEngine::endOverride() {
const int idx = vm.cutSceneStackPointer;
assert(0 <= idx && idx < kMaxCutsceneNum);
+ if (_game.version >= 5 && vm.cutScenePtr[idx]) {
+ --vm.slot[_currentScript].cutsceneOverride;
+ }
vm.cutScenePtr[idx] = 0;
vm.cutSceneScript[idx] = 0;
if (_game.version >= 4)
VAR(VAR_OVERRIDE) = 0;
}
}}}
Not sure if I'll continue tackling this for the time being, hence my
research being available above for whoever needs it.
--
Ticket URL: <https://bugs.scummvm.org/ticket/15047#comment:3>
ScummVM :: Bugs <https://bugs.scummvm.org>
ScummVM
More information about the Scummvm-tracker
mailing list