diff options
author | Max Horn | 2003-05-17 01:01:05 +0000 |
---|---|---|
committer | Max Horn | 2003-05-17 01:01:05 +0000 |
commit | 3a145f50e720a0fe6120b071ae37c15c2dff90d3 (patch) | |
tree | 1ba335fbeff25fdee36cd06911b64360cff35623 /scumm/script_v2.cpp | |
parent | 56d6443b1956151df2fb6e815221deb4d348c85b (diff) | |
download | scummvm-rg350-3a145f50e720a0fe6120b071ae37c15c2dff90d3.tar.gz scummvm-rg350-3a145f50e720a0fe6120b071ae37c15c2dff90d3.tar.bz2 scummvm-rg350-3a145f50e720a0fe6120b071ae37c15c2dff90d3.zip |
disable assert in o2_putActor for now (is triggered in Zak intro); cleanup
svn-id: r7592
Diffstat (limited to 'scumm/script_v2.cpp')
-rw-r--r-- | scumm/script_v2.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 46964052d1..3bd005b13d 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -403,8 +403,6 @@ void Scumm_v2::decodeParseString() { } *ptr = 0; - printf("TODO: Scumm_v2::decodeParseString(\"%s\") from %d\n", buffer, vm.slot[_currentScript].number); - // For now, always use textSlot 0. Not sure if there are any situations where we might // need to us another one? int textSlot = 0; @@ -928,14 +926,20 @@ void Scumm_v2::o2_walkActorTo() { } void Scumm_v2::o2_putActor() { + int act = getVarOrDirectByte(0x80); int x, y; Actor *a; - a = derefActorSafe(getVarOrDirectByte(0x80), "o2_putActor"); + a = derefActorSafe(act, "o2_putActor"); x = getVarOrDirectByte(0x40) * 8; y = getVarOrDirectByte(0x20) * 2; - assert(a); + if (!a) { + // FIXME - this shouldn't be necessary but for now works around problems + // in the Zak intro. + warning("o2_putActor: actor %d not found", act); + return; + } a->putActor(x, y, a->room); } @@ -945,8 +949,7 @@ void Scumm_v2::o2_startScript() { } void Scumm_v2::o2_panCameraTo() { - panCameraTo(getVarOrDirectByte(0x80) * 8, 0); // FIXME: I'm pretty sure we actually pan - // by strip, not X/Y, here. Hence *8 + panCameraTo(getVarOrDirectByte(0x80) * 8, 0); } void Scumm_v2::o2_walkActorToObject() { @@ -954,6 +957,7 @@ void Scumm_v2::o2_walkActorToObject() { Actor *a; a = derefActorSafe(getVarOrDirectByte(0x80), "o2_walkActorToObject"); + assert(a); obj = getVarOrDirectByte(0x40); if (whereIsObject(obj) != WIO_NOT_FOUND) { int x, y, dir; |