This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
arma:file_formats:pew [2009-05-31 21:54] snakeman small update for PEW file format. |
arma:file_formats:pew [2011-11-28 12:16] (current) snakeman updated page a bit. |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Introduction | + | ====== PEW File Format ====== |
- | Pew are Visitor's project files. Visitor is BI's tool for creating Islands. | + | ====== Introduction ====== |
- | Visitor is a Gui tool interface that interacts with Bulldozer, an inbuilt 'world' viewer inside any Armed Assault engine. | + | PEW are Visitor's project files. Visitor is BIS tool for creating terrains. |
+ | |||
+ | Visitor is a GUI tool that interacts with Bulldozer, an inbuilt 'world' viewer inside any Armed Assault engine. | ||
The contents of the project file, pew, are not directly related to the ultimate output, a wrp file. However, that data, of course, contains all similar elements, such as road networks, elevations, cell matrices, models and textures. | The contents of the project file, pew, are not directly related to the ultimate output, a wrp file. However, that data, of course, contains all similar elements, such as road networks, elevations, cell matrices, models and textures. | ||
Line 10: | Line 12: | ||
While there have been several pew versions, the one's listed here are | While there have been several pew versions, the one's listed here are | ||
- | + | <code> | |
- | * POSEW59 and | + | *POSEW59 and |
- | * POSEW60 | + | *POSEW60 |
+ | </code> | ||
there are only a few subtle differences to their makeup. | there are only a few subtle differences to their makeup. | ||
- | Legend | + | ====== Legend ====== |
- | [[http://en.wikipedia.org/wiki/Endianness#Little-endian|Little endian]] byte order, lsb first for numeric values, text is stored in Big endian byte order. | + | see Generic FileFormat Data Types |
- | <code> | + | |
- | Type Description | + | |
- | byte 8 bit (1 byte) | + | |
- | short 16 bit signed short (2 bytes) | + | |
- | int 32 bit signed integer (4 bytes) | + | |
- | float 32 bit signed single precision floating point value (4 bytes) | + | |
- | double 64 bit signed single precision floating point value (8 bytes) | + | |
- | asciiz Null terminated (0x00) variable length ascii string | + | |
- | ascii fixed length ascii string(UTF-8) | + | |
- | </code> | + | |
- | XYPair | ||
- | <code cpp> | + | ====== File Format ====== |
- | XYPair | + | |
- | { | + | |
- | ulong x,y; // normally associated with cell sizes | + | |
- | } | + | |
- | </code> | + | |
- | + | ||
- | RGBAColor | + | |
+ | This file format is principally used with Armed Assault v1.09 and later plus the ArmA Tools Suite Final release (v1.14). | ||
<code cpp> | <code cpp> | ||
- | RGBAColor | + | POSEW59 |
- | { | + | POSEW60 |
- | byte r,g,b,a; // // 0xFF:FF:FF:FF means 'default' | + | { |
- | } | + | PoseHeader Header; |
+ | ulong nOFPTextures // none in Arma; | ||
+ | OFPTexture OFPTextures[[nOFPTextures]]; | ||
+ | ulong nObjectTemplates; | ||
+ | ObjectTemplate ObjectTemplates[[nObjectTemplates]]; | ||
+ | shortBool NoOfpTerrains; | ||
+ | if (!NoOfpTerrains) | ||
+ | { | ||
+ | ulong nOFPTerrains; // none in Arma; | ||
+ | OFPTerrain OFPTerrains[[nOFPTerrains]]; | ||
+ | } | ||
+ | shortBool NoOFPForests; // none in Arma; | ||
+ | if (!NoOFPForests) | ||
+ | { | ||
+ | ulong nOFPForests; | ||
+ | OFPForest OFPForests[[nOFPForests]]; | ||
+ | } | ||
+ | RoadNets RoadNets[[...]]; | ||
+ | Elevation Elevation[[...]]; | ||
+ | ulong NoOfObjects; | ||
+ | Object Objects[[NoOfObjects]]; | ||
+ | |||
+ | ulong NoOfLayers; | ||
+ | String LayerName; //"Base" | ||
+ | Layer Layers[[NoOfLayers]] ; | ||
+ | |||
+ | if (POSEW60) | ||
+ | { | ||
+ | ulong Unknown; | ||
+ | } | ||
+ | else // pose59 | ||
+ | { | ||
+ | ulong nNamedZones; | ||
+ | NamedZone NamedZones[[nNamedZones]]; | ||
+ | } | ||
+ | |||
+ | ulong nRoadBlocks; | ||
+ | RoadBlock RoadBlocks[[nRoadBlocks]]; | ||
+ | |||
+ | if (POSEW60) | ||
+ | { | ||
+ | ulong nNamedZones; | ||
+ | NamedZone NamedZones[[nNamedZones]]; | ||
+ | } | ||
+ | else // pose59 | ||
+ | { | ||
+ | ulong Unknown; | ||
+ | } | ||
+ | ulong nKeyPoints; | ||
+ | KeyPoint KeyPoints[[nKeyPoints]]; | ||
+ | ulong NoOfBackgrounds; | ||
+ | Background Backgrounds[[NoOfBackgrounds]] ;// not checked for 59 | ||
+ | ulong TotalSizeOfSelections; // from here, to end of file | ||
+ | ulong nSelections; | ||
+ | Selection Selections[[nSelections]]; | ||
+ | } | ||
</code> | </code> | ||
- | |||
- | * RGBA colors correspond to Microsoft's D3DCOLORVALUE | ||
- | * They normally come in pairs innside the pew structures | ||
- | String | + | ====== PoseHeader ====== |
<code cpp> | <code cpp> | ||
- | String | + | Header |
- | { | + | { |
- | ulong Length; | + | char Signature[[7]]; // "POSEW59" or "POSEW60" note: NOT null terminated |
- | Asciiz Characters;// null terminated regardless. | + | |
+ | ulong Length; // of PEW file; | ||
+ | ulong UnknownLong; // typically 0 | ||
+ | String IslandDataPath; //"SomePboPrefix\SomeIsland\data\0" | ||
+ | // Folderlocation of the rvmat material list | ||
+ | String IslandObjectPath; //"" | ||
+ | float GridSize; //50.0 | ||
+ | float SegmentSize; //400.0 (==SegmentSize - SegmentOverlap) | ||
+ | String IslandClassname; //"" | ||
+ | }; | ||
</code> | </code> | ||
- | Length always =strlen(Characters)+1; | ||
- | This is a pre-calculated convenience to reduce load times (and skip over the variable length block). | + | ====== OFPTexture ====== |
- | + | ||
- | File Format | + | |
- | + | ||
- | * This file format is principally used with Armed Assault v1.09 and later plus the ArmA Tools Suite Final release (v1.14). | + | |
<code cpp> | <code cpp> | ||
- | POSEW59 | + | OFPTexture |
- | POSEW60 | + | |
{ | { | ||
- | PoseHeader Header; | + | ulong TextureID; |
- | ulong nTextures (typically 0); | + | String TextureFileName; // "snih3.paa" |
- | Textures Textures[nTextures]; | + | String TextureName; // "snih3" |
- | ulong nObjectTypes; | + | String RvmatName; // "snih3.rvmat" |
- | ObjectType ObjectTypes[nObjectTypes]; | + | byte UnknownBytes[[14]]; // (typically 0) |
- | Terrains; | + | RGBAColor Colour; |
- | Forests; | + | |
- | RoadNets RoadNets[...]; | + | |
- | Terrain Terrain[...]; | + | |
- | ulong NoOfObjects; | + | |
- | Object Objects[NoOfObjects]; | + | |
- | ulong NoOfLayers; | + | |
- | Layer Layers[[NoOfLayers] ; | + | |
- | ulong RoadNetIndices[TerrainGridSizeXY]; | + | |
- | if (POSEW60) | + | |
- | { | + | |
- | ulong NoOfBackgrounds; | + | |
- | Background Backgrounds[NoOfBackgrounds] ;// probably | + | |
- | } | + | |
- | else // pose59 | + | |
- | { | + | |
- | ulong Count; | + | |
- | UnknownStruct2 UnknownStructs[Count]; | + | |
- | } | + | |
- | + | ||
- | ulong nBlocks; | + | |
- | RoadBlock RoadBlocks[nBlocks]; | + | |
- | + | ||
- | if (POSEW60) | + | |
- | { | + | |
- | ulong Count; | + | |
- | UnknownStruct2 UnknownStructs[Count]; | + | |
- | } | + | |
- | else // pose59 | + | |
- | { | + | |
- | ulong NoOfBackgrounds; | + | |
- | Background Backgrounds[NoOfBackgrounds] ;// probably | + | |
- | } | + | |
- | ulong Count; | + | |
- | Locale Locales[Count]; | + | |
- | ulong Always0; | + | |
- | ulong Always4; | + | |
- | ulong Always0; | + | |
} | } | ||
</code> | </code> | ||
- | PoseHeader | + | |
+ | ====== ObjectTemplate ====== | ||
<code cpp> | <code cpp> | ||
- | Header | + | ObjectTemplate |
- | { | + | { |
- | char Signature[7]; "POSEW59" or "POSEW60" note: NOT null terminated | + | String ModelFilename; //"SomePrefixRoot\data\jablon.p3d\0" |
- | + | String ModelName; //"jablon" | |
- | ulong UnknownLong0; | + | ulong ObjectType; // 0..5 |
- | ulong UnknownLong1; // typically 0 | + | // 0 Undefined - This type should never be encountered. |
- | ulong IslandDataPathLen; | + | // 1 Natural |
- | String IslandDataPath[IslandDataPathLen];//"SomePboPrefix\SomeIsland\data\0" | + | // 2 Artificial |
- | ulong IslandObjectPathLen; | + | // 3 Road (RoadFlag will be true) |
- | String IslandObjectPath[IslandObjectPathLen];//"" | + | // 4 Forest |
- | float GridSize; //50.0 | + | // 5 Road2 (RoadFlag will be false) |
- | float SellSize; //400.0 (SegmentSize - SegmentOverlap) | + | RGBAColor OutlineColour; |
- | ulong IslandClassnameLen; | + | RGBAColor ObjectColour; |
- | String IslandClassname[IslandClassnameLen];//"" | + | double GeometryBounds[[2]]; // 50.0 |
- | }; | + | ulong ModelID; |
+ | XYZTriplet GeometryAutocenterPos; | ||
+ | double ResolutionBounds[[2]]; // 50.0 | ||
+ | XYZTriplet ResolutionAutoCenterPos; | ||
+ | shortBool Generally0x01; | ||
+ | shortBool RandomScaleFlag; | ||
+ | double RandomScaleMinMax[[2]]; // 50.0 | ||
+ | shortBool RandomRotateFlag; | ||
+ | double RandomRotateMinMax[[2]]; // 20.0 | ||
+ | shortBool RandomOrientationFlag; | ||
+ | double RanmdomOrientationMinMax[[2]]; // 180.0 | ||
+ | shortBool RoadFlag; | ||
+ | if (RoadFlag) | ||
+ | { | ||
+ | TransformMatrix RoadNamedSelections; // (LB, PB, LE, PE) | ||
+ | TransformMatrix XRoadNamedSelections; // (LD, LH, PD, PH) | ||
+ | }; | ||
+ | ulong nNamedVectors; // Usually 0 (zero) | ||
+ | NamedVector NamedVectors[nNamedVectors]; | ||
+ | ulong MarkerType; // Rectangular = 0, Elliptical = 1 | ||
+ | } | ||
</code> | </code> | ||
- | Texture | + | |
+ | ====== NamedVector ====== | ||
<code cpp> | <code cpp> | ||
- | TextureType [nTextureTypes] | + | NamedVector |
- | { | + | { |
- | ulong TextureID; | + | String Name; //"pohrada" |
- | ulong TextureFileNameLen; | + | LongBool Unknown; |
- | String TextureFileName[TextureFileNameLen]; // "snih3.paa" | + | ulong nTriplets; // always 2 |
- | ulong TextureNameLen; | + | XYZTriplet StartEndPos[[nTriplets]]; |
- | String TextureName[TextureNameLen]; // "snih3" | + | } |
- | ulong RvmatNameLen; | + | |
- | String RvmatName[RvmatNameLen]; // "snih3.rvmat" | + | |
- | Char UnlnownChar[14]; // (typically 0) | + | |
- | RGBAColor Colour; | + | |
- | } | + | |
</code> | </code> | ||
- | ObjectType | + | |
+ | ====== OFPTerrain ====== | ||
<code cpp> | <code cpp> | ||
- | ObjectType | + | OFPTerrain |
{ | { | ||
- | String ModelFilename; //"SomePrefixRoot\data\jablon.p3d\0" | + | String TerrainName; |
- | String ModelName; //"jablon" | + | byte UnknownBytes[[11]]; |
- | ulong ObjectType; // 0..5 | + | ulong nSurfaces; |
- | RGBAColor OutlineColour; | + | OFPSurface OFPSurfaces[[nSurfaces]]; |
- | RGBAColor ObjectColour; | + | |
- | VariousInfo: | + | |
- | double UnknDouble01; // 50.0 | + | |
- | double UnknDouble02; // 50.0 | + | |
- | ulong ModelID; | + | |
- | float UnknFloat[3]; | + | |
- | double UnknDouble11; // 50.0 | + | |
- | double UnknDouble12; // 50.0 | + | |
- | char UnknChar02[14]; | + | |
- | short ScaleFlag; // Random Scale Flag | + | |
- | double Scale0; // 50.0 | + | |
- | double Scale1; // 50.0 | + | |
- | short RotateFlag; // Random Rotate Flag | + | |
- | double Rotate0; // 20.0 | + | |
- | double Rotate1; // 20.0 | + | |
- | short OrientationFlag;// Random Orientation Flag | + | |
- | double Orientation0; // 180.0 | + | |
- | double Orientation1; // 180.0 | + | |
- | shortBool RoadFlag; | + | |
- | if (RoadFlag) | + | |
- | { | + | |
- | float UnknFloat[12]; | + | |
- | char UnknChar[48]; // (typically 0) | + | |
- | }; | + | |
- | ulong MarkerType; // See MarkerTypeEnum | + | |
- | LongBool LongBool; // 0 or 1 | + | |
} | } | ||
</code> | </code> | ||
- | NB: While the 'VariousInfo' byte array is decernable at this time it essentially defines various floats, integers, transforms etc. that denote the 'default' and/or 'seed' values for a given ObjectType. | ||
- | ObjectTypeID is also present at offset 16 in the VariousInfo's | + | ====== OFPSurface ====== |
- | + | ||
- | ArtificialSubObject | + | |
<code cpp> | <code cpp> | ||
- | ArtificialSubObject | + | OFPSurface |
{ | { | ||
- | String Name; //"pohrada" | + | String SurfaceName; |
- | LongBool LongBool; | + | float Surfacefloat[[4]]; |
- | ulong Always02; | + | byte UnknownBytes[[16]]; |
- | XYZTriplet StartEndPos[2]; | + | |
} | } | ||
</code> | </code> | ||
- | Terrains | ||
- | <code cpp> | + | ====== OFPForest ====== |
- | shortBool NoTerrains; | + | |
- | if (!NoTerrains) | + | |
- | { | + | |
- | ulong nTerrains; | + | |
- | TerrainType Terrains[nTerrains]; | + | |
- | { | + | |
- | ulong TerrainNameLen; | + | |
- | string TerrainName[TerrainNameLen]; | + | |
- | char unknchar[11]; | + | |
- | ulong nSurfaces; | + | |
- | SurfaceType [nSurfaces] | + | |
- | { | + | |
- | ulong SurfaceNameLen; | + | |
- | string SurfaceName[SurfaceNameLen]; | + | |
- | float Surfacefloat[4]; | + | |
- | char unknchar[16]; | + | |
- | } | + | |
- | } | + | |
- | </code> | + | |
- | + | ||
- | Forests | + | |
<code cpp> | <code cpp> | ||
- | shortBool NoForests; | + | OFPForest |
- | if (!NoForests) | + | { |
- | { | + | String ForestName; |
- | ulong nForests; | + | RGBAColor OutlineColour; |
- | ForestType Forests[nForests]; | + | RGBAColor ObjectColour; |
- | { | + | ulong SquareFillModelID; |
- | ulong ForestNameLen; | + | ulong SquareModelID; |
- | string ForestName[ForestNameLen]; | + | ulong TriangleModelID; |
- | RGBAColor OutlineColour; | + | ulong Unknown1; // (typically 0) |
- | RGBAColor ObjectColour; | + | ulong Unknown2; // (typically 0) |
- | ulong ModelID; // Square - fill | + | } |
- | ulong ModelID; // Square | + | |
- | ulong ModelID; // Triangle | + | |
- | ulong Unknown; // (typically 0) | + | |
- | ulong Unknown; // (typically 0) | + | |
- | } | + | |
- | } | + | |
</code> | </code> | ||
- | RoadNet | + | |
+ | ====== RoadNet ====== | ||
<code cpp> | <code cpp> | ||
- | shortBool NoRoads; | + | shortBool NoRoads; |
- | if (!NoRoads) | + | if (!NoRoads) |
- | { | + | { |
- | ulong nTypes; | + | ulong nTypes; |
- | RoadType RoadTypes[nTypes]; | + | RoadType RoadTypes[[nTypes]]; |
- | ulong nXRoads; | + | ulong nXRoads; |
- | XRoad XRoads[nXRoads]; | + | XRoad XRoads[[nXRoads]]; |
- | } | + | } |
</code> | </code> | ||
- | RoadType | + | ====== RoadType ====== |
<code cpp> | <code cpp> | ||
- | RoadType | + | RoadType |
- | { | + | { |
- | String FamilyName; // "cesta","silnice",etc | + | String FamilyName; // "cesta","silnice",etc |
- | RGBA KeyPartsColour; | + | RGBA KeyPartsColour; |
- | RGBA NormalPartsColour; | + | RGBA NormalPartsColour; |
- | shortBool FilledLine; // 0 or 1 | + | shortBool FilledLine; // 0 or 1 |
- | double MaxAngle; // 25.0 degrees | + | double MaxAngle; // 25.0 degrees |
- | double MaxBankAngle; // 5.0 degrees | + | double MaxBankAngle; // 5.0 degrees |
- | ulong nStraights; | + | ulong nStraights; |
- | RoadList Straights[nStraights]; | + | RoadList Straights[[nStraights]]; |
- | ulong nCurves; | + | ulong nCurves; |
- | RoadList Curves[nCurves]; | + | RoadList Curves[[nCurves]]; |
- | ulong nSpecials; | + | ulong nSpecials; |
- | RoadList Specials[nSpecials]; | + | RoadList Specials[[nSpecials]]; |
- | ulong nTerminators; | + | ulong nTerminators; |
- | RoadList Terminators[nTerminators]; | + | RoadList Terminators[[nTerminators]]; |
- | } | + | } |
- | } | + | } |
</code> | </code> | ||
- | RoadList | + | |
+ | ====== RoadList ====== | ||
<code cpp> | <code cpp> | ||
- | RoadList | + | RoadList |
- | { | + | { |
- | String ModelName; // "cesta25" | + | String ModelName; // "cesta25" |
- | ulong ObjectID; // in the model list | + | ulong ObjectID; // in the model list |
- | ushort MeterType; // 0,1,2,3 not present for Terminators | + | ushort MeterType; // 0,1,2,3 not present for Terminators |
- | shortBool CanChangeAngle; // not present for Terminators or Curves | + | shortBool CanChangeAngle; // not present for Terminators or Curves |
- | } | + | } |
- | </code> | + | |
MeterType | MeterType | ||
- | + | :Type Straights Curves | |
- | Type Straights Curves\\ | + | :0 6 25 meters |
- | 0 6 25 meters\\ | + | :1 12 50 |
- | 1 12 50\\ | + | :2 25 75 |
- | 2 25 75\\ | + | :3 100 |
- | 3 100 | + | </code> |
Broadly speaking, there are a few basic road types | Broadly speaking, there are a few basic road types | ||
- | * asfalt bitumen. | + | <code> |
- | * silnice Paved | + | *asfalt bitumen. |
- | * cesta dirt | + | *silnice Paved |
+ | *cesta dirt | ||
+ | </code> | ||
Each RoadType describes the general characteristics of a Dirt Road as opposed to (say) an Asphalt one. | Each RoadType describes the general characteristics of a Dirt Road as opposed to (say) an Asphalt one. | ||
- | Each of these RoadTypes (such as asphalt) can have multiple curved, straight, special, and termination p3d models associated with them. | + | Each of these RoadTypes (such as asphalt) can have multiple curved, straight, special, and termination p3d models associated with them. |
- | + | ||
- | Generally speaking, there are | + | |
- | + | ||
- | * 3 'straight' models, approximately 6,12, and 25 meters long respectively. | + | |
- | * 4 'curved' models, 25,50,75 and 100 meters long. | + | |
- | * 1 'terminaton type. | + | |
+ | Generally speaking, there are | ||
+ | <code> | ||
+ | *3 'straight' models, approximately 6,12, and 25 meters long respectively. | ||
+ | *4 'curved' models, 25,50,75 and 100 meters long. | ||
+ | *1 'terminaton type. | ||
+ | </code> | ||
The termination type is a road like any other but tends to be a fixed 6 meter fade out of the general road texture. | The termination type is a road like any other but tends to be a fixed 6 meter fade out of the general road texture. | ||
- | XRoad | + | |
+ | ====== XRoad ====== | ||
<code cpp> | <code cpp> | ||
- | XRoad | + | XRoad |
- | { | + | { |
- | String Name; //kr_asfaltka_asfaltka_t. | + | String Name; //kr_asfaltka_asfaltka_t. |
- | ushort Type //1 or 3 | + | ushort Shape; //1 or 3 |
- | RGBA color; //FF FF FF FF | + | RGBA color; //FF FF FF FF |
- | shortBool CanChangeBankAngle; | + | shortBool CanChangeBankAngle; |
- | ulong ObjectID; | + | ulong ObjectID; |
- | String Intersections[4]; //"asfaltka","silnice","cesta",Type=3 "silnice" else "" | + | String Intersections[[4]]; //"asfaltka","silnice","cesta",Type=3 "silnice" else "" |
- | } | + | } |
</code> | </code> | ||
Although CrossRoads could, conceivably, have any number of intersections, only two types are handled. | Although CrossRoads could, conceivably, have any number of intersections, only two types are handled. | ||
- | * Type 1: A T_Junction (3 intersections) | + | <code> |
- | * Type 3: A Genuine crossroad (4 way intersection) | + | *Type 1: A T_Junction (3 intersections) |
+ | *Type 3: A Genuine crossroad (4 way intersection) | ||
+ | </code> | ||
For T_Junctions, there is, obviously, no 4th intersection and this is null filled. | For T_Junctions, there is, obviously, no 4th intersection and this is null filled. | ||
Line 354: | Line 324: | ||
Without taking too literal an interpretation, there are some major types of road. | Without taking too literal an interpretation, there are some major types of road. | ||
- | * asfaltka:bitumen (sealed) | + | <code> |
- | * silnice: Paved | + | *asfaltka:bitumen (sealed) |
- | * cesta: Dirt | + | *silnice: Paved |
+ | *cesta: Dirt | ||
+ | </code> | ||
Thus the names of each intersection reflect the road type of that intersection, sometimes resulting in (up to) four identical names. | Thus the names of each intersection reflect the road type of that intersection, sometimes resulting in (up to) four identical names. | ||
- | The overall name of the crossroad itself, tries to reflect the nature of it's makeup thus kr_asfaltka_asfaltka_t: an bitumen T_Junction kr_silince_x_cesta: a crossroad of paved and dirt roads. | + | The overall name of the crossroad itself, tries to reflect the nature of it's makeup thus |
- | Terrain | + | kr_asfaltka_asfaltka_t: an bitumen T_Junction |
- | <code cpp> | + | kr_silince_x_cesta: a crossroad of paved and dirt roads. |
- | Terrain | + | |
- | { | + | |
- | XYPair TerrainGridSize; // 256 x 256 eg | + | |
- | float TerrainGridHeights[TerrainGridSize]; | + | |
- | float BlueEdgeTerrainHeights[NoOfBlueFloats] ; //Always zero values // NoOfBlueFloats = (TerrainGrid_Y * TerrainGrid_X)/16; | + | |
- | ulong Always0; | + | |
- | } | + | |
- | </code> | + | |
- | + | ||
- | Object | + | |
- | <code cpp> | ||
- | Object | ||
- | { | ||
- | ShortBool IsPresent; | ||
- | if (IsPresent) | ||
- | { | ||
- | ShortBool Always0; | ||
- | ulong InstanceId; | ||
- | float TransformColumn[3][4]; // described here to solidly illustrate to reader // this is a standard DirectX Transform matrix // but in COLUMN format; | ||
- | double ObjectRelativeSize; // decimal percentage | ||
- | String InstanceName; // "minimalStrelPos" | ||
- | float RelativeSurfaceElevation; | ||
- | RGBA OutlineColour; | ||
- | RGBA ObjectColour; | ||
- | ulong ObjectID; | ||
- | }; | ||
- | }; | ||
- | </code> | ||
- | Layer | + | ====== Elevation ====== |
<code cpp> | <code cpp> | ||
- | Layer | + | Elevation |
{ | { | ||
- | String Name1; //"Base" | + | XYPair GridSize; // 256 x 256 eg |
- | ulong SizeType; //0 | + | float Heights[[GridSize]]; |
- | String Name2; //"Base" | + | float BlueEdgeTerrainHeights[[NoOfBlueFloats]] ; //Always zero values |
- | ushort DefaultIndicator; // 1 | + | // NoOfBlueFloats = (GridSize_Y * GridSize_X)/16; |
- | ulong NoOfTerrainMaterials; | + | ulong Always0; |
- | TerrainMaterial TerrainMaterials[NoOfTerrainMaterials]; | + | |
- | } | + | |
} | } | ||
</code> | </code> | ||
- | TerrainMaterial | + | |
+ | ====== Object ====== | ||
<code cpp> | <code cpp> | ||
- | TerrainMaterial | + | Object |
- | { | + | { |
- | ulong BitFlags; // 1 = label, 0x40 = rvmatfile,,,, | + | ShortBool IsPresent; |
- | String MaterialName; // "---sea---","Layers\P_000-000_L00.rvmat" | + | if (IsPresent) |
- | ulong TypeID; // 0,1,2 | + | { |
- | } | + | ShortBool Moveable; // always 0 |
+ | ulong InstanceId; | ||
+ | float TransformColumn[[3]][[4]]; // described here to solidly illustrate to reader | ||
+ | // this is a standard DirectX Transform matrix | ||
+ | // but in COLUMN format; | ||
+ | double ObjectRelativeSize; // decimal percentage | ||
+ | String InstanceName; // "minimalStrelPos" | ||
+ | float RelativeSurfaceElevation; | ||
+ | RGBA OutlineColour; | ||
+ | RGBA ObjectColour; | ||
+ | ulong ObjectTemplateID; | ||
+ | }; | ||
+ | }; | ||
</code> | </code> | ||
- | Background | + | |
+ | ====== Layer ====== | ||
<code cpp> | <code cpp> | ||
- | Background // this structure has not been seen | + | Layer |
- | { | + | { |
- | String BackgroundFilename; | + | ulong SizeType; //0..2 //see below |
- | String BackgroundName; | + | String Name; //"Base" |
- | float OffsetX; | + | shortBool DefaultIndicator; // 0 ... 1 |
- | float OffsetY; | + | if (DefaultIndicator == 0) |
- | float SizeX; | + | { |
- | float SizeY; | + | ulong SurfaceTable[[TableSize.x*y]]; |
- | ulong Transparency; | + | ulong TextureTable[[TableSize.x*y]]; |
- | ulong Visible; | + | byte UnknownTable[[(TableSize.x*y/4)]]; |
- | } | + | ushort UnknownShort; |
+ | }; | ||
+ | if (DefaultIndicator == 1) | ||
+ | { | ||
+ | ulong NoOfTerrainMaterials; | ||
+ | TerrainMaterial[[NoOfTerrainMaterials]] | ||
+ | { | ||
+ | ulong BitFlags; // 1 = label, 0x40 = rvmatfile,,,, | ||
+ | String MaterialName; // "---sea---","Layers\P_000-000_L00.rvmat" | ||
+ | ulong TypeID; // 0..3 | ||
+ | }; | ||
+ | ulong RvmatTable[[TableSize.x*y]]; | ||
+ | }; | ||
+ | }; | ||
+ | |||
+ | TableSize = Terrain.GridSize>> SizeType; | ||
</code> | </code> | ||
- | RoadBlock | + | |
+ | ====== RoadBlock ====== | ||
<code cpp> | <code cpp> | ||
- | RoadBlock | + | RoadBlock |
- | { | + | |
- | ShortBool IsPresent; | + | |
- | if IsPresent | + | |
{ | { | ||
- | ShortBool Always1; | + | ShortBool IsPresent; |
- | ulong Unknown[12]; | + | if IsPresent |
- | /* typical data | + | { |
- | **00 00 00 00 00 00 00 F0 2C 46 00 98 23 46 C6 6F | + | ShortBool Always1; |
- | **C6 42 0E 01 00 00 01 00 00 F0 2C 46 00 98 23 46 | + | ulong Unknown[[12]]; |
- | **C6 6F C6 42 0E 01 00 00 4B 00 00 00 00 00 00 00 | + | /* typical data |
- | */ | + | **00 00 00 00 00 |
- | ushort Type; // 0,1,2,3 | + | 00 00 F0 2C |
- | String RoadFamilyName; //"hlavni silnice" | + | 46 00 98 23 |
- | String RoadModelName; //"kr_silnice_cesta_t" | + | 46 C6 6F C6 |
- | RGBA color; | + | 42 0E 01 00 |
- | ShortBool Always1; | + | 00 01 00 00 |
- | ulong Count; | + | F0 2C 46 00 |
- | FamilyList FamilyLists[Count]; | + | 98 |
- | ulong Unknown[27]; | + | 23 46 C6 6F |
- | /* typical data | + | C6 42 0E 01 |
- | **FA D4 30 BF 94 58 08 3D 00 00 C8 C0 00 00 60 C0 | + | 00 00 4B 00 |
- | **00 00 00 00 00 00 48 C1 00 00 60 40 00 00 00 00 | + | 00 00 00 00 |
- | **00 00 48 C1 00 00 60 C0 00 00 00 00 00 00 00 00 | + | 00 00 |
- | **00 00 60 40 00 00 00 00 00 00 00 00 00 00 C8 C0 | + | */ |
- | **00 00 00 00 00 00 30 C0 00 00 C8 C0 00 00 00 00 | + | ushort Type; // 0,1,2,3 |
- | **00 00 1C C1 04 01 00 00 00 00 00 00 00 00 00 00 | + | String RoadFamilyName; //"hlavni silnice" |
- | **09 00 00 00 0B 80 00 00 04 00 00 00 | + | String RoadModelName; //"kr_silnice_cesta_t" |
- | */ | + | RGBA color; |
- | ulong Count; | + | ShortBool Always1; |
- | ModelList ModelLists[Count]; | + | ulong Count; |
+ | FamilyList FamilyLists[[Count]]; | ||
+ | ulong Unknown[[27]]; | ||
+ | /* typical data | ||
+ | **FA D4 30 BF 94 58 08 3D 00 00 C8 C0 00 00 60 C0 | ||
+ | **00 00 00 00 00 00 48 C1 00 00 60 40 00 00 00 00 | ||
+ | **00 00 48 C1 00 00 60 C0 00 00 00 00 00 00 00 00 | ||
+ | **00 00 60 40 00 00 00 00 00 00 00 00 00 00 C8 C0 | ||
+ | **00 00 00 00 00 00 30 C0 00 00 C8 C0 00 00 00 00 | ||
+ | **00 00 1C C1 04 01 00 00 00 00 00 00 00 00 00 00 | ||
+ | **09 00 00 00 0B 80 00 00 04 00 00 00 | ||
+ | */ | ||
+ | ulong Count; | ||
+ | ModelList ModelLists[[Count]]; | ||
+ | } | ||
} | } | ||
- | } | + | Type |
+ | *0 Road Ending with FamilyName and it's ModelName_konec | ||
+ | *1 TJunction ModelName Only | ||
+ | *2 Road similar to type 0 | ||
+ | *3 Xroad with ModelName Only | ||
</code> | </code> | ||
- | Type | ||
- | * 0 Road Ending with FamilyName and it's ModelName_konec | + | ====== FamilyList ====== |
- | * 1 TJunction ModelName Only | + | |
- | * 2 Road similar to type 0 | + | |
- | * 3 Xroad with ModelName Only | + | |
- | + | ||
- | + | ||
- | FamilyList | + | |
<code cpp> | <code cpp> | ||
- | FamilyList | + | FamilyList |
- | { | + | { |
- | ulong Unknown[4];// Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 | + | ulong Unknown[[4]];// Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 |
- | String Name; // "silnice hlavni silnic\0" | + | String Name; // "silnice hlavni silnic\0" |
- | } | + | } |
</code> | </code> | ||
This struct is principally used for Xroads and Tjunctions. It typically lists the order of all RoadFamilyName's required | This struct is principally used for Xroads and Tjunctions. It typically lists the order of all RoadFamilyName's required | ||
- | ModelList | + | |
+ | ====== ModelList ====== | ||
<code cpp> | <code cpp> | ||
- | ModelList | + | ModelList |
- | { | + | { |
- | ulong Count; //15 eg | + | ulong Count; //15 eg |
- | BlockModel BlockModel[Count]; | + | BlockModel BlockModel[[Count]]; |
- | String FamilyName; //"silnice hlavni silnic\0" | + | String FamilyName; //"silnice hlavni silnic\0" |
- | ulong Unknown[4]; //Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 | + | ulong Unknown[[4]]; //Typically 00 00 C8 C0 00 00 C8 C0 00 00 00 00 0E 01 00 00 |
- | RGBA color[2]; | + | RGBA color[[2]]; |
- | ShortBool Always01; //01 | + | ShortBool Always01; //01 |
- | ulong buf2[4]; // Typically 00 00 00 00 00 00 39 40 00 00 00 00 00 00 24 40 | + | ulong buf2[[4]]; // Typically 00 00 00 00 00 00 39 40 00 00 00 00 00 00 24 40 |
- | } | + | } |
</code> | </code> | ||
- | BlockModel | + | |
+ | ====== BlockModel ====== | ||
<code cpp> | <code cpp> | ||
- | BlockModel | + | BlockModel |
- | { | + | { |
- | ulong unknown[6]; | + | ulong ModelFlag; // 0x000001 ... 0x00010001 |
- | /* typical data | + | XYZTriplet Position; // Model coordinates |
- | **01 00 01 00 00 86 2D 46 | + | float ModelDirection; |
- | **00 98 23 46 65 6C C5 42 | + | ulong ObjectID; |
- | **0E 01 00 00 4D 00 00 00 | + | ushort Type; //0,1,2,3 |
- | */ | + | String ModelName; //"silnice10 100\0" |
- | ushort Type; //0,1,2,3 | + | ulong unknown[[25]]; |
- | String ModelName; //"silnice10 100\0" | + | /*typical data |
- | ulong unknown[25]; | + | **00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |
- | /*typical data | + | **C4 76 C2 3F 0E EB 8A C1 00 00 00 00 BE 00 00 00 |
- | **00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | + | **CC ED 26 BE CA 0F 12 40 56 30 28 3F 00 00 00 00 |
- | **C4 76 C2 3F 0E EB 8A C1 00 00 00 00 BE 00 00 00 | + | **18 CA 04 C1 48 8B 3D C0 00 00 00 00 2D 3D 91 C1 |
- | **CC ED 26 BE CA 0F 12 40 56 30 28 3F 00 00 00 00 | + | **06 01 C0 40 00 00 00 00 EE 98 84 C1 99 99 91 C0 |
- | **18 CA 04 C1 48 8B 3D C0 00 00 00 00 2D 3D 91 C1 | + | **00 00 00 00 64 4A 5F 35 99 99 91 40 00 00 00 00 |
- | **06 01 C0 40 00 00 00 00 EE 98 84 C1 99 99 91 C0 | + | **64 4A 5F B5 01 00 |
- | **00 00 00 00 64 4A 5F 35 99 99 91 40 00 00 00 00 | + | */ |
- | **64 4A 5F B5 01 00 | + | ShortBool ok; // 0 or 1 |
- | */ | + | } |
- | ShortBool ok; // 0 or 1 | + | |
- | } | + | |
</code> | </code> | ||
- | UnknownStruct2 | + | |
+ | ====== NamedZone ====== | ||
<code cpp> | <code cpp> | ||
- | UnknownStruct2 | + | NamedZone |
- | { | + | |
- | ShortBool IsPresent; | + | |
- | if IsPresent | + | |
{ | { | ||
- | ShortBool Always0; | + | ShortBool IsPresent; |
- | BisString Name1; //"Les_new" | + | if IsPresent |
- | ulong Colour[3]; | + | |
- | ulong nFloats; | + | |
- | float Floats[nFloats]; | + | |
- | /* Typical Data | + | |
- | **00 00 61 45 00 78 1B 46 00 20 64 45 00 20 19 46 | + | |
- | **00 20 64 45 00 78 1B 46 00 40 67 45 00 58 18 46 | + | |
- | **00 40 67 45 00 78 1B 46 00 60 6A 45 00 58 18 46 | + | |
- | **00 60 6A 45 00 78 1B 46 00 80 6D 45 00 90 17 46 | + | |
- | **00 80 6D 45 00 B0 1A 46 00 A0 70 45 00 C8 16 46 | + | |
- | **00 A0 70 45 00 E8 19 46 00 C0 73 45 00 00 16 46 | + | |
- | */ | + | |
- | ulong ID; // 0,1,2,3,4.... | + | |
- | if POSEW60 | + | |
{ | { | ||
- | LongBool Always1; | + | ShortBool Movable; // Always0; |
+ | BisString Name1; //"Les_new" | ||
+ | ulong AreaColor,OutlineColor; | ||
+ | ulong DisplayStyle; | ||
+ | ulong nPoints; | ||
+ | PointsRectangle | ||
+ | { | ||
+ | float TopLeft.xy; | ||
+ | float BottomRight.xy; | ||
+ | }[[nPoints/4]]; | ||
+ | /* Typical Data | ||
+ | **00 00 61 45 00 78 1B 46 00 20 64 45 00 20 19 46 | ||
+ | **00 20 64 45 00 78 1B 46 00 40 67 45 00 58 18 46 | ||
+ | **00 40 67 45 00 78 1B 46 00 60 6A 45 00 58 18 46 | ||
+ | **00 60 6A 45 00 78 1B 46 00 80 6D 45 00 90 17 46 | ||
+ | **00 80 6D 45 00 B0 1A 46 00 A0 70 45 00 C8 16 46 | ||
+ | **00 A0 70 45 00 E8 19 46 00 C0 73 45 00 00 16 46 | ||
+ | */ | ||
+ | ulong ID; // 0,1,2,3,4.... | ||
+ | if POSEW60 | ||
+ | { | ||
+ | LongBool Visible; // always | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | BisString Name2; //Les_new Name2==Name1 | ||
+ | } | ||
} | } | ||
- | else | + | }; |
- | { | + | |
- | BisString Name2; //Les_new Name2==Name1 | + | |
- | } | + | |
- | } | + | |
- | }; | + | |
</code> | </code> | ||
- | Locale | + | |
+ | ====== KeyPoint ====== | ||
<code cpp> | <code cpp> | ||
- | Locale | + | KeyPoint |
- | { | + | { |
- | LongBool Always1; | + | LongBool Always1; |
- | String ClassName; //"Noe_Lany" | + | String ClassName; //"Noe_Lany" |
- | RGBA Colour[3]; | + | RGBA AreaColor,OutlineColor; |
- | ShortBool ShortInd; | + | ulong DisplayStyle; |
- | float Offset[2]; // map relative | + | ShortBool Visible; |
- | float Size[2]; // 250 x 250.0 eg | + | float Offset[[2]]; // map relative |
- | ulong ID; // 0,1,2,3,4,5,6.... | + | float Size[[2]]; // 250 x 250.0 eg (widht and height) |
- | BisString TownName; //"Lipany", "Hill" | + | ulong ID; // 0,1,2,3,4,5,6.... |
- | BisString LocaleType; //"NameCity" NameCityCapital, NameVillage, NameLocal, VegetationBroadLeaf,Hill,Marine,ViewPoint | + | BisString TownName; //"Lipany", "Hill" |
- | BisString NoName; // always null | + | BisString LocaleType; //"NameCity" NameCityCapital, NameVillage, NameLocal, VegetationBroadLeaf,Hill,Marine,ViewPoint |
- | } | + | BisString ClassText; // "canOcclude=1; BumbleButt='FlowControl2"; ++=)#4555Semi" |
+ | } | ||
</code> | </code> | ||
Each of these locales have a LocaleType. Some of which are: | Each of these locales have a LocaleType. Some of which are: | ||
- | * NameCity | + | *NameCity |
- | * NameCityCapital | + | |
- | * NameVillage | + | |
- | * VegetationBroadLeaf (Forest) | + | |
+ | *NameCityCapital | ||
+ | |||
+ | *NameVillage | ||
+ | |||
+ | *VegetationBroadLeaf (Forest) | ||
There is always a classname associated with this locale, | There is always a classname associated with this locale, | ||
- | * Forest_Owls | + | *Forest_Owls |
- | * Abel_LaTrinite | + | |
+ | *Abel_LaTrinite | ||
and in most cases a text name | and in most cases a text name | ||
Line 606: | Line 597: | ||
"La Refuge Des Chassuers" | "La Refuge Des Chassuers" | ||
- | (Type Viewpoints and Marine eg) do not have names associated with them. There is no "place" in the sea. | + | (Type Viewpoints and Marine eg) do not have names associated with them. There is no "place" in the sea. |
- | Enums | ||
- | ObjectClassEnum | + | ====== Background ====== |
<code cpp> | <code cpp> | ||
- | enum ObjectClassEnum | + | Background // this structure has not been seen |
- | { | + | { |
- | Natural = 1, | + | String BackgroundFilename;//"sat_lco.bmp" |
- | Artificial = 2, | + | String BackgroundName; //"overlay1" |
- | ArtificialAndDefinedInRoad = 5, | + | float OffsetXY[[2]]; |
- | Road = 3 | + | float SizeXY[[2]]; |
- | } | + | ulong Transparency; |
+ | shortBool Visible; // or ulong? | ||
+ | } | ||
</code> | </code> | ||
- | MarkerTypeEnum | + | |
+ | ====== Selection ====== | ||
<code cpp> | <code cpp> | ||
- | enum MarkerTypeEnum | + | Selection |
- | { | + | { |
- | Rectangular = 0, | + | ushort strlen; |
- | Elliptical = 1 | + | char[[]] SelectionName[[strlen]]; // NOT null terminated |
+ | ulong nSubSelections; | ||
+ | SubSelection SubSelections[[nSubSelections]] | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | ====== SubSelection ====== | ||
+ | |||
+ | <code cpp> | ||
+ | SubSelection | ||
+ | { | ||
+ | ulong ObjectId; | ||
+ | byte Type; | ||
+ | byte Unknown[[7]]; | ||
} | } | ||
</code> | </code> | ||
+ | |||
+ | ====== Enums ====== | ||
+ | |||
+ | ====== ObjectClassEnum ====== | ||
+ | |||
+ | <code cpp> | ||
+ | enum ObjectClassEnum | ||
+ | { | ||
+ | Natural = 1, | ||
+ | Artificial = 2, | ||
+ | Road = 3, | ||
+ | Forest = 4, | ||
+ | ArtificialAndDefinedInRoad = 5 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ====== MarkerTypeEnum ====== | ||
+ | |||
+ | <code cpp> | ||
+ | enum MarkerTypeEnum | ||
+ | { | ||
+ | Rectangular = 0, | ||
+ | Elliptical = 1 | ||
+ | } | ||
+ | </code> | ||
+ | |||
+ | As of v60 a rarely used sub structure with ObjTemplates. |