[AD] 4.2.0 Beta 4 - PACKFILE / Font Troubles

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


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

Here's the backtrace from tools/dat when trying to read it (tools/dat
linked against Allegro Debug libary via configure
--enable-dbgprog=yes):

Assert failed at line 399 of ./src/graphics.c
t@xxxxxxxxxx (l@xxxxxxxxxx) signal ABRT (Abort) in _lwp_kill at 0xbfb9e057
0xbfb9e057: _lwp_kill+0x0007:   jae      _lwp_kill+0x15 [ 0xbfb9e065, .+0xe ]
Current function is al_assert
  566            abort();
(dbx) where
current thread: t@xxxxxxxxxx
  [1] _lwp_kill(0x1, 0x6), at 0xbfb9e057
  [2] _pthread_kill(0x1, 0x6), at 0xbfb9b80b
  [3] raise(0x6), at 0xbfb4ae3b
  [4] abort(0xbff0927a, 0xbfffdd14, 0xbfffb824, 0x0, 0x65737341,
0x66207472), at 0xbfb2e889
=>[5] al_assert(file = 0xbff8c838 "./src/graphics.c", line = 399),
line 566 in "allegro.c"
  [6] _color_load_depth(depth = 255, hasalpha = 0), line 399 in "graphics.c"
  [7] read_bitmap(f = 0x809b108, bits = 255, allowconv = 1), line 122
in "datafile.c"
  [8] read_font_color(pack = 0x809b108, hmax = 0x8046c48, depth =
255), line 440 in "datafile.c"
  [9] read_font(pack = 0x809b108), line 509 in "datafile.c"
  [10] load_font_object(f = 0x809b108, size = 3859), line 1038 in "datafile.c"
  [11] load_object(obj = 0x8095e40, f = 0x8097d28, type = 1179602516),
line 1169 in "datafile.c"
  [12] load_file_object(f = 0x8097d28, size = 0), line 1324 in "datafile.c"
  [13] load_datafile_callback(filename = 0x8091020 "styx_mn.dat",
callback = (nil)), line 1397 in "datafile.c"
  [14] load_datafile(filename = 0x8091020 "styx_mn.dat"), line 1367 in
"datafile.c"
  [15] datedit_load_datafile(name = 0x8046fd3 "styx_mn.dat",
compile_sprites = 0, password = (nil)), line 954 in "datedit.c"
  [16] main(argc = 3, argv = 0x8046e24), line 1031 in "dat.c"

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.

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

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.

-- 
Shawn Walker, Software and Systems Analyst
binarycrusader@xxxxxxxxxx - http://binarycrusader.blogspot.com/




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