DO/New PRJ Notes

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search
(Overall Structure)
(Block Formats)
Line 51: Line 51:
Again, the minimum length of the filename is 1, since it is always null-terminated
Again, the minimum length of the filename is 1, since it is always null-terminated
 +
 +
==='FURN'===
 +
 +
This section lists the filenames of any external meshes used in this level.
 +
 +
struct FURN
 +
{
 +
    unsigned int SizeOfCharBuffer; // size of the buffer that the app must allocate to store the list
 +
    unsigned int ExternalMeshCount; // number of external meshes used
 +
    struct emesh
 +
    {
 +
        unsigned int lengthOfFilenameString;
 +
        unsigned char filename[emesh.lengthOfFilenameString];
 +
    } ExternalMeshList[FURN.ExternalMeshCount];
 +
}

Revision as of 20:55, 17 November 2008

Contents

PRJ File format

The PRJ file format represents the world data (as opposed to the mission-specific data) for a Dark Omen battle.

Overall Structure

The Overall structure of a PRJ File is shown below. It is made up of sections, which appear in this order:

Header: The string "Dark Omen Battle File 1.10      " (32 bytes in total, padded with spaces)
'BASE': Indicates the terrain mesh to use
'WATR': Indicates the water mesh to use (if any)
'FURN': Lists the filenames for external meshes (buildings, trees etc)
'INST': Describes the position of external meshes (buildings, trees etc)
'TERR': The terrain heightmap, used for collision detection with the ground
        and possibly has other uses
'ATTR': Attribute flags for parts of the terrain
'EXCL': Unknown function at present
'MUSC': The music to use for this level
'TRAC': Camera tracks for the intro
'EDIT': Unknown function at present

Block Formats

Header

The header merely consists of the string "Dark Omen Battle File 1.10      ", which is used to identify the PRJ format.

'BASE'

The base section looks like this:

struct BASE
{
   unsigned char ID[4]; // = 'BASE'
   unsigned int lengthOfFilenameString;
   unsigned char filename[BASE.lengthOfFilenameString];
}

The minimum length of the filename is 1, since it is always null-terminated

'WATR'

This section is similar to the BASE section:

struct WATR
{
   unsigned char ID[4]; // = 'WATR'
   unsigned int lengthOfFilenameString;
   unsigned char filename[WATR.lengthOfFilenameString];
}

Again, the minimum length of the filename is 1, since it is always null-terminated

'FURN'

This section lists the filenames of any external meshes used in this level.

struct FURN
{
   unsigned int SizeOfCharBuffer; // size of the buffer that the app must allocate to store the list
   unsigned int ExternalMeshCount; // number of external meshes used
   struct emesh
   {
       unsigned int lengthOfFilenameString;
       unsigned char filename[emesh.lengthOfFilenameString];
   } ExternalMeshList[FURN.ExternalMeshCount];
}
Personal tools
communication