(fixed) Graphics.dsb and file importing

This forum is for the Lua scriptable clone of DM/CSB called Dungeon Strikes Back by Sophia. Use DSB to build your own highly customised games.

Moderator: Sophia

Forum rules
Please read the Forum rules and policies before posting.
Post Reply
Remy
Craftsman
Posts: 111
Joined: Wed Sep 05, 2007 5:24 pm
Contact:

(fixed) Graphics.dsb and file importing

Post by Remy »

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).
User avatar
Sophia
Concise and Honest
Posts: 4240
Joined: Thu Sep 12, 2002 9:50 pm
Location: Nowhere in particular
Contact:

Graphics.dsb and file importing

Post by Sophia »

Remy wrote: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.
Ah, right. I had forgotten to fix that when I changed DSB to automatically compile a graphics DSB. I'll fix this.
Remy wrote:The same is true for Mod music files. Midis can't be used at all
It can't find MODs because .mod is not one of the file extensions DSB searches-- I can easily add this.

What do you mean by Midis can't be used at all? I can add .mid to the searched extensions, too-- if there are problems beyond that, I think it's a problem between FMOD and the individual Midi file, as the game ending screen music is a Midi and it plays fine. :)
Remy wrote:I'm fairly certain the file formats are correct
Yeah, this one was my mistake.
Any 256-color PCX image should be fine. :)
Post Reply