(fixed) Graphics.dsb and file importing
Posted: Tue Dec 04, 2007 10:45 am
I think there's an error with the importation of several file formats.
First, fonts can't be loaded directly from a file. DSB complains that the file simply can't be found. They have to be imported into the 'graphics.dsb' file through a utility like Allegro's Grabber - and even that doesn't fully work. The font loads and can be used the first time correctly, but since DSB rebuilds the 'graphics.dsb' file each time (I think it does - I didn't test to see if setting 'compile=0' works), it builds it again without the font, so subsequent loads don't work.
The same is true for Mod music files. Midis can't be used at all, though neither of these is a huge deal (at least, not to me; WAVs and MP3s load directly from files just fine, though if people are concerned with file sizes, this could potentially be a problem).
And before you ask - I'm fairly certain the file formats are correct, since they do load from '*.dat' files just fine (at least, the first time unless I put them in the 'base\graphics.dat', where they always work). I can't quite remember exactly how I came up with the font file - I used a utility to convert a TTF (it was either FontEd or TTF2PCX) with the character range of 0x0020 to 0x005B (I used that range because that's what SCROLLFONT uses, and I wanted to be sure that wasn't the issue).
First, fonts can't be loaded directly from a file. DSB complains that the file simply can't be found. They have to be imported into the 'graphics.dsb' file through a utility like Allegro's Grabber - and even that doesn't fully work. The font loads and can be used the first time correctly, but since DSB rebuilds the 'graphics.dsb' file each time (I think it does - I didn't test to see if setting 'compile=0' works), it builds it again without the font, so subsequent loads don't work.
The same is true for Mod music files. Midis can't be used at all, though neither of these is a huge deal (at least, not to me; WAVs and MP3s load directly from files just fine, though if people are concerned with file sizes, this could potentially be a problem).
And before you ask - I'm fairly certain the file formats are correct, since they do load from '*.dat' files just fine (at least, the first time unless I put them in the 'base\graphics.dat', where they always work). I can't quite remember exactly how I came up with the font file - I used a utility to convert a TTF (it was either FontEd or TTF2PCX) with the character range of 0x0020 to 0x005B (I used that range because that's what SCROLLFONT uses, and I wanted to be sure that wasn't the issue).