1. Architectural Role & Engine Purpose
The OLM (Object Layout Map) format defines the spatial placement, orientation, and script linkages for all 3D world entities in Project I.G.I. 1.
OLM version v0.10 acts as the master world entity registry. It maps 3D models (buildings, security cameras,
guard posts, fences, ammo crates) to exact world coordinates using compact 16-byte descriptors (olm_item_s).
2. Binary File Layout & Memory Map Diagram
An OLM file begins with a 32-byte header with spatial world bounds, followed by the descriptor array and orientation table:
3. World Entity Instantiation Pipeline Diagram
During level initialization, the world manager parses OLM descriptors and spawns scene graph entities:
4. Architectural Mechanics & Engine Implementation Details
Innerloop designed the 16-byte OLM descriptor for massive world populations:
- Minimal Memory Footprint: In year 2000, 10,000 world objects required only 160 KB of descriptor memory, enabling entire outdoor valleys and military compounds to fit easily in memory.
- O(1) Spatial Sorting: World objects are bucketed into spatial grid sectors, accelerating frustum culling during flight simulator rendering passes.
5. C++ Struct Definitions
#pragma pack(push, 1)
struct OlmHeader {
char magic[4]; // "OLM "
uint16_t ver_major; // 0
uint16_t ver_minor; // 10 (v0.10)
uint32_t object_count; // Total world entity instances
float world_min[3]; // Valley bounding box minimum XYZ
float world_max[3]; // Valley bounding box maximum XYZ
};
static_assert(sizeof(OlmHeader) == 32, "OlmHeader must be 32 bytes");
// IGI 1 16-Byte Entity Descriptor
struct olm_item_s {
uint16_t model_id; // Model identifier in level registry
uint16_t flags; // Collision, shadow, visibility flags
float pos_x; // World coordinate X
float pos_y; // World elevation Y (Height)
float pos_z; // World coordinate Z
};
static_assert(sizeof(olm_item_s) == 16, "olm_item_s must be 16 bytes");
#pragma pack(pop)