Routines
 Prev: 703D Up: Map Next: 7067
7048: Make BOY WANDER fire his catapult (4)
The address of this uninterruptible subcommand routine is placed into bytes 0x6F and 0x70 of BOY WANDER's buffer by the routine at 703D. At this point BOY WANDER's catapult is fully raised, and so a pellet is launched.
Input
H 0xA7 (BOY WANDER)
7048 LD L,\$6F Replace the address of this uninterruptible subcommand routine in bytes 0x6F and 0x70 of BOY WANDER's buffer with 7067
704A LD (HL),\$67
704C LD L,\$60 Byte 0x60 of BOY WANDER's buffer holds his animatory state (0x39/0xB9)
704E LD A,(HL) Pick this up in A
704F ADD A,\$46 Now A=0x7F or 0xFF (catapult pellet)
7051 INC L Pick up BOY WANDER's coordinates in DE
7052 LD D,(HL)
7053 INC L
7054 LD E,(HL)
7055 LD H,\$AA 0xAA=character number of BOY WANDER's catapult pellet
This entry point is used by the routine at F41F with H=0xAB (ERIC's catapult pellet).
7057 LD (HL),E Fill in the initial coordinates and animatory state of the catapult pellet
7058 DEC L
7059 LD (HL),D
705A DEC L
705B LD (HL),A
705C LD L,\$6F Place the address of the uninterruptible subcommand routine at 6D1C into bytes 0x6F and 0x70 of the catapult pellet's buffer
705E LD (HL),\$1C
7060 INC L
7061 LD (HL),\$6D
7063 INC L Initialise the pellet's remaining distance to travel (13 spaces)
7064 LD (HL),\$0D
7066 RET
 Prev: 703D Up: Map Next: 7067