bmp loader

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!
Post Reply
mossy1991
Newbie
Posts: 2
Joined: Sun Jan 16, 2005 12:26 pm

bmp loader

Post by mossy1991 »

hey everyone
does nybody know a .bmp image loader that is not 20 lines of code long?
i was just wondering as i have bin playing with Qb 4 a while and i'm thinking of making a rpg or other kind of game
User avatar
{Nathan}
Veteran
Posts: 1169
Joined: Thu Aug 19, 2004 6:08 pm
Location: The wetlands of central Ohio, USA
Contact:

Post by {Nathan} »

Uhh... just use freebasic or PP256. If you REALLY want to, convert your .bmps into bsave/bloads, loading bmps for games is WAY to slow :wink:
Image
User avatar
Pete
Site Admin
Posts: 887
Joined: Sun Dec 07, 2003 9:10 pm
Location: Candor, NY
Contact:

Post by Pete »

After you make your images as BMPs or GIFs or whatever, you should just convert them to BSAVEs with a small image loader program. Just load the BMP image, then GET it and BSAVE it. Then you can load it in your game quite easily.
Nodtveidt
Veteran
Posts: 826
Joined: Sun Jul 25, 2004 4:24 am
Location: Quebradillas, PR
Contact:

Post by Nodtveidt »

BMP loaders are more complicated than a couple of lines of code, so expect to see about 20 or so lines of code for a BMP loader. :D You gotta read the header, interpret certain parts of it, load the raster lines one by one, checking for padding bits, etc. But that's nothing...try a JPG loader some day if you think 20 lines are bad. :D
Post Reply