www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/15/14:15:35

From: Alastair Duncan <alastairduncan AT argonet DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Allegro, sprite_draw and masked_blit
Date: Wed, 15 Apr 1998 16:42:07 +0000 (GMT)
Organization: None
Lines: 24
Message-ID: <4837423b4ealastairduncan@argonet.co.uk>
NNTP-Posting-Host: ag088.du.pipex.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

I'm having trouble with masked blits. The mask colour is plotting as black
and not transparent as it should, I've tried a number of permutations to
see if I have the right mask colour and all seems well, here is some code
I have been using to test masked blits,

BITMAP* bitmap;
bitmap = create_bitmap(100, 100);
clear(bitmap);
floodfill(bitmap,2,2,0);//this fills the bitmap with the mask colour 0
floodfill(screen,2,2,255); //fill screen with white
draw_sprite(screen, bitmap, 50,50); //should'nt plot anything as it is
//masked however it blits a black rectangle 
masked_blit(bitmap,screen,0,0,150,50,bitmap->w,bitmap->h);
////should'nt plot anything as it is
//masked however it blits a black rectangle 

I've checked the mask colour with bitmap_mask_colour(bitmap) which is
returning 0 as expected,

any help appreciated

Alastair


- Raw text -


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