Object Definitions - HoraceAndTheSpider/Bloodwych-68k GitHub Wiki
Objects are defined via a number of tabled references.
Pocket Definitions [ObjectDefinitionsTable]
The label [ObjectDefinitionsTable] in the sourcecode, at BW439[???] and BEXT[$EF4A] respectively is used to give initial definitions for all 85 objects as they appear in the Champions Pockets.
This block of data is $154 bytes long, with 4 bytes per object
| Icon/Byte 1 | Colour/Byte 2 | Name 1/Byte3 | Name 2/Byte 4 |
|---|---|---|---|
| 2B | 05 | 33 | 3D |
| Green | Long | Bow |
The Object's Icon is determined according the the main Tile sheet, which is 20 tiles wide by 6 tiles tall. A full list of all available icons are detailed here: Icon List
The Colour data is used for recolouring of specific items. Graphics drawn whcih include colour 15 (shown by default as a dark purple) are able to be be recoloured for reuse - e.g. with Potions, Rings, Wands etc.
Details regard the Game Palette are here Game Palette
Floor Shape [ObjectFloorShapeTable]
The $55 (85) bytes contained at this point denote consecutively the object's shape as it appears on the floor.

| # | Shape | # | Shape | # | Shape |
|---|---|---|---|---|---|
| 00 | Potion | 0A | 1/2 Apple | 14 | Crossbow |
| 01 | Key | 0B | Bota | 15 | Bow |
| 02 | Coin | 0C | Ring | 16 | Arrows |
| 03 | Apple | 0D | Crystal | 17 | Staff |
| 04 | Biscuit | 0E | Gloves | 18 | Blade |
| 05 | Chicken | 0F | Permit | 19 | Armour |
| 06 | Body | 10 | Book | 1A | Large Shield |
| 07 | Bone | 11 | Small Shield | ||
| 08 | Wand | 12 | Sword | ||
| 09 | N'Egg | 13 | Axe |
Floor Object Colour [ObjectColourSets]
The $55 (85) bytes contained at this point denote consecutively the object's colour set to be used as it appears on the floor. These are a pre-defined set of available palletes which are located in blocks of multiple bytes at [FloorObjectPalettes]
** section incomplete **
Available Colour Sets [FloorObjectPalettes]
Raw Graphic Data [FloorObjectShapeHeights] [FloorObjectGraphicOffsets]
SPS 439 record layout
The SPS 439 object-definition table is a contiguous array of $6E records,
four bytes per object. The record supplies the pocket icon number, pocket
colour/mask, and the two object-name references used by the description text.
The complete extracted resource is therefore $1B8 bytes and is stored by the
project as data/objectdefinitions.block.
The first record is object $00 (the empty slot). Object $01 is coinage,
followed by common keys, arrows, food, potions, armour and the remaining
equipment in the order shown in the object lookup table. Keeping the empty
record is important: it means the byte offset in the extracted file is simply
object_number × 4.
The floor appearance is not stored in this record. It is selected through the
parallel objectflooricons.block, objectfloor.colours, and
objectfloor.palette resources. The pocket icon and floor graphic can
therefore be changed independently.