delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/12/12:03:34

From: "Ross Boast" <Rossa AT btinternet DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problems setting palette using Allegro's complied datafile
Date: 12 Jan 1998 16:48:24 GMT
Organization: BT Internet
Lines: 62
Message-ID: <01bd1f79$e2a96ca0$453863c3@default>
References: <01bd1ee0$af717d80$LocalHost AT default>
NNTP-Posting-Host: host5-99-56-69.btinternet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Okay i've figured the correct way of accessing compiled datafiles:

For palletes:

set_pallete(pic); (you need not make any reference to the datafile)

For blitting (other) :

blit(&pic, etc) 

textout(center etc)(screen, &font, etc)

For compiled you need not make a DATAFILE datafile; call since its in the
exe anyway :). Well i love correcting myself, hope this helps anyone else
who has/had problems if you don't/didn't then you are clever :).

Regards....


-- 
Rossa :)
at
Rossa AT BTinternet DOT com

"People who remember quotes, just have better memories
 not a higher Intelligence" - Leonardo Da Vince. 



Ross Boast <Rossa AT btinternet DOT com> wrote in article
<01bd1ee0$af717d80$LocalHost AT default>...
> Hi,
>     I'm used to using external datafiles as it were, but I wanted to try
> and add the datafile onto the exe using dat2s. I followed the instrutions
> and made datafile.o, which i then linked to my exe. Before i did link i
> made minor changes to the calls to the datafile, so instead of :
> 
> blit(datafile[pic].dat, etc) it was blit(data[pic].dat, etc) which i
> believe is correct.
> 
> Having assumed that this would work with the set_palette call aswell i
> changed:
> 
> set_palette(datafile[pal].dat); to set_palette(data[pal].dat);
> 
> However i got this error:
> 
> array subscript is not an integer
> 
> What does this mean and what have i done wrong or missed? Please can
> someone show me an example of setting the pallete using compiled
datafiles,
> thanks in advance, Regards...
> 
> -- 
> Rossa :)
> at
> Rossa AT BTinternet DOT com
> 
> "People who remember quotes, just have better memories
>  not a higher Intelligence" - Leonardo Da Vince.
> 

- Raw text -


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