Mail Archives: djgpp/1996/05/06/20:07:07
Xref: | news2.mv.net comp.os.msdos.djgpp:3515
|
From: | Shawn Hargreaves <slh100 AT york DOT ac DOT uk>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Allegro and Dialogues
|
Date: | Sun, 5 May 1996 12:27:15 +0100
|
Organization: | The University of York, UK
|
Lines: | 34
|
Message-ID: | <Pine.SGI.3.91.960505113326.8138C-100000@tower.york.ac.uk>
|
NNTP-Posting-Host: | tower.york.ac.uk
|
Mime-Version: | 1.0
|
In-Reply-To: | <4mgu9h$1b9@frodo.smartlink.net>
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
On Sun, 5 May 1996, Nicholas Marrone wrote:
> I am once again having trouble with the dialouges in Allegro because
> of my inexperience with it. I have been trying to display a bitmap
> while staying in the main dialogue. I've been able to do this, but
> allegro refreshes the bitmap constantly, and the sprites over it
> causing a lot of flickering. The way I've done this is by making a
Try something like:
int bitmap_viewer_proc(int msg, DIALOG *d, int c)
{
if (msg == MSG_DRAW) {
blit(whatever, screen, at position d->x, d->y);
draw whatever else you want to draw.
}
return D_O_K;
}
Then put a bitmap_viewer_proc in your dialog at the appropriate place,
and it should work correctly...
If you only want to view a single bitmap, there is a d_bitmap_proc()
built into Allegro which will do this for you: just position it where you
want it and set d->dp to point to the bitmap.
/*
* Shawn Hargreaves. Why is 'phonetic' spelt with a ph?
* Check out Allegro and FED on http://www.york.ac.uk/~slh100/
*/
- Raw text -