Mail Archives: djgpp/1999/08/15/16:44:05
At 05:34 AM 8/15/99 -0700, you wrote:
>I've gotten some basic stuff to work using allegro, Mode-X graphics (i still
>haven't gotten that to work without using a 3rd party library, grrr...) ,
>keyboard, mouse, and I've been able to load bitmaps and draw them on the
>screen. The problem is when I tried to set the palette, beacuse my picture
>was turning out all wrong colors, but when I did, it gave an error (copied
>below my program). Is it me, or is it my computer that has a problem?
>
>#include <allegro.h>
>#include <conio.h>
>
>void main()
> {
> allegro_init();
> install_keyboard();
> install_mouse();
>
> set_gfx_mode(GFX_MODEX, 320, 240, 320, 480);
>
> PALETTE *p;
You might want to allocate some memory for you palette. I suggest you use
PALETTE P; instead.
> BITMAP *belive = load_bmp("c:\\belive.bmp", *p); // mulder's "I want to
and here, simply "p" and not "*p"
>belive" poster
> set_palette(*p); // HERE'S WHERE THE PROBLEM IS
same here.
>
> draw_sprite(screen, belive, 0, 0);
>
> getch();
>
> destroy_bitmap(belive);
> allegro_exit(); // i know i don't need it, but i'm paranoid
> }
>
>
- GodOfWar
There is always one more bug.
- Raw text -