Date: Sun, 20 Apr 1997 09:51:08 -0500 (CDT) From: Andrew Deren To: Helix cc: djgpp AT delorie DOT com Subject: Re: Allegro: Problem? HELP In-Reply-To: <01bc4d11$eb03aa40$LocalHost@stachowiak> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk It is really simple. try something like this: #include #include "helix.h" //you need to include this one only if you are using the names from the data file. main() { *Initialize allegro * DATAFILE *my_data; //to play a midi use play_midi((MIDI*)my_data[MY_SONG_FROM_DATA_FILE].dat, FALSE); //the other way to do this, you could create a pointer to MIDI MIDI *my_song = (MIDI*)my_data[MY_SONG_FROM_DATA_FILE].dat; play_midi(my_song, FALSE); you do the same stuff with samples and bitmaps play_sample((SAMPLE*)my_data[MY_SAMPLE].dat, 200, 125, 1000, FALSE); draw_sprite(screen, (BITMAP*)my_data[MY_BITMAP].dat, 10, 10); On 19 Apr 1997, Helix wrote: > > Basically I used the grabber utility to create a data file named, helix.dat > inside the data file I inserted a midi file named INTRO and I created a > header file name helix.h. > > What code do I insert into the actual source file (helix.c) to make it play > the midi file in the data file? > > What code would I use to in the source file to display a bitmap or play a > wav file? > > I've read the docs on the Grabber utility but don't understand them very > well. > > anyways, THANKS in advance. >