Format:SPR (Quake)
| Developer | id Software |
|---|---|
| Versions | 1 (Quake); 2 is Half-Life, not covered |
| Magic | 49 44 53 50 ("IDSP") at offset 0, then int32 1 |
| Extensions | .spr |
| Endianness | little |
| On this wiki | Facts · Code · Notes · Topics |
Sprite format of Software:Quake: magic "IDSP", version 1, a 36-byte header (orientation type, bounding radius, maximum size, frame count, beam length, sync type) followed by single frames or frame groups of 8-bit images with an origin offset. Half-Life sprites share the magic but use version 2.
Identification
IDSP at offset 0, int32 version 1.
Structure
After the header, numframes entries, each starting with an int32 type: 0 = single frame, 1 = group (count, float intervals, then that many single frames). A single frame is a 16-byte header (origin[2], width, height as int32) followed by width * height palette indices.
The type field picks how the sprite is oriented towards the viewer (parallel upright, facing upright, parallel, oriented, parallel oriented: values 0-4).
Evidence & references
- id Software Quake source,
WinQuake/spritegn.h(dsprite_t,dspriteframe_t,SPRITE_VERSION),model.c(Mod_LoadSpriteModel) at commit bf4ac42. - Runtime test: the 3
.sprfiles of LibreQuake v0.09-betapak0.pakstart withIDSPand version 1.
Open questions
- Checked: palette index 255 is transparent in sprite frames. id-Software/Quake @ bf4ac424ce, WinQuake/d_sprite.c line 164 skips a texel with
if (btemp != 255)while drawing sprite spans, and WinQuake/d_iface.h line 183 defines TRANSPARENT_COLOR as 0xFF.Mod_LoadSpriteFramewas not read; the check was found in the software rasterizer only.