Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
allegro's grabber
#1
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....
Reply
#2
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
b]Hard Rock[/b]
[The Stars Dev Company] [Metal Qb flopped] [The Terror]
Stop Double Posts!
Whats better? HTML or Variables?
Reply
#3
thanx, i got it working. it makes it so much neater having all my graphics in 1 or 2 files!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)