From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Are THESE two statements EQUAL? Organization: Pin Eight Software http://pineight.8m.com/ Message-ID: References: <5t7klskbj285civf9serk693otnho6t5j0 AT 4ax DOT com> <7qmkls0k46jupmhklc5sqesf999hn7vmjl AT 4ax DOT com> <8F61A359BASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <8F626A568ASINANUNUR AT 132 DOT 236 DOT 56 DOT 8> <83u2ec9mxn DOT fsf AT mercury DOT bitbucket> <9j2ols0u32mparptuk04fid732pc0o2ipv AT 4ax DOT com> X-Newsreader: Forte Agent 1.7/32.534 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 55 X-Trace: +4f59/5k7S9KbuSa1/UqeGhHRmtH/Vxmg1q7sK9/Wiq/WJhlJW3HTLXTSDMVvFOi20y9iEjvDLOT!xEa29Igtlk4RBOShg8UuP5qTSs/4lSr/YIksW+Al83bWCqrOyX8MKSfmCAk28HTAs3adjQcMj9Ro!7RLQ X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Fri, 30 Jun 2000 20:31:50 GMT Distribution: world Date: Fri, 30 Jun 2000 20:31:50 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Thu, 29 Jun 2000 22:48:11 -0400, Radical NetSurfer wrote: >This whole entire discussion was started, when I kept getting >SEGFAULTS (what I called "core-dumps") > >What my projected needed (needs) is to be able to dynamically, >on-the-fly, create an ARRAY of BITMAP*'s and an equal number >of PALETTE's.... If they're in an equal number, why not just make a new class? /********** 8< **********/ typedef struct PalBmp { PALETTE pal; /* 256 RGB[A] records */ BITMAP *bmp; /* } PalBmp *images; void AllocImages(int nImages) { images = malloc(sizeof(PalBmp) * nImages); } /********** 8< **********/ But you still can't display more than one 256-color palette on a 256-color screen. >THEN to properly reference images[123].bmp images[123].pal >and when done, of course, a convenient way to destroy them. free(images); images = NULL; >Fortunately, for 1600x1200 screen modes, this comes to less >than 4000 bitmaps (most of which are small, but all true color). If they're truecolor, you don't need PALETTEs at all! In that case, you can just make an array of BITMAP *. -- Damian Yerrick "I refuse to listen to those who refuse to listen to reason." See the whole sig: http://www.rose-hulman.edu/~yerricde/sig.html This is McAfee VirusScan. Add these two lines to your signature to prevent the spread of signature viruses. http://www.mcafee.com/