Re: [AD] 4.2.0 Beta 4 - PACKFILE / Font Troubles

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


On Monday 01 August 2005 06:05, Shawn Walker wrote:
> I'm porting some games listed on retrospec.sgn.net, along the way I
> discovered one of them that has a packfile that is readable using the
> Allegro 4.0 dll they include, but not with Allegro 4.2.0 Beta 4.
> tools/dat gives an error trying to list the contents of this .dat file
> with 4.2.0 beta 4:
>
> http://drevil.warpcore.org/styx_mn.dat

Thanks for reporting! I'll look into it as soon as I can (hopefully tonight 
after work).

> I'm sure an astute reader will note a few red flags already. First of
> all, it thinks the color depth is 255 :} This appears to be because of
> new code in datafile.c to support true colour fonts, as well as
> possible changes in how packfiles are read in file.c, I'm going to
> guess there's a wrong assumption about the format of some older
> packfiles.

Possibly; it does work with other older datafile though. Does the datafile 
contain a password (I'm guessing not)?
If it's the fonts, you should be able to tell by editing the datafile loading 
code: it does something like `if depth == 0 then depth = 8'; can you change 
that in `if depth != 1 then depth = 8''? This will break true colour fonts, 
but it will make it clear that this is where the bug is.
Alternatively, can you test with 4.1.18 WIP if the problem is still there? The 
earlier 4.2 betas can't be downloaded from SourceForge anymore (they're 
hidden), but if you want to retry those as well, let me know.

> The most relevant diffs I've manged to figure out so far (after four
> hours? of brain-wracking somewhat unproductive debugging time) are the
> following:
>
> http://cvs.sourceforge.net/viewcvs.py/alleg/allegro/src/datafile.c?r1=1.34&;
>r2=1.35
>
> http://cvs.sourceforge.net/viewcvs.py/alleg/allegro/src/file.c?r1=1.31.2.2%
>3Av4-0-3&tr1=&r2=1.59%3Av4-2-0-beta4&tr2=&diff_format=h

Hmm... I don't see an obvious cause for this problem by looking at those 
patches; I'd expect the first to be the most relevant though.

> I would fix this if I understood what was going on, but I don't. I'm
> relatively new to digging around in Allegro's guts and there a lot of
> things done that I don't understand the purpose of. Any help would be
> appreciated.

Feel free to ask about that. Maybe we could add some comments to the code to 
help explain things.

Evert




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