From: gregorio AT jet DOT es (Grzegorz Adam Hankiewicz) Newsgroups: comp.os.msdos.djgpp Subject: Allegro Blitting Date: Fri, 07 Nov 1997 15:27:24 GMT Organization: Gogosoftware Lines: 59 Message-ID: <34632f46.1031877@news.jet.es> References: <3462978E DOT 5127 AT voyageur DOT ca> NNTP-Posting-Host: infon948.jet.es To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk On Thu, 06 Nov 1997 22:22:39 -0600, "J.E." wrote: >I am considering using a 320x10000 bitmap as a scrolling background for >a top down space shooter which I will write using Allegro. Basically, >I'd have the entire bitmap in memory, and would blit a 200 pixel tall >section of the bitmap to the screen each frame. The benefit that I can >see to this is that the background can be hand drawn or scanned for >great detail. However, is this really efficient, or would it be a >ridiculous way to make a scroller? I don't think you would profit very much from this. Count 320x10000 and you will get that for just the background you need 3 megs of memory, which still leaves around 10 free megs in a typical 16 megs W95 system, but depending on how big/complex are the animations of the enemies. Then, scanning a space picture? Don't know of any (not industrial) scanner which scans a 10000 pixels high and only 320 wide image. You can get this only if your picture is like 2 or 3 cm wide and use the max optical resolution of the scanner. If you have A4 size pictures to scan, you should get like a 320x150 picture, so you would end up joining the screens together, and to do that, it's easier to make a kind of grid and blit a specific region every time to screen. First you compose the image in a memory buffer, then blit to screen. >Also, is it possible to load single >objects at a time from an Allegro data-file (so that I could have all >the backgrounds in one data-file)? Yes. Allegro's docs explain this in the section "datafile routines". Look for a "load_datafile_object()" routine. >P.S. Allegro plays samples for me fine under Win95, but is silent under >DOS. Why?? Thanks again 8-) It probably means that you didn't set up the environment sound blaster variable, or that somehow, your sound card initializes itself by default with zero volume, and then W95 chages this. Probably it's the first thing. Look at your autoexec.bat file for a line like: SET BLASTER=A220 I5 D1 H5 P330 E620 That shows just my own configuration. If you go to the W95 control panel, double-click on the system icon. Then choose the second "page" (<-- was that the correct word?) which shows installed devices. Expand the "sound drivers" section and double-click on your sound card. Then go to the resources "page" (huh, can't figure out what's that in english...) and copy the values from there. A is the lowest Input/output address P is the middel I/O address and E is the highest one. D means low direct memory access H means high direct memory access and I means probably "interruption?" (keep in mind I am translating from spanish...) - G.A. Hankiewicz - ICQ 255289 - gregorio AT jet DOT es http://web.jet.es/gregorio - Gogosoftware http://web.jet.es/gregorio/gogosoftware