Re: [AD] Preparing for RC2 |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] Preparing for RC2
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Sat, 27 Aug 2005 12:48:04 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=fyiWHfW5vu6yR+UtyvX4u0Kq7RU8cH9XozC6mm6sK4XXlCAPRrypO801cTLPdYVaQ99lS3pZh883dLpIVeI5xnXvJtcwb3x6wO7nOH9KrOFwjqlWQiltDTUQFXGJBpLLifPGlw+jUzxjMOmsGifw/H1H54cHLhuEX5ziGlN+X74=
On Saturday 27 August 2005 03:47 am, Elias Pschernig wrote:
> Actually, there would be valid reasons to draw to a memory buffer, for
> example:
>
> blit(background, buffer, ...)
> ...
> show_mouse(buffer)
> while(1) {
> ...
> blit(buffer, screen, ...)
> }
Or:
blit(background, buffer, ...)
...
tmp_buf = create_bitmap(mouse_sprite->w, mouse_sprite->h);
while(1) {
...
blit(buffer, tmp_buf, mouse_x, mouse_y, 0, 0, tmp_buf->w, tmp_buf->h);
draw_sprite(buffer, mouse_sprite, mouse_x, mouse_y);
blit(buffer, screen, ...)
blit(tmp_buf, buffer, 0, 0, mouse_x, mouse_y, tmp_buf->w, tmp_buf->h);
}
Safer since it can't blit in the middle of a tiemr update, and a bit faster
since it's less complex (no updating when it's not showing, and none of that
flicker-free code needed for the screen).
But as for the patch.. I think using a memory bitmap should be the same as
using NULL. I don't think just returning would be the best thing to do.