Posts: 142
Threads: 33
Joined: Dec 2001
Sup ppl. im trying my hand at a small c++ game which uses allegro. ive seen that the grabber util can have a whole bunch of bitmaps in one file (like pp256, yay) which would help me. ive glanced through the documents on it, but was still unsure bout how to use it. how do you load the pics from the dat file? i imagine it will use an array tho....
Posts: 530
Threads: 17
Joined: May 2002
Lets say that you have a image in slot one of the datafile, you would do
Code:
BITMAP *bmp = datafile[0].dat
OR in C++ youd need to cast so:
Code:
BITMAP *bmp = (BITMAP *)datafile[0].dat
The data file can also create an include header so you can do:
Code:
#include "datafileheader.h"
BITMAP *bmp = datafile[MY_IMAGE].dat
Posts: 142
Threads: 33
Joined: Dec 2001
thanx, i got it working. it makes it so much neater having all my graphics in 1 or 2 files!