Prev: 53083 Up: Map Next: 53171
53159: Pathfinding data table
When built, this table has a header and a main data block. The header is three bytes long and contains the values:
Offset Value
0 255
1 255
2 Index of source room for search (e.g. Drutt's current room)
The body of the table is composed of two-byte entries which are made up of:
Offset Value
0 "Direction index" (1 or 2 indicating that room is to right or left, respectively, of source room)
1 Index of that room
The table is terminated with an end marker value of 255 after the final entry.
Since each room can only exist once in the table and the widest horizontal run of rooms in the game is five (levels 1 and 2), then the table is necessarily limited to four entries (eight bytes). This will occur when the source room, e.g. Drutt's room, lies within this horizontal run of five rooms but the target's does not. Adding the header and end marker results in a data block size of twelve bytes.
53159 DEFB 0,0,0
53162 DEFB 0,0
53164 DEFB 0,0
53166 DEFB 0,0
53168 DEFB 0,0
53170 DEFB 0
Prev: 53083 Up: Map Next: 53171