delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/12/04/05:15:09

From: eplmst AT lu DOT erisoft DOT se (Martin Stromberg)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: DJGPP Allegro sprite troubles
Date: 4 Dec 2002 09:48:50 GMT
Organization: Ericsson Erisoft AB, Sweden
Lines: 39
Message-ID: <askj22$qt$1@antares.lu.erisoft.se>
References: <3DED0701 DOT 5040209 AT rubyridge DOT com>
NNTP-Posting-Host: lws256.lu.erisoft.se
X-Newsreader: TIN [version 1.2 PL2]
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Legion (kilroy AT rubyridge DOT com) wrote:
: ------------------------ BEGIN CODE HERE -------------------------------


: // I've commented this as well as I can... Thanks for ANY help or
: // insights!

: #include <allegro.h>
: #include <malloc.h>

: int loadsprites(char *file, BITMAP **bitmaps, PALETTE pal,
: 		int numsprites, int rows)
: {
:     int count = 0;
:     int blitx = 0;
:     int blity = 0;
:     BITMAP *orig = create_bitmap((numsprites * 32), (rows * 32));
:     // Use any size image you want, just change the above initializer
:     // to reflect the new image's size, it doesn't matter, so long as
:     // it's no less than 384x32 (due to the number of images I'm asking
:     // it to grab)
:     clear_bitmap(orig);
:     // clear the bitmap (I added this at the last build, hoping maybe
:     // it'd help. It didn't.)

:     if ( !bitmaps[0] )
:     {
:     	return 1;
:     }

:     orig = load_bitmap(file, pal);

I'm not an expert on Allegro, but this looks weird. First you "BITMAP
*orig = create_bitmap()" then you just overwrite it here.


Right,

						MartinS

- Raw text -


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