Airbourne Spells - HoraceAndTheSpider/Bloodwych-68k GitHub Wiki
Airbourne spells
Bloodwych uses object codes $80 and above for spell graphics travelling through, or occupying, the dungeon view. The SPS 439 source contains separate render paths and table groups for stationary spell pictures and flying spell pictures.
The spelling Airbourne is retained because it is used by the existing extracted filenames and source labels.
SPS 439 spell codes
| Code | Spell | Notes |
|---|---|---|
$80 |
Fireball | Uses AirbourneFireball.gfx. |
$81 |
Wychwind | Uses AirbourneFireball.gfx. |
$82 |
Arc Bolt | Uses AirbourneFireball.gfx. |
$83 |
Disrupt | Uses AirbourneFireball.gfx. |
$84 |
Blaze | Uses AirbourneFireball.gfx. |
$85 |
Fireball | Uses AirbourneFireball.gfx. |
$86 |
Flying Vivify | Uses the flying section of AirbourneSpells.gfx. |
$87 |
Firepath | Uses the flying section of AirbourneSpells.gfx. |
$88 |
Arrow | Uses the flying section of AirbourneSpells.gfx. |
$89 |
Elf Arrow | Uses the flying section of AirbourneSpells.gfx. |
$8A |
Missile | Uses the flying section of AirbourneSpells.gfx. |
$8B |
Confuse | Uses the flying section of AirbourneSpells.gfx. |
$8C |
Paralyze | Uses the flying section of AirbourneSpells.gfx. |
$8D |
Bigile | Uses the flying section of AirbourneSpells.gfx. |
$8E |
Full Spelltap | Uses the flying section of AirbourneSpells.gfx. |
$8F |
Terror | Uses the flying section of AirbourneSpells.gfx. |
$90–$93 |
Unconfirmed | Four colour records follow the confirmed SPS 439 set, but no corresponding graphical layout has yet been confirmed. They must not be treated as valid pictures merely by reading beyond the $80–$8F table. |
$94–$98 |
Extended Levels | Vortex, Spray, Nullify, another black/white spell, and Inferno are associated with BEXT and require its own version profile and extracted tables. |
Stationary spell tables
The stationary renderer uses the first portion of gfx/AirbourneSpells.gfx. Three adjacent source tables describe its four stored picture sizes:
| Source label | SPS 439 binary position | Extracted file | Size | Purpose |
|---|---|---|---|---|
GFX_StationarySpell_DistanceGroups |
$8FD6 |
gfx-data/AirbourneSpells_Stationary_DistanceGroups.lookup |
$06 |
Maps six visible distances to stored picture groups 0,0,1,1,2,3. |
GFX_StationarySpell_LookupTable |
$8FDC |
gfx-data/AirbourneSpells_Stationary.offsets |
$08 |
Four big-endian source offsets into the stationary portion of AirbourneSpells.gfx. |
GFX_StationarySpell_RenderLayout |
$8FE4 |
gfx-data/AirbourneSpells_Stationary.positions |
$10 |
Four packed records containing signed X, signed Y, width-minus-one, and height-minus-one. |
These 30 bytes are one contiguous source region. In segments.xlsx, the distance mapping is data_start; the offset and layout rows are data_append. The append rows use their real internal labels (adrW_009360 and adrB_009368), so no duplicate relabel rows are needed.
Flying spell tables
Draw_AirbourneSpell selects a distance group, graphical family, layout, and four replacement colours. The relevant extracted tables are:
| Source label | SPS 439 binary position | Extracted file | Size | Purpose |
|---|---|---|---|---|
GFX_Spell_ColourMasks |
$97EC |
gfx-data/AirbourneSpells.colours |
$50 |
Twenty four-byte colour-mask records. The first 16 correspond to $80–$8F; the final four are retained for source fidelity but have no confirmed SPS 439 rendering effect. |
GFX_AirbourneSpell_DistanceGroups |
$98E4 |
gfx-data/AirbourneSpell_DistanceGroups.lookup |
$06 |
Maps six visible distances to picture groups 0,0,1,1,2,3. |
GFX_AirbourneFireball_RenderLayout |
$98EA |
gfx-data/AirbourneFireball.layout |
$18 |
Four big-endian picture offsets followed by four packed X, Y, width-minus-one, and height-minus-one records for codes $80–$85. |
GFX_AirbourneSpells_RenderLayout |
$9902 |
gfx-data/AirbourneSpells_Flying.layout |
$18 |
Equivalent layout for codes $86–$8F. Its offsets are relative to the flying pictures beginning at AirbourneSpells.gfx+$4E0. |
The game stores four picture sizes for six visible distances; the nearest two distance pairs therefore reuse artwork rather than scaling it at runtime. Colour replacement is selected independently from the picture geometry.
The SPS 439 tables should remain bounded to the confirmed $80–$8F codes. BEXT spell codes must come from BEXT data rather than extending the SPS 439 lookup into unrelated following bytes.