Prev: 50944 Up: Map Next: 51456
51200: Room 8: Inside the MegaTrunk (teleport: 49)
Used by the routine at 35068.
inside_the_megatrunk
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
51200 DEFB 0,0,8,0,8,0,0,0 Room layout
51208 DEFB 0,0,8,0,8,0,0,0
51216 DEFB 0,0,8,0,8,0,0,0
51224 DEFB 0,0,8,1,64,0,0,0
51232 DEFB 0,0,9,0,0,0,0,0
51240 DEFB 0,0,0,0,26,170,128,0
51248 DEFB 0,0,0,5,8,0,0,0
51256 DEFB 170,170,168,0,8,0,0,0
51264 DEFB 48,195,9,0,8,0,0,0
51272 DEFB 48,195,8,0,88,0,0,0
51280 DEFB 48,195,8,0,8,0,0,0
51288 DEFB 48,195,8,5,0,0,0,0
51296 DEFB 48,195,8,0,0,0,0,0
51304 DEFB 48,195,9,0,10,170,170,170
51312 DEFB 48,195,8,0,8,0,0,0
51320 DEFB 48,195,8,0,88,0,0,0
The next 32 bytes contain the room name.
51328 DEFM " Inside the MegaTrunk " Room name
The next 54 bytes contain the attributes and graphic data for the tiles used to build the room.
background08 floor08 wall08 nasty08 ramp08 conveyor08
51360 DEFB 0,0,0,0,0,0,0,0,0 Background
51369 DEFB 4,245,250,191,31,38,20,34,16 Floor
51378 DEFB 22,171,171,173,170,170,174,85,85 Wall
51387 DEFB 6,110,116,56,30,110,116,56,30 Nasty
51396 DEFB 7,64,0,16,0,4,0,1,0 Ramp
51405 DEFB 255,0,0,0,0,0,0,0,0 Conveyor (unused)
The next 8 bytes define the direction, location and length of the conveyor and ramp.
51414 DEFB 0,0,0,0 Conveyor direction (left), location (x=0, y=0) and length (0)
51418 DEFB 0,251,94,3 Ramp direction (left), location (x=27, y=7) and length (3)
The next byte specifies the border colour.
51422 DEFB 4 Border colour
51423 DEFB 0,0 Unused
The next 8 bytes define the item graphic.
item08
51425 DEFB 0,0,0,0,0,0,0,0 Item graphic (unused)
The next 4 bytes specify the rooms to the left, to the right, above and below.
51433 DEFB 9 Room to the left (On a Branch Over the Drive)
51434 DEFB 7 Room to the right (Cuckoo's Nest)
51435 DEFB 12 Room above (Tree Top)
51436 DEFB 3 Room below (At the Foot of the MegaTree)
51437 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.
51440 DEFB 9,2 Guardian no. 9 (vertical), base sprite 0, x=2 (41032)
51442 DEFB 9,5 Guardian no. 9 (vertical), base sprite 0, x=5 (41032)
51444 DEFB 9,8 Guardian no. 9 (vertical), base sprite 0, x=8 (41032)
51446 DEFB 24,6 Guardian no. 24 (horizontal), base sprite 0, initial x=6 (41152)
51448 DEFB 44,44 Guardian no. 44 (vertical), base sprite 1, x=12 (41312)
51450 DEFB 22,27 Guardian no. 22 (horizontal), base sprite 0, initial x=27 (41136)
51452 DEFB 47,147 Guardian no. 47 (horizontal), base sprite 4, initial x=19 (41336)
51454 DEFB 255,0 Terminator (41976)
Prev: 50944 Up: Map Next: 51456