Prev: 50613 Up: Map Next: 50712
50663: Set up tunnel
Set up vertical tunnel sections. Like with 'standard' rooms, the first entry in the room data sets at 31744 is the generic position/viewport/co-ordinates for the tunnel as a whole, before dealing with the individual on-screen items.
spider in vertical scrolling tunnel
50663 LD A,15
50665 LD (60227),A Graphic type = 15 - this is the value for the generic tunnel screen position/viewport
50668 LD A,0
50670 LD (60231),A Set horizontal room position to 0 (overflow/fraction byte)
50673 LD (60233),A Set vertical room position to 0 (overflow/fraction byte)
50676 LD (60236),A Set horizontal movement speed to 0
50679 LD (60237),A Set vertical movement speed to 0
50682 LD A,255
50684 LD (60235),A Byte indicating general tunnel element
50687 LD A,28 Horizontal position, in half-character/4-pixel steps
Tunnel starting position is at the top of the screen, in the middle (14 character spaces).
50689 LD (60232),A
50692 LD A,0 Vertical position, in pixels, from the top of the playing area.
50694 LD (60234),A
50697 LD A,1 Animation frame number offset (= no offset)
50699 LD (60240),A
50702 LD A,124 Offset for graphics address table at 38851, starting at 'dummy' graphic (39097/44444) as nothing actually needs drawing
50704 CALL 57538 Set up 'dummy' graphic - used for tunnel 'entity'
50707 LD A,%00000101 Set bits 0 (1) = item visible and 2 (4) = item will need erasing (item default setting)
50709 LD (60238),A Store as item properties byte
Prev: 50613 Up: Map Next: 50712