Prev: 65DE Up: Map Next: 6630
65F3: Move player plane right by 2 pixels
This routine is called when the player presses right on the joystick or keyboard. It moves the plane 2 pixels to the right (INC A twice), backs up the missile coordinates, renders the plane at the new position, then restores the missile coordinates and sets the sprite bank selector.
handle_right 65F3 LD A,($5F72) Back up missile coordinates and move plane 2 pixels right.
65F6 LD HL,($5EF3)
65F9 LD ($5F8F),HL
65FC INC A
65FD INC A
65FE LD ($5F72),A
6601 LD C,A
6602 LD B,$80 Set position and collision mode (FUEL_DEPOT) for rendering.
6604 LD A,$01
6606 LD ($5EF5),A
6609 LD ($8B0C),BC
660D DEC C Calculate previous position for sprite erasure (2 pixels back).
660E DEC C
660F LD ($8B0A),BC
6613 LD BC,$0010 Configure sprite and render plane; use ship attributes for Player 2.
6616 LD HL,($5EF7)
6619 LD ($8B0E),HL
661C LD E,$0E
661E LD A,($923D)
6621 CP $02
6623 CALL Z,ld_attributes_ship
6626 LD D,$08
6628 LD A,$02
662A LD HL,$83F1
662D CALL render_object
Prev: 65DE Up: Map Next: 6630