delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/10/11:01:35

From: cwebb DOT nospam AT ctos DOT com (Julia/Christopher Webb)
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro Datafile --what am I doing wrong?
Date: Tue, 09 Dec 1997 22:35:09 GMT
Message-ID: <348dc5c3.677781@news.weldlink.com>
Lines: 26
NNTP-Posting-Host: 204.144.249.2
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm attempting to use a data file created with the Allegro
Grabber.exe.  Grabber shows the sixteen 15bit .BMP files, and it
created the .H file.  However, when I try to access the images, I am
receiving a NULL pointer.

I am loading the data file in a constructor:

imgSource=load_datafile("striker.dat");

Later, I am assigning a BITMAP* to the data portion of the datafile.
inf.idx[] is initialized with an array of values from the #defines
included in the header file Grabber created.

bmp=(BITMAP*) imgSource[inf.idx[i]].dat;

which, IIRC, was essentially the format used in the DEMO.C with
RLE_SPRITEs.

When I inspect bmp, it has the value NULL.  Is there something I
overlooked?  The load_datafile is called before the graphics mode is
set -- I'm using a 640x480x15bit mode.  Is there something I
overlooked, or should I have set the mode first?

Any help is appreciated.
Christopher Webb

scriven AT CS DOT ColoState DOT edu         |
 /  \ / /  //_ //_  | mailto:scriven AT VIS DOT ColoState DOT edu        |
(_/\_(_/  (___(___) | http://www.vis.colostate.edu/~scriven/  |

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019