Mail Archives: djgpp/1998/11/15/14:48:37
| From: | "Travis Gant" <slardy AT erols DOT com>
|
| Newsgroups: | comp.os.msdos.djgpp
|
| Subject: | Still can display Bitmaps
|
| Date: | Sun, 15 Nov 1998 14:22:21 -0500
|
| Lines: | 38
|
| Message-ID: | <72n9pm$opo$1@autumn.news.rcn.net>
|
| X-Trace: | NBosKa+OfJtttHcp7qAGVpo0jSV5zAQRzIpnzecN988=
|
| X-Complaints-To: | abuse AT rcn DOT com
|
| NNTP-Posting-Date: | 15 Nov 1998 19:24:38 GMT
|
| X-MimeOLE: | Produced By Microsoft MimeOLE V4.72.3110.3
|
| X-Newsreader: | Microsoft Outlook Express 4.72.3110.1
|
| To: | djgpp AT delorie DOT com
|
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
| Reply-To: | djgpp AT delorie DOT com
|
What is wrong with this code? I am trying to programm a program with Allegro
to make a bitmap display on the screen. how do i do it?
here is the code:
#include <iostream.h>
#include "allegro.h"
BITMAP *allegro;
PALLETE pal;
start_allegro();
int main()
{
start_allegro();
/* Load our bitmap into memory. */
allegro = load_bitmap("swf.bmp", pal);
blit(allegro, screen, 0, 0, 0, 0, 640, 480);
/* Wait for a keypress */
readkey();
destroy_bitmap(allegro);
return 0;
}
start_allegro()
{
install_keyboard();
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);
set_palette(pal);
}
- Raw text -