home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Hack-Phreak Scene Programs
/
cleanhpvac.zip
/
cleanhpvac
/
BMP2BPI.ZIP
/
bmp2bpi.txt
< prev
next >
Wrap
Internet Message Format
|
1994-12-17
|
1KB
From: springer@dellgate.us.dell.com (David Springer)
Newsgroups: rec.games.programmer
Subject: Re: Displaying Windows BMP files in DOS
Date: 1 Dec 1994 01:23:59 GMT
Maybe this'll help. I never intended anyone else to use it so don't
give me any crap about the comments (or lack thereof). I do all my
graphics for 640x480x16 mode in Windows (I'm planning to port the
stuff sometime) but display it now under DOS. The BMP format is
really inefficient (packed pixel) so I convert it with this program
into 4 separate plane images. I just made some very simple images and
then figured out what the BMP format was for the width and height,
etc. I didn't do any more than I needed. I think you can find a full
description of BMP format by ftp'ing to teeri.oulu.fi and look in the
games programming section.
Oh yeah, now that I look at it there's a command line option
designating a "transparent" color. This was so I can have irregularly
shaped objects drawn over a background that shows through where I want
it. You basically get to pick one color that you don't use for
anything else in that particular drawing and specifiy it as
transparent. This program will create a fifth bit plane and turn on
the pixel in that plane corresponding to that color. It's then a
simple matter for the display routine in your game to use data from
the fifth plane to determine where to allow the original pixel to
shine through.