Mail Archives: djgpp/1998/03/24/00:44:48
Hello James,
James W Sager Iii <sager+@andrew.cmu.edu> schreef in artikel
<gp4yERS00YUt074kU0 AT andrew DOT cmu DOT edu>...
> I could use help as this is beyond my control.
> This code works fine under DOS,
Really?, it seems that you set the graphics mode before you have even
initialised Allegro itself.
>
> #include "allegro.h"
> //Just a .pcx file with pallete information.
> //Make up any ol .pcx to test it.
> BITMAP *BUTTON;
> PALLETE stndpal;
>
> void main(void)
Please, if you want to be taken seriously make this: int main(void)
> {
> //640 x 480 mode
> set_gfx_mode(0,640,480,1024,1024);
Move the above line to a place after you've initialised Allegro and it's
components.
> allegro_init();
> install_mouse();
> install_timer();
Like here.<g>
> BUTTON=load_pcx("butup.pcx",stndpal);
> set_pallete(stndpal);
> lbl:;
> show_mouse(screen);
> //allow you to use the mouse :)
> while (true)
> {
> }
> }
>
> Any hints or suggestions would be appreciated... I have absolutely NO
> idea why 'set_pallete' would crash the 'puter.
Well, make the changes and see what happens.. ;-))
--
Greetings from sunny Amsterdam,
Jan Bijsterbosch
email: bijster AT worldonline DOT nl
http://home.worldonline.nl/~bijster
- Raw text -