Mail Archives: djgpp/1997/04/18/08:36:22
On Thu, 17 Apr 1997, The Flend wrote:
> I am having some trouble with accessing the height of an rle_encoded sprite,
> stored in Allegro 2.1 datafile.
>
> The datafile is: dataf_rle
>
> I've tried:
>
> (dataf_rle[spr_no].dat)->h
Try something like this :
RLE_SPRITE my_sprite;
my_sprite = (RLE_SPRITE*)dataf_rle[spr_no].dat;
//and then to find height use
my_sprite->h;
The other way to do this is casting dataf_rle[spr_no] to RLE_SPRITE
((RLE_SPRITE*)dataf_rle[spr_no].dat)->h;
I am not really sure about this. I have never used REL_SPRITEs, but this
works with BITMAPs.
>
> but it didn't seem to work. I'm sure the solution's blatently obvious, but I'm
> none too experienced in C.
>
> If anyone could let me in on the soln I would be most chuffed.
> Thanks.
> --
> /\ The Flend
> /--\---/ Email: flend AT globalnet DOT co DOT uk
> \ / Colony Web Page: www.simsfam.demon.co.uk
> \ 'Hard work never hurt anyone, but why take the chance?'
>
>
- Raw text -