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.
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 |
Black/white spell | Earlier observations: “NO EFFECT?”; effect unconfirmed. |
$91 |
Red/yellow spell | Earlier observations: “NO EFFECT?”; effect unconfirmed. |
$92 |
Green/yellow spell | Earlier observations: “NO EFFECT?”; effect unconfirmed. |
$93 |
Blue/yellow spell | Earlier observations: “NO EFFECT?”; effect unconfirmed. |
$94 |
Vortex | BEXT. |
$95 |
Spray | BEXT. |
$96 |
Nullify? | BEXT; identification was tentative in the original notes. |
$97 |
Black/white spell | Earlier observations: “NO EFFECT?”; effect and version association unconfirmed. |
$98 |
Inferno | BEXT. |
The individual entries above retain the original colour descriptions and
uncertainties. Four colour records follow the confirmed SPS 439 set, but no
corresponding picture layout has been confirmed for $90–$93. Reading
past the $80–$8F layout table does not establish another valid picture.
The entries marked BEXT belong to Extended Levels, not the SPS 439 tables.
Codes $88 and $89 are created by the equipped-bow routine rather than spell casting. Their profession, bow and ammunition power calculations are documented under Archery Mechanics.
Creation by player spell handlers
The player spell handlers do not write graphics data. They allocate live dungeon records containing the effect code, caster, position, direction, floor, and calculated power; the renderer later interprets codes $80–$8F using the tables below.
Most handlers create one record. Wychwind is the exception: it creates eight $81 records with the direction-adjustment sequence 0, 1, 2, 3, 0, 2, 2, 0. That sequence is embedded in the handler's instructions rather than stored as a separate graphics or game-data table.
The handlers and their power transformations are listed under Spell Effects and Handlers.
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. The offsets and layout begin at the original source labels adrW_009360 and adrB_009368 respectively.
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.