The Dink Network

Reply to Re: Music doesn't loop.

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
April 22nd 2010, 01:04 AM
spike.gif
I do remember a fair amount of silent portions in the game... Some of the music (the classical pieces, mostly) last a while, but there are also many short songs in the game. Setting the music to loop isn't a lot of trouble, really, but it could get complicated as you need to edit one of the scripts that the game uses.

1. Open "Dink Smallwood\develop\source.zip"
2. Open "savebot.c" with notepad
3. Add the command "loopmidi(1);" in the main procedure so that the beginning of the script looks like this:

void main( void )
{
loopmidi(1);
sp_seq(&current_sprite, 449);
sp_sound(&current_sprite, 34);
sp_brain(&current_sprite, 6);
sp_hitpoints(&current_sprite, 0);
}


4. Save the script as "savebot.c" in the "Dink Smallwood\dink\story\" folder (not in source.zip). Also make sure it's actually named "savebot.c", not "savebot.c.txt".

That's it.

Adding the command in the savebot script makes sure the music will still loop when you load a previously saved game (otherwise loopmidi() will reset to 0, I think). In the beginning of the game, midis will only start looping once you reach the first savebot, but that should be a non-issue (you could also add the loopmidi(1); command to "start.c", for example, if you really wanted the title song to loop too).