Closed mewmew closed 7 years ago
Thank you for the tip. I will update the font sizes to reflect this information.
Edit: I have updated the code with the correct mappings for the 3 fonts above. I also updated the gamefiles to use the new fonts.
I have updated the code with the correct mappings for the 3 fonts above. I also updated the gamefiles to use the new fonts.
Great to hear!
I had a look and it seems like there are still some issues remaining related to font rendering. Whether these are caused by incorrect font character sizes, or incorrect rendering of CEL images, I am not sure.
The following notes relate to revision 40afab360a26f087b2b3e72b8c8f1794e5cb50c2.
The L character is not renedered at all in the quest log window, or the information console.
The number 1 is incorrectly rendered in the character information screen (e.g. see character level 1, and base magic 10).
These font issues are known and are because of the CEL decoding code. freeablo had them as well. They updated the cel rendering code to remove these (using your blizzconv project as reference). I looked into integrating the changes, but dropped that as the new implementation hardcodes cel names and frame numbers into the code and I don't want to do that.
CEL decoding is good enough for now to evolve on other parts of the code (level/player logic) so this decoding issue will be left on hold until the level/player code is done.
I looked into integrating the changes, but dropped that as the new implementation hardcodes cel names and frame numbers into the code and I don't want to do that.
I know, the blizzconv code is ancient and has started to show its age. A complete rewrite is slowly taking place at https://github.com/sanctuary/formats, which generates lookup tables from the level MIN files, thus no longer relying on file name and frame number magic (see https://github.com/wheybags/freeablo/issues/213#issuecomment-223789869 for background discussion). The new implementation is currently capable of correctly decoding all CEL and CL2 images to the best of our knowledge. Take a look if you feel like it.
CEL decoding is good enough for now to evolve on other parts of the code (level/player logic) so this decoding issue will be left on hold until the level/player code is done.
Sure, sounds resonable enough. This is basically following the one-of-everything approach taken by FLARE.
From http://flarerpg.org/blog/20121218
I worked on getting "one of everything" into the game: one tile set, one hero sprite set, one weapon, one creature.
In the last commit (59f7c0c), font decoding got fixed. All letters are now decoded properly.
Good job. Closing this issue as it has been resolved.
From the Contributing wiki page:
For each font, there exist a dedicated array which maps from frame number to character width (note, the character width may be distinct from the frame width, which is 13 for every
smaltext.cel
frame, 22 for everymedtexts.cel
frame, and 46 for everybigtgold.cel
frame).These arrays are contained within the Diablo executable, and for version 1.09 and 1.09b, the virtual addresses of these arrays are 0x4794a4, 0x47f0f8, and 0x47a50c for
smaltext.cel
,medtexts.cel
andbigtgold.cel
, respectively.I hope this may help resolve the font rendering issues. Let us know if anything remains unclear, in which case we'll make sure to update the notes on sanctuary.
Cheers /u