From: Robin Burrows Newsgroups: comp.os.msdos.djgpp Subject: Re: Allegro mode 13h Date: Wed, 14 Oct 1998 18:43:37 +0100 Organization: Virgin Net Usenet Service Lines: 29 Message-ID: <3624E2C9.49E2@bigfoot.com> References: <01bdf794$4a8e4460$5e9bf482 AT s-64584> NNTP-Posting-Host: 194.168.70.226 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 3.01C-VN711-003 (Win95; I) To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Tarad wrote: > #include > > int main(void) > { > allegro_init(); > set_gfx_mode(GFX_VGA, 320, 200, 0, 0); should check for error here... > install_keyboard(); > > BITMAP *image; > PALETTE *pal; should be PALETTE pal; > image = create_bitmap(16, 16); no need to do this ias load_bitmap gives you a bitmap, you just lost the pointer > image = load_bitmap("test.bmp", pal); check for error (something like if (image==NULL) error..... ) you'd probably want a set_palette (pal); here > > blit(image, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); try: blit(image, screen, 0, 0, 0, 0, image->w, image->h); unless you're sure the image will be bigger than the screen. > > readkey(); > allegro_exit(); > return 0; > }