From: "Arthur" To: Subject: RE: Allegro mode 13h Date: Thu, 15 Oct 1998 16:08:59 +0100 Message-ID: <000001bdf84d$bd6dc5a0$594e08c3@arthur> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 Importance: Normal In-Reply-To: <01bdf794$4a8e4460$5e9bf482@s-64584> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Reply-To: djgpp AT delorie DOT com > Hya, I'm kinda new in graphic programming in C/C++ so I deceided to use > allegro for my very first game with real graphic (well mode 13h anyway). I > made this test program to see if I could blit a bitmap to the > screen and it > didn't work. Why? > > [---Snip---] > #include > > int main(void) > { > allegro_init(); > set_gfx_mode(GFX_VGA, 320, 200, 0, 0); > install_keyboard(); > > BITMAP *image; > PALETTE *pal; ^^^^^^^^^^^^ Does pal need to be a pointer? I havn't done anything with palettised displays for ages, but ISTRT I had this problem, and fixed it by removing the *. James Arthur jaa AT arfa DOT clara DOT net ICQ#15054819 > image = create_bitmap(16, 16); > image = load_bitmap("test.bmp", pal); > > blit(image, screen, 0, 0, 0, 0, SCREEN_W, SCREEN_H); > > readkey(); > allegro_exit(); > return 0; > } > [---End of Snip---] > compiling with the allegro library I got this error: > game.cc: In function `int main()': > game.cc:12: passing `RGB (*)[256]' as argument 2 of `load_bitmap(char *, > RGB *)' > It have something to do with the palette, I want to use the colors the > image was draw with. > Thanks :-) > >