Stage sprite sets (SP00) and the sand storm’s sprites

converter/spritesets.py reads this section and writes sprites.json plus the sheets (through pdconv --textures). Layout H (parsed on st02 / st12 / st22, sheet viewed); draw states M.

SP00 section (stNN.dat header word 0x9C)

Part Layout
header magic SP00, u32 set count, u32 version (1)
per set u32 frame count, then per frame 8 × f32: quad x0, y0, x1, y1 (all −5..5 in the data) and texture rectangle u0, v0, u1, v1
slot table header u32 length of the name list in bytes, u32 slot count (50)
name list NUL-terminated texture file names, not padded
per slot, 20 bytes i32 name index (−1 unused), u32 sprite set, u32 capacity (most sprites at once; 0 = not loaded), u32 frame count, u32 mode
Mode State
0 no blending; alpha test “greater than 254”; no depth write (cut-out)
1 source alpha / inverse source alpha
2 one / one (additive)
3 zero / inverse source alpha
4 inverse destination colour / inverse source colour
5 destination colour / one
6 not read

Highway (st02) sprites

Near papers (pdvkSPaperNear, 10) (M)

Init 0x140243fc0, tick 0x1402440d0, draw 0x140244a60. r = a fresh rand15/32767 each use.

Sphere (pdvkSSphere) (M / L)

Init 0x140244c70 halves its matrix scale and sets material flag 0x2000 on its model; tick 0x140244d70 builds a matrix from the wind direction; draw 0x140244dd0 (stage % 10 == 2 only) moves it to the same camera point and draws the model’s chunks. It is a camera-centred dome turned to the wind, the carrier of the vkSAND look. (stagefx 11-15) Model, matrix and shader are decoded in “Storm sphere, vkSAND, piece impact sounds and the object hit mark” (the 0.5 scale of the init does not survive the first tick).

Implementation notes for the rebuild

  1. Load sprites.json; draw far papers with slot 42 (cut-out, alpha > 254/255, no depth write), frame = variant × 32 + age mod 32, tinted by the stage light colour.
  2. Add the 10 near papers with slot 43 (alpha blend) from the numbers above, positions relative to the eye.
  3. Other stage sprites (drops, smoke) can take their sheet and frames from the same file: id − 3 = slot. The drop’s and the smoke’s ids still have to be read at their draw calls.
  4. Sphere: see the notes of “Storm sphere, vkSAND, piece impact sounds and the object hit mark” (stagefx 11-15).