From: "Damian Yerrick" Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro datafile load command positioning Date: Sun, 3 Oct 1999 00:25:56 -0500 Organization: Rose-Hulman Institute of Technology Lines: 45 Message-ID: <7t6pgq$496$1@solomon.cs.rose-hulman.edu> References: <7t33md$mnj$3 AT ctb-nnrp2 DOT saix DOT net> NNTP-Posting-Host: yerricde.laptop.rose-hulman.edu X-Trace: solomon.cs.rose-hulman.edu 938928474 4390 137.112.205.146 (3 Oct 1999 05:27:54 GMT) X-Complaints-To: news AT cs DOT rose-hulman DOT edu NNTP-Posting-Date: 3 Oct 1999 05:27:54 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MIMEOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Stefan Viljoen wrote in message news:7t33md$mnj$3 AT ctb-nnrp2 DOT saix DOT net... > Hi! > > Encountered a nice little messy tick today - it seems that if you use the > VESA1 driver in set_gfx_mode for Allegro, and use the 640x480x16 bit color > depth, and want to use RLE sprites, DO NOT load the datafile before > attempting to set the gfx mode! What I did was > > allegro_init(); > install_*(); > foo = load_datafile("foo.dat"); > Then I attempt to display an RLE sprite in the DATAFILE - causes > crash of whole system (95 goes down too) with no traceback Are you trying to draw the RLE sprite to the text screen? Maybe that's it. RLE sprites are designed to be drawn to graphics screens. > It works however if you load the datafile AFTER the call to set_gfx_mode - > > Why?! Setting the graphics mode tells Allegro how to convert RLE sprites to the format that the video card expects. Before set_gfx_mode(), the system is in 8-bit color mode. > IMHO this does not make sense - you just load the datafile, > that's all it is - data - what does the setting or not of the gfx mode > have to with it all? load_datafile() also reformats the bitmaps to the card's favorite pixel format. > It very definitely crashes on my system if I load the datafile before > setting the mode, and then try to display the RLE sprite after setting gfx > mode. If I set mode however, and then load the file, it works fine. Hope this helps! Damian Yerrick http://come.to/yerrick