Mail Archives: djgpp/1997/04/25/09:05:39
What is your problem? You cannot compile this, or is it not working?
If you try to use exacly what you have in there you won't see anything
because your program just starts, loads pcx, blits it and exits. You might
want to include a loop at the end of your program while (!keypressed());
On 24 Apr 1997, Atte Koivula wrote:
> Why does this cause a page fault (I'm simply trying to load and blit a
> pcx-file called dice.pcx...):
>
> #include <allegro.h>
>
> void main()
> {
> allegro_init();
> BITMAP *dice;
> PALETTE dicepalette;
> dice=load_bitmap("c:/djgpp/atte/progs/dice.pcx", dicepalette);
> set_gfx_mode(GFX_MODEX,320,200,0,0);
> set_palette(dicepalette);
> blit(dice,screen,0,0,0,0,dice->w,dice->h);
> destroy_bitmap(dice);
> }
>
> Please help me! You can e-mail to: keijo DOT koivula AT pp DOT inet DOT fi or
> akoivula AT geocities DOT com or this group (figures)
>
>
- Raw text -