OCAD 12 File Format: Difference between revisions
Line 86: | Line 86: | ||
| Res4: longint;|| not used | | Res4: longint;|| not used | ||
|} | |} | ||
<PRE> | |||
TFileHeader = record // size = 48 Byte | |||
OCADMark: SmallInt; // 3245 (hex 0cad) | |||
FileType: Byte; // file type (0: normal map, 1: course setting project, 8: file is saved in Server) | |||
FileStatus: Byte; // not used | |||
Version: SmallInt; // 11 | |||
Subversion: Byte; // number of subversion (0 for 11.0, 1 for 11.1 etc.) | |||
SubSubversion: Byte; // number of subsubversion (0 for 11.0.0, 1 for 11.0.1) | |||
FirstSymbolIndexBlk: integer; // file position of the first symbol index block | |||
ObjectIndexBlock: integer; // file position of the object index list | |||
OfflineSyncSerial: integer; // serialNumber for offline work in Server mode | |||
Res1: integer; // not used | |||
Res2: longint; // not used | |||
Res3: longint; // not used | |||
FirstStringIndexBlk: longint; // file position of the first string index block | |||
FileNamePos: integer; // file position of the file name, used for temporary files only | |||
FileNameSize: integer; // size of the file name, used for temporary files only | |||
Res4: integer; // not used | |||
</PRE> | |||
== Symbols == | == Symbols == |
Revision as of 13:26, 2 April 2012
Version: 2012-02-09
General
This is a description of the file format of OCAD 11 files.
Be aware that this is an internal format and may change in future versions.
Data types used
OCAD is written in 32-bit Delphi and this description uses the names for the data types as they appear in Delphi. However the same data types are available in other development systems like C++.
Integer | 32-bit signed integer |
SmallInt | 16-bit signed integer |
Word | 16-bit unsigned integer |
WordBool | 16-bit boolean |
String[x] |
Widestring. The first byte contains the number of characters followed by the characters. The string is not zero-terminated. The maximum number of characters is x. It occupies x + 1 bytes in the file. |
Double | 64-bit floating point number |
TDPoly | A special data type (64-bit) used for all coordinates and text. It is defined as
TDPoly = record The lowest 8 Bits are used to mark special points: Marks for the x-coordinate: Marks for y-coordinate: The upper 24 bits contain the coordinate value measured in units of 0.01 mm. |
Note: all file positions are in bytes starting from the beginning of the file.
File Header
OCAD files start with a file header.
TFileHeader = record | Size = 48 Byte |
---|---|
OCADMark: SmallInt; | 3245 (hex 0cad) |
FileType: Byte; | file type (0: normal map, 1: course setting project, 8: file is saved in Server) |
FileStatus: Byte; | not used |
Version: SmallInt; | 11 |
Subversion: Byte; | number of subversion (0 for 11.00, 1 for 11.1 etc.) |
SubSubversion: Byte; | number of subsubversion (0 for 11.0.0, 1 for 11.0.1) |
FirstSymbolIndexBlock: integer; | file position of the first symbol index block |
ObjectIndexBlock: integer; | file position of object index block |
OfflineSyncSerial: integer; | serialNumber for offline work in Server mode |
Res1: integer; | not used |
Res2: integer; | not used |
Res3: integer; | not used |
FirstStringIndexBlock: longint; | file position of string index block |
FileNamePos: integer; | file position of file name, used for temporary files only |
FileNameSize: integer; | size of the file name, used for temporary files only |
Res4: longint; | not used |
TFileHeader = record // size = 48 Byte OCADMark: SmallInt; // 3245 (hex 0cad) FileType: Byte; // file type (0: normal map, 1: course setting project, 8: file is saved in Server) FileStatus: Byte; // not used Version: SmallInt; // 11 Subversion: Byte; // number of subversion (0 for 11.0, 1 for 11.1 etc.) SubSubversion: Byte; // number of subsubversion (0 for 11.0.0, 1 for 11.0.1) FirstSymbolIndexBlk: integer; // file position of the first symbol index block ObjectIndexBlock: integer; // file position of the object index list OfflineSyncSerial: integer; // serialNumber for offline work in Server mode Res1: integer; // not used Res2: longint; // not used Res3: longint; // not used FirstStringIndexBlk: longint; // file position of the first string index block FileNamePos: integer; // file position of the file name, used for temporary files only FileNameSize: integer; // size of the file name, used for temporary files only Res4: integer; // not used
Symbols
TODO
Objects
TODO
Parameter Strings
TODO