delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/03/24/00:44:48

From: "J.A. Bijsterbosch" <bijster AT worldonline DOT nl>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: ?Win95 crash from Allegro:Set_pallete?
Date: 23 Mar 1998 18:28:26 GMT
Organization: Bijsterbosch Productions
Lines: 56
Message-ID: <01bd5649$434468c0$LocalHost@none>
References: <gp4yERS00YUt074kU0 AT andrew DOT cmu DOT edu>
NNTP-Posting-Host: asd1-p79.worldonline.nl
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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 -


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