![]() |
Data |
| Prev: 6108 | Up: Map | Next: 6251 |
|
Three records of three bytes, one for each shape of room. Bits 3 to 7 of byte 2 of a room record (location_tbl) pick one, and found_screen copies its three bytes into variables: byte 0 is half the room's width along x, to $5BAB; byte 1 is half its depth along y, to $5BAC; byte 2 is the height of the floor, to $5BAE.
Every room is centred on x = $80, y = $80, so shape 0 is a square room reaching from $40 to $C0 both ways, shape 1 is half as wide along x and shape 2 half as deep along y. The half sizes are what the movement code tests objects against to keep them inside the room (chk_plyr_OOB, and the exits at screen_west onwards). The floor is at $80 in all three: the third byte is a height, not a size. Of the castle's 128 rooms, 70 are shape 0, 34 shape 1 and 24 shape 2.
|
||||
| room_size_tbl | 6248 | DEFB $40,$40,$80 | Shape 0: square, $40 either side of the centre both ways; floor at $80 | |
| 624B | DEFB $20,$40,$80 | Shape 1: narrow in x ($20 either side), full depth in y; floor at $80 | ||
| 624E | DEFB $40,$20,$80 | Shape 2: full width in x, narrow in y ($20 either side); floor at $80 | ||
| Prev: 6108 | Up: Map | Next: 6251 |