View Single Post
Old 07-25-2009, 05:04 AM   #101
Join Date: Sep 2005
Posts: 72
OK, I'll leave it as is then.

You have to modify the splitter's output if the print command has position parameters:

Here's the original:
(14) print(255,[Pos(240,8),Text("--LeChuck!^255^3GRRRRRRRRR!^255^3Arf, oo
f-oof, Monkey Island^15!^255^3*sniff* *sniff*")]);
(AE) WaitForMessage()

After split:
(14) print(255,[Pos(240,8),Text("--LeChuck!")]);
(AE) WaitForMessage()
(14) print(255,[Text("GRRRRRRRRR!")]);
(AE) WaitForMessage()
(14) print(255,[Text("Arf, oof-oof, Monkey Island^15!")]);
(AE) WaitForMessage()
(14) print(255,[Text("*sniff* *sniff*")]);
(AE) WaitForMessage()

EDIT: Regarding completely new music where there wasn't any before:
For additional music, the SE added background sounds to certain scenes. We could add this to the CD version by creating new SOUN starting at 099_LFLF_icons\009_SOUN_130.dmp. SOUN works as follows:

Values from offsets 0-23 (0x00-0x17) are all the same, so just copy data from an existing SOUN.
At offset 24 (0x18) track number in hex format (for new music not in original start with track decimal 24 or hex 18).
At offset 25 (0x19) seems to be loop, opening uses 01, scummbar uses ff.
The six remaining values 26-31 (0x1a-0x1f) are all 00 if you want the music to start at the beginning of the track.

An example of music not starting at the beginning:
The scene at the lookout following the intro uses the same music as the opening, but starts at position 1 min 36 sec. Hex values are 01 23 30 00 00 00. 01 23 30 is equivalent to 1 35 48 in decimal.

We would start the music by using startSound(130) or whatever number our SOUN is. To avoid problems we could use
VAR_RESULT = isSoundRunning(130)
if (!VAR_RESULT) {
in the ENCD of the room.

Stopping the music is a bit more difficult, as you have to add a stopSound(130) for every script in the room that leaves the room. A possible problem I can see is on the dock with Guybrush and Elaine when their theme plays on the dock: it should be fine if we stop the dock ambient sound before the Guybrush and Elain theme plays.

Last edited by cocomonk22; 04-03-2010 at 10:59 PM.
cocomonk22 is offline   you may: quote & reply,