; © 2012-2023, 2025, 2026 Richard Dymond (rjdymond@gmail.com)

@rom
@defs=23552:9536 ; Clear all buffers
; Attribute buffer (room + Willy + entities + items)
;
; The routine at #R35245 initialises this buffer with the contents of the
; attribute buffer at #R24064 (empty room), writes the attributes for Willy,
; the arrows, the guardians and the items into it, and then copies the result
; to the attribute file.
b23552 DEFS 512

@defs=24064:512
; Attribute buffer (empty room)
;
; Initialised upon entry to a room by the routine at #R36203.
b24064 DEFS 512

; Screen buffer (room + Willy + entities + items)
;
; The routine at #R35245 initialises this buffer with the contents of the
; screen buffer at #R28672 (empty room), draws Willy, the rope, the arrows, the
; guardians and the items over this background, and then copies the result to
; the display file.
b24576 DEFS 4096

; Screen buffer (empty room)
;
; Initialised upon entry to a room by the routine at #R36147, and updated on
; each pass through the main loop by the routine at #R38137 if there is a
; conveyor in the room.
b28672 DEFS 4096

@start
@replace=/#n\i/#N\1,,,1($)
@replace=/#b\i/#N(\1,,,1)(0x)
@expand=#DEF(#BUG()(a) #LINK(Bugs#$a))
@expand=#DEF(#FACT()(a) #LINK(Facts#$a))
@expand=#DEF(#POKE()(a) #LINK(Pokes#$a))
@expand=#DEF(#S #FORMAT({mode[case]}))
@expand=#DEF(#GBUF(a,b=0) #LINK(GameStatusBuffer#$a)(#N$a#IF($b)(-#N$b)))
@set-handle-unsupported-macros=1
; Jet Set Willy disassembly
; https://skoolkit.ca
;
; © 1984 Software Projects Ltd (Jet Set Willy)
; © 2012-2023, 2025, 2026 Richard Dymond (this disassembly)
@bfix+begin
;
; This disassembly contains fixes for the following bugs:
;   * The invisible item
;   * The inaccessible items
;   * The uncollectable item
;   * Invalid grid location
;   * The pause bug
;   * The Attic bug
;   * Corrupted conveyors
;   * Very corrupted conveyor
;   * Guardian halos
;   * Long distance nasties
;   * From top to bottom
;   * The self-collecting item
;   * The sticky bed
; See https://skoolkit.ca/disassemblies/jet_set_willy/reference/bugs.html for
; full descriptions of these bugs.
@bfix+end

@isub+begin
@org
c32765 JP 33792
@isub+end

; Room layout
;
; Initialised upon entry to a room and then used by the routine at #R35090, and
; also used by the routine at #R36203.
@label=ROOMLAYOUT
g32768 DEFS 128

; Room name
;
; Initialised upon entry to a room and then used by the routine at #R35090.
@label=ROOMNAME
g32896 DEFS 32

; Room tiles
;
; Initialised upon entry to a room by the routine at #R35090.
@label=BACKGROUND
g32928 DEFS 9        ; Background tile (used by the routines at #R36147,
                     ; #R36288, #R36307 and #R38430, and also by the unused
                     ; routine at #R37819)
@label=FLOOR
 32937 DEFS 9        ; Floor tile (used by the routines at #R36147 and #R36288)
@label=WALL
 32946 DEFS 9        ; Wall tile (used by the routines at #R36147, #R36288,
                     ; #R36307 and #R36796)
@label=NASTY
 32955 DEFS 9        ; Nasty tile (used by the routines at #R36147, #R36288,
                     ; #R36307 and #R38430)
@label=RAMP
 32964 DEFS 9        ; Ramp tile (used by the routines at #R36147, #R36203,
                     ; #R36796 and #R38344)
@label=CONVEYOR
 32973 DEFS 9        ; Conveyor tile (used by the routines at #R36147, #R36203
                     ; and #R36564)

; Conveyor definition
;
; Initialised upon entry to a room by the routine at #R35090.
@label=CONVDIR
g32982 DEFB 0        ; Direction (0=left, 1=right; used by the routines at
                     ; #R36564 and #R38137)
@label=CONVLOC
 32983 DEFW 0        ; Address of the conveyor's location in the attribute
                     ; buffer at #R24064 (used by the routines at #R36203 and
                     ; #R38137)
@label=CONVLEN
 32985 DEFB 0        ; Length (used by the routines at #R36203 and #R38137)

; Ramp definition
;
; Initialised upon entry to a room by the routine at #R35090.
@label=RAMPDIR
g32986 DEFB 0        ; Direction (0=up to the left, 1=up to the right; used by
                     ; the routines at #R36203, #R36796 and #R38344)
@label=RAMPLOC
 32987 DEFW 0        ; Address of the location of the bottom of the ramp in the
                     ; attribute buffer at #R24064 (used by the routine at
                     ; #R36203)
@label=RAMPLEN
 32989 DEFB 0        ; Length (used by the routine at #R36203)

; Border colour
;
; Initialised upon entry to a room and then used by the routine at #R35090, and
; also used by the routines at #R35591, #R36307, #R37310 and #R37841.
@label=BORDER
g32990 DEFB 0

; Unused
;
; These bytes are overwritten upon entry to a room by the routine at #R35090,
; but not used.
@label=XROOM223
u32991 DEFS 2

; Item graphic
;
; Initialised upon entry to a room by the routine at #R35090, and used by the
; routine at #R37841.
@label=ITEM
g32993 DEFS 8

; Room exits
;
; Initialised upon entry to a room by the routine at #R35090.
@label=LEFT
g33001 DEFB 0        ; Room to the left (used by the routine at #R38026)
@label=RIGHT
 33002 DEFB 0        ; Room to the right (used by the routine at #R38046)
@label=ABOVE
 33003 DEFB 0        ; Room above (used by the routines at #R37310 and #R38064)
@label=BELOW
 33004 DEFB 0        ; Room below (used by the routine at #R38098)

; Unused
;
; These bytes are overwritten upon entry to a room by the routine at #R35090,
; but not used.
@label=XROOM237
u33005 DEFS 3

; Entity specifications
;
; Initialised upon entry to a room and then used by the routine at #R35090.
; .
; There are eight pairs of bytes here that hold the entity specifications for
; the current room. The first byte in each pair identifies one of the entity
; definitions at #R40960. 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.
@label=ENTITIES
g33008 DEFS 2        ; Entity 1
 33010 DEFS 2        ; Entity 2
 33012 DEFS 2        ; Entity 3
 33014 DEFS 2        ; Entity 4
 33016 DEFS 2        ; Entity 5
 33018 DEFS 2        ; Entity 6
 33020 DEFS 2        ; Entity 7
 33022 DEFS 2        ; Entity 8

; Entity buffers
;
; Initialised by the routine at #R35090, and used by the routines at #R37056
; and #R37310. There are eight buffers here, each one eight bytes long, used to
; hold the state of the entities (rope, arrows and guardians) in the current
; room.
; .
; For a horizontal guardian, the eight bytes are used as follows:
; .
; #TABLE(default,centre,:w)
; { =h Byte | =h Contents }
; { =r4 0 | Bit 7: direction (0=left, 1=right) }
; { Bits 5-6: animation frame index }
; { Bits 3-4: unused }
; { Bits 0-2: entity type (001) }
; { =r4 1 | Bits 5-7: #LINK(Glossary#animation_frame_index_mask)(animation
; frame index mask) }
; { Bit 4: unused }
; { Bit 3: BRIGHT value }
; { Bits 0-2: INK colour }
; { =r2 2 | Bits 5-7: base sprite index }
; { Bits 0-4: x-coordinate }
; { 3 | Pixel y-coordinate x2 (index into the table at #R33280) }
; { 4 | Unused }
; { 5 | Page containing the sprite graphic data (see #R43776) }
; { 6 | Minimum x-coordinate }
; { 7 | Maximum x-coordinate }
; TABLE#
; .
; For a vertical guardian, the eight bytes are used as follows:
; .
; #TABLE(default,centre,:w)
; { =h Byte | =h Contents }
; { =r3 0 | Bits 5-7: animation frame index }
; { Bits 3-4: animation frame update flags (see #R37247) }
; { Bits 0-2: entity type (010) }
; { =r4 1 | Bits 5-7: #LINK(Glossary#animation_frame_index_mask)(animation
; frame index mask) }
; { Bit 4: unused }
; { Bit 3: BRIGHT value }
; { Bits 0-2: INK colour }
; { =r2 2 | Bits 5-7: base sprite index }
; { Bits 0-4: x-coordinate }
; { 3 | Pixel y-coordinate x2 (index into the table at #R33280) }
; { 4 | Pixel y-coordinate increment }
; { 5 | Page containing the sprite graphic data (see #R43776) }
; { 6 | Minimum y-coordinate }
; { 7 | Maximum y-coordinate }
; TABLE#
; .
; For an arrow, the eight bytes are used as follows:
; .
; #TABLE(default,centre,:w)
; { =h Byte | =h Contents }
; { =r3 0 | Bit 7: direction (0=left, 1=right) }
; { Bits 3-6: unused }
; { Bits 0-2: entity type (100) }
; { 1 | Unused }
; { 2 | Pixel y-coordinate x2 (index into the table at #R33280) }
; { 3 | Unused }
; { 4 | x-coordinate }
; { 5 | Collision detection byte (#b0=off, #b255=on) }
; { 6 | Top/bottom pixel row (drawn either side of the shaft) }
; { 7 | Unused }
; TABLE#
; .
; The rope uses the second and fourth bytes of the following buffer in addition
; to its own; these ten bytes are used as follows:
; .
; #TABLE(default,centre,:w)
; { =h Byte | =h Contents }
; { =r3 0 | Bit 7: direction (0=left, 1=right) }
; { Bits 3-6: unused }
; { Bits 0-2: entity type (011) }
; { 1 | Animation frame index }
; { 2 | x-coordinate of the top of the rope }
; { 3 | x-coordinate of the segment of rope being drawn }
; { 4 | Length (#b32) }
; { 5 | Segment drawing byte }
; { 6 | Unused }
; { 7 | Animation frame at which the rope changes direction (#b54) }
; { 9 | Index of the segment of rope being drawn (#b0-#b32) }
; { =r2 11 | Bits 1-7: unused }
; { Bit 0: Willy is on the rope (set), or not (reset) }
; TABLE#
; .
; Note that if a rope were the eighth entity specified in a room, its buffer
; would use the first and third bytes in the otherwise unused area at #R33089.
@label=ENTITYBUF
g33024 DEFS 8        ; Entity 1
 33032 DEFS 8        ; Entity 2
 33040 DEFS 8        ; Entity 3
 33048 DEFS 8        ; Entity 4
 33056 DEFS 8        ; Entity 5
 33064 DEFS 8        ; Entity 6
 33072 DEFS 8        ; Entity 7
 33080 DEFS 8        ; Entity 8
 33088 DEFB 255      ; Terminator

; Unused
;
; This area is not used, but if a rope were the eighth entity specified in a
; room, its buffer would spill over from the eighth slot at #R33024 and use the
; first and third bytes here.
@label=EBOVERFLOW
s33089 DEFS 191

; Screen buffer address lookup table
;
; Used by the routines at #R35914, #R37310 and #R38455. The value of the Nth
; entry (0<=N<=127) in this lookup table is the screen buffer address for the
; point with pixel coordinates (x,y)=(0,N), with the origin (0,0) at the
; top-left corner.
@label=SBUFADDRS
w33280 DEFW 24576    ; y=0
 33282 DEFW 24832    ; y=1
 33284 DEFW 25088    ; y=2
 33286 DEFW 25344    ; y=3
 33288 DEFW 25600    ; y=4
 33290 DEFW 25856    ; y=5
 33292 DEFW 26112    ; y=6
 33294 DEFW 26368    ; y=7
 33296 DEFW 24608    ; y=8
 33298 DEFW 24864    ; y=9
 33300 DEFW 25120    ; y=10
 33302 DEFW 25376    ; y=11
 33304 DEFW 25632    ; y=12
 33306 DEFW 25888    ; y=13
 33308 DEFW 26144    ; y=14
 33310 DEFW 26400    ; y=15
 33312 DEFW 24640    ; y=16
 33314 DEFW 24896    ; y=17
 33316 DEFW 25152    ; y=18
 33318 DEFW 25408    ; y=19
 33320 DEFW 25664    ; y=20
 33322 DEFW 25920    ; y=21
 33324 DEFW 26176    ; y=22
 33326 DEFW 26432    ; y=23
 33328 DEFW 24672    ; y=24
 33330 DEFW 24928    ; y=25
 33332 DEFW 25184    ; y=26
 33334 DEFW 25440    ; y=27
 33336 DEFW 25696    ; y=28
 33338 DEFW 25952    ; y=29
 33340 DEFW 26208    ; y=30
 33342 DEFW 26464    ; y=31
 33344 DEFW 24704    ; y=32
 33346 DEFW 24960    ; y=33
 33348 DEFW 25216    ; y=34
 33350 DEFW 25472    ; y=35
 33352 DEFW 25728    ; y=36
 33354 DEFW 25984    ; y=37
 33356 DEFW 26240    ; y=38
 33358 DEFW 26496    ; y=39
 33360 DEFW 24736    ; y=40
 33362 DEFW 24992    ; y=41
 33364 DEFW 25248    ; y=42
 33366 DEFW 25504    ; y=43
 33368 DEFW 25760    ; y=44
 33370 DEFW 26016    ; y=45
 33372 DEFW 26272    ; y=46
 33374 DEFW 26528    ; y=47
 33376 DEFW 24768    ; y=48
 33378 DEFW 25024    ; y=49
 33380 DEFW 25280    ; y=50
 33382 DEFW 25536    ; y=51
 33384 DEFW 25792    ; y=52
 33386 DEFW 26048    ; y=53
 33388 DEFW 26304    ; y=54
 33390 DEFW 26560    ; y=55
 33392 DEFW 24800    ; y=56
 33394 DEFW 25056    ; y=57
 33396 DEFW 25312    ; y=58
 33398 DEFW 25568    ; y=59
 33400 DEFW 25824    ; y=60
 33402 DEFW 26080    ; y=61
 33404 DEFW 26336    ; y=62
 33406 DEFW 26592    ; y=63
 33408 DEFW 26624    ; y=64
 33410 DEFW 26880    ; y=65
 33412 DEFW 27136    ; y=66
 33414 DEFW 27392    ; y=67
 33416 DEFW 27648    ; y=68
 33418 DEFW 27904    ; y=69
 33420 DEFW 28160    ; y=70
 33422 DEFW 28416    ; y=71
 33424 DEFW 26656    ; y=72
 33426 DEFW 26912    ; y=73
 33428 DEFW 27168    ; y=74
 33430 DEFW 27424    ; y=75
 33432 DEFW 27680    ; y=76
 33434 DEFW 27936    ; y=77
 33436 DEFW 28192    ; y=78
 33438 DEFW 28448    ; y=79
 33440 DEFW 26688    ; y=80
 33442 DEFW 26944    ; y=81
 33444 DEFW 27200    ; y=82
 33446 DEFW 27456    ; y=83
 33448 DEFW 27712    ; y=84
 33450 DEFW 27968    ; y=85
 33452 DEFW 28224    ; y=86
 33454 DEFW 28480    ; y=87
 33456 DEFW 26720    ; y=88
 33458 DEFW 26976    ; y=89
 33460 DEFW 27232    ; y=90
 33462 DEFW 27488    ; y=91
 33464 DEFW 27744    ; y=92
 33466 DEFW 28000    ; y=93
 33468 DEFW 28256    ; y=94
 33470 DEFW 28512    ; y=95
 33472 DEFW 26752    ; y=96
 33474 DEFW 27008    ; y=97
 33476 DEFW 27264    ; y=98
 33478 DEFW 27520    ; y=99
 33480 DEFW 27776    ; y=100
 33482 DEFW 28032    ; y=101
 33484 DEFW 28288    ; y=102
 33486 DEFW 28544    ; y=103
 33488 DEFW 26784    ; y=104
 33490 DEFW 27040    ; y=105
 33492 DEFW 27296    ; y=106
 33494 DEFW 27552    ; y=107
 33496 DEFW 27808    ; y=108
 33498 DEFW 28064    ; y=109
 33500 DEFW 28320    ; y=110
 33502 DEFW 28576    ; y=111
 33504 DEFW 26816    ; y=112
 33506 DEFW 27072    ; y=113
 33508 DEFW 27328    ; y=114
 33510 DEFW 27584    ; y=115
 33512 DEFW 27840    ; y=116
 33514 DEFW 28096    ; y=117
 33516 DEFW 28352    ; y=118
 33518 DEFW 28608    ; y=119
 33520 DEFW 26848    ; y=120
 33522 DEFW 27104    ; y=121
 33524 DEFW 27360    ; y=122
 33526 DEFW 27616    ; y=123
 33528 DEFW 27872    ; y=124
 33530 DEFW 28128    ; y=125
 33532 DEFW 28384    ; y=126
 33534 DEFW 28640    ; y=127

; Rope animation table
;
; Used by the routine at #R37310. The first half of this table controls the
; x-coordinates at which the segments of rope are drawn, and the second half
; controls the y-coordinates. For a given rope animation frame F
; (#b0<=F<=#b54), the 32 entries from F to F+31 inclusive (one for each of the
; 32 segments of rope below the topmost one) in each half of the table are
; used; thus the batch of entries used 'slides' up and down the table as F
; increases and decreases.
@label=ROPEANIM
b33536 DEFB 0,0,0,0,0,0,0,0 ; {These values determine how much to rotate the
 33544 DEFB 0,0,0,0,0,0,0,0 ; rope drawing byte (which in turn determines the
 33552 DEFB 0,0,0,0,0,0,0,0 ; x-coordinate at which each segment of rope is
 33560 DEFB 0,0,0,0,0,0,0,0 ; drawn)
 33568 DEFB 1,1,1,1,1,1,1,1 ;
 33576 DEFB 1,1,1,1,2,2,2,2 ;
 33584 DEFB 2,2,2,2,2,2,2,2 ;
 33592 DEFB 2,2,2,2,2,2,2,2 ;
 33600 DEFB 2,2,1,2,2,1,1,2 ;
 33608 DEFB 1,1,2,2,3,2,3,2 ;
 33616 DEFB 3,3,3,3,3,3     ; }
 33622 DEFB 0,0,0,0,0,0,0,0 ; {Unused
 33630 DEFB 0,0,0,0,0,0,0,0 ;
 33638 DEFB 0,0,0,0,0,0,0,0 ;
 33646 DEFB 0,0,0,0,0,0,0,0 ;
 33654 DEFB 0,0,0,0,0,0,0,0 ;
 33662 DEFB 0,0             ; }
 33664 DEFB 6,6,6,6,6,6,6,6 ; {These values determine the y-coordinate of each
 33672 DEFB 6,6,6,6,6,6,6,6 ; segment of rope relative to the one above it
 33680 DEFB 6,6,6,6,6,6,6,6 ;
 33688 DEFB 6,6,6,6,6,6,6,6 ;
 33696 DEFB 6,6,6,6,6,6,6,6 ;
 33704 DEFB 6,6,6,6,6,6,6,6 ;
 33712 DEFB 4,6,6,4,6,4,6,4 ;
 33720 DEFB 6,4,4,4,6,4,4,4 ;
 33728 DEFB 4,4,4,4,4,4,4,4 ;
 33736 DEFB 4,4,4,4,4,4,4,4 ;
 33744 DEFB 4,4,4,4,4,4     ; }
 33750 DEFB 0,0,0,0,0,0,0,0 ; {Unused
 33758 DEFB 0,0,0,0,0,0,0,0 ;
 33766 DEFB 0,0,0,0,0,0,0,0 ;
 33774 DEFB 0,0,0,0,0,0,0,0 ;
 33782 DEFB 0,0,0,0,0,0,0,0 ;
 33790 DEFB 0,0             ; }

; The game has just loaded
;
; After the game has loaded, this is where it all starts.
@label=BEGIN
c33792 DI            ; Disable interrupts
 33793 LD HL,23551   ; {Place the address of the routine at #R34463 on the
@ssub=LD (HL),34463/256
 33796 LD (HL),134   ; stack
 33798 DEC HL        ;
@ssub=LD (HL),34463%256
 33799 LD (HL),159   ;
 33801 LD SP,23550   ; }
 33804 SUB A         ; {Set #REGhl=#N34048 in a roundabout way
 33805 LD L,A        ;
 33806 XOR 10        ;
 33808 LD B,A        ;
 33809 INC B         ;
 33810 LD H,B        ;
 33811 RRC H         ; }
@ignoreua
*33813 LD C,(HL)     ; {Read through addresses #N34048-#N(65535), without
 33814 LD A,L        ; changing their contents; perhaps this code was once used
 33815 XOR C         ; to descramble the contents of pages #b133-#b255, but now
 33816 XOR H         ; all it does is introduce a pause of about 0.47s before
 33817 LD (HL),C     ; displaying the code entry screen
 33818 INC HL        ;
 33819 BIT 7,H       ;
 33821 JR NZ,33813   ; }
 33823 RET           ; Make an indirect jump to #R34463

; Current room number
;
; Initialised to #b33 (#R57600(The Bathroom)) by the routine at #R34762,
; checked by the routines at #R35090, #R37310, #R37841, #R38196, #R38276,
; #R38298 and #R38455, and updated by the routines at #R35591, #R38026,
; #R38046, #R38064 and #R38098.
@label=ROOM
g33824 DEFB 0

; Left-right movement table
;
; Used by the routine at #R36564. The entries in this table are used to map the
; existing value (V) of Willy's direction and movement flags at #R34256 to a
; new value (V'), depending on the direction Willy is facing and how he is
; moving or being moved (by 'left' and 'right' keypresses and joystick input,
; or by a conveyor, or by an urge to visit the toilet).
; .
; One of the first four entries is used when Willy is not moving.
@label=LRMOVEMENT
b33825 DEFB 0        ; V=0 (facing right, no movement) + no movement: V'=0 (no
                     ; change)
 33826 DEFB 1        ; V=1 (facing left, no movement) + no movement: V'=1 (no
                     ; change)
 33827 DEFB 0        ; V=2 (facing right, moving) + no movement: V'=0 (facing
                     ; right, no movement) (i.e. stop)
 33828 DEFB 1        ; V=3 (facing left, moving) + no movement: V'=1 (facing
                     ; left, no movement) (i.e. stop)
; One of the next four entries is used when Willy is moving left.
 33829 DEFB 1        ; V=0 (facing right, no movement) + move left: V'=1
                     ; (facing left, no movement) (i.e. turn around)
 33830 DEFB 3        ; V=1 (facing left, no movement) + move left: V'=3 (facing
                     ; left, moving)
 33831 DEFB 1        ; V=2 (facing right, moving) + move left: V'=1 (facing
                     ; left, no movement) (i.e. turn around)
 33832 DEFB 3        ; V=3 (facing left, moving) + move left: V'=3 (no change)
; One of the next four entries is used when Willy is moving right.
 33833 DEFB 2        ; V=0 (facing right, no movement) + move right: V'=2
                     ; (facing right, moving)
 33834 DEFB 0        ; V=1 (facing left, no movement) + move right: V'=0
                     ; (facing right, no movement) (i.e. turn around)
 33835 DEFB 2        ; V=2 (facing right, moving) + move right: V'=2 (no
                     ; change)
 33836 DEFB 0        ; V=3 (facing left, moving) + move right: V'=0 (facing
                     ; right, no movement) (i.e. turn around)
; One of the final four entries is used when Willy is being pulled both left
; and right; each entry leaves the flags at #R34256 unchanged (so Willy carries
; on moving in the direction he's already moving, or remains stationary).
 33837 DEFB 0        ; V=V'=0 (facing right, no movement)
 33838 DEFB 1        ; V=V'=1 (facing left, no movement)
 33839 DEFB 2        ; V=V'=2 (facing right, moving)
 33840 DEFB 3        ; V=V'=3 (facing left, moving)

; Triangle UDGs
;
; Used by the routine at #R34762.
; .
; #UDGTABLE
; { #UDG33841,56(triangle0) | #UDG33849,56(triangle1) | #UDG33857,56(triangle2)
; | #UDG33865,56(triangle3) }
; TABLE#
@label=TRIANGLE0
b33841 DEFB 192,240,252,255,255,255,255,255
@label=TRIANGLE1
 33849 DEFB 0,0,0,0,192,240,252,255
@label=TRIANGLE2
 33857 DEFB 255,255,255,255,252,240,192,0
@label=TRIANGLE3
 33865 DEFB 252,240,192,0,0,0,0,0

; 'AIR'
;
; This message is not used.
t33873 DEFM "AIR"

; '+++++ Press ENTER to Start +++++...'
;
; Used by the routine at #R34762.
@label=MSG_INTRO
t33876 DEFM "+++++ Press ENTER to Start +++++"
 33908 DEFM "  JET-SET WILLY by Matthew Smith  "
 33942 DEFM 127," 1984 SOFTWARE PROJECTS Ltd . . . . ."
 33980 DEFM "Guide Willy to collect all the items around "
 34024 DEFM "the house before Midnight "
 34050 DEFM "so Maria will let you get to your bed. . . . . . ."
 34100 DEFM "+++++ Press ENTER to Start +++++"

; 'Items collected 000 Time 00:00 m'
;
; Used by the routine at #R35090.
@label=MSG_STATUS
t34132 DEFM "Items collected 000 Time 00:00 m"

; 'Game'
;
; Used by the routine at #R35914.
@label=MSG_GAME
t34164 DEFM "Game"

; 'Over'
;
; Used by the routine at #R35914.
@label=MSG_OVER
t34168 DEFM "Over"

; Number of items collected
;
; Initialised by the routine at #R34762, printed by the routine at #R35245, and
; updated by the routine at #R37841.
@label=MSG_ITEMS
g34172 DEFM "000"

; Current time
;
; Initialised by the routine at #R35068, and printed and updated by the routine
; at #R35245.
@label=MSG_CURTIME
g34175 DEFM " 7:00a"

; ' 7:00a'
;
; Copied by the routine at #R35068 to #R34175.
@label=MSG_7AM
t34181 DEFM " 7:00a"

; 'Enter Code at grid location#SPACE5'
;
; Used by the routine at #R34463.
@label=MSG_CODE1
t34187 DEFM "Enter Code at grid location     "

; 'Sorry, try code at location#SPACE5'
;
; Used by the routine at #R34463.
@label=MSG_CODE2
t34219 DEFM "Sorry, try code at location     "

; Minute counter
;
; Initialised by the routine at #R34762; incremented on each pass through the
; main loop by the routine at #R35245 (which moves the game clock forward by a
; minute when the counter reaches 0); reset to zero by the routine at #R38276
; when Willy sticks his head down the toilet; and used by the routines at
; #R37841 (to cycle the colours of the items in the room), #R38196 (to
; determine Maria's animation frame in #R58112(Master Bedroom)) and #R38298 (to
; determine the animation frame for the toilet in #R57600(The Bathroom)).
@label=TICKS
g34251 DEFB 0

; Lives remaining
;
; Initialised to 7 by the routine at #R34762, decremented by the routine at
; #R35841, and used by the routines at #R35211 (when drawing the remaining
; lives) and #R35591 (to adjust the speed and pitch of the in-game music).
@label=LIVES
g34252 DEFB 0

; Screen flash counter
;
@ignoreua
; Initialised to zero by the routine at #R34762, but never used; the code at
; #R35339 makes the screen flash in Manic Miner fashion if this address holds a
; non-zero value.
@label=FLASH
g34253 DEFB 0

; Kempston joystick indicator
;
; Initialised by the routine at #R34762, and checked by the routines at #R36564
; and #R38601. Holds 1 if a joystick is present, 0 otherwise.
@label=JOYSTICK
g34254 DEFB 0

; Willy's y-coordinate
;
; Initialised to 208 by the routine at #R34762, and used by the routines at
; #R35245, #R35591, #R36307, #R36564, #R36796, #R37310, #R38064, #R38098,
; #R38196, #R38344 and #R38455. Holds the LSB of the address of the entry in
; the screen buffer address lookup table at #R33280 that corresponds to Willy's
; pixel y-coordinate; in practice, this LSB is twice Willy's actual pixel
; y-coordinate. Note that when Willy is standing on a ramp, this holds his
; y-coordinate rounded down to the nearest multiple of 16 (8x2).
@label=WILLY_Y
g34255 DEFB 0

; Willy's direction and movement flags
;
; #TABLE(default,centre,:w,:w)
; { =h Bit(s) | =h Meaning | =h Used by }
; { 0 | Direction Willy is facing (reset=right, set=left) | #R36564, #R36796,
; #R38455 }
; { 1 | Willy's left/right movement flag (set=moving) | #R36307, #R36564,
; #R36796, #R37310 }
; { 2-7 | Unused (always reset) | }
; TABLE#
@label=DMFLAGS
g34256 DEFB 0

; Airborne status indicator
;
@ignoreua
; Initialised by the routine at #R34762, checked by the routines at #R35591,
; #R36796 and #R38344, updated by the routines at #R37046, #R37310 and #R38064,
; and checked and updated by the routines at #R36307, #R36564 and #R38098.
; Possible values are:
; .
; #TABLE(default,centre,:w)
; { =h Value  | =h Meaning }
; { #b0       | Willy is neither falling nor jumping }
; { #b1       | Willy is jumping }
; { #b2-#b11  | Willy is falling, and can land safely }
; { #b12-#b15 | Willy is falling, and has fallen too far to land safely }
; { #b255     | Willy has collided with a nasty, an arrow, a guardian, or Maria
; (see #R37046) }
; TABLE#
@label=AIRBORNE
g34257 DEFB 0

; Willy's animation frame
;
; Used by the routines at #R38344 and #R38455, and updated by the routines at
; #R35245, #R36796 and #R37310. Possible values are 0, 1, 2 and 3.
@label=FRAME
g34258 DEFB 0

; Address of Willy's location in the attribute buffer at #N23552
;
; Initialised by the routine at #R34762, and used by the routines at #R36307,
; #R36796, #R37310, #R38026, #R38046, #R38064, #R38098, #R38196, #R38276,
; #R38344 and #R38455.
@label=LOCATION
g34259 DEFW 0

; Jumping animation counter
;
; Used by the routines at #R36307 and #R36564.
@label=JUMPING
g34261 DEFB 0

; Rope status indicator
;
; Initialised by the routine at #R35090, checked by the routines at #R36307 and
; #R36796, and checked and updated by the routines at #R36564 and #R37310.
; Possible values are:
; .
; #TABLE(default,centre,:w)
; { =h Value    | =h Meaning }
; { #b0         | Willy is not on the rope }
; { #b3-#b32    | Willy is on the rope, with the centre of his sprite anchored
; at this segment }
; { #b240-#b255 | Willy has just jumped or fallen off the rope }
; TABLE#
@label=ROPE
g34262 DEFB 0

; Willy's state on entry to the room
;
@ignoreua
; Initialised by the routine at #R35090, and copied back into #GBUF34255,34261
; by the routine at #R35841.
@label=INITSTATE
g34263 DEFB 0        ; Willy's y-coordinate (copied from #R34255)
 34264 DEFB 0        ; Willy's direction and movement flags (copied from
                     ; #R34256)
 34265 DEFB 0        ; Airborne status indicator (copied from #R34257)
 34266 DEFB 0        ; Willy's animation frame (copied from #R34258)
 34267 DEFW 0        ; Address of Willy's location in the attribute buffer at
                     ; #R23552 (copied from #R34259)
 34269 DEFB 0        ; Jumping animation counter (copied from #R34261)

; 256 minus the number of items remaining
;
; Initialised by the routine at #R34762, and updated by the routine at #R37841
; when an item is collected.
@label=ITEMS
g34270 DEFB 0

; Game mode indicator
;
; Initialised by the routine at #R34762, checked by the routines at #R35245,
; #R36564 and #R38298, and updated by the routines at #R37841, #R38196 and
; #R38276.
; .
; #TABLE(default,centre)
; { =h Value | =h Meaning }
; { 0 | Normal }
; { 1 | All items collected }
; { 2 | Willy is running to the toilet }
; { 3 | Willy's head is down the toilet }
; TABLE#
@label=MODE
g34271 DEFB 0

; Inactivity timer
;
; Initialised by the routine at #R34762, and updated by the routines at
; #R35245, #R35591 and #R36564.
@label=INACTIVE
g34272 DEFB 0

; In-game music note index
;
; Initialised by the routine at #R34762, used by the routine at #R35211, and
; used and updated by the routine at #R35591.
@label=NOTEINDEX
g34273 DEFB 0

; Music flags
;
; The keypress flag in bit 0 is initialised by the routine at #R34762; bits 0
; and 1 are checked and updated by the routine at #R35591.
; .
; #TABLE(default,centre,:w)
; { =h Bit(s) | =h Meaning }
; { 0 | Keypress flag (set=H-ENTER being pressed, reset=no key pressed) }
; { 1 | In-game music flag (set=music off, reset=music on) }
; { 2-7 | Unused }
; TABLE#
@label=MUSICFLAGS
g34274 DEFB 0

; WRITETYPER key counter
;
; Checked by the routine at #R35245, and updated by the routine at #R35591.
@label=TELEPORT
g34275 DEFB 0

; Temporary variable
;
; Used by the routines at #R34499 and #R34620 to hold the entry code, by the
; routine at #R34762 to hold the index into the message scrolled across the
; screen after the theme tune has finished playing, and by the routine at
; #R35914 to hold the distance of the foot from the top of the screen as it
; descends onto Willy.
@label=TEMPVAR
g34276 DEFB 0

; WRITETYPER
;
; Used by the routine at #R35591. In each pair of bytes here, bits 0-4 of the
; first byte correspond to keys Q-W-E-R-T, and bits 0-4 of the second byte
; correspond to keys P-O-I-U-Y; among those bits, a zero indicates a key being
; pressed.
b34277 DEFB %00011111,%00011111 ; (no keys pressed)
@label=WRITETYPER
 34279 DEFB %00011101,%00011111 ; W
 34281 DEFB %00010111,%00011111 ; R
 34283 DEFB %00011111,%00011011 ; I
 34285 DEFB %00001111,%00011111 ; T
 34287 DEFB %00011011,%00011111 ; E
 34289 DEFB %00001111,%00011111 ; T
 34291 DEFB %00011111,%00001111 ; Y
 34293 DEFB %00011111,%00011110 ; P
 34295 DEFB %00011011,%00011111 ; E
 34297 DEFB %00010111,%00011111 ; R

; Title screen tune data (Moonlight Sonata)
;
; Used by the routine at #R38562.
@label=THEMETUNE
b34299 DEFB 81,60,51,81,60,51,81,60,51,81,60,51,81,60,51,81
 34315 DEFB 60,51,81,60,51,81,60,51,76,60,51,76,60,51,76,57
 34331 DEFB 45,76,57,45,81,64,45,81,60,51,81,60,54,91,64,54
 34347 DEFB 102,81,60,81,60,51,81,60,51,40,60,40,40,54,45,81
 34363 DEFB 54,45,81,54,45,40,54,40,40,60,51,81,60,51,38,60
 34379 DEFB 45,76,60,45,40,64,51,81,64,51,45,64,54,32,64,54
 34395 DEFB 61,121,61,255

; In-game tune data (If I Were a Rich Man)
;
; Used by the routine at #R35591.
@label=GAMETUNE
b34399 DEFB 86,96,86,96,102,102,128,128,128,128,102,96,86,96,86,96
 34415 DEFB 102,96,86,76,72,76,72,76,86,86,86,86,86,86,86,86
 34431 DEFB 64,64,64,64,68,68,76,76,86,96,102,96,86,86,102,102
 34447 DEFB 81,86,96,86,81,81,96,96,64,64,64,64,64,64,64,64

; Give two chances to enter a correct code
;
; Used by the routine at #R33792.
@refs=33792
@label=ENTERCODES
c34463 LD HL,16384   ; {Clear the display file and attribute file
 34466 LD DE,16385   ;
 34469 LD BC,6911    ;
 34472 LD (HL),0     ;
 34474 LDIR          ; }
 34476 LD IX,34187   ; Point #REGix at the message at #R34187 ("Enter Code at
                     ; grid location#SPACE(5)")
 34480 CALL 34499    ; Display the code entry screen and collect a four-digit
                     ; code from the user
 34483 JP Z,34762    ; Start the game if the code is correct
 34486 LD IX,34219   ; Point #REGix at the message at #R34219 ("Sorry, try code
                     ; at location#SPACE(5)")
 34490 CALL 34499    ; Display the code entry screen and collect another
                     ; four-digit code from the user
 34493 JP Z,34762    ; Start the game if the code is correct
 34496 JP 0          ; Otherwise reset the machine

; Display the code entry screen
;
; Used by the routine at #R34463. Displays the code entry screen and waits for
; a code to be entered. Returns with the zero flag set if the code entered is
; correct.
;
; IX Address of the message to print (#R34187 or #R34219)
@label=CODESCREEN
c34499 LD DE,18432   ; {Print the message pointed to by #REGix at (8,0)
 34502 LD C,32       ;
 34504 CALL 38528    ; }
 34507 LD HL,18498   ; {Print the graphic for the '1' key at (10,2)
 34510 LD DE,39680   ;
 34513 LD C,0        ;
 34515 CALL 37974    ; }
 34518 LD HL,18501   ; {Print the graphic for the '2' key at (10,5)
 34521 CALL 37974    ; }
 34524 LD HL,18504   ; {Print the graphic for the '3' key at (10,8)
 34527 CALL 37974    ; }
 34530 LD HL,18507   ; {Print the graphic for the '4' key at (10,11)
 34533 CALL 37974    ; }
 34536 LD HL,39808   ; {Copy the 128 attribute bytes from #R39808 to the screen
 34539 LD DE,22784   ; (lines 8, 9, 10 and 11)
 34542 LD BC,128     ;
 34545 LDIR          ; }
 34547 LD A,(23672)  ; Collect the LSB of the system variable FRAMES
 34550 ADD A,37      ; {Add #b37 to this value and replace it; this ensures
 34552 LD (23672),A  ; that the value collected on the second pass through this
                     ; routine is different from the value collected on the
                     ; first pass}
@bfix=CP 180         ; Is the value between #b0 and #b179?
 34555 CP 179        ; Is the value between #b0 and #b178?
 34557 JR C,34561    ; Jump if so
@bfix=/              ; Otherwise subtract #b180
 34559 SUB 180       ; Otherwise subtract #b180; note that if the original
                     ; value of the LSB of the system variable FRAMES was
                     ; #b142, this leaves #REGa holding #b255, which is a
                     ; #BUG(invalidGridLocation)(bug)
@bfix=/              ; Now #REGl holds some number between #b0 and #b179
*34561 LD L,A        ; Now #REGl holds either #b255 or some number between #b0
                     ; and #b178
@ssub=LD H,40448/256
@ignoreua
 34562 LD H,158      ; Point #REGhl at one of the entries in the table at
                     ; #R40448 #IF({fix}<2)((or at #N40703 if #REGl=#b255))
 34564 LD A,(HL)     ; Pick up the table entry
 34565 ADD A,L       ; Add #REGl to obtain the actual code
 34566 LD (34276),A  ; Store the code at #R34276
 34569 LD C,L        ; Copy the code index to #REGc; this will be used to
                     ; compute the grid location
 34570 LD E,47       ; {Calculate the ASCII code of the grid location number
*34572 INC E         ; (0-9) in #REGe
 34573 LD A,C        ;
 34574 CP 18         ;
 34576 JR C,34583    ;
 34578 SUB 18        ;
 34580 LD C,A        ;
 34581 JR 34572      ; }
*34583 LD A,E        ; {Print the grid location number at (8,30)
 34584 LD DE,18462   ;
 34587 CALL 38545    ; }
 34590 LD A,C        ; {Calculate the ASCII code of the grid location letter
 34591 ADD A,65      ; (A-R) in #REGa}
 34593 LD DE,18461   ; {Print the grid location letter at (8,29)
 34596 CALL 38545    ; }
; Here we enter a loop that prints a 2x2 coloured block at (10,16), (10,19),
; (10,22) or (10,25) whenever '1', '2', '3' or '4' is pressed, or returns to
; the calling routine at #R34463 if ENTER is pressed.
*34599 LD IX,22864   ; Point #REGix at the attribute file location of the first
                     ; coloured block at (10,16)
*34603 CALL 34620    ; Print a coloured block when '1', '2', '3' or '4' is
                     ; pressed, or return to #R34463 if ENTER is pressed
 34606 INC IX        ; {Move #REGix along to the location of the next coloured
 34608 INC IX        ; block
 34610 INC IX        ; }
 34612 LD A,IXl      ; {Have we just printed the fourth coloured block at
 34614 CP 92         ; (10,25)?}
 34616 JR NZ,34603   ; If not, jump back to print the next one
 34618 JR 34599      ; Otherwise rewind #REGix to the location of the first
                     ; coloured block

; Read the keyboard during code entry
;
; Used by the routine at #R34499. Waits for '1', '2', '3', '4' or ENTER to be
; pressed and either prints a coloured block or validates the entered code.
; Returns to the routine at #R34463 if ENTER is being pressed, with the zero
; flag reset if the entered code is correct.
;
; IX Attribute file address of the flashing 2x2 block
@label=READCODE
@keep
c34620 LD BC,63486   ; {Read keys 1-2-3-4-5
 34623 IN A,(C)      ; }
 34625 AND 15        ; {Is '1', '2', '3' or '4' (still) being pressed?
 34627 CP 15         ; }
 34629 JR NZ,34620   ; Jump back if so
*34631 LD B,191      ; {Read keys H-J-K-L-ENTER
 34633 IN A,(C)      ; }
 34635 BIT 0,A       ; Is ENTER being pressed?
 34637 JR NZ,34693   ; Jump if not
 34639 LD A,(22873)  ; Pick up the attribute byte of the fourth 2x2 block at
                     ; (10,25)
 34642 AND 127       ; {Has the fourth digit been entered yet?
 34644 CP 7          ; }
 34646 JR Z,34693    ; Jump if not
; We have four coloured blocks, and ENTER is being pressed. Time to validate
; the entered code.
 34648 SUB 8         ; {Compute bits 0 and 1 of the entered code from the
 34650 AND 24        ; attribute byte of the fourth coloured block at (10,25)
 34652 RRCA          ; and store them in #REGc
 34653 RRCA          ;
 34654 RRCA          ;
 34655 LD C,A        ; }
 34656 LD A,(22867)  ; {Compute bits 4 and 5 of the entered code from the
 34659 SUB 8         ; attribute byte of the second coloured block at (10,19)
 34661 AND 24        ; and store them in #REGc (alongside bits 0 and 1)
 34663 RLCA          ;
 34664 OR C          ;
 34665 LD C,A        ; }
 34666 LD A,(22870)  ; {Compute bits 2 and 3 of the entered code from the
 34669 SUB 8         ; attribute byte of the third coloured block at (10,22)
 34671 AND 24        ; and store them in #REGc (alongside bits 0, 1, 4 and 5)
 34673 RRCA          ;
 34674 OR C          ;
 34675 LD C,A        ; }
 34676 LD A,(22864)  ; {Compute bits 6 and 7 of the entered code from the
 34679 SUB 8         ; attribute byte of the first coloured block at (10,16) in
 34681 AND 24        ; #REGa
 34683 RLCA          ;
 34684 RLCA          ;
 34685 RLCA          ; }
 34686 POP HL        ; Drop the return address from the stack
 34687 OR C          ; Merge bits 0-5 of the entered code into #REGa; now #REGa
                     ; holds all 8 bits of the entered code
 34688 LD HL,34276   ; Point #REGhl at #R34276 (where the correct entry code is
                     ; stored)
 34691 CP (HL)       ; Set the zero flag if the entered code matches
 34692 RET           ; Return to the routine at #R34463
; Here we check whether '1', '2', '3' or '4' is being pressed.
*34693 SET 7,(IX+0)  ; {Make sure the current 2x2 block is flashing
 34697 SET 7,(IX+1)  ;
 34701 SET 7,(IX+32) ;
 34705 SET 7,(IX+33) ; }
@keep
 34709 LD BC,63486   ; {Read keys 1-2-3-4-5
 34712 IN A,(C)      ; }
 34714 AND 15        ; Keep only bits 0-3 (keys 1-2-3-4)
 34716 LD E,8        ; #REGe=#b8 (INK 0: PAPER 1)
 34718 CP 14         ; Is '1' alone being pressed?
 34720 JR Z,34741    ; Jump if so
 34722 LD E,16       ; #REGe=#b16 (INK 0: PAPER 2)
 34724 CP 13         ; Is '2' alone being pressed?
 34726 JR Z,34741    ; Jump if so
 34728 LD E,24       ; #REGe=#b24 (INK 0: PAPER 3)
 34730 CP 11         ; Is '3' alone being pressed?
 34732 JR Z,34741    ; Jump if so
 34734 LD E,32       ; #REGe=#b32 (INK 0: PAPER 4)
 34736 CP 7          ; Is '4' alone being pressed?
 34738 JP NZ,34631   ; If not, jump back to check the ENTER key
; Exactly one of the number keys '1', '2', '3' or '4' is being pressed. #REGe
; holds the corresponding attribute byte to use for the coloured block.
*34741 LD (IX+0),E   ; {Set the colour of the 2x2 block (no longer flashing)
 34744 LD (IX+1),E   ;
 34747 LD (IX+32),E  ;
 34750 LD (IX+33),E  ; }
 34753 LD BC,24      ; {Pause for about 0.02s
*34756 DJNZ 34756    ;
 34758 DEC C         ;
 34759 JR NZ,34756   ; }
 34761 RET           ;

; Display the title screen and play the theme tune
;
; Used by the routines at #R34463, #R35245 and #R35914.
; .
; The first thing this routine does is initialise some game status buffer
; variables in preparation for the next game.
@label=TITLESCREEN
c34762 XOR A         ; #REGa=0
 34763 LD (34254),A  ; Initialise the Kempston joystick indicator at #R34254
 34766 LD (34273),A  ; Initialise the in-game music note index at #R34273
 34769 LD (34253),A  ; Initialise the (unused) screen flash counter at #R34253
 34772 LD (34257),A  ; Initialise the airborne status indicator at #R34257
 34775 LD (34251),A  ; Initialise the minute counter at #R34251
 34778 LD (34272),A  ; Initialise the inactivity timer at #R34272
 34781 LD (34271),A  ; Initialise the game mode indicator at #R34271
 34784 LD A,7        ; {Initialise the number of lives remaining at #R34252
 34786 LD (34252),A  ; }
 34789 LD A,208      ; {Initialise Willy's y-coordinate at #R34255
 34791 LD (34255),A  ; }
 34794 LD A,33       ; {Initialise the current room number at #R33824 to #b33
 34796 LD (33824),A  ; (#R57600(The Bathroom))}
 34799 LD HL,23988   ; {Initialise Willy's coordinates at #R34259 to (13,20)
 34802 LD (34259),HL ; }
 34805 LD HL,34172   ; {Initialise the number of items collected at #R34172 to
 34808 LD (HL),48    ; "000"
 34810 INC HL        ;
 34811 LD (HL),48    ;
 34813 INC HL        ;
 34814 LD (HL),48    ; }
@ssub=LD H,41984/256
 34816 LD H,164      ; Page #R41984(#b164) holds the first byte of each entry
                     ; in the item table
 34818 LD A,(41983)  ; Pick up the index of the first item from #R41983
 34821 LD L,A        ; Point #REGhl at the entry for the first item
 34822 LD (34270),A  ; Initialise the counter of items remaining at #R34270
*34825 SET 6,(HL)    ; {Set the collection flag for every item in the item
 34827 INC L         ; table at #R41984
 34828 JR NZ,34825   ; }
 34830 LD HL,34274   ; {Initialise the keypress flag in bit 0 at #R34274
 34833 SET 0,(HL)    ; }
; Next, prepare the screen.
*34835 LD HL,16384   ; {Clear the entire display file
 34838 LD DE,16385   ;
 34841 LD BC,6143    ;
 34844 LD (HL),0     ;
 34846 LDIR          ; }
 34848 LD HL,38912   ; {Copy the attribute bytes for the title screen from
 34851 LD BC,768     ; #R38912 and #R39424 to the attribute file
 34854 LDIR          ; }
 34856 LD HL,23136   ; {Copy the attribute value #b70 (INK 6: PAPER 0: BRIGHT
 34859 LD DE,23137   ; 1) into the row of 32 cells from (19,0) to (19,31) on
 34862 LD BC,31      ; the screen
 34865 LD (HL),70    ;
 34867 LDIR          ; }
 34869 LD IX,33876   ; {Print "+++++ Press ENTER to Start +++++" (see #R33876)
 34873 LD DE,20576   ; at (19,0)
 34876 LD C,32       ;
 34878 CALL 38528    ; }
 34881 LD DE,22528   ; Point #REGde at the first byte of the attribute file
; The following loop scans the top two-thirds of the attribute file, which
; contains values #b0, #b4, #b5, #b8, #b9, #b36, #b37, #b40, #b41, #b44, #b45
; and #b211 (copied from #R38912). Whenever a value other than #b0, #b9, #b36,
; #b45 or #b211 is found, a triangle UDG is drawn at the corresponding location
; in the display file.
*34884 LD A,(DE)     ; Pick up a byte from the attribute file
 34885 OR A          ; Is it #b0 (INK 0: PAPER 0)?
 34886 JR Z,34958    ; If so, jump to consider the next byte in the attribute
                     ; file
 34888 CP 211        ; Is it #b211 (INK 3: PAPER 2: BRIGHT 1: FLASH 1)?
 34890 JR Z,34958    ; If so, jump to consider the next byte in the attribute
                     ; file
 34892 CP 9          ; Is it #b9 (INK 1: PAPER 1)?
 34894 JR Z,34958    ; If so, jump to consider the next byte in the attribute
                     ; file
 34896 CP 45         ; Is it #b45 (INK 5: PAPER 5)?
 34898 JR Z,34958    ; If so, jump to consider the next byte in the attribute
                     ; file
 34900 CP 36         ; Is it #b36 (INK 4: PAPER 4)?
 34902 JR Z,34958    ; If so, jump to consider the next byte in the attribute
                     ; file
 34904 LD C,0        ; #REGc=0; this will be used as an offset from the
                     ; triangle UDG base address (#R33841)
 34906 CP 8          ; Is the attribute value #b8 (INK 0: PAPER 1)?
 34908 JR Z,34929    ; Jump if so
 34910 CP 41         ; Is it #b41 (INK 1: PAPER 5)?
 34912 JR Z,34929    ; Jump if so
 34914 CP 44         ; Is it #b44 (INK 4: PAPER 5)?
 34916 JR Z,34926    ; Jump if so
 34918 CP 5          ; Is it #b5 (INK 5: PAPER 0)?
 34920 JR Z,34929    ; Jump if so
 34922 LD C,16       ; Set the triangle UDG offset to #b16
 34924 JR 34929      ;
*34926 LD A,37       ; {Change the attribute byte here from #b44 (INK 4: PAPER
 34928 LD (DE),A     ; 5) to #b37 (INK 5: PAPER 4)}
*34929 LD A,E        ; {Point #REGhl at the triangle UDG to draw (#R33841,
 34930 AND 1         ; #R33849, #R33857 or #R33865)
 34932 RLCA          ;
 34933 RLCA          ;
 34934 RLCA          ;
 34935 OR C          ;
 34936 LD C,A        ;
 34937 LD B,0        ;
 34939 LD HL,33841   ;
 34942 ADD HL,BC     ; }
 34943 PUSH DE       ; Save the attribute file address briefly
 34944 BIT 0,D       ; Set the zero flag if we're still in the top third of the
                     ; attribute file
 34946 LD D,64       ; Point #REGde at the top third of the display file
 34948 JR Z,34952    ; Jump if we're still in the top third of the attribute
                     ; file
 34950 LD D,72       ; Point #REGde at the middle third of the display file
*34952 LD B,8        ; There are eight pixel rows in a triangle UDG
 34954 CALL 38555    ; Draw a triangle UDG on the screen
 34957 POP DE        ; Restore the attribute file address to #REGde
*34958 INC DE        ; Point #REGde at the next byte in the attribute file
 34959 LD A,D        ; {Have we finished scanning the top two-thirds of the
 34960 CP 90         ; attribute file yet?}
 34962 JP NZ,34884   ; If not, jump back to examine the next byte
; Now check whether there is a joystick connected.
 34965 LD BC,31      ; This is the joystick port
 34968 DI            ; Disable interrupts (which are already disabled)
 34969 XOR A         ; #REGa=0
*34970 IN E,(C)      ; {Combine 256 readings of the joystick port in #REGa; if
 34972 OR E          ; no joystick is connected, some of these readings will
 34973 DJNZ 34970    ; have bit 5 set}
 34975 AND 32        ; Is a joystick connected (bit 5 reset)?
 34977 JR NZ,34984   ; Jump if not
 34979 LD A,1        ; {Set the Kempston joystick indicator at #R34254 to 1
 34981 LD (34254),A  ; }
; And finally, play the theme tune and check for keypresses.
; .
; #AUDIO0(tune.wav)(#INCLUDE(ThemeTune))
*34984 LD HL,34299   ; Point #REGhl at the theme tune data at #R34299
 34987 CALL 38562    ; Play the theme tune
 34990 JP NZ,35068   ; Start the game if ENTER, 0 or the fire button was
                     ; pressed
; No key was pressed while the theme tune was playing, so scroll a message
; across the screen while repeatedly producing a screeching sound effect.
; .
; #PUSHS #POKES34276,192 #AUDIO1,35033,35065(screech.wav) #POPS
 34993 XOR A         ; {Initialise the temporary game status buffer variable at
 34994 LD (34276),A  ; #R34276 to 0; this will be used as an index for the
                     ; message scrolled across the screen (see #R33876)}
@assemble=2
*34997 CALL 35563    ; Cycle the INK and PAPER colours
 35000 LD HL,23136   ; {Copy the attribute value #b79 (INK 7: PAPER 1: BRIGHT
 35003 LD DE,23137   ; 1) into the row of 32 cells from (19,0) to (19,31) on
 35006 LD BC,31      ; the screen
 35009 LD (HL),79    ;
 35011 LDIR          ; }
 35013 LD A,(34276)  ; Pick up the message index from #R34276
 35016 LD IX,33876   ; {Point #REGix at the corresponding location in the
 35020 LD E,A        ; message at #R33876
 35021 LD D,0        ;
 35023 ADD IX,DE     ; }
 35025 LD DE,20576   ; {Print 32 characters of the message at (19,0)
 35028 LD C,32       ;
 35030 CALL 38528    ; }
 35033 LD A,(34276)  ; {Prepare a value between #b50 and #b81 in #REGa (for the
 35036 AND 31        ; routine at #R38622)
 35038 ADD A,50      ; }
 35040 CALL 38622    ; Make a sound effect
@keep
 35043 LD BC,45054   ; {Read keys H-J-K-L-ENTER and 6-7-8-9-0
 35046 IN A,(C)      ; }
 35048 AND 1         ; Keep only bit 0 of the result (ENTER, 0)
 35050 CP 1          ; Was ENTER or 0 pressed?
 35052 JR NZ,35068   ; Jump if so to start the game
 35054 LD A,(34276)  ; Pick up the message index from #R34276
 35057 INC A         ; Increment it
 35058 CP 224        ; Set the zero flag if we've reached the end of the
                     ; message
 35060 LD (34276),A  ; Store the new message index at #R34276
 35063 JR NZ,34997   ; Jump back unless we've finished scrolling the message
                     ; across the screen
 35065 JP 34835      ; Jump back to prepare the screen and play the theme tune
                     ; again

; Start the game
;
; Used by the routine at #R34762.
@label=STARTGAME
c35068 LD HL,34181   ; {Copy the text at #R34181 (" 7:00a") to #R34175, thus
 35071 LD DE,34175   ; resetting the clock
 35074 LD BC,6       ;
 35077 LDIR          ; }
 35079 LD HL,39424   ; {Copy the attribute bytes from #R39424 to the bottom
 35082 LD DE,23040   ; third of the screen
 35085 LD BC,256     ;
 35088 LDIR          ; }
; This routine continues into the one at #R35090.

; Initialise the current room
;
; Used by the routines at #R35591 (to teleport into a room), #R35841 (to
; reinitialise the room after Willy has lost a life), #R38026 (when Willy has
; entered the room from the right), #R38046 (when Willy has entered the room
; from the left), #R38064 (when Willy has entered the room from below) and
; #R38098 (when Willy has entered the room from above). The routine at #R35068
; also continues here.
@label=INITROOM
c35090 LD A,(33824)  ; Pick up the current room number from #R33824
 35093 OR 192        ; {Point #REGhl at the first byte of the room definition
 35095 LD H,A        ;
 35096 LD L,0        ; }
@ignoreua
 35098 LD DE,32768   ; {Copy the room definition into the game status buffer at
 35101 LD BC,256     ; #GBUF32768
 35104 LDIR          ; }
 35106 LD IX,33008   ; Point #REGix at the first byte of the first entity
                     ; specification for the current room at #R33008
@ignoreua
 35110 LD DE,33024   ; Point #REGde at the first byte of the first entity
                     ; buffer at #R33024; this instruction is redundant, since
                     ; #REGde already holds #N33024
 35113 LD A,8        ; There are at most eight entities in a room
*35115 LD L,(IX+0)   ; Pick up the first byte of the entity specification
 35118 RES 7,L       ; {Point #REGhl at the corresponding entry in the table of
 35120 LD H,20       ; entity definitions at #R40960
 35122 ADD HL,HL     ;
 35123 ADD HL,HL     ;
 35124 ADD HL,HL     ; }
 35125 LD BC,2       ; {Copy the first two bytes of the entity definition into
 35128 LDIR          ; the entity buffer}
 35130 LD C,(IX+1)   ; {Copy the second byte of the entity specification into
 35133 LD (HL),C     ; the third byte of the entity definition}
 35134 LD BC,6       ; {Copy the remaining six bytes of the entity definition
 35137 LDIR          ; into the entity buffer}
 35139 INC IX        ; {Point #REGix at the first byte of the next entity
 35141 INC IX        ; specification}
 35143 DEC A         ; Have we copied all eight entity definitions into the
                     ; entity buffers yet?
 35144 JR NZ,35115   ; If not, jump back to copy the next one
@ignoreua
 35146 LD HL,34255   ; {Copy the seven bytes that define Willy's state
 35149 LD DE,34263   ; (position, animation frame etc.) on entry to this room
 35152 LD BC,7       ; from #GBUF34255,34261 to #R34263
 35155 LDIR          ; }
 35157 CALL 36147    ; Draw the current room to the screen buffer at #R28672
                     ; and the attribute buffer at #R24064
 35160 LD HL,20480   ; {Clear the bottom third of the display file
 35163 LD DE,20481   ;
 35166 LD BC,2047    ;
 35169 LD (HL),0     ;
 35171 LDIR          ; }
 35173 LD IX,32896   ; {Print the room name (see #R32896) at (16,0)
 35177 LD C,32       ;
 35179 LD DE,20480   ;
 35182 CALL 38528    ; }
 35185 LD IX,34132   ; {Print "Items collected 000 Time 00:00 m" (see #R34132)
 35189 LD DE,20576   ; at (19,0)
 35192 LD C,32       ;
 35194 CALL 38528    ; }
 35197 LD A,(32990)  ; Pick up the border colour for the current room from
                     ; #R32990
 35200 LD C,254      ; {Set the border colour
 35202 OUT (C),A     ; }
 35204 XOR A         ; {Initialise the rope status indicator at #R34262 to 0
 35205 LD (34262),A  ; }
 35208 JP 35245      ; Enter the main loop

; Draw the remaining lives
;
; Used by the routine at #R35245.
@label=DRAWLIVES
c35211 LD A,(34252)  ; Pick up the number of lives remaining from #R34252
 35214 LD HL,20640   ; Set #REGhl to the display file address at which to draw
                     ; the first Willy sprite
 35217 OR A          ; Are there any lives remaining?
 35218 RET Z         ; Return if not
 35219 LD B,A        ; Initialise #REGb to the number of lives remaining
; The sprite-drawing loop begins.
*35220 LD C,0        ; #REGc=0; this tells the sprite-drawing routine at
                     ; #R37974 to overwrite any existing graphics
 35222 PUSH HL       ; {Save #REGhl and #REGbc briefly
 35223 PUSH BC       ; }
 35224 LD A,(34273)  ; Pick up the in-game music note index from #R34273; this
                     ; will determine the animation frame for the Willy sprites
 35227 RLCA          ; {Now #REGa=#b0 (frame 0), #b32 (frame 1), #b64 (frame 2)
 35228 RLCA          ; or #b96 (frame 3)
 35229 RLCA          ;
 35230 AND 96        ; }
 35232 LD E,A        ; {Point #REGde at the corresponding Willy sprite (at
@ssub=LD D,40192/256
 35233 LD D,157      ; #R40192+#REGa)}
 35235 CALL 37974    ; Draw the Willy sprite on the screen
 35238 POP BC        ; {Restore #REGhl and #REGbc
 35239 POP HL        ; }
 35240 INC HL        ; {Move #REGhl along to the location at which to draw the
 35241 INC HL        ; next Willy sprite}
 35242 DJNZ 35220    ; Jump back to draw any remaining sprites
 35244 RET           ;

; Main loop (1)
;
; Used by the routines at #R35090 and #R35591.
@label=MAINLOOP
c35245 CALL 35211    ; Draw the remaining lives
 35248 LD HL,24064   ; {Copy the contents of the attribute buffer at #R24064
 35251 LD DE,23552   ; (the attributes for the empty room) into the attribute
 35254 LD BC,512     ; buffer at #R23552
 35257 LDIR          ; }
 35259 LD HL,28672   ; {Copy the contents of the screen buffer at #R28672 (the
 35262 LD DE,24576   ; tiles for the empty room) into the screen buffer at
 35265 LD BC,4096    ; #R24576
 35268 LDIR          ; }
 35270 CALL 37056    ; Move the rope and guardians in the current room
 35273 LD A,(34271)  ; Pick up the game mode indicator from #R34271
 35276 CP 3          ; Is Willy's head down the toilet?
 35278 CALL NZ,36307 ; If not, move Willy
@label=AFTERMOVE1
 35281 LD A,(34255)  ; Pick up Willy's y-coordinate from #R34255
 35284 CP 225        ; Has Willy just moved up a ramp or a rope past the top of
                     ; the screen?
 35286 CALL NC,38064 ; If so, move Willy into the room above
@label=AFTERMOVE2
 35289 LD A,(34271)  ; Pick up the game mode indicator from #R34271
 35292 CP 3          ; Is Willy's head down the toilet?
 35294 CALL NZ,38344 ; If not, check and set the attribute bytes for Willy's
                     ; sprite in the buffer at #R23552, and draw Willy to the
                     ; screen buffer at #R24576
 35297 LD A,(34271)  ; Pick up the game mode indicator from #R34271
 35300 CP 2          ; Is Willy on his way to the toilet?
 35302 CALL Z,38276  ; If so, check whether he's reached it yet
 35305 CALL 38196    ; Deal with special rooms (#R58112(Master Bedroom),
                     ; #R57600(The Bathroom))
 35308 CALL 37310    ; Draw the rope, arrows and guardians in the current room
 35311 CALL 38137    ; Move the conveyor in the current room (if there is one)
 35314 CALL 37841    ; Draw the items in the current room (if there are any)
                     ; and collect any that Willy is touching
; This entry point is used by the routine at #R37046.
*35317 LD HL,24576   ; {Copy the contents of the screen buffer at #R24576 to
 35320 LD DE,16384   ; the display file
 35323 LD BC,4096    ;
 35326 LDIR          ; }
 35328 LD A,(34271)  ; Pick up the game mode indicator from #R34271
 35331 AND 2         ; {Now #REGa=1 if Willy is running to the toilet or
 35333 RRCA          ; already has his head down it, 0 otherwise}
 35334 LD HL,34258   ; {Set Willy's animation frame at #R34258 to 1 or 3 if
 35337 OR (HL)       ; Willy is running to the toilet or already has his head
 35338 LD (HL),A     ; down it; this has the effect of moving Willy at twice
                     ; his normal speed as he makes his way to the toilet
                     ; (using animation frames 2 and 0)}
@label=SCRFLASH
 35339 LD A,(34253)  ; Pick up the screen flash counter (unused and always 0)
                     ; from #R34253
 35342 OR A          ; Is it zero?
 35343 JR Z,35366    ; Jump if so (this jump is always made)
; The next section of code is never executed.
 35345 DEC A         ; {Decrement the screen flash counter at #R34253
 35346 LD (34253),A  ; }
 35349 RLCA          ; {Move bits 0-2 into bits 3-5 and clear all the other
 35350 RLCA          ; bits
 35351 RLCA          ;
 35352 AND 56        ; }
 35354 LD HL,23552   ; {Set every attribute byte in the buffer at #R23552 to
 35357 LD DE,23553   ; this value
 35360 LD BC,511     ;
 35363 LD (HL),A     ;
 35364 LDIR          ; }
; Normal service resumes here.
*35366 LD HL,23552   ; {Copy the contents of the attribute buffer at #R23552 to
 35369 LD DE,22528   ; the attribute file
 35372 LD BC,512     ;
 35375 LDIR          ; }
 35377 LD IX,34175   ; {Print the current time (see #R34175) at (19,25)
 35381 LD DE,20601   ;
 35384 LD C,6        ;
 35386 CALL 38528    ; }
 35389 LD IX,34172   ; {Print the number of items collected (see #R34172) at
 35393 LD DE,20592   ; (19,16)
 35396 LD C,3        ;
 35398 CALL 38528    ; }
 35401 LD A,(34251)  ; {Increment the minute counter at #R34251
 35404 INC A         ;
 35405 LD (34251),A  ; }
 35408 JR NZ,35499   ; Jump unless the minute counter has ticked over to 0
; A minute of game time has passed. Update the game clock accordingly.
 35410 LD IX,34175   ; Point #REGix at the current time at #R34175
 35414 INC (IX+4)    ; Increment the units digit of the minute
 35417 LD A,(IX+4)   ; Pick up the new units digit
 35420 CP 58         ; Was it '9' before?
 35422 JR NZ,35499   ; Jump if not
 35424 LD (IX+4),48  ; Set the units digit of the minute to '0'
 35428 INC (IX+3)    ; Increment the tens digit of the minute
 35431 LD A,(IX+3)   ; Pick up the new tens digit
 35434 CP 54         ; Was it '5' before?
 35436 JR NZ,35499   ; Jump if not
 35438 LD (IX+3),48  ; Set the tens digit of the minute to '0'
 35442 LD A,(IX+0)   ; Pick up the tens digit of the hour
 35445 CP 49         ; Is it currently '1'?
 35447 JR NZ,35481   ; Jump if not
 35449 INC (IX+1)    ; Increment the units digit of the hour
 35452 LD A,(IX+1)   ; Pick up the new units digit
 35455 CP 51         ; Was it '2' before?
 35457 JR NZ,35499   ; Jump if not
 35459 LD A,(IX+5)   ; Pick up the 'a' or 'p' of 'am/pm'
 35462 CP 112        ; Is it 'p'?
 35464 JP Z,34762    ; If so, quit the game (it's 1am)
 35467 LD (IX+0),32  ; Set the tens digit of the hour to ' ' (space)
 35471 LD (IX+1),49  ; Set the units digit of the hour to '1'
 35475 LD (IX+5),112 ; Change the 'a' of 'am' to 'p'
 35479 JR 35499      ;
*35481 INC (IX+1)    ; Increment the units digit of the hour
 35484 LD A,(IX+1)   ; Pick up the new units digit
 35487 CP 58         ; Was it '9' before?
 35489 JR NZ,35499   ; Jump if not
 35491 LD (IX+1),48  ; Set the units digit of the hour to '0'
 35495 LD (IX+0),49  ; Set the tens digit of the hour to '1'
; Now check whether any non-movement keys are being pressed.
@keep
*35499 LD BC,65278   ; {Read keys SHIFT-Z-X-C-V
 35502 IN A,(C)      ; }
 35504 LD E,A        ; Save the result in #REGe
 35505 LD B,127      ; {Read keys B-N-M-SS-SPACE
 35507 IN A,(C)      ; }
 35509 OR E          ; Combine the results
 35510 AND 1         ; Are SHIFT and SPACE being pressed?
 35512 JP Z,34762    ; If so, quit the game
 35515 LD A,(34272)  ; {Increment the inactivity timer at #R34272
 35518 INC A         ;
 35519 LD (34272),A  ; }
 35522 JR Z,35537    ; Jump if the inactivity timer is now 0 (no keys have been
                     ; pressed for a while)
 35524 LD B,253      ; {Read keys A-S-D-F-G
 35526 IN A,(C)      ; }
 35528 AND 31        ; {Are any of these keys being pressed?
 35530 CP 31         ; }
 35532 JR Z,35607    ; Jump if not
 35534 LD DE,0       ; Prepare the delay counters in #REGd and #REGe for the
                     ; pause loop that follows
; The following loop pauses the game until any key except A, S, D, F or G is
; pressed.
@label=PAUSE
*35537 LD B,2        ; {Read every half-row of keys except A-S-D-F-G
 35539 IN A,(C)      ; }
 35541 AND 31        ; {Are any of these keys being pressed?
 35543 CP 31         ; }
@label=SEE39936
 35545 JR NZ,35591   ; If so, resume the game
 35547 INC E         ; Increment the delay counter in #REGe
 35548 JR NZ,35537   ; Jump back unless it's zero
 35550 INC D         ; Increment the delay counter in #REGd
 35551 JR NZ,35537   ; Jump back unless it's zero
 35553 LD A,(34275)  ; Pick up the WRITETYPER key counter from #R34275
 35556 CP 10         ; Has WRITETYPER been keyed in yet?
 35558 CALL NZ,35563 ; If not, cycle the INK and PAPER colours
 35561 JR 35537      ; Jump back to the beginning of the pause loop

; Cycle the INK and PAPER colours
;
; Used by the routines at #R34762 (while scrolling the instructions across the
; screen) and #R35245 (while the game is paused).
@label=CYCLEATTRS
c35563 LD HL,22528   ; Point #REGhl at the first byte of the attribute file
 35566 LD A,(HL)     ; Pick up this byte
 35567 AND 7         ; Keep only bits 0-2 (the INK colour)
 35569 OUT (254),A   ; Set the border colour to match
; Now we loop over every byte in the attribute file.
*35571 LD A,(HL)     ; Pick up an attribute file byte
 35572 ADD A,3       ; {Cycle the INK colour forward by three
 35574 AND 7         ; }
 35576 LD D,A        ; Save the new INK colour in #REGd
 35577 LD A,(HL)     ; Pick up the attribute file byte again
 35578 ADD A,24      ; {Cycle the PAPER colour forward by three (and turn off
 35580 AND 184       ; any BRIGHT colours)}
 35582 OR D          ; Merge in the new INK colour
 35583 LD (HL),A     ; Save the new attribute byte
 35584 INC HL        ; Point #REGhl at the next byte in the attribute file
 35585 LD A,H        ; {Have we reached the end of the attribute file yet?
 35586 CP 91         ; }
 35588 JR NZ,35571   ; If not, jump back to modify the next byte
 35590 RET           ;

; Main loop (2)
;
; Used by the routine at #R35245. The main entry point is used when resuming
; the game after it has been paused.
@label=ENDPAUSE
c35591 LD HL,39424   ; {Copy the attribute bytes from #R39424 to the bottom
 35594 LD DE,23040   ; third of the screen
 35597 LD BC,256     ;
 35600 LDIR          ; }
 35602 LD A,(32990)  ; Pick up the border colour for the current room from
                     ; #R32990
 35605 OUT (254),A   ; Restore the border colour
; This entry point is used by the routine at #R35245.
*35607 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 35610 CP 255        ; Has Willy landed after falling from too great a height,
                     ; or collided with a nasty, an arrow, a guardian, or
                     ; Maria?
 35612 JP Z,35841    ; If so, lose a life
; Now read the keys H, J, K, L and ENTER (which toggle the in-game music).
@bfix=LD A,191       ; Prepare #REGa for reading keys H-J-K-L-ENTER
 35615 LD B,191      ; Prepare #REGb for reading keys H-J-K-L-ENTER
 35617 LD HL,34274   ; Point #REGhl at the music flags at #R34274
@bfix=/IN A,(254)    ; Read keys H-J-K-L-ENTER
 35620 IN A,(C)      ; Read keys H-J-K-L-ENTER; note that if the game has just
                     ; resumed after being paused, #REGc holds #b0 instead of
                     ; #b254, which is a #BUG(thePauseBug)(bug)
 35622 AND 31        ; {Are any of these keys being pressed?
 35624 CP 31         ; }
 35626 JR Z,35638    ; Jump if not
 35628 BIT 0,(HL)    ; Were any of these keys being pressed the last time we
                     ; checked?
 35630 JR NZ,35640   ; Jump if so
 35632 LD A,(HL)     ; {Set bit 0 (the keypress flag) and flip bit 1 (the
 35633 XOR 3         ; in-game music flag) at #R34274
 35635 LD (HL),A     ; }
 35636 JR 35640      ;
*35638 RES 0,(HL)    ; Reset bit 0 (the keypress flag) at #R34274
*35640 BIT 1,(HL)    ; Has the in-game music been switched off?
 35642 JR NZ,35696   ; Jump if so
; The next section of code plays a note of the in-game music.
; .
; #AUDIO0(in-game-tune.wav)(#INCLUDE(InGameTune))
 35644 XOR A         ; {Reset the inactivity timer at #R34272 (the game does
 35645 LD (34272),A  ; not automatically pause after a period of inactivity if
                     ; the in-game music is playing)}
 35648 LD A,(34273)  ; {Increment the in-game music note index at #R34273
 35651 INC A         ;
 35652 LD (34273),A  ; }
 35655 AND 126       ; {Point #REGhl at the appropriate entry in the tune data
 35657 RRCA          ; table at #R34399
 35658 LD E,A        ;
 35659 LD D,0        ;
 35661 LD HL,34399   ;
 35664 ADD HL,DE     ; }
 35665 LD A,(34252)  ; Pick up the number of lives remaining (0-7) from #R34252
 35668 RLCA          ; {#REGa=28-4#REGa; this value adjusts the pitch of the
 35669 RLCA          ; note that is played depending on how many lives are
 35670 SUB 28        ; remaining (the more lives remaining, the higher the
 35672 NEG           ; pitch)}
 35674 ADD A,(HL)    ; Add the entry from the tune data table for the current
                     ; note
 35675 LD D,A        ; Copy this value to #REGd (which determines the pitch of
                     ; the note)
 35676 LD A,(32990)  ; Pick up the border colour for the current room from
                     ; #R32990
 35679 LD E,D        ; Initialise the pitch delay counter in #REGe
 35680 LD BC,3       ; Initialise the duration delay counters in #REGb (0) and
                     ; #REGc (3)
*35683 OUT (254),A   ; {Produce a note of the in-game music
 35685 DEC E         ;
 35686 JR NZ,35691   ;
 35688 LD E,D        ;
 35689 XOR 24        ;
*35691 DJNZ 35683    ;
 35693 DEC C         ;
 35694 JR NZ,35683   ; }
; Here we check the teleport keys.
@keep
*35696 LD BC,61438   ; {Read keys 6-7-8-9-0
 35699 IN A,(C)      ; }
 35701 BIT 1,A       ; Is '9' (the activator key) being pressed?
 35703 JP NZ,35735   ; Jump if not
 35706 AND 16        ; {Keep only bit 4 (corresponding to the '6' key), flip
 35708 XOR 16        ; it, and move it into bit 5
 35710 RLCA          ; }
 35711 LD D,A        ; Now bit 5 of #REGd is set if '6' is being pressed
 35712 LD A,(34275)  ; Pick up the WRITETYPER key counter from #R34275
 35715 CP 10         ; Has WRITETYPER been keyed in yet?
 35717 JP NZ,35735   ; Jump if not
@keep
 35720 LD BC,63486   ; {Read keys 1-2-3-4-5
 35723 IN A,(C)      ; }
 35725 CPL           ; {Keep only bits 0-4 and flip them
 35726 AND 31        ; }
 35728 OR D          ; Copy bit 5 of #REGd into #REGa; now #REGa holds the
                     ; number of the room to teleport to
 35729 LD (33824),A  ; Store the room number at #R33824
 35732 JP 35090      ; Teleport into the room
; Finally, check the WRITETYPER keys.
*35735 LD A,(34275)  ; Pick up the WRITETYPER key counter from #R34275
 35738 CP 10         ; Has WRITETYPER been keyed in yet?
 35740 JP Z,35245    ; If so, jump back to the start of the main loop
 35743 LD A,(33824)  ; Pick up the current room number from #R33824
 35746 CP 28         ; Are we in #R56320(First Landing)?
 35748 JP NZ,35245   ; If not, jump back to the start of the main loop
 35751 LD A,(34255)  ; Pick up Willy's y-coordinate from #R34255
 35754 CP 208        ; Is Willy on the floor at the bottom of the staircase?
 35756 JP NZ,35245   ; If not, jump back to the start of the main loop
 35759 LD A,(34275)  ; Pick up the WRITETYPER key counter (0-9) from #R34275
 35762 RLCA          ; {Point #REGix at the corresponding entry in the
 35763 LD E,A        ; WRITETYPER table at #R34279
 35764 LD D,0        ;
 35766 LD IX,34279   ;
 35770 ADD IX,DE     ; }
@keep
 35772 LD BC,64510   ; {Read keys Q-W-E-R-T
 35775 IN A,(C)      ; }
 35777 AND 31        ; Keep only bits 0-4
 35779 CP (IX+0)     ; Does this match the first byte of the entry in the
                     ; WRITETYPER table?
 35782 JR Z,35802    ; Jump if so
 35784 CP 31         ; Are any of the keys Q-W-E-R-T being pressed?
 35786 JP Z,35245    ; If not, jump back to the start of the main loop
 35789 CP (IX-2)     ; Does the keyboard reading match the first byte of the
                     ; previous entry in the WRITETYPER table?
 35792 JP Z,35245    ; If so, jump back to the start of the main loop
 35795 XOR A         ; {Reset the WRITETYPER key counter at #R34275 to 0 (an
 35796 LD (34275),A  ; incorrect key was pressed)}
 35799 JP 35245      ; Jump back to the start of the main loop
*35802 LD B,223      ; {Read keys Y-U-I-O-P
 35804 IN A,(C)      ; }
 35806 AND 31        ; Keep only bits 0-4
 35808 CP (IX+1)     ; Does this match the second byte of the entry in the
                     ; WRITETYPER table?
 35811 JR Z,35831    ; If so, jump to increment the WRITETYPER key counter
 35813 CP 31         ; Are any of the keys Y-U-I-O-P being pressed?
 35815 JP Z,35245    ; If not, jump back to the start of the main loop
 35818 CP (IX-1)     ; Does the keyboard reading match the second byte of the
                     ; previous entry in the WRITETYPER table?
 35821 JP Z,35245    ; If so, jump back to the start of the main loop
 35824 XOR A         ; {Reset the WRITETYPER key counter at #R34275 to 0 (an
 35825 LD (34275),A  ; incorrect key was pressed)}
 35828 JP 35245      ; Jump back to the start of the main loop
*35831 LD A,(34275)  ; {Increment the WRITETYPER key counter at #R34275
 35834 INC A         ;
 35835 LD (34275),A  ; }
 35838 JP 35245      ; Jump back to the start of the main loop

; Lose a life
;
; Used by the routine at #R35591.
@label=LOSELIFE
c35841 LD A,71       ; #REGa=#b71 (INK 7: PAPER 0: BRIGHT 1)
; The following loop fills the top two thirds of the attribute file with a
; single value (#b71, #b70, #b69, #b68, #b67, #b66, #b65 or #b64) and makes a
; sound effect.
; .
; #AUDIO0(die.wav)(#FOR(7,63,8,7)(d,[13*d+33]*(259-4*d),13*d+10895))
*35843 LD HL,22528   ; {Fill the top two thirds of the attribute file with the
 35846 LD DE,22529   ; value in #REGa
 35849 LD BC,511     ;
 35852 LD (HL),A     ;
 35853 LDIR          ; }
 35855 LD E,A        ; Save the attribute byte (#b64-#b71) in #REGe for later
                     ; retrieval
 35856 CPL           ; {#REGd=63-8*(#REGe #S/AND/ 7); this value determines the
 35857 AND 7         ; pitch of the short note that will be played
 35859 RLCA          ;
 35860 RLCA          ;
 35861 RLCA          ;
 35862 OR 7          ;
 35864 LD D,A        ; }
 35865 LD C,E        ; {#REGc=8+32*(#REGe #S/AND/ 7); this value determines the
 35866 RRC C         ; duration of the short note that will be played
 35868 RRC C         ;
 35870 RRC C         ; }
 35872 OR 16         ; Set bit 4 of #REGa (for no apparent reason)
 35874 XOR A         ; Set #REGa=0 (this will make the border black)
*35875 OUT (254),A   ; {Produce a short note whose pitch is determined by #REGd
 35877 XOR 24        ; and whose duration is determined by #REGc
 35879 LD B,D        ;
*35880 DJNZ 35880    ;
 35882 DEC C         ;
 35883 JR NZ,35875   ; }
 35885 LD A,E        ; Restore the attribute byte (originally #b71) to #REGa
 35886 DEC A         ; Decrement it (effectively decrementing the INK colour)
 35887 CP 63         ; Have we used attribute value #b64 (INK 0) yet?
 35889 JR NZ,35843   ; If not, jump back to update the INK colour in the top
                     ; two thirds of the screen and make another sound effect
; Now check whether any lives remain.
 35891 LD HL,34252   ; {Pick up the number of lives remaining from #R34252
 35894 LD A,(HL)     ; }
 35895 OR A          ; Are there any lives remaining?
 35896 JP Z,35914    ; If not, display the game over sequence
 35899 DEC (HL)      ; Decrease the number of lives remaining by one
@ignoreua
 35900 LD HL,34263   ; {Restore Willy's state upon entry to the room by copying
 35903 LD DE,34255   ; the seven bytes at #R34263 back into #GBUF34255,34261
 35906 LD BC,7       ;
 35909 LDIR          ; }
 35911 JP 35090      ; Reinitialise the room and resume the game

; Display the game over sequence
;
; Used by the routine at #R35841.
@label=GAMEOVER
c35914 LD HL,16384   ; {Clear the top two-thirds of the display file
 35917 LD DE,16385   ;
 35920 LD BC,4095    ;
 35923 LD (HL),0     ;
 35925 LDIR          ; }
 35927 XOR A         ; {Initialise the temporary game status buffer variable at
 35928 LD (34276),A  ; #R34276; this variable will determine the distance of
                     ; the foot from the top of the screen}
 35931 LD DE,40256   ; {Draw Willy at (12,15)
 35934 LD HL,18575   ;
 35937 LD C,0        ;
 35939 CALL 37974    ; }
 35942 LD DE,40032   ; {Draw the barrel underneath Willy at (14,15)
 35945 LD HL,18639   ;
 35948 LD C,0        ;
 35950 CALL 37974    ; }
; The following loop draws the foot's descent onto the barrel that supports
; Willy while producing a sound effect.
; .
; #AUDIO0(game-over.wav)(#GAMEOVER)
*35953 LD A,(34276)  ; Pick up the distance variable from #R34276
 35956 LD C,A        ; {Point #REGbc at the corresponding entry in the screen
@ssub=LD B,33280/256
 35957 LD B,130      ; buffer address lookup table at #R33280}
 35959 LD A,(BC)     ; {Point #REGhl at the corresponding location in the
 35960 OR 15         ; display file
 35962 LD L,A        ;
 35963 INC BC        ;
 35964 LD A,(BC)     ;
 35965 SUB 32        ;
 35967 LD H,A        ; }
 35968 LD DE,40000   ; {Draw the foot at this location, without erasing the
 35971 LD C,0        ; foot at the previous location; this leaves the portion
 35973 CALL 37974    ; of the foot sprite that's above the ankle in place, and
                     ; makes the foot appear as if it's at the end of a long,
                     ; extending leg}
 35976 LD A,(34276)  ; Pick up the distance variable from #R34276
 35979 CPL           ; #REGa=#b255-#REGa
 35980 LD E,A        ; Store this value (#b63-#b255) in #REGe; it determines
                     ; the (rising) pitch of the sound effect that will be made
 35981 XOR A         ; #REGa=0 (black border)
 35982 LD BC,64      ; #REGc=#b64; this value determines the duration of the
                     ; sound effect
*35985 OUT (254),A   ; {Produce a short note whose pitch is determined by #REGe
 35987 XOR 24        ;
 35989 LD B,E        ;
*35990 DJNZ 35990    ;
 35992 DEC C         ;
 35993 JR NZ,35985   ; }
 35995 LD HL,22528   ; {Prepare #REGbc, #REGde and #REGhl for setting the
 35998 LD DE,22529   ; attribute bytes in the top two-thirds of the screen
 36001 LD BC,511     ; }
 36004 LD A,(34276)  ; Pick up the distance variable from #R34276
 36007 AND 12        ; Keep only bits 2 and 3
 36009 RLCA          ; Shift bits 2 and 3 into bits 3 and 4; these bits
                     ; determine the PAPER colour: 0, 1, 2 or 3
 36010 OR 71         ; Set bits 0-2 (INK 7) and 6 (BRIGHT 1)
 36012 LD (HL),A     ; {Copy this attribute value into the top two-thirds of
 36013 LDIR          ; the screen}
 36015 AND 250       ; Reset bits 0 and 2, and retain all other bits
 36017 OR 2          ; Set bit 1 (INK 2)
 36019 LD (22991),A  ; {Copy this attribute value to the cells at (14,15),
 36022 LD (22992),A  ; (14,16), (15, 15) and (15, 16) (where the barrel is, so
 36025 LD (23023),A  ; that it remains red)
 36028 LD (23024),A  ; }
 36031 LD A,(34276)  ; {Add 4 to the distance variable at #R34276; this will
 36034 ADD A,4       ; move the foot sprite down two pixel rows
 36036 LD (34276),A  ; }
 36039 CP 196        ; Has the foot met the barrel yet?
 36041 JR NZ,35953   ; Jump back if not
; Now print the "Game Over" message, just to drive the point home.
 36043 LD IX,34164   ; {Print "Game" (see #R34164) at (6,10)
 36047 LD C,4        ;
 36049 LD DE,16586   ;
 36052 CALL 38528    ; }
 36055 LD IX,34168   ; {Print "Over" (see #R34168) at (6,18)
 36059 LD C,4        ;
 36061 LD DE,16594   ;
 36064 CALL 38528    ; }
 36067 LD BC,0       ; {Prepare the delay counters for the following loop; the
 36070 LD D,6        ; counter in #REGc will also determine the INK colours to
                     ; use for the "Game Over" message}
; The following loop makes the "Game Over" message glisten for about 1.57s.
*36072 DJNZ 36072    ; Delay for about a millisecond
 36074 LD A,C        ; {Change the INK colour of the "G" in "Game" at (6,10)
 36075 AND 7         ;
 36077 OR 64         ;
 36079 LD (22730),A  ; }
 36082 INC A         ; {Change the INK colour of the "a" in "Game" at (6,11)
 36083 AND 7         ;
 36085 OR 64         ;
 36087 LD (22731),A  ; }
 36090 INC A         ; {Change the INK colour of the "m" in "Game" at (6,12)
 36091 AND 7         ;
 36093 OR 64         ;
 36095 LD (22732),A  ; }
 36098 INC A         ; {Change the INK colour of the "e" in "Game" at (6,13)
 36099 AND 7         ;
 36101 OR 64         ;
 36103 LD (22733),A  ; }
 36106 INC A         ; {Change the INK colour of the "O" in "Over" at (6,18)
 36107 AND 7         ;
 36109 OR 64         ;
 36111 LD (22738),A  ; }
 36114 INC A         ; {Change the INK colour of the "v" in "Over" at (6,19)
 36115 AND 7         ;
 36117 OR 64         ;
 36119 LD (22739),A  ; }
 36122 INC A         ; {Change the INK colour of the "e" in "Over" at (6,20)
 36123 AND 7         ;
 36125 OR 64         ;
 36127 LD (22740),A  ; }
 36130 INC A         ; {Change the INK colour of the "r" in "Over" at (6,21)
 36131 AND 7         ;
 36133 OR 64         ;
 36135 LD (22741),A  ; }
 36138 DEC C         ; Decrement the counter in #REGc
 36139 JR NZ,36072   ; Jump back unless it's zero
 36141 DEC D         ; Decrement the counter in #REGd (initially 6)
 36142 JR NZ,36072   ; Jump back unless it's zero
 36144 JP 34762      ; Display the title screen and play the theme tune

; Draw the current room to the screen buffer at #N28672
;
; Used by the routine at #R35090.
@label=DRAWROOM
c36147 CALL 36203    ; Fill the buffer at #R24064 with attribute bytes for the
                     ; current room
 36150 LD IX,24064   ; Point #REGix at the first byte of the attribute buffer
                     ; at #R24064
@ignoreua
 36154 LD A,112      ; {Set the operand of the '#S/LD D/,n' instruction at
@ssub=LD (36188+1),A
 36156 LD (36189),A  ; #R36188 (below) to #n112}
 36159 CALL 36171    ; Draw the tiles for the top half of the room to the
                     ; screen buffer at #R28672
 36162 LD IX,24320   ; Point #REGix at the 256th byte of the attribute buffer
                     ; at #R24064 in preparation for drawing the bottom half of
                     ; the room; this instruction is redundant, since #REGix
                     ; already holds #N24320
@ignoreua
 36166 LD A,120      ; {Set the operand of the '#S/LD D/,n' instruction at
@ssub=LD (36188+1),A
 36168 LD (36189),A  ; #R36188 (below) to #n120}
*36171 LD C,0        ; #REGc will count 256 tiles
; The following loop draws 256 tiles (for either the top half or the bottom
; half of the room) to the screen buffer at #R28672.
*36173 LD E,C        ; #REGe holds the LSB of the screen buffer address
 36174 LD A,(IX+0)   ; Pick up an attribute byte from the buffer at #R24064;
                     ; this identifies the type of tile (background, floor,
                     ; wall, nasty, ramp or conveyor) to be drawn
@if({asm}>1)//bfix=LD HL,32928-9/bfix=LD HL,32919//
 36177 LD HL,32928   ; {Move #REGhl through the attribute bytes and graphic
@bfix=LD BC,9
 36180 LD BC,54      ; data of the background, floor, wall, nasty, ramp and
@bfix=|CALL 65318
@bfix=/              ; that matches the attribute byte of the tile to be drawn}
 36183 CPIR          ; conveyor tiles starting at #R32928 until we find a byte
                     ; that matches the attribute byte of the tile to be drawn;
                     ; note that if a graphic data byte matches the attribute
                     ; byte being searched for, the #S/CPIR/ instruction can
                     ; exit early, which is a #BUG(corruptedConveyors)(bug)}
 36185 LD C,E        ; Restore the value of the tile counter in #REGc
 36186 LD B,8        ; There are eight bytes in the tile
@label=BUFMSB
 36188 LD D,0        ; This instruction is set to either '#S/LD D/,#n112' or
                     ; '#S/LD D/,#n120' above; now #REGde holds the appropriate
                     ; address in the screen buffer at #R28672
*36190 LD A,(HL)     ; {Copy the tile graphic data to the screen buffer at
 36191 LD (DE),A     ; #R28672
 36192 INC HL        ;
 36193 INC D         ;
 36194 DJNZ 36190    ; }
 36196 INC IX        ; Move #REGix along to the next byte in the attribute
                     ; buffer
 36198 INC C         ; Have we drawn 256 tiles yet?
 36199 JP NZ,36173   ; If not, jump back to draw the next one
 36202 RET           ;

; Fill the buffer at #N24064 with attribute bytes for the current room
;
; Used by the routine at #R36147. Fills the buffer at #R24064 with attribute
; bytes for the background, floor, wall, nasty, conveyor and ramp tiles in the
; current room.
@label=ROOMATTRS
c36203 LD HL,32768   ; Point #REGhl at the first room layout byte at #R32768
 36206 LD IX,24064   ; Point #REGix at the first byte of the attribute buffer
                     ; at #R24064
; The following loop copies the attribute bytes for the background, floor, wall
; and nasty tiles into the buffer at #R24064.
*36210 LD A,(HL)     ; Pick up a room layout byte
 36211 RLCA          ; {Move bits 6 and 7 into bits 0 and 1
 36212 RLCA          ; }
 36213 CALL 36288    ; Copy the attribute byte for this tile into the buffer at
                     ; #R24064
 36216 LD A,(HL)     ; Pick up the room layout byte again
 36217 RRCA          ; {Move bits 4 and 5 into bits 0 and 1
 36218 RRCA          ;
 36219 RRCA          ;
 36220 RRCA          ; }
 36221 CALL 36288    ; Copy the attribute byte for this tile into the buffer at
                     ; #R24064
 36224 LD A,(HL)     ; Pick up the room layout byte again
 36225 RRCA          ; {Move bits 2 and 3 into bits 0 and 1
 36226 RRCA          ; }
 36227 CALL 36288    ; Copy the attribute byte for this tile into the buffer at
                     ; #R24064
 36230 LD A,(HL)     ; Pick up the room layout byte again; this time the
                     ; required bit-pair is already in bits 0 and 1
 36231 CALL 36288    ; Copy the attribute byte for this tile into the buffer at
                     ; #R24064
 36234 INC HL        ; Point #REGhl at the next room layout byte
 36235 LD A,L        ; {Have we processed all 128 room layout bytes yet?
 36236 AND 128       ; }
 36238 JR Z,36210    ; If not, jump back to process the next one
; Next consider the conveyor tiles (if any).
 36240 LD A,(32985)  ; Pick up the length of the conveyor from #R32985
 36243 OR A          ; Is there a conveyor in the room?
 36244 JR Z,36257    ; Jump if not
 36246 LD HL,(32983) ; Pick up the address of the conveyor's location in the
                     ; attribute buffer at #R24064 from #R32983
 36249 LD B,A        ; #REGb will count the conveyor tiles
 36250 LD A,(32973)  ; Pick up the attribute byte for the conveyor tile from
                     ; #R32973
*36253 LD (HL),A     ; {Copy the attribute bytes for the conveyor tiles into
 36254 INC HL        ; the buffer at #R24064
 36255 DJNZ 36253    ; }
; And finally consider the ramp tiles (if any).
*36257 LD A,(32989)  ; Pick up the length of the ramp from #R32989
 36260 OR A          ; Is there a ramp in the room?
 36261 RET Z         ; Return if not
 36262 LD HL,(32987) ; Pick up the address of the ramp's location in the
                     ; attribute buffer at #R24064 from #R32987
 36265 LD A,(32986)  ; {Pick up the ramp direction from #R32986; #REGa=0 (ramp
 36268 AND 1         ; goes up to the left) or 1 (ramp goes up to the right)}
 36270 RLCA          ; {Now #REGde=-33 (ramp goes up to the left) or -31 (ramp
 36271 ADD A,223     ; goes up to the right)
 36273 LD E,A        ;
 36274 LD D,255      ; }
 36276 LD A,(32989)  ; Pick up the length of the ramp from #R32989
 36279 LD B,A        ; #REGb will count the ramp tiles
 36280 LD A,(32964)  ; Pick up the attribute byte for the ramp tile from
                     ; #R32964
*36283 LD (HL),A     ; {Copy the attribute bytes for the ramp tiles into the
 36284 ADD HL,DE     ; buffer at #R24064
 36285 DJNZ 36283    ; }
 36287 RET           ;

; Copy a room attribute byte into the buffer at #N24064
;
; Used by the routine at #R36203. On entry, #REGa holds a room layout byte,
; rotated such that the bit-pair corresponding to the tile of interest is in
; bits 0 and 1.
;
; A Room layout byte (rotated)
; IX Attribute buffer address (#R24064(#N24064-#N24575))
@label=ROOMATTR
c36288 AND 3         ; Keep only bits 0 and 1; #REGa=0 (background), 1 (floor),
                     ; 2 (wall) or 3 (nasty)
 36290 LD C,A        ; {Multiply by 9 and add #b160; now #REGa=#b160
 36291 RLCA          ; (background), #b169 (floor), #b178 (wall) or #b187
 36292 RLCA          ; (nasty)
 36293 RLCA          ;
 36294 ADD A,C       ;
 36295 ADD A,160     ; }
 36297 LD E,A        ; {Point #REGde at the attribute byte for the background,
@ssub=LD D,32768/256
 36298 LD D,128      ; floor, wall or nasty tile (see #R32928)}
 36300 LD A,(DE)     ; {Copy the attribute byte into the buffer at #R24064
 36301 LD (IX+0),A   ; }
 36304 INC IX        ; Move #REGix along to the next byte in the attribute
                     ; buffer
 36306 RET           ;

; Move Willy (1)
;
; Used by the routine at #R35245. This routine deals with Willy if he's jumping
; or falling.
@label=MOVEWILLY
c36307 LD A,(34262)  ; Pick up the rope status indicator from #R34262
 36310 DEC A         ; {Is Willy on a rope?
 36311 BIT 7,A       ; }
 36313 JP Z,36564    ; Jump if so
 36316 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 36319 CP 1          ; Is Willy jumping?
 36321 JR NZ,36406   ; Jump if not
; Willy is currently jumping.
; .
; #AUDIO0(jumping.wav)(#FOR1,18,,3(j,[104*(#IF(j>8)(j-8,8-j))+137]*31,280000))
 36323 LD A,(34261)  ; Pick up the jumping animation counter (0-17) from
                     ; #R34261
 36326 AND 254       ; Discard bit 0
 36328 SUB 8         ; Now -8<=#REGa<=8 (and #REGa is even)
 36330 LD HL,34255   ; {Adjust Willy's y-coordinate at #R34255 depending on
 36333 ADD A,(HL)    ; where Willy is in the jump
 36334 LD (HL),A     ; }
 36335 CP 240        ; Is the new value negative (above the top of the screen)?
 36337 JP NC,38064   ; If so, move Willy into the room above
 36340 CALL 36508    ; Adjust Willy's attribute buffer location at #R34259
                     ; depending on his y-coordinate
 36343 LD A,(32946)  ; Pick up the attribute byte of the wall tile for the
                     ; current room from #R32946
 36346 CP (HL)       ; Is the top-left cell of Willy's sprite overlapping a
                     ; wall tile?
 36347 JP Z,36540    ; Jump if so
 36350 INC HL        ; Point #REGhl at the top-right cell occupied by Willy's
                     ; sprite
 36351 CP (HL)       ; Is the top-right cell of Willy's sprite overlapping a
                     ; wall tile?
 36352 JP Z,36540    ; Jump if so
 36355 LD A,(34261)  ; {Increment the jumping animation counter at #R34261
 36358 INC A         ;
 36359 LD (34261),A  ; }
 36362 SUB 8         ; #REGa=J-8, where J (1-18) is the new value of the
                     ; jumping animation counter
 36364 JP P,36369    ; Jump if J>=8
 36367 NEG           ; #REGa=8-J (1<=J<=7, 1<=#REGa<=7)
*36369 INC A         ; #REGa=1+ABS(J-8)
 36370 RLCA          ; {#REGd=8*(1+ABS(J-8)); this value determines the pitch
 36371 RLCA          ; of the jumping sound effect (rising as Willy rises,
 36372 RLCA          ; falling as Willy falls)
 36373 LD D,A        ; }
 36374 LD C,32       ; This value determines the duration of the jumping sound
                     ; effect
 36376 LD A,(32990)  ; Pick up the border colour for the current room from
                     ; #R32990
*36379 OUT (254),A   ; {Make a jumping sound effect
 36381 XOR 24        ;
 36383 LD B,D        ;
*36384 DJNZ 36384    ;
 36386 DEC C         ;
 36387 JR NZ,36379   ; }
 36389 LD A,(34261)  ; Pick up the jumping animation counter (1-18) from
                     ; #R34261
 36392 CP 18         ; Has Willy reached the end of the jump?
 36394 JP Z,36528    ; Jump if so
 36397 CP 16         ; Is the jumping animation counter now 16?
 36399 JR Z,36406    ; Jump if so
 36401 CP 13         ; Is the jumping animation counter now 13?
 36403 JP NZ,36796   ; Jump if not
; If we get here, then Willy is standing on the floor or a ramp, or he's
; falling, or his jumping animation counter is 13 (at which point Willy is on
; his way down and is exactly two cell-heights above where he started the jump)
; or 16 (at which point Willy is on his way down and is exactly one cell-height
; above where he started the jump).
*36406 LD A,(34255)  ; Pick up Willy's y-coordinate from #R34255
 36409 AND 14        ; Is Willy either on a ramp, or occupying only four cells?
 36411 JR NZ,36450   ; Jump if not
 36413 LD HL,(34259) ; Pick up Willy's attribute buffer coordinates from
                     ; #R34259
 36416 LD DE,64      ; {Point #REGhl at the left-hand cell below Willy's sprite
 36419 ADD HL,DE     ; }
 36420 BIT 1,H       ; Is this location below the floor of the current room?
 36422 JP NZ,38098   ; If so, move Willy into the room below
 36425 LD A,(32955)  ; Pick up the attribute byte of the nasty tile for the
                     ; current room from #R32955
 36428 CP (HL)       ; Does the left-hand cell below Willy's sprite contain a
                     ; nasty?
 36429 JR Z,36450    ; Jump if so
 36431 INC HL        ; Point #REGhl at the right-hand cell below Willy's sprite
 36432 LD A,(32955)  ; Pick up the attribute byte of the nasty tile for the
                     ; current room from #R32955 (again, redundantly)
 36435 CP (HL)       ; Does the right-hand cell below Willy's sprite contain a
                     ; nasty?
 36436 JR Z,36450    ; Jump if so
 36438 LD A,(32928)  ; Pick up the attribute byte of the background tile for
                     ; the current room from #R32928
 36441 CP (HL)       ; Set the zero flag if the right-hand cell below Willy's
                     ; sprite is empty
 36442 DEC HL        ; Point #REGhl at the left-hand cell below Willy's sprite
 36443 JP NZ,36564   ; Jump if the right-hand cell below Willy's sprite is not
                     ; empty
 36446 CP (HL)       ; Is the left-hand cell below Willy's sprite empty?
 36447 JP NZ,36564   ; Jump if not
*36450 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 36453 CP 1          ; Is Willy jumping?
 36455 JP Z,36796    ; Jump if so
; If we get here, then Willy is either in the process of falling or just about
; to start falling.
; .
; #AUDIO0(falling.wav)(#FOR3,31,,3(a,[208*(#IF(a<16)(a,a%4+12))+33]*31,280000))
 36458 LD HL,34256   ; {Reset bit 1 at #R34256: Willy is not moving left or
 36461 RES 1,(HL)    ; right}
 36463 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 36466 OR A          ; Is Willy already falling?
 36467 JP Z,36534    ; Jump if not
 36470 INC A         ; Increment the airborne status indicator
 36471 CP 16         ; Is it 16 now?
 36473 JR NZ,36477   ; Jump if not
 36475 LD A,12       ; Decrease the airborne status indicator from #b16 to #b12
*36477 LD (34257),A  ; Update the airborne status indicator at #R34257
 36480 RLCA          ; {#REGd=16*#REGa; this value determines the pitch of the
 36481 RLCA          ; falling sound effect
 36482 RLCA          ;
 36483 RLCA          ;
 36484 LD D,A        ; }
 36485 LD C,32       ; This value determines the duration of the falling sound
                     ; effect
 36487 LD A,(32990)  ; Pick up the border colour for the current room from
                     ; #R32990
*36490 OUT (254),A   ; {Make a falling sound effect
 36492 XOR 24        ;
 36494 LD B,D        ;
*36495 DJNZ 36495    ;
 36497 DEC C         ;
 36498 JR NZ,36490   ; }
 36500 LD A,(34255)  ; {Add 8 to Willy's y-coordinate at #R34255; this moves
 36503 ADD A,8       ; Willy downwards by 4 pixels
 36505 LD (34255),A  ; }
; This entry point is used by the routine at #R37310 to update Willy's
; attribute buffer location when he's on a rope.
*36508 AND 240       ; {#REGl=16*Y, where Y is Willy's screen y-coordinate
 36510 LD L,A        ; (0-14)}
 36511 XOR A         ; Clear #REGa and the carry flag
 36512 RL L          ; Now #REGl=32*(Y-8*INT(Y/8)), and the carry flag is set
                     ; if Willy is in the lower half of the room (Y>=8)
 36514 ADC A,92      ; {#REGh=#b92 or #b93 (MSB of the address of Willy's
 36516 LD H,A        ; location in the attribute buffer)}
 36517 LD A,(34259)  ; {Pick up Willy's screen x-coordinate (0-30) from bits
 36520 AND 31        ; 0-4 at #R34259}
 36522 OR L          ; {Now #REGl holds the LSB of Willy's attribute buffer
 36523 LD L,A        ; address}
 36524 LD (34259),HL ; Store Willy's updated attribute buffer location at
                     ; #R34259
 36527 RET           ;
; Willy has just finished a jump.
*36528 LD A,6        ; {Set the airborne status indicator at #R34257 to #b6:
 36530 LD (34257),A  ; Willy will continue to fall unless he's landed on a wall
                     ; or floor block}
 36533 RET           ;
; Willy has just started falling.
*36534 LD A,2        ; {Set the airborne status indicator at #R34257 to #b2
 36536 LD (34257),A  ; }
 36539 RET           ;
; The top-left or top-right cell of Willy's sprite is overlapping a wall tile.
*36540 LD A,(34255)  ; {Adjust Willy's y-coordinate at #R34255 so that the top
 36543 ADD A,16      ; row of cells of his sprite is just below the wall tile
 36545 AND 240       ;
 36547 LD (34255),A  ; }
 36550 CALL 36508    ; Adjust Willy's attribute buffer location at #R34259 to
                     ; account for this new y-coordinate
 36553 LD A,2        ; {Set the airborne status indicator at #R34257 to #b2:
 36555 LD (34257),A  ; Willy has started falling}
 36558 LD HL,34256   ; {Reset bit 1 at #R34256: Willy is not moving left or
 36561 RES 1,(HL)    ; right}
 36563 RET           ;

; Move Willy (2)
;
; Used by the routine at #R36307. This routine checks the keyboard and
; joystick.
;
; HL Attribute buffer address of the left-hand cell below Willy's sprite (if
; .  Willy is not on a rope)
@label=MOVEWILLY2
c36564 LD E,255      ; Initialise #REGe to #b255 (all bits set); it will be
                     ; used to hold keyboard and joystick readings
 36566 LD A,(34262)  ; Pick up the rope status indicator from #R34262
 36569 DEC A         ; {Is Willy on a rope?
 36570 BIT 7,A       ; }
 36572 JR Z,36602    ; Jump if so
 36574 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 36577 CP 12         ; Has Willy just landed after falling from too great a
                     ; height?
 36579 JP NC,37047   ; If so, kill him
 36582 XOR A         ; {Reset the airborne status indicator at #R34257 (Willy
 36583 LD (34257),A  ; has landed safely)}
 36586 LD A,(32973)  ; Pick up the attribute byte of the conveyor tile for the
                     ; current room from #R32973
 36589 CP (HL)       ; Does the attribute byte of the left-hand cell below
                     ; Willy's sprite match that of the conveyor tile?
 36590 JR Z,36596    ; Jump if so
 36592 INC HL        ; Point #REGhl at the right-hand cell below Willy's sprite
 36593 CP (HL)       ; Does the attribute byte of the right-hand cell below
                     ; Willy's sprite match that of the conveyor tile?
 36594 JR NZ,36602   ; Jump if not
*36596 LD A,(32982)  ; Pick up the direction byte of the conveyor definition
                     ; from #R32982 (0=left, 1=right)
 36599 SUB 3         ; {Now #REGe=#b253 (bit 1 reset) if the conveyor is moving
 36601 LD E,A        ; left, or #b254 (bit 0 reset) if it's moving right}
@keep
*36602 LD BC,57342   ; {Read keys P-O-I-U-Y (right, left, right, left, right)
 36605 IN A,(C)      ; into bits 0-4 of #REGa}
 36607 AND 31        ; {Set bit 5 and reset bits 6 and 7
 36609 OR 32         ; }
 36611 AND E         ; Reset bit 0 if the conveyor is moving right, or bit 1 if
                     ; it's moving left
 36612 LD E,A        ; Save the result in #REGe
 36613 LD A,(34271)  ; Pick up the game mode indicator (0, 1 or 2) from #R34271
 36616 AND 2         ; {Now #REGa=1 if Willy is running to the toilet, 0
 36618 RRCA          ; otherwise}
 36619 XOR E         ; {Flip bit 0 of #REGe if Willy is running to the toilet,
@bfix=/              ; forcing him to move right}
 36620 LD E,A        ; forcing him to move right (unless he's jumped onto the
                     ; bed, in which case bit 0 of #REGe is now set, meaning
                     ; that the conveyor does not move him, and the 'P' key has
                     ; no effect; this is a #BUG(theStickyBed)(bug))}
@keep
 36621 LD BC,64510   ; {Read keys Q-W-E-R-T (left, right, left, right, left)
 36624 IN A,(C)      ; into bits 0-4 of #REGa}
 36626 AND 31        ; {Keep only bits 0-4, shift them into bits 1-5, and set
 36628 RLC A         ; bit 0
 36630 OR 1          ; }
 36632 AND E         ; {Merge this keyboard reading into bits 1-5 of #REGe
 36633 LD E,A        ; }
 36634 LD B,231      ; {Read keys 1-2-3-4-5 ('5' is left) and 0-9-8-7-6 (jump,
 36636 IN A,(C)      ; nothing, right, right, left) into bits 0-4 of #REGa}
 36638 RRCA          ; {Rotate the result right and set bits 0-2 and 4-7; this
 36639 OR 247        ; ignores every key except '5' and '6' (left)}
 36641 AND E         ; {Merge this reading of the '5' and '6' keys into bit 3
 36642 LD E,A        ; of #REGe}
 36643 LD B,239      ; {Read keys 0-9-8-7-6 (jump, nothing, right, right, left)
 36645 IN A,(C)      ; into bits 0-4 of #REGa}
 36647 OR 251        ; Set bits 0, 1 and 3-7; this ignores every key except '8'
                     ; (right)
 36649 AND E         ; {Merge this reading of the '8' key into bit 2 of #REGe
 36650 LD E,A        ; }
 36651 IN A,(C)      ; Read keys 0-9-8-7-6 (jump, nothing, right, right, left)
                     ; into bits 0-4 of #REGa
 36653 RRCA          ; {Rotate the result right and set bits 0, 1 and 3-7; this
 36654 OR 251        ; ignores every key except '7' (right)}
 36656 AND E         ; {Merge this reading of the '7' key into bit 2 of #REGe
 36657 LD E,A        ; }
 36658 LD A,(34254)  ; Collect the Kempston joystick indicator from #R34254
 36661 OR A          ; Is the joystick connected?
 36662 JR Z,36674    ; Jump if not
 36664 LD BC,31      ; {Collect input from the joystick
 36667 IN A,(C)      ; }
 36669 AND 3         ; {Keep only bits 0 (right) and 1 (left) and flip them
 36671 CPL           ; }
 36672 AND E         ; {Merge this reading of the joystick right and left
 36673 LD E,A        ; buttons into bits 0 and 1 of #REGe}
; At this point, bits 0-5 in #REGe indicate the direction in which Willy is
; being moved or trying to move. If bit 0, 2 or 4 is reset, Willy is being
; moved or trying to move right; if bit 1, 3 or 5 is reset, Willy is being
; moved or trying to move left.
*36674 LD C,0        ; Initialise #REGc to 0 (no movement)
 36676 LD A,E        ; Copy the movement bits into #REGa
 36677 AND 42        ; Keep only bits 1, 3 and 5 (the 'left' bits)
 36679 CP 42         ; Are any of these bits reset?
 36681 JR Z,36689    ; Jump if not
 36683 LD C,4        ; Set bit 2 of #REGc: Willy is moving left
 36685 XOR A         ; {Reset the inactivity timer at #R34272
 36686 LD (34272),A  ; }
*36689 LD A,E        ; Copy the movement bits into #REGa
 36690 AND 21        ; Keep only bits 0, 2 and 4 (the 'right' bits)
 36692 CP 21         ; Are any of these bits reset?
 36694 JR Z,36702    ; Jump if not
 36696 SET 3,C       ; Set bit 3 of #REGc: Willy is moving right
 36698 XOR A         ; {Reset the inactivity timer at #R34272
 36699 LD (34272),A  ; }
*36702 LD A,(34256)  ; Pick up Willy's direction and movement flags from
                     ; #R34256
 36705 ADD A,C       ; {Point #REGhl at the entry in the left-right movement
 36706 LD C,A        ; table at #R33825 that corresponds to the direction Willy
 36707 LD B,0        ; is facing, and the direction in which he is being moved
 36709 LD HL,33825   ; or trying to move
 36712 ADD HL,BC     ; }
 36713 LD A,(HL)     ; {Update Willy's direction and movement flags at #R34256
 36714 LD (34256),A  ; with the entry from the left-right movement table}
; That is left-right movement taken care of. Now check the jump keys.
 36717 LD BC,32510   ; {Read keys SHIFT-Z-X-C-V and B-N-M-SS-SPACE
 36720 IN A,(C)      ; }
 36722 AND 31        ; {Are any of these keys being pressed?
 36724 CP 31         ; }
 36726 JR NZ,36751   ; Jump if so
 36728 LD B,239      ; {Read keys 6-7-8-9-0
 36730 IN A,(C)      ; }
 36732 BIT 0,A       ; Is '0' being pressed?
 36734 JR Z,36751    ; Jump if so
 36736 LD A,(34254)  ; Collect the Kempston joystick indicator from #R34254
 36739 OR A          ; Is the joystick connected?
 36740 JR Z,36796    ; Jump if not
 36742 LD BC,31      ; {Collect input from the joystick
 36745 IN A,(C)      ; }
 36747 BIT 4,A       ; Is the fire button being pressed?
 36749 JR Z,36796    ; Jump if not
; A jump key or the fire button is being pressed. Time to make Willy jump.
*36751 LD A,(34271)  ; Pick up the game mode indicator from #R34271
 36754 BIT 1,A       ; Is Willy running to the toilet?
 36756 JR NZ,36796   ; Jump if so
 36758 XOR A         ; {Initialise the jumping animation counter at #R34261 to
 36759 LD (34261),A  ; 0}
 36762 LD (34272),A  ; Reset the inactivity timer at #R34272
 36765 INC A         ; {Set the airborne status indicator at #R34257 to #b1:
 36766 LD (34257),A  ; Willy is jumping}
 36769 LD A,(34262)  ; Pick up the rope status indicator from #R34262
 36772 DEC A         ; {Is Willy on a rope?
 36773 BIT 7,A       ; }
 36775 JR NZ,36796   ; Jump if not
 36777 LD A,240      ; {Set the rope status indicator at #R34262 to #b240
 36779 LD (34262),A  ; }
 36782 LD A,(34255)  ; {Round down Willy's y-coordinate at #R34255 to the
 36785 AND 240       ; nearest multiple of 16; this might move him upwards a
 36787 LD (34255),A  ; little, but ensures that his actual pixel y-coordinate
                     ; is a multiple of 8 (making his sprite cell-aligned)
                     ; before he begins the jump off the rope}
 36790 LD HL,34256   ; {Set bit 1 at #R34256: during this jump off the rope,
 36793 SET 1,(HL)    ; Willy will move in the direction he's facing}
 36795 RET           ;

; Move Willy (3)
;
; Used by the routines at #R36307 and #R36564. This routine moves Willy left or
; right if necessary.
@label=MOVEWILLY3
c36796 LD A,(34256)  ; Pick up Willy's direction and movement flags from
                     ; #R34256
 36799 AND 2         ; Is Willy moving left or right?
 36801 RET Z         ; Return if not
 36802 LD A,(34262)  ; Pick up the rope status indicator from #R34262
 36805 DEC A         ; {Is Willy on a rope?
 36806 BIT 7,A       ; }
 36808 RET Z         ; Return if so (Willy's movement along a rope is handled
                     ; at #R37726)
 36809 LD A,(34256)  ; Pick up Willy's direction and movement flags from
                     ; #R34256
 36812 AND 1         ; Is Willy facing right?
 36814 JP Z,36930    ; Jump if so
; Willy is moving left.
 36817 LD A,(34258)  ; Pick up Willy's animation frame from #R34258
 36820 OR A          ; Is it 0?
 36821 JR Z,36828    ; If so, jump to move Willy's sprite left across a cell
                     ; boundary
 36823 DEC A         ; {Decrement Willy's animation frame at #R34258
 36824 LD (34258),A  ; }
 36827 RET           ;
; Willy's sprite is moving left across a cell boundary. In the comments that
; follow, (x,y) refers to the coordinates of the top-left cell currently
; occupied by Willy's sprite.
*36828 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 36831 LD BC,0       ; Prepare #REGbc for later addition
 36834 CP 0          ; Is Willy jumping?
 36836 JR NZ,36874   ; Jump if so
 36838 LD HL,(34259) ; Collect Willy's attribute buffer coordinates from
                     ; #R34259
 36841 LD BC,0       ; Prepare #REGbc for later addition (again, redundantly)
 36844 LD A,(32986)  ; Pick up the direction byte of the ramp definition for
                     ; the current room from #R32986
 36847 DEC A         ; {Now #REGa=#b31 if the ramp goes up to the left, or #b65
 36848 OR 161        ; if it goes up to the right
 36850 XOR 224       ; }
 36852 LD E,A        ; {Point #REGhl at the cell at (x-1,y+1) if the ramp goes
 36853 LD D,0        ; up to the left, or at the cell at (x+1,y+2) if the ramp
 36855 ADD HL,DE     ; goes up to the right}
 36856 LD A,(32964)  ; Pick up the attribute byte of the ramp tile for the
                     ; current room from #R32964
 36859 CP (HL)       ; Is there a ramp tile in the cell pointed to by #REGhl?
 36860 JR NZ,36874   ; Jump if not
 36862 LD BC,32      ; Prepare #REGbc for later addition
 36865 LD A,(32986)  ; Pick up the direction byte of the ramp definition for
                     ; the current room from #R32986
 36868 OR A          ; Does the ramp go up to the right?
 36869 JR NZ,36874   ; Jump if so
@keep
 36871 LD BC,65504   ; #REGbc=-32 (the ramp goes up to the left)
*36874 LD HL,(34259) ; Collect Willy's attribute buffer coordinates from
                     ; #R34259
 36877 LD A,L        ; {Is Willy's screen x-coordinate 0 (on the far left)?
 36878 AND 31        ; }
 36880 JP Z,38026    ; If so, move Willy into the room to the left
 36883 ADD HL,BC     ; {Point #REGhl at the cell at (x-1,y+1), or at the cell
 36884 DEC HL        ; at (x-1,y) if Willy is on or about to step onto a ramp
 36885 LD DE,32      ; that goes up to the left, or at the cell at (x-1,y+2) if
 36888 ADD HL,DE     ; Willy is walking down a ramp}
 36889 LD A,(32946)  ; Pick up the attribute byte of the wall tile for the
                     ; current room from #R32946
 36892 CP (HL)       ; Is there a wall tile in the cell pointed to by #REGhl?
 36893 RET Z         ; Return if so without moving Willy (his path is blocked)
 36894 LD A,(34255)  ; Pick up Willy's y-coordinate (Y) from #R34255
 36897 SRA C         ; {Now #REGb=Y (if Willy is neither on nor about to step
 36899 ADD A,C       ; onto a ramp), or Y+16 (if Willy is walking down a ramp),
 36900 LD B,A        ; or Y-16 (if Willy is on or about to step onto a ramp
                     ; that goes up to the left); this will be Willy's new
                     ; y-coordinate}
 36901 AND 15        ; Is Willy at a point in a jump (left) where his sprite
                     ; occupies three rows of cells?
 36903 JR Z,36914    ; Jump if not (Willy's sprite is cell-aligned)
 36905 LD A,(32946)  ; Pick up the attribute byte of the wall tile for the
                     ; current room from #R32946
 36908 ADD HL,DE     ; Point #REGhl at the cell at (x-1,y+2)
 36909 CP (HL)       ; Is there a wall tile there?
 36910 RET Z         ; Return if so without moving Willy (his path is blocked)
 36911 OR A          ; {Point #REGhl at the cell at (x-1,y+1)
 36912 SBC HL,DE     ; }
*36914 OR A          ; {Point #REGhl at the cell at (x-1,y), or at the cell at
 36915 SBC HL,DE     ; (x-1,y-1) if Willy is on or about to step onto a ramp
                     ; that goes up to the left, or at the cell at (x-1,y+1) if
                     ; Willy is walking down a ramp}
 36917 LD (34259),HL ; Save Willy's new attribute buffer coordinates (in
                     ; #REGhl) at #R34259
 36920 LD A,B        ; {Save Willy's new y-coordinate at #R34255
 36921 LD (34255),A  ; }
 36924 LD A,3        ; {Change Willy's animation frame at #R34258 from 0 to 3
 36926 LD (34258),A  ; }
 36929 RET           ;
; Willy is moving right.
*36930 LD A,(34258)  ; Pick up Willy's animation frame from #R34258
 36933 CP 3          ; Is it 3?
 36935 JR Z,36942    ; If so, jump to move Willy's sprite right across a cell
                     ; boundary
 36937 INC A         ; {Increment Willy's animation frame at #R34258
 36938 LD (34258),A  ; }
 36941 RET           ;
; Willy's sprite is moving right across a cell boundary. In the comments that
; follow, (x,y) refers to the coordinates of the top-left cell currently
; occupied by Willy's sprite.
*36942 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 36945 LD BC,0       ; Prepare #REGbc for later addition
 36948 OR A          ; Is Willy jumping?
 36949 JR NZ,36984   ; Jump if so
 36951 LD HL,(34259) ; Collect Willy's attribute buffer coordinates from
                     ; #R34259
 36954 LD A,(32986)  ; Pick up the direction byte of the ramp definition for
                     ; the current room from #R32986
 36957 DEC A         ; {Now #REGa=#b64 if the ramp goes up to the left, or #b34
 36958 OR 157        ; if it goes up to the right
 36960 XOR 191       ; }
 36962 LD E,A        ; {Point #REGhl at the cell at (x,y+2) if the ramp goes up
 36963 LD D,0        ; to the left, or at the cell at (x+2,y+1) if the ramp
 36965 ADD HL,DE     ; goes up to the right}
 36966 LD A,(32964)  ; Pick up the attribute byte of the ramp tile for the
                     ; current room from #R32964
 36969 CP (HL)       ; Is there a ramp tile in the cell pointed to by #REGhl?
 36970 JR NZ,36984   ; Jump if not
 36972 LD BC,32      ; Prepare #REGbc for later addition
 36975 LD A,(32986)  ; Pick up the direction byte of the ramp definition for
                     ; the current room from #R32986
 36978 OR A          ; Does the ramp go up to the left?
 36979 JR Z,36984    ; Jump if so
@keep
 36981 LD BC,65504   ; #REGbc=-32 (the ramp goes up to the right)
*36984 LD HL,(34259) ; Collect Willy's attribute buffer coordinates from
                     ; #R34259
 36987 ADD HL,BC     ; {Point #REGhl at the cell at (x+2,y), or at the cell at
 36988 INC HL        ; (x+2,y+1) if Willy is walking down a ramp, or at the
 36989 INC HL        ; cell at (x+2,y-1) if Willy is on or about to step onto a
                     ; ramp that goes up to the right}
 36990 LD A,L        ; {Is Willy's screen x-coordinate 30 (on the far right)?
 36991 AND 31        ; }
 36993 JP Z,38046    ; If so, move Willy into the room on the right
 36996 LD DE,32      ; Prepare #REGde for addition
 36999 LD A,(32946)  ; Pick up the attribute byte of the wall tile for the
                     ; current room from #R32946
 37002 ADD HL,DE     ; Point #REGhl at the cell at (x+2,y+1), or at the cell at
                     ; (x+2,y+2) if Willy is walking down a ramp, or at the
                     ; cell at (x+2,y) if Willy is on or about to step onto a
                     ; ramp that goes up to the right
 37003 CP (HL)       ; Is there a wall tile in the cell pointed to by #REGhl?
 37004 RET Z         ; Return if so without moving Willy (his path is blocked)
 37005 LD A,(34255)  ; Pick up Willy's y-coordinate (Y) from #R34255
 37008 SRA C         ; {Now #REGb=Y (if Willy is neither on nor about to step
 37010 ADD A,C       ; onto a ramp), or Y+16 (if Willy is walking down a ramp),
 37011 LD B,A        ; or Y-16 (if Willy is on or about to step onto a ramp
                     ; that goes up to the right); this will be Willy's new
                     ; y-coordinate}
 37012 AND 15        ; Is Willy at a point in a jump (right) where his sprite
                     ; occupies three rows of cells?
 37014 JR Z,37025    ; Jump if not (Willy's sprite is cell-aligned)
 37016 LD A,(32946)  ; Pick up the attribute byte of the wall tile for the
                     ; current room from #R32946
 37019 ADD HL,DE     ; Point #REGhl at the cell at (x+2,y+2)
 37020 CP (HL)       ; Is there a wall tile there?
 37021 RET Z         ; Return if so without moving Willy (his path is blocked)
 37022 OR A          ; {Point #REGhl at the cell at (x+2,y+1)
 37023 SBC HL,DE     ; }
*37025 LD A,(32946)  ; Pick up the attribute byte of the wall tile for the
                     ; current room from #R32946
 37028 OR A          ; {Point #REGhl at the cell at (x+2,y), or at the cell at
 37029 SBC HL,DE     ; (x+2,y+1) if Willy is walking down a ramp, or at the
                     ; cell at (x+2,y-1) if Willy is on or about to step onto a
                     ; ramp that goes up to the right}
 37031 CP (HL)       ; Is there a wall tile in the cell pointed to by #REGhl?
 37032 RET Z         ; Return if so without moving Willy (his path is blocked)
 37033 DEC HL        ; Point #REGhl at the cell at (x+1,y), or at the cell at
                     ; (x+1,y+1) if Willy is walking down a ramp, or at the
                     ; cell at (x+1,y-1) if Willy is on or about to step onto a
                     ; ramp that goes up to the right
 37034 LD (34259),HL ; Save Willy's new attribute buffer coordinates (in
                     ; #REGhl) at #R34259
 37037 XOR A         ; {Change Willy's animation frame at #R34258 from 3 to 0
 37038 LD (34258),A  ; }
 37041 LD A,B        ; {Save Willy's new y-coordinate at #R34255
 37042 LD (34255),A  ; }
 37045 RET           ;

; Kill Willy
;
; Used by the routine at #R38430 when Willy hits a nasty.
@label=KILLWILLY
c37046 POP HL        ; Drop the return address from the stack
; This entry point is used by the routines at #R36564 (when Willy lands after
; falling from too great a height), #R37310 (when an arrow or guardian hits
; Willy) and #R38196 (when Willy gets too close to Maria).
*37047 POP HL        ; Drop the return address from the stack
 37048 LD A,255      ; {Set the airborne status indicator at #R34257 to #b255
 37050 LD (34257),A  ; (meaning Willy has had a fatal accident)}
 37053 JP 35317      ; Jump back into the main loop

; Move the rope and guardians in the current room
;
; Used by the routine at #R35245.
@label=MOVETHINGS
c37056 LD IX,33024   ; Point #REGix at the first byte of the first entity
                     ; buffer at #R33024
; The entity-moving loop begins here.
*37060 LD A,(IX+0)   ; Pick up the first byte of the current entity's buffer
 37063 CP 255        ; Have we already dealt with every entity?
 37065 RET Z         ; Return if so
 37066 AND 3         ; Keep only bits 0 and 1 (which determine the type of
                     ; entity)
 37068 JP Z,37302    ; Jump to consider the next entity buffer if this one
                     ; belongs to an arrow or is unused
 37071 CP 1          ; Is this a horizontal guardian?
 37073 JP Z,37171    ; Jump if so
 37076 CP 2          ; Is this a vertical guardian?
 37078 JP Z,37247    ; Jump if so
; We are dealing with a rope.
 37081 BIT 7,(IX+0)  ; Is the rope currently swinging right to left?
 37085 JR Z,37119    ; Jump if so
; The rope is swinging left to right.
 37087 LD A,(IX+1)   ; Pick up the animation frame index
 37090 BIT 7,A       ; Is the rope currently swinging away from the centre?
 37092 JR Z,37109    ; Jump if so
; The rope is swinging left to right, towards the centre (#b132<=#REGa<=#b182).
 37094 SUB 2         ; Subtract 2 from the animation frame index in #REGa
 37096 CP 148        ; Is it still #b148 or greater?
 37098 JR NC,37149   ; If so, use it as the next animation frame index
 37100 SUB 2         ; Subtract 2 from the animation frame index again
 37102 CP 128        ; Is it #b128 now?
 37104 JR NZ,37149   ; If not, use it as the next animation frame index
 37106 XOR A         ; The rope has reached the centre, so the next animation
                     ; frame index is 0
 37107 JR 37149      ; Jump to set it
; The rope is swinging left to right, away from the centre (#b0<=#REGa<=#b52).
*37109 ADD A,2       ; Add 2 to the animation frame index in #REGa
 37111 CP 18         ; Is it now #b18 or greater?
 37113 JR NC,37149   ; If so, use it as the next animation frame index
 37115 ADD A,2       ; Add 2 to the animation frame index again
 37117 JR 37149      ; Use this value as the next animation frame index
; The rope is swinging right to left.
*37119 LD A,(IX+1)   ; Pick up the animation frame index
 37122 BIT 7,A       ; Is the rope currently swinging away from the centre?
 37124 JR NZ,37141   ; Jump if so
; The rope is swinging right to left, towards the centre (#b4<=#REGa<=#b54).
 37126 SUB 2         ; Subtract 2 from the animation frame index in #REGa
 37128 CP 20         ; Is it still #b20 or greater?
 37130 JR NC,37149   ; If so, use it as the next animation frame index
 37132 SUB 2         ; Subtract 2 from the animation frame index again
 37134 OR A          ; Is it 0 now?
 37135 JR NZ,37149   ; If not, use it as the next animation frame index
 37137 LD A,128      ; The rope has reached the centre, so the next animation
                     ; frame index is #b128
 37139 JR 37149      ; Jump to set it
; The rope is swinging right to left, away from the centre
; (#b128<=#REGa<=#b180).
*37141 ADD A,2       ; Add 2 to the animation frame index in #REGa
 37143 CP 146        ; Is it now #b146 or greater?
 37145 JR NC,37149   ; If so, use it as the next animation frame index
 37147 ADD A,2       ; Add 2 to the animation frame index again
; Now #REGa holds the rope's next animation frame index.
*37149 LD (IX+1),A   ; Update the animation frame index
 37152 AND 127       ; Reset bit 7
 37154 CP (IX+7)     ; Does #REGa match the eighth byte of the rope's buffer
                     ; (#b54)?
 37157 JP NZ,37302   ; If not, jump to consider the next entity
 37160 LD A,(IX+0)   ; {Flip bit 7 of the first byte of the rope's buffer: the
 37163 XOR 128       ; rope has just changed direction and will now swing back
 37165 LD (IX+0),A   ; towards the centre}
 37168 JP 37302      ; Jump to consider the next entity
; We are dealing with a horizontal guardian.
*37171 BIT 7,(IX+0)  ; Is the guardian currently moving left to right?
 37175 JR NZ,37212   ; Jump if so
; This guardian is moving right to left.
 37177 LD A,(IX+0)   ; {Update the guardian's animation frame (in bits 5 and 6
 37180 SUB 32        ; of the first byte of its buffer)
 37182 AND 127       ;
 37184 LD (IX+0),A   ; }
 37187 CP 96         ; Is it time to update the x-coordinate of the guardian
                     ; sprite?
 37189 JR C,37302    ; If not, jump to consider the next entity
 37191 LD A,(IX+2)   ; {Pick up the sprite's current screen x-coordinate (0-31)
 37194 AND 31        ; }
 37196 CP (IX+6)     ; Has the guardian reached the leftmost point of its path?
 37199 JR Z,37206    ; Jump if so
 37201 DEC (IX+2)    ; Decrement the sprite's x-coordinate
 37204 JR 37302      ; Jump to consider the next entity
*37206 LD (IX+0),129 ; The guardian will now start moving left to right
 37210 JR 37302      ; Jump to consider the next entity
; This guardian is moving left to right.
*37212 LD A,(IX+0)   ; {Update the guardian's animation frame (in bits 5 and 6
 37215 ADD A,32      ; of the first byte of its buffer)
 37217 OR 128        ;
 37219 LD (IX+0),A   ; }
 37222 CP 160        ; Is it time to update the x-coordinate of the guardian
                     ; sprite?
 37224 JR NC,37302   ; If not, jump to consider the next entity
 37226 LD A,(IX+2)   ; {Pick up the sprite's current screen x-coordinate (0-31)
 37229 AND 31        ; }
 37231 CP (IX+7)     ; Has the guardian reached the rightmost point of its
                     ; path?
 37234 JR Z,37241    ; Jump if so
 37236 INC (IX+2)    ; Increment the sprite's x-coordinate
 37239 JR 37302      ; Jump to consider the next entity
*37241 LD (IX+0),97  ; The guardian will now start moving right to left
 37245 JR 37302      ; Jump to consider the next entity
; We are dealing with a vertical guardian.
*37247 LD A,(IX+0)   ; {Flip bit 3 of the first byte of the guardian's buffer
 37250 XOR 8         ; (if bit 4 is set, the guardian's animation frame is
 37252 LD (IX+0),A   ; updated on every pass through this routine; otherwise,
                     ; it is updated on every second pass when bit 3 is set)}
 37255 AND 24        ; Are bits 3 and 4 both reset now?
 37257 JR Z,37267    ; Jump if so
 37259 LD A,(IX+0)   ; {Update the guardian's animation frame (in bits 5-7 of
 37262 ADD A,32      ; the first byte of its buffer)
 37264 LD (IX+0),A   ; }
*37267 LD A,(IX+3)   ; {Update the guardian's y-coordinate
 37270 ADD A,(IX+4)  ;
 37273 LD (IX+3),A   ; }
 37276 CP (IX+7)     ; Has the guardian reached the lowest point of its path
                     ; (maximum y-coordinate)?
 37279 JR NC,37294   ; If so, jump to change its direction of movement
 37281 CP (IX+6)     ; Compare the new y-coordinate with the minimum value (the
                     ; highest point of its path)
 37284 JR Z,37288    ; If they match, jump to change the guardian's direction
                     ; of movement
 37286 JR NC,37302   ; If the new y-coordinate is above the minimum value, jump
                     ; to consider the next entity
*37288 LD A,(IX+6)   ; {Make sure that the guardian's y-coordinate is set to
 37291 LD (IX+3),A   ; its minimum value}
*37294 LD A,(IX+4)   ; {Negate the y-coordinate increment; this changes the
 37297 NEG           ; guardian's direction of movement
 37299 LD (IX+4),A   ; }
; The current entity has been dealt with. Time for the next one.
*37302 LD DE,8       ; {Point #REGix at the first byte of the next entity's
 37305 ADD IX,DE     ; buffer}
 37307 JP 37060      ; Jump back to deal with it

; Draw the rope, arrows and guardians in the current room
;
; Used by the routine at #R35245. Draws the rope, arrows and guardians in the
; current room to the screen buffer at #R24576.
@label=DRAWTHINGS
c37310 LD IX,33024   ; Point #REGix at the first byte of the first entity
                     ; buffer at #R33024
; The drawing loop begins here.
*37314 LD A,(IX+0)   ; Pick up the first byte of the current entity's buffer
 37317 CP 255        ; Have we already dealt with every entity?
 37319 RET Z         ; Return if so
 37320 AND 7         ; Keep only bits 0-2 (which determine the type of entity)
 37322 JP Z,37811    ; Jump to consider the next entity buffer if this one is
                     ; not being used
 37325 CP 3          ; Is this a rope?
 37327 JP Z,37540    ; Jump if so
 37330 CP 4          ; Is this an arrow?
 37332 JR Z,37431    ; Jump if so
; We are dealing with a horizontal or vertical guardian.
 37334 LD E,(IX+3)   ; {Point #REGde at the entry in the screen buffer address
@ssub=LD D,33280/256
 37337 LD D,130      ; lookup table at #R33280 that corresponds to the
                     ; guardian's y-coordinate}
 37339 LD A,(DE)     ; {Copy the LSB of the screen buffer address to #REGl
 37340 LD L,A        ; }
 37341 LD A,(IX+2)   ; {Pick up the guardian's x-coordinate from bits 0-4 of
 37344 AND 31        ; the third byte of its buffer}
 37346 ADD A,L       ; {Adjust the LSB of the screen buffer address in #REGl
 37347 LD L,A        ; for the guardian's x-coordinate}
 37348 LD A,E        ; Copy the fourth byte of the guardian's buffer to #REGa
 37349 RLCA          ; {#REGh=#b92 or #b93; now #REGhl holds the address of the
 37350 AND 1         ; guardian's current location in the attribute buffer at
 37352 OR 92         ; #R23552
 37354 LD H,A        ; }
 37355 LD DE,31      ; Prepare #REGde for later addition
 37358 LD A,(IX+1)   ; Pick up the second byte of the guardian's buffer
 37361 AND 15        ; Keep only bits 0-2 (INK colour) and 3 (BRIGHT value)
 37363 ADD A,56      ; Push bit 3 up to bit 6
 37365 AND 71        ; Keep only bits 0-2 (INK colour) and 6 (BRIGHT value)
 37367 LD C,A        ; Save this value in #REGc temporarily
 37368 LD A,(HL)     ; Pick up the room attribute byte at the guardian's
                     ; location from the buffer at #R23552
 37369 AND 56        ; Keep only bits 3-5 (PAPER colour)
@bfix=|JR Z,37375    ; Jump if the room background is black
 37371 XOR C         ; Merge the INK colour and BRIGHT value from #REGc
 37372 LD C,A        ; Copy this attribute value to #REGc
@bfix=|RES 6,C       ; Reset the BRIGHT bit of the guardian's colour
 37373 LD (HL),C     ; {Set the attribute bytes in the buffer at #R23552 for
 37374 INC HL        ; the top two rows of cells occupied by the guardian's
@bfix=BLACKBG: OR C  ; Merge the INK colour and BRIGHT value from #REGc
 37375 LD (HL),C     ; sprite
@bfix=|CALL 37833    ; Set the attribute bytes in the buffer at #R23552 for the
@bfix=               ; top two rows of cells occupied by the guardian's sprite
 37376 ADD HL,DE     ;
 37377 LD (HL),C     ;
 37378 INC HL        ;
@bfix=LD C,A         ; Copy the guardian's attribute byte to #REGc
 37379 LD (HL),C     ; }
 37380 LD A,(IX+3)   ; Pick up the fourth byte of the guardian's buffer
 37383 AND 14        ; Does the guardian's sprite occupy only two rows of cells
                     ; at the moment?
 37385 JR Z,37391    ; Jump if so
 37387 ADD HL,DE     ; {Set the attribute bytes in the buffer at #R23552 for
 37388 LD (HL),C     ; the third row of cells occupied by the guardian's sprite
 37389 INC HL        ;
 37390 LD (HL),C     ; }
*37391 LD C,1        ; Prepare #REGc for the call to #R37974 later on
 37393 LD A,(IX+1)   ; Now bits 5-7 of #REGa hold the animation frame mask
 37396 AND (IX+0)    ; '#S/AND/' on the current animation frame (bits 5-7)
 37399 OR (IX+2)     ; '#S/OR/' on the base sprite index (bits 5-7)
 37402 AND 224       ; Keep only bits 5-7
 37404 LD E,A        ; {Point #REGde at the graphic data for the guardian's
 37405 LD D,(IX+5)   ; current animation frame (see #R43776)}
@ssub=LD H,33280/256
 37408 LD H,130      ; {Point #REGhl at the guardian's current location in the
 37410 LD L,(IX+3)   ; screen buffer at #R24576
 37413 LD A,(IX+2)   ;
 37416 AND 31        ;
 37418 OR (HL)       ;
 37419 INC HL        ;
 37420 LD H,(HL)     ;
 37421 LD L,A        ; }
 37422 CALL 37974    ; Draw the guardian
 37425 JP NZ,37047   ; Kill Willy if the guardian collided with him
 37428 JP 37811      ; Jump to consider the next entity
; We are dealing with an arrow.
; .
; #AUDIO1,37455,37471(arrow.wav)
*37431 BIT 7,(IX+0)  ; Is the arrow travelling left to right?
 37435 JR NZ,37444   ; Jump if so
 37437 DEC (IX+4)    ; Decrement the arrow's x-coordinate
 37440 LD C,44       ; The sound effect for an arrow travelling right to left
                     ; is made when the x-coordinate is 44
 37442 JR 37449      ;
*37444 INC (IX+4)    ; Increment the arrow's x-coordinate
 37447 LD C,244      ; The sound effect for an arrow travelling left to right
                     ; is made when the x-coordinate is 244
*37449 LD A,(IX+4)   ; Pick up the arrow's x-coordinate (0-255)
 37452 CP C          ; Is it time to make the arrow sound effect?
 37453 JR NZ,37474   ; Jump if not
 37455 LD BC,640     ; Prepare the delay counters (#REGb=#b2, #REGc=#b128) for
                     ; the arrow sound effect
 37458 LD A,(32990)  ; Pick up the border colour for the current room from
                     ; #R32990
*37461 OUT (254),A   ; {Produce the arrow sound effect
 37463 XOR 24        ;
*37465 DJNZ 37465    ;
 37467 LD B,C        ;
 37468 DEC C         ;
 37469 JR NZ,37461   ; }
 37471 JP 37811      ; Jump to consider the next entity
*37474 AND 224       ; Is the arrow's x-coordinate in the range 0-31 (i.e.
                     ; on-screen)?
 37476 JP NZ,37811   ; If not, jump to consider the next entity
 37479 LD E,(IX+2)   ; {Point #REGde at the entry in the screen buffer address
@ssub=LD D,33280/256
 37482 LD D,130      ; lookup table at #R33280 that corresponds to the arrow's
                     ; y-coordinate}
 37484 LD A,(DE)     ; Pick up the LSB of the screen buffer address
 37485 ADD A,(IX+4)  ; Adjust it for the arrow's x-coordinate
 37488 LD L,A        ; {Point #REGhl at the arrow's current location in the
 37489 LD A,E        ; attribute buffer at #R23552
 37490 AND 128       ;
 37492 RLCA          ;
 37493 OR 92         ;
 37495 LD H,A        ; }
 37496 LD (IX+5),0   ; Initialise the collision detection byte (#b0=off,
                     ; #b255=on)
 37500 LD A,(HL)     ; Pick up the room attribute byte at the arrow's location
 37501 AND 7         ; Keep only bits 0-2 (INK colour)
 37503 CP 7          ; Is the INK white?
 37505 JR NZ,37510   ; Jump if not
 37507 DEC (IX+5)    ; Activate collision detection
*37510 LD A,(HL)     ; {Set the INK colour to white at the arrow's location
 37511 OR 7          ;
 37513 LD (HL),A     ; }
 37514 INC DE        ; {Pick up the MSB of the screen buffer address for the
 37515 LD A,(DE)     ; arrow's location}
 37516 LD H,A        ; {Point #REGhl at the top pixel row of the arrow's
 37517 DEC H         ; location in the screen buffer at #R24576}
 37518 LD A,(IX+6)   ; {Draw the top pixel row of the arrow
 37521 LD (HL),A     ; }
 37522 INC H         ; Point #REGhl at the middle pixel row of the arrow's
                     ; location in the screen buffer at #R24576
 37523 LD A,(HL)     ; Pick up the graphic byte that's already here
 37524 AND (IX+5)    ; Has the arrow hit anything that has white INK (e.g.
                     ; Willy)?
 37527 JP NZ,37047   ; If so, kill Willy
 37530 LD (HL),255   ; Draw the shaft of the arrow
 37532 INC H         ; Point #REGhl at the bottom pixel row of the arrow's
                     ; location in the screen buffer at #R24576
 37533 LD A,(IX+6)   ; {Draw the bottom pixel row of the arrow
 37536 LD (HL),A     ; }
 37537 JP 37811      ; Jump to consider the next entity
; We are dealing with a rope.
*37540 LD IY,33280   ; Point #REGiy at the first byte of the screen buffer
                     ; address lookup table at #R33280
 37544 LD (IX+9),0   ; Initialise the second byte in the following entity
                     ; buffer to zero; this will count the segments of rope to
                     ; draw
 37548 LD A,(IX+2)   ; {Initialise the fourth byte of the rope's buffer; this
 37551 LD (IX+3),A   ; holds the x-coordinate of the cell in which the segment
                     ; of rope under consideration will be drawn}
 37554 LD (IX+5),128 ; Initialise the sixth byte of the rope's buffer to #b128
                     ; (bit 7 set); the value held here is used to draw the
                     ; segment of rope under consideration
; The following loop draws each segment of the rope from top to bottom.
*37558 LD A,(IY+0)   ; {Point #REGhl at the location of the segment of rope
 37561 ADD A,(IX+3)  ; under consideration in the screen buffer at #R24576
 37564 LD L,A        ;
 37565 LD H,(IY+1)   ; }
 37568 LD A,(34262)  ; Pick up the rope status indicator at #R34262
 37571 OR A          ; Is Willy on the rope, or has he recently jumped or
                     ; dropped off it?
 37572 JR NZ,37590   ; Jump if so
 37574 LD A,(IX+5)   ; Pick up the drawing byte
 37577 AND (HL)      ; Is this segment of rope touching anything else that's
                     ; been drawn so far (e.g. Willy)?
 37578 JR Z,37646    ; Jump if not
 37580 LD A,(IX+9)   ; {Copy the segment counter into the rope status indicator
 37583 LD (34262),A  ; at #R34262}
 37586 SET 0,(IX+11) ; Signal: Willy is on the rope
*37590 CP (IX+9)     ; Does the rope status indicator at #R34262 match the
                     ; segment counter?
 37593 JR NZ,37646   ; Jump if not
 37595 BIT 0,(IX+11) ; Is Willy on the rope (and clinging to this particular
                     ; segment)?
 37599 JR Z,37646    ; Jump if not
 37601 LD B,(IX+3)   ; Copy the x-coordinate of the cell containing the segment
                     ; of rope under consideration to #REGb
 37604 LD A,(IX+5)   ; Pick up the drawing byte in #REGa
 37607 LD C,1        ; The value in #REGc will specify Willy's next animation
                     ; frame; initialise it to 1
 37609 CP 4          ; Is the set bit of the drawing byte in bit 0 or 1?
 37611 JR C,37628    ; Jump if so
 37613 LD C,0        ; Assume that Willy's next animation frame will be 0
 37615 CP 16         ; Is the set bit of the drawing byte in bit 2 or 3?
 37617 JR C,37628    ; Jump if so
 37619 DEC B         ; Decrement the x-coordinate
 37620 LD C,3        ; Assume that Willy's next animation frame will be 3
 37622 CP 64         ; Is the set bit of the drawing byte in bit 4 or 5?
 37624 JR C,37628    ; Jump if so
 37626 LD C,2        ; Willy's next animation frame will be 2 (the set bit of
                     ; the drawing byte is in bit 6 or 7)
*37628 LD (34258),BC ; Set Willy's animation frame at #R34258, and temporarily
                     ; store his x-coordinate at #R34259
 37632 LD A,IYl      ; {Update Willy's y-coordinate at #R34255 to account for
 37634 SUB 16        ; his change of location as the rope moves
 37636 LD (34255),A  ; }
 37639 PUSH HL       ; Save #REGhl briefly
 37640 CALL 36508    ; Update Willy's attribute buffer address at #R34259 to
                     ; account for his change of location as the rope moves
 37643 POP HL        ; Restore the screen buffer address of the segment of rope
                     ; under consideration to #REGhl
 37644 JR 37646      ; Make a redundant jump to the next instruction
*37646 LD A,(IX+5)   ; {Draw a pixel of the rope to the screen buffer at
 37649 OR (HL)       ; #R24576
 37650 LD (HL),A     ; }
 37651 LD A,(IX+9)   ; {Point #REGhl at the relevant entry in the second half
 37654 ADD A,(IX+1)  ; of the rope animation table at #R33536
 37657 LD L,A        ;
 37658 SET 7,L       ;
@ssub=LD H,33536/256
 37660 LD H,131      ; }
 37662 LD E,(HL)     ; {Add its value to #REGiy; now #REGiy points at the entry
 37663 LD D,0        ; in the screen buffer address lookup table at #R33280
 37665 ADD IY,DE     ; that corresponds to the next segment of rope to consider
                     ; }
 37667 RES 7,L       ; Point #REGhl at the relevant entry in the first half of
                     ; the rope animation table at #R33536
 37669 LD A,(HL)     ; Pick up its value
 37670 OR A          ; Is it zero?
 37671 JR Z,37712    ; Jump if so
 37673 LD B,A        ; Copy the rope animation table entry value to #REGb; this
                     ; will count the rotations of the drawing byte
 37674 BIT 7,(IX+1)  ; Is the rope currently right of centre?
 37678 JR Z,37697    ; Jump if so
*37680 RLC (IX+5)    ; Rotate the drawing byte left once
 37684 BIT 0,(IX+5)  ; Did that push the set bit from bit 7 into bit 0?
 37688 JR Z,37693    ; Jump if not
 37690 DEC (IX+3)    ; Decrement the x-coordinate for the cell containing this
                     ; segment of rope
*37693 DJNZ 37680    ; Jump back until the drawing byte has been rotated as
                     ; required
 37695 JR 37712      ; Jump to consider the next segment of rope
*37697 RRC (IX+5)    ; Rotate the drawing byte right once
 37701 BIT 7,(IX+5)  ; Did that push the set bit from bit 0 into bit 7?
 37705 JR Z,37710    ; Jump if not
 37707 INC (IX+3)    ; Increment the x-coordinate for the cell containing this
                     ; segment of rope
*37710 DJNZ 37697    ; Jump back until the drawing byte has been rotated as
                     ; required
*37712 LD A,(IX+9)   ; Pick up the segment counter
 37715 CP (IX+4)     ; Have we drawn every segment of the rope yet?
 37718 JR Z,37726    ; Jump if so
 37720 INC (IX+9)    ; Increment the segment counter
 37723 JP 37558      ; Jump back to draw the next segment of rope
; Now that the entire rope has been drawn, deal with Willy's movement along it.
*37726 LD A,(34262)  ; Pick up the rope status indicator at #R34262
 37729 BIT 7,A       ; Has Willy recently jumped off the rope or dropped off
                     ; the bottom of it (#REGa>=#b240)?
 37731 JR Z,37743    ; Jump if not
 37733 INC A         ; {Update the rope status indicator at #R34262
 37734 LD (34262),A  ; }
 37737 RES 0,(IX+11) ; Signal: Willy is not on the rope
 37741 JR 37811      ; Jump to consider the next entity
*37743 BIT 0,(IX+11) ; Is Willy on the rope?
 37747 JR Z,37811    ; If not, jump to consider the next entity
 37749 LD A,(34256)  ; Pick up Willy's direction and movement flags from
                     ; #R34256
 37752 BIT 1,A       ; Is Willy moving up or down the rope?
 37754 JR Z,37811    ; If not, jump to consider the next entity
 37756 RRCA          ; {#S/XOR/ Willy's direction bit (0=facing right, 1=facing
 37757 XOR (IX+0)    ; left) with the rope's direction bit (0=swinging right to
 37760 RLCA          ; left, 1=swinging left to right)}
 37761 RLCA          ; {Now #REGa=1 if Willy is facing the same direction as
 37762 AND 2         ; the rope is swinging (he will move down the rope), or -1
 37764 DEC A         ; otherwise (he will move up the rope)}
 37765 LD HL,34262   ; {Increment or decrement the rope status indicator at
 37768 ADD A,(HL)    ; #R34262
 37769 LD (HL),A     ; }
 37770 LD A,(33003)  ; {Pick up the number of the room above from #R33003 and
 37773 LD C,A        ; copy it to #REGc}
 37774 LD A,(33824)  ; Pick up the number of the current room from #R33824
 37777 CP C          ; Is there a room above this one?
 37778 JR NZ,37787   ; Jump if so
 37780 LD A,(HL)     ; Pick up the rope status indicator at #R34262
@bfix=CP 15          ; Is it #b15 or greater?
 37781 CP 12         ; Is it #b12 or greater?
 37783 JR NC,37787   ; Jump if so
@bfix=LD (HL),15     ; Set the rope status indicator at #R34262 to #b15 (there
 37785 LD (HL),12    ; Set the rope status indicator at #R34262 to #b12 (there
                     ; is nowhere to go above this rope)
*37787 LD A,(HL)     ; Pick up the rope status indicator at #R34262
 37788 CP (IX+4)     ; Compare it with the length of the rope
 37791 JR C,37811    ; {If Willy is at or above the bottom of the rope, jump to
 37793 JR Z,37811    ; consider the next entity}
 37795 LD (HL),240   ; Set the rope status indicator at #R34262 to #b240 (Willy
                     ; has just dropped off the bottom of the rope)
 37797 LD A,(34255)  ; {Round down Willy's y-coordinate at #R34255 to the
 37800 AND 248       ; nearest multiple of 8; this might move him upwards a
 37802 LD (34255),A  ; little, but ensures that his actual pixel y-coordinate
                     ; is a multiple of 4 before he starts falling}
 37805 XOR A         ; {Initialise the airborne status indicator at #R34257
 37806 LD (34257),A  ; }
 37809 JR 37811      ; Make a redundant jump to the next instruction
; The current entity has been dealt with. Time for the next one.
*37811 LD DE,8       ; {Point #REGix at the first byte of the next entity's
 37814 ADD IX,DE     ; buffer}
 37816 JP 37314      ; Jump back to deal with it

; Unused routine
;
@ignoreua
; This routine is not used, but if it were, it would set the INK colour for a
; 3x2 block of cells, maintaining the PAPER, BRIGHT and FLASH attributes of the
; current room background. It is identical to the code at #N36447 in Manic
; Miner that is used to set the attributes for a vertical guardian.
;
; A INK colour (0-7)
; HL Attribute buffer address
@label=U_SETATTRS
u37819 LD (HL),A     ; Store the INK colour (bits 0-2)
 37820 LD A,(32928)  ; Collect the current room's background tile attribute
                     ; from #R32928
 37823 AND 248       ; Keep only bits 3-7 (PAPER, BRIGHT, FLASH)
 37825 OR (HL)       ; Merge the INK bits
 37826 LD (HL),A     ; Store the resultant attribute byte
 37827 LD DE,31      ; Prepare #REGde for later addition
 37830 INC HL        ; {Move right one cell and store the attribute byte there
 37831 LD (HL),A     ; }
 37832 ADD HL,DE     ; {Move left one cell and down a row and store the
@if({fix}>1)(label=*)
 37833 LD (HL),A     ; attribute byte there}
 37834 INC HL        ; {Move right one cell and store the attribute byte there
 37835 LD (HL),A     ; }
 37836 ADD HL,DE     ; {Move left one cell and down a row and store the
 37837 LD (HL),A     ; attribute byte there}
 37838 INC HL        ; {Move right one cell and store the attribute byte there
 37839 LD (HL),A     ; }
 37840 RET

; Draw the items in the current room and collect any that Willy is touching
;
; Used by the routine at #R35245.
@label=DRAWITEMS
@ssub=LD H,41984/256
c37841 LD H,164      ; Page #R41984(#b164) holds the first byte of each entry
                     ; in the item table
 37843 LD A,(41983)  ; Pick up the index of the first item from #R41983
 37846 LD L,A        ; Point #REGhl at the first byte of the first entry in the
                     ; item table
; The item-drawing loop begins here.
*37847 LD C,(HL)     ; Pick up the first byte of the current entry in the item
                     ; table
 37848 RES 7,C       ; Reset bit 7; bit 6 holds the collection flag, and bits
                     ; 0-5 hold the room number
 37850 LD A,(33824)  ; Pick up the number of the current room from #R33824
 37853 OR 64         ; Set bit 6 (corresponding to the collection flag)
 37855 CP C          ; Is the item in the current room and still uncollected?
 37856 JR NZ,37970   ; If not, jump to consider the next entry in the item
                     ; table
; This item is in the current room and has not been collected yet.
 37858 LD A,(HL)     ; Pick up the first byte of the current entry in the item
                     ; table
 37859 RLCA          ; {Point #REGde at the location of the item in the
 37860 AND 1         ; attribute buffer at #R23552
 37862 ADD A,92      ;
 37864 LD D,A        ;
 37865 INC H         ;
 37866 LD E,(HL)     ;
 37867 DEC H         ; }
 37868 LD A,(DE)     ; Pick up the current attribute byte at the item's
                     ; location
 37869 AND 7         ; {Is the INK white (which happens if Willy is touching
 37871 CP 7          ; the item, or the room's background tile has white INK,
                     ; as in #R57088(Swimming Pool))?}
 37873 JR NZ,37936   ; Jump if not
; Willy is touching this item (or the room's background tile has white INK), so
; add it to his collection.
; .
; #AUDIO0(item.wav)(#FOR(128,4,-2,1)(c,1928-13*c))
 37875 LD IX,34172   ; Point #REGix at the number of items collected at #R34172
*37879 INC (IX+2)    ; Increment a digit of the number of items collected
 37882 LD A,(IX+2)   ; {Was the digit originally '9'?
 37885 CP 58         ; }
 37887 JR NZ,37897   ; Jump if not
 37889 LD (IX+2),48  ; Set the digit to '0'
 37893 DEC IX        ; Move back to the digit on the left
 37895 JR 37879      ; Jump back to increment this digit
*37897 LD A,(32990)  ; Pick up the border colour for the current room from
                     ; #R32990
 37900 LD C,128      ; {Produce the sound effect for collecting an item
*37902 OUT (254),A   ;
 37904 XOR 24        ;
 37906 LD E,A        ;
 37907 LD A,144      ;
 37909 SUB C         ;
 37910 LD B,A        ;
 37911 LD A,E        ;
*37912 DJNZ 37912    ;
 37914 DEC C         ;
 37915 DEC C         ;
 37916 JR NZ,37902   ; }
 37918 LD A,(34270)  ; {Update the counter of items remaining at #R34270, and
 37921 INC A         ; set the zero flag if there are no more items to collect
 37922 LD (34270),A  ; }
 37925 JR NZ,37932   ; Jump if there are any items still to be collected
 37927 LD A,1        ; {Update the game mode indicator at #R34271 to 1 (all
 37929 LD (34271),A  ; items collected)}
*37932 RES 6,(HL)    ; Reset bit 6 of the first byte of the entry in the item
                     ; table: the item has been collected
 37934 JR 37970      ; Jump to consider the next entry in the item table
; Willy is not touching this item, so draw it and cycle its INK colour.
*37936 LD A,(34251)  ; {Generate the INK colour for the item from the value of
 37939 ADD A,L       ; the minute counter at #R34251 (#b0-#b255) and the index
 37940 AND 3         ; of the item in the item table (#b173-#b255)
 37942 ADD A,3       ;
 37944 LD C,A        ; }
 37945 LD A,(DE)     ; {Change the INK colour of the item in the attribute
 37946 AND 248       ; buffer at #R23552
 37948 OR C          ;
 37949 LD (DE),A     ; }
 37950 LD A,(HL)     ; {Point #REGde at the location of the item in the screen
 37951 RLCA          ; buffer at #R24576
 37952 RLCA          ;
 37953 RLCA          ;
 37954 RLCA          ;
 37955 AND 8         ;
 37957 ADD A,96      ;
 37959 LD D,A        ; }
 37960 PUSH HL       ; Save #REGhl briefly
 37961 LD HL,32993   ; Point #REGhl at the item graphic for the current room
                     ; (at #R32993)
 37964 LD B,8        ; There are eight pixel rows to copy
 37966 CALL 38555    ; Draw the item to the screen buffer at #R24576
 37969 POP HL        ; Restore the item table pointer to #REGhl
; The current item has been dealt with (skipped, collected or drawn) as
; appropriate. Time to consider the next one.
*37970 INC L         ; Point #REGhl at the first byte of the next entry in the
                     ; item table
 37971 JR NZ,37847   ; Jump back unless we've examined every entry
 37973 RET           ;

; Draw a sprite
;
; Used by the routines at #R34499 (to draw the number key graphics on the code
; entry screen), #R35211 (to draw the remaining lives), #R35914 (to draw Willy,
; the foot and the barrel during the game over sequence), #R37310 (to draw
; guardians in the current room) and #R38196 (to draw Maria in #R58112(Master
; Bedroom)). If #REGc=1 on entry, this routine returns with the zero flag reset
; if any of the set bits in the sprite being drawn collides with a set bit in
; the background.
;
; C Drawing mode: 0 (overwrite) or 1 (blend)
; DE Address of sprite graphic data
; HL Address to draw at
@label=DRAWSPRITE
c37974 LD B,16       ; There are 16 rows of pixels to draw
*37976 BIT 0,C       ; Set the zero flag if we're in overwrite mode
 37978 LD A,(DE)     ; Pick up a sprite graphic byte
 37979 JR Z,37985    ; Jump if we're in overwrite mode
 37981 AND (HL)      ; {Return with the zero flag reset if any of the set bits
 37982 RET NZ        ; in the sprite graphic byte collide with a set bit in the
                     ; background (e.g. in Willy's sprite)}
 37983 LD A,(DE)     ; Pick up the sprite graphic byte again
 37984 OR (HL)       ; Blend it with the background byte
*37985 LD (HL),A     ; Copy the graphic byte to its destination cell
 37986 INC L         ; Move #REGhl along to the next cell on the right
 37987 INC DE        ; Point #REGde at the next sprite graphic byte
 37988 BIT 0,C       ; Set the zero flag if we're in overwrite mode
 37990 LD A,(DE)     ; Pick up a sprite graphic byte
 37991 JR Z,37997    ; Jump if we're in overwrite mode
 37993 AND (HL)      ; {Return with the zero flag reset if any of the set bits
 37994 RET NZ        ; in the sprite graphic byte collide with a set bit in the
                     ; background (e.g. in Willy's sprite)}
 37995 LD A,(DE)     ; Pick up the sprite graphic byte again
 37996 OR (HL)       ; Blend it with the background byte
*37997 LD (HL),A     ; Copy the graphic byte to its destination cell
 37998 DEC L         ; {Move #REGhl to the next pixel row down in the cell on
 37999 INC H         ; the left}
 38000 INC DE        ; Point #REGde at the next sprite graphic byte
 38001 LD A,H        ; {Have we drawn the bottom pixel row in this pair of
 38002 AND 7         ; cells yet?}
 38004 JR NZ,38022   ; Jump if not
 38006 LD A,H        ; {Otherwise move #REGhl to the top pixel row in the cell
 38007 SUB 8         ; below
 38009 LD H,A        ;
 38010 LD A,L        ;
 38011 ADD A,32      ;
 38013 LD L,A        ; }
 38014 AND 224       ; Was the last pair of cells at y-coordinate 7 or 15?
 38016 JR NZ,38022   ; Jump if not
 38018 LD A,H        ; {Otherwise adjust #REGhl to account for the movement
 38019 ADD A,8       ; from the top or middle third of the screen to the next
 38021 LD H,A        ; one down}
*38022 DJNZ 37976    ; Jump back until all 16 rows of pixels have been drawn
 38024 XOR A         ; Set the zero flag (to indicate no collision)
 38025 RET           ;

; Move Willy into the room to the left
;
; Used by the routine at #R36796.
@label=ROOMLEFT
c38026 LD A,(33001)  ; Pick up the number of the room to the left from #R33001
 38029 LD (33824),A  ; Make it the current room number by copying it to #R33824
 38032 LD A,(34259)  ; {Adjust Willy's screen x-coordinate (at #R34259) to 30
 38035 OR 31         ; (on the far right)
 38037 AND 254       ;
 38039 LD (34259),A  ; }
 38042 POP HL        ; Drop the return address (#R35281, in the main loop) from
                     ; the stack
 38043 JP 35090      ; Draw the room and re-enter the main loop

; Move Willy into the room to the right
;
; Used by the routine at #R36796.
@label=ROOMRIGHT
c38046 LD A,(33002)  ; Pick up the number of the room to the right from #R33002
 38049 LD (33824),A  ; Make it the current room number by copying it to #R33824
 38052 LD A,(34259)  ; {Adjust Willy's screen x-coordinate (at #R34259) to 0
 38055 AND 224       ; (on the far left)
 38057 LD (34259),A  ; }
 38060 POP HL        ; Drop the return address (#R35281, in the main loop) from
                     ; the stack
 38061 JP 35090      ; Draw the room and re-enter the main loop

; Move Willy into the room above
;
; Used by the routines at #R35245 and #R36307.
@label=ROOMABOVE
c38064 LD A,(33003)  ; Pick up the number of the room above from #R33003
 38067 LD (33824),A  ; Make it the current room number by copying it to #R33824
 38070 LD A,(34259)  ; {Willy should now appear on the bottom floor of the
 38073 AND 31        ; room, so adjust his attribute buffer coordinates (at
 38075 ADD A,160     ; #R34259) accordingly
 38077 LD (34259),A  ;
 38080 LD A,93       ;
@ssub=LD (34259+1),A
 38082 LD (34260),A  ; }
 38085 LD A,208      ; {Adjust Willy's y-coordinate (at #R34255) as well
 38087 LD (34255),A  ; }
 38090 XOR A         ; {Reset the airborne status indicator at #R34257
 38091 LD (34257),A  ; }
 38094 POP HL        ; Drop the return address (either #R35281 or #R35289, in
                     ; the main loop) from the stack
 38095 JP 35090      ; Draw the room and re-enter the main loop

; Move Willy into the room below
;
; Used by the routine at #R36307.
@label=ROOMBELOW
c38098 LD A,(33004)  ; Pick up the number of the room below from #R33004
 38101 LD (33824),A  ; Make it the current room number by copying it to #R33824
 38104 XOR A         ; {Set Willy's y-coordinate (at #R34255) to 0
 38105 LD (34255),A  ; }
 38108 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 38111 CP 11         ; Is it #b11 or greater (meaning Willy has already been
                     ; falling for a while)?
 38113 JR NC,38120   ; Jump if so
 38115 LD A,2        ; {Otherwise set the airborne status indicator to 2 (Willy
 38117 LD (34257),A  ; will start falling here if there's no floor beneath him)
                     ; }
*38120 LD A,(34259)  ; {Willy should now appear at the top of the room, so
 38123 AND 31        ; adjust his attribute buffer coordinates (at #R34259)
 38125 LD (34259),A  ; accordingly
 38128 LD A,92       ;
@ssub=LD (34259+1),A
 38130 LD (34260),A  ; }
 38133 POP HL        ; Drop the return address (#R35281, in the main loop) from
                     ; the stack
 38134 JP 35090      ; Draw the room and re-enter the main loop

; Move the conveyor in the current room
;
; Used by the routine at #R35245.
@label=MVCONVEYOR
c38137 LD HL,(32983) ; Pick up the address of the conveyor's location in the
                     ; attribute buffer at #R24064 from #R32983
 38140 LD A,H        ; {Point #REGde and #REGhl at the location of the left end
 38141 AND 1         ; of the conveyor in the screen buffer at #R28672
 38143 RLCA          ;
 38144 RLCA          ;
 38145 RLCA          ;
 38146 ADD A,112     ;
 38148 LD H,A        ;
 38149 LD E,L        ;
 38150 LD D,H        ; }
 38151 LD A,(32985)  ; Pick up the length of the conveyor from #R32985
 38154 OR A          ; Is there a conveyor in the room?
 38155 RET Z         ; Return if not
 38156 LD B,A        ; #REGb will count the conveyor tiles
 38157 LD A,(32982)  ; Pick up the direction of the conveyor from #R32982
                     ; (0=left, 1=right)
 38160 OR A          ; Is the conveyor moving right?
 38161 JR NZ,38182   ; Jump if so
; The conveyor is moving left.
 38163 LD A,(HL)     ; Copy the first pixel row of the conveyor tile to #REGa
 38164 RLC A         ; {Rotate it left twice
 38166 RLC A         ; }
 38168 INC H         ; {Point #REGhl at the third pixel row of the conveyor
 38169 INC H         ; tile}
 38170 LD C,(HL)     ; Copy this pixel row to #REGc
 38171 RRC C         ; {Rotate it right twice
 38173 RRC C         ; }
*38175 LD (DE),A     ; {Update the first and third pixel rows of every conveyor
 38176 LD (HL),C     ; tile in the screen buffer at #R28672
 38177 INC L         ;
 38178 INC E         ;
 38179 DJNZ 38175    ; }
 38181 RET           ;
; The conveyor is moving right.
*38182 LD A,(HL)     ; Copy the first pixel row of the conveyor tile to #REGa
 38183 RRC A         ; {Rotate it right twice
 38185 RRC A         ; }
 38187 INC H         ; {Point #REGhl at the third pixel row of the conveyor
 38188 INC H         ; tile}
 38189 LD C,(HL)     ; Copy this pixel row to #REGc
 38190 RLC C         ; {Rotate it left twice
 38192 RLC C         ; }
 38194 JR 38175      ; Jump back to update the first and third pixel rows of
                     ; every conveyor tile

; Deal with special rooms (Master Bedroom, The Bathroom)
;
; Used by the routine at #R35245.
@label=BEDANDBATH
c38196 LD A,(33824)  ; Pick up the number of the current room from #R33824
 38199 CP 35         ; Are we in #R58112(Master Bedroom)?
 38201 JR NZ,38298   ; Jump if not
 38203 LD A,(34271)  ; Pick up the game mode indicator from #R34271
 38206 OR A          ; Has Willy collected all the items?
 38207 JR NZ,38262   ; Jump if so
; Willy hasn't collected all the items yet, so Maria is on guard.
 38209 LD A,(34251)  ; Pick up the minute counter from #R34251; this will
                     ; determine Maria's animation frame
 38212 AND 2         ; {Keep only bit 1, move it to bit 5, and set bit 7
 38214 RRCA          ;
 38215 RRCA          ;
 38216 RRCA          ;
 38217 RRCA          ;
 38218 OR 128        ; }
 38220 LD E,A        ; Now #REGe=#b128 (foot down) or #b160 (foot raised)
 38221 LD A,(34255)  ; Pick up Willy's y-coordinate from #R34255
 38224 CP 208        ; Is Willy on the floor below the ramp?
 38226 JR Z,38236    ; Jump if so
 38228 LD E,192      ; #REGe=#b192 (raising arm)
 38230 CP 192        ; Is Willy 8 or fewer pixels above floor level?
 38232 JR NC,38236   ; Jump if so
 38234 LD E,224      ; #REGe=#b224 (arm raised)
@ssub=LD D,40064/256
*38236 LD D,156      ; Point #REGde at the sprite graphic data for Maria
                     ; (#R40064, #R40096, #R40128 or #R40160)
 38238 LD HL,26734   ; {Draw Maria at (11,14) in the screen buffer at #R24576
 38241 LD C,1        ;
 38243 CALL 37974    ; }
 38246 JP NZ,37047   ; Kill Willy if Maria collided with him
 38249 LD HL,17733   ; #REGh=#REGl=#b69 (INK 5: PAPER 0: BRIGHT 1)
 38252 LD (23918),HL ; Set the attribute bytes for the top half of Maria's
                     ; sprite in the buffer at #R23552
 38255 LD HL,1799    ; #REGh=#REGl=#b7 (INK 7: PAPER 0: BRIGHT 0)
 38258 LD (23950),HL ; Set the attribute bytes for the bottom half of Maria's
                     ; sprite in the buffer at #R23552
 38261 RET           ;
; Willy has collected all the items, so Maria is gone.
*38262 LD A,(34259)  ; {Pick up Willy's screen x-coordinate from #R34259
 38265 AND 31        ; }
 38267 CP 6          ; Has Willy reached the bed (at x=5) yet?
 38269 RET NC        ; Return if not
 38270 LD A,2        ; {Update the game mode indicator at #R34271 to 2 (Willy
 38272 LD (34271),A  ; is running to the toilet)}
 38275 RET           ;

; Check whether Willy has reached the toilet
;
; Called by the routine at #R35245 when Willy is on his way to the toilet.
@label=CHKTOILET
c38276 LD A,(33824)  ; Pick up the number of the current room from #R33824
 38279 CP 33         ; Are we in #R57600(The Bathroom)?
 38281 RET NZ        ; Return if not
 38282 LD A,(34259)  ; Pick up the LSB of Willy's attribute buffer location
                     ; from #R34259
 38285 CP 188        ; Is Willy's screen x-coordinate 28 (where the toilet is)?
 38287 RET NZ        ; Return if not
; Willy has reached the toilet.
 38288 XOR A         ; {Reset the minute counter at #R34251 to 0 (so that we
 38289 LD (34251),A  ; get to see Willy's head down the toilet for at least a
                     ; whole game minute)}
 38292 LD A,3        ; {Update the game mode indicator at #R34271 to 3 (Willy's
 38294 LD (34271),A  ; head is down the toilet)}
 38297 RET           ;

; Animate the toilet in The Bathroom
;
; Used by the routine at #R38196.
@label=DRAWTOILET
c38298 LD A,(33824)  ; Pick up the number of the current room from #R33824
 38301 CP 33         ; Are we in #R57600(The Bathroom)?
 38303 RET NZ        ; Return if not
 38304 LD A,(34251)  ; Pick up the minute counter from #R34251; this will
                     ; determine the animation frame to use for the toilet
 38307 AND 1         ; {Keep only bit 0 and move it to bit 5
 38309 RRCA          ;
 38310 RRCA          ;
 38311 RRCA          ; }
 38312 LD E,A        ; Now #REGe=#b0 or #b32
 38313 LD A,(34271)  ; Pick up the game mode indicator from #R34271
 38316 CP 3          ; Is Willy's head down the toilet?
 38318 JR NZ,38322   ; Jump if not
 38320 SET 6,E       ; Now #REGe=#b64 or #b96
@ssub=LD D,42496/256
*38322 LD D,166      ; Point #REGde at the toilet sprite to use (#R42496,
                     ; #R42528, #R42560 or #R42592)
@nowarn
@ssub=LD IX,33280+208
 38324 LD IX,33488   ; {Draw the toilet at (13,28) in the screen buffer at
 38328 LD BC,4124    ; #R24576
 38331 CALL 38504    ; }
 38334 LD HL,1799    ; #REGh=#REGl=#b7 (INK 7: PAPER 0)
 38337 LD (23996),HL ; {Set the attribute bytes for the toilet in the buffer at
 38340 LD (24028),HL ; #R23552}
 38343 RET           ;

; Check and set the attribute bytes for Willy's sprite in the buffer at #N23552
;
; Used by the routine at #R35245. Sets the attribute bytes in the buffer at
; #R23552 for the six cells (in three rows of two) occupied by or under Willy's
; sprite, or kills Willy if any of the cells contains a nasty.
@label=WILLYATTRS
c38344 LD HL,(34259) ; Pick up Willy's attribute buffer coordinates from
                     ; #R34259
 38347 LD B,0        ; Initialise #REGb to 0 (in case Willy is not standing on
                     ; a ramp)
 38349 LD A,(32986)  ; Pick up the direction byte of the ramp definition for
                     ; the current room from #R32986
 38352 AND 1         ; {Point #REGhl at one of the cells under Willy's feet
 38354 ADD A,64      ; (the one on the left if the ramp goes up to the left,
 38356 LD E,A        ; the one on the right if the ramp goes up to the right)
 38357 LD D,0        ;
 38359 ADD HL,DE     ; }
 38360 LD A,(32964)  ; Pick up the ramp's attribute byte from #R32964
 38363 CP (HL)       ; Is Willy on or just above the ramp?
 38364 JR NZ,38392   ; Jump if not
 38366 LD A,(34257)  ; Pick up the airborne status indicator from #R34257
 38369 OR A          ; Is Willy airborne?
 38370 JR NZ,38392   ; Jump if so
; Willy is standing on a ramp. Calculate the offset that needs to be added to
; the y-coordinate stored at #R34255 to obtain Willy's true y-coordinate.
 38372 LD A,(34258)  ; Pick up Willy's current animation frame (0-3) from
                     ; #R34258
 38375 AND 3         ; {#REGb=0, 4, 8 or 12
 38377 RLCA          ;
 38378 RLCA          ;
 38379 LD B,A        ; }
 38380 LD A,(32986)  ; Pick up the direction byte of the ramp definition for
                     ; the current room from #R32986
 38383 AND 1         ; {#REGa=#REGb (if the ramp goes up to the left) or
 38385 DEC A         ; 12-#REGb (if the ramp goes up to the right)
 38386 XOR 12        ;
 38388 XOR B         ;
 38389 AND 12        ; }
 38391 LD B,A        ; Copy this value to #REGb
; Now #REGb holds a y-coordinate offset of 0, 4, 8 or 12 if Willy is standing
; on a ramp, or 0 otherwise.
*38392 LD HL,(34259) ; Pick up Willy's attribute buffer coordinates from
                     ; #R34259
 38395 LD DE,31      ; Prepare #REGde for later addition
 38398 LD C,15       ; Set #REGc=#b15 for the top two rows of cells (to make
                     ; the routine at #R38430 force white INK)
 38400 CALL 38430    ; Check and set the attribute byte for the top-left cell
 38403 INC HL        ; Move #REGhl to the next cell to the right
 38404 CALL 38430    ; Check and set the attribute byte for the top-right cell
 38407 ADD HL,DE     ; Move #REGhl down a row and back one cell to the left
 38408 CALL 38430    ; Check and set the attribute byte for the mid-left cell
 38411 INC HL        ; Move #REGhl to the next cell to the right
 38412 CALL 38430    ; Check and set the attribute byte for the mid-right cell
 38415 LD A,(34255)  ; Pick up Willy's y-coordinate from #R34255
 38418 ADD A,B       ; {Add the y-coordinate offset calculated earlier (to get
 38419 LD C,A        ; Willy's true y-coordinate if he's standing on a ramp)
                     ; and transfer the result to #REGc}
 38420 ADD HL,DE     ; Move #REGhl down a row and back one cell to the left; at
                     ; this point #REGhl may be pointing at one of the cells in
                     ; the top row of the buffer at #R24064, which is a
                     ; #BUG(longDistanceNasties)(bug)
 38421 CALL 38430    ; Check and set the attribute byte for the bottom-left
                     ; cell
 38424 INC HL        ; Move #REGhl to the next cell to the right
 38425 CALL 38430    ; Check and set the attribute byte for the bottom-right
                     ; cell
 38428 JR 38455      ; Draw Willy to the screen buffer at #R24576

; Check and set the attribute byte for a cell occupied by Willy's sprite
;
; Used by the routine at #R38344. Sets the attribute byte in the buffer at
; #R23552 for one of the six cells (in three rows of two) occupied by or under
; Willy's sprite, or kills Willy if the cell contains a nasty. On entry, #REGc
; holds either #b15 if the cell is in the top two rows, or Willy's y-coordinate
; if the cell is in the bottom row.
;
; C #b15 or Willy's y-coordinate
; HL Address of the attribute byte in the buffer at #R23552
@label=WILLYATTR
c38430 LD A,(32928)  ; Pick up the attribute byte of the background tile in the
                     ; current room from #R32928
 38433 CP (HL)       ; Does this cell contain a background tile?
 38434 JR NZ,38447   ; Jump if not
 38436 LD A,C        ; {Set the zero flag if we are going to retain the INK
 38437 AND 15        ; colour in this cell; this happens only if the cell is in
                     ; the bottom row and Willy's sprite is confined to the top
                     ; two rows}
 38439 JR Z,38447    ; Jump if we are going to retain the current INK colour in
                     ; this cell
 38441 LD A,(32928)  ; Pick up the attribute byte of the background tile in the
                     ; current room from #R32928
 38444 OR 7          ; Set bits 0-2, making the INK white
 38446 LD (HL),A     ; Set the attribute byte for this cell in the buffer at
                     ; #R23552
*38447 LD A,(32955)  ; Pick up the attribute byte of the nasty tile in the
                     ; current room from #R32955
@bfix=CP (HL)        ; Is there a nasty here?
 38450 CP (HL)       ; Has Willy hit a nasty?
@bfix=JP Z,64976     ; If so, kill Willy if he's collided with it
 38451 JP Z,37046    ; Kill Willy if so
 38454 RET           ;

; Draw Willy to the screen buffer at #N24576
;
; Used by the routine at #R38344.
;
; B y-coordinate offset (0, 4, 8 or 12)
@label=DRAWWILLY
c38455 LD A,(34255)  ; Pick up Willy's y-coordinate from #R34255
 38458 ADD A,B       ; Add the y-coordinate offset (to get Willy's true
                     ; y-coordinate if he's standing on a ramp)
@ssub=LD IXh,33280/256
 38459 LD IXh,130    ; {Point #REGix at the entry in the screen buffer address
 38462 LD IXl,A      ; lookup table at #R33280 that corresponds to Willy's
                     ; y-coordinate}
 38464 LD A,(34256)  ; Pick up Willy's direction and movement flags from
                     ; #R34256
 38467 AND 1         ; {Now #REGe=#b0 if Willy is facing right, or #b128 if
 38469 RRCA          ; he's facing left
 38470 LD E,A        ; }
 38471 LD A,(34258)  ; Pick up Willy's animation frame (0-3) from #R34258
 38474 AND 3         ; {Point #REGde at the sprite graphic data for Willy's
 38476 RRCA          ; current animation frame (see #R40192)
 38477 RRCA          ;
 38478 RRCA          ;
 38479 OR E          ;
 38480 LD E,A        ;
@ssub=LD D,40192/256
 38481 LD D,157      ; }
 38483 LD A,(33824)  ; Pick up the number of the current room from #R33824
 38486 CP 29         ; Are we in the #R56576(The Nightmare Room)?
 38488 JR NZ,38496   ; Jump if not
@ssub=LD D,46592/256
 38490 LD D,182      ; {Point #REGde at the graphic data for the flying pig
 38492 LD A,E        ; sprite (#R46592+#REGe)
 38493 XOR 128       ;
 38495 LD E,A        ; }
*38496 LD B,16       ; There are 16 rows of pixels to copy
 38498 LD A,(34259)  ; {Pick up Willy's screen x-coordinate (0-31) from #R34259
 38501 AND 31        ; }
 38503 LD C,A        ; Copy it to #REGc
; This entry point is used by the routine at #R38298 to draw the toilet in
; #R57600(The Bathroom).
*38504 LD A,(IX+0)   ; {Set #REGhl to the address in the screen buffer at
 38507 LD H,(IX+1)   ; #R24576 that corresponds to where we are going to draw
 38510 OR C          ; the next pixel row of the sprite graphic
 38511 LD L,A        ; }
 38512 LD A,(DE)     ; Pick up a sprite graphic byte
 38513 OR (HL)       ; Merge it with the background
 38514 LD (HL),A     ; Save the resultant byte to the screen buffer
 38515 INC HL        ; Move #REGhl along to the next cell to the right
 38516 INC DE        ; Point #REGde at the next sprite graphic byte
 38517 LD A,(DE)     ; Pick it up in #REGa
 38518 OR (HL)       ; Merge it with the background
 38519 LD (HL),A     ; Save the resultant byte to the screen buffer
 38520 INC IX        ; {Point #REGix at the next entry in the screen buffer
 38522 INC IX        ; address lookup table at #R33280}
 38524 INC DE        ; Point #REGde at the next sprite graphic byte
 38525 DJNZ 38504    ; Jump back until all 16 rows of pixels have been drawn
 38527 RET           ;

; Print a message
;
; Used by the routines at #R34499, #R34762, #R35090, #R35245 and #R35914.
;
; IX Address of the message
; C Length of the message
; DE Display file address
@label=PRINTMSG
c38528 LD A,(IX+0)   ; Collect a character from the message
 38531 CALL 38545    ; Print it
 38534 INC IX        ; Point #REGix at the next character in the message
 38536 INC E         ; {Point #REGde at the next character cell (subtracting 8
 38537 LD A,D        ; from #REGd compensates for the operations performed by
 38538 SUB 8         ; the routine at #R38545)
 38540 LD D,A        ; }
 38541 DEC C         ; Have we printed the entire message yet?
 38542 JR NZ,38528   ; If not, jump back to print the next character
 38544 RET           ;

; Print a single character
;
; Used by the routines at #R34499 and #R38528.
;
; A ASCII code of the character
; DE Display file address
@label=PRINTCHAR
c38545 LD H,7        ; {Point #REGhl at the bitmap for the character (in the
 38547 LD L,A        ; ROM)
 38548 SET 7,L       ;
 38550 ADD HL,HL     ;
 38551 ADD HL,HL     ;
 38552 ADD HL,HL     ; }
 38553 LD B,8        ; There are eight pixel rows in a character bitmap
; This entry point is used by the routine at #R34762 to draw a triangle UDG on
; the title screen, and by the routine at #R37841 to draw an item in the
; current room.
*38555 LD A,(HL)     ; {Copy the character bitmap (or triangle UDG, or item
 38556 LD (DE),A     ; graphic) to the screen (or screen buffer)
 38557 INC HL        ;
 38558 INC D         ;
 38559 DJNZ 38555    ; }
 38561 RET           ;

; Play the theme tune (Moonlight Sonata)
;
; Used by the routine at #R34762. For each of the 99 bytes in the tune data
; table at #R34299, this routine produces two notes, each lasting approximately
; 0.15s; the second note is played at half the frequency of the first. Returns
; with the zero flag reset if ENTER, 0 or the fire button is pressed while the
; tune is being played.
;
; HL #R34299
@label=PLAYTUNE
c38562 LD A,(HL)     ; Pick up the next byte of tune data from the table at
                     ; #R34299
 38563 CP 255        ; Has the tune finished?
 38565 RET Z         ; Return (with the zero flag set) if so
 38566 LD BC,100     ; #REGb=0 (short note duration counter), #REGc=100 (short
                     ; note counter)
 38569 XOR A         ; #REGa=0 (border colour and speaker state)
 38570 LD E,(HL)     ; Save the byte of tune data in #REGe for retrieval during
                     ; the short note loop
 38571 LD D,E        ; Initialise #REGd (pitch delay counter)
*38572 OUT (254),A   ; {Produce a short note (approximately 0.003s) whose pitch
 38574 DEC D         ; is determined by the value in #REGe
 38575 JR NZ,38580   ;
 38577 LD D,E        ;
 38578 XOR 24        ;
*38580 DJNZ 38572    ; }
 38582 EX AF,AF'     ; Save #REGa briefly
 38583 LD A,C        ; {Is the short note counter in #REGc (which starts off at
 38584 CP 50         ; 100) down to 50 yet?}
 38586 JR NZ,38590   ; Jump if not
 38588 RL E          ; Otherwise double the value in #REGe (which halves the
                     ; note frequency)
*38590 EX AF,AF'     ; Restore the value of #REGa
 38591 DEC C         ; Decrement the short note counter in #REGc
 38592 JR NZ,38572   ; Jump back unless we've finished playing 50 short notes
                     ; at the lower frequency
 38594 CALL 38601    ; Check whether ENTER, 0 or the fire button is being
                     ; pressed
 38597 RET NZ        ; Return (with the zero flag reset) if it is
 38598 INC HL        ; Move #REGhl along to the next byte of tune data
 38599 JR 38562      ; Jump back to play the next batch of 100 short notes

; Check whether ENTER, 0 or the fire button is being pressed
;
; Used by the routine at #R38562. Returns with the zero flag reset if ENTER, 0
; or the fire button on the joystick is being pressed.
@label=CHECKENTER
c38601 LD A,(34254)  ; Collect the Kempston joystick indicator from #R34254
 38604 OR A          ; Is the joystick connected?
 38605 JR Z,38612    ; Jump if not
 38607 IN A,(31)     ; Collect input from the joystick
 38609 BIT 4,A       ; Is the fire button being pressed?
 38611 RET NZ        ; Return (with the zero flag reset) if so
@keep
*38612 LD BC,45054   ; {Read keys H-J-K-L-ENTER and 6-7-8-9-0
 38615 IN A,(C)      ; }
 38617 AND 1         ; Keep only bit 0 of the result (ENTER, 0)
 38619 CP 1          ; Reset the zero flag if ENTER or 0 is being pressed
 38621 RET           ;

; Play an intro message sound effect
;
; Used by the routine at #R34762.
;
; A Value between #b50 and #b81
@label=INTROSOUND
c38622 LD E,A        ; Save the value of #REGa in #REGe for later retrieval
 38623 LD C,254      ; We will output to port #b254
*38625 LD D,A        ; Copy #REGa into #REGd; bits 0-2 of #REGd determine the
                     ; initial border colour
 38626 RES 4,D       ; Reset bit 4 of #REGd (initial speaker state)
 38628 RES 3,D       ; Reset bit 3 of #REGd (initial MIC state)
 38630 LD B,E        ; Initialise #REGb (delay counter for the inner loop)
*38631 CP B          ; Is it time to flip the MIC and speaker and make the
                     ; border black?
 38632 JR NZ,38636   ; Jump if not
 38634 LD D,24       ; Set bits 3 (MIC) and 4 (speaker) of #REGd, and reset
                     ; bits 0-2 (black border)
*38636 OUT (C),D     ; Set the MIC state, speaker state and border colour
 38638 DJNZ 38631    ; Jump back until the inner loop is finished
 38640 DEC A         ; Is the outer loop finished too?
 38641 JR NZ,38625   ; Jump back if not
 38643 RET           ;

; Unused routine
;
; This routine copies the attribute bytes for an empty room to the screen, so
; perhaps it was used during development of the game to check that the layout
; of a room had been defined correctly.
u38644 LD HL,24064   ; {Copy the attribute buffer at #R24064 to the top
 38647 LD DE,22528   ; two-thirds of the screen
 38650 LD BC,512     ;
 38653 LDIR          ; }
 38655 LD HL,16384   ; {Fill the top two-thirds of the display file with the
 38658 LD DE,16385   ; byte value #b24 (00011000)
 38661 LD BC,4095    ;
 38664 LD (HL),24    ;
 38666 LDIR          ; }
@keep
 38668 LD BC,65278   ; Prepare #REGbc for reading keys SHIFT-Z-X-C-V
*38671 IN A,(C)      ; Read these keys
 38673 BIT 2,A       ; Is 'X' being pressed?
 38675 JP Z,0        ; Jump if so to reset the machine
 38678 JR 38671      ; Otherwise jump back to read the keyboard again

; Unused
s38680 DEFS 232

; Attributes for the top two-thirds of the title screen
;
; Used by the routine at #R34762.
@label=ATTRSUPPER
b38912 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 38928 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 38944 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 38960 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 38976 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 38992 DEFB 0,0,40,40,5,5,0,0,0,0,0,0,0,0,0,0
 39008 DEFB 0,0,0,0,211,211,211,0,211,211,211,0,211,211,211,0
 39024 DEFB 40,211,211,211,37,211,211,211,0,211,211,211,0,0,0,0
 39040 DEFB 0,0,0,0,0,211,0,0,211,0,0,0,0,211,40,40
 39056 DEFB 45,211,37,37,36,211,0,0,0,0,211,0,0,0,0,0
 39072 DEFB 0,0,0,0,0,211,0,0,211,211,211,0,40,211,45,45
 39088 DEFB 37,211,211,211,36,211,211,211,0,0,211,0,0,0,0,0
 39104 DEFB 0,0,0,0,0,211,0,0,211,0,40,40,45,211,37,37
 39120 DEFB 36,36,4,211,36,211,0,0,0,0,211,0,0,0,0,0
 39136 DEFB 0,0,0,0,211,211,0,0,211,211,211,45,37,211,36,36
 39152 DEFB 4,211,211,211,36,211,211,211,0,0,211,0,0,0,0,0
 39168 DEFB 0,0,0,0,0,0,0,0,41,41,45,45,44,44,4,4
 39184 DEFB 0,0,9,9,36,36,0,0,0,0,0,0,0,0,0,0
 39200 DEFB 0,0,0,0,0,0,0,0,9,9,41,41,45,45,5,5
 39216 DEFB 0,0,9,9,36,36,0,0,0,0,0,0,0,0,0,0
 39232 DEFB 0,0,0,0,0,0,211,0,8,8,211,9,211,41,211,45
 39248 DEFB 5,5,211,9,36,211,0,0,0,211,0,0,0,0,0,0
 39264 DEFB 0,0,0,0,0,0,211,0,0,0,211,8,211,9,211,41
 39280 DEFB 45,45,211,9,36,211,0,0,0,211,0,0,0,0,0,0
 39296 DEFB 0,0,0,0,0,0,211,0,211,0,211,0,211,8,211,9
 39312 DEFB 41,41,211,9,36,211,211,211,211,211,0,0,0,0,0,0
 39328 DEFB 0,0,0,0,0,0,211,0,211,0,211,0,211,0,211,8
 39344 DEFB 9,9,211,9,36,36,0,211,0,0,0,0,0,0,0,0
 39360 DEFB 0,0,0,0,0,0,211,211,211,211,211,0,211,0,211,211
 39376 DEFB 211,8,211,211,211,36,0,211,0,0,0,0,0,0,0,0
 39392 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39408 DEFB 0,0,8,8,4,4,0,0,0,0,0,0,0,0,0,0

; Attributes for the bottom third of the screen
;
; Used by the routines at #R34762, #R35068 and #R35591.
@label=ATTRSLOWER
b39424 DEFB 70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70
 39440 DEFB 70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70
 39456 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39472 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39488 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39504 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39520 DEFB 1,2,3,4,5,6,7,7,7,7,7,7,7,7,7,7
 39536 DEFB 7,7,7,7,7,7,7,7,7,7,6,5,4,3,2,1
 39552 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39568 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39584 DEFB 69,69,6,6,4,4,65,65,5,5,67,67,68,68,0,0
 39600 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39616 DEFB 69,69,6,6,4,4,65,65,5,5,67,67,68,68,0,0
 39632 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39648 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39664 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

; Number key graphics
;
; Used by the routine at #R34499.
; .
; #UDGTABLE
; { #UDGARRAY2,65,,2(39680;39681,121;39696;39697)(number_key0) |
; #UDGARRAY2,66,,2(39712;39713,122;39728;39729)(number_key1) |
; #UDGARRAY2,3,,2(39744;39745,59;39760;39761)(number_key2) |
; #UDGARRAY2,4,,2(39776;39777,60;39792;39793)(number_key3) }
; TABLE#
@label=NUMBERKEYS
b39680 DEFB 127,254,195,3,191,253,191,253,255,253,255,253,255,253,249,253
 39696 DEFB 241,255,249,255,249,255,249,255,249,253,249,253,255,251,127,254
 39712 DEFB 127,254,199,3,191,253,191,253,255,253,255,253,255,253,241,255
 39728 DEFB 236,255,252,255,249,255,243,255,231,255,224,253,255,243,127,254
 39744 DEFB 127,254,198,3,191,253,191,253,191,253,255,253,255,255,241,255
 39760 DEFB 236,255,252,255,241,255,252,255,236,255,241,253,255,231,127,254
 39776 DEFB 127,254,198,3,191,253,191,253,191,253,191,255,255,255,253,255
 39792 DEFB 249,255,241,255,233,255,224,255,249,255,249,253,255,155,127,254

; Attributes for the code entry screen
;
; Used by the routine at #R34499.
@label=CODEATTRS
b39808 DEFB 69,69,69,69,69,69,69,69,69,69,69,69,69,69,69,69
 39824 DEFB 69,69,69,69,69,69,69,69,69,69,69,69,71,71,71,71
 39840 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39856 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 39872 DEFB 0,0,65,121,0,66,122,0,3,59,0,4,60,0,0,0
 39888 DEFB 7,7,0,7,7,0,7,7,0,7,7,0,0,0,0,0
 39904 DEFB 0,0,65,65,0,66,66,0,3,3,0,4,4,0,0,0
 39920 DEFB 7,7,0,7,7,0,7,7,0,7,7,0,0,0,0,0

; Source code remnants
;
@ignoreua
; The source code here corresponds to the code at #R35545.
u39936 DEFM "NZ,ENDPAUSE"       ; [JR ]NZ,ENDPAUSE
 39947 DEFW 19074               ; {INC E
 39949 DEFB 6                   ;
 39950 DEFM 9,"INC",9,"E"       ; }
 39956 DEFW 19107               ; {JR NZ,PAUSE
 39958 DEFB 12                  ;
 39959 DEFM 9,"JR",9,"NZ,PAUSE" ; }
 39971 DEFW 19140               ; {INC D
 39973 DEFB 6                   ;
 39974 DEFM 9,"INC",9,"D"       ; }
 39980 DEFW 19173               ; {JR NZ,PAUSE
 39982 DEFB 12                  ;
 39983 DEFM 9,"JR",9,"NZ,PAUSE" ; }
 39995 DEFW 19206               ; {C[P 10]
 39997 DEFB 12                  ;
 39998 DEFM 9,"C"               ; }

; Foot/barrel graphic data
;
; Used by the routine at #R35914 to display the game over sequence.
; .
; The foot also appears as a guardian in #R56576(The Nightmare Room).
; .
; #UDGTABLE
; { #SPRITE40000,6(foot) }
; TABLE#
@label=FOOT
b40000 DEFB 16,128,16,128,16,128,16,128,16,128,16,128,16,128,32,128
 40016 DEFB 32,128,72,66,136,53,132,9,128,1,128,2,67,141,60,118
; The barrel also appears as a guardian in #R54272(Ballroom East) and
; #R57856(Top Landing).
; .
; #UDGTABLE
; { #SPRITE40032,66(barrel) }
; TABLE#
@label=BARREL
 40032 DEFB 55,236,119,238,0,0,111,246,239,247,239,247,213,91,219,187
 40048 DEFB 213,91,223,251,237,119,238,247,109,118,0,0,119,238,55,236

; Maria sprite graphic data
;
; Used by the routine at #R38196 to draw Maria in #R58112(Master Bedroom).
; .
; Maria also appears as a guardian in #R56576(The Nightmare Room).
; .
; #UDGTABLE
; { #UDGARRAY2,step=2(40064,69;40065,69;40080,7;40081,7)(maria0) |
; #UDGARRAY2,step=2(40096,69;40097,69;40112,7;40113,7)(maria1) |
; #UDGARRAY2,step=2(40128,69;40129,69;40144,7;40145,7)(maria2) |
; #UDGARRAY2,step=2(40160,69;40161,69;40176,7;40177,7)(maria3) }
; TABLE#
@label=MARIA0
b40064 DEFB 3,0,3,192,1,224,1,64,1,224,7,128,31,248,63,252
 40080 DEFB 55,108,20,152,15,240,15,240,15,240,2,64,2,64,6,96
@label=MARIA1
 40096 DEFB 3,0,3,192,1,224,1,64,1,224,7,128,31,248,63,252
 40112 DEFB 55,108,20,152,15,240,15,240,15,240,2,64,6,64,2,96
@label=MARIA2
 40128 DEFB 3,0,3,192,1,224,1,64,1,224,7,128,31,252,63,254
 40144 DEFB 55,102,20,146,15,240,15,240,15,240,2,64,2,64,6,96
@label=MARIA3
 40160 DEFB 3,0,3,192,1,224,1,64,1,224,7,128,31,255,63,254
 40176 DEFB 55,96,20,144,15,240,15,240,15,240,2,64,2,64,6,96

; Willy sprite graphic data
;
; Used by the routines at #R35211, #R35914 and #R38455.
; .
; #UDGTABLE
; { #SPRITE40192,7(willy0*) | #SPRITE40224,7(willy1*) | #SPRITE40256,7(willy2*)
; | #SPRITE40288,7(willy3*) | #FRAMES(willy0;willy1;willy2;willy3)(willy_r) }
; { #SPRITE40320,7(willy4*) | #SPRITE40352,7(willy5*) | #SPRITE40384,7(willy6*)
; | #SPRITE40416,7(willy7*) | #FRAMES(willy7;willy6;willy5;willy4)(willy_l) }
; TABLE#
@label=MANDAT
b40192 DEFB 60,0,60,0,126,0,52,0,62,0,60,0,24,0,60,0
 40208 DEFB 126,0,126,0,247,0,251,0,60,0,118,0,110,0,119,0
 40224 DEFB 15,0,15,0,31,128,13,0,15,128,15,0,6,0,15,0
 40240 DEFB 27,128,27,128,27,128,29,128,15,0,6,0,6,0,7,0
@label=WILLYR2
 40256 DEFB 3,192,3,192,7,224,3,64,3,224,3,192,1,128,3,192
 40272 DEFB 7,224,7,224,15,112,15,176,3,192,7,96,6,224,7,112
 40288 DEFB 0,240,0,240,1,248,0,208,0,248,0,240,0,96,0,240
 40304 DEFB 1,248,3,252,7,254,6,246,0,248,1,218,3,14,3,140
 40320 DEFB 15,0,15,0,31,128,11,0,31,0,15,0,6,0,15,0
 40336 DEFB 31,128,63,192,127,224,111,96,31,0,91,128,112,192,49,192
 40352 DEFB 3,192,3,192,7,224,2,192,7,192,3,192,1,128,3,192
 40368 DEFB 7,224,7,224,14,240,13,240,3,192,6,224,7,96,14,224
 40384 DEFB 0,240,0,240,1,248,0,176,1,240,0,240,0,96,0,240
 40400 DEFB 1,216,1,216,1,216,1,184,0,240,0,96,0,96,0,224
 40416 DEFB 0,60,0,60,0,126,0,44,0,124,0,60,0,24,0,60
 40432 DEFB 0,126,0,126,0,239,0,223,0,60,0,110,0,118,0,238

; Codes
;
; Used by the routine at #R34499. These code remnants define the
; #LINK(Codes)(codes) for grid locations A0-Q9.
@label=CODES
b40448 DEC HL
 40449 LD C,E
*40450 DEC C
 40451 LD A,B
 40452 JP Z,7520
 40455 CALL 7771
 40458 CP 44
 40460 RET NZ
 40461 JR 40450
 40463 LD DE,16626
 40466 LD A,(DE)
 40467 OR A
 40468 JP Z,6560
 40471 INC A
 40472 LD (16538),A
 40475 LD (DE),A
 40476 LD A,(HL)
 40477 CP 135
 40479 JR Z,40493
 40481 CALL 7770
 40484 RET NZ
 40485 LD A,D
 40486 OR E
 40487 JP NZ,7877
 40490 INC A
 40491 JR 40495
*40493 RST 16
 40494 RET NZ
*40495 LD HL,(16622)
 40498 EX DE,HL
 40499 LD HL,(16618)
 40502 LD (16546),HL
 40505 EX DE,HL
 40506 RET NZ
 40507 LD A,(HL)
 40508 OR A
 40509 JR NZ,40515
 40511 INC HL
 40512 INC HL
 40513 INC HL
 40514 INC HL
*40515 INC HL
 40516 LD A,D
 40517 AND E
 40518 INC A
 40519 JP NZ,7941
 40522 LD A,(16605)
 40525 DEC A
 40526 JP Z,7614
 40529 JP 7941
 40532 CALL 11036
 40535 RET NZ
 40536 OR A
 40537 JP Z,7754
 40540 DEC A
 40541 ADD A,A
 40542 LD E,A
 40543 CP 45
 40545 JR C,40549
 40547 LD E,38
*40549 JP 6562
 40552 LD DE,10
 40555 PUSH DE
 40556 JR Z,40581
 40558 CALL 7759
 40561 EX DE,HL
 40562 EX (SP),HL
 40563 JR Z,40582
 40565 EX DE,HL
 40566 RST 8
 40567 INC L
 40568 EX DE,HL
 40569 LD HL,(16612)
 40572 EX DE,HL
 40573 JR Z,40581
 40575 CALL 7770
 40578 JP NZ,6551
*40581 EX DE,HL
*40582 LD A,H
 40583 OR L
 40584 JP Z,7754
 40587 LD (16612),HL
 40590 LD (16609),A
 40593 POP HL
 40594 LD (16610),HL
 40597 POP BC
 40598 JP 6707
 40601 CALL 9015
 40604 LD A,(HL)
 40605 CP 44
 40607 CALL Z,7544
 40610 CP 202
 40612 CALL Z,7544
 40615 DEC HL
 40616 PUSH HL
 40617 CALL 2452
 40620 POP HL
 40621 JR Z,40630
@if({asm})(label=*)
 40623 RST 16
 40624 JP C,7874

@assemble=1
; Unused
u40627 JP 7519
*40630 LD D,1
*40632 CALL 7941
 40635 OR A
 40636 RET Z
 40637 RST 16
 40638 CP 149
 40640 JR NZ,40632
 40642 DEC D
 40643 JR NZ,40632
 40645 JR 40623
 40647 LD A,1
 40649 LD (16540),A
 40652 JP 8316
 40655 CALL 16842
 40658 CP 35
 40660 JR NZ,40668
 40662 CALL 644
 40665 LD (16540),A
*40668 DEC HL
 40669 RST 16
 40670 CALL Z,8446
 40673 JP Z,8553
 40676 OR 32
 40678 CP 96
@nowarn
 40680 JR NZ,40709
 40682 CALL 11009
 40685 CP 4
 40687 JP NC,7754
 40690 PUSH HL
 40691 LD HL,15360
 40694 ADD HL,DE
 40695 LD (16416),HL
 40698 LD A,E
 40699 AND 63
 40701 LD (16550),A
 40704 DEFS 256

; Entity definitions
;
; Used by the routine at #R35090.
;
; .
;
; The following (empty) entity definition (#b0) is copied into one of the
; entity buffers at #R33024 for any entity specification whose first byte is
; zero.
@label=ENTITYDEFS
b40960 DEFB 0,0,0,0,0,0,0,0
; The following entity definition (#b1) is used in #R53248(We must perform a
; Quirkafleeg), #R53760(On the Roof), #R55552(Cold Store), #R57088(Swimming
; Pool) and #R64000(The Beach).
@label=ENTITY1
 40968 DEFB %00000011         ; Rope (bits 0-2), initially swinging right to
                              ; left (bit 7)
 40969 DEFB 34                ; Initial animation frame index
 40970 DEFB 0                 ; Replaced by the x-coordinate of the top of the
                              ; rope (copied from the second byte of the entity
                              ; specification in the room definition)
 40971 DEFB 0                 ; Unused
 40972 DEFB 32                ; Length
 40973 DEFB 0                 ; Unused
 40974 DEFB 131               ; Unused
 40975 DEFB 54                ; Animation frame at which the rope changes
                              ; direction
; The following entity definition (#b2) is used in #R50432(The Security Guard),
; #R52736(Rescue Esmerelda), #R52992(I'm sure I've seen this before..) and
; #R53504(Up on the Battlements).
; .
; #UDGTABLE
; { #GUARDIAN191,4,4 | #GUARDIAN191,5,4 }
; { #GUARDIAN191,4,12 | #GUARDIAN191,5,12 }
; { #GUARDIAN191,6,20 | #GUARDIAN191,7,20 }
; TABLE#
@label=ENTITY2
 40976 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 40977 DEFB %00100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 40978 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 40979 DEFB 128               ; Initial pixel y-coordinate: 64
 40980 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 40981 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 40982 DEFB 80                ; Minimum pixel y-coordinate: 40
 40983 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b3) is used in #R50432(The Security Guard),
; #R52992(I'm sure I've seen this before..) and #R53504(Up on the Battlements).
; .
; #UDGTABLE
; { #GUARDIAN191,4,66 | #GUARDIAN191,5,66 }
; { #GUARDIAN191,4,74 | #GUARDIAN191,5,74 }
; TABLE#
@label=ENTITY3
 40984 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 40985 DEFB %00101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 40986 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 40987 DEFB 160               ; Initial pixel y-coordinate: 80
 40988 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 40989 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 40990 DEFB 88                ; Minimum pixel y-coordinate: 44
 40991 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b4) is used in #R50432(The Security Guard),
; #R52736(Rescue Esmerelda), #R52992(I'm sure I've seen this before..) and
; #R53504(Up on the Battlements).
; .
; #UDGTABLE
; { #GUARDIAN191,4,6 | #GUARDIAN191,5,6 }
; { #GUARDIAN191,4,14 | #GUARDIAN191,5,14 }
; { #GUARDIAN191,6,22 | #GUARDIAN191,7,22 }
; TABLE#
@label=ENTITY4
 40992 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 40993 DEFB %00100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 40994 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 40995 DEFB 96                ; Initial pixel y-coordinate: 48
 40996 DEFB 8                 ; Initial pixel y-coordinate increment: 4 (moving
                              ; down)
 40997 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 40998 DEFB 96                ; Minimum pixel y-coordinate: 48
 40999 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b5) is used in #R52992(I'm sure I've seen
; this before..) and #R53504(Up on the Battlements).
; .
; #UDGTABLE
; { #GUARDIAN191,4,5 | #GUARDIAN191,5,5 }
; { #GUARDIAN191,4,13 | #GUARDIAN191,5,13 }
; TABLE#
@label=ENTITY5
 41000 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41001 DEFB %00100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41002 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41003 DEFB 64                ; Initial pixel y-coordinate: 32
 41004 DEFB 12                ; Initial pixel y-coordinate increment: 6 (moving
                              ; down)
 41005 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 41006 DEFB 64                ; Minimum pixel y-coordinate: 32
 41007 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b6) is used in #R49920(At the Foot of the
; MegaTree).
; .
; #UDGTABLE
; { #GUARDIAN191,0,5 | #GUARDIAN191,1,5 }
; TABLE#
@label=ENTITY6
 41008 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41009 DEFB %00100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41010 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41011 DEFB 64                ; Initial pixel y-coordinate: 32
 41012 DEFB 10                ; Initial pixel y-coordinate increment: 5 (moving
                              ; down)
 41013 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 41014 DEFB 64                ; Minimum pixel y-coordinate: 32
 41015 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b7) is used in #R49920(At the Foot of the
; MegaTree) and #R63744(Above the West Bedroom).
; .
; #UDGTABLE
; { #GUARDIAN191,0,5 | #GUARDIAN191,1,5 | #GUARDIAN191,2,5 | #GUARDIAN191,3,5 }
; { #GUARDIAN191,6,5 | #GUARDIAN191,7,5 }
; TABLE#
@label=ENTITY7
 41016 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41017 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41018 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41019 DEFB 100               ; Initial pixel y-coordinate: 50
 41020 DEFB 244               ; Initial pixel y-coordinate increment: -6
                              ; (moving up)
 41021 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 41022 DEFB 32                ; Minimum pixel y-coordinate: 16
 41023 DEFB 160               ; Maximum pixel y-coordinate: 80
; The following entity definition (#b8) is used in #R49920(At the Foot of the
; MegaTree).
; .
; #UDGTABLE
; { #GUARDIAN191,0,66 | #GUARDIAN191,1,66 | #GUARDIAN191,2,66 |
; #GUARDIAN191,3,66 }
; TABLE#
@label=ENTITY8
 41024 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41025 DEFB %01101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41026 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41027 DEFB 128               ; Initial pixel y-coordinate: 64
 41028 DEFB 6                 ; Initial pixel y-coordinate increment: 3 (moving
                              ; down)
 41029 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 41030 DEFB 38                ; Minimum pixel y-coordinate: 19
 41031 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b9) is used in #R51200(Inside the
; MegaTrunk) and #R51456(On a Branch Over the Drive).
; .
; #UDGTABLE
; { #GUARDIAN191,0,67 | #GUARDIAN191,1,67 }
; { #GUARDIAN191,0,75 | #GUARDIAN191,1,75 }
; TABLE#
@label=ENTITY9
 41032 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41033 DEFB %00101011         ; INK 3 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41034 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41035 DEFB 160               ; Initial pixel y-coordinate: 80
 41036 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41037 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 41038 DEFB 128               ; Minimum pixel y-coordinate: 64
 41039 DEFB 224               ; Maximum pixel y-coordinate: 112
; The following entity definition (#b10) is used in #R49152(The Off Licence).
; .
; #UDGTABLE
; { #GUARDIAN190,4,69 | #GUARDIAN190,5,69 | #GUARDIAN190,6,69 |
; #GUARDIAN190,7,69 }
; TABLE#
@label=ENTITY10
 41040 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41041 DEFB %01101101         ; INK 5 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41042 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41043 DEFB 96                ; Initial pixel y-coordinate: 48
 41044 DEFB 8                 ; Initial pixel y-coordinate increment: 4 (moving
                              ; down)
 41045 DEFB 190               ; Page containing the sprite graphic data:
                              ; #R48640(#b190)
 41046 DEFB 16                ; Minimum pixel y-coordinate: 8
 41047 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b11) is used in #R59392(Dr Jones will never
; believe this) and #R61440(Nomen Luni).
; .
; #UDGTABLE
; { #GUARDIAN191,0,6 | #GUARDIAN191,1,6 | #GUARDIAN191,2,6 | #GUARDIAN191,3,6 }
; TABLE#
@label=ENTITY11
 41048 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41049 DEFB %01100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41050 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41051 DEFB 192               ; Initial pixel y-coordinate: 96
 41052 DEFB 246               ; Initial pixel y-coordinate increment: -5
                              ; (moving up)
 41053 DEFB 191               ; Page containing the sprite graphic data:
                              ; #R48896(#b191)
 41054 DEFB 112               ; Minimum pixel y-coordinate: 56
 41055 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b12) is used in #R49152(The Off Licence).
; .
; #UDGTABLE
; { #GUARDIAN190,0,4 | #GUARDIAN190,1,4 | #GUARDIAN190,2,4 | #GUARDIAN190,3,4 }
; TABLE#
@label=ENTITY12
 41056 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41057 DEFB %01100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41058 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41059 DEFB 112               ; Pixel y-coordinate: 56
 41060 DEFB 1                 ; Unused
 41061 DEFB 190               ; Page containing the sprite graphic data:
                              ; #R48640(#b190)
 41062 DEFB 19                ; Minimum x-coordinate: 19
 41063 DEFB 29                ; Maximum x-coordinate: 29
; The following entity definition (#b13) is used in #R52736(Rescue Esmerelda),
; #R52992(I'm sure I've seen this before..) and #R53248(We must perform a
; Quirkafleeg).
; .
; #UDGTABLE
; { #GUARDIAN188,0,4 | #GUARDIAN188,1,4 | #GUARDIAN188,2,4 | #GUARDIAN188,3,4 |
; #GUARDIAN188,4,4 | #GUARDIAN188,5,4 | #GUARDIAN188,6,4 | #GUARDIAN188,7,4 }
; { #GUARDIAN188,0,12 | #GUARDIAN188,1,12 | #GUARDIAN188,2,12 |
; #GUARDIAN188,3,12 | #GUARDIAN188,4,12 | #GUARDIAN188,5,12 | #GUARDIAN188,6,12
; | #GUARDIAN188,7,12 }
; { #GUARDIAN188,0,20 | #GUARDIAN188,1,20 | #GUARDIAN188,2,20 |
; #GUARDIAN188,3,20 | #GUARDIAN188,4,20 | #GUARDIAN188,5,20 | #GUARDIAN188,6,20
; | #GUARDIAN188,7,20 }
; TABLE#
@label=ENTITY13
 41064 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41065 DEFB %11100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41066 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41067 DEFB 64                ; Pixel y-coordinate: 32
 41068 DEFB 0                 ; Unused
 41069 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41070 DEFB 0                 ; Minimum x-coordinate: 0
 41071 DEFB 9                 ; Maximum x-coordinate: 9
; The following entity definition (#b14) is used in #R49408(The Bridge).
; .
; #UDGTABLE
; { #GUARDIAN185,4,68 | #GUARDIAN185,5,68 | #GUARDIAN185,6,68 |
; #GUARDIAN185,7,68 }
; TABLE#
@label=ENTITY14
 41072 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41073 DEFB %01101100         ; INK 4 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41074 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41075 DEFB 48                ; Initial pixel y-coordinate: 24
 41076 DEFB 12                ; Initial pixel y-coordinate increment: 6 (moving
                              ; down)
 41077 DEFB 185               ; Page containing the sprite graphic data:
                              ; #R47360(#b185)
 41078 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41079 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b15) is used in #R52736(Rescue Esmerelda).
; .
; #UDGTABLE
; { #GUARDIAN176,4,23 | #GUARDIAN176,5,23 }
; TABLE#
@label=ENTITY15
 41080 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41081 DEFB %00100111         ; INK 7 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41082 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41083 DEFB 16                ; Initial pixel y-coordinate: 8
 41084 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41085 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41086 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41087 DEFB 32                ; Maximum pixel y-coordinate: 16
; The following entity definition (#b16) is used in #R50688(Entrance to Hades),
; #R56064(The Chapel) and #R58880(Priests' Hole).
; .
; #UDGTABLE
; { #GUARDIAN186,4,4 }
; { #GUARDIAN186,4,52 }
; TABLE#
@label=ENTITY16
 41088 DEFB %00000010         ; Vertical guardian (bits 0-2), initial animation
                              ; frame 0 (bits 5 and 6)
 41089 DEFB %00000100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 000 (bits 5-7)
 41090 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41091 DEFB 96                ; Initial pixel y-coordinate: 48
 41092 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41093 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41094 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41095 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b17) is used in #R50688(Entrance to Hades),
; #R56064(The Chapel) and #R58880(Priests' Hole).
; .
; #UDGTABLE
; { #GUARDIAN186,5,4 }
; { #GUARDIAN186,5,52 }
; TABLE#
@label=ENTITY17
 41096 DEFB %00000010         ; Vertical guardian (bits 0-2), initial animation
                              ; frame 0 (bits 5 and 6)
 41097 DEFB %00000100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 000 (bits 5-7)
 41098 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41099 DEFB 96                ; Initial pixel y-coordinate: 48
 41100 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41101 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41102 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41103 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b18) is used in #R50688(Entrance to Hades),
; #R56064(The Chapel) and #R58880(Priests' Hole).
; .
; #UDGTABLE
; { #GUARDIAN186,6,4 | #GUARDIAN186,7,4 }
; { #GUARDIAN186,6,52 | #GUARDIAN186,7,52 }
; TABLE#
@label=ENTITY18
 41104 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41105 DEFB %00100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41106 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41107 DEFB 128               ; Initial pixel y-coordinate: 64
 41108 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41109 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41110 DEFB 32                ; Minimum pixel y-coordinate: 16
 41111 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b19) is used in #R54272(Ballroom East) and
; #R57856(Top Landing).
; .
; #UDGTABLE
; { #GUARDIAN156,3,66 }
; TABLE#
@label=ENTITY19
 41112 DEFB %00000010         ; Vertical guardian (bits 0-2), initial animation
                              ; frame 0 (bits 5 and 6)
 41113 DEFB %00001010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 000 (bits 5-7)
 41114 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41115 DEFB 32                ; Initial pixel y-coordinate: 16
 41116 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41117 DEFB 156               ; Page containing the sprite graphic data:
                              ; #R40000(#b156)
 41118 DEFB 32                ; Minimum pixel y-coordinate: 16
 41119 DEFB 96                ; Maximum pixel y-coordinate: 48
; The following entity definition (#b20) is used in #R49408(The Bridge) and
; #R62976(West#SPACE(2)Wing).
; .
; #UDGTABLE
; { #GUARDIAN188,0,66 | #GUARDIAN188,1,66 | #GUARDIAN188,2,66 |
; #GUARDIAN188,3,66 | #GUARDIAN188,4,66 | #GUARDIAN188,5,66 | #GUARDIAN188,6,66
; | #GUARDIAN188,7,66 }
; TABLE#
@label=ENTITY20
 41120 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41121 DEFB %11101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41122 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41123 DEFB 160               ; Pixel y-coordinate: 80
 41124 DEFB 0                 ; Unused
 41125 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41126 DEFB 0                 ; Minimum x-coordinate: 0
 41127 DEFB 10                ; Maximum x-coordinate: 10
; The following entity definition (#b21) is used in #R49408(The Bridge),
; #R50176(The Drive) and #R54272(Ballroom East).
; .
; #UDGTABLE
; { #GUARDIAN188,0,3 | #GUARDIAN188,1,3 | #GUARDIAN188,2,3 | #GUARDIAN188,3,3 |
; #GUARDIAN188,4,3 | #GUARDIAN188,5,3 | #GUARDIAN188,6,3 | #GUARDIAN188,7,3 }
; TABLE#
@label=ENTITY21
 41128 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41129 DEFB %11100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41130 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41131 DEFB 160               ; Pixel y-coordinate: 80
 41132 DEFB 0                 ; Unused
 41133 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41134 DEFB 14                ; Minimum x-coordinate: 14
 41135 DEFB 29                ; Maximum x-coordinate: 29
; The following entity definition (#b22) is used in #R50176(The Drive) and
; #R51200(Inside the MegaTrunk).
; .
; #UDGTABLE
; { #GUARDIAN188,0,4 | #GUARDIAN188,1,4 | #GUARDIAN188,2,4 | #GUARDIAN188,3,4 |
; #GUARDIAN188,4,4 | #GUARDIAN188,5,4 | #GUARDIAN188,6,4 | #GUARDIAN188,7,4 }
; TABLE#
@label=ENTITY22
 41136 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41137 DEFB %11100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41138 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41139 DEFB 176               ; Pixel y-coordinate: 88
 41140 DEFB 1                 ; Unused
 41141 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41142 DEFB 16                ; Minimum x-coordinate: 16
 41143 DEFB 29                ; Maximum x-coordinate: 29
; The following entity definition (#b23) is used in #R50176(The Drive).
; .
; #UDGTABLE
; { #GUARDIAN188,0,6 | #GUARDIAN188,1,6 | #GUARDIAN188,2,6 | #GUARDIAN188,3,6 |
; #GUARDIAN188,4,6 | #GUARDIAN188,5,6 | #GUARDIAN188,6,6 | #GUARDIAN188,7,6 }
; TABLE#
@label=ENTITY23
 41144 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41145 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41146 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41147 DEFB 128               ; Pixel y-coordinate: 64
 41148 DEFB 0                 ; Unused
 41149 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41150 DEFB 5                 ; Minimum x-coordinate: 5
 41151 DEFB 29                ; Maximum x-coordinate: 29
; The following entity definition (#b24) is used in #R50176(The Drive),
; #R51200(Inside the MegaTrunk) and #R52224(Tree Top).
; .
; #UDGTABLE
; { #GUARDIAN188,0,69 | #GUARDIAN188,1,69 | #GUARDIAN188,2,69 |
; #GUARDIAN188,3,69 | #GUARDIAN188,4,69 | #GUARDIAN188,5,69 | #GUARDIAN188,6,69
; | #GUARDIAN188,7,69 }
; TABLE#
@label=ENTITY24
 41152 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41153 DEFB %11101101         ; INK 5 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41154 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41155 DEFB 80                ; Pixel y-coordinate: 40
 41156 DEFB 0                 ; Unused
 41157 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41158 DEFB 0                 ; Minimum x-coordinate: 0
 41159 DEFB 10                ; Maximum x-coordinate: 10
; The following entity definition (#b25) is used in #R52480(Out on a limb).
; .
; #UDGTABLE
; { #GUARDIAN188,0,67 | #GUARDIAN188,1,67 | #GUARDIAN188,2,67 |
; #GUARDIAN188,3,67 | #GUARDIAN188,4,67 | #GUARDIAN188,5,67 | #GUARDIAN188,6,67
; | #GUARDIAN188,7,67 }
; TABLE#
@label=ENTITY25
 41160 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41161 DEFB %11101011         ; INK 3 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41162 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41163 DEFB 112               ; Pixel y-coordinate: 56
 41164 DEFB 0                 ; Unused
 41165 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41166 DEFB 14                ; Minimum x-coordinate: 14
 41167 DEFB 23                ; Maximum x-coordinate: 23
; The following entity definition (#b26) is used in #R49664(Under the
; MegaTree), #R51968(The Hall), #R52224(Tree Top) and #R59136(Emergency
; Generator).
; .
; #UDGTABLE
; { #GUARDIAN182,0,66 | #GUARDIAN182,1,66 | #GUARDIAN182,2,66 |
; #GUARDIAN182,3,66 | #GUARDIAN182,4,66 | #GUARDIAN182,5,66 | #GUARDIAN182,6,66
; | #GUARDIAN182,7,66 }
; { #GUARDIAN182,0,74 | #GUARDIAN182,1,74 | #GUARDIAN182,2,74 |
; #GUARDIAN182,3,74 | #GUARDIAN182,4,74 | #GUARDIAN182,5,74 | #GUARDIAN182,6,74
; | #GUARDIAN182,7,74 }
; TABLE#
@label=ENTITY26
 41168 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41169 DEFB %11101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41170 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41171 DEFB 48                ; Pixel y-coordinate: 24
 41172 DEFB 0                 ; Unused
 41173 DEFB 182               ; Page containing the sprite graphic data:
                              ; #R46592(#b182)
 41174 DEFB 5                 ; Minimum x-coordinate: 5
 41175 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b27) is used in #R51456(On a Branch Over
; the Drive), #R58624(Orangery), #R59392(Dr Jones will never believe this) and
; #R64256(The Yacht).
; .
; #UDGTABLE
; { #GUARDIAN178,0,66 | #GUARDIAN178,1,66 | #GUARDIAN178,2,66 |
; #GUARDIAN178,3,66 }
; { #GUARDIAN178,4,66 | #GUARDIAN178,5,66 | #GUARDIAN178,6,66 |
; #GUARDIAN178,7,66 }
; { #GUARDIAN178,4,74 | #GUARDIAN178,5,74 | #GUARDIAN178,6,74 |
; #GUARDIAN178,7,74 }
; TABLE#
@label=ENTITY27
 41176 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41177 DEFB %01101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41178 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41179 DEFB 144               ; Initial pixel y-coordinate: 72
 41180 DEFB 252               ; Initial pixel y-coordinate increment: -2
                              ; (moving up)
 41181 DEFB 178               ; Page containing the sprite graphic data:
                              ; #R45568(#b178)
 41182 DEFB 128               ; Minimum pixel y-coordinate: 64
 41183 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b28) is used in #R60672(Under the Drive)
; and #R63488(West Wing Roof).
; .
; #UDGTABLE
; { #GUARDIAN188,0,6 | #GUARDIAN188,1,6 | #GUARDIAN188,2,6 | #GUARDIAN188,3,6 |
; #GUARDIAN188,4,6 | #GUARDIAN188,5,6 | #GUARDIAN188,6,6 | #GUARDIAN188,7,6 }
; TABLE#
@label=ENTITY28
 41184 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41185 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41186 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41187 DEFB 176               ; Pixel y-coordinate: 88
 41188 DEFB 0                 ; Unused
 41189 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41190 DEFB 12                ; Minimum x-coordinate: 12
 41191 DEFB 29                ; Maximum x-coordinate: 29
; The following entity definition (#b29) is used in #R60416(On top of the
; house), #R60672(Under the Drive), #R61440(Nomen Luni) and #R62464(Back
; Stairway).
; .
; #UDGTABLE
; { #GUARDIAN178,0,13 | #GUARDIAN178,1,13 | #GUARDIAN178,2,13 |
; #GUARDIAN178,3,13 }
; { #GUARDIAN178,4,5 | #GUARDIAN178,5,5 | #GUARDIAN178,6,5 | #GUARDIAN178,7,5 }
; TABLE#
@label=ENTITY29
 41192 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41193 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41194 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41195 DEFB 48                ; Initial pixel y-coordinate: 24
 41196 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41197 DEFB 178               ; Page containing the sprite graphic data:
                              ; #R45568(#b178)
 41198 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41199 DEFB 128               ; Maximum pixel y-coordinate: 64
; The following entity definition (#b30) is used in #R60928(Tree Root) and
; #R63232(West Bedroom).
; .
; #UDGTABLE
; { #GUARDIAN173,4,5 | #GUARDIAN173,5,5 | #GUARDIAN173,6,5 | #GUARDIAN173,7,5 }
; TABLE#
@label=ENTITY30
 41200 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41201 DEFB %11100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41202 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41203 DEFB 64                ; Initial pixel y-coordinate: 32
 41204 DEFB 252               ; Initial pixel y-coordinate increment: -2
                              ; (moving up)
 41205 DEFB 173               ; Page containing the sprite graphic data:
                              ; #R44288(#b173)
 41206 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41207 DEFB 128               ; Maximum pixel y-coordinate: 64
; The following entity definition (#b31) is used in #R60928(Tree Root).
; .
; #UDGTABLE
; { #GUARDIAN183,2,3 | #GUARDIAN183,3,3 }
; TABLE#
@label=ENTITY31
 41208 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41209 DEFB %00100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41210 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41211 DEFB 144               ; Initial pixel y-coordinate: 72
 41212 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41213 DEFB 183               ; Page containing the sprite graphic data:
                              ; #R46848(#b183)
 41214 DEFB 64                ; Minimum pixel y-coordinate: 32
 41215 DEFB 160               ; Maximum pixel y-coordinate: 80
; The following entity definition (#b32) is used in #R49664(Under the
; MegaTree).
; .
; #UDGTABLE
; { #GUARDIAN184,0,5 | #GUARDIAN184,1,5 | #GUARDIAN184,2,5 | #GUARDIAN184,3,5 |
; #GUARDIAN184,4,5 | #GUARDIAN184,5,5 | #GUARDIAN184,6,5 | #GUARDIAN184,7,5 }
; TABLE#
@label=ENTITY32
 41216 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41217 DEFB %11100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41218 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41219 DEFB 208               ; Pixel y-coordinate: 104
 41220 DEFB 1                 ; Unused
 41221 DEFB 184               ; Page containing the sprite graphic data:
                              ; #R47104(#b184)
 41222 DEFB 0                 ; Minimum x-coordinate: 0
 41223 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b33) is used in #R54528(Ballroom West).
; .
; #UDGTABLE
; { #GUARDIAN184,0,3 | #GUARDIAN184,1,3 | #GUARDIAN184,2,3 | #GUARDIAN184,3,3 |
; #GUARDIAN184,4,3 | #GUARDIAN184,5,3 | #GUARDIAN184,6,3 | #GUARDIAN184,7,3 }
; TABLE#
@label=ENTITY33
 41224 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41225 DEFB %11100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41226 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41227 DEFB 176               ; Pixel y-coordinate: 88
 41228 DEFB 0                 ; Unused
 41229 DEFB 184               ; Page containing the sprite graphic data:
                              ; #R47104(#b184)
 41230 DEFB 16                ; Minimum x-coordinate: 16
 41231 DEFB 26                ; Maximum x-coordinate: 26
; The following entity definition (#b34) is used in #R53760(On the Roof).
; .
; #UDGTABLE
; { #GUARDIAN184,0,5 | #GUARDIAN184,1,5 | #GUARDIAN184,2,5 | #GUARDIAN184,3,5 |
; #GUARDIAN184,4,5 | #GUARDIAN184,5,5 | #GUARDIAN184,6,5 | #GUARDIAN184,7,5 }
; TABLE#
@label=ENTITY34
 41232 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41233 DEFB %11100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41234 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41235 DEFB 208               ; Pixel y-coordinate: 104
 41236 DEFB 1                 ; Unused
 41237 DEFB 184               ; Page containing the sprite graphic data:
                              ; #R47104(#b184)
 41238 DEFB 14                ; Minimum x-coordinate: 14
 41239 DEFB 24                ; Maximum x-coordinate: 24
; The following entity definition (#b35) is used in #R60928(Tree Root).
; .
; #UDGTABLE
; { #GUARDIAN184,0,66 | #GUARDIAN184,1,66 | #GUARDIAN184,2,66 |
; #GUARDIAN184,3,66 | #GUARDIAN184,4,66 | #GUARDIAN184,5,66 | #GUARDIAN184,6,66
; | #GUARDIAN184,7,66 }
; TABLE#
@label=ENTITY35
 41240 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41241 DEFB %11101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41242 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41243 DEFB 144               ; Pixel y-coordinate: 72
 41244 DEFB 0                 ; Unused
 41245 DEFB 184               ; Page containing the sprite graphic data:
                              ; #R47104(#b184)
 41246 DEFB 15                ; Minimum x-coordinate: 15
 41247 DEFB 23                ; Maximum x-coordinate: 23
; The following entity definition (#b36) is used in #R50176(The Drive),
; #R57856(Top Landing) and #R62464(Back Stairway).
; .
; #UDGTABLE
; { #GUARDIAN175,0,5 | #GUARDIAN175,1,5 | #GUARDIAN175,2,5 | #GUARDIAN175,3,5 }
; { #GUARDIAN175,4,5 | #GUARDIAN175,5,5 | #GUARDIAN175,6,5 | #GUARDIAN175,7,5 }
; TABLE#
@label=ENTITY36
 41248 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41249 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41250 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41251 DEFB 208               ; Pixel y-coordinate: 104
 41252 DEFB 0                 ; Unused
 41253 DEFB 175               ; Page containing the sprite graphic data:
                              ; #R44800(#b175)
 41254 DEFB 10                ; Minimum x-coordinate: 10
 41255 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b37) is used in #R58880(Priests' Hole).
; .
; #UDGTABLE
; { #GUARDIAN188,0,66 | #GUARDIAN188,1,66 | #GUARDIAN188,2,66 |
; #GUARDIAN188,3,66 | #GUARDIAN188,4,66 | #GUARDIAN188,5,66 | #GUARDIAN188,6,66
; | #GUARDIAN188,7,66 }
; TABLE#
@label=ENTITY37
 41256 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41257 DEFB %11101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41258 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41259 DEFB 160               ; Pixel y-coordinate: 80
 41260 DEFB 0                 ; Unused
 41261 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41262 DEFB 8                 ; Minimum x-coordinate: 8
 41263 DEFB 24                ; Maximum x-coordinate: 24
; The following entity definition (#b38) is used in #R57344(Halfway up the East
; Wall).
; .
; #UDGTABLE
; { #GUARDIAN174,0,70 | #GUARDIAN174,1,70 | #GUARDIAN174,2,70 |
; #GUARDIAN174,3,70 }
; TABLE#
@label=ENTITY38
 41264 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41265 DEFB %01101110         ; INK 6 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41266 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41267 DEFB 96                ; Pixel y-coordinate: 48
 41268 DEFB 0                 ; Unused
 41269 DEFB 174               ; Page containing the sprite graphic data:
                              ; #R44544(#b174)
 41270 DEFB 2                 ; Minimum x-coordinate: 2
 41271 DEFB 7                 ; Maximum x-coordinate: 7
; The following entity definition (#b39) is used in #R50944(Cuckoo's Nest) and
; #R59904(Under the Roof).
; .
; #UDGTABLE
; { #GUARDIAN175,0,13 | #GUARDIAN175,1,13 | #GUARDIAN175,2,13 |
; #GUARDIAN175,3,13 }
; { #GUARDIAN175,4,5 | #GUARDIAN175,5,5 | #GUARDIAN175,6,5 | #GUARDIAN175,7,5 }
; TABLE#
@label=ENTITY39
 41272 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41273 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41274 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41275 DEFB 128               ; Pixel y-coordinate: 64
 41276 DEFB 0                 ; Unused
 41277 DEFB 175               ; Page containing the sprite graphic data:
                              ; #R44800(#b175)
 41278 DEFB 12                ; Minimum x-coordinate: 12
 41279 DEFB 18                ; Maximum x-coordinate: 18
; The following entity definition (#b40) is used in #R54272(Ballroom East),
; #R54528(Ballroom West) and #R60928(Tree Root).
; .
; #UDGTABLE
; { #GUARDIAN186,0,5 | #GUARDIAN186,2,5 }
; TABLE#
@label=ENTITY40
 41280 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41281 DEFB %01000101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 010 (bits 5-7)
 41282 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41283 DEFB 112               ; Initial pixel y-coordinate: 56
 41284 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41285 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41286 DEFB 96                ; Minimum pixel y-coordinate: 48
 41287 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b41) is used in #R54272(Ballroom East).
; .
; #UDGTABLE
; { #GUARDIAN186,1,6 | #GUARDIAN186,3,6 }
; TABLE#
@label=ENTITY41
 41288 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41289 DEFB %01100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41290 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41291 DEFB 150               ; Initial pixel y-coordinate: 75
 41292 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41293 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41294 DEFB 144               ; Minimum pixel y-coordinate: 72
 41295 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b42) is used in #R49664(Under the
; MegaTree), #R54272(Ballroom East) and #R54528(Ballroom West).
; .
; #UDGTABLE
; { #GUARDIAN186,0,67 | #GUARDIAN186,2,67 }
; TABLE#
@label=ENTITY42
 41296 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41297 DEFB %01001011         ; INK 3 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 010 (bits 5-7)
 41298 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41299 DEFB 144               ; Initial pixel y-coordinate: 72
 41300 DEFB 250               ; Initial pixel y-coordinate increment: -3
                              ; (moving up)
 41301 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41302 DEFB 96                ; Minimum pixel y-coordinate: 48
 41303 DEFB 174               ; Maximum pixel y-coordinate: 87
; The following entity definition (#b43) is not used.
@label=ENTITY43
 41304 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41305 DEFB %01001010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 010 (bits 5-7)
 41306 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41307 DEFB 176               ; Initial pixel y-coordinate: 88
 41308 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41309 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41310 DEFB 144               ; Minimum pixel y-coordinate: 72
 41311 DEFB 184               ; Maximum pixel y-coordinate: 92
; The following entity definition (#b44) is used in #R49152(The Off Licence)
; and #R51200(Inside the MegaTrunk).
; .
; #UDGTABLE
; { #GUARDIAN186,1,66 | #GUARDIAN186,3,66 }
; TABLE#
@label=ENTITY44
 41312 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41313 DEFB %01001010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 010 (bits 5-7)
 41314 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41315 DEFB 64                ; Initial pixel y-coordinate: 32
 41316 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41317 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41318 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41319 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b45) is used in #R52480(Out on a limb) and
; #R55808(East Wall Base).
; .
; #UDGTABLE
; { #GUARDIAN186,1,5 | #GUARDIAN186,3,5 }
; { #GUARDIAN186,2,5 }
; TABLE#
@label=ENTITY45
 41320 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41321 DEFB %01000101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 010 (bits 5-7)
 41322 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41323 DEFB 176               ; Initial pixel y-coordinate: 88
 41324 DEFB 8                 ; Initial pixel y-coordinate increment: 4 (moving
                              ; down)
 41325 DEFB 186               ; Page containing the sprite graphic data:
                              ; #R47616(#b186)
 41326 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41327 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b46) is used in #R52224(Tree Top).
; .
; #UDGTABLE
; { #GUARDIAN187,4,6 | #GUARDIAN187,5,6 | #GUARDIAN187,6,6 | #GUARDIAN187,7,6 }
; TABLE#
@label=ENTITY46
 41328 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41329 DEFB %01100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41330 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41331 DEFB 160               ; Pixel y-coordinate: 80
 41332 DEFB 0                 ; Unused
 41333 DEFB 187               ; Page containing the sprite graphic data:
                              ; #R47872(#b187)
 41334 DEFB 0                 ; Minimum x-coordinate: 0
 41335 DEFB 19                ; Maximum x-coordinate: 19
; The following entity definition (#b47) is used in #R51200(Inside the
; MegaTrunk).
; .
; #UDGTABLE
; { #GUARDIAN187,4,70 | #GUARDIAN187,5,70 | #GUARDIAN187,6,70 |
; #GUARDIAN187,7,70 }
; TABLE#
@label=ENTITY47
 41336 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41337 DEFB %01101110         ; INK 6 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41338 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41339 DEFB 48                ; Pixel y-coordinate: 24
 41340 DEFB 0                 ; Unused
 41341 DEFB 187               ; Page containing the sprite graphic data:
                              ; #R47872(#b187)
 41342 DEFB 17                ; Minimum x-coordinate: 17
 41343 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b48) is used in #R55040(The Kitchen) and
; #R55296(West of Kitchen).
; .
; #UDGTABLE
; { #GUARDIAN183,0,67 | #GUARDIAN183,1,67 }
; TABLE#
@label=ENTITY48
 41344 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41345 DEFB %00101011         ; INK 3 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41346 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41347 DEFB 64                ; Initial pixel y-coordinate: 32
 41348 DEFB 6                 ; Initial pixel y-coordinate increment: 3 (moving
                              ; down)
 41349 DEFB 183               ; Page containing the sprite graphic data:
                              ; #R46848(#b183)
 41350 DEFB 16                ; Minimum pixel y-coordinate: 8
 41351 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b49) is used in #R55040(The Kitchen) and
; #R55296(West of Kitchen).
; .
; #UDGTABLE
; { #GUARDIAN183,0,6 | #GUARDIAN183,1,6 }
; TABLE#
@label=ENTITY49
 41352 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41353 DEFB %00100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41354 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41355 DEFB 192               ; Initial pixel y-coordinate: 96
 41356 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41357 DEFB 183               ; Page containing the sprite graphic data:
                              ; #R46848(#b183)
 41358 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41359 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b50) is used in #R55040(The Kitchen) and
; #R55296(West of Kitchen).
; .
; #UDGTABLE
; { #GUARDIAN183,0,4 | #GUARDIAN183,1,4 }
; TABLE#
@label=ENTITY50
 41360 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41361 DEFB %00100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41362 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41363 DEFB 128               ; Initial pixel y-coordinate: 64
 41364 DEFB 248               ; Initial pixel y-coordinate increment: -4
                              ; (moving up)
 41365 DEFB 183               ; Page containing the sprite graphic data:
                              ; #R46848(#b183)
 41366 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41367 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b51) is used in #R63232(West Bedroom) and
; #R63744(Above the West Bedroom).
; .
; #UDGTABLE
; { #GUARDIAN183,2,66 | #GUARDIAN183,3,66 }
; TABLE#
@label=ENTITY51
 41368 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41369 DEFB %00101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41370 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41371 DEFB 48                ; Initial pixel y-coordinate: 24
 41372 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41373 DEFB 183               ; Page containing the sprite graphic data:
                              ; #R46848(#b183)
 41374 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41375 DEFB 160               ; Maximum pixel y-coordinate: 80
; The following entity definition (#b52) is used in #R61696(The Wine Cellar),
; #R62208(Tool#SPACE(2)Shed) and #R63488(West Wing Roof).
; .
; #UDGTABLE
; { #GUARDIAN181,0,3 | #GUARDIAN181,1,3 | #GUARDIAN181,2,3 | #GUARDIAN181,3,3 |
; #GUARDIAN181,4,3 | #GUARDIAN181,5,3 | #GUARDIAN181,6,3 | #GUARDIAN181,7,3 }
; TABLE#
@label=ENTITY52
 41376 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41377 DEFB %11100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41378 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41379 DEFB 208               ; Pixel y-coordinate: 104
 41380 DEFB 0                 ; Unused
 41381 DEFB 181               ; Page containing the sprite graphic data:
                              ; #R46336(#b181)
 41382 DEFB 7                 ; Minimum x-coordinate: 7
 41383 DEFB 22                ; Maximum x-coordinate: 22
; The following entity definition (#b53) is used in #R49920(At the Foot of the
; MegaTree) and #R64256(The Yacht).
; .
; #UDGTABLE
; { #GUARDIAN181,0,67 | #GUARDIAN181,1,67 | #GUARDIAN181,2,67 |
; #GUARDIAN181,3,67 | #GUARDIAN181,4,67 | #GUARDIAN181,5,67 | #GUARDIAN181,6,67
; | #GUARDIAN181,7,67 }
; TABLE#
@label=ENTITY53
 41384 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41385 DEFB %11101011         ; INK 3 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41386 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41387 DEFB 208               ; Pixel y-coordinate: 104
 41388 DEFB 0                 ; Unused
 41389 DEFB 181               ; Page containing the sprite graphic data:
                              ; #R46336(#b181)
 41390 DEFB 4                 ; Minimum x-coordinate: 4
 41391 DEFB 14                ; Maximum x-coordinate: 14
; The following entity definition (#b54) is used in #R55552(Cold Store).
; .
; #UDGTABLE
; { #GUARDIAN189,0,14 | #GUARDIAN189,1,14 | #GUARDIAN189,2,14 |
; #GUARDIAN189,3,14 | #GUARDIAN189,4,14 | #GUARDIAN189,5,14 | #GUARDIAN189,6,14
; | #GUARDIAN189,7,14 }
; TABLE#
@label=ENTITY54
 41392 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41393 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41394 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41395 DEFB 208               ; Pixel y-coordinate: 104
 41396 DEFB 0                 ; Unused
 41397 DEFB 189               ; Page containing the sprite graphic data:
                              ; #R48384(#b189)
 41398 DEFB 0                 ; Minimum x-coordinate: 0
 41399 DEFB 24                ; Maximum x-coordinate: 24
; The following entity definition (#b55) is used in #R55552(Cold Store) and
; #R59904(Under the Roof).
; .
; #UDGTABLE
; { #GUARDIAN187,0,15 | #GUARDIAN187,1,15 | #GUARDIAN187,2,15 |
; #GUARDIAN187,3,15 }
; TABLE#
@label=ENTITY55
 41400 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41401 DEFB %01100111         ; INK 7 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41402 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41403 DEFB 144               ; Pixel y-coordinate: 72
 41404 DEFB 0                 ; Unused
 41405 DEFB 187               ; Page containing the sprite graphic data:
                              ; #R47872(#b187)
 41406 DEFB 0                 ; Minimum x-coordinate: 0
 41407 DEFB 5                 ; Maximum x-coordinate: 5
; The following entity definition (#b56) is used in #R55552(Cold Store).
; .
; #UDGTABLE
; { #GUARDIAN189,0,12 | #GUARDIAN189,1,12 | #GUARDIAN189,2,12 |
; #GUARDIAN189,3,12 | #GUARDIAN189,4,12 | #GUARDIAN189,5,12 | #GUARDIAN189,6,12
; | #GUARDIAN189,7,12 }
; TABLE#
@label=ENTITY56
 41408 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41409 DEFB %11100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41410 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41411 DEFB 96                ; Pixel y-coordinate: 48
 41412 DEFB 0                 ; Unused
 41413 DEFB 189               ; Page containing the sprite graphic data:
                              ; #R48384(#b189)
 41414 DEFB 0                 ; Minimum x-coordinate: 0
 41415 DEFB 6                 ; Maximum x-coordinate: 6
; The following entity definition (#b57) is used in #R55552(Cold Store).
; .
; #UDGTABLE
; { #GUARDIAN187,0,11 | #GUARDIAN187,1,11 | #GUARDIAN187,2,11 |
; #GUARDIAN187,3,11 }
; TABLE#
@label=ENTITY57
 41416 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41417 DEFB %01100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41418 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41419 DEFB 48                ; Pixel y-coordinate: 24
 41420 DEFB 0                 ; Unused
 41421 DEFB 187               ; Page containing the sprite graphic data:
                              ; #R47872(#b187)
 41422 DEFB 0                 ; Minimum x-coordinate: 0
 41423 DEFB 9                 ; Maximum x-coordinate: 9
; The following entity definition (#b58) is used in #R57856(Top Landing).
; .
; #UDGTABLE
; { #GUARDIAN173,4,7 | #GUARDIAN173,5,7 | #GUARDIAN173,6,7 | #GUARDIAN173,7,7 }
; TABLE#
@label=ENTITY58
 41424 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41425 DEFB %01100111         ; INK 7 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41426 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41427 DEFB 64                ; Initial pixel y-coordinate: 32
 41428 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41429 DEFB 173               ; Page containing the sprite graphic data:
                              ; #R44288(#b173)
 41430 DEFB 32                ; Minimum pixel y-coordinate: 16
 41431 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b59) is used in #R57600(The Bathroom).
; .
; #UDGTABLE
; { #GUARDIAN185,0,4 | #GUARDIAN185,1,4 | #GUARDIAN185,2,4 | #GUARDIAN185,3,4 }
; TABLE#
@label=ENTITY59
 41432 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41433 DEFB %01100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41434 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41435 DEFB 48                ; Pixel y-coordinate: 24
 41436 DEFB 0                 ; Unused
 41437 DEFB 185               ; Page containing the sprite graphic data:
                              ; #R47360(#b185)
 41438 DEFB 0                 ; Minimum x-coordinate: 0
 41439 DEFB 27                ; Maximum x-coordinate: 27
; The following entity definition (#b60) is used in #R50944(Cuckoo's Nest),
; #R51456(On a Branch Over the Drive), #R51968(The Hall), #R52992(I'm sure I've
; seen this before..), #R53248(We must perform a Quirkafleeg),
; #R58624(Orangery), #R59648(The Attic), #R59904(Under the Roof), #R63488(West
; Wing Roof) and #R64000(The Beach).
@label=ENTITY60
 41440 DEFB %10000100         ; Arrow (bits 0-2), flying left to right (bit 7)
 41441 DEFB 6                 ; Unused
 41442 DEFB 0                 ; Replaced by the y-coordinate (copied from the
                              ; second byte of the entity specification in the
                              ; room definition)
 41443 DEFB 0                 ; Unused
 41444 DEFB 208               ; Initial x-coordinate: 208
 41445 DEFB 0                 ; Unused
 41446 DEFB %10000010         ; Top/bottom pixel row (drawn either side of the
                              ; shaft)
 41447 DEFB 0                 ; Unused
; The following entity definition (#b61) is used in #R51456(On a Branch Over
; the Drive) and #R60160(Conservatory Roof).
; .
; #UDGTABLE
; { #GUARDIAN173,0,6 | #GUARDIAN173,1,6 | #GUARDIAN173,2,6 | #GUARDIAN173,3,6 }
; { #GUARDIAN173,0,14 | #GUARDIAN173,1,14 | #GUARDIAN173,2,14 |
; #GUARDIAN173,3,14 }
; TABLE#
@label=ENTITY61
 41448 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41449 DEFB %01100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41450 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41451 DEFB 80                ; Pixel y-coordinate: 40
 41452 DEFB 0                 ; Unused
 41453 DEFB 173               ; Page containing the sprite graphic data:
                              ; #R44288(#b173)
 41454 DEFB 16                ; Minimum x-coordinate: 16
 41455 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b62) is used in #R51456(On a Branch Over
; the Drive).
; .
; #UDGTABLE
; { #GUARDIAN185,0,13 | #GUARDIAN185,1,13 | #GUARDIAN185,2,13 |
; #GUARDIAN185,3,13 }
; TABLE#
@label=ENTITY62
 41456 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41457 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41458 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41459 DEFB 96                ; Initial pixel y-coordinate: 48
 41460 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41461 DEFB 185               ; Page containing the sprite graphic data:
                              ; #R47360(#b185)
 41462 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41463 DEFB 112               ; Maximum pixel y-coordinate: 56
; The following entity definition (#b63) is not used.
 41464 DEFB 255,0,0,0,0,0,0,0
; The following entity definition (#b64) is used in #R61696(The Wine Cellar).
; .
; #UDGTABLE
; { #GUARDIAN180,0,3 | #GUARDIAN180,1,3 | #GUARDIAN180,2,3 | #GUARDIAN180,3,3 |
; #GUARDIAN180,4,3 | #GUARDIAN180,5,3 | #GUARDIAN180,6,3 | #GUARDIAN180,7,3 }
; TABLE#
@label=ENTITY64
 41472 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41473 DEFB %11100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41474 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41475 DEFB 48                ; Pixel y-coordinate: 24
 41476 DEFB 0                 ; Unused
 41477 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41478 DEFB 0                 ; Minimum x-coordinate: 0
 41479 DEFB 27                ; Maximum x-coordinate: 27
; The following entity definition (#b65) is used in #R61696(The Wine Cellar).
; .
; #UDGTABLE
; { #GUARDIAN180,0,6 | #GUARDIAN180,1,6 | #GUARDIAN180,2,6 | #GUARDIAN180,3,6 |
; #GUARDIAN180,4,6 | #GUARDIAN180,5,6 | #GUARDIAN180,6,6 | #GUARDIAN180,7,6 }
; TABLE#
@label=ENTITY65
 41480 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41481 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41482 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41483 DEFB 96                ; Pixel y-coordinate: 48
 41484 DEFB 0                 ; Unused
 41485 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41486 DEFB 4                 ; Minimum x-coordinate: 4
 41487 DEFB 27                ; Maximum x-coordinate: 27
; The following entity definition (#b66) is used in #R61696(The Wine Cellar).
; .
; #UDGTABLE
; { #GUARDIAN180,0,4 | #GUARDIAN180,1,4 | #GUARDIAN180,2,4 | #GUARDIAN180,3,4 |
; #GUARDIAN180,4,4 | #GUARDIAN180,5,4 | #GUARDIAN180,6,4 | #GUARDIAN180,7,4 }
; TABLE#
@label=ENTITY66
 41488 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41489 DEFB %11100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41490 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41491 DEFB 144               ; Pixel y-coordinate: 72
 41492 DEFB 0                 ; Unused
 41493 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41494 DEFB 2                 ; Minimum x-coordinate: 2
 41495 DEFB 27                ; Maximum x-coordinate: 27
; The following entity definition (#b67) is used in #R56320(First Landing).
; .
; #UDGTABLE
; { #GUARDIAN180,0,6 | #GUARDIAN180,1,6 | #GUARDIAN180,2,6 | #GUARDIAN180,3,6 |
; #GUARDIAN180,4,6 | #GUARDIAN180,5,6 | #GUARDIAN180,6,6 | #GUARDIAN180,7,6 }
; TABLE#
@label=ENTITY67
 41496 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41497 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41498 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41499 DEFB 192               ; Pixel y-coordinate: 96
 41500 DEFB 0                 ; Unused
 41501 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41502 DEFB 24                ; Minimum x-coordinate: 24
 41503 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b68) is used in #R60672(Under the Drive).
; .
; #UDGTABLE
; { #GUARDIAN174,4,3 | #GUARDIAN174,5,3 | #GUARDIAN174,6,3 | #GUARDIAN174,7,3 }
; TABLE#
@label=ENTITY68
 41504 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41505 DEFB %11100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41506 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41507 DEFB 128               ; Pixel y-coordinate: 64
 41508 DEFB 0                 ; Unused
 41509 DEFB 174               ; Page containing the sprite graphic data:
                              ; #R44544(#b174)
 41510 DEFB 21                ; Minimum x-coordinate: 21
 41511 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b69) is used in #R51968(The Hall),
; #R52224(Tree Top), #R52992(I'm sure I've seen this before..), #R53504(Up on
; the Battlements), #R58368(A bit of tree) and #R59648(The Attic).
@label=ENTITY69
 41512 DEFB %00000100         ; Arrow (bits 0-2), flying right to left (bit 7)
 41513 DEFB 6                 ; Unused
 41514 DEFB 0                 ; Replaced by the y-coordinate (copied from the
                              ; second byte of the entity specification in the
                              ; room definition)
 41515 DEFB 0                 ; Unused
 41516 DEFB 28                ; Initial x-coordinate: 28
 41517 DEFB 0                 ; Unused
 41518 DEFB %01000001         ; Top/bottom pixel row (drawn either side of the
                              ; shaft)
 41519 DEFB 0                 ; Unused
; The following entity definition (#b70) is used in #R56576(The Nightmare
; Room).
; .
; #UDGTABLE
; { #GUARDIAN156,4,5 | #GUARDIAN156,5,5 | #GUARDIAN156,6,5 | #GUARDIAN156,7,5 }
; TABLE#
@label=ENTITY70
 41520 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41521 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41522 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41523 DEFB 64                ; Initial pixel y-coordinate: 32
 41524 DEFB 252               ; Initial pixel y-coordinate increment: -2
                              ; (moving up)
 41525 DEFB 156               ; Page containing the sprite graphic data:
                              ; #R40064(#b156)
 41526 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41527 DEFB 160               ; Maximum pixel y-coordinate: 80
; The following entity definition (#b71) is used in #R56576(The Nightmare
; Room).
; .
; #UDGTABLE
; { #GUARDIAN156,4,3 | #GUARDIAN156,5,3 }
; { #GUARDIAN156,6,3 | #GUARDIAN156,7,3 }
; TABLE#
@label=ENTITY71
 41528 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41529 DEFB %00100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41530 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41531 DEFB 32                ; Initial pixel y-coordinate: 16
 41532 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41533 DEFB 156               ; Page containing the sprite graphic data:
                              ; #R40064(#b156)
 41534 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41535 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b72) is used in #R56576(The Nightmare
; Room).
; .
; #UDGTABLE
; { #GUARDIAN156,2,6 }
; { #GUARDIAN156,4,6 }
; TABLE#
@label=ENTITY72
 41536 DEFB %00010010         ; Vertical guardian (bits 0-2), initial animation
                              ; frame 0 (bits 5 and 6)
 41537 DEFB %00000110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 000 (bits 5-7)
 41538 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41539 DEFB 144               ; Initial pixel y-coordinate: 72
 41540 DEFB 6                 ; Initial pixel y-coordinate increment: 3 (moving
                              ; down)
 41541 DEFB 156               ; Page containing the sprite graphic data:
                              ; #b156#HTML[ (#R40000(foot), #R40064(Maria))]
 41542 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41543 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b73) is used in #R56576(The Nightmare
; Room).
; .
; #UDGTABLE
; { #GUARDIAN156,6,66 | #GUARDIAN156,7,66 }
; TABLE#
@label=ENTITY73
 41544 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41545 DEFB %01101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41546 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41547 DEFB 128               ; Initial pixel y-coordinate: 64
 41548 DEFB 248               ; Initial pixel y-coordinate increment: -4
                              ; (moving up)
 41549 DEFB 156               ; Page containing the sprite graphic data:
                              ; #R40064(#b156)
 41550 DEFB 16                ; Minimum pixel y-coordinate: 8
 41551 DEFB 208               ; Maximum pixel y-coordinate: 104
; The following entity definition (#b74) is used in #R54016(The Forgotten
; Abbey).
; .
; #UDGTABLE
; { #GUARDIAN180,0,4 | #GUARDIAN180,1,4 | #GUARDIAN180,2,4 | #GUARDIAN180,3,4 |
; #GUARDIAN180,4,4 | #GUARDIAN180,5,4 | #GUARDIAN180,6,4 | #GUARDIAN180,7,4 }
; TABLE#
@label=ENTITY74
 41552 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41553 DEFB %11100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41554 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41555 DEFB 80                ; Pixel y-coordinate: 40
 41556 DEFB 0                 ; Unused
 41557 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41558 DEFB 4                 ; Minimum x-coordinate: 4
 41559 DEFB 20                ; Maximum x-coordinate: 20
; The following entity definition (#b75) is used in #R54016(The Forgotten
; Abbey).
; .
; #UDGTABLE
; { #GUARDIAN180,0,6 | #GUARDIAN180,1,6 | #GUARDIAN180,2,6 | #GUARDIAN180,3,6 |
; #GUARDIAN180,4,6 | #GUARDIAN180,5,6 | #GUARDIAN180,6,6 | #GUARDIAN180,7,6 }
; TABLE#
@label=ENTITY75
 41560 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41561 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41562 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41563 DEFB 80                ; Pixel y-coordinate: 40
 41564 DEFB 0                 ; Unused
 41565 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41566 DEFB 12                ; Minimum x-coordinate: 12
 41567 DEFB 28                ; Maximum x-coordinate: 28
; The following entity definition (#b76) is used in #R54016(The Forgotten
; Abbey).
; .
; #UDGTABLE
; { #GUARDIAN180,0,66 | #GUARDIAN180,1,66 | #GUARDIAN180,2,66 |
; #GUARDIAN180,3,66 | #GUARDIAN180,4,66 | #GUARDIAN180,5,66 | #GUARDIAN180,6,66
; | #GUARDIAN180,7,66 }
; TABLE#
@label=ENTITY76
 41568 DEFB %00100001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 1 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41569 DEFB %11101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41570 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41571 DEFB 144               ; Pixel y-coordinate: 72
 41572 DEFB 0                 ; Unused
 41573 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41574 DEFB 9                 ; Minimum x-coordinate: 9
 41575 DEFB 20                ; Maximum x-coordinate: 20
; The following entity definition (#b77) is used in #R54016(The Forgotten
; Abbey).
; .
; #UDGTABLE
; { #GUARDIAN180,0,7 | #GUARDIAN180,1,7 | #GUARDIAN180,2,7 | #GUARDIAN180,3,7 |
; #GUARDIAN180,4,7 | #GUARDIAN180,5,7 | #GUARDIAN180,6,7 | #GUARDIAN180,7,7 }
; TABLE#
@label=ENTITY77
 41576 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41577 DEFB %11100111         ; INK 7 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41578 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41579 DEFB 144               ; Pixel y-coordinate: 72
 41580 DEFB 0                 ; Unused
 41581 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41582 DEFB 22                ; Minimum x-coordinate: 22
 41583 DEFB 27                ; Maximum x-coordinate: 27
; The following entity definition (#b78) is used in #R54016(The Forgotten
; Abbey) and #R57088(Swimming Pool).
; .
; #UDGTABLE
; { #GUARDIAN180,0,6 | #GUARDIAN180,1,6 | #GUARDIAN180,2,6 | #GUARDIAN180,3,6 |
; #GUARDIAN180,4,6 | #GUARDIAN180,5,6 | #GUARDIAN180,6,6 | #GUARDIAN180,7,6 }
; TABLE#
@label=ENTITY78
 41584 DEFB %00100001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 1 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41585 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41586 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41587 DEFB 208               ; Pixel y-coordinate: 104
 41588 DEFB 0                 ; Unused
 41589 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41590 DEFB 5                 ; Minimum x-coordinate: 5
 41591 DEFB 12                ; Maximum x-coordinate: 12
; The following entity definition (#b79) is used in #R54016(The Forgotten
; Abbey).
; .
; #UDGTABLE
; { #GUARDIAN180,0,65 | #GUARDIAN180,1,65 | #GUARDIAN180,2,65 |
; #GUARDIAN180,3,65 | #GUARDIAN180,4,65 | #GUARDIAN180,5,65 | #GUARDIAN180,6,65
; | #GUARDIAN180,7,65 }
; TABLE#
@label=ENTITY79
 41592 DEFB %01000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 2 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41593 DEFB %11101001         ; INK 1 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41594 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41595 DEFB 208               ; Pixel y-coordinate: 104
 41596 DEFB 0                 ; Unused
 41597 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41598 DEFB 11                ; Minimum x-coordinate: 11
 41599 DEFB 18                ; Maximum x-coordinate: 18
; The following entity definition (#b80) is used in #R54016(The Forgotten
; Abbey).
; .
; #UDGTABLE
; { #GUARDIAN180,0,4 | #GUARDIAN180,1,4 | #GUARDIAN180,2,4 | #GUARDIAN180,3,4 |
; #GUARDIAN180,4,4 | #GUARDIAN180,5,4 | #GUARDIAN180,6,4 | #GUARDIAN180,7,4 }
; TABLE#
@label=ENTITY80
 41600 DEFB %01100001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 3 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41601 DEFB %11100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41602 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41603 DEFB 208               ; Pixel y-coordinate: 104
 41604 DEFB 0                 ; Unused
 41605 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41606 DEFB 16                ; Minimum x-coordinate: 16
 41607 DEFB 23                ; Maximum x-coordinate: 23
; The following entity definition (#b81) is used in #R54016(The Forgotten
; Abbey).
; .
; #UDGTABLE
; { #GUARDIAN180,0,2 | #GUARDIAN180,1,2 | #GUARDIAN180,2,2 | #GUARDIAN180,3,2 |
; #GUARDIAN180,4,2 | #GUARDIAN180,5,2 | #GUARDIAN180,6,2 | #GUARDIAN180,7,2 }
; TABLE#
@label=ENTITY81
 41608 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41609 DEFB %11100010         ; INK 2 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41610 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41611 DEFB 208               ; Pixel y-coordinate: 104
 41612 DEFB 0                 ; Unused
 41613 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41614 DEFB 23                ; Minimum x-coordinate: 23
 41615 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b82) is used in #R59648(The Attic).
; .
; #UDGTABLE
; { #GUARDIAN176,0,3 | #GUARDIAN176,1,3 }
; TABLE#
@label=ENTITY82
 41616 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41617 DEFB %00100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41618 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41619 DEFB 132               ; Initial pixel y-coordinate: 66
 41620 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41621 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41622 DEFB 112               ; Minimum pixel y-coordinate: 56
 41623 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b83) is used in #R59648(The Attic).
; .
; #UDGTABLE
; { #GUARDIAN176,0,6 | #GUARDIAN176,1,6 }
; TABLE#
@label=ENTITY83
 41624 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41625 DEFB %00100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41626 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41627 DEFB 140               ; Initial pixel y-coordinate: 70
 41628 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41629 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41630 DEFB 112               ; Minimum pixel y-coordinate: 56
 41631 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b84) is used in #R59648(The Attic).
; .
; #UDGTABLE
; { #GUARDIAN176,0,65 | #GUARDIAN176,1,65 }
; TABLE#
@label=ENTITY84
 41632 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41633 DEFB %00101001         ; INK 1 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41634 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41635 DEFB 148               ; Initial pixel y-coordinate: 74
 41636 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41637 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41638 DEFB 112               ; Minimum pixel y-coordinate: 56
 41639 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b85) is used in #R59648(The Attic).
; .
; #UDGTABLE
; { #GUARDIAN176,0,4 | #GUARDIAN176,1,4 }
; TABLE#
@label=ENTITY85
 41640 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41641 DEFB %00100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41642 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41643 DEFB 156               ; Initial pixel y-coordinate: 78
 41644 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41645 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41646 DEFB 112               ; Minimum pixel y-coordinate: 56
 41647 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b86) is used in #R59648(The Attic).
; .
; #UDGTABLE
; { #GUARDIAN176,0,2 | #GUARDIAN176,1,2 }
; TABLE#
@label=ENTITY86
 41648 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41649 DEFB %00100010         ; INK 2 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41650 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41651 DEFB 164               ; Initial pixel y-coordinate: 82
 41652 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41653 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41654 DEFB 112               ; Minimum pixel y-coordinate: 56
 41655 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b87) is used in #R59648(The Attic).
; .
; #UDGTABLE
; { #GUARDIAN176,2,5 | #GUARDIAN176,3,5 }
; TABLE#
@label=ENTITY87
 41656 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41657 DEFB %00100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41658 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41659 DEFB 172               ; Initial pixel y-coordinate: 86
 41660 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41661 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41662 DEFB 112               ; Minimum pixel y-coordinate: 56
 41663 DEFB 176               ; Maximum pixel y-coordinate: 88
; The following entity definition (#b88) is used in #R52480(Out on a limb) and
; #R56832(The Banyan Tree).
; .
; #UDGTABLE
; { #GUARDIAN181,0,6 | #GUARDIAN181,1,6 | #GUARDIAN181,2,6 | #GUARDIAN181,3,6 |
; #GUARDIAN181,4,6 | #GUARDIAN181,5,6 | #GUARDIAN181,6,6 | #GUARDIAN181,7,6 }
; TABLE#
@label=ENTITY88
 41664 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41665 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41666 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41667 DEFB 160               ; Pixel y-coordinate: 80
 41668 DEFB 0                 ; Unused
 41669 DEFB 181               ; Page containing the sprite graphic data:
                              ; #R46336(#b181)
 41670 DEFB 19                ; Minimum x-coordinate: 19
 41671 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b89) is used in #R51968(The Hall) and
; #R62976(West#SPACE(2)Wing).
; .
; #UDGTABLE
; { #GUARDIAN176,6,6 | #GUARDIAN176,7,6 }
; TABLE#
@label=ENTITY89
 41672 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41673 DEFB %00100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 001 (bits 5-7)
 41674 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41675 DEFB 96                ; Initial pixel y-coordinate: 48
 41676 DEFB 0                 ; Initial pixel y-coordinate increment: 0 (not
                              ; moving)
 41677 DEFB 176               ; Page containing the sprite graphic data:
                              ; #R45056(#b176)
 41678 DEFB 80                ; Minimum pixel y-coordinate: 40
 41679 DEFB 112               ; Maximum pixel y-coordinate: 56
; The following entity definition (#b90) is used in #R54784(To the
; Kitchens#SPACE(4)Main Stairway).
; .
; #UDGTABLE
; { #GUARDIAN174,0,11 | #GUARDIAN174,1,11 | #GUARDIAN174,2,11 |
; #GUARDIAN174,3,11 }
; TABLE#
@label=ENTITY90
 41680 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41681 DEFB %01100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41682 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41683 DEFB 48                ; Pixel y-coordinate: 24
 41684 DEFB 0                 ; Unused
 41685 DEFB 174               ; Page containing the sprite graphic data:
                              ; #R44544(#b174)
 41686 DEFB 0                 ; Minimum x-coordinate: 0
 41687 DEFB 11                ; Maximum x-coordinate: 11
; The following entity definition (#b91) is used in #R54784(To the
; Kitchens#SPACE(4)Main Stairway).
; .
; #UDGTABLE
; { #GUARDIAN190,0,14 | #GUARDIAN190,1,14 | #GUARDIAN190,2,14 |
; #GUARDIAN190,3,14 }
; TABLE#
@label=ENTITY91
 41688 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41689 DEFB %01100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41690 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41691 DEFB 48                ; Pixel y-coordinate: 24
 41692 DEFB 0                 ; Unused
 41693 DEFB 190               ; Page containing the sprite graphic data:
                              ; #R48640(#b190)
 41694 DEFB 13                ; Minimum x-coordinate: 13
 41695 DEFB 21                ; Maximum x-coordinate: 21
; The following entity definition (#b92) is used in #R54784(To the
; Kitchens#SPACE(4)Main Stairway) and #R62464(Back Stairway).
; .
; #UDGTABLE
; { #GUARDIAN183,4,7 | #GUARDIAN183,5,7 | #GUARDIAN183,6,7 | #GUARDIAN183,7,7 }
; { #GUARDIAN183,4,15 | #GUARDIAN183,5,15 | #GUARDIAN183,6,15 |
; #GUARDIAN183,7,15 }
; TABLE#
@label=ENTITY92
 41696 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41697 DEFB %01100111         ; INK 7 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41698 DEFB 1                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41699 DEFB 96                ; Pixel y-coordinate: 48
 41700 DEFB 0                 ; Unused
 41701 DEFB 183               ; Page containing the sprite graphic data:
                              ; #R46848(#b183)
 41702 DEFB 12                ; Minimum x-coordinate: 12
 41703 DEFB 24                ; Maximum x-coordinate: 24
; The following entity definition (#b93) is used in #R54784(To the
; Kitchens#SPACE(4)Main Stairway).
; .
; #UDGTABLE
; { #GUARDIAN185,0,10 | #GUARDIAN185,1,10 | #GUARDIAN185,2,10 |
; #GUARDIAN185,3,10 }
; TABLE#
@label=ENTITY93
 41704 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41705 DEFB %01100010         ; INK 2 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41706 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41707 DEFB 144               ; Pixel y-coordinate: 72
 41708 DEFB 0                 ; Unused
 41709 DEFB 185               ; Page containing the sprite graphic data:
                              ; #R47360(#b185)
 41710 DEFB 2                 ; Minimum x-coordinate: 2
 41711 DEFB 6                 ; Maximum x-coordinate: 6
; The following entity definition (#b94) is used in #R54784(To the
; Kitchens#SPACE(4)Main Stairway).
; .
; #UDGTABLE
; { #GUARDIAN175,4,12 | #GUARDIAN175,5,12 | #GUARDIAN175,6,12 |
; #GUARDIAN175,7,12 }
; TABLE#
@label=ENTITY94
 41712 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41713 DEFB %11100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41714 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41715 DEFB 192               ; Pixel y-coordinate: 96
 41716 DEFB 0                 ; Unused
 41717 DEFB 175               ; Page containing the sprite graphic data:
                              ; #R44800(#b175)
 41718 DEFB 0                 ; Minimum x-coordinate: 0
 41719 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b95) is used in #R51968(The Hall) and
; #R54784(To the Kitchens#SPACE(4)Main Stairway).
; .
; #UDGTABLE
; { #GUARDIAN188,0,6 | #GUARDIAN188,1,6 | #GUARDIAN188,2,6 | #GUARDIAN188,3,6 |
; #GUARDIAN188,4,6 | #GUARDIAN188,5,6 | #GUARDIAN188,6,6 | #GUARDIAN188,7,6 }
; { #GUARDIAN188,0,14 | #GUARDIAN188,1,14 | #GUARDIAN188,2,14 |
; #GUARDIAN188,3,14 | #GUARDIAN188,4,14 | #GUARDIAN188,5,14 | #GUARDIAN188,6,14
; | #GUARDIAN188,7,14 }
; TABLE#
@label=ENTITY95
 41720 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41721 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41722 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41723 DEFB 160               ; Pixel y-coordinate: 80
 41724 DEFB 0                 ; Unused
 41725 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41726 DEFB 9                 ; Minimum x-coordinate: 9
 41727 DEFB 17                ; Maximum x-coordinate: 17
; The following entity definition (#b96) is used in #R55808(East Wall Base).
; .
; #UDGTABLE
; { #GUARDIAN172,0,66 | #GUARDIAN172,1,66 | #GUARDIAN172,2,66 |
; #GUARDIAN172,3,66 }
; TABLE#
@label=ENTITY96
 41728 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41729 DEFB %01101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41730 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41731 DEFB 144               ; Initial pixel y-coordinate: 72
 41732 DEFB 252               ; Initial pixel y-coordinate increment: -2
                              ; (moving up)
 41733 DEFB 172               ; Page containing the sprite graphic data:
                              ; #R44032(#b172)
 41734 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41735 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b97) is used in #R58624(Orangery) and
; #R62976(West#SPACE(2)Wing).
; .
; #UDGTABLE
; { #GUARDIAN172,0,5 | #GUARDIAN172,1,5 | #GUARDIAN172,2,5 | #GUARDIAN172,3,5 }
; { #GUARDIAN172,4,5 | #GUARDIAN172,5,5 | #GUARDIAN172,6,5 | #GUARDIAN172,7,5 }
; TABLE#
@label=ENTITY97
 41736 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41737 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41738 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41739 DEFB 64                ; Initial pixel y-coordinate: 32
 41740 DEFB 8                 ; Initial pixel y-coordinate increment: 4 (moving
                              ; down)
 41741 DEFB 172               ; Page containing the sprite graphic data:
                              ; #R44032(#b172)
 41742 DEFB 0                 ; Minimum pixel y-coordinate: 0
 41743 DEFB 192               ; Maximum pixel y-coordinate: 96
; The following entity definition (#b98) is used in #R62208(Tool#SPACE(2)Shed).
; .
; #UDGTABLE
; { #GUARDIAN175,0,6 | #GUARDIAN175,1,6 | #GUARDIAN175,2,6 | #GUARDIAN175,3,6 }
; TABLE#
@label=ENTITY98
 41744 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41745 DEFB %01100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41746 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41747 DEFB 144               ; Pixel y-coordinate: 72
 41748 DEFB 0                 ; Unused
 41749 DEFB 175               ; Page containing the sprite graphic data:
                              ; #R44800(#b175)
 41750 DEFB 7                 ; Minimum x-coordinate: 7
 41751 DEFB 20                ; Maximum x-coordinate: 20
; The following entity definition (#b99) is used in #R62208(Tool#SPACE(2)Shed).
; .
; #UDGTABLE
; { #GUARDIAN173,0,4 | #GUARDIAN173,1,4 | #GUARDIAN173,2,4 | #GUARDIAN173,3,4 }
; TABLE#
@label=ENTITY99
 41752 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41753 DEFB %01100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41754 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41755 DEFB 96                ; Pixel y-coordinate: 48
 41756 DEFB 0                 ; Unused
 41757 DEFB 173               ; Page containing the sprite graphic data:
                              ; #R44288(#b173)
 41758 DEFB 7                 ; Minimum x-coordinate: 7
 41759 DEFB 17                ; Maximum x-coordinate: 17
; The following entity definition (#b100) is used in #R56064(The Chapel) and
; #R56832(The Banyan Tree).
; .
; #UDGTABLE
; { #GUARDIAN172,0,4 | #GUARDIAN172,1,4 | #GUARDIAN172,2,4 | #GUARDIAN172,3,4 }
; { #GUARDIAN172,4,4 | #GUARDIAN172,5,4 | #GUARDIAN172,6,4 | #GUARDIAN172,7,4 }
; TABLE#
@label=ENTITY100
 41760 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41761 DEFB %01100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41762 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41763 DEFB 128               ; Initial pixel y-coordinate: 64
 41764 DEFB 254               ; Initial pixel y-coordinate increment: -1
                              ; (moving up)
 41765 DEFB 172               ; Page containing the sprite graphic data:
                              ; #R44032(#b172)
 41766 DEFB 112               ; Minimum pixel y-coordinate: 56
 41767 DEFB 160               ; Maximum pixel y-coordinate: 80
; The following entity definition (#b101) is used in #R56832(The Banyan Tree)
; and #R58368(A bit of tree).
; .
; #UDGTABLE
; { #GUARDIAN171,0,67 | #GUARDIAN171,1,67 | #GUARDIAN171,2,67 |
; #GUARDIAN171,3,67 }
; { #GUARDIAN171,4,67 | #GUARDIAN171,5,67 | #GUARDIAN171,6,67 |
; #GUARDIAN171,7,67 }
; TABLE#
@label=ENTITY101
 41768 DEFB %00000010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every second pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41769 DEFB %01101011         ; INK 3 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41770 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41771 DEFB 96                ; Initial pixel y-coordinate: 48
 41772 DEFB 4                 ; Initial pixel y-coordinate increment: 2 (moving
                              ; down)
 41773 DEFB 171               ; Page containing the sprite graphic data:
                              ; #R43776#43776(#b171)
 41774 DEFB 80                ; Minimum pixel y-coordinate: 40
 41775 DEFB 160               ; Maximum pixel y-coordinate: 80
; The following entity definition (#b102) is used in #R56064(The Chapel) and
; #R56832(The Banyan Tree).
; .
; #UDGTABLE
; { #GUARDIAN171,0,5 | #GUARDIAN171,1,5 | #GUARDIAN171,2,5 | #GUARDIAN171,3,5 }
; { #GUARDIAN171,4,5 | #GUARDIAN171,5,5 | #GUARDIAN171,6,5 | #GUARDIAN171,7,5 }
; TABLE#
@label=ENTITY102
 41776 DEFB %00010010         ; Vertical guardian (bits 0-2), animation frame
                              ; updated on every pass (bit 4), initial
                              ; animation frame 0 (bits 5 and 6)
 41777 DEFB %01100101         ; INK 5 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41778 DEFB 0                 ; Replaced by the base sprite index and
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41779 DEFB 152               ; Initial pixel y-coordinate: 76
 41780 DEFB 2                 ; Initial pixel y-coordinate increment: 1 (moving
                              ; down)
 41781 DEFB 171               ; Page containing the sprite graphic data:
                              ; #R43776#43776(#b171)
 41782 DEFB 80                ; Minimum pixel y-coordinate: 40
 41783 DEFB 160               ; Maximum pixel y-coordinate: 80
; The following entity definition (#b103) is used in #R56064(The Chapel).
; .
; #UDGTABLE
; { #GUARDIAN180,0,3 | #GUARDIAN180,1,3 | #GUARDIAN180,2,3 | #GUARDIAN180,3,3 }
; TABLE#
@label=ENTITY103
 41784 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41785 DEFB %01100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41786 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41787 DEFB 192               ; Pixel y-coordinate: 96
 41788 DEFB 0                 ; Unused
 41789 DEFB 180               ; Page containing the sprite graphic data:
                              ; #R46080(#b180)
 41790 DEFB 0                 ; Minimum x-coordinate: 0
 41791 DEFB 15                ; Maximum x-coordinate: 15
; The following entity definition (#b104) is used in #R58368(A bit of tree) and
; #R61440(Nomen Luni).
; .
; #UDGTABLE
; { #GUARDIAN188,0,6 | #GUARDIAN188,1,6 | #GUARDIAN188,2,6 | #GUARDIAN188,3,6 |
; #GUARDIAN188,4,6 | #GUARDIAN188,5,6 | #GUARDIAN188,6,6 | #GUARDIAN188,7,6 }
; TABLE#
@label=ENTITY104
 41792 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41793 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41794 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41795 DEFB 32                ; Pixel y-coordinate: 16
 41796 DEFB 0                 ; Unused
 41797 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41798 DEFB 0                 ; Minimum x-coordinate: 0
 41799 DEFB 10                ; Maximum x-coordinate: 10
; The following entity definition (#b105) is used in #R64512(The Bow).
; .
; #UDGTABLE
; { #GUARDIAN190,0,6 | #GUARDIAN190,1,6 | #GUARDIAN190,2,6 | #GUARDIAN190,3,6 }
; TABLE#
@label=ENTITY105
 41800 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41801 DEFB %01100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41802 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41803 DEFB 48                ; Pixel y-coordinate: 24
 41804 DEFB 0                 ; Unused
 41805 DEFB 190               ; Page containing the sprite graphic data:
                              ; #R48640(#b190)
 41806 DEFB 22                ; Minimum x-coordinate: 22
 41807 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b106) is used in #R60160(Conservatory
; Roof).
; .
; #UDGTABLE
; { #GUARDIAN174,0,66 | #GUARDIAN174,1,66 | #GUARDIAN174,2,66 |
; #GUARDIAN174,3,66 }
; TABLE#
@label=ENTITY106
 41808 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41809 DEFB %01101010         ; INK 2 (bits 0-2), BRIGHT 1 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41810 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41811 DEFB 176               ; Pixel y-coordinate: 88
 41812 DEFB 0                 ; Unused
 41813 DEFB 174               ; Page containing the sprite graphic data:
                              ; #R44544(#b174)
 41814 DEFB 17                ; Minimum x-coordinate: 17
 41815 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b107) is used in #R61440(Nomen Luni).
; .
; #UDGTABLE
; { #GUARDIAN190,0,4 | #GUARDIAN190,1,4 | #GUARDIAN190,2,4 | #GUARDIAN190,3,4 }
; TABLE#
@label=ENTITY107
 41816 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41817 DEFB %01100100         ; INK 4 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41818 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41819 DEFB 48                ; Pixel y-coordinate: 24
 41820 DEFB 0                 ; Unused
 41821 DEFB 190               ; Page containing the sprite graphic data:
                              ; #R48640(#b190)
 41822 DEFB 18                ; Minimum x-coordinate: 18
 41823 DEFB 22                ; Maximum x-coordinate: 22
; The following entity definition (#b108) is used in #R61952(Watch Tower).
; .
; #UDGTABLE
; { #GUARDIAN187,4,11 | #GUARDIAN187,5,11 | #GUARDIAN187,6,11 |
; #GUARDIAN187,7,11 }
; TABLE#
@label=ENTITY108
 41824 DEFB %10000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving left to right (bit 7)
 41825 DEFB %01100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41826 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41827 DEFB 144               ; Pixel y-coordinate: 72
 41828 DEFB 0                 ; Unused
 41829 DEFB 187               ; Page containing the sprite graphic data:
                              ; #R47872(#b187)
 41830 DEFB 11                ; Minimum x-coordinate: 11
 41831 DEFB 18                ; Maximum x-coordinate: 18
; The following entity definition (#b109) is used in #R61952(Watch Tower).
; .
; #UDGTABLE
; { #GUARDIAN188,0,14 | #GUARDIAN188,1,14 | #GUARDIAN188,2,14 |
; #GUARDIAN188,3,14 | #GUARDIAN188,4,14 | #GUARDIAN188,5,14 | #GUARDIAN188,6,14
; | #GUARDIAN188,7,14 }
; TABLE#
@label=ENTITY109
 41832 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41833 DEFB %11100110         ; INK 6 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 111 (bits 5-7)
 41834 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41835 DEFB 112               ; Pixel y-coordinate: 56
 41836 DEFB 0                 ; Unused
 41837 DEFB 188               ; Page containing the sprite graphic data:
                              ; #R48128(#b188)
 41838 DEFB 9                 ; Minimum x-coordinate: 9
 41839 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b110) is used in #R64512(The Bow).
; .
; #UDGTABLE
; { #GUARDIAN174,0,3 | #GUARDIAN174,1,3 | #GUARDIAN174,2,3 | #GUARDIAN174,3,3 }
; TABLE#
@label=ENTITY110
 41840 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41841 DEFB %01100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41842 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41843 DEFB 208               ; Pixel y-coordinate: 104
 41844 DEFB 0                 ; Unused
 41845 DEFB 174               ; Page containing the sprite graphic data:
                              ; #R44544(#b174)
 41846 DEFB 17                ; Minimum x-coordinate: 17
 41847 DEFB 30                ; Maximum x-coordinate: 30
; The following entity definition (#b111) is used in #R50944(Cuckoo's Nest).
; .
; #UDGTABLE
; { #GUARDIAN181,0,3 | #GUARDIAN181,1,3 | #GUARDIAN181,2,3 | #GUARDIAN181,3,3 }
; TABLE#
@label=ENTITY111
 41848 DEFB %00000001         ; Horizontal guardian (bits 0-2), initial
                              ; animation frame 0 (bits 5 and 6), initially
                              ; moving right to left (bit 7)
 41849 DEFB %01100011         ; INK 3 (bits 0-2), BRIGHT 0 (bit 3), animation
                              ; frame mask 011 (bits 5-7)
 41850 DEFB 0                 ; Replaced by the base sprite index and initial
                              ; x-coordinate (copied from the second byte of
                              ; the entity specification in the room
                              ; definition)
 41851 DEFB 176               ; Pixel y-coordinate: 88
 41852 DEFB 0                 ; Unused
 41853 DEFB 181               ; Page containing the sprite graphic data:
                              ; #R46336(#b181)
 41854 DEFB 0                 ; Minimum x-coordinate: 0
 41855 DEFB 11                ; Maximum x-coordinate: 11
; The next 15 entity definitions (#b112-#b126) are unused.
 41856 DEFB 0,0,0,0,0,0,0,0
 41864 DEFB 0,0,0,0,0,0,0,0
 41872 DEFB 0,0,0,0,0,0,0,0
 41880 DEFB 0,0,0,0,0,0,0,0
 41888 DEFB 0,0,0,0,0,0,0,0
 41896 DEFB 0,0,0,0,0,0,0,0
 41904 DEFB 0,0,0,0,0,0,0,0
 41912 DEFB 0,0,0,0,0,0,0,0
 41920 DEFB 0,0,0,0,0,0,0,0
 41928 DEFB 0,0,0,0,0,0,0,0
 41936 DEFB 0,0,0,0,0,0,0,0
 41944 DEFB 0,0,0,0,0,0,0,0
 41952 DEFB 0,0,0,0,0,0,0,0
 41960 DEFB 0,0,0,0,0,0,0,0
 41968 DEFB 0,0,0,0,0,0,0,0
; The following entity definition (#b127) - whose eighth byte is at #R41983 -
; is copied into one of the entity buffers at #R33024 for any entity
; specification whose first byte is #b127 or #b255; the first byte of the
; definition (#b255) serves to terminate the entity buffers.
@label=ENTITY127
 41976 DEFB 255,0,0,0,0,0,0

; Index of the first item
;
; Used by the routines at #R34762 and #R37841.
@label=FIRSTITEM
b41983 DEFB 173

; Item table
;
; Used by the routines at #R34762 and #R37841.
; .
; The location of item N (#b173<=N<=#b255) is defined by the pair of bytes at
; addresses #R41984+N and #R42240+N. The meaning of the bits in each byte-pair
; is as follows:
; .
; #TABLE(default,centre)
; { =h Bit(s) | =h Meaning }
; { 15 | Most significant bit of the y-coordinate }
; { 14 | Collection flag (reset=collected, set=uncollected) }
; { 8-13 | Room number }
; { 5-7 | Least significant bits of the y-coordinate }
; { 0-4 | x-coordinate }
; TABLE#
@label=ITEMTABLE1
b41984 DEFS 173      ; Unused
 42157 DEFB 178      ; Item #b173 at (8,25) in #R61952(Watch Tower)
 42158 DEFB 178      ; Item #b174 at (9,10) in #R61952(Watch Tower)
 42159 DEFB 178      ; Item #b175 at (9,20) in #R61952(Watch Tower)
 42160 DEFB 178      ; Item #b176 at (9,24) in #R61952(Watch Tower)
 42161 DEFB 184      ; Item #b177 at (14,9) in #R63488(West Wing Roof)
 42162 DEFB 184      ; Item #b178 at (13,19) in #R63488(West Wing Roof)
 42163 DEFB 184      ; Item #b179 at (11,27) in #R63488(West Wing Roof)
 42164 DEFB 184      ; Item #b180 at (10,6) in #R63488(West Wing Roof)
 42165 DEFB 171      ; Item #b181 at (8,31) in #R60160(Conservatory Roof)
 42166 DEFB 171      ; Item #b182 at (8,25) in #R60160(Conservatory Roof)
 42167 DEFB 171      ; Item #b183 at (8,28) in #R60160(Conservatory Roof)
 42168 DEFB 171      ; Item #b184 at (8,22) in #R60160(Conservatory Roof)
 42169 DEFB 159      ; Item #b185 at (11,4) in #R57088(Swimming Pool)
 42170 DEFB 146      ; Item #b186 at (12,25) in #R53760(On the Roof)
 42171 DEFB 15       ; Item #b187 at (4,31) in #R52992(I'm sure I've seen this
                     ; before..)
 42172 DEFB 16       ; Item #b188 at (4,31) in #R53248(We must perform a
                     ; Quirkafleeg)
 42173 DEFB 17       ; Item #b189 at (4,31) in #R53504(Up on the Battlements)
 42174 DEFB 188      ; Item #b190 at (8,26) in #R64512(The Bow)
 42175 DEFB 187      ; Item #b191 at (14,13) in #R64256(The Yacht)
 42176 DEFB 186      ; Item #b192 at (13,22) in #R64000(The Beach)
 42177 DEFB 37       ; Item #b193 at (1,28) in #R58624(Orangery)
 42178 DEFB 37       ; Item #b194 at (6,16) in #R58624(Orangery)
 42179 DEFB 165      ; Item #b195 at (13,6) in #R58624(Orangery)
 42180 DEFB 27       ; Item #b196 at (6,29) in #R56064(The Chapel)
 42181 DEFB 185      ; Item #b197 at (9,23) in #R63744(Above the West Bedroom)
 42182 DEFB 186      ; Item #b198 at (13,22) in #R64000(The Beach)
@bfix=DEFB 11
 42183 DEFB 28       ; Item #b199 at (3,26) in #R56320(First Landing)
 42184 DEFB 162      ; Item #b200 at (9,2) in #R57856(Top Landing)
 42185 DEFB 25       ; Item #b201 at (2,3) in #R55552(Cold Store)
 42186 DEFB 25       ; Item #b202 at (5,8) in #R55552(Cold Store)
 42187 DEFB 153      ; Item #b203 at (8,6) in #R55552(Cold Store)
 42188 DEFB 153      ; Item #b204 at (11,6) in #R55552(Cold Store)
 42189 DEFB 179      ; Item #b205 at (14,7) in #R62208(Tool#SPACE(2)Shed)
 42190 DEFB 22       ; Item #b206 at (6,9) in #R54784(To the
                     ; Kitchens#SPACE(4)Main Stairway)
 42191 DEFB 150      ; Item #b207 at (9,2) in #R54784(To the
                     ; Kitchens#SPACE(4)Main Stairway)
 42192 DEFB 40       ; Item #b208 at (7,19) in #R59392(Dr Jones will never
                     ; believe this)
 42193 DEFB 140      ; Item #b209 at (13,19) in #R52224(Tree Top)
 42194 DEFB 12       ; Item #b210 at (3,16) in #R52224(Tree Top)
 42195 DEFB 12       ; Item #b211 at (4,22) in #R52224(Tree Top)
 42196 DEFB 137      ; Item #b212 at (11,5) in #R51456(On a Branch Over the
                     ; Drive)
 42197 DEFB 7        ; Item #b213 at (7,15) in #R50944(Cuckoo's Nest)
 42198 DEFB 46       ; Item #b214 at (3,10) in #R60928(Tree Root)
 42199 DEFB 46       ; Item #b215 at (4,29) in #R60928(Tree Root)
 42200 DEFB 38       ; Item #b216 at (2,9) in #R58880(Priests' Hole)
 42201 DEFB 149      ; Item #b217 at (12,17) in #R54528(Ballroom West)
 42202 DEFB 149      ; Item #b218 at (12,18) in #R54528(Ballroom West)
 42203 DEFB 149      ; Item #b219 at (12,20) in #R54528(Ballroom West)
 42204 DEFB 149      ; Item #b220 at (12,22) in #R54528(Ballroom West)
 42205 DEFB 149      ; Item #b221 at (12,23) in #R54528(Ballroom West)
 42206 DEFB 14       ; Item #b222 at (2,26) in #R52736(Rescue Esmerelda)
 42207 DEFB 10       ; Item #b223 at (4,11) in #R51712(The Front Door)
 42208 DEFB 149      ; Item #b224 at (12,25) in #R54528(Ballroom West)
 42209 DEFB 149      ; Item #b225 at (12,27) in #R54528(Ballroom West)
 42210 DEFB 14       ; Item #b226 at (3,26) in #R52736(Rescue Esmerelda)
 42211 DEFB 13       ; Item #b227 at (6,2) in #R52480(Out on a limb)
 42212 DEFB 13       ; Item #b228 at (1,5) in #R52480(Out on a limb)
 42213 DEFB 44       ; Item #b229 at (4,18) in #R60416(On top of the house)
 42214 DEFB 19       ; Item #b230 at (3,2) in #R54016(The Forgotten Abbey)
 42215 DEFB 131      ; Item #b231 at (11,1) in #R49920(At the Foot of the
                     ; MegaTree)
 42216 DEFB 131      ; Item #b232 at (10,4) in #R49920(At the Foot of the
                     ; MegaTree)
 42217 DEFB 131      ; Item #b233 at (11,7) in #R49920(At the Foot of the
                     ; MegaTree)
 42218 DEFB 49       ; Item #b234 at (4,28) in #R61696(The Wine Cellar)
 42219 DEFB 49       ; Item #b235 at (7,4) in #R61696(The Wine Cellar)
 42220 DEFB 49       ; Item #b236 at (7,28) in #R61696(The Wine Cellar)
 42221 DEFB 177      ; Item #b237 at (10,2) in #R61696(The Wine Cellar)
 42222 DEFB 177      ; Item #b238 at (10,28) in #R61696(The Wine Cellar)
 42223 DEFB 177      ; Item #b239 at (13,4) in #R61696(The Wine Cellar)
 42224 DEFB 0        ; Item #b240 at (4,19) in #R49152(The Off Licence)
 42225 DEFB 0        ; Item #b241 at (4,20) in #R49152(The Off Licence)
 42226 DEFB 0        ; Item #b242 at (4,21) in #R49152(The Off Licence)
 42227 DEFB 0        ; Item #b243 at (4,22) in #R49152(The Off Licence)
 42228 DEFB 0        ; Item #b244 at (4,23) in #R49152(The Off Licence)
 42229 DEFB 0        ; Item #b245 at (4,24) in #R49152(The Off Licence)
 42230 DEFB 0        ; Item #b246 at (4,25) in #R49152(The Off Licence)
 42231 DEFB 0        ; Item #b247 at (4,26) in #R49152(The Off Licence)
 42232 DEFB 0        ; Item #b248 at (4,27) in #R49152(The Off Licence)
 42233 DEFB 0        ; Item #b249 at (4,28) in #R49152(The Off Licence)
 42234 DEFB 0        ; Item #b250 at (4,29) in #R49152(The Off Licence)
 42235 DEFB 0        ; Item #b251 at (4,30) in #R49152(The Off Licence)
 42236 DEFB 2        ; Item #b252 at (0,22) in #R49664(Under the MegaTree)
 42237 DEFB 157      ; Item #b253 at (9,26) in #R56576(The Nightmare Room)
 42238 DEFB 158      ; Item #b254 at (14,8) in #R56832(The Banyan Tree)
 42239 DEFB 161      ; Item #b255 at (13,23) in #R57600(The Bathroom)
@label=ITEMTABLE2
 42240 DEFS 173      ; Unused
 42413 DEFB 25       ; Item #b173 at (8,25) in #R61952(Watch Tower)
 42414 DEFB 42       ; Item #b174 at (9,10) in #R61952(Watch Tower)
 42415 DEFB 52       ; Item #b175 at (9,20) in #R61952(Watch Tower)
 42416 DEFB 56       ; Item #b176 at (9,24) in #R61952(Watch Tower)
 42417 DEFB 201      ; Item #b177 at (14,9) in #R63488(West Wing Roof)
 42418 DEFB 179      ; Item #b178 at (13,19) in #R63488(West Wing Roof)
 42419 DEFB 123      ; Item #b179 at (11,27) in #R63488(West Wing Roof)
 42420 DEFB 70       ; Item #b180 at (10,6) in #R63488(West Wing Roof)
 42421 DEFB 31       ; Item #b181 at (8,31) in #R60160(Conservatory Roof)
 42422 DEFB 25       ; Item #b182 at (8,25) in #R60160(Conservatory Roof)
 42423 DEFB 28       ; Item #b183 at (8,28) in #R60160(Conservatory Roof)
 42424 DEFB 22       ; Item #b184 at (8,22) in #R60160(Conservatory Roof)
 42425 DEFB 100      ; Item #b185 at (11,4) in #R57088(Swimming Pool)
 42426 DEFB 153      ; Item #b186 at (12,25) in #R53760(On the Roof)
 42427 DEFB 159      ; Item #b187 at (4,31) in #R52992(I'm sure I've seen this
                     ; before..)
 42428 DEFB 159      ; Item #b188 at (4,31) in #R53248(We must perform a
                     ; Quirkafleeg)
 42429 DEFB 159      ; Item #b189 at (4,31) in #R53504(Up on the Battlements)
 42430 DEFB 26       ; Item #b190 at (8,26) in #R64512(The Bow)
 42431 DEFB 205      ; Item #b191 at (14,13) in #R64256(The Yacht)
 42432 DEFB 182      ; Item #b192 at (13,22) in #R64000(The Beach)
 42433 DEFB 60       ; Item #b193 at (1,28) in #R58624(Orangery)
 42434 DEFB 208      ; Item #b194 at (6,16) in #R58624(Orangery)
 42435 DEFB 166      ; Item #b195 at (13,6) in #R58624(Orangery)
 42436 DEFB 221      ; Item #b196 at (6,29) in #R56064(The Chapel)
 42437 DEFB 55       ; Item #b197 at (9,23) in #R63744(Above the West Bedroom)
 42438 DEFB 182      ; Item #b198 at (13,22) in #R64000(The Beach)
 42439 DEFB 122      ; Item #b199 at (3,26) in #R56320(First Landing)
 42440 DEFB 34       ; Item #b200 at (9,2) in #R57856(Top Landing)
 42441 DEFB 67       ; Item #b201 at (2,3) in #R55552(Cold Store)
 42442 DEFB 168      ; Item #b202 at (5,8) in #R55552(Cold Store)
 42443 DEFB 6        ; Item #b203 at (8,6) in #R55552(Cold Store)
 42444 DEFB 102      ; Item #b204 at (11,6) in #R55552(Cold Store)
 42445 DEFB 199      ; Item #b205 at (14,7) in #R62208(Tool#SPACE(2)Shed)
 42446 DEFB 201      ; Item #b206 at (6,9) in #R54784(To the
                     ; Kitchens#SPACE(4)Main Stairway)
 42447 DEFB 34       ; Item #b207 at (9,2) in #R54784(To the
                     ; Kitchens#SPACE(4)Main Stairway)
 42448 DEFB 243      ; Item #b208 at (7,19) in #R59392(Dr Jones will never
                     ; believe this)
 42449 DEFB 179      ; Item #b209 at (13,19) in #R52224(Tree Top)
 42450 DEFB 112      ; Item #b210 at (3,16) in #R52224(Tree Top)
 42451 DEFB 150      ; Item #b211 at (4,22) in #R52224(Tree Top)
 42452 DEFB 101      ; Item #b212 at (11,5) in #R51456(On a Branch Over the
                     ; Drive)
 42453 DEFB 239      ; Item #b213 at (7,15) in #R50944(Cuckoo's Nest)
 42454 DEFB 106      ; Item #b214 at (3,10) in #R60928(Tree Root)
 42455 DEFB 157      ; Item #b215 at (4,29) in #R60928(Tree Root)
 42456 DEFB 73       ; Item #b216 at (2,9) in #R58880(Priests' Hole)
 42457 DEFB 145      ; Item #b217 at (12,17) in #R54528(Ballroom West)
 42458 DEFB 146      ; Item #b218 at (12,18) in #R54528(Ballroom West)
 42459 DEFB 148      ; Item #b219 at (12,20) in #R54528(Ballroom West)
 42460 DEFB 150      ; Item #b220 at (12,22) in #R54528(Ballroom West)
 42461 DEFB 151      ; Item #b221 at (12,23) in #R54528(Ballroom West)
 42462 DEFB 90       ; Item #b222 at (2,26) in #R52736(Rescue Esmerelda)
 42463 DEFB 139      ; Item #b223 at (4,11) in #R51712(The Front Door)
 42464 DEFB 153      ; Item #b224 at (12,25) in #R54528(Ballroom West)
 42465 DEFB 155      ; Item #b225 at (12,27) in #R54528(Ballroom West)
 42466 DEFB 122      ; Item #b226 at (3,26) in #R52736(Rescue Esmerelda)
 42467 DEFB 194      ; Item #b227 at (6,2) in #R52480(Out on a limb)
 42468 DEFB 37       ; Item #b228 at (1,5) in #R52480(Out on a limb)
 42469 DEFB 146      ; Item #b229 at (4,18) in #R60416(On top of the house)
 42470 DEFB 98       ; Item #b230 at (3,2) in #R54016(The Forgotten Abbey)
 42471 DEFB 97       ; Item #b231 at (11,1) in #R49920(At the Foot of the
                     ; MegaTree)
 42472 DEFB 68       ; Item #b232 at (10,4) in #R49920(At the Foot of the
                     ; MegaTree)
 42473 DEFB 103      ; Item #b233 at (11,7) in #R49920(At the Foot of the
                     ; MegaTree)
 42474 DEFB 156      ; Item #b234 at (4,28) in #R61696(The Wine Cellar)
 42475 DEFB 228      ; Item #b235 at (7,4) in #R61696(The Wine Cellar)
 42476 DEFB 252      ; Item #b236 at (7,28) in #R61696(The Wine Cellar)
 42477 DEFB 66       ; Item #b237 at (10,2) in #R61696(The Wine Cellar)
 42478 DEFB 92       ; Item #b238 at (10,28) in #R61696(The Wine Cellar)
 42479 DEFB 164      ; Item #b239 at (13,4) in #R61696(The Wine Cellar)
 42480 DEFB 147      ; Item #b240 at (4,19) in #R49152(The Off Licence)
 42481 DEFB 148      ; Item #b241 at (4,20) in #R49152(The Off Licence)
 42482 DEFB 149      ; Item #b242 at (4,21) in #R49152(The Off Licence)
 42483 DEFB 150      ; Item #b243 at (4,22) in #R49152(The Off Licence)
 42484 DEFB 151      ; Item #b244 at (4,23) in #R49152(The Off Licence)
 42485 DEFB 152      ; Item #b245 at (4,24) in #R49152(The Off Licence)
 42486 DEFB 153      ; Item #b246 at (4,25) in #R49152(The Off Licence)
 42487 DEFB 154      ; Item #b247 at (4,26) in #R49152(The Off Licence)
 42488 DEFB 155      ; Item #b248 at (4,27) in #R49152(The Off Licence)
 42489 DEFB 156      ; Item #b249 at (4,28) in #R49152(The Off Licence)
 42490 DEFB 157      ; Item #b250 at (4,29) in #R49152(The Off Licence)
 42491 DEFB 158      ; Item #b251 at (4,30) in #R49152(The Off Licence)
 42492 DEFB 22       ; Item #b252 at (0,22) in #R49664(Under the MegaTree)
 42493 DEFB 58       ; Item #b253 at (9,26) in #R56576(The Nightmare Room)
 42494 DEFB 200      ; Item #b254 at (14,8) in #R56832(The Banyan Tree)
 42495 DEFB 183      ; Item #b255 at (13,23) in #R57600(The Bathroom)

; Toilet graphics
;
; Used by the routine at #R38298.
; .
; #UDGTABLE
; { #SPRITE42496,7(toilet0*) | #SPRITE42528,7(toilet1*) |
; #FRAMES(toilet0,10;toilet1)(toilet_empty) }
; { #SPRITE42560,7(toilet2*) | #SPRITE42592,7(toilet3*) |
; #FRAMES(toilet3,10;toilet2)(toilet_full) }
; TABLE#
@label=TOILET0
b42496 DEFB 0,15,0,63,0,15,48,15,12,15,3,15,0,207,0,47
 42512 DEFB 0,8,63,248,63,240,63,238,31,223,31,219,15,251,15,251
@label=TOILET1
 42528 DEFB 0,15,0,63,0,15,0,15,0,15,0,15,0,15,63,239
 42544 DEFB 0,8,63,248,63,240,63,238,31,223,31,219,15,251,15,251
@label=TOILET2
 42560 DEFB 3,175,1,191,1,143,1,143,127,143,127,143,71,207,15,207
 42576 DEFB 0,8,63,248,63,240,63,238,31,223,31,219,15,251,15,251
@label=TOILET3
 42592 DEFB 0,15,4,63,30,47,59,47,93,143,14,143,7,207,15,207
 42608 DEFB 0,8,63,248,63,240,63,238,31,223,31,219,15,251,15,251

; Unused
u42624 DEFB 128,128,128,128,140,143,143,143,143,143,128,128,191,143,143,143
 42640 DEFB 133,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
 42656 DEFB 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
 42672 DEFB 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
 42688 DEFB 128,128,191,191,191,191,191,191,191,191,191,143,179,176,176,128
 42704 DEFB 133,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
 42720 DEFB 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
 42736 DEFB 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128
 42752 DEFS 1024

; Guardian graphics
;
; Used by the routine at #R37310.
;
; .
;
; This guardian (page #b171, sprites 0-3) appears in #R56832(The Banyan Tree)
; and #R58368(A bit of tree).
; .
; #UDGTABLE
; { #GUARDIAN171,0,5 | #GUARDIAN171,1,5 | #GUARDIAN171,2,5 | #GUARDIAN171,3,5 }
; TABLE#
@label=GUARDIANS
b43776 DEFB 0,0,0,0,42,170,127,255,127,255,124,63,124,63,127,255
 43792 DEFB 127,255,127,255,0,0,42,170,0,0,42,170,0,0,0,0
 43808 DEFB 0,72,1,44,4,188,18,254,75,254,46,127,188,63,254,124
 43824 DEFB 255,242,127,201,127,37,60,148,50,80,9,64,5,0,4,0
 43840 DEFB 0,0,7,224,15,240,23,232,15,240,22,104,14,112,22,104
 43856 DEFB 15,240,23,232,15,240,23,232,8,16,23,232,16,8,0,0
 43872 DEFB 18,0,52,128,61,32,127,72,127,210,254,116,252,61,62,127
 43888 DEFB 79,255,147,254,164,254,41,60,10,76,2,144,0,160,0,32
; This guardian (page #b171, sprites 4-7) appears in #R56064(The Chapel) and
; #R56832(The Banyan Tree).
; .
; #UDGTABLE
; { #GUARDIAN171,4,5 | #GUARDIAN171,5,5 | #GUARDIAN171,6,5 | #GUARDIAN171,7,5 }
; TABLE#
 43904 DEFB 0,0,0,0,0,0,2,2,34,2,169,84,168,216,113,116
 43920 DEFB 34,218,59,174,46,171,36,249,32,219,32,216,1,84,2,138
 43936 DEFB 0,0,2,2,2,2,1,116,0,216,81,84,82,250,35,222
 43952 DEFB 231,171,30,249,24,217,8,217,9,84,6,138,4,0,0,0
 43968 DEFB 2,2,3,142,0,248,1,84,2,218,3,254,17,139,75,169
 43984 DEFB 43,251,150,248,108,216,5,84,2,138,1,0,0,128,0,64
 44000 DEFB 0,0,2,2,2,2,1,116,0,216,81,84,82,250,35,222
 44016 DEFB 231,171,30,249,24,217,8,217,9,84,6,138,4,0,0,0
; This guardian (page #b172, sprites 0-3) appears in #R55808(East Wall Base),
; #R56064(The Chapel) and #R62976(West#SPACE(2)Wing).
; .
; #UDGTABLE
; { #GUARDIAN172,0,66 | #GUARDIAN172,1,66 | #GUARDIAN172,2,66 |
; #GUARDIAN172,3,66 }
; TABLE#
 44032 DEFB 32,4,174,236,187,125,224,7,189,181,160,4,59,124,0,0
 44048 DEFB 29,176,32,4,59,124,162,68,253,183,160,4,59,220,32,4
 44064 DEFB 32,4,55,180,160,4,251,127,160,4,61,180,32,4,27,120
 44080 DEFB 0,0,61,180,162,68,187,125,224,7,189,181,183,236,32,4
 44096 DEFB 32,4,58,220,61,189,224,7,59,117,32,4,61,188,0,0
 44112 DEFB 27,112,32,4,61,189,162,69,251,119,160,5,61,237,32,4
 44128 DEFB 32,4,59,117,160,5,253,191,160,5,59,117,32,4,29,184
 44144 DEFB 0,0,59,116,36,132,61,189,224,7,59,117,46,236,32,4
; This guardian (page #b172, sprites 4-7) appears in #R56832(The Banyan Tree)
; and #R58624(Orangery).
; .
; #UDGTABLE
; { #GUARDIAN172,4,4 | #GUARDIAN172,5,4 | #GUARDIAN172,6,4 | #GUARDIAN172,7,4 }
; TABLE#
 44160 DEFB 15,240,23,232,24,24,55,204,40,36,83,146,100,74,169,43
 44176 DEFB 170,43,106,74,105,146,36,36,51,204,24,24,23,232,15,240
 44192 DEFB 0,224,7,240,56,24,115,204,100,38,73,147,82,75,212,43
 44208 DEFB 213,42,212,202,210,18,73,228,36,12,19,244,8,120,7,128
 44224 DEFB 1,128,7,224,24,24,115,206,164,37,201,149,210,85,212,85
 44240 DEFB 212,149,210,37,201,201,228,19,115,230,24,24,7,224,1,128
 44256 DEFB 7,0,8,224,31,220,48,38,103,146,200,74,211,42,212,171
 44272 DEFB 84,43,82,75,73,147,36,38,51,204,40,24,31,240,1,224
; This guardian (page #b173, sprites 0-3) appears in #R51456(On a Branch Over
; the Drive), #R60160(Conservatory Roof) and #R62208(Tool#SPACE(2)Shed).
; .
; #UDGTABLE
; { #GUARDIAN173,0,14 | #GUARDIAN173,1,14 | #GUARDIAN173,2,14 |
; #GUARDIAN173,3,14 }
; TABLE#
 44288 DEFB 12,0,12,0,12,0,12,0,12,0,30,0,18,0,51,0
 44304 DEFB 63,0,115,128,97,128,97,128,192,192,192,192,128,64,128,64
 44320 DEFB 8,64,8,64,12,192,4,128,7,128,7,128,12,192,28,224
 44336 DEFB 59,112,48,48,96,24,96,24,64,8,192,12,128,4,128,4
 44352 DEFB 2,16,2,16,3,48,1,32,1,224,1,224,3,48,7,56
 44368 DEFB 14,220,12,12,24,6,24,6,16,2,48,3,32,1,32,1
 44384 DEFB 0,48,0,48,0,48,0,48,0,48,0,120,0,72,0,204
 44400 DEFB 0,252,1,206,1,134,1,134,3,3,3,3,2,1,2,1
; This guardian (page #b173, sprites 4-7) appears in #R57856(Top Landing),
; #R60928(Tree Root) and #R63232(West Bedroom).
; .
; #UDGTABLE
; { #GUARDIAN173,4,7 | #GUARDIAN173,5,7 | #GUARDIAN173,6,7 | #GUARDIAN173,7,7 }
; TABLE#
 44416 DEFB 0,0,0,0,0,0,127,254,64,2,255,255,222,123,192,3
 44432 DEFB 192,3,222,123,255,255,64,2,127,254,0,0,0,0,0,0
 44448 DEFB 10,0,29,0,54,128,103,64,195,160,113,208,184,104,92,52
 44464 DEFB 44,58,22,29,11,142,5,195,2,230,1,108,0,184,0,80
 44480 DEFB 7,224,31,248,20,40,22,104,22,104,22,104,22,104,20,40
 44496 DEFB 20,40,22,104,22,104,22,104,22,104,20,40,31,248,7,224
 44512 DEFB 0,80,0,184,1,108,2,230,5,195,11,142,22,29,44,58
 44528 DEFB 92,52,184,104,113,208,195,160,103,64,54,128,29,0,10,0
; This guardian (page #b174, sprites 0-3) appears in #R54784(To the
; Kitchens#SPACE(4)Main Stairway), #R57344(Halfway up the East Wall),
; #R60160(Conservatory Roof) and #R64512(The Bow).
; .
; #UDGTABLE
; { #GUARDIAN174,0,11 | #GUARDIAN174,1,11 | #GUARDIAN174,2,11 |
; #GUARDIAN174,3,11 }
; TABLE#
 44544 DEFB 126,0,153,0,255,0,129,0,126,0,24,0,36,0,36,0
 44560 DEFB 66,0,66,0,129,0,231,0,165,0,195,0,165,0,231,0
 44576 DEFB 0,0,31,128,38,64,57,192,48,192,31,128,9,0,16,128
 44592 DEFB 32,64,64,32,128,16,224,112,160,80,192,48,160,80,224,112
 44608 DEFB 0,0,0,0,0,0,7,224,9,144,14,112,14,112,6,96
 44624 DEFB 27,216,96,6,128,1,224,7,160,5,192,3,160,5,224,7
 44640 DEFB 0,0,1,248,2,100,3,156,3,12,1,248,0,144,1,8
 44656 DEFB 2,4,4,2,8,1,14,7,10,5,12,3,10,5,14,7
; This guardian (page #b174, sprites 4-7) appears in #R60672(Under the Drive).
; .
; #UDGTABLE
; { #GUARDIAN174,4,3 | #GUARDIAN174,5,3 | #GUARDIAN174,6,3 | #GUARDIAN174,7,3 }
; TABLE#
 44672 DEFB 12,0,18,0,33,16,18,32,140,64,82,128,47,0,47,0
 44688 DEFB 95,128,95,128,95,128,0,0,255,192,93,128,93,128,255,192
 44704 DEFB 0,1,0,2,131,4,76,200,35,16,20,160,11,192,11,192
 44720 DEFB 23,224,23,224,23,224,0,0,63,240,27,176,27,176,63,240
 44736 DEFB 128,0,64,0,32,1,17,226,8,196,5,40,2,240,2,240
 44752 DEFB 5,248,5,248,5,248,0,0,15,252,11,116,11,116,15,252
 44768 DEFB 0,0,0,0,8,48,4,204,2,49,1,74,0,188,0,188
 44784 DEFB 1,126,1,126,1,126,0,0,3,255,2,237,2,237,3,255
; This guardian (page #b175, sprites 0-3) appears in #R57856(Top Landing),
; #R59904(Under the Roof) and #R62208(Tool#SPACE(2)Shed).
; .
; #UDGTABLE
; { #GUARDIAN175,0,5 | #GUARDIAN175,1,5 | #GUARDIAN175,2,5 | #GUARDIAN175,3,5 }
; TABLE#
 44800 DEFB 56,0,124,0,126,0,109,128,68,64,108,64,124,32,124,0
 44816 DEFB 124,12,124,50,252,204,255,48,252,192,127,0,108,0,56,0
 44832 DEFB 14,96,31,148,31,8,27,32,17,80,27,80,31,160,31,160
 44848 DEFB 127,64,223,64,223,128,159,128,127,0,31,0,27,0,14,0
 44864 DEFB 3,128,7,192,7,224,6,216,4,68,14,196,127,194,239,192
 44880 DEFB 239,192,143,192,119,192,7,192,7,192,7,192,6,192,3,128
 44896 DEFB 0,224,1,240,1,240,1,178,1,21,1,181,1,250,1,250
 44912 DEFB 7,244,13,244,13,248,9,248,7,240,1,240,1,176,0,224
; This guardian (page #b175, sprites 4-7) appears in #R50176(The Drive),
; #R50944(Cuckoo's Nest), #R54784(To the Kitchens#SPACE(4)Main Stairway) and
; #R62464(Back Stairway).
; .
; #UDGTABLE
; { #GUARDIAN175,4,5 | #GUARDIAN175,5,5 | #GUARDIAN175,6,5 | #GUARDIAN175,7,5 }
; TABLE#
 44928 DEFB 12,0,22,0,47,0,47,0,79,128,95,128,95,128,159,192
 44944 DEFB 191,192,189,192,186,192,189,64,90,128,93,128,63,0,12,0
 44960 DEFB 0,0,0,0,0,0,0,112,3,152,12,120,51,248,71,240
 44976 DEFB 95,240,191,240,190,160,189,96,90,192,93,64,63,128,14,0
 44992 DEFB 0,0,0,0,0,0,0,0,3,192,28,120,33,252,79,254
 45008 DEFB 95,254,159,255,191,239,95,86,95,174,35,84,31,248,3,192
 45024 DEFB 0,0,0,0,0,0,14,0,23,192,23,240,19,252,11,254
 45040 DEFB 11,254,11,215,5,235,5,215,2,234,2,126,1,140,0,112
; This guardian (page #b176, sprites 0-3) appears in #R59648(The Attic).
; .
; #UDGTABLE
; { #GUARDIAN176,0,3 | #GUARDIAN176,1,6 | #GUARDIAN176,2,5 | #GUARDIAN176,3,5 }
; TABLE#
 45056 DEFB 7,192,24,48,35,136,68,68,136,34,144,19,144,19,136,34
 45072 DEFB 68,68,35,136,24,48,7,192,3,0,3,0,3,0,3,128
 45088 DEFB 7,192,24,48,32,8,67,132,132,66,136,35,136,35,132,66
 45104 DEFB 67,132,32,8,24,48,7,192,15,128,29,208,8,224,4,64
 45120 DEFB 7,192,31,240,62,120,124,60,126,124,255,254,255,254,240,0
 45136 DEFB 255,128,127,240,127,252,63,248,31,240,7,192,0,0,0,0
 45152 DEFB 7,192,31,240,60,248,120,124,124,252,255,128,252,0,240,0
 45168 DEFB 248,0,126,0,127,128,63,224,31,240,7,192,0,0,0,0
; This guardian (page #b176, sprites 4-5) appears in #R52736(Rescue Esmerelda).
; .
; #UDGTABLE
; { #GUARDIAN176,4,23 | #GUARDIAN176,5,23 }
; TABLE#
 45184 DEFB 7,192,8,32,10,160,8,32,11,160,16,16,37,72,10,160
 45200 DEFB 61,120,70,196,7,192,2,128,5,64,15,224,20,128,8,192
 45216 DEFB 7,192,8,32,10,160,8,32,57,56,0,0,5,64,10,160
 45232 DEFB 29,112,22,208,23,208,10,160,5,64,15,224,2,80,6,32
; This guardian (page #b176, sprites 6-7) appears in #R51968(The Hall) and
; #R62976(West#SPACE(2)Wing).
; .
; #UDGTABLE
; { #GUARDIAN176,6,6 | #GUARDIAN176,7,6 }
; TABLE#
 45248 DEFB 1,128,0,0,1,128,69,145,1,128,137,162,69,145,1,128
 45264 DEFB 205,179,205,179,205,179,205,179,35,196,18,72,13,176,0,0
 45280 DEFB 1,128,0,0,1,128,137,162,1,128,69,145,137,162,1,128
 45296 DEFB 205,179,205,179,205,179,205,179,35,196,18,72,13,176,0,0
; This guardian (page #b177, sprites 0-7) is not used.
; .
; #UDGTABLE
; { #GUARDIAN177,0,7 | #GUARDIAN177,1,7 | #GUARDIAN177,2,7 | #GUARDIAN177,3,7 |
; #GUARDIAN177,4,7 | #GUARDIAN177,5,7 | #GUARDIAN177,6,7 | #GUARDIAN177,7,7 }
; TABLE#
 45312 DEFB 22,0,22,0,22,0,22,0,22,0,22,0,22,0,22,0
 45328 DEFB 255,192,0,0,82,128,192,192,51,0,179,64,8,0,45,0
 45344 DEFB 5,128,5,128,5,128,5,128,5,128,5,128,5,128,5,128
 45360 DEFB 63,240,0,0,13,32,36,0,12,208,12,240,40,0,13,32
 45376 DEFB 1,96,1,96,1,96,1,96,1,96,1,96,1,96,1,96
 45392 DEFB 15,252,0,0,2,208,0,64,11,52,3,48,12,12,5,40
 45408 DEFB 0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88
 45424 DEFB 3,255,0,0,1,44,0,5,3,204,2,204,0,9,1,44
 45440 DEFB 0,64,1,128,2,64,5,192,11,192,11,192,23,192,23,192
 45456 DEFB 22,64,22,0,22,0,22,0,22,0,22,0,22,0,22,0
 45472 DEFB 3,0,15,192,8,64,19,32,19,32,8,64,15,192,7,128
 45488 DEFB 5,128,5,128,5,128,5,128,5,128,5,128,5,128,5,128
 45504 DEFB 8,0,14,0,11,0,11,128,11,192,11,192,11,224,15,224
 45520 DEFB 9,96,1,96,1,96,1,96,1,96,1,96,1,96,1,96
 45536 DEFB 0,48,0,220,0,188,1,126,1,126,0,188,0,188,0,88
 45552 DEFB 0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88
; This guardian (page #b178, sprites 0-3) appears in #R60416(On top of the
; house) and #R64256(The Yacht).
; .
; #UDGTABLE
; { #GUARDIAN178,0,13 | #GUARDIAN178,1,13 | #GUARDIAN178,2,13 |
; #GUARDIAN178,3,13 }
; TABLE#
 45568 DEFB 0,3,0,15,0,31,128,63,192,127,209,255,95,255,159,255
 45584 DEFB 207,255,211,255,223,252,255,240,255,224,127,192,63,128,14,0
 45600 DEFB 0,0,0,0,80,1,216,3,156,7,79,31,215,255,219,255
 45616 DEFB 255,255,255,255,255,255,255,255,143,254,7,252,3,248,0,224
 45632 DEFB 0,0,3,128,7,192,143,192,223,224,219,241,87,255,143,255
 45648 DEFB 223,255,223,255,255,255,252,127,248,63,112,63,0,31,0,14
 45664 DEFB 0,56,0,254,1,255,131,255,199,255,223,255,95,255,155,255
 45680 DEFB 199,255,223,255,223,199,255,1,254,0,124,0,56,0,0,0
; This guardian (page #b178, sprites 4-7) appears in #R51456(On a Branch Over
; the Drive), #R58624(Orangery), #R59392(Dr Jones will never believe this),
; #R60672(Under the Drive), #R61440(Nomen Luni) and #R62464(Back Stairway).
; .
; #UDGTABLE
; { #GUARDIAN178,4,74 | #GUARDIAN178,5,74 | #GUARDIAN178,6,74 |
; #GUARDIAN178,7,74 }
; TABLE#
 45696 DEFB 3,192,14,240,29,248,62,252,83,206,101,166,164,39,113,143
 45712 DEFB 191,247,85,239,110,118,83,202,56,28,22,120,11,240,2,192
 45728 DEFB 3,192,13,240,26,248,63,252,81,140,100,38,197,167,179,207
 45744 DEFB 93,187,170,119,95,250,114,78,56,28,28,56,11,240,2,192
 45760 DEFB 3,192,11,240,21,120,63,252,80,12,101,166,199,231,241,143
 45776 DEFB 190,127,221,247,44,58,90,94,44,60,22,120,11,240,3,192
 45792 DEFB 3,192,13,240,26,248,63,252,81,140,100,38,197,167,179,207
 45808 DEFB 93,187,170,119,95,250,114,78,56,28,28,56,11,240,2,192
; The next 256 bytes are unused.
 45824 DEFS 256
; This guardian (page #b180, sprites 0-7) appears in #R54016(The Forgotten
; Abbey), #R56064(The Chapel), #R56320(First Landing), #R57088(Swimming Pool)
; and #R61696(The Wine Cellar).
; .
; #UDGTABLE
; { #GUARDIAN180,0,4 | #GUARDIAN180,1,4 | #GUARDIAN180,2,4 | #GUARDIAN180,3,4 |
; #GUARDIAN180,4,4 | #GUARDIAN180,5,4 | #GUARDIAN180,6,4 | #GUARDIAN180,7,4 }
; TABLE#
 46080 DEFB 14,0,21,0,42,128,23,0,255,0,22,0,12,0,31,128
 46096 DEFB 63,128,127,0,42,0,127,0,111,0,127,0,24,0,56,0
 46112 DEFB 3,128,5,64,10,160,5,192,127,192,5,128,3,0,7,224
 46128 DEFB 15,224,31,192,10,128,31,192,27,192,31,192,24,128,56,0
 46144 DEFB 0,224,1,80,2,168,1,112,15,240,1,96,0,192,1,248
 46160 DEFB 3,248,7,240,2,160,7,240,6,240,7,240,6,48,0,96
 46176 DEFB 0,56,0,84,0,170,0,92,1,252,0,88,0,48,0,126
 46192 DEFB 0,254,1,252,0,168,1,252,1,188,1,252,1,24,0,56
 46208 DEFB 28,0,42,0,85,0,58,0,63,128,26,0,12,0,126,0
 46224 DEFB 127,0,63,128,21,0,63,128,61,128,63,128,24,128,28,0
 46240 DEFB 7,0,10,128,21,64,14,128,15,240,6,128,3,0,31,128
 46256 DEFB 31,192,15,224,5,64,15,224,15,96,15,224,12,96,6,0
 46272 DEFB 1,192,2,160,5,80,3,160,3,254,1,160,0,192,7,224
 46288 DEFB 7,240,3,248,1,80,3,248,3,216,3,248,1,24,0,28
 46304 DEFB 0,112,0,168,1,84,0,232,0,255,0,104,0,48,1,248
 46320 DEFB 1,252,0,254,0,84,0,254,0,246,0,254,0,24,0,28
; This guardian (page #b181, sprites 0-7) appears in #R49920(At the Foot of the
; MegaTree), #R50944(Cuckoo's Nest), #R52480(Out on a limb), #R56832(The Banyan
; Tree), #R61696(The Wine Cellar), #R62208(Tool#SPACE(2)Shed), #R63488(West
; Wing Roof) and #R64256(The Yacht).
; .
; #UDGTABLE
; { #GUARDIAN181,0,67 | #GUARDIAN181,1,67 | #GUARDIAN181,2,67 |
; #GUARDIAN181,3,67 | #GUARDIAN181,4,67 | #GUARDIAN181,5,67 | #GUARDIAN181,6,67
; | #GUARDIAN181,7,67 }
; TABLE#
 46336 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 46352 DEFB 0,0,0,0,0,0,0,0,6,0,63,0,31,0,13,0
 46368 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,128
 46384 DEFB 15,192,7,64,3,64,79,64,7,64,3,32,15,32,135,32
 46400 DEFB 0,96,3,240,1,208,0,208,3,208,1,208,0,200,3,200
 46416 DEFB 1,200,0,200,11,200,33,200,0,200,11,196,1,196,32,196
 46432 DEFB 0,0,0,0,0,0,0,0,0,0,0,24,0,252,0,116
 46448 DEFB 0,52,0,244,0,116,1,54,0,250,2,122,0,58,4,250
 46464 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 46480 DEFB 0,0,0,0,0,0,0,0,48,0,126,0,124,0,88,0
 46496 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0
 46512 DEFB 31,128,23,0,22,0,23,128,23,0,38,16,39,128,39,8
 46528 DEFB 3,0,7,224,5,192,5,128,5,224,5,192,9,128,9,224
 46544 DEFB 9,208,9,128,9,232,9,194,9,128,17,232,17,192,17,130
 46560 DEFB 0,0,0,0,0,0,0,0,0,0,0,192,1,248,1,112
 46576 DEFB 1,96,1,120,1,112,2,96,2,120,2,112,2,97,2,120
; This guardian (page #b182, sprites 0-7) appears in #R49664(Under the
; MegaTree), #R51968(The Hall), #R52224(Tree Top) and #R59136(Emergency
; Generator).
; .
; #UDGTABLE
; { #GUARDIAN182,0,66 | #GUARDIAN182,1,66 | #GUARDIAN182,2,66 |
; #GUARDIAN182,3,66 | #GUARDIAN182,4,66 | #GUARDIAN182,5,66 | #GUARDIAN182,6,66
; | #GUARDIAN182,7,66 }
; TABLE#
@label=FLYINGPIG0
 46592 DEFB 0,0,0,0,0,0,0,0,0,0,19,64,23,128,63,192
 46608 DEFB 85,64,250,160,253,64,31,160,8,128,5,0,0,0,0,0
 46624 DEFB 0,0,0,0,0,0,0,0,0,0,8,208,5,224,15,240
 46640 DEFB 22,176,61,80,62,168,7,80,2,168,2,84,0,40,0,20
 46656 DEFB 0,0,0,0,0,0,0,0,0,0,2,52,1,120,3,252
 46672 DEFB 5,84,15,170,15,212,1,250,0,136,1,4,0,0,0,0
 46688 DEFB 0,3,0,10,0,21,0,10,0,21,0,171,0,86,0,235
 46704 DEFB 1,85,3,235,3,255,0,126,0,34,0,34,0,0,0,0
 46720 DEFB 128,0,80,0,168,0,80,0,168,0,213,0,106,0,215,0
 46736 DEFB 170,128,215,192,255,192,126,0,68,0,68,0,0,0,0,0
 46752 DEFB 0,0,0,0,0,0,0,0,0,0,44,64,30,128,63,192
 46768 DEFB 42,160,85,240,43,240,95,128,17,0,32,128,0,0,0,0
 46784 DEFB 0,0,0,0,0,0,0,0,0,0,11,16,7,160,15,240
 46800 DEFB 13,104,10,188,21,124,10,224,21,64,42,64,20,0,40,0
 46816 DEFB 0,0,0,0,0,0,0,0,0,0,2,200,1,232,3,252
 46832 DEFB 2,170,5,95,2,191,5,248,1,16,0,160,0,0,0,0
; This guardian (page #b183, sprites 0-1) appears in #R55040(The Kitchen) and
; #R55296(West of Kitchen).
; .
; #UDGTABLE
; { #GUARDIAN183,0,67 | #GUARDIAN183,1,67 }
; TABLE#
 46848 DEFB 10,160,21,80,10,160,5,66,5,69,5,69,7,194,13,98
 46864 DEFB 15,227,60,127,123,191,239,227,174,226,71,194,206,192,192,224
 46880 DEFB 192,0,202,160,213,80,202,160,69,64,69,66,167,197,205,101
 46896 DEFB 111,226,124,122,58,191,15,239,14,227,7,194,6,226,14,2
; This guardian (page #b183, sprites 2-3) appears in #R60928(Tree Root),
; #R63232(West Bedroom) and #R63744(Above the West Bedroom).
; .
; #UDGTABLE
; { #GUARDIAN183,2,3 | #GUARDIAN183,3,3 }
; TABLE#
 46912 DEFB 3,0,4,128,5,192,11,160,21,64,23,96,23,96,31,224
 46928 DEFB 19,144,45,104,47,120,47,120,47,120,47,120,175,121,127,254
 46944 DEFB 0,192,1,32,1,112,2,232,5,80,5,216,5,216,7,248
 46960 DEFB 9,200,22,180,23,188,23,188,23,188,23,188,151,189,127,254
; This guardian (page #b183, sprites 4-7) appears in #R54784(To the
; Kitchens#SPACE(4)Main Stairway) and #R62464(Back Stairway).
; .
; #UDGTABLE
; { #GUARDIAN183,4,15 | #GUARDIAN183,5,15 | #GUARDIAN183,6,15 |
; #GUARDIAN183,7,15 }
; TABLE#
 46976 DEFB 118,0,0,0,110,0,118,0,110,0,0,0,118,0,110,0
 46992 DEFB 0,0,118,0,0,0,0,0,110,0,118,0,0,0,110,0
 47008 DEFB 29,128,42,0,39,96,81,176,75,208,144,128,170,232,148,184
 47024 DEFB 145,128,170,216,145,0,85,0,75,176,43,96,36,0,29,128
 47040 DEFB 3,192,12,48,16,152,50,20,104,130,64,42,181,17,200,69
 47056 DEFB 164,145,154,5,72,66,85,10,40,84,18,136,13,112,3,192
 47072 DEFB 1,184,0,84,6,228,13,138,11,210,1,9,23,85,29,41
 47088 DEFB 1,137,27,85,0,137,0,170,13,210,6,212,0,36,1,184
; This guardian (page #b184, sprites 0-7) appears in #R49664(Under the
; MegaTree), #R53760(On the Roof), #R54528(Ballroom West) and #R60928(Tree
; Root).
; .
; #UDGTABLE
; { #GUARDIAN184,0,5 | #GUARDIAN184,1,5 | #GUARDIAN184,2,5 | #GUARDIAN184,3,5 |
; #GUARDIAN184,4,5 | #GUARDIAN184,5,5 | #GUARDIAN184,6,5 | #GUARDIAN184,7,5 }
; TABLE#
 47104 DEFB 0,0,6,0,8,0,56,0,80,0,240,0,248,0,60,0
 47120 DEFB 62,0,126,0,159,0,31,0,31,192,14,192,24,0,96,0
 47136 DEFB 0,0,0,0,15,0,20,128,60,0,14,0,63,0,15,128
 47152 DEFB 31,128,47,192,15,192,7,240,3,176,1,0,2,0,4,0
 47168 DEFB 0,0,0,96,0,128,3,128,13,0,7,0,3,128,7,192
 47184 DEFB 11,224,7,224,9,240,1,240,1,252,0,236,1,128,6,0
 47200 DEFB 0,0,0,0,0,4,0,8,0,112,0,160,1,224,0,112
 47216 DEFB 1,248,0,120,1,252,0,124,0,124,0,127,0,59,0,240
 47232 DEFB 4,0,4,0,12,0,12,0,22,0,30,0,62,0,108,0
 47248 DEFB 158,0,63,0,63,0,63,0,127,0,86,0,28,0,6,0
 47264 DEFB 4,128,8,64,19,32,19,32,23,160,19,32,31,224,27,96
 47280 DEFB 39,144,15,192,15,192,15,192,15,192,29,128,3,128,1,0
 47296 DEFB 0,128,0,128,0,192,0,192,1,160,1,224,1,240,0,216
 47312 DEFB 1,228,3,240,3,240,3,240,3,248,1,168,0,224,1,128
 47328 DEFB 0,72,0,132,1,50,1,2,1,122,1,122,1,254,1,182
 47344 DEFB 2,121,0,252,0,252,0,252,0,252,0,110,0,112,0,32
; This guardian (page #b185, sprites 0-3) appears in #R51456(On a Branch Over
; the Drive), #R54784(To the Kitchens#SPACE(4)Main Stairway) and #R57600(The
; Bathroom).
; .
; #UDGTABLE
; { #GUARDIAN185,0,13 | #GUARDIAN185,1,13 | #GUARDIAN185,2,13 |
; #GUARDIAN185,3,13 }
; TABLE#
 47360 DEFB 60,0,110,0,167,0,165,0,119,0,163,0,98,0,44,0
 47376 DEFB 52,0,70,0,197,0,238,0,165,0,229,0,118,0,60,0
 47392 DEFB 0,0,0,0,0,176,1,72,3,252,0,68,2,12,2,124
 47408 DEFB 53,216,70,240,197,0,238,0,165,0,229,0,118,0,60,0
 47424 DEFB 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
 47440 DEFB 52,52,70,70,197,197,238,238,165,165,229,229,118,118,60,60
 47456 DEFB 0,0,0,0,15,0,27,128,62,64,48,64,34,0,63,192
 47472 DEFB 18,180,13,70,0,197,0,238,0,165,0,229,0,118,0,60
; This guardian (page #b185, sprites 4-7) appears in #R49408(The Bridge).
; .
; #UDGTABLE
; { #GUARDIAN185,4,68 | #GUARDIAN185,5,68 | #GUARDIAN185,6,68 |
; #GUARDIAN185,7,68 }
; TABLE#
 47488 DEFB 3,192,6,96,13,240,26,216,53,92,32,4,127,254,215,117
 47504 DEFB 178,39,215,117,127,254,21,120,37,164,2,64,17,136,0,0
 47520 DEFB 3,192,6,96,13,240,26,184,53,92,32,4,127,254,174,235
 47536 DEFB 228,77,174,235,127,254,21,120,10,80,1,128,4,32,1,0
 47552 DEFB 3,192,6,96,13,240,26,216,53,92,32,4,127,254,237,219
 47568 DEFB 168,147,237,219,127,254,21,120,37,164,2,64,17,136,4,32
 47584 DEFB 3,192,6,96,13,240,26,232,53,92,32,4,127,254,219,183
 47600 DEFB 201,21,219,183,127,254,21,120,10,66,65,144,4,0,17,68
; This guardian (page #b186, sprites 0-3) appears in #R49152(The Off Licence),
; #R49664(Under the MegaTree), #R51200(Inside the MegaTrunk), #R52480(Out on a
; limb), #R54272(Ballroom East), #R54528(Ballroom West), #R55808(East Wall
; Base) and #R60928(Tree Root).
; .
; #UDGTABLE
; { #GUARDIAN186,0,66 | #GUARDIAN186,1,66 | #GUARDIAN186,2,66 |
; #GUARDIAN186,3,66 }
; TABLE#
 47616 DEFB 7,224,15,240,223,251,63,252,31,248,31,248,49,140,106,86
 47632 DEFB 177,141,158,249,13,240,29,184,54,108,89,154,140,49,7,224
 47648 DEFB 7,224,15,240,31,248,255,255,31,248,31,248,49,140,42,84
 47664 DEFB 113,142,158,249,141,241,29,184,50,76,88,26,76,50,7,224
 47680 DEFB 7,224,15,240,31,248,223,251,63,252,31,248,49,140,42,84
 47696 DEFB 48,140,93,250,141,177,154,89,18,72,24,24,44,52,199,227
 47712 DEFB 7,224,143,241,95,250,63,252,31,248,17,136,46,116,42,84
 47728 DEFB 113,142,94,250,141,241,29,184,18,72,120,30,140,49,7,224
; This guardian (page #b186, sprites 4-7) appears in #R50688(Entrance to
; Hades), #R56064(The Chapel) and #R58880(Priests' Hole).
; .
; #UDGTABLE
; { #GUARDIAN186,4,52 | #GUARDIAN186,5,52 | #GUARDIAN186,6,52 |
; #GUARDIAN186,7,52 }
; TABLE#
 47744 DEFB 21,3,42,190,21,94,74,168,53,92,138,174,109,92,153,249
 47760 DEFB 110,191,221,99,46,73,89,129,4,130,43,198,18,252,12,253
 47776 DEFB 64,168,253,84,122,168,21,82,58,172,117,81,58,182,159,153
 47792 DEFB 253,118,198,187,146,116,129,154,65,32,99,212,63,72,191,48
 47808 DEFB 253,191,191,239,234,215,170,69,104,212,72,132,64,4,64,1
 47824 DEFB 80,0,18,10,64,12,42,34,20,168,32,132,20,40,5,32
 47840 DEFB 253,191,255,251,172,215,170,209,42,84,130,68,66,1,8,4
 47856 DEFB 74,16,34,130,8,168,20,4,10,144,1,64,0,0,0,0
; This guardian (page #b187, sprites 0-3) appears in #R55552(Cold Store) and
; #R59904(Under the Roof).
; .
; #UDGTABLE
; { #GUARDIAN187,0,15 | #GUARDIAN187,1,15 | #GUARDIAN187,2,15 |
; #GUARDIAN187,3,15 }
; TABLE#
 47872 DEFB 12,0,54,128,127,64,126,128,253,0,254,128,255,128,255,0
 47888 DEFB 85,0,42,0,20,0,42,0,20,0,8,0,20,0,8,0
 47904 DEFB 3,0,13,160,31,208,31,160,63,64,63,160,63,224,63,192
 47920 DEFB 53,64,42,128,5,0,10,128,5,0,2,0,5,0,2,0
 47936 DEFB 0,192,3,104,7,244,7,232,15,208,15,232,15,248,15,240
 47952 DEFB 5,80,10,160,1,64,2,160,9,64,0,128,1,64,0,128
 47968 DEFB 0,48,0,218,1,253,1,250,3,244,3,250,3,254,3,252
 47984 DEFB 3,84,2,168,0,80,0,168,0,80,0,32,0,80,0,32
; This guardian (page #b187, sprites 4-7) appears in #R51200(Inside the
; MegaTrunk), #R52224(Tree Top) and #R61952(Watch Tower).
; .
; #UDGTABLE
; { #GUARDIAN187,4,70 | #GUARDIAN187,5,70 | #GUARDIAN187,6,70 |
; #GUARDIAN187,7,70 }
; TABLE#
 48000 DEFB 4,0,42,128,85,64,43,128,68,64,175,160,95,64,32,128
 48016 DEFB 85,64,42,128,4,0,4,0,8,0,62,0,65,0,129,0
 48032 DEFB 2,0,21,64,42,160,21,192,34,32,95,80,42,160,16,64
 48048 DEFB 42,160,21,64,2,0,2,0,14,0,17,128,32,64,0,0
 48064 DEFB 0,64,2,168,5,84,3,168,4,68,11,234,5,244,2,8
 48080 DEFB 5,84,2,168,0,64,0,64,0,112,1,136,2,4,0,0
 48096 DEFB 0,32,1,84,2,170,1,212,2,34,5,125,2,250,1,84
 48112 DEFB 2,170,1,84,0,32,0,32,0,16,0,124,0,130,0,129
; This guardian (page #b188, sprites 0-7) appears in #R49408(The Bridge),
; #R50176(The Drive), #R51200(Inside the MegaTrunk), #R51968(The Hall),
; #R52224(Tree Top), #R52480(Out on a limb), #R52736(Rescue Esmerelda),
; #R52992(I'm sure I've seen this before..), #R53248(We must perform a
; Quirkafleeg), #R54272(Ballroom East), #R54784(To the Kitchens#SPACE(4)Main
; Stairway), #R58368(A bit of tree), #R58880(Priests' Hole), #R60672(Under the
; Drive), #R61440(Nomen Luni), #R61952(Watch Tower), #R62976(West#SPACE(2)Wing)
; and #R63488(West Wing Roof).
; .
; #UDGTABLE
; { #GUARDIAN188,0,66 | #GUARDIAN188,1,66 | #GUARDIAN188,2,66 |
; #GUARDIAN188,3,66 | #GUARDIAN188,4,66 | #GUARDIAN188,5,66 | #GUARDIAN188,6,66
; | #GUARDIAN188,7,66 }
; TABLE#
 48128 DEFB 0,0,0,0,0,0,0,0,0,0,111,64,187,128,117,64
 48144 DEFB 26,128,5,0,0,128,0,0,0,0,0,0,0,0,0,0
 48160 DEFB 0,0,0,0,0,160,1,64,2,128,1,80,54,160,93,112
 48176 DEFB 55,224,3,192,0,0,0,0,0,0,0,0,0,0,0,0
 48192 DEFB 0,0,0,0,0,0,0,0,0,0,0,244,25,184,47,84
 48208 DEFB 25,168,0,80,0,8,0,0,0,0,0,0,0,0,0,0
 48224 DEFB 0,0,0,0,0,0,0,0,0,0,0,61,3,126,5,215
 48240 DEFB 3,106,0,20,0,40,0,20,0,10,0,0,0,0,0,0
 48256 DEFB 0,0,0,0,0,0,0,0,0,0,188,0,126,192,235,160
 48272 DEFB 86,192,40,0,20,0,40,0,80,0,0,0,0,0,0,0
 48288 DEFB 0,0,0,0,0,0,0,0,0,0,47,0,29,152,42,244
 48304 DEFB 21,152,10,0,16,0,0,0,0,0,0,0,0,0,0,0
 48320 DEFB 0,0,0,0,5,0,2,128,1,64,10,128,5,108,14,186
 48336 DEFB 7,236,3,192,0,0,0,0,0,0,0,0,0,0,0,0
 48352 DEFB 0,0,0,0,0,0,0,0,0,0,2,246,1,221,2,174
 48368 DEFB 1,88,0,160,1,0,0,0,0,0,0,0,0,0,0,0
; This guardian (page #b189, sprites 0-7) appears in #R55552(Cold Store).
; .
; #UDGTABLE
; { #GUARDIAN189,0,14 | #GUARDIAN189,1,14 | #GUARDIAN189,2,14 |
; #GUARDIAN189,3,14 | #GUARDIAN189,4,14 | #GUARDIAN189,5,14 | #GUARDIAN189,6,14
; | #GUARDIAN189,7,14 }
; TABLE#
 48384 DEFB 24,0,60,0,212,0,46,0,58,0,58,0,90,0,93,0
 48400 DEFB 79,0,67,0,33,128,34,0,30,0,20,0,19,0,60,0
 48416 DEFB 6,0,15,0,63,0,11,128,14,128,14,128,31,0,23,128
 48432 DEFB 17,192,16,96,8,64,8,128,7,128,2,0,2,0,7,0
 48448 DEFB 1,128,11,192,5,64,10,224,3,160,3,160,5,160,5,208
 48464 DEFB 4,240,4,48,2,24,2,32,1,224,1,64,6,48,1,64
 48480 DEFB 0,96,0,176,3,80,0,184,0,232,0,232,1,104,1,116
 48496 DEFB 1,60,1,12,0,134,0,136,0,120,0,37,0,34,0,116
 48512 DEFB 6,0,13,0,10,192,29,0,23,0,23,0,22,128,46,128
 48528 DEFB 60,128,48,128,97,0,17,0,30,0,164,0,68,0,46,0
 48544 DEFB 1,128,3,208,2,160,7,80,5,192,5,192,5,160,11,160
 48560 DEFB 15,32,12,32,24,64,4,64,7,128,2,128,12,96,2,128
 48576 DEFB 0,96,0,240,0,252,1,208,1,112,1,112,0,248,1,232
 48592 DEFB 3,136,6,8,2,16,1,16,1,224,0,64,0,64,0,224
 48608 DEFB 0,24,0,60,0,43,0,116,0,92,0,92,0,90,0,186
 48624 DEFB 0,242,0,194,1,132,0,68,0,120,0,80,1,144,0,120
; This guardian (page #b190, sprites 0-3) appears in #R49152(The Off Licence),
; #R54784(To the Kitchens#SPACE(4)Main Stairway), #R61440(Nomen Luni) and
; #R64512(The Bow).
; .
; #UDGTABLE
; { #GUARDIAN190,0,4 | #GUARDIAN190,1,4 | #GUARDIAN190,2,4 | #GUARDIAN190,3,4 }
; TABLE#
 48640 DEFB 12,0,18,0,33,0,45,0,33,0,18,0,12,0,12,0
 48656 DEFB 30,0,0,0,55,0,64,0,13,64,172,64,64,128,46,0
 48672 DEFB 14,192,29,160,31,0,31,224,31,0,29,160,14,192,3,0
 48688 DEFB 7,128,0,0,14,192,0,32,43,0,35,80,16,96,7,0
 48704 DEFB 4,8,6,24,7,56,15,252,7,56,6,216,4,200,0,192
 48720 DEFB 1,224,0,0,1,208,4,8,8,212,10,192,0,8,3,176
 48736 DEFB 0,220,1,110,0,62,1,254,0,62,1,110,0,220,0,48
 48752 DEFB 0,120,0,0,0,184,1,2,2,177,0,53,1,0,0,220
; This guardian (page #b190, sprites 4-7) appears in #R49152(The Off Licence).
; .
; #UDGTABLE
; { #GUARDIAN190,4,69 | #GUARDIAN190,5,69 | #GUARDIAN190,6,69 |
; #GUARDIAN190,7,69 }
; TABLE#
 48768 DEFB 0,0,0,0,7,224,31,184,61,236,127,254,125,246,251,247
 48784 DEFB 251,247,127,238,127,222,63,252,31,248,7,224,0,0,0,0
 48800 DEFB 0,0,1,128,7,224,13,112,31,248,63,252,63,244,125,254
 48816 DEFB 123,246,59,236,63,220,31,56,15,240,7,224,1,128,0,0
 48832 DEFB 1,128,7,224,15,240,30,248,31,120,63,124,59,252,55,244
 48848 DEFB 55,252,63,236,63,236,31,216,31,56,15,240,7,224,1,128
 48864 DEFB 0,0,1,128,7,224,15,240,30,184,63,252,63,244,123,254
 48880 DEFB 119,246,55,236,63,220,31,56,15,240,7,224,1,128,0,0
; This guardian (page #b191, sprites 0-3) appears in #R49920(At the Foot of the
; MegaTree), #R51200(Inside the MegaTrunk), #R51456(On a Branch Over the
; Drive), #R59392(Dr Jones will never believe this) and #R61440(Nomen Luni).
; .
; #UDGTABLE
; { #GUARDIAN191,0,5 | #GUARDIAN191,1,5 | #GUARDIAN191,2,5 | #GUARDIAN191,3,5 }
; TABLE#
 48896 DEFB 128,0,64,0,163,96,83,96,41,192,22,160,11,224,7,112
 48912 DEFB 2,168,5,212,2,42,3,229,3,226,3,97,3,98,7,112
 48928 DEFB 0,0,0,0,6,48,86,48,169,192,86,160,11,224,6,48
 48944 DEFB 3,232,5,212,2,42,3,228,3,234,23,100,14,96,4,112
 48960 DEFB 0,0,0,0,3,96,3,96,1,192,30,160,43,224,86,180
 48976 DEFB 163,106,69,213,130,34,3,225,3,226,3,96,3,96,7,112
 48992 DEFB 0,0,0,0,6,48,86,48,169,192,86,160,11,224,7,244
 49008 DEFB 2,42,5,213,2,34,3,225,3,224,3,116,3,56,7,16
; This guardian (page #b191, sprites 4-5) appears in #R50432(The Security
; Guard), #R52992(I'm sure I've seen this before..) and #R53504(Up on the
; Battlements).
; .
; #UDGTABLE
; { #GUARDIAN191,4,4 | #GUARDIAN191,5,4 }
; TABLE#
 49024 DEFB 2,4,5,14,10,132,21,196,23,68,43,228,47,224,18,68
 49040 DEFB 8,130,7,44,21,80,42,164,85,68,170,132,69,0,29,192
 49056 DEFB 2,0,5,0,10,132,21,206,23,68,43,228,47,228,18,68
 49072 DEFB 8,128,7,4,21,82,42,172,85,64,170,132,69,4,29,196
; This guardian (page #b191, sprites 6-7) appears in #R52736(Rescue Esmerelda)
; and #R63744(Above the West Bedroom).
; .
; #UDGTABLE
; { #GUARDIAN191,6,22 | #GUARDIAN191,7,22 }
; TABLE#
 49088 DEFB 0,4,7,6,47,164,95,212,48,100,66,20,50,96,31,196
 49104 DEFB 8,130,7,44,21,80,42,164,85,68,170,132,69,0,12,192
 49120 DEFB 0,0,7,0,47,164,80,86,34,36,82,84,63,228,23,68
 49136 DEFB 8,128,7,4,21,82,42,172,85,64,170,132,69,4,25,132

; Room #b0: The Off Licence (teleport: 9)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM0(the_off_licence) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b49152 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 49160 DEFB 0,0,0,0,0,0,0,0                    ;
 49168 DEFB 0,0,0,0,0,0,0,0                    ;
 49176 DEFB 0,0,0,170,170,170,170,170          ;
 49184 DEFB 0,0,0,128,0,0,0,2                  ;
 49192 DEFB 0,0,0,128,0,0,0,2                  ;
 49200 DEFB 0,0,0,140,0,0,0,2                  ;
 49208 DEFB 0,0,0,128,0,0,0,2                  ;
 49216 DEFB 0,0,0,128,0,0,0,2                  ;
 49224 DEFB 0,0,0,128,0,0,0,2                  ;
 49232 DEFB 0,0,0,128,0,0,0,2                  ;
 49240 DEFB 0,0,0,170,0,0,2,170                ;
 49248 DEFB 0,0,0,0,0,0,0,2                    ;
 49256 DEFB 0,0,0,0,0,0,0,2                    ;
 49264 DEFB 0,0,0,0,0,0,0,2                    ;
 49272 DEFB 85,85,85,85,85,85,85,85            ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 49280 DEFM "         The Off Licence        " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES0 }
; TABLE#
 49312 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 49321 DEFB 68,255,222,108,136,18,64,4,0       ; Floor
 49330 DEFB 22,34,255,136,255,34,255,136,255   ; Wall
 49339 DEFB 5,248,136,158,189,189,158,136,248  ; Nasty
 49348 DEFB 7,3,0,12,0,48,0,192,0              ; Ramp
 49357 DEFB 67,51,255,51,0,255,0,170,0         ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 49366 DEFB 0                                  ; Direction (left)
 49367 DEFW 24371                              ; Location in the attribute
                                               ; buffer at #R24064: (9,19)
 49369 DEFB 12                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 49370 DEFB 1                                  ; Direction (up to the right)
 49371 DEFW 24535                              ; Location in the attribute
                                               ; buffer at #R24064: (14,23)
 49373 DEFB 4                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 49374 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 49375 DEFB 0,160                              ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM0 }
; TABLE#
 49377 DEFB 24,24,60,126,98,98,98,126          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 49385 DEFB 1                                  ; Room to the left (#R49408(The
                                               ; Bridge))
 49386 DEFB 0                                  ; Room to the right (The Off
                                               ; Licence)
 49387 DEFB 0                                  ; Room above (The Off Licence)
 49388 DEFB 0                                  ; Room below (The Off Licence)
; The next three bytes are copied to #R33005, but are not used.
 49389 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 49392 DEFB 10,138                             ; Guardian no. #b10 (vertical),
                                               ; base sprite 4, x=10 (#R41040)
 49394 DEFB 12,29                              ; Guardian no. #b12
                                               ; (horizontal), base sprite 0,
                                               ; initial x=29 (#R41056)
 49396 DEFB 44,39                              ; Guardian no. #b44 (vertical),
                                               ; base sprite 1, x=7 (#R41312)
 49398 DEFB 255,0                              ; Terminator (#R41976)
 49400 DEFB 0,0                                ; Nothing (#R40960#40960)
 49402 DEFB 0,0                                ; Nothing (#R40960#40960)
 49404 DEFB 0,0                                ; Nothing (#R40960#40960)
 49406 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b1: The Bridge (teleport: 19)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM1(the_bridge) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b49408 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 49416 DEFB 0,0,0,0,0,0,0,0                    ;
 49424 DEFB 0,0,0,0,0,0,0,0                    ;
 49432 DEFB 0,0,0,0,0,0,0,0                    ;
 49440 DEFB 0,0,0,0,0,0,0,0                    ;
 49448 DEFB 0,0,0,0,0,0,0,0                    ;
 49456 DEFB 0,0,0,0,0,0,0,0                    ;
 49464 DEFB 0,0,0,0,0,0,0,0                    ;
 49472 DEFB 0,0,0,0,0,0,0,0                    ;
 49480 DEFB 0,0,0,0,0,0,0,0                    ;
 49488 DEFB 0,0,0,0,0,0,0,0                    ;
 49496 DEFB 0,0,0,0,0,0,0,0                    ;
 49504 DEFB 0,0,10,0,42,0,0,0                  ;
 49512 DEFB 0,0,42,0,42,128,0,0                ;
 49520 DEFB 0,0,170,255,234,160,0,0            ;
 49528 DEFB 85,85,170,255,234,165,85,85        ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 49536 DEFM "         The Bridge             " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES1 }
; TABLE#
 49568 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 49577 DEFB 68,255,255,253,187,214,114,96,64   ; Floor
 49586 DEFB 70,34,119,34,136,34,119,34,136     ; Wall
 49595 DEFB 47,3,132,72,48,3,132,72,48         ; Nasty
 49604 DEFB 7,3,3,12,13,50,55,194,200          ; Ramp
 49613 DEFB 44,1,64,4,70,79,121,240,249        ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 49622 DEFB 1                                  ; Direction (right)
 49623 DEFW 24556                              ; Location in the attribute
                                               ; buffer at #R24064: (15,12)
 49625 DEFB 5                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 49626 DEFB 1                                  ; Direction (up to the right)
 49627 DEFW 24519                              ; Location in the attribute
                                               ; buffer at #R24064: (14,7)
 49629 DEFB 3                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 49630 DEFB 4                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 49631 DEFB 64,160                             ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM1 }
; TABLE#
 49633 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 49641 DEFB 2                                  ; Room to the left
                                               ; (#R49664(Under the MegaTree))
 49642 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 49643 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 49644 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 49645 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 49648 DEFB 20,8                               ; Guardian no. #b20
                                               ; (horizontal), base sprite 0,
                                               ; initial x=8 (#R41120)
 49650 DEFB 21,20                              ; Guardian no. #b21
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41128)
 49652 DEFB 14,140                             ; Guardian no. #b14 (vertical),
                                               ; base sprite 4, x=12 (#R41072)
 49654 DEFB 255,0                              ; Terminator (#R41976)
 49656 DEFB 0,0                                ; Nothing (#R40960#40960)
 49658 DEFB 0,0                                ; Nothing (#R40960#40960)
 49660 DEFB 0,0                                ; Nothing (#R40960#40960)
 49662 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b2: Under the MegaTree (teleport: 29)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM2(under_the_megatree) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b49664 DEFB 0,3,255,207,252,0,0,0              ; {Room layout
 49672 DEFB 170,170,175,255,63,0,0,0           ;
 49680 DEFB 0,0,63,208,92,0,0,0                ;
 49688 DEFB 0,0,0,0,0,0,0,0                    ;
 49696 DEFB 170,128,0,0,0,0,0,0                ;
 49704 DEFB 0,1,64,4,0,4,0,0                   ;
 49712 DEFB 0,0,1,0,4,0,0,0                    ;
 49720 DEFB 170,168,0,0,0,1,0,0                ;
 49728 DEFB 0,0,20,16,16,0,0,0                 ;
 49736 DEFB 0,0,0,0,0,0,0,0                    ;
 49744 DEFB 0,0,0,0,0,0,0,0                    ;
 49752 DEFB 0,0,0,0,0,0,0,0                    ;
 49760 DEFB 0,0,0,0,0,0,0,0                    ;
 49768 DEFB 0,0,0,0,0,0,0,0                    ;
 49776 DEFB 0,0,0,0,0,0,0,0                    ;
 49784 DEFB 85,85,85,85,85,85,85,85            ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 49792 DEFM "       Under the MegaTree       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES2 }
; TABLE#
 49824 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 49833 DEFB 68,215,179,117,109,92,24,8,4       ; Floor
 49842 DEFB 66,189,170,93,162,243,10,6,1       ; Wall
 49851 DEFB 70,73,106,59,58,252,30,107,232     ; Nasty
 49860 DEFB 255,0,0,0,255,0,0,0,0              ; Ramp (unused)
 49869 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 49878 DEFB 0                                  ; Direction (left)
 49879 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 49881 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 49882 DEFB 0                                  ; Direction (up to the left)
 49883 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 49885 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 49886 DEFB 6                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 49887 DEFB 128,160                            ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM2 }
; TABLE#
 49889 DEFB 129,66,36,24,60,24,60,195          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 49897 DEFB 3                                  ; Room to the left (#R49920(At
                                               ; the Foot of the MegaTree))
 49898 DEFB 1                                  ; Room to the right (#R49408(The
                                               ; Bridge))
 49899 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 49900 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 49901 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 49904 DEFB 32,16                              ; Guardian no. #b32
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41216)
 49906 DEFB 42,14                              ; Guardian no. #b42 (vertical),
                                               ; base sprite 0, x=14 (#R41296)
 49908 DEFB 26,27                              ; Guardian no. #b26
                                               ; (horizontal), base sprite 0,
                                               ; initial x=27 (#R41168)
 49910 DEFB 255,0                              ; Terminator (#R41976)
 49912 DEFB 0,0                                ; Nothing (#R40960#40960)
 49914 DEFB 0,0                                ; Nothing (#R40960#40960)
 49916 DEFB 0,0                                ; Nothing (#R40960#40960)
 49918 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b3: At the Foot of the MegaTree (teleport: 129)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM3(at_the_foot_of_the_megatree) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b49920 DEFB 48,195,8,0,8,0,0,0                 ; {Room layout
 49928 DEFB 48,195,8,0,10,170,170,170          ;
 49936 DEFB 48,195,8,0,8,0,0,0                 ;
 49944 DEFB 48,195,8,1,88,0,0,0                ;
 49952 DEFB 48,195,9,0,10,170,170,170          ;
 49960 DEFB 48,195,8,20,0,0,0,0                ;
 49968 DEFB 48,195,8,0,0,0,0,0                 ;
 49976 DEFB 48,195,9,0,26,170,170,170          ;
 49984 DEFB 48,195,8,0,8,0,0,0                 ;
 49992 DEFB 48,195,8,0,88,0,0,0                ;
 50000 DEFB 48,3,9,64,8,0,0,0                  ;
 50008 DEFB 0,0,8,0,8,0,0,0                    ;
 50016 DEFB 0,0,8,0,8,0,0,0                    ;
 50024 DEFB 0,0,0,0,80,0,0,0                   ;
 50032 DEFB 0,0,0,0,0,0,0,0                    ;
 50040 DEFB 85,85,85,85,85,85,85,85            ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 50048 DEFM "  At the Foot of the MegaTree   " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES3 }
; TABLE#
 50080 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 50089 DEFB 4,240,249,191,31,12,16,40,68       ; Floor
 50098 DEFB 22,171,171,173,170,170,174,85,85   ; Wall
 50107 DEFB 6,110,116,56,30,110,116,56,30      ; Nasty
 50116 DEFB 7,192,0,48,0,12,0,3,0              ; Ramp
 50125 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 50134 DEFB 0                                  ; Direction (left)
 50135 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 50137 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 50138 DEFB 0                                  ; Direction (up to the left)
 50139 DEFW 24463                              ; Location in the attribute
                                               ; buffer at #R24064: (12,15)
 50141 DEFB 3                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 50142 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 50143 DEFB 192,160                            ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM3 }
; TABLE#
 50145 DEFB 64,160,92,34,33,34,20,8            ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 50153 DEFB 4                                  ; Room to the left (#R50176(The
                                               ; Drive))
 50154 DEFB 2                                  ; Room to the right
                                               ; (#R49664(Under the MegaTree))
 50155 DEFB 8                                  ; Room above (#R51200(Inside the
                                               ; MegaTrunk))
 50156 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 50157 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 50160 DEFB 6,2                                ; Guardian no. #b6 (vertical),
                                               ; base sprite 0, x=2 (#R41008)
 50162 DEFB 7,5                                ; Guardian no. #b7 (vertical),
                                               ; base sprite 0, x=5 (#R41016)
 50164 DEFB 8,8                                ; Guardian no. #b8 (vertical),
                                               ; base sprite 0, x=8 (#R41024)
 50166 DEFB 53,9                               ; Guardian no. #b53
                                               ; (horizontal), base sprite 0,
                                               ; initial x=9 (#R41384)
 50168 DEFB 255,0                              ; Terminator (#R41976)
 50170 DEFB 0,0                                ; Nothing (#R40960#40960)
 50172 DEFB 0,0                                ; Nothing (#R40960#40960)
 50174 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b4: The Drive (teleport: 39)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM4(the_drive) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b50176 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 50184 DEFB 0,0,0,0,0,0,0,0                    ;
 50192 DEFB 0,0,0,0,0,0,0,0                    ;
 50200 DEFB 0,0,0,0,0,0,0,0                    ;
 50208 DEFB 0,0,0,0,0,0,0,0                    ;
 50216 DEFB 0,0,0,0,0,0,0,0                    ;
 50224 DEFB 0,0,0,0,0,0,0,0                    ;
 50232 DEFB 0,0,0,0,0,0,0,0                    ;
 50240 DEFB 84,0,0,0,0,0,0,0                   ;
 50248 DEFB 170,0,0,0,0,0,0,0                  ;
 50256 DEFB 170,128,0,0,0,0,0,0                ;
 50264 DEFB 0,160,0,0,0,0,0,0                  ;
 50272 DEFB 0,168,0,0,0,0,0,0                  ;
 50280 DEFB 0,170,0,0,0,0,0,0                  ;
 50288 DEFB 160,170,128,0,0,0,0,0              ;
 50296 DEFB 160,170,165,85,85,90,85,85         ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 50304 DEFM "            The Drive           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES4 }
; TABLE#
 50336 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 50345 DEFB 6,170,85,170,255,255,85,170,85     ; Floor
 50354 DEFB 13,112,7,119,119,0,59,11,125       ; Wall
 50363 DEFB 68,20,42,20,9,106,156,8,8          ; Nasty (unused)
 50372 DEFB 5,192,64,112,112,12,116,119,5      ; Ramp
 50381 DEFB 66,123,0,237,0,170,85,170,85       ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 50390 DEFB 1                                  ; Direction (right)
 50391 DEFW 24480                              ; Location in the attribute
                                               ; buffer at #R24064: (13,0)
 50393 DEFB 2                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 50394 DEFB 0                                  ; Direction (up to the left)
 50395 DEFW 24521                              ; Location in the attribute
                                               ; buffer at #R24064: (14,9)
 50397 DEFB 7                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 50398 DEFB 3                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 50399 DEFB 192,160                            ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM4 }
; TABLE#
 50401 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 50409 DEFB 5                                  ; Room to the left (#R50432(The
                                               ; Security Guard))
 50410 DEFB 3                                  ; Room to the right (#R49920(At
                                               ; the Foot of the MegaTree))
 50411 DEFB 6                                  ; Room above (#R50688(Entrance
                                               ; to Hades))
 50412 DEFB 45                                 ; Room below (#R60672(Under the
                                               ; Drive))
; The next three bytes are copied to #R33005, but are not used.
 50413 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 50416 DEFB 21,18                              ; Guardian no. #b21
                                               ; (horizontal), base sprite 0,
                                               ; initial x=18 (#R41128)
 50418 DEFB 22,21                              ; Guardian no. #b22
                                               ; (horizontal), base sprite 0,
                                               ; initial x=21 (#R41136)
 50420 DEFB 23,8                               ; Guardian no. #b23
                                               ; (horizontal), base sprite 0,
                                               ; initial x=8 (#R41144)
 50422 DEFB 24,20                              ; Guardian no. #b24
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41152)
 50424 DEFB 36,143                             ; Guardian no. #b36
                                               ; (horizontal), base sprite 4,
                                               ; initial x=15 (#R41248)
 50426 DEFB 255,0                              ; Terminator (#R41976)
 50428 DEFB 0,0                                ; Nothing (#R40960#40960)
 50430 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b5: The Security Guard (teleport: 139)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM5(the_security_guard) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b50432 DEFB 128,0,0,0,0,0,0,0                  ; {Room layout
 50440 DEFB 160,0,0,0,0,0,0,0                  ;
 50448 DEFB 168,0,0,0,0,0,0,0                  ;
 50456 DEFB 170,0,0,0,0,0,0,0                  ;
 50464 DEFB 170,128,0,0,0,0,0,0                ;
 50472 DEFB 170,160,0,0,0,0,0,0                ;
 50480 DEFB 168,0,0,0,0,0,0,0                  ;
 50488 DEFB 168,0,0,0,0,0,0,0                  ;
 50496 DEFB 168,21,84,16,65,84,21,85           ;
 50504 DEFB 168,42,168,32,130,168,42,170       ;
 50512 DEFB 0,0,168,32,130,168,42,170          ;
 50520 DEFB 0,0,168,32,130,168,40,0            ;
 50528 DEFB 0,0,168,32,130,168,40,0            ;
 50536 DEFB 0,0,0,0,0,0,0,0                    ;
 50544 DEFB 0,0,0,0,0,0,0,42                   ;
 50552 DEFB 160,10,170,170,170,170,170,170     ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 50560 DEFM "       The Security Guard       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES5 }
; TABLE#
 50592 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 50601 DEFB 4,255,255,170,85,170,85,170,85     ; Floor
 50610 DEFB 13,14,198,149,176,54,134,192,237   ; Wall
 50619 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 50628 DEFB 7,224,64,32,16,14,4,2,1            ; Ramp
 50637 DEFB 66,111,0,183,0,170,85,170,85       ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 50646 DEFB 1                                  ; Direction (right)
 50647 DEFW 24509                              ; Location in the attribute
                                               ; buffer at #R24064: (13,29)
 50649 DEFB 3                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 50650 DEFB 0                                  ; Direction (up to the left)
 50651 DEFW 24296                              ; Location in the attribute
                                               ; buffer at #R24064: (7,8)
 50653 DEFB 8                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 50654 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 50655 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM5 }
; TABLE#
 50657 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 50665 DEFB 19                                 ; Room to the left (#R54016(The
                                               ; Forgotten Abbey))
 50666 DEFB 4                                  ; Room to the right (#R50176(The
                                               ; Drive))
 50667 DEFB 10                                 ; Room above (#R51712(The Front
                                               ; Door))
 50668 DEFB 6                                  ; Room below (#R50688(Entrance
                                               ; to Hades))
; The next three bytes are copied to #R33005, but are not used.
 50669 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 50672 DEFB 2,142                              ; Guardian no. #b2 (vertical),
                                               ; base sprite 4, x=14 (#R40976)
 50674 DEFB 3,139                              ; Guardian no. #b3 (vertical),
                                               ; base sprite 4, x=11 (#R40984)
 50676 DEFB 3,151                              ; Guardian no. #b3 (vertical),
                                               ; base sprite 4, x=23 (#R40984)
 50678 DEFB 4,145                              ; Guardian no. #b4 (vertical),
                                               ; base sprite 4, x=17 (#R40992)
 50680 DEFB 255,0                              ; Terminator (#R41976)
 50682 DEFB 0,0                                ; Nothing (#R40960#40960)
 50684 DEFB 0,0                                ; Nothing (#R40960#40960)
 50686 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b6: Entrance to Hades (teleport: 239)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM6(entrance_to_hades) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b50688 DEFB 160,0,0,0,0,0,0,0                  ; {Room layout
 50696 DEFB 160,0,0,0,0,0,0,0                  ;
 50704 DEFB 160,0,0,21,4,85,0,0                ;
 50712 DEFB 160,0,0,16,68,67,0,0               ;
 50720 DEFB 160,0,0,16,68,84,0,0               ;
 50728 DEFB 160,0,0,16,68,64,0,0               ;
 50736 DEFB 160,0,0,21,4,85,0,0                ;
 50744 DEFB 160,0,0,12,12,48,0,0               ;
 50752 DEFB 160,0,0,0,0,0,0,0                  ;
 50760 DEFB 160,1,1,4,20,21,4,16               ;
 50768 DEFB 160,1,69,17,17,4,17,16             ;
 50776 DEFB 160,1,17,17,20,4,17,16             ;
 50784 DEFB 160,1,49,17,17,4,21,16             ;
 50792 DEFB 160,1,1,4,17,4,17,21               ;
 50800 DEFB 160,3,3,12,51,12,51,12             ;
 50808 DEFB 160,0,0,0,0,0,0,0                  ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 50816 DEFM "        Entrance to Hades       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES6 }
; TABLE#
 50848 DEFB 52,0,0,0,0,0,0,0,0                 ; Background
 50857 DEFB 163,160,20,130,80,10,65,40,5       ; Floor
 50866 DEFB 99,187,187,56,187,187,187,131,187  ; Wall
 50875 DEFB 50,191,92,88,48,40,88,72,48        ; Nasty
 50884 DEFB 7,64,64,16,16,4,4,1,1              ; Ramp (unused)
 50893 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 50902 DEFB 0                                  ; Direction (left)
 50903 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 50905 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 50906 DEFB 0                                  ; Direction (up to the left)
 50907 DEFW 24519                              ; Location in the attribute
                                               ; buffer at #R24064: (14,7)
 50909 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 50910 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 50911 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM6 }
; TABLE#
 50913 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 50921 DEFB 14                                 ; Room to the left
                                               ; (#R52736(Rescue Esmerelda))
 50922 DEFB 5                                  ; Room to the right (#R50432(The
                                               ; Security Guard))
 50923 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 50924 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 50925 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 50928 DEFB 16,130                             ; Guardian no. #b16 (vertical),
                                               ; base sprite 4, x=2 (#R41088)
 50930 DEFB 17,164                             ; Guardian no. #b17 (vertical),
                                               ; base sprite 5, x=4 (#R41096)
 50932 DEFB 18,195                             ; Guardian no. #b18 (vertical),
                                               ; base sprite 6, x=3 (#R41104)
 50934 DEFB 255,0                              ; Terminator (#R41976)
 50936 DEFB 0,0                                ; Nothing (#R40960#40960)
 50938 DEFB 0,0                                ; Nothing (#R40960#40960)
 50940 DEFB 0,0                                ; Nothing (#R40960#40960)
 50942 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b7: Cuckoo's Nest (teleport: 1239)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM7(cuckoo's_nest) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b50944 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 50952 DEFB 0,0,0,0,0,0,0,0                    ;
 50960 DEFB 0,0,0,0,0,0,0,0                    ;
 50968 DEFB 0,0,0,0,0,0,0,0                    ;
 50976 DEFB 0,0,0,0,0,0,0,0                    ;
 50984 DEFB 0,0,0,0,0,0,0,0                    ;
 50992 DEFB 0,0,0,0,0,0,0,0                    ;
 51000 DEFB 0,0,0,0,0,0,0,0                    ;
 51008 DEFB 0,0,0,0,0,0,0,0                    ;
 51016 DEFB 0,0,0,0,0,0,0,0                    ;
 51024 DEFB 0,0,0,0,240,0,0,0                  ;
 51032 DEFB 0,0,0,1,84,0,0,0                   ;
 51040 DEFB 0,0,0,5,84,0,0,0                   ;
 51048 DEFB 170,170,170,169,84,0,0,0           ;
 51056 DEFB 0,0,0,5,80,0,0,0                   ;
 51064 DEFB 0,0,0,0,0,0,0,0                    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 51072 DEFM "         Cuckoo's Nest          " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES7 }
; TABLE#
 51104 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 51113 DEFB 4,4,3,201,216,48,54,35,1           ; Floor
 51122 DEFB 22,255,96,14,240,3,60,199,56       ; Wall
 51131 DEFB 6,194,52,11,68,136,11,48,8         ; Nasty
 51140 DEFB 7,3,0,12,0,48,0,192,0              ; Ramp
 51149 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 51158 DEFB 0                                  ; Direction (left)
 51159 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 51161 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 51162 DEFB 1                                  ; Direction (up to the right)
 51163 DEFW 24461                              ; Location in the attribute
                                               ; buffer at #R24064: (12,13)
 51165 DEFB 2                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 51166 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 51167 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM7 }
; TABLE#
 51169 DEFB 32,24,169,219,126,126,60,90        ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 51177 DEFB 8                                  ; Room to the left
                                               ; (#R51200(Inside the
                                               ; MegaTrunk))
 51178 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 51179 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 51180 DEFB 2                                  ; Room below (#R49664(Under the
                                               ; MegaTree))
; The next three bytes are copied to #R33005, but are not used.
 51181 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 51184 DEFB 39,144                             ; Guardian no. #b39
                                               ; (horizontal), base sprite 4,
                                               ; initial x=16 (#R41272)
 51186 DEFB 111,5                              ; Guardian no. #b111
                                               ; (horizontal), base sprite 0,
                                               ; initial x=5 (#R41848)
 51188 DEFB 60,164                             ; Arrow flying left to right at
                                               ; pixel y-coordinate 82
                                               ; (#R41440)
 51190 DEFB 255,0                              ; Terminator (#R41976)
 51192 DEFB 0,0                                ; Nothing (#R40960#40960)
 51194 DEFB 0,0                                ; Nothing (#R40960#40960)
 51196 DEFB 0,0                                ; Nothing (#R40960#40960)
 51198 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b8: Inside the MegaTrunk (teleport: 49)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM8(inside_the_megatrunk) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b51200 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 are copied to #R32896 and specify the room name.
 51328 DEFM "      Inside the MegaTrunk      " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES8 }
; TABLE#
 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 four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 51414 DEFB 0                                  ; Direction (left)
 51415 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 51417 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 51418 DEFB 0                                  ; Direction (up to the left)
 51419 DEFW 24315                              ; Location in the attribute
                                               ; buffer at #R24064: (7,27)
 51421 DEFB 3                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 51422 DEFB 4                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 51423 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM8 }
; TABLE#
 51425 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 51433 DEFB 9                                  ; Room to the left (#R51456(On a
                                               ; Branch Over the Drive))
 51434 DEFB 7                                  ; Room to the right
                                               ; (#R50944(Cuckoo's Nest))
 51435 DEFB 12                                 ; Room above (#R52224(Tree Top))
 51436 DEFB 3                                  ; Room below (#R49920(At the
                                               ; Foot of the MegaTree))
; The next three bytes are copied to #R33005, but are not used.
 51437 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 51440 DEFB 9,2                                ; Guardian no. #b9 (vertical),
                                               ; base sprite 0, x=2 (#R41032)
 51442 DEFB 9,5                                ; Guardian no. #b9 (vertical),
                                               ; base sprite 0, x=5 (#R41032)
 51444 DEFB 9,8                                ; Guardian no. #b9 (vertical),
                                               ; base sprite 0, x=8 (#R41032)
 51446 DEFB 24,6                               ; Guardian no. #b24
                                               ; (horizontal), base sprite 0,
                                               ; initial x=6 (#R41152)
 51448 DEFB 44,44                              ; Guardian no. #b44 (vertical),
                                               ; base sprite 1, x=12 (#R41312)
 51450 DEFB 22,27                              ; Guardian no. #b22
                                               ; (horizontal), base sprite 0,
                                               ; initial x=27 (#R41136)
 51452 DEFB 47,147                             ; Guardian no. #b47
                                               ; (horizontal), base sprite 4,
                                               ; initial x=19 (#R41336)
 51454 DEFB 255,0                              ; Terminator (#R41976)

; Room #b9: On a Branch Over the Drive (teleport: 149)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM9(on_a_branch_over_the_drive) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b51456 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 51464 DEFB 0,0,0,0,0,0,0,0                    ;
 51472 DEFB 0,0,0,0,0,0,0,0                    ;
 51480 DEFB 0,0,0,0,0,0,0,0                    ;
 51488 DEFB 0,0,0,0,0,0,0,0                    ;
 51496 DEFB 0,0,60,0,0,0,0,0                   ;
 51504 DEFB 0,0,253,80,0,0,0,0                 ;
 51512 DEFB 0,0,63,192,5,85,85,85              ;
 51520 DEFB 0,0,0,0,15,191,59,192              ;
 51528 DEFB 0,0,0,0,3,240,59,0                 ;
 51536 DEFB 0,0,0,0,0,0,15,0                   ;
 51544 DEFB 0,0,0,80,0,0,0,0                   ;
 51552 DEFB 0,80,0,0,0,0,0,0                   ;
 51560 DEFB 0,0,5,0,0,0,0,0                    ;
 51568 DEFB 0,0,0,0,0,0,0,0                    ;
 51576 DEFB 0,0,0,0,0,0,0,0                    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 51584 DEFM "   On a Branch Over the Drive   " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES9 }
; TABLE#
 51616 DEFB 8,0,0,0,0,0,0,0,0                  ; Background
 51625 DEFB 10,31,243,225,96,48,44,64,128      ; Floor
 51634 DEFB 74,9,18,10,31,228,8,8,8            ; Wall
 51643 DEFB 12,66,41,84,38,135,35,42,4         ; Nasty
 51652 DEFB 15,5,2,4,8,80,32,64,128            ; Ramp
 51661 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 51670 DEFB 0                                  ; Direction (left)
 51671 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 51673 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 51674 DEFB 1                                  ; Direction (up to the right)
 51675 DEFW 24398                              ; Location in the attribute
                                               ; buffer at #R24064: (10,14)
 51677 DEFB 4                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 51678 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 51679 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM9 }
; TABLE#
 51681 DEFB 48,60,79,67,130,134,228,252        ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 51689 DEFB 10                                 ; Room to the left (#R51712(The
                                               ; Front Door))
 51690 DEFB 8                                  ; Room to the right
                                               ; (#R51200(Inside the
                                               ; MegaTrunk))
 51691 DEFB 13                                 ; Room above (#R52480(Out on a
                                               ; limb))
 51692 DEFB 4                                  ; Room below (#R50176(The
                                               ; Drive))
; The next three bytes are copied to #R33005, but are not used.
 51693 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 51696 DEFB 9,30                               ; Guardian no. #b9 (vertical),
                                               ; base sprite 0, x=30 (#R41032)
 51698 DEFB 27,135                             ; Guardian no. #b27 (vertical),
                                               ; base sprite 4, x=7 (#R41176)
 51700 DEFB 61,19                              ; Guardian no. #b61
                                               ; (horizontal), base sprite 0,
                                               ; initial x=19 (#R41448)
 51702 DEFB 62,14                              ; Guardian no. #b62 (vertical),
                                               ; base sprite 0, x=14 (#R41456)
 51704 DEFB 60,68                              ; Arrow flying left to right at
                                               ; pixel y-coordinate 34
                                               ; (#R41440)
 51706 DEFB 255,0                              ; Terminator (#R41976)
 51708 DEFB 0,0                                ; Nothing (#R40960#40960)
 51710 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b10: The Front Door (teleport: 249)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM10(the_front_door) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b51712 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 51720 DEFB 0,0,0,0,0,0,0,0                    ;
 51728 DEFB 0,0,0,0,0,0,0,0                    ;
 51736 DEFB 0,0,0,0,0,0,0,0                    ;
 51744 DEFB 0,0,0,0,0,0,0,0                    ;
 51752 DEFB 170,170,170,0,0,0,0,0              ;
 51760 DEFB 0,0,0,0,0,0,0,0                    ;
 51768 DEFB 0,0,0,0,0,0,0,0                    ;
 51776 DEFB 0,0,0,0,0,0,0,0                    ;
 51784 DEFB 0,0,0,0,0,0,0,0                    ;
 51792 DEFB 0,0,0,0,0,0,0,0                    ;
 51800 DEFB 0,0,0,0,0,0,0,0                    ;
 51808 DEFB 0,0,0,0,0,0,0,0                    ;
 51816 DEFB 0,0,0,0,0,0,0,0                    ;
 51824 DEFB 64,0,0,0,0,0,0,0                   ;
 51832 DEFB 160,0,0,0,0,0,0,0                  ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 51840 DEFM "         The Front Door         " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES10 }
; TABLE#
 51872 DEFB 40,0,0,0,0,0,0,0,0                 ; Background
 51881 DEFB 71,255,170,119,170,119,170,85,170  ; Floor
 51890 DEFB 58,32,16,14,193,48,9,198,32        ; Wall
 51899 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 51908 DEFB 47,192,64,176,80,172,84,171,85     ; Ramp
 51917 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 51926 DEFB 0                                  ; Direction (left)
 51927 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 51929 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 51930 DEFB 0                                  ; Direction (up to the left)
 51931 DEFW 24546                              ; Location in the attribute
                                               ; buffer at #R24064: (15,2)
 51933 DEFB 2                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 51934 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 51935 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM10 }
; TABLE#
 51937 DEFB 12,28,28,30,27,63,120,255          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 51945 DEFB 11                                 ; Room to the left (#R51968(The
                                               ; Hall))
 51946 DEFB 9                                  ; Room to the right (#R51456(On
                                               ; a Branch Over the Drive))
 51947 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 51948 DEFB 5                                  ; Room below (#R50432(The
                                               ; Security Guard))
; The next three bytes are copied to #R33005, but are not used.
 51949 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 51952 DEFB 255,0                              ; Terminator (#R41976)
 51954 DEFB 0,0                                ; Nothing (#R40960#40960)
 51956 DEFB 0,0                                ; Nothing (#R40960#40960)
 51958 DEFB 0,0                                ; Nothing (#R40960#40960)
 51960 DEFB 0,0                                ; Nothing (#R40960#40960)
 51962 DEFB 0,0                                ; Nothing (#R40960#40960)
 51964 DEFB 0,0                                ; Nothing (#R40960#40960)
 51966 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b11: The Hall (teleport: 1249)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM11(the_hall) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b51968 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 51976 DEFB 0,0,0,0,0,0,0,0                    ;
 51984 DEFB 0,0,0,0,0,0,0,0                    ;
 51992 DEFB 0,0,0,0,0,0,0,0                    ;
 52000 DEFB 0,0,0,0,0,0,0,0                    ;
 52008 DEFB 170,170,170,170,170,170,170,170    ;
 52016 DEFB 0,0,0,0,0,40,0,0                   ;
 52024 DEFB 0,0,0,0,0,40,0,0                   ;
 52032 DEFB 0,0,0,0,0,40,0,0                   ;
 52040 DEFB 0,0,0,0,0,40,0,0                   ;
 52048 DEFB 0,0,0,0,0,40,0,0                   ;
 52056 DEFB 0,0,0,0,0,40,0,0                   ;
 52064 DEFB 0,0,0,0,0,0,0,0                    ;
 52072 DEFB 0,0,192,192,48,0,0,0               ;
 52080 DEFB 170,170,170,170,170,170,170,170    ;
 52088 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 52096 DEFM "            The Hall            " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES11 }
; TABLE#
 52128 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 52137 DEFB 71,255,170,119,170,119,170,85,170  ; Floor (unused)
 52146 DEFB 58,32,16,14,193,48,9,198,32        ; Wall
 52155 DEFB 68,136,169,169,187,191,191,191,94  ; Nasty
 52164 DEFB 7,192,192,48,48,12,12,3,3          ; Ramp
 52173 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 52182 DEFB 0                                  ; Direction (left)
 52183 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 52185 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 52186 DEFB 0                                  ; Direction (up to the left)
 52187 DEFW 24485                              ; Location in the attribute
                                               ; buffer at #R24064: (13,5)
 52189 DEFB 6                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 52190 DEFB 4                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 52191 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM11 }
; TABLE#
 52193 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 52201 DEFB 20                                 ; Room to the left
                                               ; (#R54272(Ballroom East))
 52202 DEFB 10                                 ; Room to the right (#R51712(The
                                               ; Front Door))
 52203 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 52204 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 52205 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 52208 DEFB 89,202                             ; Guardian no. #b89 (vertical),
                                               ; base sprite 6, x=10 (#R41672)
 52210 DEFB 26,19                              ; Guardian no. #b26
                                               ; (horizontal), base sprite 0,
                                               ; initial x=19 (#R41168)
 52212 DEFB 95,19                              ; Guardian no. #b95
                                               ; (horizontal), base sprite 0,
                                               ; initial x=19 (#R41720)
 52214 DEFB 69,68                              ; Arrow flying right to left at
                                               ; pixel y-coordinate 34
                                               ; (#R41512)
 52216 DEFB 60,22                              ; Arrow flying left to right at
                                               ; pixel y-coordinate 11
                                               ; (#R41440)
 52218 DEFB 255,0                              ; Terminator (#R41976)
 52220 DEFB 89,0                               ; Guardian no. #b89 (vertical),
                                               ; base sprite 0, x=0 (#R41672)
                                               ; (unused)
 52222 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b12: Tree Top (teleport: 349)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM12(tree_top) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b52224 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 52232 DEFB 0,0,0,0,0,0,0,0                    ;
 52240 DEFB 0,0,0,0,0,0,0,0                    ;
 52248 DEFB 0,0,0,0,0,0,0,0                    ;
 52256 DEFB 0,0,0,0,0,0,0,0                    ;
 52264 DEFB 0,0,0,0,0,0,0,0                    ;
 52272 DEFB 0,0,0,0,64,0,0,0                   ;
 52280 DEFB 0,0,84,0,0,0,0,0                   ;
 52288 DEFB 0,0,0,20,0,4,0,0                   ;
 52296 DEFB 1,80,0,0,20,0,0,0                  ;
 52304 DEFB 0,0,0,0,0,0,0,0                    ;
 52312 DEFB 0,0,0,0,0,20,0,0                   ;
 52320 DEFB 85,85,84,0,8,0,0,0                 ;
 52328 DEFB 12,243,200,16,8,0,80,0             ;
 52336 DEFB 207,63,8,0,8,80,0,0                ;
 52344 DEFB 48,48,8,0,88,0,0,0                 ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 52352 DEFM "            Tree Top            " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES12 }
; TABLE#
 52384 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 52393 DEFB 4,170,85,170,88,48,16,16,8         ; Floor
 52402 DEFB 22,165,40,82,85,85,73,162,181      ; Wall
 52411 DEFB 66,137,74,18,52,24,52,82,145       ; Nasty
 52420 DEFB 7,64,0,16,0,4,0,1,0                ; Ramp
 52429 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 52438 DEFB 0                                  ; Direction (left)
 52439 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 52441 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 52442 DEFB 0                                  ; Direction (up to the left)
 52443 DEFW 24527                              ; Location in the attribute
                                               ; buffer at #R24064: (14,15)
 52445 DEFB 2                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 52446 DEFB 6                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 52447 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM12 }
; TABLE#
 52449 DEFB 30,45,55,123,109,94,184,192        ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 52457 DEFB 13                                 ; Room to the left (#R52480(Out
                                               ; on a limb))
 52458 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 52459 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 52460 DEFB 8                                  ; Room below (#R51200(Inside the
                                               ; MegaTrunk))
; The next three bytes are copied to #R33005, but are not used.
 52461 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 52464 DEFB 24,7                               ; Guardian no. #b24
                                               ; (horizontal), base sprite 0,
                                               ; initial x=7 (#R41152)
 52466 DEFB 46,136                             ; Guardian no. #b46
                                               ; (horizontal), base sprite 4,
                                               ; initial x=8 (#R41328)
 52468 DEFB 26,24                              ; Guardian no. #b26
                                               ; (horizontal), base sprite 0,
                                               ; initial x=24 (#R41168)
 52470 DEFB 69,132                             ; Arrow flying right to left at
                                               ; pixel y-coordinate 66
                                               ; (#R41512)
 52472 DEFB 255,0                              ; Terminator (#R41976)
 52474 DEFB 0,0                                ; Nothing (#R40960#40960)
 52476 DEFB 0,0                                ; Nothing (#R40960#40960)
 52478 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b13: Out on a limb (teleport: 1349)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM13(out_on_a_limb) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b52480 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 52488 DEFB 0,0,0,0,0,0,0,0                    ;
 52496 DEFB 0,0,0,0,0,0,0,0                    ;
 52504 DEFB 0,0,0,0,0,0,0,0                    ;
 52512 DEFB 0,0,0,0,0,0,0,0                    ;
 52520 DEFB 0,0,0,4,0,0,0,0                    ;
 52528 DEFB 0,16,0,0,4,1,0,0                   ;
 52536 DEFB 0,0,4,0,0,0,0,0                    ;
 52544 DEFB 0,0,0,0,0,0,16,0                   ;
 52552 DEFB 0,0,0,1,0,64,0,0                   ;
 52560 DEFB 4,0,0,4,64,0,0,0                   ;
 52568 DEFB 0,4,0,1,16,0,0,0                   ;
 52576 DEFB 0,0,1,0,74,170,170,170             ;
 52584 DEFB 1,0,0,0,0,127,255,0                ;
 52592 DEFB 0,0,64,0,64,31,252,0               ;
 52600 DEFB 0,0,0,64,0,1,80,0                  ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 52608 DEFM "        Out on a limb           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES13 }
; TABLE#
 52640 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 52649 DEFB 4,1,30,6,122,26,232,104,160        ; Floor
 52658 DEFB 66,7,255,252,56,24,16,32,0         ; Wall
 52667 DEFB 2,1,129,6,88,32,64,136,130         ; Nasty
 52676 DEFB 4,0,0,0,0,0,0,0,0                  ; Ramp (unused)
 52685 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 52694 DEFB 0                                  ; Direction (left)
 52695 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 52697 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 52698 DEFB 1                                  ; Direction (up to the right)
 52699 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 52701 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 52702 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 52703 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM13 }
; TABLE#
 52705 DEFB 96,184,190,93,90,53,42,21          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 52713 DEFB 10                                 ; Room to the left (#R51712(The
                                               ; Front Door))
 52714 DEFB 12                                 ; Room to the right
                                               ; (#R52224(Tree Top))
 52715 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 52716 DEFB 9                                  ; Room below (#R51456(On a
                                               ; Branch Over the Drive))
; The next three bytes are copied to #R33005, but are not used.
 52717 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 52720 DEFB 45,76                              ; Guardian no. #b45 (vertical),
                                               ; base sprite 2, x=12 (#R41320)
 52722 DEFB 25,19                              ; Guardian no. #b25
                                               ; (horizontal), base sprite 0,
                                               ; initial x=19 (#R41160)
 52724 DEFB 88,20                              ; Guardian no. #b88
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41664)
 52726 DEFB 255,0                              ; Terminator (#R41976)
 52728 DEFB 0,0                                ; Nothing (#R40960#40960)
 52730 DEFB 0,0                                ; Nothing (#R40960#40960)
 52732 DEFB 0,0                                ; Nothing (#R40960#40960)
 52734 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b14: Rescue Esmerelda (teleport: 2349)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM14(rescue_esmerelda) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b52736 DEFB 0,0,0,0,0,0,8,2                    ; {Room layout
 52744 DEFB 0,0,0,0,0,0,8,2                    ;
 52752 DEFB 0,0,0,0,0,0,0,2                    ;
 52760 DEFB 0,0,0,0,0,0,0,0                    ;
 52768 DEFB 0,0,0,0,0,0,170,0                  ;
 52776 DEFB 0,0,0,0,0,0,8,6                    ;
 52784 DEFB 0,0,0,0,0,0,0,18                   ;
 52792 DEFB 0,0,0,0,0,0,0,66                   ;
 52800 DEFB 0,0,0,0,0,0,1,2                    ;
 52808 DEFB 170,6,170,6,170,10,170,6           ;
 52816 DEFB 170,14,170,14,170,0,0,6            ;
 52824 DEFB 170,14,170,14,170,0,0,6            ;
 52832 DEFB 170,14,170,14,170,128,0,18         ;
 52840 DEFB 170,14,170,14,170,160,0,64         ;
 52848 DEFB 170,14,170,14,170,168,1,0          ;
 52856 DEFB 170,170,170,170,170,170,4,10       ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 52864 DEFM "        Rescue Esmerelda        " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES14 }
; TABLE#
 52896 DEFB 16,0,0,0,0,0,0,0,0                 ; Background
 52905 DEFB 23,3,3,12,12,49,50,196,200         ; Floor
 52914 DEFB 4,238,0,187,0,238,0,187,0          ; Wall
 52923 DEFB 85,209,226,196,200,209,226,196,200 ; Nasty
 52932 DEFB 23,0,0,0,0,0,0,0,0                 ; Ramp (unused)
 52941 DEFB 22,241,170,248,170,0,238,0,187     ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 52950 DEFB 1                                  ; Direction (right)
 52951 DEFW 24216                              ; Location in the attribute
                                               ; buffer at #R24064: (4,24)
 52953 DEFB 4                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 52954 DEFB 1                                  ; Direction (up to the right)
 52955 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 52957 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 52958 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 52959 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM14 }
; TABLE#
 52961 DEFB 255,73,73,73,73,73,73,255          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 52969 DEFB 15                                 ; Room to the left (#R52992(I'm
                                               ; sure I've seen this before..))
 52970 DEFB 44                                 ; Room to the right (#R60416(On
                                               ; top of the house))
 52971 DEFB 20                                 ; Room above (#R54272(Ballroom
                                               ; East))
 52972 DEFB 39                                 ; Room below (#R59136(Emergency
                                               ; Generator))
; The next three bytes are copied to #R33005, but are not used.
 52973 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 52976 DEFB 4,196                              ; Guardian no. #b4 (vertical),
                                               ; base sprite 6, x=4 (#R40992)
 52978 DEFB 2,204                              ; Guardian no. #b2 (vertical),
                                               ; base sprite 6, x=12 (#R40976)
 52980 DEFB 13,5                               ; Guardian no. #b13
                                               ; (horizontal), base sprite 0,
                                               ; initial x=5 (#R41064)
 52982 DEFB 15,152                             ; Guardian no. #b15 (vertical),
                                               ; base sprite 4, x=24 (#R41080)
 52984 DEFB 255,0                              ; Terminator (#R41976)
 52986 DEFB 0,0                                ; Nothing (#R40960#40960)
 52988 DEFB 0,0                                ; Nothing (#R40960#40960)
 52990 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b15: I'm sure I've seen this before.. (teleport: 12349)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM15(i'm_sure_i've_seen_this_before..) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b52992 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 53000 DEFB 0,0,0,0,0,0,0,0                    ;
 53008 DEFB 0,0,0,0,0,0,0,0                    ;
 53016 DEFB 0,0,0,0,0,0,0,0                    ;
 53024 DEFB 0,0,0,0,0,0,0,0                    ;
 53032 DEFB 0,0,0,0,0,0,0,0                    ;
 53040 DEFB 0,0,0,0,0,0,0,0                    ;
 53048 DEFB 0,0,0,0,0,0,0,0                    ;
 53056 DEFB 0,0,0,0,0,0,0,0                    ;
 53064 DEFB 170,66,164,42,164,42,66,170        ;
 53072 DEFB 170,194,172,42,172,42,194,170      ;
 53080 DEFB 170,194,172,42,172,42,194,170      ;
 53088 DEFB 170,194,172,42,172,42,194,170      ;
 53096 DEFB 170,194,172,42,172,42,194,170      ;
 53104 DEFB 170,194,172,42,172,42,194,170      ;
 53112 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 53120 DEFM "I'm sure I've seen this before.." ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES15 }
; TABLE#
 53152 DEFB 8,0,0,0,0,0,0,0,0                  ; Background
 53161 DEFB 12,128,64,32,80,72,84,82,85        ; Floor
 53170 DEFB 83,102,102,102,0,102,102,102,102   ; Wall
 53179 DEFB 76,81,85,84,85,21,85,69,85         ; Nasty
 53188 DEFB 12,0,0,0,0,0,0,0,0                 ; Ramp (unused)
 53197 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 53206 DEFB 0                                  ; Direction (left)
 53207 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 53209 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 53210 DEFB 0                                  ; Direction (up to the left)
 53211 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 53213 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 53214 DEFB 3                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 53215 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM15 }
; TABLE#
 53217 DEFB 24,36,24,44,94,94,231,102          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 53225 DEFB 16                                 ; Room to the left (#R53248(We
                                               ; must perform a Quirkafleeg))
 53226 DEFB 14                                 ; Room to the right
                                               ; (#R52736(Rescue Esmerelda))
 53227 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 53228 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 53229 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 53232 DEFB 4,133                              ; Guardian no. #b4 (vertical),
                                               ; base sprite 4, x=5 (#R40992)
 53234 DEFB 3,139                              ; Guardian no. #b3 (vertical),
                                               ; base sprite 4, x=11 (#R40984)
 53236 DEFB 5,147                              ; Guardian no. #b5 (vertical),
                                               ; base sprite 4, x=19 (#R41000)
 53238 DEFB 2,153                              ; Guardian no. #b2 (vertical),
                                               ; base sprite 4, x=25 (#R40976)
 53240 DEFB 13,6                               ; Guardian no. #b13
                                               ; (horizontal), base sprite 0,
                                               ; initial x=6 (#R41064)
 53242 DEFB 69,100                             ; Arrow flying right to left at
                                               ; pixel y-coordinate 50
                                               ; (#R41512)
 53244 DEFB 60,84                              ; Arrow flying left to right at
                                               ; pixel y-coordinate 42
                                               ; (#R41440)
 53246 DEFB 255,0                              ; Terminator (#R41976)

; Room #b16: We must perform a Quirkafleeg (teleport: 59)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM16(we_must_perform_a_quirkafleeg) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b53248 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 53256 DEFB 0,0,0,0,0,0,0,0                    ;
 53264 DEFB 0,0,0,0,0,0,0,0                    ;
 53272 DEFB 0,0,0,0,0,0,0,0                    ;
 53280 DEFB 0,0,0,0,0,0,0,0                    ;
 53288 DEFB 0,0,0,0,0,0,0,0                    ;
 53296 DEFB 0,0,0,0,0,0,0,0                    ;
 53304 DEFB 0,0,0,0,0,0,0,0                    ;
 53312 DEFB 0,0,0,0,0,0,0,0                    ;
 53320 DEFB 170,0,0,0,0,0,2,170                ;
 53328 DEFB 170,64,0,0,0,0,2,170               ;
 53336 DEFB 170,64,0,0,0,0,2,170               ;
 53344 DEFB 170,64,0,0,0,0,2,170               ;
 53352 DEFB 170,64,0,0,0,0,2,170               ;
 53360 DEFB 170,64,0,0,0,0,2,170               ;
 53368 DEFB 170,127,255,255,255,255,254,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 53376 DEFM "  We must perform a Quirkafleeg " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES16 }
; TABLE#
 53408 DEFB 6,0,0,0,0,0,0,0,0                  ; Background
 53417 DEFB 56,51,187,221,204,85,153,221,238   ; Floor
 53426 DEFB 13,39,246,0,220,209,4,119,128      ; Wall
 53435 DEFB 69,64,228,78,68,68,68,238,255      ; Nasty
 53444 DEFB 7,128,64,32,48,168,100,34,17       ; Ramp
 53453 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 53462 DEFB 0                                  ; Direction (left)
 53463 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 53465 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 53466 DEFB 0                                  ; Direction (up to the left)
 53467 DEFW 24356                              ; Location in the attribute
                                               ; buffer at #R24064: (9,4)
 53469 DEFB 1                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 53470 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 53471 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM16 }
; TABLE#
 53473 DEFB 24,36,24,44,94,94,231,102          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 53481 DEFB 17                                 ; Room to the left (#R53504(Up
                                               ; on the Battlements))
 53482 DEFB 15                                 ; Room to the right (#R52992(I'm
                                               ; sure I've seen this before..))
 53483 DEFB 50                                 ; Room above (#R61952(Watch
                                               ; Tower))
 53484 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 53485 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 53488 DEFB 13,8                               ; Guardian no. #b13
                                               ; (horizontal), base sprite 0,
                                               ; initial x=8 (#R41064)
 53490 DEFB 1,16                               ; Rope at x=16 (#R40968)
 53492 DEFB 60,132                             ; Arrow flying left to right at
                                               ; pixel y-coordinate 66
                                               ; (#R41440)
 53494 DEFB 255,0                              ; Terminator (#R41976)
 53496 DEFB 0,0                                ; Nothing (#R40960#40960)
 53498 DEFB 0,0                                ; Nothing (#R40960#40960)
 53500 DEFB 0,0                                ; Nothing (#R40960#40960)
 53502 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b17: Up on the Battlements (teleport: 159)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM17(up_on_the_battlements) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b53504 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 53512 DEFB 0,0,0,0,0,0,0,0                    ;
 53520 DEFB 0,0,0,0,0,0,0,0                    ;
 53528 DEFB 0,0,0,0,0,0,0,0                    ;
 53536 DEFB 0,0,0,0,0,0,0,0                    ;
 53544 DEFB 0,0,0,0,0,0,0,0                    ;
 53552 DEFB 0,0,0,0,0,0,0,0                    ;
 53560 DEFB 0,0,0,0,0,0,0,0                    ;
 53568 DEFB 0,0,0,0,0,0,0,0                    ;
 53576 DEFB 170,66,164,42,164,42,66,170        ;
 53584 DEFB 170,194,172,42,172,42,194,170      ;
 53592 DEFB 170,194,172,42,172,42,194,170      ;
 53600 DEFB 170,194,172,42,172,42,194,170      ;
 53608 DEFB 170,194,172,42,172,42,194,170      ;
 53616 DEFB 170,194,172,42,172,42,194,170      ;
 53624 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 53632 DEFM "      Up on the Battlements     " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES17 }
; TABLE#
 53664 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 53673 DEFB 4,128,192,224,176,144,148,214,119  ; Floor
 53682 DEFB 14,0,127,127,99,107,99,127,127     ; Wall
 53691 DEFB 32,74,42,26,72,108,106,41,136      ; Nasty
 53700 DEFB 4,0,0,0,0,0,0,0,0                  ; Ramp (unused)
 53709 DEFB 66,40,170,10,0,85,85,85,255        ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 53718 DEFB 0                                  ; Direction (left)
 53719 DEFW 24365                              ; Location in the attribute
                                               ; buffer at #R24064: (9,13)
 53721 DEFB 5                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 53722 DEFB 0                                  ; Direction (up to the left)
 53723 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 53725 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 53726 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 53727 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM17 }
; TABLE#
 53729 DEFB 24,36,24,44,94,94,231,102          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 53737 DEFB 18                                 ; Room to the left (#R53760(On
                                               ; the Roof))
 53738 DEFB 16                                 ; Room to the right (#R53248(We
                                               ; must perform a Quirkafleeg))
 53739 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 53740 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 53741 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 53744 DEFB 2,133                              ; Guardian no. #b2 (vertical),
                                               ; base sprite 4, x=5 (#R40976)
 53746 DEFB 3,139                              ; Guardian no. #b3 (vertical),
                                               ; base sprite 4, x=11 (#R40984)
 53748 DEFB 4,147                              ; Guardian no. #b4 (vertical),
                                               ; base sprite 4, x=19 (#R40992)
 53750 DEFB 5,153                              ; Guardian no. #b5 (vertical),
                                               ; base sprite 4, x=25 (#R41000)
 53752 DEFB 69,132                             ; Arrow flying right to left at
                                               ; pixel y-coordinate 66
                                               ; (#R41512)
 53754 DEFB 255,0                              ; Terminator (#R41976)
 53756 DEFB 0,0                                ; Nothing (#R40960#40960)
 53758 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b18: On the Roof (teleport: 259)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM18(on_the_roof) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b53760 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 53768 DEFB 0,0,0,0,0,0,0,0                    ;
 53776 DEFB 0,0,0,0,0,0,0,0                    ;
 53784 DEFB 0,0,0,0,0,0,0,0                    ;
 53792 DEFB 0,0,0,0,0,0,0,0                    ;
 53800 DEFB 0,0,0,0,0,0,0,0                    ;
 53808 DEFB 0,0,0,0,0,0,0,0                    ;
 53816 DEFB 0,0,0,0,0,0,10,64                  ;
 53824 DEFB 0,0,0,0,0,0,10,208                 ;
 53832 DEFB 170,64,0,0,0,0,10,170              ;
 53840 DEFB 170,192,0,0,0,0,10,170             ;
 53848 DEFB 170,192,0,0,0,0,10,170             ;
 53856 DEFB 170,144,0,0,0,0,10,170             ;
 53864 DEFB 170,176,0,0,0,0,10,170             ;
 53872 DEFB 170,176,10,64,0,0,10,170           ;
 53880 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 53888 DEFM "          On the Roof           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES18 }
; TABLE#
 53920 DEFB 68,0,0,0,0,0,0,0,0                 ; Background
 53929 DEFB 7,128,192,224,208,88,156,222,205   ; Floor
 53938 DEFB 38,17,248,7,8,240,15,208,63        ; Wall
 53947 DEFB 70,85,153,221,204,85,153,221,204   ; Nasty
 53956 DEFB 7,0,0,0,0,0,0,0,0                  ; Ramp (unused)
 53965 DEFB 10,240,240,240,255,255,0,0,255     ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 53974 DEFB 1                                  ; Direction (right)
 53975 DEFW 24558                              ; Location in the attribute
                                               ; buffer at #R24064: (15,14)
 53977 DEFB 8                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 53978 DEFB 0                                  ; Direction (up to the left)
 53979 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 53981 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 53982 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 53983 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM18 }
; TABLE#
 53985 DEFB 1,2,5,10,84,40,48,72               ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 53993 DEFB 48                                 ; Room to the left
                                               ; (#R61440(Nomen Luni))
 53994 DEFB 17                                 ; Room to the right (#R53504(Up
                                               ; on the Battlements))
 53995 DEFB 18                                 ; Room above (On the Roof)
 53996 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 53997 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 54000 DEFB 34,22                              ; Guardian no. #b34
                                               ; (horizontal), base sprite 0,
                                               ; initial x=22 (#R41232)
 54002 DEFB 1,16                               ; Rope at x=16 (#R40968)
 54004 DEFB 255,0                              ; Terminator (#R41976)
 54006 DEFB 0,0                                ; Nothing (#R40960#40960)
 54008 DEFB 0,0                                ; Nothing (#R40960#40960)
 54010 DEFB 0,0                                ; Nothing (#R40960#40960)
 54012 DEFB 0,0                                ; Nothing (#R40960#40960)
 54014 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b19: The Forgotten Abbey (teleport: 1259)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM19(the_forgotten_abbey) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b54016 DEFB 170,170,170,170,170,170,170,170    ; {Room layout
 54024 DEFB 170,170,170,170,170,170,170,170    ;
 54032 DEFB 160,0,48,0,192,0,192,10            ;
 54040 DEFB 160,0,0,0,0,0,0,10                 ;
 54048 DEFB 160,0,0,0,0,0,0,10                 ;
 54056 DEFB 168,0,0,0,0,0,0,10                 ;
 54064 DEFB 160,0,0,0,0,0,0,10                 ;
 54072 DEFB 160,0,0,0,0,0,0,10                 ;
 54080 DEFB 160,0,0,0,48,0,0,10                ;
 54088 DEFB 160,0,0,0,0,0,0,26                 ;
 54096 DEFB 165,0,0,0,0,0,0,10                 ;
 54104 DEFB 80,5,85,85,85,85,85,90             ;
 54112 DEFB 80,0,0,0,0,0,0,10                  ;
 54120 DEFB 168,0,0,0,0,0,0,0                  ;
 54128 DEFB 170,0,0,0,0,0,0,0                  ;
 54136 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 54144 DEFM "      The Forgotten Abbey       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES19 }
; TABLE#
 54176 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 54185 DEFB 4,255,255,242,36,64,2,0,136        ; Floor
 54194 DEFB 29,68,170,17,68,17,170,68,17       ; Wall
 54203 DEFB 66,24,60,126,153,153,126,66,60     ; Nasty
 54212 DEFB 7,128,64,224,48,168,212,34,137     ; Ramp
 54221 DEFB 15,112,85,0,187,170,170,170,170    ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 54230 DEFB 0                                  ; Direction (left)
 54231 DEFW 24292                              ; Location in the attribute
                                               ; buffer at #R24064: (7,4)
 54233 DEFB 26                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 54234 DEFB 0                                  ; Direction (up to the left)
 54235 DEFW 24516                              ; Location in the attribute
                                               ; buffer at #R24064: (14,4)
 54237 DEFB 2                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 54238 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 54239 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM19 }
; TABLE#
 54241 DEFB 24,36,219,219,36,24,24,24          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 54249 DEFB 49                                 ; Room to the left (#R61696(The
                                               ; Wine Cellar))
 54250 DEFB 5                                  ; Room to the right (#R50432(The
                                               ; Security Guard))
 54251 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 54252 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 54253 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 54256 DEFB 74,8                               ; Guardian no. #b74
                                               ; (horizontal), base sprite 0,
                                               ; initial x=8 (#R41552)
 54258 DEFB 75,16                              ; Guardian no. #b75
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41560)
 54260 DEFB 76,11                              ; Guardian no. #b76
                                               ; (horizontal), base sprite 0,
                                               ; initial x=11 (#R41568)
 54262 DEFB 77,24                              ; Guardian no. #b77
                                               ; (horizontal), base sprite 0,
                                               ; initial x=24 (#R41576)
 54264 DEFB 78,7                               ; Guardian no. #b78
                                               ; (horizontal), base sprite 0,
                                               ; initial x=7 (#R41584)
 54266 DEFB 79,12                              ; Guardian no. #b79
                                               ; (horizontal), base sprite 0,
                                               ; initial x=12 (#R41592)
 54268 DEFB 80,18                              ; Guardian no. #b80
                                               ; (horizontal), base sprite 0,
                                               ; initial x=18 (#R41600)
 54270 DEFB 81,24                              ; Guardian no. #b81
                                               ; (horizontal), base sprite 0,
                                               ; initial x=24 (#R41608)

; Room #b20: Ballroom East (teleport: 359)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM20(ballroom_east) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b54272 DEFB 160,64,10,0,0,0,0,0                ; {Room layout
 54280 DEFB 160,64,10,0,0,0,0,0                ;
 54288 DEFB 160,64,10,0,0,0,0,0                ;
 54296 DEFB 0,64,0,0,0,0,0,0                   ;
 54304 DEFB 0,64,0,0,0,0,0,0                   ;
 54312 DEFB 85,85,90,10,170,170,170,170        ;
 54320 DEFB 0,0,16,0,0,0,0,0                   ;
 54328 DEFB 0,0,16,0,0,0,0,0                   ;
 54336 DEFB 0,0,21,85,85,85,85,85              ;
 54344 DEFB 0,0,16,0,0,0,0,0                   ;
 54352 DEFB 0,0,16,0,0,0,0,0                   ;
 54360 DEFB 0,0,16,0,0,0,0,0                   ;
 54368 DEFB 0,0,16,0,0,0,0,0                   ;
 54376 DEFB 0,0,16,0,0,0,0,0                   ;
 54384 DEFB 170,170,170,170,170,170,170,170    ;
 54392 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 54400 DEFM "         Ballroom East          " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES20 }
; TABLE#
 54432 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 54441 DEFB 6,170,85,34,68,34,68,34,68         ; Floor
 54450 DEFB 15,68,68,255,17,17,255,85,170      ; Wall
 54459 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 54468 DEFB 255,0,0,0,0,0,0,0,0                ; Ramp (unused)
 54477 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 54486 DEFB 0                                  ; Direction (left)
 54487 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 54489 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 54490 DEFB 0                                  ; Direction (up to the left)
 54491 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 54493 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 54494 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 54495 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM20 }
; TABLE#
 54497 DEFB 129,129,66,36,24,24,24,231         ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 54505 DEFB 21                                 ; Room to the left
                                               ; (#R54528(Ballroom West))
 54506 DEFB 11                                 ; Room to the right (#R51968(The
                                               ; Hall))
 54507 DEFB 26                                 ; Room above (#R55808(East Wall
                                               ; Base))
 54508 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 54509 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 54512 DEFB 19,108                             ; Guardian no. #b19 (vertical),
                                               ; base sprite 3, x=12 (#R41112)
 54514 DEFB 42,5                               ; Guardian no. #b42 (vertical),
                                               ; base sprite 0, x=5 (#R41296)
 54516 DEFB 40,7                               ; Guardian no. #b40 (vertical),
                                               ; base sprite 0, x=7 (#R41280)
 54518 DEFB 41,43                              ; Guardian no. #b41 (vertical),
                                               ; base sprite 1, x=11 (#R41288)
 54520 DEFB 21,24                              ; Guardian no. #b21
                                               ; (horizontal), base sprite 0,
                                               ; initial x=24 (#R41128)
 54522 DEFB 255,0                              ; Terminator (#R41976)
 54524 DEFB 0,0                                ; Nothing (#R40960#40960)
 54526 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b21: Ballroom West (teleport: 1359)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM21(ballroom_west) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b54528 DEFB 0,0,0,0,0,0,0,10                   ; {Room layout
 54536 DEFB 0,0,0,0,0,0,0,10                   ;
 54544 DEFB 0,0,0,0,0,0,0,10                   ;
 54552 DEFB 0,0,0,0,0,0,0,0                    ;
 54560 DEFB 0,0,0,0,0,0,0,0                    ;
 54568 DEFB 85,85,85,85,85,85,85,85            ;
 54576 DEFB 0,0,160,0,0,0,0,0                  ;
 54584 DEFB 0,0,160,0,0,0,0,0                  ;
 54592 DEFB 0,0,160,0,0,0,85,85                ;
 54600 DEFB 0,0,160,0,0,0,0,0                  ;
 54608 DEFB 0,0,160,0,0,0,0,0                  ;
 54616 DEFB 0,0,160,0,0,0,0,0                  ;
 54624 DEFB 0,0,0,0,0,0,0,0                    ;
 54632 DEFB 0,0,0,0,0,0,0,0                    ;
 54640 DEFB 85,85,85,85,85,85,85,85            ;
 54648 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 54656 DEFM "         Ballroom West          " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES21 }
; TABLE#
 54688 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 54697 DEFB 50,170,168,173,175,32,170,85,85    ; Floor
 54706 DEFB 35,17,34,136,17,68,136,34,68       ; Wall
 54715 DEFB 66,40,84,170,84,168,84,20,46       ; Nasty (unused)
 54724 DEFB 7,192,192,48,176,12,12,3,11        ; Ramp
 54733 DEFB 70,255,255,255,170,85,24,24,24     ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 54742 DEFB 1                                  ; Direction (right)
 54743 DEFW 24496                              ; Location in the attribute
                                               ; buffer at #R24064: (13,16)
 54745 DEFB 12                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 54746 DEFB 0                                  ; Direction (up to the left)
 54747 DEFW 24483                              ; Location in the attribute
                                               ; buffer at #R24064: (13,3)
 54749 DEFB 4                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 54750 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 54751 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM21 }
; TABLE#
 54753 DEFB 4,4,174,174,162,66,66,238          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 54761 DEFB 22                                 ; Room to the left (#R54784(To
                                               ; the Kitchens#SPACE(4)Main
                                               ; Stairway))
 54762 DEFB 20                                 ; Room to the right
                                               ; (#R54272(Ballroom East))
 54763 DEFB 27                                 ; Room above (#R56064(The
                                               ; Chapel))
 54764 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 54765 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 54768 DEFB 33,24                              ; Guardian no. #b33
                                               ; (horizontal), base sprite 0,
                                               ; initial x=24 (#R41224)
 54770 DEFB 40,14                              ; Guardian no. #b40 (vertical),
                                               ; base sprite 0, x=14 (#R41280)
 54772 DEFB 42,6                               ; Guardian no. #b42 (vertical),
                                               ; base sprite 0, x=6 (#R41296)
 54774 DEFB 255,0                              ; Terminator (#R41976)
 54776 DEFB 0,0                                ; Nothing (#R40960#40960)
 54778 DEFB 0,0                                ; Nothing (#R40960#40960)
 54780 DEFB 0,0                                ; Nothing (#R40960#40960)
 54782 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b22: To the Kitchens#SPACE(4)Main Stairway (teleport: 2359)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM22(to_the_kitchens____main_stairway) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b54784 DEFB 0,0,128,0,0,0,0,0                  ; {Room layout
 54792 DEFB 0,0,128,0,0,0,0,0                  ;
 54800 DEFB 0,0,128,0,0,0,0,0                  ;
 54808 DEFB 0,0,0,0,0,0,3,0                    ;
 54816 DEFB 0,0,0,0,0,0,0,0                    ;
 54824 DEFB 0,1,149,85,85,80,0,85              ;
 54832 DEFB 0,0,128,0,0,0,0,0                  ;
 54840 DEFB 0,0,128,0,0,0,0,0                  ;
 54848 DEFB 165,85,133,0,0,0,0,0               ;
 54856 DEFB 160,0,128,0,0,0,85,64              ;
 54864 DEFB 160,0,128,0,1,64,0,0               ;
 54872 DEFB 0,0,0,0,0,0,0,0                    ;
 54880 DEFB 0,0,0,0,0,0,0,0                    ;
 54888 DEFB 0,0,0,0,0,0,0,0                    ;
 54896 DEFB 170,170,170,170,170,170,170,170    ;
 54904 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 54912 DEFM "To the Kitchens    Main Stairway" ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES22 }
; TABLE#
 54944 DEFB 8,0,0,0,0,0,0,0,0                  ; Background
 54953 DEFB 13,255,255,0,255,0,0,0,0           ; Floor
 54962 DEFB 58,0,21,191,21,0,81,251,81         ; Wall
 54971 DEFB 77,24,90,189,25,126,153,36,36      ; Nasty
 54980 DEFB 15,192,128,48,32,12,8,3,2          ; Ramp
 54989 DEFB 107,240,170,120,255,170,85,170,85  ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 54998 DEFB 0                                  ; Direction (left)
 54999 DEFW 24334                              ; Location in the attribute
                                               ; buffer at #R24064: (8,14)
 55001 DEFB 2                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 55002 DEFB 0                                  ; Direction (up to the left)
 55003 DEFW 24447                              ; Location in the attribute
                                               ; buffer at #R24064: (11,31)
 55005 DEFB 12                                 ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 55006 DEFB 4                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 55007 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM22 }
; TABLE#
 55009 DEFB 64,160,240,248,252,122,37,2        ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 55017 DEFB 23                                 ; Room to the left (#R55040(The
                                               ; Kitchen))
 55018 DEFB 21                                 ; Room to the right
                                               ; (#R54528(Ballroom West))
 55019 DEFB 28                                 ; Room above (#R56320(First
                                               ; Landing))
 55020 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 55021 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 55024 DEFB 90,4                               ; Guardian no. #b90
                                               ; (horizontal), base sprite 0,
                                               ; initial x=4 (#R41680)
 55026 DEFB 91,16                              ; Guardian no. #b91
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41688)
 55028 DEFB 92,150                             ; Guardian no. #b92
                                               ; (horizontal), base sprite 4,
                                               ; initial x=22 (#R41696)
 55030 DEFB 93,4                               ; Guardian no. #b93
                                               ; (horizontal), base sprite 0,
                                               ; initial x=4 (#R41704)
 55032 DEFB 94,150                             ; Guardian no. #b94
                                               ; (horizontal), base sprite 4,
                                               ; initial x=22 (#R41712)
 55034 DEFB 95,11                              ; Guardian no. #b95
                                               ; (horizontal), base sprite 0,
                                               ; initial x=11 (#R41720)
 55036 DEFB 255,0                              ; Terminator (#R41976)
 55038 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b23: The Kitchen (teleport: 12359)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM23(the_kitchen) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b55040 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 55048 DEFB 0,0,0,0,0,0,0,0                    ;
 55056 DEFB 0,0,0,0,0,0,0,0                    ;
 55064 DEFB 0,0,0,0,0,0,0,0                    ;
 55072 DEFB 0,0,0,0,0,0,0,0                    ;
 55080 DEFB 84,21,65,80,0,0,0,0                ;
 55088 DEFB 0,0,0,0,0,0,0,0                    ;
 55096 DEFB 0,0,0,0,4,0,0,0                    ;
 55104 DEFB 84,21,64,0,0,0,0,42                ;
 55112 DEFB 0,0,1,80,0,0,0,170                 ;
 55120 DEFB 0,0,0,0,0,0,2,170                  ;
 55128 DEFB 0,0,0,0,0,0,0,0                    ;
 55136 DEFB 84,21,65,80,0,0,0,0                ;
 55144 DEFB 0,0,0,0,21,0,0,0                   ;
 55152 DEFB 0,0,0,0,0,2,170,170                ;
 55160 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 55168 DEFM "          The Kitchen           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES23 }
; TABLE#
 55200 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 55209 DEFB 4,254,1,125,133,129,129,129,1      ; Floor
 55218 DEFB 77,66,165,90,36,36,90,165,66       ; Wall
 55227 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 55236 DEFB 71,3,0,12,0,48,0,192,0             ; Ramp
 55245 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 55254 DEFB 0                                  ; Direction (left)
 55255 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 55257 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 55258 DEFB 1                                  ; Direction (up to the right)
 55259 DEFW 24534                              ; Location in the attribute
                                               ; buffer at #R24064: (14,22)
 55261 DEFB 7                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 55262 DEFB 4                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 55263 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM23 }
; TABLE#
 55265 DEFB 32,64,160,24,22,9,8,4              ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 55273 DEFB 24                                 ; Room to the left (#R55296(West
                                               ; of Kitchen))
 55274 DEFB 22                                 ; Room to the right (#R54784(To
                                               ; the Kitchens#SPACE(4)Main
                                               ; Stairway))
 55275 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 55276 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 55277 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 55280 DEFB 48,3                               ; Guardian no. #b48 (vertical),
                                               ; base sprite 0, x=3 (#R41344)
 55282 DEFB 49,9                               ; Guardian no. #b49 (vertical),
                                               ; base sprite 0, x=9 (#R41352)
 55284 DEFB 50,15                              ; Guardian no. #b50 (vertical),
                                               ; base sprite 0, x=15 (#R41360)
 55286 DEFB 48,20                              ; Guardian no. #b48 (vertical),
                                               ; base sprite 0, x=20 (#R41344)
 55288 DEFB 255,0                              ; Terminator (#R41976)
 55290 DEFB 0,0                                ; Nothing (#R40960#40960)
 55292 DEFB 0,0                                ; Nothing (#R40960#40960)
 55294 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b24: West of Kitchen (teleport: 459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM24(west_of_kitchen) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b55296 DEFB 0,0,1,0,0,0,0,0                    ; {Room layout
 55304 DEFB 0,0,1,0,0,0,0,0                    ;
 55312 DEFB 0,0,1,0,0,0,0,0                    ;
 55320 DEFB 0,0,1,0,0,0,0,0                    ;
 55328 DEFB 0,0,1,0,0,0,0,0                    ;
 55336 DEFB 0,0,1,0,16,5,84,21                 ;
 55344 DEFB 0,0,0,0,0,0,0,0                    ;
 55352 DEFB 0,0,0,0,0,0,0,0                    ;
 55360 DEFB 160,0,0,0,0,4,0,21                 ;
 55368 DEFB 168,0,0,0,21,0,80,0                ;
 55376 DEFB 170,0,0,80,0,0,0,0                 ;
 55384 DEFB 170,128,0,0,0,0,0,0                ;
 55392 DEFB 170,160,0,0,21,5,84,21             ;
 55400 DEFB 170,168,0,0,0,0,0,0                ;
 55408 DEFB 170,170,0,0,0,0,0,0                ;
 55416 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 55424 DEFM "    West of Kitchen             " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room. Note that because of a
; #BUG(corruptedConveyors)(bug) in the game engine, the conveyor tile is not
; drawn correctly (see the room image above).
; .
; #UDGTABLE
; { #TILES24 }
; TABLE#
 55456 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 55465 DEFB 5,255,189,165,165,165,66,0,0       ; Floor
 55474 DEFB 34,9,66,144,36,9,66,144,36         ; Wall
 55483 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 55492 DEFB 71,192,64,176,80,172,84,171,85     ; Ramp
 55501 DEFB 66,240,85,170,85,85,170,42,8       ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 55510 DEFB 0                                  ; Direction (left)
 55511 DEFW 24470                              ; Location in the attribute
                                               ; buffer at #R24064: (12,22)
 55513 DEFB 5                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 55514 DEFB 0                                  ; Direction (up to the left)
 55515 DEFW 24520                              ; Location in the attribute
                                               ; buffer at #R24064: (14,8)
 55517 DEFB 7                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 55518 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 55519 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM24 }
; TABLE#
 55521 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 55529 DEFB 25                                 ; Room to the left (#R55552(Cold
                                               ; Store))
 55530 DEFB 23                                 ; Room to the right (#R55040(The
                                               ; Kitchen))
 55531 DEFB 30                                 ; Room above (#R56832(The Banyan
                                               ; Tree))
 55532 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 55533 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 55536 DEFB 49,9                               ; Guardian no. #b49 (vertical),
                                               ; base sprite 0, x=9 (#R41352)
 55538 DEFB 50,14                              ; Guardian no. #b50 (vertical),
                                               ; base sprite 0, x=14 (#R41360)
 55540 DEFB 49,20                              ; Guardian no. #b49 (vertical),
                                               ; base sprite 0, x=20 (#R41352)
 55542 DEFB 48,27                              ; Guardian no. #b48 (vertical),
                                               ; base sprite 0, x=27 (#R41344)
 55544 DEFB 255,0                              ; Terminator (#R41976)
 55546 DEFB 0,0                                ; Nothing (#R40960#40960)
 55548 DEFB 0,0                                ; Nothing (#R40960#40960)
 55550 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b25: Cold Store (teleport: 1459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM25(cold_store) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b55552 DEFB 0,3,0,0,0,0,0,0                    ; {Room layout
 55560 DEFB 0,0,0,48,0,0,192,0                 ;
 55568 DEFB 84,0,0,0,0,0,0,0                   ;
 55576 DEFB 0,0,0,0,0,192,3,0                  ;
 55584 DEFB 0,0,0,0,0,0,0,0                    ;
 55592 DEFB 85,85,0,0,0,0,0,0                  ;
 55600 DEFB 0,0,0,0,0,0,0,0                    ;
 55608 DEFB 0,0,0,0,0,0,0,0                    ;
 55616 DEFB 85,80,0,0,0,0,10,170               ;
 55624 DEFB 0,0,0,0,0,0,10,170                 ;
 55632 DEFB 0,0,0,0,0,0,10,170                 ;
 55640 DEFB 85,80,0,0,0,0,10,170               ;
 55648 DEFB 0,0,48,0,0,20,10,170               ;
 55656 DEFB 0,0,0,0,0,0,10,170                 ;
 55664 DEFB 0,0,0,0,0,0,10,170                 ;
 55672 DEFB 85,85,85,85,85,85,90,170           ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 55680 DEFM "           Cold Store           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES25 }
; TABLE#
 55712 DEFB 14,0,0,0,0,0,0,0,0                 ; Background
 55721 DEFB 13,255,255,85,170,85,170,0,0       ; Floor
 55730 DEFB 34,146,82,74,73,41,37,164,146      ; Wall
 55739 DEFB 79,32,34,20,216,27,40,68,4         ; Nasty
 55748 DEFB 255,0,0,0,0,0,0,0,0                ; Ramp (unused)
 55757 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 55766 DEFB 0                                  ; Direction (left)
 55767 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 55769 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 55770 DEFB 0                                  ; Direction (up to the left)
 55771 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 55773 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 55774 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 55775 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM25 }
; TABLE#
 55777 DEFB 112,140,114,250,239,173,37,33      ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 55785 DEFB 52                                 ; Room to the left (#R62464(Back
                                               ; Stairway))
 55786 DEFB 24                                 ; Room to the right
                                               ; (#R55296(West of Kitchen))
 55787 DEFB 31                                 ; Room above (#R57088(Swimming
                                               ; Pool))
 55788 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 55789 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 55792 DEFB 54,16                              ; Guardian no. #b54
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41392)
 55794 DEFB 55,4                               ; Guardian no. #b55
                                               ; (horizontal), base sprite 0,
                                               ; initial x=4 (#R41400)
 55796 DEFB 56,3                               ; Guardian no. #b56
                                               ; (horizontal), base sprite 0,
                                               ; initial x=3 (#R41408)
 55798 DEFB 57,8                               ; Guardian no. #b57
                                               ; (horizontal), base sprite 0,
                                               ; initial x=8 (#R41416)
 55800 DEFB 1,16                               ; Rope at x=16 (#R40968)
 55802 DEFB 255,0                              ; Terminator (#R41976)
 55804 DEFB 0,0                                ; Nothing (#R40960#40960)
 55806 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b26: East Wall Base (teleport: 2459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM26(east_wall_base) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b55808 DEFB 160,0,10,0,0,0,0,0                 ; {Room layout
 55816 DEFB 160,0,10,0,0,0,0,0                 ;
 55824 DEFB 160,0,10,0,0,0,0,0                 ;
 55832 DEFB 160,0,10,0,0,0,0,0                 ;
 55840 DEFB 160,0,26,0,0,0,0,0                 ;
 55848 DEFB 160,4,10,0,0,0,0,0                 ;
 55856 DEFB 160,0,10,0,0,0,0,0                 ;
 55864 DEFB 164,0,10,0,0,0,0,0                 ;
 55872 DEFB 160,4,0,0,0,0,0,0                  ;
 55880 DEFB 160,0,0,0,0,0,0,0                  ;
 55888 DEFB 160,0,26,0,0,0,0,0                 ;
 55896 DEFB 160,16,10,0,0,0,0,0                ;
 55904 DEFB 160,0,10,0,0,0,0,0                 ;
 55912 DEFB 160,4,10,0,0,0,0,0                 ;
 55920 DEFB 160,0,26,0,0,0,0,0                 ;
 55928 DEFB 160,64,10,0,0,0,0,0                ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 55936 DEFM "         East Wall Base         " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES26 }
; TABLE#
 55968 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 55977 DEFB 5,91,164,164,85,10,0,0,0           ; Floor
 55986 DEFB 38,89,37,38,217,41,214,84,150      ; Wall
 55995 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 56004 DEFB 255,0,0,0,0,0,0,0,0                ; Ramp (unused)
 56013 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 56022 DEFB 0                                  ; Direction (left)
 56023 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 56025 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 56026 DEFB 0                                  ; Direction (up to the left)
 56027 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 56029 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 56030 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 56031 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM26 }
; TABLE#
 56033 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 56041 DEFB 27                                 ; Room to the left (#R56064(The
                                               ; Chapel))
 56042 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 56043 DEFB 32                                 ; Room above (#R57344(Halfway up
                                               ; the East Wall))
 56044 DEFB 20                                 ; Room below (#R54272(Ballroom
                                               ; East))
; The next three bytes are copied to #R33005, but are not used.
 56045 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 56048 DEFB 96,3                               ; Guardian no. #b96 (vertical),
                                               ; base sprite 0, x=3 (#R41728)
 56050 DEFB 45,39                              ; Guardian no. #b45 (vertical),
                                               ; base sprite 1, x=7 (#R41320)
 56052 DEFB 255,0                              ; Terminator (#R41976)
 56054 DEFB 0,0                                ; Nothing (#R40960#40960)
 56056 DEFB 0,0                                ; Nothing (#R40960#40960)
 56058 DEFB 0,0                                ; Nothing (#R40960#40960)
 56060 DEFB 0,0                                ; Nothing (#R40960#40960)
 56062 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b27: The Chapel (teleport: 12459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM27(the_chapel) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b56064 DEFB 0,0,0,0,0,0,0,10                   ; {Room layout
 56072 DEFB 0,0,0,0,0,0,0,10                   ;
 56080 DEFB 0,0,0,0,0,0,0,10                   ;
 56088 DEFB 0,0,0,0,0,0,0,10                   ;
 56096 DEFB 0,0,0,0,0,0,0,10                   ;
 56104 DEFB 0,0,0,0,0,0,0,10                   ;
 56112 DEFB 0,0,0,0,0,0,0,10                   ;
 56120 DEFB 0,0,0,0,0,0,128,26                 ;
 56128 DEFB 0,0,0,0,0,2,128,26                 ;
 56136 DEFB 0,0,0,0,0,10,128,26                ;
 56144 DEFB 0,0,0,0,0,42,128,26                ;
 56152 DEFB 0,0,0,0,0,170,128,26               ;
 56160 DEFB 0,0,0,0,0,0,0,26                   ;
 56168 DEFB 0,0,0,0,0,0,0,26                   ;
 56176 DEFB 170,170,170,170,170,170,160,170    ;
 56184 DEFB 170,170,170,170,170,170,160,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 56192 DEFM "           The Chapel           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES27 }
; TABLE#
 56224 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 56233 DEFB 13,73,73,73,73,73,73,73,73         ; Floor
 56242 DEFB 22,168,37,0,37,168,64,221,64       ; Wall
 56251 DEFB 66,40,84,170,85,170,40,40,40       ; Nasty (unused)
 56260 DEFB 7,3,0,12,0,48,0,192,0              ; Ramp
 56269 DEFB 7,0,10,189,255,0,170,85,170        ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 56278 DEFB 0                                  ; Direction (left)
 56279 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 56281 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 56282 DEFB 1                                  ; Direction (up to the right)
 56283 DEFW 24497                              ; Location in the attribute
                                               ; buffer at #R24064: (13,17)
 56285 DEFB 7                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 56286 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 56287 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM27 }
; TABLE#
 56289 DEFB 16,48,56,108,198,198,108,16        ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 56297 DEFB 28                                 ; Room to the left
                                               ; (#R56320(First Landing))
 56298 DEFB 26                                 ; Room to the right
                                               ; (#R55808(East Wall Base))
 56299 DEFB 33                                 ; Room above (#R57600(The
                                               ; Bathroom))
 56300 DEFB 21                                 ; Room below (#R54528(Ballroom
                                               ; West))
; The next three bytes are copied to #R33005, but are not used.
 56301 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 56304 DEFB 16,153                             ; Guardian no. #b16 (vertical),
                                               ; base sprite 4, x=25 (#R41088)
 56306 DEFB 17,187                             ; Guardian no. #b17 (vertical),
                                               ; base sprite 5, x=27 (#R41096)
 56308 DEFB 18,218                             ; Guardian no. #b18 (vertical),
                                               ; base sprite 6, x=26 (#R41104)
 56310 DEFB 103,12                             ; Guardian no. #b103
                                               ; (horizontal), base sprite 0,
                                               ; initial x=12 (#R41784)
 56312 DEFB 100,6                              ; Guardian no. #b100 (vertical),
                                               ; base sprite 0, x=6 (#R41760)
 56314 DEFB 102,145                            ; Guardian no. #b102 (vertical),
                                               ; base sprite 4, x=17 (#R41776)
 56316 DEFB 255,0                              ; Terminator (#R41976)
 56318 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b28: First Landing (teleport: 3459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM28(first_landing) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b56320 DEFB 160,0,0,0,0,0,160,0                 ; {Room layout
 56328 DEFB 160,0,0,0,0,0,160,0                 ;
 56336 DEFB 160,0,0,0,0,0,160,0                 ;
 56344 DEFB 160,0,0,0,0,0,160,48                ;
 56352 DEFB 160,0,0,0,0,0,160,252               ;
 56360 DEFB 160,0,0,0,0,0,160,48                ;
 56368 DEFB 160,0,0,0,0,0,160,48                ;
 56376 DEFB 160,0,0,0,0,0,160,48                ;
 56384 DEFB 160,0,0,0,0,0,160,0                 ;
 56392 DEFB 160,0,0,0,0,0,160,0                 ;
 56400 DEFB 160,0,0,0,0,0,160,0                 ;
 56408 DEFB 160,0,0,0,0,0,160,0                 ;
 56416 DEFB 160,0,0,0,0,0,0,0                   ;
 56424 DEFB 0,0,0,0,0,0,0,0                     ;
 56432 DEFB 0,0,0,0,0,0,153,153                 ;
 56440 DEFB 85,85,85,85,85,80,170,170           ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 56448 DEFM "        First Landing           "  ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES28 }
; TABLE#
 56480 DEFB 0,0,0,0,0,0,0,0,0                   ; Background
 56489 DEFB 4,255,170,85,128,93,148,93,128      ; Floor
 56498 DEFB 14,34,85,0,85,136,85,0,34           ; Wall
 56507 DEFB 214,126,129,165,153,153,165,129,126 ; Nasty
 56516 DEFB 7,3,3,12,12,48,48,192,192           ; Ramp
 56525 DEFB 255,0,0,0,0,0,0,0,0                 ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 56534 DEFB 0                                   ; Direction (left)
 56535 DEFW 0                                   ; Location in the attribute
                                                ; buffer at #R24064 (unused)
 56537 DEFB 0                                   ; Length: 0 (there is no
                                                ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 56538 DEFB 1                                   ; Direction (up to the right)
 56539 DEFW 24521                               ; Location in the attribute
                                                ; buffer at #R24064: (14,9)
 56541 DEFB 15                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 56542 DEFB 3                                   ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 56543 DEFB 0,0                                 ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM28 }
; TABLE#
 56545 DEFB 0,0,0,0,0,0,0,0                     ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 56553 DEFB 29                                  ; Room to the left (#R56576(The
                                                ; Nightmare Room))
 56554 DEFB 27                                  ; Room to the right
                                                ; (#R56064(The Chapel))
 56555 DEFB 34                                  ; Room above (#R57856(Top
                                                ; Landing))
 56556 DEFB 22                                  ; Room below (#R54784(To the
                                                ; Kitchens#SPACE(4)Main
                                                ; Stairway))
; The next three bytes are copied to #R33005, but are not used.
 56557 DEFB 0,0,0                               ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 56560 DEFB 67,25                               ; Guardian no. #b67
                                                ; (horizontal), base sprite 0,
                                                ; initial x=25 (#R41496)
 56562 DEFB 255,0                               ; Terminator (#R41976)
 56564 DEFB 0,0                                 ; Nothing (#R40960#40960)
 56566 DEFB 0,0                                 ; Nothing (#R40960#40960)
 56568 DEFB 0,0                                 ; Nothing (#R40960#40960)
 56570 DEFB 0,0                                 ; Nothing (#R40960#40960)
 56572 DEFB 0,0                                 ; Nothing (#R40960#40960)
 56574 DEFB 0,0                                 ; Nothing (#R40960#40960)

; Room #b29: The Nightmare Room (teleport: 13459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM29(the_nightmare_room) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b56576 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 are copied to #R32896 and specify the room name.
 56704 DEFM "       The Nightmare Room       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room. Note that because of a
; #BUG(corruptedConveyors)(bug) in the game engine, the conveyor tile is not
; drawn correctly (see the room image above).
; .
; #UDGTABLE
; { #TILES29 }
; TABLE#
 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
@bfix=DEFB 2,165,255,90,255,255,170,85,170
 56781 DEFB 165,255,90,255,255,170,85,170,85   ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 56790 DEFB 0                                  ; Direction (left)
 56791 DEFW 24315                              ; Location in the attribute
                                               ; buffer at #R24064: (7,27)
 56793 DEFB 1                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 56794 DEFB 0                                  ; Direction (up to the left)
 56795 DEFW 24521                              ; Location in the attribute
                                               ; buffer at #R24064: (14,9)
 56797 DEFB 3                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 56798 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 56799 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM29 }
; TABLE#
 56801 DEFB 172,174,1,173,173,2,172,88         ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 56809 DEFB 30                                 ; Room to the left (#R56832(The
                                               ; Banyan Tree))
 56810 DEFB 28                                 ; Room to the right
                                               ; (#R56320(First Landing))
 56811 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 56812 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 56813 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 56816 DEFB 70,136                             ; Guardian no. #b70 (vertical),
                                               ; base sprite 4, x=8 (#R41520)
 56818 DEFB 71,203                             ; Guardian no. #b71 (vertical),
                                               ; base sprite 6, x=11 (#R41528)
 56820 DEFB 72,78                              ; Guardian no. #b72 (vertical),
                                               ; base sprite 2, x=14 (#R41536)
 56822 DEFB 73,209                             ; Guardian no. #b73 (vertical),
                                               ; base sprite 6, x=17 (#R41544)
 56824 DEFB 70,148                             ; Guardian no. #b70 (vertical),
                                               ; base sprite 4, x=20 (#R41520)
 56826 DEFB 71,151                             ; Guardian no. #b71 (vertical),
                                               ; base sprite 4, x=23 (#R41528)
 56828 DEFB 72,156                             ; Guardian no. #b72 (vertical),
                                               ; base sprite 4, x=28 (#R41536)
 56830 DEFB 255,0                              ; Terminator (#R41976)

; Room #b30: The Banyan Tree (teleport: 23459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM30(the_banyan_tree) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b56832 DEFB 0,0,0,160,0,0,0,0                  ; {Room layout
 56840 DEFB 0,0,0,160,0,0,0,0                  ;
 56848 DEFB 0,0,0,144,0,0,0,0                  ;
 56856 DEFB 0,0,0,148,0,0,0,0                  ;
 56864 DEFB 0,0,0,149,80,0,0,0                 ;
@bfix=DEFB 0,0,0,129,4,0,0,0
 56872 DEFB 0,0,0,129,8,0,0,0                  ;
 56880 DEFB 0,0,0,1,4,0,0,0                    ;
 56888 DEFB 0,0,0,0,4,0,0,0                    ;
 56896 DEFB 0,0,0,128,0,0,0,0                  ;
 56904 DEFB 0,0,0,130,0,0,0,0                  ;
 56912 DEFB 0,8,32,130,8,0,0,0                 ;
 56920 DEFB 0,8,32,130,8,0,0,0                 ;
 56928 DEFB 170,170,170,170,170,170,90,170     ;
 56936 DEFB 170,170,0,0,0,0,90,170             ;
 56944 DEFB 170,170,0,0,0,0,90,170             ;
 56952 DEFB 170,170,85,85,85,85,90,170         ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 56960 DEFM "       The Banyan Tree          " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES30 }
; TABLE#
 56992 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 57001 DEFB 72,0,162,0,0,0,70,0,147            ; Floor
 57010 DEFB 22,74,41,37,73,146,164,37,148      ; Wall
 57019 DEFB 14,165,90,165,90,165,90,165,90     ; Nasty (unused)
 57028 DEFB 7,3,0,12,0,48,0,192,0              ; Ramp
 57037 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 57046 DEFB 0                                  ; Direction (left)
 57047 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 57049 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 57050 DEFB 1                                  ; Direction (up to the right)
 57051 DEFW 24420                              ; Location in the attribute
                                               ; buffer at #R24064: (11,4)
 57053 DEFB 8                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 57054 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 57055 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM30 }
; TABLE#
 57057 DEFB 5,56,69,130,130,130,68,56          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 57065 DEFB 31                                 ; Room to the left
                                               ; (#R57088(Swimming Pool))
 57066 DEFB 29                                 ; Room to the right (#R56576(The
                                               ; Nightmare Room))
 57067 DEFB 36                                 ; Room above (#R58368(A bit of
                                               ; tree))
 57068 DEFB 24                                 ; Room below (#R55296(West of
                                               ; Kitchen))
; The next three bytes are copied to #R33005, but are not used.
 57069 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 57072 DEFB 100,138                            ; Guardian no. #b100 (vertical),
                                               ; base sprite 4, x=10 (#R41760)
 57074 DEFB 101,141                            ; Guardian no. #b101 (vertical),
                                               ; base sprite 4, x=13 (#R41768)
 57076 DEFB 102,16                             ; Guardian no. #b102 (vertical),
                                               ; base sprite 0, x=16 (#R41776)
 57078 DEFB 88,22                              ; Guardian no. #b88
                                               ; (horizontal), base sprite 0,
                                               ; initial x=22 (#R41664)
 57080 DEFB 255,0                              ; Terminator (#R41976)
 57082 DEFB 0,0                                ; Nothing (#R40960#40960)
 57084 DEFB 0,0                                ; Nothing (#R40960#40960)
 57086 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b31: Swimming Pool (teleport: 123459)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM31(swimming_pool) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b57088 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 57096 DEFB 0,0,0,0,0,0,0,0                    ;
 57104 DEFB 0,0,0,0,0,0,0,0                    ;
 57112 DEFB 0,0,0,0,0,0,0,0                    ;
 57120 DEFB 0,0,0,0,0,0,0,0                    ;
 57128 DEFB 0,0,0,0,0,0,0,0                    ;
 57136 DEFB 0,0,0,0,0,0,0,0                    ;
 57144 DEFB 0,0,0,0,0,0,0,0                    ;
 57152 DEFB 0,0,0,0,0,0,0,0                    ;
 57160 DEFB 0,0,0,0,0,0,0,0                    ;
 57168 DEFB 0,0,0,0,0,0,0,0                    ;
 57176 DEFB 0,0,0,0,0,0,0,0                    ;
 57184 DEFB 170,85,85,85,85,85,84,170          ;
 57192 DEFB 170,85,85,85,85,85,82,170          ;
 57200 DEFB 170,85,85,85,85,85,74,170          ;
 57208 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 57216 DEFM "          Swimming Pool         " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES31 }
; TABLE#
@bfix=DEFB 5,0,0,0,0,0,0,0,0
 57248 DEFB 7,0,0,0,0,0,0,0,0                  ; Background
 57257 DEFB 41,0,0,0,0,0,0,0,0                 ; Floor
 57266 DEFB 58,68,68,187,68,68,68,187,68       ; Wall
 57275 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 57284 DEFB 47,3,3,15,15,63,63,255,255         ; Ramp
 57293 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 57302 DEFB 0                                  ; Direction (left)
 57303 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 57305 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 57306 DEFB 1                                  ; Direction (up to the right)
 57307 DEFW 24537                              ; Location in the attribute
                                               ; buffer at #R24064: (14,25)
 57309 DEFB 3                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 57310 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 57311 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM31 }
; TABLE#
 57313 DEFB 112,32,32,80,80,136,136,136        ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 57321 DEFB 54                                 ; Room to the left
                                               ; (#R62976(West#SPACE(2)Wing))
 57322 DEFB 30                                 ; Room to the right (#R56832(The
                                               ; Banyan Tree))
 57323 DEFB 37                                 ; Room above (#R58624(Orangery))
 57324 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 57325 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 57328 DEFB 78,12                              ; Guardian no. #b78
                                               ; (horizontal), base sprite 0,
                                               ; initial x=12 (#R41584)
 57330 DEFB 1,16                               ; Rope at x=16 (#R40968)
 57332 DEFB 255,0                              ; Terminator (#R41976)
 57334 DEFB 0,0                                ; Nothing (#R40960#40960)
 57336 DEFB 0,0                                ; Nothing (#R40960#40960)
 57338 DEFB 0,0                                ; Nothing (#R40960#40960)
 57340 DEFB 0,0                                ; Nothing (#R40960#40960)
 57342 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b32: Halfway up the East Wall (teleport: 69)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM32(halfway_up_the_east_wall) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b57344 DEFB 160,0,10,0,0,0,0,0                 ; {Room layout
 57352 DEFB 160,0,10,0,0,0,0,0                 ;
 57360 DEFB 160,0,10,0,0,0,0,0                 ;
 57368 DEFB 160,8,0,0,0,0,0,0                  ;
 57376 DEFB 128,10,0,0,0,0,0,0                 ;
 57384 DEFB 128,26,128,0,0,0,0,0               ;
 57392 DEFB 160,0,32,0,0,0,0,0                 ;
 57400 DEFB 160,0,40,0,0,0,0,0                 ;
 57408 DEFB 160,74,170,0,0,0,0,0               ;
 57416 DEFB 160,10,170,0,0,0,0,0               ;
 57424 DEFB 160,16,10,0,0,0,0,0                ;
 57432 DEFB 164,0,10,0,0,0,0,0                 ;
 57440 DEFB 160,0,10,0,0,0,0,0                 ;
 57448 DEFB 160,4,10,0,0,0,0,0                 ;
 57456 DEFB 160,0,10,0,0,0,0,0                 ;
 57464 DEFB 160,0,26,0,0,0,0,0                 ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 57472 DEFM "Halfway up the East Wall        " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES32 }
; TABLE#
 57504 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 57513 DEFB 5,255,255,90,153,189,90,60,90      ; Floor
 57522 DEFB 15,51,17,68,204,51,17,68,204       ; Wall
 57531 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 57540 DEFB 7,128,192,224,112,184,28,78,199    ; Ramp
 57549 DEFB 7,0,0,0,0,0,0,0,0                  ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 57558 DEFB 1                                  ; Direction (right)
 57559 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 57561 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 57562 DEFB 0                                  ; Direction (up to the left)
 57563 DEFW 24299                              ; Location in the attribute
                                               ; buffer at #R24064: (7,11)
 57565 DEFB 6                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 57566 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 57567 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM32 }
; TABLE#
 57569 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 57577 DEFB 33                                 ; Room to the left (#R57600(The
                                               ; Bathroom))
 57578 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 57579 DEFB 38                                 ; Room above (#R58880(Priests'
                                               ; Hole))
 57580 DEFB 26                                 ; Room below (#R55808(East Wall
                                               ; Base))
; The next three bytes are copied to #R33005, but are not used.
 57581 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 57584 DEFB 38,4                               ; Guardian no. #b38
                                               ; (horizontal), base sprite 0,
                                               ; initial x=4 (#R41264)
 57586 DEFB 255,0                              ; Terminator (#R41976)
 57588 DEFB 0,0                                ; Nothing (#R40960#40960)
 57590 DEFB 0,0                                ; Nothing (#R40960#40960)
 57592 DEFB 0,0                                ; Nothing (#R40960#40960)
 57594 DEFB 0,0                                ; Nothing (#R40960#40960)
 57596 DEFB 0,0                                ; Nothing (#R40960#40960)
 57598 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b33: The Bathroom (teleport: 169)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM33(the_bathroom) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b57600 DEFB 160,0,0,0,0,0,0,10                 ; {Room layout
 57608 DEFB 160,0,0,0,0,0,0,10                 ;
 57616 DEFB 160,0,0,0,0,0,0,10                 ;
 57624 DEFB 0,0,0,0,0,0,0,10                   ;
 57632 DEFB 0,0,0,0,0,0,0,10                   ;
 57640 DEFB 85,85,85,80,37,85,85,90            ;
 57648 DEFB 128,0,0,0,32,0,0,10                ;
 57656 DEFB 128,0,0,0,32,0,0,10                ;
 57664 DEFB 128,0,0,0,32,0,0,10                ;
 57672 DEFB 128,0,0,0,32,0,0,10                ;
 57680 DEFB 128,0,0,0,32,0,0,10                ;
 57688 DEFB 128,0,0,0,32,0,0,10                ;
 57696 DEFB 128,0,0,0,32,0,0,10                ;
 57704 DEFB 0,5,64,0,0,0,0,10                  ;
 57712 DEFB 0,0,0,0,0,0,0,10                   ;
 57720 DEFB 85,85,85,85,85,85,85,90            ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 57728 DEFM "          The Bathroom          " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES33 }
; TABLE#
 57760 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 57769 DEFB 22,0,64,9,100,146,45,150,255       ; Floor
 57778 DEFB 14,31,170,0,85,248,85,0,170        ; Wall
 57787 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 57796 DEFB 7,3,0,12,0,48,0,192,0              ; Ramp
 57805 DEFB 61,165,0,0,0,0,0,0,255             ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 57814 DEFB 0                                  ; Direction (left)
 57815 DEFW 24532                              ; Location in the attribute
                                               ; buffer at #R24064: (14,20)
 57817 DEFB 4                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 57818 DEFB 1                                  ; Direction (up to the right)
 57819 DEFW 24457                              ; Location in the attribute
                                               ; buffer at #R24064: (12,9)
 57821 DEFB 8                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 57822 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 57823 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM33 }
; TABLE#
 57825 DEFB 31,4,10,119,135,177,170,10         ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 57833 DEFB 34                                 ; Room to the left (#R57856(Top
                                               ; Landing))
 57834 DEFB 32                                 ; Room to the right
                                               ; (#R57344(Halfway up the East
                                               ; Wall))
 57835 DEFB 39                                 ; Room above (#R59136(Emergency
                                               ; Generator))
 57836 DEFB 27                                 ; Room below (#R56064(The
                                               ; Chapel))
; The next three bytes are copied to #R33005, but are not used.
 57837 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 57840 DEFB 59,16                              ; Guardian no. #b59
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41432)
 57842 DEFB 255,0                              ; Terminator (#R41976)
 57844 DEFB 0,0                                ; Nothing (#R40960#40960)
 57846 DEFB 0,0                                ; Nothing (#R40960#40960)
 57848 DEFB 0,0                                ; Nothing (#R40960#40960)
 57850 DEFB 0,0                                ; Nothing (#R40960#40960)
 57852 DEFB 0,0                                ; Nothing (#R40960#40960)
 57854 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b34: Top Landing (teleport: 269)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM34(top_landing) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b57856 DEFB 170,170,170,170,170,170,170,170    ; {Room layout
 57864 DEFB 170,170,170,170,170,170,170,170    ;
 57872 DEFB 160,0,0,0,0,0,0,10                 ;
 57880 DEFB 160,0,0,0,0,0,0,0                  ;
 57888 DEFB 165,80,85,5,85,85,0,0              ;
 57896 DEFB 160,0,0,0,0,0,170,170              ;
 57904 DEFB 160,0,0,0,0,0,0,10                 ;
 57912 DEFB 160,0,0,0,0,0,0,10                 ;
 57920 DEFB 165,80,85,5,85,0,0,10              ;
 57928 DEFB 160,0,0,0,0,0,0,10                 ;
 57936 DEFB 160,0,0,0,0,0,0,10                 ;
 57944 DEFB 160,0,0,0,0,0,0,10                 ;
 57952 DEFB 165,80,85,5,64,0,0,10              ;
 57960 DEFB 0,0,0,0,0,0,0,0                    ;
 57968 DEFB 0,0,0,0,0,0,0,0                    ;
 57976 DEFB 85,85,85,85,85,5,85,85             ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 57984 DEFM "          Top Landing           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES34 }
; TABLE#
 58016 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 58025 DEFB 6,255,170,85,255,0,0,0,0           ; Floor
 58034 DEFB 26,105,144,144,105,150,105,105,150 ; Wall
 58043 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 58052 DEFB 7,7,2,60,8,112,32,192,128          ; Ramp
 58061 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 58070 DEFB 0                                  ; Direction (left)
 58071 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 58073 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 58074 DEFB 1                                  ; Direction (up to the right)
 58075 DEFW 24433                              ; Location in the attribute
                                               ; buffer at #R24064: (11,17)
 58077 DEFB 7                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 58078 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 58079 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM34 }
; TABLE#
 58081 DEFB 24,36,164,202,149,10,21,10         ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 58089 DEFB 35                                 ; Room to the left
                                               ; (#R58112(Master Bedroom))
 58090 DEFB 33                                 ; Room to the right (#R57600(The
                                               ; Bathroom))
 58091 DEFB 40                                 ; Room above (#R59392(Dr Jones
                                               ; will never believe this))
 58092 DEFB 28                                 ; Room below (#R56320(First
                                               ; Landing))
; The next three bytes are copied to #R33005, but are not used.
 58093 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 58096 DEFB 58,134                             ; Guardian no. #b58 (vertical),
                                               ; base sprite 4, x=6 (#R41424)
 58098 DEFB 19,108                             ; Guardian no. #b19 (vertical),
                                               ; base sprite 3, x=12 (#R41112)
 58100 DEFB 36,16                              ; Guardian no. #b36
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41248)
 58102 DEFB 255,0                              ; Terminator (#R41976)
 58104 DEFB 0,0                                ; Nothing (#R40960#40960)
 58106 DEFB 0,0                                ; Nothing (#R40960#40960)
 58108 DEFB 0,0                                ; Nothing (#R40960#40960)
 58110 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b35: Master Bedroom (teleport: 1269)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM35(master_bedroom) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b58112 DEFB 170,170,170,170,170,170,170,170    ; {Room layout
 58120 DEFB 160,0,0,10,0,0,0,0                 ;
 58128 DEFB 160,0,0,10,0,0,0,0                 ;
 58136 DEFB 160,0,0,10,0,0,0,0                 ;
 58144 DEFB 160,0,0,10,0,0,0,0                 ;
 58152 DEFB 160,0,0,10,0,0,0,0                 ;
 58160 DEFB 160,0,0,10,0,0,0,0                 ;
 58168 DEFB 160,0,0,10,0,0,0,0                 ;
 58176 DEFB 160,0,0,10,0,0,0,0                 ;
 58184 DEFB 160,0,0,10,0,0,0,0                 ;
 58192 DEFB 160,0,0,10,0,0,0,0                 ;
 58200 DEFB 172,0,0,0,0,0,0,0                  ;
 58208 DEFB 160,0,0,0,0,0,0,0                  ;
 58216 DEFB 149,85,85,85,64,0,0,0              ;
 58224 DEFB 170,170,170,170,160,0,0,0          ;
 58232 DEFB 170,170,170,170,169,85,85,85       ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 58240 DEFM "         Master Bedroom         " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES35 }
; TABLE#
 58272 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 58281 DEFB 6,255,107,181,0,173,0,74,0         ; Floor
 58290 DEFB 51,0,81,251,81,0,170,191,170       ; Wall
 58299 DEFB 71,0,0,0,0,124,254,127,62          ; Nasty
 58308 DEFB 7,192,64,176,0,172,0,83,0          ; Ramp
 58317 DEFB 41,85,85,85,85,81,95,64,170        ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
@bfix=DEFB 254
 58326 DEFB 1                                  ; Direction (right)
 58327 DEFW 24450                              ; Location in the attribute
                                               ; buffer at #R24064: (12,2)
 58329 DEFB 4                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 58330 DEFB 0                                  ; Direction (up to the left)
 58331 DEFW 24530                              ; Location in the attribute
                                               ; buffer at #R24064: (14,18)
 58333 DEFB 2                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 58334 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 58335 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM35 }
; TABLE#
 58337 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 58345 DEFB 36                                 ; Room to the left (#R58368(A
                                               ; bit of tree))
 58346 DEFB 34                                 ; Room to the right (#R57856(Top
                                               ; Landing))
 58347 DEFB 41                                 ; Room above (#R59648(The
                                               ; Attic))
 58348 DEFB 29                                 ; Room below (#R56576(The
                                               ; Nightmare Room))
; The next three bytes are copied to #R33005, but are not used.
 58349 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 58352 DEFB 255,0                              ; Terminator (#R41976)
 58354 DEFB 0,0                                ; Nothing (#R40960#40960)
 58356 DEFB 0,0                                ; Nothing (#R40960#40960)
 58358 DEFB 0,0                                ; Nothing (#R40960#40960)
 58360 DEFB 0,0                                ; Nothing (#R40960#40960)
 58362 DEFB 0,0                                ; Nothing (#R40960#40960)
 58364 DEFB 0,0                                ; Nothing (#R40960#40960)
 58366 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b36: A bit of tree (teleport: 369)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM36(a_bit_of_tree) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b58368 DEFB 0,0,0,160,0,0,0,3                  ; {Room layout
 58376 DEFB 0,0,0,160,0,0,0,3                  ;
 58384 DEFB 0,0,0,160,0,0,0,3                  ;
 58392 DEFB 0,0,0,160,0,0,0,3                  ;
 58400 DEFB 0,0,16,160,0,64,0,3                ;
 58408 DEFB 0,0,0,160,0,0,0,3                  ;
 58416 DEFB 0,20,0,160,0,1,64,3                ;
 58424 DEFB 0,0,16,160,0,0,0,3                 ;
 58432 DEFB 0,0,0,160,0,0,0,3                  ;
 58440 DEFB 0,0,20,160,0,0,64,3                ;
 58448 DEFB 85,80,0,165,64,0,0,3               ;
 58456 DEFB 0,0,0,160,0,0,1,3                  ;
 58464 DEFB 0,0,0,160,0,0,64,3                 ;
 58472 DEFB 0,0,0,160,5,0,0,3                  ;
 58480 DEFB 0,0,0,160,0,0,0,3                  ;
 58488 DEFB 0,0,1,164,0,0,0,3                  ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 58496 DEFM "    A bit of tree               " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room. Note that because of a
; #BUG(corruptedNasties)(bug) in the game engine, the nasty tile is not drawn
; correctly (see the room image above).
; .
; #UDGTABLE
; { #TILES36 }
; TABLE#
 58528 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 58537 DEFB 4,173,82,41,0,1,2,0,0              ; Floor
 58546 DEFB 30,214,107,102,219,105,107,217,109 ; Wall
 58555 DEFB 2,21,0,170,85,170,0,21,10          ; Nasty
 58564 DEFB 68,3,8,36,16,64,32,128,128         ; Ramp
 58573 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 58582 DEFB 0                                  ; Direction (left)
 58583 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 58585 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 58586 DEFB 1                                  ; Direction (up to the right)
 58587 DEFW 24372                              ; Location in the attribute
                                               ; buffer at #R24064: (9,20)
 58589 DEFB 2                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 58590 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 58591 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM36 }
; TABLE#
 58593 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 58601 DEFB 37                                 ; Room to the left
                                               ; (#R58624(Orangery))
 58602 DEFB 35                                 ; Room to the right
                                               ; (#R58112(Master Bedroom))
 58603 DEFB 42                                 ; Room above (#R59904(Under the
                                               ; Roof))
 58604 DEFB 30                                 ; Room below (#R56832(The Banyan
                                               ; Tree))
; The next three bytes are copied to #R33005, but are not used.
 58605 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 58608 DEFB 104,2                              ; Guardian no. #b104
                                               ; (horizontal), base sprite 0,
                                               ; initial x=2 (#R41792)
 58610 DEFB 101,7                              ; Guardian no. #b101 (vertical),
                                               ; base sprite 0, x=7 (#R41768)
 58612 DEFB 69,146                             ; Arrow flying right to left at
                                               ; pixel y-coordinate 73
                                               ; (#R41512)
 58614 DEFB 255,0                              ; Terminator (#R41976)
 58616 DEFB 0,0                                ; Nothing (#R40960#40960)
 58618 DEFB 0,0                                ; Nothing (#R40960#40960)
 58620 DEFB 0,0                                ; Nothing (#R40960#40960)
 58622 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b37: Orangery (teleport: 1369)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM37(orangery) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b58624 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 58632 DEFB 0,0,0,0,0,0,0,0                    ;
 58640 DEFB 0,0,0,0,0,1,0,0                    ;
 58648 DEFB 0,0,0,0,0,0,0,0                    ;
 58656 DEFB 0,0,0,0,0,0,0,0                    ;
 58664 DEFB 0,0,0,0,64,0,16,0                  ;
 58672 DEFB 0,0,0,0,0,4,0,64                   ;
 58680 DEFB 0,0,0,0,0,0,0,0                    ;
 58688 DEFB 160,0,0,4,0,0,0,0                  ;
 58696 DEFB 0,0,0,0,1,0,0,0                    ;
 58704 DEFB 0,32,0,64,0,0,5,0                  ;
 58712 DEFB 0,37,0,0,64,0,0,85                 ;
 58720 DEFB 0,32,0,0,0,0,16,0                  ;
 58728 DEFB 0,32,1,0,0,0,0,0                   ;
 58736 DEFB 0,32,0,0,0,64,0,0                  ;
 58744 DEFB 170,170,0,1,64,0,0,0               ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 58752 DEFM "            Orangery            " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES37 }
; TABLE#
 58784 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 58793 DEFB 4,165,74,36,2,4,0,2,0              ; Floor
 58802 DEFB 22,21,85,85,36,37,85,73,34         ; Wall
 58811 DEFB 6,130,65,62,106,183,25,37,68       ; Nasty (unused)
 58820 DEFB 5,1,2,4,0,16,32,64,128             ; Ramp
 58829 DEFB 38,198,170,168,42,89,36,0,0        ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 58838 DEFB 0                                  ; Direction (left)
 58839 DEFW 24412                              ; Location in the attribute
                                               ; buffer at #R24064: (10,28)
 58841 DEFB 4                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 58842 DEFB 1                                  ; Direction (up to the right)
 58843 DEFW 24480                              ; Location in the attribute
                                               ; buffer at #R24064: (13,0)
 58845 DEFB 14                                 ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 58846 DEFB 6                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 58847 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM37 }
; TABLE#
 58849 DEFB 2,20,46,85,42,69,42,20             ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 58857 DEFB 56                                 ; Room to the left (#R63488(West
                                               ; Wing Roof))
 58858 DEFB 36                                 ; Room to the right (#R58368(A
                                               ; bit of tree))
 58859 DEFB 43                                 ; Room above
                                               ; (#R60160(Conservatory Roof))
 58860 DEFB 31                                 ; Room below (#R57088(Swimming
                                               ; Pool))
; The next three bytes are copied to #R33005, but are not used.
 58861 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 58864 DEFB 97,148                             ; Guardian no. #b97 (vertical),
                                               ; base sprite 4, x=20 (#R41736)
 58866 DEFB 27,137                             ; Guardian no. #b27 (vertical),
                                               ; base sprite 4, x=9 (#R41176)
 58868 DEFB 60,132                             ; Arrow flying left to right at
                                               ; pixel y-coordinate 66
                                               ; (#R41440)
 58870 DEFB 255,0                              ; Terminator (#R41976)
 58872 DEFB 0,0                                ; Nothing (#R40960#40960)
 58874 DEFB 0,0                                ; Nothing (#R40960#40960)
 58876 DEFB 0,0                                ; Nothing (#R40960#40960)
 58878 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b38: Priests' Hole (teleport: 2369)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM38(priests'_hole) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b58880 DEFB 160,0,10,0,0,0,0,0                 ; {Room layout
 58888 DEFB 160,0,10,0,0,0,0,0                 ;
 58896 DEFB 160,0,10,0,0,0,0,0                 ;
 58904 DEFB 0,0,10,0,0,0,0,0                   ;
 58912 DEFB 0,0,10,0,0,0,0,0                   ;
 58920 DEFB 165,0,90,0,0,0,0,0                 ;
 58928 DEFB 160,0,10,0,0,0,0,0                 ;
 58936 DEFB 161,0,10,0,0,0,0,0                 ;
 58944 DEFB 160,0,74,0,0,0,0,0                 ;
 58952 DEFB 160,0,10,0,0,0,0,0                 ;
 58960 DEFB 161,0,0,0,0,0,0,0                  ;
 58968 DEFB 160,0,0,0,0,0,0,0                  ;
 58976 DEFB 160,0,90,0,0,0,0,0                 ;
 58984 DEFB 160,0,10,0,0,0,0,0                 ;
 58992 DEFB 160,64,10,0,0,0,0,0                ;
 59000 DEFB 160,1,10,0,0,0,0,0                 ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 59008 DEFM "         Priests' Hole          " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES38 }
; TABLE#
 59040 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 59049 DEFB 6,85,85,93,215,112,0,0,0           ; Floor
 59058 DEFB 42,34,17,68,136,34,17,68,136       ; Wall
 59067 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 59076 DEFB 255,0,0,0,0,0,0,0,0                ; Ramp (unused)
 59085 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 59094 DEFB 0                                  ; Direction (left)
 59095 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 59097 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 59098 DEFB 0                                  ; Direction (up to the left)
 59099 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 59101 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 59102 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 59103 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM38 }
; TABLE#
 59105 DEFB 191,191,187,177,187,187,191,191    ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 59113 DEFB 39                                 ; Room to the left
                                               ; (#R59136(Emergency Generator))
 59114 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 59115 DEFB 60                                 ; Room above (#R64512(The Bow))
 59116 DEFB 32                                 ; Room below (#R57344(Halfway up
                                               ; the East Wall))
; The next three bytes are copied to #R33005, but are not used.
 59117 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 59120 DEFB 16,132                             ; Guardian no. #b16 (vertical),
                                               ; base sprite 4, x=4 (#R41088)
 59122 DEFB 17,166                             ; Guardian no. #b17 (vertical),
                                               ; base sprite 5, x=6 (#R41096)
 59124 DEFB 18,197                             ; Guardian no. #b18 (vertical),
                                               ; base sprite 6, x=5 (#R41104)
 59126 DEFB 37,22                              ; Guardian no. #b37
                                               ; (horizontal), base sprite 0,
                                               ; initial x=22 (#R41256)
 59128 DEFB 255,0                              ; Terminator (#R41976)
 59130 DEFB 0,0                                ; Nothing (#R40960#40960)
 59132 DEFB 0,0                                ; Nothing (#R40960#40960)
 59134 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b39: Emergency Generator (teleport: 12369)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM39(emergency_generator) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b59136 DEFB 0,0,0,0,0,0,0,10                   ; {Room layout
 59144 DEFB 0,0,0,0,0,0,0,10                   ;
 59152 DEFB 0,0,0,0,0,0,0,10                   ;
 59160 DEFB 0,0,0,0,0,0,0,0                    ;
 59168 DEFB 0,0,0,0,0,0,0,0                    ;
 59176 DEFB 0,5,0,0,0,0,80,10                  ;
 59184 DEFB 0,5,0,0,0,0,80,3                   ;
 59192 DEFB 0,5,0,0,0,0,80,3                   ;
 59200 DEFB 0,5,0,0,0,0,80,3                   ;
 59208 DEFB 0,5,0,0,0,0,80,3                   ;
 59216 DEFB 0,42,128,0,0,2,168,3               ;
 59224 DEFB 0,40,128,0,0,2,40,3                ;
 59232 DEFB 0,170,170,170,170,170,170,3        ;
 59240 DEFB 0,170,42,138,162,168,170,3         ;
 59248 DEFB 0,170,170,170,170,170,170,3        ;
 59256 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 59264 DEFM "       Emergency Generator      " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES39 }
; TABLE#
 59296 DEFB 8,0,0,0,0,0,0,0,0                  ; Background
 59305 DEFB 47,102,102,102,102,102,102,102,102 ; Floor
 59314 DEFB 51,191,21,0,81,251,81,0,21         ; Wall
 59323 DEFB 13,255,63,3,31,127,31,3,63         ; Nasty
 59332 DEFB 15,3,0,12,0,48,0,192,0             ; Ramp
 59341 DEFB 22,170,84,170,84,40,16,40,16       ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 59350 DEFB 0                                  ; Direction (left)
 59351 DEFW 24425                              ; Location in the attribute
                                               ; buffer at #R24064: (11,9)
 59353 DEFB 14                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 59354 DEFB 1                                  ; Direction (up to the right)
 59355 DEFW 24402                              ; Location in the attribute
                                               ; buffer at #R24064: (10,18)
 59357 DEFB 6                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 59358 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 59359 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM39 }
; TABLE#
 59361 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 59369 DEFB 40                                 ; Room to the left (#R59392(Dr
                                               ; Jones will never believe
                                               ; this))
 59370 DEFB 38                                 ; Room to the right
                                               ; (#R58880(Priests' Hole))
 59371 DEFB 14                                 ; Room above (#R52736(Rescue
                                               ; Esmerelda))
 59372 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 59373 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 59376 DEFB 26,8                               ; Guardian no. #b26
                                               ; (horizontal), base sprite 0,
                                               ; initial x=8 (#R41168)
 59378 DEFB 255,0                              ; Terminator (#R41976)
 59380 DEFB 0,0                                ; Nothing (#R40960#40960)
 59382 DEFB 0,0                                ; Nothing (#R40960#40960)
 59384 DEFB 0,0                                ; Nothing (#R40960#40960)
 59386 DEFB 0,0                                ; Nothing (#R40960#40960)
 59388 DEFB 0,0                                ; Nothing (#R40960#40960)
 59390 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b40: Dr Jones will never believe this (teleport: 469)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM40(dr_jones_will_never_believe_this) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b59392 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 59400 DEFB 0,0,0,0,0,0,0,0                    ;
 59408 DEFB 0,0,0,234,0,0,0,0                  ;
 59416 DEFB 0,0,0,170,160,0,0,0                ;
 59424 DEFB 0,0,0,149,84,0,0,0                 ;
 59432 DEFB 0,14,168,213,21,0,0,0              ;
 59440 DEFB 0,10,170,129,170,0,0,0             ;
 59448 DEFB 0,5,80,144,168,32,0,0              ;
 59456 DEFB 80,5,80,129,160,0,0,0              ;
 59464 DEFB 0,10,80,144,160,0,0,0              ;
 59472 DEFB 4,10,80,129,128,64,0,0             ;
 59480 DEFB 0,18,80,144,128,0,0,0              ;
 59488 DEFB 0,66,80,1,128,16,0,16              ;
 59496 DEFB 0,2,0,1,128,0,64,0                 ;
 59504 DEFB 0,2,148,1,144,0,0,0                ;
 59512 DEFB 0,0,0,0,0,0,0,0                    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 59520 DEFM "Dr Jones will never believe this" ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES40 }
; TABLE#
 59552 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 59561 DEFB 2,254,85,42,170,85,170,170,255     ; Floor
 59570 DEFB 31,17,68,34,136,17,68,34,136       ; Wall
 59579 DEFB 67,1,4,34,8,17,68,34,136           ; Nasty
 59588 DEFB 5,64,144,36,72,18,36,9,2           ; Ramp
 59597 DEFB 38,165,0,165,0,170,255,255,85      ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 59606 DEFB 0                                  ; Direction (left)
 59607 DEFW 24544                              ; Location in the attribute
                                               ; buffer at #R24064: (15,0)
 59609 DEFB 32                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 59610 DEFB 0                                  ; Direction (up to the left)
 59611 DEFW 24408                              ; Location in the attribute
                                               ; buffer at #R24064: (10,24)
 59613 DEFB 5                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 59614 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 59615 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM40 }
; TABLE#
 59617 DEFB 240,240,120,184,76,50,13,3         ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 59625 DEFB 41                                 ; Room to the left (#R59648(The
                                               ; Attic))
 59626 DEFB 39                                 ; Room to the right
                                               ; (#R59136(Emergency Generator))
 59627 DEFB 16                                 ; Room above (#R53248(We must
                                               ; perform a Quirkafleeg))
 59628 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 59629 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 59632 DEFB 27,146                             ; Guardian no. #b27 (vertical),
                                               ; base sprite 4, x=18 (#R41176)
 59634 DEFB 11,10                              ; Guardian no. #b11 (vertical),
                                               ; base sprite 0, x=10 (#R41048)
 59636 DEFB 255,0                              ; Terminator (#R41976)
 59638 DEFB 0,0                                ; Nothing (#R40960#40960)
 59640 DEFB 0,0                                ; Nothing (#R40960#40960)
 59642 DEFB 0,0                                ; Nothing (#R40960#40960)
 59644 DEFB 0,0                                ; Nothing (#R40960#40960)
 59646 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b41: The Attic (teleport: 1469)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM41(the_attic) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b59648 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 59656 DEFB 0,0,0,0,0,0,0,0                    ;
 59664 DEFB 0,0,0,0,0,0,0,0                    ;
 59672 DEFB 0,0,0,0,0,0,0,0                    ;
 59680 DEFB 0,0,0,0,0,0,0,0                    ;
 59688 DEFB 0,192,3,0,0,0,0,0                  ;
 59696 DEFB 85,149,86,80,0,0,0,0               ;
 59704 DEFB 160,0,0,0,0,0,0,0                  ;
 59712 DEFB 164,0,0,0,5,0,0,5                  ;
 59720 DEFB 160,0,0,0,0,0,0,0                  ;
 59728 DEFB 164,0,0,0,0,80,0,0                 ;
 59736 DEFB 160,0,0,0,0,0,0,0                  ;
 59744 DEFB 164,0,0,0,0,4,0,0                  ;
 59752 DEFB 160,0,0,0,0,0,0,0                  ;
 59760 DEFB 164,3,0,192,192,0,0,0              ;
 59768 DEFB 85,101,149,150,85,149,86,89        ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 59776 DEFM "          The Attic             " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES41 }
; TABLE#
 59808 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 59817 DEFB 22,206,255,0,231,0,127,0,251       ; Floor
 59826 DEFB 30,238,17,108,146,17,201,34,156    ; Wall
 59835 DEFB 68,36,18,68,170,85,170,91,255      ; Nasty
 59844 DEFB 255,0,0,0,0,0,0,0,0                ; Ramp (unused)
 59853 DEFB 66,240,170,60,170,85,170,85,170    ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 59862 DEFB 1                                  ; Direction (right)
 59863 DEFW 24344                              ; Location in the attribute
                                               ; buffer at #R24064: (8,24)
 59865 DEFB 4                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 59866 DEFB 0                                  ; Direction (up to the left)
 59867 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 59869 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 59870 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 59871 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM41 }
; TABLE#
 59873 DEFB 17,34,51,68,85,102,119,136         ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 59881 DEFB 42                                 ; Room to the left
                                               ; (#R59904(Under the Roof))
 59882 DEFB 40                                 ; Room to the right (#R59392(Dr
                                               ; Jones will never believe
                                               ; this))
 59883 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 59884 DEFB 34                                 ; Room below (#R57856(Top
                                               ; Landing))
; The next three bytes are copied to #R33005, but are not used.
 59885 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 59888 DEFB 82,4                               ; Guardian no. #b82 (vertical),
                                               ; base sprite 0, x=4 (#R41616)
 59890 DEFB 83,6                               ; Guardian no. #b83 (vertical),
                                               ; base sprite 0, x=6 (#R41624)
 59892 DEFB 84,8                               ; Guardian no. #b84 (vertical),
                                               ; base sprite 0, x=8 (#R41632)
 59894 DEFB 85,10                              ; Guardian no. #b85 (vertical),
                                               ; base sprite 0, x=10 (#R41640)
 59896 DEFB 86,12                              ; Guardian no. #b86 (vertical),
                                               ; base sprite 0, x=12 (#R41648)
 59898 DEFB 87,78                              ; Guardian no. #b87 (vertical),
                                               ; base sprite 2, x=14 (#R41656)
@bfix=DEFB 69,82
 59900 DEFB 69,213                             ; Arrow flying right to left at
                                               ; pixel y-coordinate 536
                                               ; (#R41512)
 59902 DEFB 60,146                             ; Arrow flying left to right at
                                               ; pixel y-coordinate 73
                                               ; (#R41440)

; Room #b42: Under the Roof (teleport: 2469)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM42(under_the_roof) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b59904 DEFB 0,0,0,255,255,255,255,240          ; {Room layout
 59912 DEFB 0,0,0,0,195,252,48,0               ;
 59920 DEFB 0,0,0,3,243,252,252,0              ;
 59928 DEFB 0,0,0,0,0,240,0,0                  ;
 59936 DEFB 0,0,0,0,0,0,0,0                    ;
 59944 DEFB 0,0,0,0,0,0,0,0                    ;
 59952 DEFB 0,0,0,0,0,0,0,0                    ;
 59960 DEFB 170,85,0,0,0,0,0,0                 ;
 59968 DEFB 0,0,0,0,0,0,0,0                    ;
 59976 DEFB 0,0,0,0,0,0,0,0                    ;
 59984 DEFB 0,0,0,0,0,0,0,0                    ;
 59992 DEFB 0,0,0,160,0,1,64,0                 ;
 60000 DEFB 0,0,80,160,1,0,0,0                 ;
 60008 DEFB 85,80,0,160,64,0,0,0               ;
 60016 DEFB 84,0,1,160,0,0,0,0                 ;
 60024 DEFB 0,0,0,160,0,64,0,0                 ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 60032 DEFM "         Under the Roof         " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES42 }
; TABLE#
 60064 DEFB 8,0,0,0,0,0,0,0,0                  ; Background
 60073 DEFB 12,181,170,85,74,37,66,1,2         ; Floor
 60082 DEFB 30,102,182,109,187,102,185,109,182 ; Wall
 60091 DEFB 245,102,170,95,188,99,172,107,164  ; Nasty
 60100 DEFB 15,1,2,4,40,16,40,64,128           ; Ramp
 60109 DEFB 14,165,170,189,102,102,102,102,102 ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 60118 DEFB 1                                  ; Direction (right)
 60119 DEFW 24268                              ; Location in the attribute
                                               ; buffer at #R24064: (6,12)
 60121 DEFB 20                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 60122 DEFB 1                                  ; Direction (up to the right)
 60123 DEFW 24260                              ; Location in the attribute
                                               ; buffer at #R24064: (6,4)
 60125 DEFB 7                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 60126 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 60127 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM42 }
; TABLE#
 60129 DEFB 255,255,255,255,255,255,255,255    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 60137 DEFB 43                                 ; Room to the left
                                               ; (#R60160(Conservatory Roof))
 60138 DEFB 41                                 ; Room to the right (#R59648(The
                                               ; Attic))
 60139 DEFB 48                                 ; Room above (#R61440(Nomen
                                               ; Luni))
 60140 DEFB 36                                 ; Room below (#R58368(A bit of
                                               ; tree))
; The next three bytes are copied to #R33005, but are not used.
 60141 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 60144 DEFB 55,4                               ; Guardian no. #b55
                                               ; (horizontal), base sprite 0,
                                               ; initial x=4 (#R41400)
 60146 DEFB 39,16                              ; Guardian no. #b39
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41272)
 60148 DEFB 60,194                             ; Arrow flying left to right at
                                               ; pixel y-coordinate 97
                                               ; (#R41440)
 60150 DEFB 255,0                              ; Terminator (#R41976)
 60152 DEFB 0,0                                ; Nothing (#R40960#40960)
 60154 DEFB 0,0                                ; Nothing (#R40960#40960)
 60156 DEFB 0,0                                ; Nothing (#R40960#40960)
 60158 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b43: Conservatory Roof (teleport: 12469)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM43(conservatory_roof) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b60160 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 60168 DEFB 0,0,0,0,0,0,0,0                    ;
 60176 DEFB 0,0,0,0,0,0,0,0                    ;
 60184 DEFB 0,0,0,0,0,0,0,0                    ;
 60192 DEFB 0,0,0,0,0,0,0,0                    ;
 60200 DEFB 0,0,0,0,0,0,0,0                    ;
 60208 DEFB 0,0,0,0,0,0,0,0                    ;
 60216 DEFB 0,0,0,0,0,42,170,170               ;
@bfix=DEFB 0,0,0,0,0,48,195,0
 60224 DEFB 0,0,0,0,0,48,195,12                ;
 60232 DEFB 0,0,0,0,0,0,0,0                    ;
 60240 DEFB 0,0,0,0,0,0,0,0                    ;
 60248 DEFB 0,0,0,0,0,0,0,0                    ;
 60256 DEFB 0,0,0,0,0,0,0,0                    ;
 60264 DEFB 0,0,0,0,0,0,80,0                   ;
 60272 DEFB 0,0,0,0,0,0,5,85                   ;
 60280 DEFB 0,0,0,0,0,4,0,0                    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 60288 DEFM "        Conservatory Roof       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES43 }
; TABLE#
 60320 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 60329 DEFB 4,172,83,42,208,138,36,34,4        ; Floor
 60338 DEFB 5,247,239,0,0,0,102,102,0          ; Wall
 60347 DEFB 67,218,213,127,46,17,31,10,27      ; Nasty
 60356 DEFB 7,1,2,4,16,8,32,64,128             ; Ramp
 60365 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 60374 DEFB 1                                  ; Direction (right)
 60375 DEFW 24506                              ; Location in the attribute
                                               ; buffer at #R24064: (13,26)
 60377 DEFB 6                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 60378 DEFB 1                                  ; Direction (up to the right)
 60379 DEFW 24556                              ; Location in the attribute
                                               ; buffer at #R24064: (15,12)
 60381 DEFB 9                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 60382 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 60383 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM43 }
; TABLE#
 60385 DEFB 24,24,248,60,126,96,96,126         ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 60393 DEFB 0                                  ; Room to the left (#R49152(The
                                               ; Off Licence))
 60394 DEFB 42                                 ; Room to the right
                                               ; (#R59904(Under the Roof))
 60395 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 60396 DEFB 37                                 ; Room below (#R58624(Orangery))
; The next three bytes are copied to #R33005, but are not used.
 60397 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 60400 DEFB 106,20                             ; Guardian no. #b106
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41808)
 60402 DEFB 61,24                              ; Guardian no. #b61
                                               ; (horizontal), base sprite 0,
                                               ; initial x=24 (#R41448)
 60404 DEFB 255,0                              ; Terminator (#R41976)
 60406 DEFB 0,0                                ; Nothing (#R40960#40960)
 60408 DEFB 0,0                                ; Nothing (#R40960#40960)
 60410 DEFB 0,0                                ; Nothing (#R40960#40960)
 60412 DEFB 0,0                                ; Nothing (#R40960#40960)
 60414 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b44: On top of the house (teleport: 3469)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM44(on_top_of_the_house) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b60416 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 60424 DEFB 0,0,0,0,0,0,0,0                    ;
 60432 DEFB 0,0,0,0,0,0,0,0                    ;
 60440 DEFB 0,0,0,0,0,0,0,0                    ;
 60448 DEFB 0,0,0,0,0,0,0,0                    ;
 60456 DEFB 146,0,0,0,4,0,0,0                  ;
 60464 DEFB 144,0,0,0,16,0,0,0                 ;
 60472 DEFB 144,0,0,0,64,0,0,0                 ;
 60480 DEFB 146,0,0,1,0,0,0,0                  ;
 60488 DEFB 146,128,0,4,0,0,0,0                ;
 60496 DEFB 146,160,130,16,0,0,0,0             ;
 60504 DEFB 146,170,170,64,0,0,0,0             ;
 60512 DEFB 146,170,170,0,0,0,0,0              ;
 60520 DEFB 16,0,0,0,0,0,0,0                   ;
 60528 DEFB 0,0,0,0,0,0,0,0                    ;
 60536 DEFB 170,170,170,0,0,0,0,0              ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 60544 DEFM "         On top of the house    " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES44 }
; TABLE#
 60576 DEFB 8,0,0,0,0,0,0,0,0                  ; Background
 60585 DEFB 14,160,64,128,0,0,0,0,0            ; Floor
 60594 DEFB 75,81,170,0,170,21,170,0,170       ; Wall
 60603 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 60612 DEFB 15,1,3,6,13,26,52,104,208          ; Ramp
 60621 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 60630 DEFB 0                                  ; Direction (left)
 60631 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 60633 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 60634 DEFB 1                                  ; Direction (up to the right)
 60635 DEFW 24396                              ; Location in the attribute
                                               ; buffer at #R24064: (10,12)
 60637 DEFB 6                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 60638 DEFB 3                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 60639 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM44 }
; TABLE#
 60641 DEFB 0,0,24,20,26,53,107,208            ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 60649 DEFB 14                                 ; Room to the left
                                               ; (#R52736(Rescue Esmerelda))
 60650 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 60651 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 60652 DEFB 38                                 ; Room below (#R58880(Priests'
                                               ; Hole))
; The next three bytes are copied to #R33005, but are not used.
 60653 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 60656 DEFB 29,20                              ; Guardian no. #b29 (vertical),
                                               ; base sprite 0, x=20 (#R41192)
 60658 DEFB 255,0                              ; Terminator (#R41976)
 60660 DEFB 0,0                                ; Nothing (#R40960#40960)
 60662 DEFB 0,0                                ; Nothing (#R40960#40960)
 60664 DEFB 0,0                                ; Nothing (#R40960#40960)
 60666 DEFB 0,0                                ; Nothing (#R40960#40960)
 60668 DEFB 0,0                                ; Nothing (#R40960#40960)
 60670 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b45: Under the Drive (teleport: 13469)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM45(under_the_drive) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b60672 DEFB 160,0,0,0,0,0,170,170              ; {Room layout
 60680 DEFB 160,0,0,0,0,0,170,170              ;
 60688 DEFB 160,0,0,0,0,0,170,170              ;
 60696 DEFB 160,0,0,0,0,5,170,170              ;
 60704 DEFB 168,0,0,0,0,0,170,170              ;
 60712 DEFB 170,0,0,0,16,0,2,170               ;
 60720 DEFB 170,128,0,0,0,80,0,170             ;
 60728 DEFB 170,160,0,0,0,0,0,10               ;
 60736 DEFB 170,168,0,0,80,0,0,0               ;
 60744 DEFB 170,170,0,0,0,192,0,0              ;
 60752 DEFB 170,170,128,0,0,0,0,0              ;
 60760 DEFB 170,170,160,0,0,0,0,0              ;
 60768 DEFB 170,170,168,0,0,0,0,0              ;
 60776 DEFB 170,170,170,0,0,0,0,0              ;
 60784 DEFB 170,170,170,128,48,12,12,0         ;
 60792 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 60800 DEFM "          Under the Drive       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES45 }
; TABLE#
 60832 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 60841 DEFB 6,255,255,165,88,36,66,32,0        ; Floor
 60850 DEFB 12,16,42,85,160,16,32,16,8         ; Wall
 60859 DEFB 4,24,24,20,34,34,85,17,40          ; Nasty
 60868 DEFB 7,128,64,160,80,168,84,170,85      ; Ramp
 60877 DEFB 2,224,170,248,0,255,255,102,102    ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 60886 DEFB 0                                  ; Direction (left)
 60887 DEFW 24402                              ; Location in the attribute
                                               ; buffer at #R24064: (10,18)
 60889 DEFB 14                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 60890 DEFB 0                                  ; Direction (up to the left)
 60891 DEFW 24525                              ; Location in the attribute
                                               ; buffer at #R24064: (14,13)
 60893 DEFB 12                                 ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 60894 DEFB 4                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 60895 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM45 }
; TABLE#
 60897 DEFB 129,100,205,15,97,218,51,26        ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 60905 DEFB 6                                  ; Room to the left
                                               ; (#R50688(Entrance to Hades))
 60906 DEFB 46                                 ; Room to the right
                                               ; (#R60928(Tree Root))
 60907 DEFB 4                                  ; Room above (#R50176(The
                                               ; Drive))
 60908 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 60909 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 60912 DEFB 28,16                              ; Guardian no. #b28
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41184)
 60914 DEFB 29,146                             ; Guardian no. #b29 (vertical),
                                               ; base sprite 4, x=18 (#R41192)
 60916 DEFB 68,150                             ; Guardian no. #b68
                                               ; (horizontal), base sprite 4,
                                               ; initial x=22 (#R41504)
 60918 DEFB 255,0                              ; Terminator (#R41976)
 60920 DEFB 0,0                                ; Nothing (#R40960#40960)
 60922 DEFB 0,0                                ; Nothing (#R40960#40960)
 60924 DEFB 0,0                                ; Nothing (#R40960#40960)
 60926 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b46: Tree Root (teleport: 23469)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM46(tree_root) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b60928 DEFB 170,10,170,170,170,170,170,170     ; {Room layout
 60936 DEFB 170,10,170,170,170,170,170,170     ;
 60944 DEFB 170,10,170,170,170,170,170,170     ;
 60952 DEFB 170,10,160,170,170,170,170,170     ;
 60960 DEFB 170,10,160,170,0,160,0,10          ;
 60968 DEFB 170,10,160,170,0,160,0,10          ;
 60976 DEFB 170,10,160,0,0,160,0,10            ;
 60984 DEFB 170,10,160,0,0,160,0,10            ;
 60992 DEFB 0,0,5,0,0,160,0,10                 ;
 61000 DEFB 0,0,0,0,0,0,0,10                   ;
 61008 DEFB 0,0,0,0,0,0,0,42                   ;
 61016 DEFB 0,0,0,1,85,85,64,170               ;
 61024 DEFB 0,0,0,0,0,0,2,170                  ;
 61032 DEFB 0,0,0,0,0,0,10,170                 ;
 61040 DEFB 0,12,3,3,0,48,42,170               ;
 61048 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 61056 DEFM "           Tree Root            " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES46 }
; TABLE#
 61088 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 61097 DEFB 6,255,255,0,0,0,0,0,0              ; Floor
 61106 DEFB 10,102,153,36,36,119,136,141,114   ; Wall
 61115 DEFB 2,28,42,95,125,190,254,210,124     ; Nasty
 61124 DEFB 67,3,2,13,2,49,8,213,34            ; Ramp
 61133 DEFB 4,238,170,56,255,255,16,16,56      ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 61142 DEFB 0                                  ; Direction (left)
 61143 DEFW 24384                              ; Location in the attribute
                                               ; buffer at #R24064: (10,0)
 61145 DEFB 13                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 61146 DEFB 1                                  ; Direction (up to the right)
 61147 DEFW 24536                              ; Location in the attribute
                                               ; buffer at #R24064: (14,24)
 61149 DEFB 6                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 61150 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 61151 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM46 }
; TABLE#
 61153 DEFB 2,29,34,94,190,124,56,16           ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 61161 DEFB 45                                 ; Room to the left
                                               ; (#R60672(Under the Drive))
 61162 DEFB 47                                 ; Room to the right (#R61184([))
 61163 DEFB 3                                  ; Room above (#R49920(At the
                                               ; Foot of the MegaTree))
 61164 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 61165 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 61168 DEFB 30,132                             ; Guardian no. #b30 (vertical),
                                               ; base sprite 4, x=4 (#R41200)
 61170 DEFB 40,13                              ; Guardian no. #b40 (vertical),
                                               ; base sprite 0, x=13 (#R41280)
 61172 DEFB 35,19                              ; Guardian no. #b35
                                               ; (horizontal), base sprite 0,
                                               ; initial x=19 (#R41240)
 61174 DEFB 31,89                              ; Guardian no. #b31 (vertical),
                                               ; base sprite 2, x=25 (#R41208)
 61176 DEFB 255,0                              ; Terminator (#R41976)
 61178 DEFB 0,0                                ; Nothing (#R40960#40960)
 61180 DEFB 0,0                                ; Nothing (#R40960#40960)
 61182 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b47: [ (teleport: 123469)
;
; This room is not used.
; .
; #UDGTABLE
; { #ROOM47(left_square_bracket) }
; TABLE#
; .
; 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.
b61184 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout (completely
 61192 DEFB 0,0,0,0,0,0,0,0                    ; empty)
 61200 DEFB 0,0,0,0,0,0,0,0                    ;
 61208 DEFB 0,0,0,0,0,0,0,0                    ;
 61216 DEFB 0,0,0,0,0,0,0,0                    ;
 61224 DEFB 0,0,0,0,0,0,0,0                    ;
 61232 DEFB 0,0,0,0,0,0,0,0                    ;
 61240 DEFB 0,0,0,0,0,0,0,0                    ;
 61248 DEFB 0,0,0,0,0,0,0,0                    ;
 61256 DEFB 0,0,0,0,0,0,0,0                    ;
 61264 DEFB 0,0,0,0,0,0,0,0                    ;
 61272 DEFB 0,0,0,0,0,0,0,0                    ;
 61280 DEFB 0,0,0,0,0,0,0,0                    ;
 61288 DEFB 0,0,0,0,0,0,0,0                    ;
 61296 DEFB 0,0,0,0,0,0,0,0                    ;
 61304 DEFB 0,0,0,0,0,0,0,0                    ; }
; The next 32 bytes specify the room name.
 61312 DEFM "         [                      " ; Room name
; In a working room definition, the next 80 bytes define the tiles, conveyor,
; ramp, border colour, item graphic, and exits. In this room, however, there
; are code remnants and unused data.
 61344 DEFB 0,0,0,0,0,0,0,0,0                  ; Background tile
 61353 DEFB 0,0,0,0,0,0,0,0
 61361 INC B
 61362 LD (HL),0
 61364 JP NZ,25315
 61367 INC (IX+6)
 61370 DEFB 16,255
 61372 LD (IX+10),C
 61375 LD (HL),B
 61376 JP 24150
 61379 LD BC,24583
 61382 LD A,(16526)
 61385 JR NZ,61411
 61387 PUSH HL
 61388 PUSH BC
 61389 PUSH AF
 61390 LD DE,24296
 61393 PUSH DE
 61394 PUSH BC
 61395 RET
 61396 POP AF
 61397 POP BC
 61398 DEC A
 61399 DEFB 242,224
 61401 DEFB 0                                  ; Conveyor length (deliberately
                                               ; set to 0)
 61402 POP HL
 61403 RET
 61404 POP BC
 61405 DEFB 0                                  ; Ramp length (deliberately set
                                               ; to 0)
 61406 LD A,(HL)
 61407 CP 44
 61409 RET NZ
 61410 RST 16
*61411 PUSH BC
 61412 LD A,(HL)
 61413 CP 35
 61415 CALL Z,7544
 61418 CALL 11036
 61421 EX (SP),HL
 61422 PUSH HL
 61423 DEFB 17
; The next eight pairs of bytes specify the entities (ropes, arrows, guardians)
; in this room.
 61424 DEFB 255,0                              ; Terminator (#R41976)
 61426 DEFB 0,0                                ; Nothing (#R40960#40960)
 61428 DEFB 0,0                                ; Nothing (#R40960#40960)
 61430 DEFB 0,0                                ; Nothing (#R40960#40960)
 61432 DEFB 0,0                                ; Nothing (#R40960#40960)
 61434 DEFB 0,0                                ; Nothing (#R40960#40960)
 61436 DEFB 0,0                                ; Nothing (#R40960#40960)
 61438 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b48: Nomen Luni (teleport: 569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM48(nomen_luni) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b61440 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 61448 DEFB 0,0,0,0,0,0,0,0                    ;
 61456 DEFB 0,0,0,0,0,0,0,0                    ;
 61464 DEFB 0,0,0,0,0,0,0,0                    ;
 61472 DEFB 0,0,0,0,0,0,0,0                    ;
 61480 DEFB 0,0,0,0,10,170,0,0                 ;
 61488 DEFB 0,0,0,1,10,170,0,80                ;
 61496 DEFB 0,0,0,0,0,160,0,0                  ;
 61504 DEFB 0,0,1,80,0,160,64,0                ;
 61512 DEFB 0,0,0,0,4,160,0,10                 ;
 61520 DEFB 0,0,0,0,0,160,0,42                 ;
 61528 DEFB 0,0,0,0,64,160,10,162              ;
 61536 DEFB 0,0,0,0,1,160,33,66                ;
 61544 DEFB 0,0,0,0,0,160,0,10                 ;
 61552 DEFB 0,0,0,170,170,170,170,162          ;
 61560 DEFB 0,0,0,170,170,170,170,162          ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 61568 DEFM "           Nomen Luni           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES48 }
; TABLE#
 61600 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 61609 DEFB 13,255,34,68,136,85,34,0,0         ; Floor
 61618 DEFB 243,170,112,170,108,177,95,170,85  ; Wall
 61627 DEFB 6,85,162,85,152,28,42,69,138       ; Nasty (unused)
 61636 DEFB 7,3,0,12,0,52,10,196,0             ; Ramp
 61645 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 61654 DEFB 0                                  ; Direction (left)
 61655 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 61657 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 61658 DEFB 1                                  ; Direction (up to the right)
 61659 DEFW 24553                              ; Location in the attribute
                                               ; buffer at #R24064: (15,9)
 61661 DEFB 5                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 61662 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 61663 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM48 }
; TABLE#
 61665 DEFB 18,18,18,18,18,18,18,18            ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 61673 DEFB 0                                  ; Room to the left (#R49152(The
                                               ; Off Licence))
 61674 DEFB 18                                 ; Room to the right (#R53760(On
                                               ; the Roof))
 61675 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 61676 DEFB 42                                 ; Room below (#R59904(Under the
                                               ; Roof))
; The next three bytes are copied to #R33005, but are not used.
 61677 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 61680 DEFB 104,5                              ; Guardian no. #b104
                                               ; (horizontal), base sprite 0,
                                               ; initial x=5 (#R41792)
 61682 DEFB 107,20                             ; Guardian no. #b107
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41816)
 61684 DEFB 29,144                             ; Guardian no. #b29 (vertical),
                                               ; base sprite 4, x=16 (#R41192)
 61686 DEFB 11,22                              ; Guardian no. #b11 (vertical),
                                               ; base sprite 0, x=22 (#R41048)
 61688 DEFB 255,0                              ; Terminator (#R41976)
 61690 DEFB 0,0                                ; Nothing (#R40960#40960)
 61692 DEFB 0,0                                ; Nothing (#R40960#40960)
 61694 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b49: The Wine Cellar (teleport: 1569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM49(the_wine_cellar) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b61696 DEFB 0,0,0,0,0,12,2,170                 ; {Room layout
 61704 DEFB 0,0,0,0,0,0,2,170                  ;
 61712 DEFB 85,64,0,0,0,0,2,170                ;
 61720 DEFB 0,0,0,0,0,0,0,42                   ;
 61728 DEFB 0,0,0,0,0,0,0,42                   ;
 61736 DEFB 170,168,0,65,0,21,86,170           ;
 61744 DEFB 170,0,0,0,0,0,0,42                 ;
 61752 DEFB 170,0,0,0,0,0,0,42                 ;
 61760 DEFB 170,168,0,65,0,85,86,170           ;
 61768 DEFB 160,0,0,0,0,0,0,42                 ;
 61776 DEFB 160,0,0,0,0,0,0,42                 ;
 61784 DEFB 170,168,0,65,1,85,85,85            ;
 61792 DEFB 170,0,0,195,3,0,0,0                ;
 61800 DEFB 170,0,0,0,0,0,10,170               ;
 61808 DEFB 170,168,0,0,0,0,42,170             ;
 61816 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 61824 DEFM "        The Wine Cellar         " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room. Note that because of a
; #BUG(corruptedConveyors)(bug) in the game engine, the conveyor tile is not
; drawn correctly (see the room image above).
; .
; #UDGTABLE
; { #TILES49 }
; TABLE#
 61856 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 61865 DEFB 66,255,24,231,16,199,56,0,0        ; Floor
 61874 DEFB 41,10,65,40,5,160,20,130,80        ; Wall
 61883 DEFB 70,36,36,36,90,219,189,195,126     ; Nasty
 61892 DEFB 7,3,3,13,14,53,58,213,234          ; Ramp
 61901 DEFB 13,170,85,170,85,170,85,170,85     ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 61910 DEFB 1                                  ; Direction (right)
 61911 DEFW 24475                              ; Location in the attribute
                                               ; buffer at #R24064: (12,27)
 61913 DEFB 5                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 61914 DEFB 1                                  ; Direction (up to the right)
 61915 DEFW 24536                              ; Location in the attribute
                                               ; buffer at #R24064: (14,24)
 61917 DEFB 3                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 61918 DEFB 4                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 61919 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM49 }
; TABLE#
 61921 DEFB 0,25,249,31,0,25,255,31            ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 61929 DEFB 51                                 ; Room to the left
                                               ; (#R62208(Tool#SPACE(2)Shed))
 61930 DEFB 19                                 ; Room to the right (#R54016(The
                                               ; Forgotten Abbey))
 61931 DEFB 52                                 ; Room above (#R62464(Back
                                               ; Stairway))
 61932 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 61933 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 61936 DEFB 52,16                              ; Guardian no. #b52
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41376)
 61938 DEFB 64,25                              ; Guardian no. #b64
                                               ; (horizontal), base sprite 0,
                                               ; initial x=25 (#R41472)
 61940 DEFB 65,9                               ; Guardian no. #b65
                                               ; (horizontal), base sprite 0,
                                               ; initial x=9 (#R41480)
 61942 DEFB 66,19                              ; Guardian no. #b66
                                               ; (horizontal), base sprite 0,
                                               ; initial x=19 (#R41488)
 61944 DEFB 255,0                              ; Terminator (#R41976)
 61946 DEFB 0,0                                ; Nothing (#R40960#40960)
 61948 DEFB 0,0                                ; Nothing (#R40960#40960)
 61950 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b50: Watch Tower (teleport: 2569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM50(watch_tower) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b61952 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 61960 DEFB 0,0,0,0,0,0,0,0                    ;
 61968 DEFB 0,0,0,0,0,0,0,0                    ;
 61976 DEFB 0,0,0,0,0,0,0,0                    ;
 61984 DEFB 0,0,0,0,0,0,0,0                    ;
 61992 DEFB 0,0,0,0,0,0,0,0                    ;
 62000 DEFB 0,0,0,0,0,0,0,0                    ;
 62008 DEFB 0,0,0,0,0,0,0,0                    ;
 62016 DEFB 0,0,0,0,0,0,0,0                    ;
 62024 DEFB 0,8,0,0,0,0,32,0                   ;
 62032 DEFB 0,8,12,0,0,192,224,0               ;
 62040 DEFB 0,10,170,160,26,170,160,0          ;
 62048 DEFB 0,0,0,160,10,0,0,0                 ;
 62056 DEFB 0,0,0,165,10,0,0,0                 ;
 62064 DEFB 0,0,0,160,10,0,0,0                 ;
 62072 DEFB 0,0,0,160,90,0,0,0                 ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 62080 DEFM "          Watch Tower           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES50 }
; TABLE#
 62112 DEFB 8,0,0,0,0,0,0,0,0                  ; Background
 62121 DEFB 6,255,255,170,85,170,85,0,0        ; Floor
 62130 DEFB 29,170,85,85,170,85,170,170,85     ; Wall
 62139 DEFB 12,70,137,137,54,72,131,132,104    ; Nasty
 62148 DEFB 15,1,2,4,8,16,32,64,128            ; Ramp
 62157 DEFB 13,246,255,231,0,0,0,0,0           ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 62166 DEFB 1                                  ; Direction (right)
 62167 DEFW 24204                              ; Location in the attribute
                                               ; buffer at #R24064: (4,12)
 62169 DEFB 8                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 62170 DEFB 1                                  ; Direction (up to the right)
 62171 DEFW 24327                              ; Location in the attribute
                                               ; buffer at #R24064: (8,7)
 62173 DEFB 5                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 62174 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 62175 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM50 }
; TABLE#
 62177 DEFB 116,56,102,191,191,157,66,60       ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 62185 DEFB 0                                  ; Room to the left (#R49152(The
                                               ; Off Licence))
 62186 DEFB 0                                  ; Room to the right (#R49152(The
                                               ; Off Licence))
 62187 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 62188 DEFB 16                                 ; Room below (#R53248(We must
                                               ; perform a Quirkafleeg))
; The next three bytes are copied to #R33005, but are not used.
 62189 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 62192 DEFB 108,145                            ; Guardian no. #b108
                                               ; (horizontal), base sprite 4,
                                               ; initial x=17 (#R41824)
 62194 DEFB 109,11                             ; Guardian no. #b109
                                               ; (horizontal), base sprite 0,
                                               ; initial x=11 (#R41832)
 62196 DEFB 255,0                              ; Terminator (#R41976)
 62198 DEFB 0,0                                ; Nothing (#R40960#40960)
 62200 DEFB 0,0                                ; Nothing (#R40960#40960)
 62202 DEFB 0,0                                ; Nothing (#R40960#40960)
 62204 DEFB 0,0                                ; Nothing (#R40960#40960)
 62206 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b51: Tool#SPACE(2)Shed (teleport: 12569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM51(tool__shed) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b62208 DEFB 0,0,2,170,160,0,0,0                ; {Room layout
 62216 DEFB 0,0,10,170,160,0,0,0               ;
 62224 DEFB 0,0,42,170,170,170,170,170         ;
 62232 DEFB 0,0,0,0,192,0,0,0                  ;
 62240 DEFB 0,0,0,0,0,0,0,0                    ;
 62248 DEFB 0,0,0,0,0,0,0,170                  ;
 62256 DEFB 0,0,0,0,0,0,0,170                  ;
 62264 DEFB 0,0,0,0,0,0,0,170                  ;
 62272 DEFB 170,168,0,65,0,64,42,170           ;
 62280 DEFB 170,168,0,0,0,0,42,170             ;
 62288 DEFB 170,168,0,0,0,0,106,170            ;
 62296 DEFB 170,168,17,0,16,0,42,170           ;
 62304 DEFB 170,168,0,0,0,64,42,170            ;
 62312 DEFB 170,168,0,0,0,0,106,170            ;
 62320 DEFB 170,168,0,0,0,0,42,170             ;
 62328 DEFB 170,170,170,170,170,170,170,170    ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 62336 DEFM "           Tool  Shed           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room. Note that because of a
; #BUG(corruptedConveyors)(bug) in the game engine, the conveyor tile is not
; drawn correctly (see the room image above).
; .
; #UDGTABLE
; { #TILES51 }
; TABLE#
 62368 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 62377 DEFB 5,90,255,34,68,34,64,0,0           ; Floor
 62386 DEFB 30,85,170,68,34,85,170,68,34       ; Wall
 62395 DEFB 6,4,4,4,136,80,32,16,8             ; Nasty
 62404 DEFB 7,3,3,12,12,48,48,192,192          ; Ramp
 62413 DEFB 68,224,170,0,102,102,102,102,102   ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 62422 DEFB 1                                  ; Direction (right)
 62423 DEFW 24551                              ; Location in the attribute
                                               ; buffer at #R24064: (15,7)
 62425 DEFB 18                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 62426 DEFB 1                                  ; Direction (up to the right)
 62427 DEFW 24291                              ; Location in the attribute
                                               ; buffer at #R24064: (7,3)
 62429 DEFB 8                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 62430 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 62431 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM51 }
; TABLE#
 62433 DEFB 24,24,24,24,24,155,127,59          ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 62441 DEFB 58                                 ; Room to the left (#R64000(The
                                               ; Beach))
 62442 DEFB 49                                 ; Room to the right (#R61696(The
                                               ; Wine Cellar))
 62443 DEFB 53                                 ; Room above (#R62720(Back
                                               ; Door))
 62444 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 62445 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 62448 DEFB 52,16                              ; Guardian no. #b52
                                               ; (horizontal), base sprite 0,
                                               ; initial x=16 (#R41376)
 62450 DEFB 98,9                               ; Guardian no. #b98
                                               ; (horizontal), base sprite 0,
                                               ; initial x=9 (#R41744)
 62452 DEFB 99,20                              ; Guardian no. #b99
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41752)
 62454 DEFB 255,0                              ; Terminator (#R41976)
 62456 DEFB 0,0                                ; Nothing (#R40960#40960)
 62458 DEFB 0,0                                ; Nothing (#R40960#40960)
 62460 DEFB 0,0                                ; Nothing (#R40960#40960)
 62462 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b52: Back Stairway (teleport: 3569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM52(back_stairway) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b62464 DEFB 0,0,0,0,10,170,170,170             ; {Room layout
 62472 DEFB 0,0,0,0,42,170,170,170             ;
 62480 DEFB 0,0,0,0,85,85,85,85                ;
 62488 DEFB 0,0,0,0,0,0,0,0                    ;
 62496 DEFB 0,0,0,0,0,0,0,0                    ;
 62504 DEFB 0,0,0,21,85,85,85,85               ;
 62512 DEFB 0,0,0,0,0,0,0,0                    ;
 62520 DEFB 0,0,0,0,0,0,0,0                    ;
 62528 DEFB 0,0,5,85,85,85,85,85               ;
 62536 DEFB 0,0,0,0,0,0,0,0                    ;
 62544 DEFB 0,0,0,0,0,0,0,0                    ;
 62552 DEFB 85,84,85,85,85,85,85,85            ;
 62560 DEFB 0,0,0,0,0,0,0,0                    ;
 62568 DEFB 0,0,0,0,0,0,0,0                    ;
 62576 DEFB 0,0,0,0,0,0,0,0                    ;
 62584 DEFB 85,85,85,85,85,85,85,85            ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 62592 DEFM "         Back Stairway          " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES52 }
; TABLE#
 62624 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 62633 DEFB 67,255,68,68,255,17,17,255,0       ; Floor
 62642 DEFB 30,21,241,143,168,138,248,31,21    ; Wall
 62651 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 62660 DEFB 71,3,1,12,4,48,16,192,64           ; Ramp
 62669 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 62678 DEFB 0                                  ; Direction (left)
 62679 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 62681 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 62682 DEFB 1                                  ; Direction (up to the right)
 62683 DEFW 24546                              ; Location in the attribute
                                               ; buffer at #R24064: (15,2)
 62685 DEFB 16                                 ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 62686 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 62687 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM52 }
; TABLE#
 62689 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 62697 DEFB 53                                 ; Room to the left (#R62720(Back
                                               ; Door))
 62698 DEFB 25                                 ; Room to the right
                                               ; (#R55552(Cold Store))
 62699 DEFB 54                                 ; Room above
                                               ; (#R62976(West#SPACE(2)Wing))
 62700 DEFB 49                                 ; Room below (#R61696(The Wine
                                               ; Cellar))
; The next three bytes are copied to #R33005, but are not used.
 62701 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 62704 DEFB 36,150                             ; Guardian no. #b36
                                               ; (horizontal), base sprite 4,
                                               ; initial x=22 (#R41248)
 62706 DEFB 92,144                             ; Guardian no. #b92
                                               ; (horizontal), base sprite 4,
                                               ; initial x=16 (#R41696)
 62708 DEFB 29,131                             ; Guardian no. #b29 (vertical),
                                               ; base sprite 4, x=3 (#R41192)
 62710 DEFB 255,0                              ; Terminator (#R41976)
 62712 DEFB 0,0                                ; Nothing (#R40960#40960)
 62714 DEFB 0,0                                ; Nothing (#R40960#40960)
 62716 DEFB 0,0                                ; Nothing (#R40960#40960)
 62718 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b53: Back Door (teleport: 13569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM53(back_door) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b62720 DEFB 0,0,0,0,160,0,0,0                  ; {Room layout
 62728 DEFB 0,0,0,0,160,0,0,0                  ;
 62736 DEFB 0,0,0,0,160,0,0,0                  ;
 62744 DEFB 0,0,0,0,160,0,0,0                  ;
 62752 DEFB 0,0,0,0,160,0,0,0                  ;
 62760 DEFB 0,0,0,0,160,0,0,0                  ;
 62768 DEFB 0,0,0,0,160,0,0,0                  ;
 62776 DEFB 0,0,0,0,160,0,0,0                  ;
 62784 DEFB 0,0,0,0,0,0,0,0                    ;
 62792 DEFB 0,0,0,0,0,0,0,0                    ;
 62800 DEFB 0,0,0,0,0,0,0,0                    ;
 62808 DEFB 0,0,0,5,85,85,85,85                ;
 62816 DEFB 0,0,0,42,160,0,0,0                 ;
 62824 DEFB 0,0,0,170,160,0,0,0                ;
 62832 DEFB 0,0,2,170,160,0,0,0                ;
 62840 DEFB 0,0,10,170,160,0,0,0               ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 62848 DEFM "            Back Door           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES53 }
; TABLE#
 62880 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 62889 DEFB 3,255,255,255,170,85,170,85,0      ; Floor
 62898 DEFB 38,105,210,165,75,150,45,90,180    ; Wall
 62907 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 62916 DEFB 7,3,3,13,15,54,61,218,244          ; Ramp
 62925 DEFB 34,240,240,240,240,102,102,0,0     ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 62934 DEFB 1                                  ; Direction (right)
 62935 DEFW 24562                              ; Location in the attribute
                                               ; buffer at #R24064: (15,18)
 62937 DEFB 14                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 62938 DEFB 1                                  ; Direction (up to the right)
 62939 DEFW 24553                              ; Location in the attribute
                                               ; buffer at #R24064: (15,9)
 62941 DEFB 5                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 62942 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 62943 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM53 }
; TABLE#
 62945 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 62953 DEFB 0                                  ; Room to the left (#R49152(The
                                               ; Off Licence))
 62954 DEFB 52                                 ; Room to the right
                                               ; (#R62464(Back Stairway))
 62955 DEFB 55                                 ; Room above (#R63232(West
                                               ; Bedroom))
 62956 DEFB 51                                 ; Room below
                                               ; (#R62208(Tool#SPACE(2)Shed))
; The next three bytes are copied to #R33005, but are not used.
 62957 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 62960 DEFB 255,0                              ; Terminator (#R41976)
 62962 DEFB 0,0                                ; Nothing (#R40960#40960)
 62964 DEFB 0,0                                ; Nothing (#R40960#40960)
 62966 DEFB 0,0                                ; Nothing (#R40960#40960)
 62968 DEFB 0,0                                ; Nothing (#R40960#40960)
 62970 DEFB 0,0                                ; Nothing (#R40960#40960)
 62972 DEFB 0,0                                ; Nothing (#R40960#40960)
 62974 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b54: West#SPACE(2)Wing (teleport: 23569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM54(west__wing) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b62976 DEFB 0,160,0,0,0,0,0,0                  ; {Room layout
 62984 DEFB 0,160,0,0,0,0,0,0                  ;
 62992 DEFB 0,160,0,0,0,0,0,0                  ;
 63000 DEFB 85,160,0,0,0,0,0,0                 ;
 63008 DEFB 0,160,0,0,0,0,0,0                  ;
 63016 DEFB 0,160,0,0,0,0,0,0                  ;
 63024 DEFB 0,0,0,0,0,0,0,0                    ;
 63032 DEFB 0,0,0,0,0,0,0,0                    ;
 63040 DEFB 0,0,0,0,0,0,0,0                    ;
 63048 DEFB 0,0,0,0,0,0,0,0                    ;
 63056 DEFB 0,0,0,0,0,0,0,0                    ;
 63064 DEFB 0,0,0,0,0,0,0,0                    ;
 63072 DEFB 85,85,85,80,0,85,85,85             ;
 63080 DEFB 0,0,0,0,2,170,170,170              ;
 63088 DEFB 0,0,0,0,10,170,170,170             ;
 63096 DEFB 0,0,0,0,42,170,170,170             ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 63104 DEFM "           West  Wing           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES54 }
; TABLE#
 63136 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 63145 DEFB 65,249,255,63,213,170,21,74,132    ; Floor
 63154 DEFB 39,172,174,1,173,173,2,172,232     ; Wall
 63163 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 63172 DEFB 7,3,3,12,12,48,48,192,192          ; Ramp
 63181 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 63190 DEFB 0                                  ; Direction (left)
 63191 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 63193 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 63194 DEFB 1                                  ; Direction (up to the right)
 63195 DEFW 24560                              ; Location in the attribute
                                               ; buffer at #R24064: (15,16)
 63197 DEFB 16                                 ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 63198 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 63199 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM54 }
; TABLE#
 63201 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 63209 DEFB 55                                 ; Room to the left (#R63232(West
                                               ; Bedroom))
 63210 DEFB 31                                 ; Room to the right
                                               ; (#R57088(Swimming Pool))
 63211 DEFB 56                                 ; Room above (#R63488(West Wing
                                               ; Roof))
 63212 DEFB 52                                 ; Room below (#R62464(Back
                                               ; Stairway))
; The next three bytes are copied to #R33005, but are not used.
 63213 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 63216 DEFB 97,14                              ; Guardian no. #b97 (vertical),
                                               ; base sprite 0, x=14 (#R41736)
 63218 DEFB 89,196                             ; Guardian no. #b89 (vertical),
                                               ; base sprite 6, x=4 (#R41672)
 63220 DEFB 20,9                               ; Guardian no. #b20
                                               ; (horizontal), base sprite 0,
                                               ; initial x=9 (#R41120)
 63222 DEFB 255,0                              ; Terminator (#R41976)
 63224 DEFB 0,0                                ; Nothing (#R40960#40960)
 63226 DEFB 0,0                                ; Nothing (#R40960#40960)
 63228 DEFB 0,0                                ; Nothing (#R40960#40960)
 63230 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b55: West Bedroom (teleport: 123569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM55(west_bedroom) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b63232 DEFB 0,0,4,0,160,64,0,0                 ; {Room layout
 63240 DEFB 0,0,0,0,160,64,0,0                 ;
 63248 DEFB 0,0,16,0,160,64,0,0                ;
 63256 DEFB 0,0,0,0,160,64,0,21                ;
 63264 DEFB 0,0,4,0,160,64,0,0                 ;
 63272 DEFB 0,0,0,0,160,64,0,0                 ;
 63280 DEFB 0,0,0,16,160,64,0,0                ;
 63288 DEFB 0,0,0,0,160,64,0,0                 ;
 63296 DEFB 0,0,4,0,0,64,0,0                   ;
 63304 DEFB 0,0,0,0,0,64,0,0                   ;
 63312 DEFB 0,0,16,0,0,64,0,0                  ;
 63320 DEFB 0,0,8,0,0,64,0,0                   ;
 63328 DEFB 0,0,9,85,85,85,85,85               ;
 63336 DEFB 0,0,10,170,160,0,0,0               ;
 63344 DEFB 0,0,0,0,160,0,0,0                  ;
 63352 DEFB 0,0,0,0,160,0,0,0                  ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 63360 DEFM "    West Bedroom                " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES55 }
; TABLE#
 63392 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 63401 DEFB 6,170,85,130,65,130,65,130,65      ; Floor
 63410 DEFB 13,168,85,168,86,207,46,38,193     ; Wall
 63419 DEFB 255,0,0,0,0,0,0,0,0                ; Nasty (unused)
 63428 DEFB 255,0,0,0,0,0,0,0,0                ; Ramp (unused)
 63437 DEFB 66,165,255,189,170,85,186,69,131   ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 63446 DEFB 0                                  ; Direction (left)
 63447 DEFW 24186                              ; Location in the attribute
                                               ; buffer at #R24064: (3,26)
 63449 DEFB 3                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 63450 DEFB 0                                  ; Direction (up to the left)
 63451 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 63453 DEFB 0                                  ; Length: 0 (there is no ramp in
                                               ; this room)
; The next byte is copied to #R32990 and specifies the border colour.
 63454 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 63455 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM55 }
; TABLE#
 63457 DEFB 0,0,0,0,0,0,0,0                    ; Item graphic (unused)
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 63465 DEFB 0                                  ; Room to the left (#R49152(The
                                               ; Off Licence))
 63466 DEFB 54                                 ; Room to the right
                                               ; (#R62976(West#SPACE(2)Wing))
 63467 DEFB 57                                 ; Room above (#R63744(Above the
                                               ; West Bedroom))
 63468 DEFB 53                                 ; Room below (#R62720(Back
                                               ; Door))
; The next three bytes are copied to #R33005, but are not used.
 63469 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 63472 DEFB 30,139                             ; Guardian no. #b30 (vertical),
                                               ; base sprite 4, x=11 (#R41200)
 63474 DEFB 51,78                              ; Guardian no. #b51 (vertical),
                                               ; base sprite 2, x=14 (#R41368)
 63476 DEFB 255,0                              ; Terminator (#R41976)
 63478 DEFB 0,0                                ; Nothing (#R40960#40960)
 63480 DEFB 0,0                                ; Nothing (#R40960#40960)
 63482 DEFB 0,0                                ; Nothing (#R40960#40960)
 63484 DEFB 0,0                                ; Nothing (#R40960#40960)
 63486 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b56: West Wing Roof (teleport: 4569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM56(west_wing_roof) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b63488 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 63496 DEFB 0,0,0,0,0,0,0,0                    ;
 63504 DEFB 0,0,0,0,0,0,0,0                    ;
 63512 DEFB 0,0,0,0,0,0,0,0                    ;
 63520 DEFB 0,0,0,0,0,0,0,0                    ;
 63528 DEFB 0,0,0,0,0,0,0,0                    ;
 63536 DEFB 85,160,0,0,0,0,0,0                 ;
 63544 DEFB 0,160,48,48,12,12,3,0              ;
 63552 DEFB 0,165,85,85,85,85,85,85            ;
 63560 DEFB 0,160,0,0,0,0,0,0                  ;
 63568 DEFB 0,160,0,0,0,0,0,0                  ;
 63576 DEFB 80,160,0,0,0,0,0,0                 ;
 63584 DEFB 0,160,0,0,0,0,0,0                  ;
 63592 DEFB 1,160,0,0,0,0,0,0                  ;
 63600 DEFB 0,160,0,0,0,0,0,0                  ;
 63608 DEFB 4,165,85,85,85,85,85,5             ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 63616 DEFM "         West Wing Roof         " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES56 }
; TABLE#
 63648 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 63657 DEFB 3,255,170,255,164,164,167,228,60   ; Floor
 63666 DEFB 37,225,132,30,72,225,132,30,72     ; Wall
 63675 DEFB 66,24,60,126,255,175,85,58,16      ; Nasty
 63684 DEFB 7,3,0,12,0,48,0,192,0              ; Ramp
 63693 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 63702 DEFB 0                                  ; Direction (left)
 63703 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 63705 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 63706 DEFB 1                                  ; Direction (up to the right)
 63707 DEFW 24572                              ; Location in the attribute
                                               ; buffer at #R24064: (15,28)
 63709 DEFB 4                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 63710 DEFB 1                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 63711 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM56 }
; TABLE#
 63713 DEFB 0,0,0,10,13,60,242,192             ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 63721 DEFB 57                                 ; Room to the left
                                               ; (#R63744(Above the West
                                               ; Bedroom))
 63722 DEFB 37                                 ; Room to the right
                                               ; (#R58624(Orangery))
 63723 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 63724 DEFB 54                                 ; Room below
                                               ; (#R62976(West#SPACE(2)Wing))
; The next three bytes are copied to #R33005, but are not used.
 63725 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 63728 DEFB 52,19                              ; Guardian no. #b52
                                               ; (horizontal), base sprite 0,
                                               ; initial x=19 (#R41376)
 63730 DEFB 28,20                              ; Guardian no. #b28
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41184)
 63732 DEFB 60,84                              ; Arrow flying left to right at
                                               ; pixel y-coordinate 42
                                               ; (#R41440)
 63734 DEFB 255,0                              ; Terminator (#R41976)
 63736 DEFB 0,0                                ; Nothing (#R40960#40960)
 63738 DEFB 0,0                                ; Nothing (#R40960#40960)
 63740 DEFB 0,0                                ; Nothing (#R40960#40960)
 63742 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b57: Above the West Bedroom (teleport: 14569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM57(above_the_west_bedroom) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b63744 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 63752 DEFB 0,0,0,0,0,0,0,0                    ;
 63760 DEFB 0,0,0,0,0,0,0,0                    ;
 63768 DEFB 0,0,0,0,0,0,0,0                    ;
 63776 DEFB 0,0,0,0,0,0,0,0                    ;
 63784 DEFB 0,0,0,0,0,0,0,0                    ;
 63792 DEFB 0,0,0,0,0,0,21,85                  ;
 63800 DEFB 0,0,0,0,0,0,208,0                  ;
 63808 DEFB 0,0,0,0,0,3,16,0                   ;
 63816 DEFB 0,0,0,0,0,12,16,0                  ;
 63824 DEFB 0,0,0,0,0,48,16,0                  ;
 63832 DEFB 0,0,0,0,1,85,85,85                 ;
 63840 DEFB 0,0,0,0,3,0,0,0                    ;
 63848 DEFB 0,0,4,0,12,0,0,0                   ;
 63856 DEFB 0,0,0,0,160,0,0,0                  ;
 63864 DEFB 0,0,16,0,160,85,85,0               ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 63872 DEFM "   Above the West Bedroom       " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES57 }
; TABLE#
 63904 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 63913 DEFB 4,247,170,85,239,0,0,0,0           ; Floor
 63922 DEFB 35,170,85,170,85,170,85,170,85     ; Wall
 63931 DEFB 6,48,96,192,128,0,0,0,0            ; Nasty
 63940 DEFB 7,1,0,6,9,19,6,108,152             ; Ramp
 63949 DEFB 255,0,0,0,0,0,0,0,0                ; Conveyor (unused)
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 63958 DEFB 0                                  ; Direction (left)
 63959 DEFW 0                                  ; Location in the attribute
                                               ; buffer at #R24064 (unused)
 63961 DEFB 0                                  ; Length: 0 (there is no
                                               ; conveyor in this room)
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 63962 DEFB 1                                  ; Direction (up to the right)
 63963 DEFW 24497                              ; Location in the attribute
                                               ; buffer at #R24064: (13,17)
 63965 DEFB 8                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 63966 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 63967 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM57 }
; TABLE#
 63969 DEFB 8,16,32,33,18,172,64,32            ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 63977 DEFB 0                                  ; Room to the left (#R49152(The
                                               ; Off Licence))
 63978 DEFB 56                                 ; Room to the right
                                               ; (#R63488(West Wing Roof))
 63979 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 63980 DEFB 55                                 ; Room below (#R63232(West
                                               ; Bedroom))
; The next three bytes are copied to #R33005, but are not used.
 63981 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 63984 DEFB 7,203                              ; Guardian no. #b7 (vertical),
                                               ; base sprite 6, x=11 (#R41016)
 63986 DEFB 51,78                              ; Guardian no. #b51 (vertical),
                                               ; base sprite 2, x=14 (#R41368)
 63988 DEFB 255,0                              ; Terminator (#R41976)
 63990 DEFB 0,0                                ; Nothing (#R40960#40960)
 63992 DEFB 0,0                                ; Nothing (#R40960#40960)
 63994 DEFB 0,0                                ; Nothing (#R40960#40960)
 63996 DEFB 0,0                                ; Nothing (#R40960#40960)
 63998 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b58: The Beach (teleport: 24569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM58(the_beach) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b64000 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 64008 DEFB 0,0,0,0,0,0,0,0                    ;
 64016 DEFB 0,0,0,0,0,0,0,0                    ;
 64024 DEFB 0,0,0,0,0,0,0,0                    ;
 64032 DEFB 0,0,0,0,0,0,0,0                    ;
 64040 DEFB 0,0,0,0,0,0,0,0                    ;
 64048 DEFB 0,0,0,0,0,0,0,0                    ;
 64056 DEFB 0,0,0,0,0,0,0,0                    ;
 64064 DEFB 0,0,0,0,0,0,170,170                ;
 64072 DEFB 0,0,0,0,0,0,170,170                ;
 64080 DEFB 170,160,0,0,0,0,170,170            ;
 64088 DEFB 0,0,0,0,0,0,170,170                ;
 64096 DEFB 0,0,0,0,0,0,170,170                ;
 64104 DEFB 0,0,0,0,0,0,170,170                ;
 64112 DEFB 0,5,213,117,93,117,170,170         ;
 64120 DEFB 0,21,85,85,85,85,170,170           ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 64128 DEFM "            The Beach           " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES58 }
; TABLE#
 64160 DEFB 13,0,0,0,0,0,0,0,0                 ; Background
 64169 DEFB 50,0,0,64,4,0,16,0,1               ; Floor
 64178 DEFB 42,68,0,146,36,128,40,130,80       ; Wall
 64187 DEFB 48,66,129,231,129,90,126,60,66     ; Nasty
 64196 DEFB 14,1,3,7,15,30,55,127,251          ; Ramp
 64205 DEFB 44,78,170,0,64,64,68,170,255       ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 64214 DEFB 0                                  ; Direction (left)
 64215 DEFW 24544                              ; Location in the attribute
                                               ; buffer at #R24064: (15,0)
 64217 DEFB 5                                  ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 64218 DEFB 1                                  ; Direction (up to the right)
 64219 DEFW 24517                              ; Location in the attribute
                                               ; buffer at #R24064: (14,5)
 64221 DEFB 1                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 64222 DEFB 2                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 64223 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM58 }
; TABLE#
 64225 DEFB 4,5,11,11,23,55,111,239            ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 64233 DEFB 59                                 ; Room to the left (#R64256(The
                                               ; Yacht))
 64234 DEFB 51                                 ; Room to the right
                                               ; (#R62208(Tool#SPACE(2)Shed))
 64235 DEFB 58                                 ; Room above (The Beach)
 64236 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 64237 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 64240 DEFB 1,14                               ; Rope at x=14 (#R40968)
 64242 DEFB 60,84                              ; Arrow flying left to right at
                                               ; pixel y-coordinate 42
                                               ; (#R41440)
 64244 DEFB 255,0                              ; Terminator (#R41976)
 64246 DEFB 0,0                                ; Nothing (#R40960#40960)
 64248 DEFB 0,0                                ; Nothing (#R40960#40960)
 64250 DEFB 0,0                                ; Nothing (#R40960#40960)
 64252 DEFB 0,0                                ; Nothing (#R40960#40960)
 64254 DEFB 0,0                                ; Nothing (#R40960#40960)

; Room #b59: The Yacht (teleport: 124569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM59(the_yacht) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b64256 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 64264 DEFB 0,0,0,0,0,0,0,0                    ;
 64272 DEFB 0,0,0,0,0,0,0,0                    ;
 64280 DEFB 0,0,0,0,0,0,0,0                    ;
 64288 DEFB 0,0,0,0,0,0,0,0                    ;
 64296 DEFB 85,96,0,0,0,0,0,0                  ;
 64304 DEFB 0,32,0,0,0,0,0,0                   ;
 64312 DEFB 0,32,0,0,0,0,0,0                   ;
 64320 DEFB 0,32,0,0,0,0,0,0                   ;
 64328 DEFB 0,32,3,3,0,192,0,0                 ;
 64336 DEFB 85,106,170,170,170,129,85,85       ;
 64344 DEFB 1,0,0,0,2,129,0,0                  ;
 64352 DEFB 1,0,0,0,2,129,0,0                  ;
 64360 DEFB 1,0,0,0,2,129,0,0                  ;
 64368 DEFB 1,0,0,0,2,128,0,0                  ;
 64376 DEFB 170,170,170,170,170,128,0,0        ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 64384 DEFM "           The Yacht            " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES59 }
; TABLE#
 64416 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 64425 DEFB 6,187,221,221,238,0,0,0,0          ; Floor
 64434 DEFB 61,187,119,238,221,187,119,238,221 ; Wall
 64443 DEFB 66,126,191,191,110,44,44,173,255   ; Nasty
 64452 DEFB 7,128,64,32,16,8,4,2,1             ; Ramp
 64461 DEFB 13,224,170,56,1,131,199,124,16     ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 64470 DEFB 0                                  ; Direction (left)
 64471 DEFW 24565                              ; Location in the attribute
                                               ; buffer at #R24064: (15,21)
 64473 DEFB 11                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 64474 DEFB 0                                  ; Direction (up to the left)
 64475 DEFW 24362                              ; Location in the attribute
                                               ; buffer at #R24064: (9,10)
 64477 DEFB 5                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 64478 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 64479 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM59 }
; TABLE#
 64481 DEFB 206,241,185,213,239,215,187,255    ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 64489 DEFB 60                                 ; Room to the left (#R64512(The
                                               ; Bow))
 64490 DEFB 58                                 ; Room to the right (#R64000(The
                                               ; Beach))
 64491 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 64492 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 64493 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 64496 DEFB 53,8                               ; Guardian no. #b53
                                               ; (horizontal), base sprite 0,
                                               ; initial x=8 (#R41384)
 64498 DEFB 27,21                              ; Guardian no. #b27 (vertical),
                                               ; base sprite 0, x=21 (#R41176)
 64500 DEFB 255,17                             ; Terminator (#R41976)
 64502 DEFB 0,0                                ; Nothing (#R40960#40960)
 64504 DEFB 0,0                                ; Nothing (#R40960#40960)
 64506 DEFB 0,0                                ; Nothing (#R40960#40960)
 64508 DEFB 0,0                                ; Nothing (#R40960#40960)
 64510 DEFB 0,0                                ; Nothing (#R40960#40960)

@ignoreua
; Room #b60: The Bow (teleport: 34569)
;
; Used by the routine at #R35090.
; .
; #UDGTABLE
; { #ROOM60(the_bow) }
; TABLE#
; .
; The first 128 bytes are copied to #R32768 and 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.
b64512 DEFB 0,0,0,0,0,0,0,0                    ; {Room layout
 64520 DEFB 0,0,0,0,0,0,0,0                    ;
 64528 DEFB 0,0,0,0,0,0,0,0                    ;
 64536 DEFB 0,0,0,0,0,0,0,0                    ;
 64544 DEFB 0,0,0,0,0,0,0,0                    ;
 64552 DEFB 0,0,0,0,0,1,85,85                  ;
 64560 DEFB 0,0,0,0,0,0,128,0                  ;
 64568 DEFB 0,0,0,0,4,0,128,0                  ;
 64576 DEFB 0,0,0,0,0,0,144,0                  ;
 64584 DEFB 0,0,0,0,0,0,128,0                  ;
 64592 DEFB 0,0,0,21,85,85,85,85               ;
 64600 DEFB 0,0,0,0,0,0,0,0                    ;
 64608 DEFB 0,0,0,0,0,0,0,0                    ;
 64616 DEFB 0,0,0,0,0,0,0,0                    ;
 64624 DEFB 0,0,0,0,0,0,0,0                    ;
 64632 DEFB 255,255,255,255,192,0,0,0          ; }
; The next 32 bytes are copied to #R32896 and specify the room name.
 64640 DEFM "             The Bow            " ; Room name
; The next 54 bytes are copied to #R32928 and contain the attributes and
; graphic data for the tiles used to build the room.
; .
; #UDGTABLE
; { #TILES60 }
; TABLE#
 64672 DEFB 0,0,0,0,0,0,0,0,0                  ; Background
 64681 DEFB 68,255,170,85,255,0,0,0,0          ; Floor
 64690 DEFB 61,201,201,201,201,201,201,201,201 ; Wall
 64699 DEFB 79,64,130,82,0,0,0,0,0             ; Nasty
 64708 DEFB 7,128,64,32,16,8,4,2,1             ; Ramp
 64717 DEFB 14,255,170,170,0,170,255,0,0       ; Conveyor
; The next four bytes are copied to #R32982 and specify the direction, location
; and length of the conveyor.
 64726 DEFB 1                                  ; Direction (right)
 64727 DEFW 24561                              ; Location in the attribute
                                               ; buffer at #R24064: (15,17)
 64729 DEFB 15                                 ; Length
; The next four bytes are copied to #R32986 and specify the direction, location
; and length of the ramp.
 64730 DEFB 0                                  ; Direction (up to the left)
 64731 DEFW 24528                              ; Location in the attribute
                                               ; buffer at #R24064: (14,16)
 64733 DEFB 6                                  ; Length
; The next byte is copied to #R32990 and specifies the border colour.
 64734 DEFB 5                                  ; Border colour
; The next two bytes are copied to #R32991, but are not used.
 64735 DEFB 0,0                                ; Unused
; The next eight bytes are copied to #R32993 and define the item graphic.
; .
; #UDGTABLE
; { #ITEM60 }
; TABLE#
 64737 DEFB 72,57,38,218,91,100,156,18         ; Item graphic
; The next four bytes are copied to #R33001 and specify the rooms to the left,
; to the right, above and below.
 64745 DEFB 0                                  ; Room to the left (#R49152(The
                                               ; Off Licence))
 64746 DEFB 59                                 ; Room to the right (#R64256(The
                                               ; Yacht))
 64747 DEFB 0                                  ; Room above (#R49152(The Off
                                               ; Licence))
 64748 DEFB 0                                  ; Room below (#R49152(The Off
                                               ; Licence))
; The next three bytes are copied to #R33005, but are not used.
 64749 DEFB 0,0,0                              ; Unused
; The next eight pairs of bytes are copied to #R33008 and specify the entities
; (ropes, arrows, guardians) in this room.
 64752 DEFB 105,23                             ; Guardian no. #b105
                                               ; (horizontal), base sprite 0,
                                               ; initial x=23 (#R41800)
 64754 DEFB 110,20                             ; Guardian no. #b110
                                               ; (horizontal), base sprite 0,
                                               ; initial x=20 (#R41840)
 64756 DEFB 255,0                              ; Terminator (#R41976)
 64758 DEFB 0,0                                ; Nothing (#R40960#40960)
 64760 DEFB 0,0                                ; Nothing (#R40960#40960)
 64762 DEFB 0,0                                ; Nothing (#R40960#40960)
 64764 DEFB 0,0                                ; Nothing (#R40960#40960)
 64766 DEFB 0,0                                ; Nothing (#R40960#40960)

; Unused TRS-DOS code
u64768 ADD HL,BC
 64769 LD A,(DE)
 64770 CP 59
@nowarn
 64772 JR Z,64720
 64774 CP 13
@nowarn
 64776 JR Z,64720
 64778 PUSH HL
 64779 LD HL,30720
 64782 LD B,2
 64784 CALL 26014
 64787 POP BC
 64788 JR NC,64796
*64790 LD DE,26547
 64793 JP 25689
*64796 CALL 30026
 64799 JR NZ,64790
 64801 CALL 23476
 64804 CALL NZ,23533
 64807 LD E,(HL)
 64808 INC HL
 64809 LD A,(HL)
 64810 LD (21550),A
 64813 LD A,(21555)
 64816 OR A
 64817 JR Z,64835
 64819 LD A,E
 64820 CP 32
 64822 JR C,64828
 64824 CP 37
 64826 JR C,64835
*64828 LD A,(21254)
 64831 OR A
 64832 JP Z,27620
*64835 LD HL,31280
 64838 LD D,0
 64840 ADD HL,DE
 64841 ADD HL,DE
 64842 LD A,(HL)
 64843 INC HL
 64844 LD H,(HL)
 64845 LD L,A
 64846 LD A,E
 64847 LD DE,30039
 64850 EX DE,HL
 64851 EX (SP),HL
 64852 EX DE,HL
 64853 PUSH HL
 64854 INC C
 64855 DEC C
 64856 RET Z
 64857 CP 24
 64859 LD A,1
 64861 LD HL,(21556)
 64864 RET NC
 64865 PUSH HL
 64866 PUSH AF
 64867 LD HL,(21569)
 64870 LD B,2
 64872 CALL 26014
 64875 JR NC,64932
 64877 PUSH DE
 64878 PUSH BC
 64879 CALL 30599
 64882 LD HL,(21569)
 64885 LD A,C
 64886 ADD A,B
 64887 INC A
 64888 LD C,A
 64889 XOR A
 64890 LD B,A
 64891 SBC HL,BC
 64893 RST 24
 64894 JR NC,64913
 64896 LD HL,26652
 64899 PUSH HL
 64900 LD A,(21266)
 64903 OR A
 64904 JR Z,64909
 64906 CALL 30577
*64909 POP HL
 64910 JP 22418
*64913 LD (21569),HL
 64916 POP BC
 64917 POP DE
 64918 PUSH BC
 64919 LD (HL),C
 64920 EX DE,HL
 64921 INC DE
 64922 LD B,0
 64924 LDIR
 64926 EX DE,HL
 64927 LD (HL),B
 64928 INC HL
 64929 LD (HL),B
 64930 DEC HL
 64931 POP BC
*64932 POP DE
 64933 PUSH HL
 64934 XOR A
 64935 LD B,A
 64936 INC BC
 64937 SBC HL,BC
 64939 LD A,(21566)
 64942 CP 2
 64944 JR NZ,64953
 64946 LD A,(22211)
 64949 OR A
 64950 CALL NZ,27936
*64953 INC D
 64954 DEC D
 64955 JR NZ,64982
 64957 LD A,(HL)
 64958 AND 128
 64960 LD DE,26685
 64963 CALL Z,25694
 64966 LD A,(HL)
 64967 AND 64
 64969 LD DE,26629
 64972 CALL NZ,25694
 64975 POP HL
@bfix=|CHKNASTY: BIT 1,H ; Is #REGhl pointing to a tile in the buffer at
@bfix=                   ; #N23552?
 64976 LD A,(HL)
 64977 INC HL
@bfix=|JP Z,37046        ; Kill Willy if so
 64978 LD H,(HL)
 64979 LD L,A
 64980 POP DE
 64981 RET
*64982 LD A,(HL)
 64983 OR A
 64984 JP P,27922
 64987 LD A,D
 64988 EX (SP),HL
 64989 POP BC
 64990 POP DE
 64991 PUSH DE
 64992 PUSH HL
 64993 PUSH AF
 64994 LD A,(HL)
 64995 INC HL
 64996 LD H,(HL)
 64997 LD L,A
 64998 RST 24
 64999 POP DE
@nowarn
 65000 JR Z,65030
 65002 LD A,(BC)
 65003 AND 95
 65005 DEFB 69,95,69,255,69,95,69,95,69,95,69,95,69,95,69,95
 65021 DEFB 69,145,53,210,68,161,66,121,68,84,0,122,68,189,68,69
 65037 DEFB 1,0,67,245,254,4,79,0,67,137,71,103,114,0,0,111
 65053 DEFB 73,38,77,0,76,0,67,54,77,204,76,153,76,191,100,65
 65069 DEFB 76,1,83,43,83,120,29,230,75,45,83,30,29,0,0,0
 65085 DEFB 122,68,189,68,69,1,0,67,245,254,4,79,0,67,137,71
 65101 DEFB 103,114,0,0,111,73,38,77,0,76,74,109,43,96,232,94
 65117 DEFB 66,0,40,96,74,109,14,95,44,0,71,109,143,27,70,84
 65133 DEFB 0,0,0,24,98,255,255,6
 65141 DEFM "TRSHDx"
*65147 LD HL,17480
 65150 LD (15422),HL
 65153 LD A,16
 65155 OUT (193),A
 65157 LD B,64
 65159 CALL 96
 65162 LD HL,32896
 65165 LD (15422),HL
 65168 LD A,12
 65170 OUT (193),A
 65172 EX (SP),HL
 65173 EX (SP),HL
 65174 IN A,(207)
 65176 CP 80
 65178 JR NZ,65147
 65180 XOR A
 65181 OUT (206),A
 65183 LD A,16
 65185 OUT (207),A
 65187 LD B,50
 65189 CALL 96
*65192 IN A,(207)
 65194 BIT 7,A
 65196 JR NZ,65192
 65198 BIT 0,A
 65200 JR NZ,65147
 65202 RET
 65203 DEFB 0,0
 65205 DEFM "TRSHDx(C) Copyright 1982 by LSI"
 65236 LD A,7
 65238 CP B
 65239 JR Z,65309
 65241 BIT 3,B
 65243 JR NZ,65247
 65245 XOR A
 65246 RET
*65247 BIT 2,B
 65249 PUSH HL
 65250 JR NZ,65300
 65252 BIT 1,B
 65254 JR Z,65259
 65256 LD HL,0
*65259 PUSH DE
 65260 CALL 65426
 65263 LD A,32
 65265 OUT (207),A
 65267 EX (SP),HL
 65268 EX (SP),HL
*65269 IN A,(207)
 65271 RLCA
 65272 JR C,65269
 65274 LD BC,200
 65277 INIR
 65279 IN A,(207)
 65281 RRCA
@keep
 65282 LD HL,65409
 65285 JR C,65357
 65287 POP DE
 65288 PUSH DE
 65289 LD A,D
 65290 CP (IY+9)
 65293 LD A,6
 65295 JR Z,65364
 65297 XOR A
 65298 JR 65364
*65300 CALL 65309
 65303 JR Z,65332
 65305 POP HL
 65306 LD A,15
 65308 RET
*65309 LD A,(IY+3)
 65312 AND 3
 65314 LD C,A
 65315 IN A,(192)
@bfix=|DEFB 220
@bfix=|FINDTILE: ADD HL,BC
@bfix=|CP (HL)
 65317 CALL C,3335
@nowarn
 65320 JR NZ,65318
@bfix=|LD C,E
@bfix=|INC HL
@bfix=|RET
 65322 OR (IY+3)
 65325 BIT 7,A
 65327 LD A,64
 65329 RET NZ
 65330 XOR A
 65331 RET
*65332 PUSH DE
 65333 LD A,B
 65334 CP 15
 65336 JR Z,65368
 65338 CP 12
 65340 LD A,8
 65342 JR Z,65364
 65344 CALL 65426
 65347 LD A,48
 65349 CALL 65498
 65352 JR Z,65364
@keep
*65354 LD HL,65417
*65357 IN A,(201)
*65359 RLCA
 65360 INC HL
 65361 JR NC,65359
 65363 LD A,(HL)
*65364 OR A
 65365 POP DE
 65366 POP HL
 65367 RET
*65368 LD A,(IY+7)
 65371 LD B,A
 65372 AND 31
 65374 LD E,A
 65375 XOR B
 65376 RLCA
 65377 RLCA
 65378 RLCA
 65379 INC A
 65380 LD B,A
*65381 PUSH BC
 65382 PUSH DE
 65383 CALL 65426
 65386 PUSH HL
 65387 LD A,(HL)
 65388 OUT (202),A
 65390 INC HL
 65391 LD A,80
 65393 CALL 65498
 65396 POP HL
 65397 POP DE
 65398 POP BC
 65399 JR NZ,65354
 65401 LD A,32
 65403 ADD A,E
 65404 LD E,A
 65405 DJNZ 65381
 65407 XOR A
 65408 JR 65364
 65410 DEFB 7,4,1,5,127,8,2,3
 65418 DEFB 14,12,9,13,127,8,10,11
*65426 PUSH HL
 65427 LD L,D
 65428 LD H,0
 65430 BIT 5,(IY+4)
 65434 JR Z,65437
 65436 ADD HL,HL
*65437 LD A,(IY+7)
 65440 PUSH DE
 65441 LD D,A
 65442 AND 31
 65444 LD E,A
 65445 INC E
 65446 LD C,E
 65447 XOR D
 65448 RLCA
 65449 RLCA
 65450 RLCA
 65451 INC A
 65452 CALL 19307
 65455 DEC A
 65456 POP DE
 65457 CP E
 65458 JR NC,65464
 65460 CPL
 65461 ADD A,E
 65462 LD E,A
 65463 INC HL
*65464 LD A,C
 65465 CALL 19322
 65468 LD D,A
 65469 LD A,(IY+4)
 65472 AND 15
 65474 ADD A,D
 65475 LD D,A
 65476 LD A,(IY+3)
 65479 AND 3
 65481 RLCA
 65482 RLCA
 65483 RLCA
 65484 OR D
 65485 OUT (206),A
 65487 LD A,E
 65488 OUT (203),A
 65490 LD A,L
 65491 OUT (204),A
 65493 LD A,H
 65494 OUT (205),A
 65496 POP HL
 65497 RET
*65498 OUT (207),A
 65500 LD BC,200
 65503 OTIR
 65505 EX (SP),HL
 65506 EX (SP),HL
*65507 IN A,(207)
 65509 RLCA
 65510 JR C,65507
 65512 IN A,(207)
 65514 AND 1
 65516 RET
 65517 DEFS 19
