#1636 closed defect (fixed)
MIVGA: Mug o' grog
Reported by: | SF/chrilith | Owned by: | eriktorbjorn |
---|---|---|---|
Priority: | normal | Component: | Engine: SCUMM |
Version: | Keywords: | script | |
Cc: | Game: | Monkey Island 1 |
Description
Someone report me that there is a problem in Monkey Island VGA after using the mug with the barrel in the scummbar.
Mug object names :
- mug o' grog - melting mug - mug near death - pewter wad
then crash with error : ERROR: (35: 65: 0xCE): Invalid actor 117 in o5_putActorInRoom
Seems to occured only where you are out of the scummbar (mug simply disapear if you stay in).
Tested on PalmOS with snapshot 2004-04-20 and 2004- 05-25 and Windows snapshot 2004-05-23
Savegame attached.
Ticket imported from: #960674. Ticket imported from: bugs/1636.
Attachments (2)
Change History (10)
by , 20 years ago
Attachment: | monkeyvga.s02 added |
---|
comment:1 by , 20 years ago
comment:2 by , 20 years ago
Fingolfin, what's your take on this? It appears to be one of the regressions you warned might happen when you changed the object naming code, and obviously we'll have to make sure the script pointer is correctly updated like it used to be.
However, I can't even see why we call getOBCDFromObject() to begin with. It doesn't appear to actually do anything other than returning or, in this case, failing to return a pointer, and as far as I can see we don't even use it afterwards. Could that part of the code simply be removed, or am I missing something obvious?
comment:3 by , 20 years ago
Owner: | set to |
---|
comment:5 by , 20 years ago
Summary: | Mug o' grog → MIVGA: Mug o' grog |
---|
comment:6 by , 20 years ago
Looks fine to me. Feel free and apply it, erik (and then take over & close this bug report :-)
comment:8 by , 20 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
Status: | new → closed |
Hmm... I can understand part of what's happening. Here's the end of script-65:
[00A7] (D4) setObjectName(Local[0],"pewter wad") [00B5] (2E) delay(300) [00B9] (A9) setOwnerOf(Local[0],0) [00BD] (A9) setOwnerOf(Local[0],15) [00C1] (D4) setObjectName(Local[0],"mug") [00C8] (0C) unlockScript(66) [00CB] (A0) stopObjectCode() END
However, here's the end of the debug output:
getResourceAddress(Script,65) == 01653244 Script 65, offset 0xc8: [D4] o5_setObjectName() readvar(16384) Can't find OBCD to rename object 375 Script 65, offset 0xcb: [6D] o5_putActorInRoom() readvar(103) (41:65:0xCE): Invalid actor 117 in o5_putActorInRoom
There shouldn't be any putActorInRoom opcode after setObjectName. However, since getOBCDFromObject() failed we won't ever reach loadPtrToResource(), so the script pointer won't be properly updated.
Notice how putActorInRoom is opcode 0x6D. That's not an opcode in this case - it's the "m" in "mug". Ouch!