delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/06/02/22:45:16

From: "Robert Boles" <zingen AT prodigy DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Best way to destroy bitmaps, font in Allegro?
Date: Fri, 2 Jun 2000 14:45:50 -0400
Organization: Prodigy Internet http://www.prodigy.com
Lines: 31
Message-ID: <8h8va3$2ps6$1@newssvr04-int.news.prodigy.com>
NNTP-Posting-Host: lanra020-0247.splitrock.net
X-Trace: newssvr04-int.news.prodigy.com 959971459 3871167 64.196.128.247 (2 Jun 2000 18:44:19 GMT)
X-Complaints-To: abuse AT prodigy DOT net
NNTP-Posting-Date: 2 Jun 2000 18:44:19 GMT
X-Newsreader: Microsoft Outlook Express 5.00.2919.6600
X-MSMail-Priority: Normal
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hello,
Still working on my OS. Man, OS are harder then they look.

I have a basic question. What is the best way to destroy bitmaps and fonts
in Allegro.
I have to make sure that the bitmap/font is destroyed, but I am not sure if
it exists. They are created/destroyed by apps, not the OS.

I have the following code.

// Simplified
BITMAP *B;
FONT *F;

// B may or may not be created
if (!B) destroy_bitmap(B);
if (!F) destroy_font(F);

Note: The above bitmaps/fonts may not have had a create_bitmap/ font
procedure applied to them.

Does this destroy the bitmap/font if it is created, and skip if if it isn't.
I have been doing some testing, and I am not sure, especially with the font.

I would like to use simple code like above if at all possible, I don't want
to do any other tracking of bitmaps/fonts, if I don't have to.

Any help would be great.



- Raw text -


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