Mail Archives: djgpp/2002/12/04/05:15:09
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 -