cvs.gedasymbols.org/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/16/05:22:23

Message-ID: <D1FB30BBA491D1118E6D006097BCAE3926E9DB@Probe-nt-2a.Probe.co.uk>
From: Shawn Hargreaves <ShawnH AT Probe DOT co DOT uk>
To: djgpp AT delorie DOT com
Subject: Re: Allegro, sprite_draw and masked_blit
Date: Thu, 16 Apr 1998 10:21:04 +0100
MIME-Version: 1.0

Alastair Duncan writes:
> BITMAP* bitmap;
> bitmap = create_bitmap(100, 100);
> clear(bitmap);
> floodfill(bitmap,2,2,0);//fills the bitmap with the mask colour 0

This is redundant: there is no reason to call floodfill() after 
clear().

> floodfill(screen,2,2,255); //fill screen with white

This is meaningless: at this point the screen contents are presumably
uninitialised, so the floodfill is likely just to cover whatever 
random shape happens to contain pixels of the same color. Use 
clear_to_color(screen, 255) instead.

> draw_sprite(screen, bitmap, 50,50); //should'nt plot anything as 
> //it is masked however it blits a black rectangle 

This, I don't understand. All I can think is that you have somehow
managed to end up in a truecolor mode, where the mask color is pink
instead of zero. You will need to post a complete, compilable program 
so that we can see where you are going wrong. Try to strip it down to 
the miniumum that still demonstrates the trouble, and then post your 
code.

	Shawn Hargreaves.

- Raw text -


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