id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,game 8089,SAM: do_command(256) implementation,SF/jamieson630,SF/ender,"{{{#!Markdown This patch implements the Sam & Max interpretation of do\_command\(256\). This command queries for the last encountered marker ID, as set by SysEx code 0. This command is used mostly during the opening credits to cue each page of credits to the music, thus causing the credits to span the music in full. It is also used by the credits to wait until the end of the music before switching rooms to the office scene. SysEx code 0 implements triggered commands specified by do\_command\(17\), ImSetTrigger. This modification also causes the SysEx response to store its marker ID \*if\* no triggered event is already cued. This business of using the marker ID to identify how far the music has progressed is used, to my knoweldge, only during the opening credits. I'm not sure if it's appropriate to be storing the marker ID in the same slot as used by ImSetTrigger \(since if both are used one or the other won't work\), but I've tested most of the stops in Sam & Max \(the more musically complicated ones, anyway\), and I haven't found any case where this actually causes unexpected behavior. Finally, this patch makes a small change to do\_command\(14\), by preventing a volume fade from occurring if the time-to-fade is 0. I only did this because there is a deferred command showing up outside the Ball of Twine that attempts to do a volume fade, but with invalid parameters. The result is that the music gets faded to 0 instantly, and is never heard from again. Until this patch, the tracks weren't jumping around properly at all, and this problem never had a chance to manifest itself. I can't tell whether do\_command\(14\) or the deferred command mechanism is not implemented properly. I'll be taking a closer look at that. In the meantime, this change does not affect any other observed occurrence of do\_command\(14\). This patch completes the array of fixes needed to make the opening cutscene, opening credits, and seamless transition to the office scene work perfectly. Knock on wood.... }}} {{{#!div style=""font-size: 75%"" Ticket imported from: !#622386. Ticket imported from: patches/194. }}}",patch,closed,normal,Engine: SCUMM,,,,,Sam and Max