1. Architectural Role & Engine Purpose
The SPR (Covert Strike Animated Sprite) format drives the tactical HUD, thermal-vision overlays, night-vision scanlines, dynamic sniper rifle reticles, and particle explosions in I.G.I. 2: Covert Strike.
In IGI 2, sprites support multi-channel alpha blending, dynamic color tinting, and sub-pixel rotation, enabling smooth analog compass needles, thermal heat-gradient crosshairs, and realistic weapon muzzle smoke.
2. Binary File Layout & Memory Map Diagram
An IGI 2 SPR file packs multiple sprite frames with per-frame UV boundaries and rotation pivots:
3. Tactical HUD & Thermal Vision Rendering Pipeline Diagram
Sprites integrate directly with the post-processing and tactical overlay renderer:
4. Architectural Mechanics & Engine Implementation Details
The IGI 2 sprite format modernized 2D rendering:
- Single Atlas Architecture: Unlike IGI 1 which stored discrete pixel buffers per frame, IGI 2 consolidates all frames into a single DXT3/ARGB texture sheet. Animation frames simply update UV coordinates, eliminating GPU texture switches.
- Sub-Pixel Rotation: Sniper reticles and compass indicators compute 2D rotation matrices in screen-space, enabling smooth 360-degree needle rotation.
5. C++ Struct Definitions
#pragma pack(push, 1)
struct SprHeaderIgi2 {
char magic[4]; // "SPR2"
uint16_t version; // 2
uint16_t frame_count; // Total animation frames
uint16_t blend_mode; // 0=Alpha, 1=Additive, 2=Thermal
uint16_t sheet_width; // Texture atlas width
uint16_t sheet_height; // Texture atlas height
uint32_t flags; // Post-process mask flags
uint32_t reserved;
};
struct SprFrameIgi2 {
float pivot_x; // Pivot center X
float pivot_y; // Pivot center Y
float uv_min[2]; // Top-left UV coordinates
float uv_max[2]; // Bottom-right UV coordinates
float duration; // Milliseconds to display frame
};
static_assert(sizeof(SprHeaderIgi2) == 24, "SprHeaderIgi2 must be 24 bytes");
#pragma pack(pop)