delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/08/23:36:20

From: <@elp.rr.com>
Newsgroups: comp.os.msdos.djgpp
References: <7bd1t7$es9 AT chronicle DOT concentric DOT net>
Subject: Re: Distroy_Bitmap
Lines: 32
X-Newsreader: Microsoft Outlook Express 4.72.3110.1
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
Message-ID: <S41F2.5561$UL.233@newsr1.elp.rr.com>
Date: Mon, 8 Mar 1999 20:43:59 -0700
NNTP-Posting-Host: 24.92.106.12
X-Trace: newsr1.elp.rr.com 920952242 24.92.106.12 (Mon, 08 Mar 1999 21:04:02 MDT)
NNTP-Posting-Date: Mon, 08 Mar 1999 21:04:02 MDT
Organization: Paragon Cable, El Paso, TX
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Paradox wrote in message <7bd1t7$es9 AT chronicle DOT concentric DOT net>...
>I'm having a problem with destroy_bitmap(). The compiler seems to not like
>it when I do the following
>
>void dest_proj(void) {
>  int x;
>  for(x = 0; x <MAXPROJ; x++) {
>    if(player_ship.PROJ[x].proj_x > 575) {
>      destroy_bitmap(player_ship.PROJ[x].proj);
>      player_ship.PROJ[x].alive = 0;
>    }
>  }
>}
>
>When the projectile exceeds 575, the program barfs and I get a GPF error.
>Proj is a bitmap of sprite_data[BASIC_BULLET].dat. FYI, 575 is the end of
>the screen, and I want to destroy the bitmap as it leaves the screen to
>preserve memory.
>
>Thanks
>Paradox.
>
>
>
>
try type casting
eg.
destory_bitmap( (BITMAP *) player_ship.PROJ[x].proj);



- Raw text -


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