Mail Archives: djgpp/1997/10/30/09:46:04
Mark Phillips <bigphil AT solutions DOT mb DOT ca> wrote
> in VGA mode are there only 256 colors you could possibly have, i.e.
> would my routine:
>
If you mean the VGA mode 13h (320x200), there's just 256 colors.
I don't know about others (I only use 13h).
> makecol() or anything?
I've never heard about that-
> also, in the demo game that comes with allegro, they put all their
> midis, wavs, images etc in a .dat file. how would i do that?
Datafiles are pretty easy to use and make. With Allegro there comes
a program named GRABBER.EXE wich you can find in your
Allegro\tools- directory. Run it and start creating your own datafile.
That's not difficult either: just press the right mouse-button on the
big box, where is <root> at the top and select from the popup-menu
NEW and the type of thing (ex. bitmap or midi) you want to add.
Then you have to name it. The name appears in the box. After that
you can grab a sound to it pressing the right mouse-button on the
name and by selecting GRAB. Bitmaps are a bit different:
before you can grab a bitmap you've got to load a PCX or BMP- file
in using the Get Bitmap- command in the FILE-menu. Then you can
grab the same way as the other stuff. More info you can find in
the Allegro documentation. Using datafiles in your programs is well
explained there too, so I think you can find that there. If you can't,
ask again. Datafiles are great, enjoy them!
> and also
> how would i retrieve the info from the file with my program?
I'm sorry but I'm not sure if understood this question right, but
here's what I think. So, do you mean the info about the datafile?
If so, you must in the GRABBER-program add at the line HEADER
at the top, a name for a header, for example test.h. When you
save the datafile, grabber also makes a header wich includes the
names (the names you gave them) of the stuff in the datafile as
#defines. You can use those names in your program to present
the bitmaps and sounds etc. in the datafile. If this wasn't what you
asked, I'm sorry. But be brave and ask again.
--
----------------------------------------------------------------------------
Jarkko Laine
e-mail: Jarkko DOT Laine AT ks DOT iwn DOT fi
WWW: http://www.geocities.com/SiliconValley/Peaks/7734/
----------------------------------------------------------------------------
-
- Raw text -