Hey there,
For some weird reason I had an interest in having some tool that lets ones mess with CGA graphics, so here we are. I've also done a few more things, like going over some .def files.
Note that there's currently a known bug with exporting fonts from VGAGRAPH. This can be observed while exporting the first font from Super 3-D Noah's Ark, as mentions of color no. 31 are replaced with 15. In practice, though, I think that the actual color itself doesn't change in a noticeable way.
I must say, though, that supporting the .def files as done now is *really* useful. It could assist me with the Keen Dreams Tech Demo earlier (more than a year ago by now), and can surely help right now. While the definitions for specific known game versions won't change, the .def files can greatly assist when one wants to modify such definitions, or even create new ones from scratch.
Thanks to any preceding contributor to the codebase, and others, for their support!
szemi wrote:And what if I want to modificate Catacombs 3D that I built up in Borland? Because Modid complains about the offset of the built Catacombs 3D's EXE file, which isn't even packed with LZEXE or any other compressing programmes.
The point about LZEXE is a bit weird, since I'm quite sure it is packed. This at least the case with version 1.22 as available from GOG.com and supported with the given .def, but v1.00 may also work after creating a modified .def file with somewhat different details for the EXE.
ModId expects to have the unpacked EXE ready for internally reading the EGAHEAD.C3D and EGADICT.C3D chunks while exporting the data. During importing, the EXE is further required for the EGADICT.C3D data. Three new files should be found after importing: EGAGRAPH.C3D, EGAHEAD.C3D and EGADICT.C3D.
There is theoretically more than one way to make these usable (option 2 is the most straightforward):
1. Update CKxPATCH to also include a C3DPATCH, and use that.
2. Using the Catacomb 3-D sources (which are for v1.22, but may also be compatible with 1.00), build an EXE that reads all EGA data from external files, without linking EGAHEAD.C3D or EGADICT.C3D into the EXE. That should be possible by commenting out the definition of GRHEADERLINKED.
3. Link EGAHEAD.C3D and EGADICT.C3D into the EXE. This means they should be converted to OBJ files that Borland C++ can use. The released Keen Dreams sources include a copy of makeobj.c from Braden Obrzut, which should be built using Borland's bcc and may create the OBJs. See here for an example:
https://github.com/keendreams/keen/blob ... c/make.bat
These should be the lines for all kinds of data that may be embedded in cat3d.exe:
Code: Select all
makeobj f introscn.scn ..\introscn.obj IntroscnSeg _introscn
makeobj c audiodct.c3d ..\c3dadict.obj _audiodict
makeobj f audiohhd.c3d ..\c3dahead.obj _AudioHeader _audiohead
makeobj c egadict.c3d ..\c3dedict.obj _EGAdict
makeobj f egahead.c3d ..\c3dehead.obj EGA_grafixheader _EGAhead
makeobj f mtemp.tmp ..\c3dmhead.obj MapHeader _maphead
POST EDIT: Looks like these were missed for some reason.
A few side-notes:
1. When exporting graphics, if matching xGAHEAD and xGADICT files are found alongside the xGAGRAPH, there should be no need for the game's EXE. This is the case, for instance, with the various Wolfenstein 3D releases.
2. makeobj has a way to extract the contents of an obj, like this: