Re: [AD] dat2s bug

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 13 August 2002 16:12, Vincent Penquerc'h wrote:
> I guess it would be rather easy to recompile them at
> load time, provided fixup_datafile is called, wouldn't
> it ? (knowing that fixup_datafile would only compile
> them again on x86) ?

Yes, that was the solution I originally proposed, but we have the 
problem of moving data around in memory; anybody who referred to the 
compiled sprite at compile time (which is a perfectly legal thing to 
do[1]) would suddenly find their code not working.

I can see no easy way around this, although I do have an (overly 
complex) working solution. But is it worth it, given that (a) compiled 
sprites stink and (b) people can just call get_compiled_sprite() with 
the bitmap in the datafile? (which shouldn't take too long, and it 
might even be quicker to load bitmap/create new compiled sprite than to 
load old compiled sprite).

[1] dat2s makes the objects globally visible; dat2c does if you pass a 
command-line switch. The objects are declared like this:

extern struct BITMAP some_bitmap;

which lets you get a BITMAP* by writing `&some_bitmap'. This is a valid 
C language construct, and means that you can, eg., initialise GUI 
fields with BITMAP pointers at compile time.

Bye for now,
- -- 
Laurence Withers,  lwithers@xxxxxxxxxx
(GnuPG 04A646EA) http://www.lwithers.demon.co.uk/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9WSXYUdhclgSmRuoRAvofAJwKuKNmOiaZli+cbRgzn8Xw+RMq6gCdHdYL
u+Iz2GvhoLpoWI/6Oq7CvAU=
=mR9D
-----END PGP SIGNATURE-----



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/