delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/04/25/09:05:39

Date: Fri, 25 Apr 1997 07:55:07 -0500 (CDT)
From: Andrew Deren <aderen AT eecs DOT uic DOT edu>
To: Atte Koivula <keijo DOT koivula AT pp DOT inet DOT fi>
cc: djgpp AT delorie DOT com
Subject: Re: Problem loading PCX-file using Allegro
In-Reply-To: <01bc4f39$c2ea5ac0$3b86d2c1@ojzxnyqp>
Message-ID: <Pine.SUN.3.95.970425075315.1110A-100000@bert.eecs.uic.edu>
MIME-Version: 1.0

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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019