delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/20/13:06:29

Date: Sat, 16 Aug 1997 22:11:20 -0600
From: Mitchell Spector <spector AT EnchantedLearning DOT com>
Subject: Re: Allegro question
Newsgroups: comp.os.msdos.djgpp
Message-ID: <871786019.2619@dejanews.com>
Reply-To: spector AT EnchantedLearning DOT com
Organization: Enchanted Learning Software
References: <01bca2a6$080ef4c0$a69caec7 AT windows95>
Lines: 34
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

In article <01bca2a6$080ef4c0$a69caec7 AT windows95>,
  "Zoma" <Zoma AT sprynet DOT com> wrote:
>
> I use Allegro, and think it is great, but there is a strange "error?" that
> occurs with its graphics routines.  I am using Mode 13h and whenever I
> clear the screen, a border forms around the edges of the screen in the 0
> color.  Why does this happen, and how can I prevent it from happening?  I
> don't use black as my zero color, so this is beginning to get annoying.
> Thanks,
>
> Zoma AT sprynet DOT com

Try this code.  (I haven't tested this in mode 13h.)

 __dpmi_regs r;

 r.h.ah = 0x10;
 r.h.al = 1;
 r.h.bh = color_index;
 /* index in your palette for black, or whatever border color you want */

 __dpmi_int(0x10, &r);

(You'll need to do this whenever you change which index is black.)

Mitchell
--
Mitchell Spector, Enchanted Learning Software
E-mail: spector AT EnchantedLearning DOT com
Award-winning web site for children (Little Explorers, Zoom Dinosaurs,
Zoom Birds, Rebus Rhymes, and more): http://www.EnchantedLearning.com

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

- Raw text -


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