level


About

Contains all the essentials. This contains light sources, object descriptions, names of their corresponding textures and shaders, portals, and sectors.


Technical information

  • Format version: 14
  • Stores visual geometry in *.ogf format. Limitations and features are similar to *.ogf files without skeleton.
  • One mesh can store only one material.
  • The format stores visual geometry, collision geometry, sectors, portals, dynamic light sources, glow objects.

General structure - file blocks

Block code
Map compiler version1
Description of portals4
Light sources6
Coronas of light sources7
Objects3
Textures2
Sectors8

Map compiler version (the block is the same for all maps)

ValueSize
Block code1Word(2)
Data compression (0 - no, 32768 - yes)0Word(2)
Block size (bytes)4DWord(4)
Version number (the same for all)13DWord(4)

Description of portals (the block for all maps is the same and contains no data)

ValueSize
Block code4Word(2)
Data compression (0 - no, 32768 - yes)0Word(2)
Block size (bytes)0DWord(4)

Light Sources

ValueSize
Block code6Word(2)
Data compression (0 - no, 32768 - yes)0Word(2)
Block size (bytes)-DWord(4)
Light Source-(108*х)

Light Source

OffsetSize
Type of light source (only 1 or 2 were encountered)0DWord(4)
(only 1 or 3 were encountered)4DWord(4)
Color Red8Single(4)
Color Green12Single(4)
Color Blue16Single(4)
20DWord(4)
24DWord(4)
28DWord(4)
32DWord(4)
36DWord(4)
40DWord(4)
44DWord(4)
48DWord(4)
52DWord(4)
Coordinate X56Single(4)
Coordinate Z60Single(4)
Coordinate Y64Single(4)
Angle of rotation by X68Single(4)
Angle of rotation by Z72Single(4)
Angle of rotation by Y76Single(4)
80DWord(4)
84DWord(4)
88Single(4)
92Single(4)
96Single(4)
100DWord(4)
104Single(4)

Coronas of light sources

ValueSize
Block code7Word(2)
Data compression (0 - no, 32768 - yes)0Word(2)
Block size (bytes)-DWord(4)
Corona of the light source-(18*х)

Corona of the light source

ValueSize
Coordinate X0Single(4)
Coordinate Z4Single(4)
Coordinate Y8Single(4)
???12Single(4)
???16Word(2)

Textures

ValueSize
Block code2Word(2)
Data compression (0 - no, 32768 - yes)0Word(2)
Block size (bytes)-DWord(4)
Number of textures-DWord(4)
Textures--

Texture

Value Size
Shader (with path) - String
Separator "/" Byte(1)
Texture (with path) - String
Beginning of the optional part
Separator "," Byte(1)
Lightmap 1 - String
Separator "," Byte(1)
Lightmap 2 - String
End of the optional part
The zero symbol is the end of the texture name #0 Byte(1)

Note

Zero texture is specified without the file name and consists only of the symbol #0. So, after the field “number of textures” right after the symbol #0, do not be alarmed :)

Sectors

ValueSize
Block code8Word(2)
Data compression (0 - no, 32768 - yes)32768Word(2)
Block size (bytes)-DWord(4)
Uncompressed block size (in bytes)-DWord(4)
Description of Sectors-????

Programs editing this file


Sources

Source