Mail Archives: djgpp/1997/11/16/22:23:18
At 10:15 11/14/1997 GMT, KillFerFun wrote:
>I made this program by combining two of the Allegro examples, 2 and 15 I
> believe. While the two examples seperately work fine on my computer, when
> combined in this fashion, I get a GPC. Ive even gotten General Page Faults
> when I use a BMP file.
>
>The program gives me the desired results. It puts a 20x20 piece of the image
> all over the screen, then waits for a keypress, and then the whole computer
> goes idle, and a cold boot is nessecary.
>
>Could someone PLEEZE help me out? What am I doing wrong? Much appreciated....
[snipped]
> PALLETE *the_pallete;
[snipped]
> the_image = load_bitmap(argv[1], the_pallete);
Either you need to have `the_pallete' point at some valid memory in which
the pallete can be stored, or declare it as `PALLETE' and not `PALLETE *'.
> exit(0);
You don't restore text mode at the end. I'm not sure if Allegro does it
automatically on exit, but it's not a bad idea to do it explicitly.
Nate Eldredge
eldredge AT ap DOT net
- Raw text -