Prev: 56320 Up: Map Next: 56832
56576: Room 29: The Nightmare Room (teleport: 13459)
Used by the routine at 35068.
the_nightmare_room
The first 128 bytes define the room layout. Each bit-pair (bits 7 and 6, 5 and 4, 3 and 2, or 1 and 0 of each byte) determines the type of tile (background, floor, wall or nasty) that will be drawn at the corresponding location.
Input
Output
56576 DEFB 0,0,0,0,0,0,0,10 Room layout
56584 DEFB 0,0,0,0,0,0,0,10
56592 DEFB 0,0,0,0,0,0,0,10
56600 DEFB 0,0,0,0,0,0,0,10
56608 DEFB 0,0,0,0,0,0,0,10
56616 DEFB 0,0,4,0,64,4,0,10
56624 DEFB 0,0,0,16,0,0,0,10
56632 DEFB 0,1,0,0,1,0,0,10
56640 DEFB 0,0,4,0,0,4,0,10
56648 DEFB 0,0,0,16,0,0,0,10
56656 DEFB 0,0,0,0,1,0,4,10
56664 DEFB 0,0,4,0,0,4,0,10
56672 DEFB 170,168,0,16,0,0,0,10
56680 DEFB 170,170,0,0,0,0,0,0
56688 DEFB 170,170,128,0,0,0,0,0
56696 DEFB 170,170,170,170,170,170,170,170
The next 32 bytes contain the room name.
56704 DEFM " The Nightmare Room " Room name
The next 54 bytes contain the attributes and graphic data for the tiles used to build the room. Note that because of a bug in the game engine, the conveyor tile is not drawn correctly (see the room image above).
background29 floor29 wall29 nasty29 ramp29 conveyor29
56736 DEFB 0,0,0,0,0,0,0,0,0 Background
56745 DEFB 68,255,165,82,36,66,34,64,4 Floor
56754 DEFB 51,0,42,84,0,0,162,69,0 Wall
56763 DEFB 69,66,153,102,161,159,129,102,90 Nasty (unused)
56772 DEFB 7,128,192,160,240,248,92,186,2 Ramp
56781 DEFB 165,255,90,255,255,170,85,170,85 Conveyor
The next 8 bytes define the direction, location and length of the conveyor and ramp.
56790 DEFB 0,251,94,1 Conveyor direction (left), location (x=27, y=7) and length (1)
56794 DEFB 0,201,95,3 Ramp direction (left), location (x=9, y=14) and length (3)
The next byte specifies the border colour.
56798 DEFB 2 Border colour
56799 DEFB 0,0 Unused
The next 8 bytes define the item graphic.
item29
56801 DEFB 172,174,1,173,173,2,172,88 Item graphic
The next 4 bytes specify the rooms to the left, to the right, above and below.
56809 DEFB 30 Room to the left (The Banyan Tree)
56810 DEFB 28 Room to the right (First Landing)
56811 DEFB 0 Room above (The Off Licence)
56812 DEFB 0 Room below (The Off Licence)
56813 DEFB 0,0,0 Unused
The next 8 pairs of bytes specify the entities (ropes, arrows, guardians) in this room. The first byte in each pair identifies one of the entity definitions at 40960. The meaning of the second byte depends on the entity type: it determines the base sprite index and x-coordinate of a guardian, the y-coordinate of an arrow, or the x-coordinate of the top of a rope.
56816 DEFB 70,136 Guardian no. 70 (vertical), base sprite 4, x=8 (41520)
56818 DEFB 71,203 Guardian no. 71 (vertical), base sprite 6, x=11 (41528)
56820 DEFB 72,78 Guardian no. 72 (vertical), base sprite 2, x=14 (41536)
56822 DEFB 73,209 Guardian no. 73 (vertical), base sprite 6, x=17 (41544)
56824 DEFB 70,148 Guardian no. 70 (vertical), base sprite 4, x=20 (41520)
56826 DEFB 71,151 Guardian no. 71 (vertical), base sprite 4, x=23 (41528)
56828 DEFB 72,156 Guardian no. 72 (vertical), base sprite 4, x=28 (41536)
56830 DEFB 255,0 Terminator (41976)
Prev: 56320 Up: Map Next: 56832