delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/06/25/17:56:12

From: "Michael Stewart" <mike AT reggin DOT freeserve DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Dynamically creating BITMAP arrays with C and Allegro.
Date: Fri, 25 Jun 1999 14:28:07 +0100
Organization: (Posted via) Netcom Internet Ltd.
Message-ID: <7l0047$51u$1@taliesin.netcom.net.uk>
References: <37737B76 DOT E907AD88 AT yahoo DOT com>
NNTP-Posting-Host: hgty.capgemini.co.uk
X-Trace: taliesin.netcom.net.uk 930317255 5182 194.42.240.2 (25 Jun 1999 13:27:35 GMT)
X-Complaints-To: abuse AT corp DOT netcom DOT net DOT uk
NNTP-Posting-Date: 25 Jun 1999 13:27:35 GMT
X-Newsreader: Microsoft Outlook Express 4.72.3155.0
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3155.0
Lines: 24
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Dave Peterson wrote in message <37737B76 DOT E907AD88 AT yahoo DOT com>...
>I am attempting to dynamically create an array of BITMAPs that can have
>its size set during execution of the program and I am confused on how
>exactly this should be done.
>
>I initialize it like this:
>BITMAP *bitmapArray;
>bitmapArray=(BITMAP *) malloc(3*sizeof(BITMAP));
>
>This step seems to work fine.
>
>I load in the data to the array like this:
>bitmapArray=load_bitmap("pe.bmp",*pal);

Although I don't use Allegro you seem to be missing the index to the
structure

bitmapArray[0]=load_bitmap("pe.bmp",*pal);
bitmapArray[1]=load_bitmap("pe2.bmp",*pal);
bitmapArray[2]=load_bitmap("pe3.bmp",*pal);




- Raw text -


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