Prev: D607 Up: Map Next: D655
D61E: Fall through the air one frame
Used by the routines at D607 and DBEE.
Input
A Current Y co-ordinate
D61E INC A Add 2 to the Y co-ordinate and set it.
D61F INC A
D620 LD ($C872),A
D623 LD A,($C87B) Get some lift flags. (C87B)
D626 BIT 2,A Is Dan standing on the lift?
D628 JR NZ,$D639 Jump forward if so.
Dan is in mid air.
D62A LD A,($CFCB) Get the note to play while falling.
D62D DEC A Decrement the note to 0, then start again from 00C, cycling repeatedly.
D62E AND A
D62F JR NZ,$D633
D631 LD A,$0C
D633 LD ($CFCB),A
D636 CALL $DB01 Play the "falling through air" sound.
Update the graphic buffer, shifting everything down by two rows.
D639 LD HL,$62D6 Point HL to Dan's current graphic (62D6)
D63C PUSH HL Remember this value.
D63D LD BC,$0006 Move forward 2 rows.
D640 ADD HL,BC
D641 POP DE Restore the original pointer.
D642 LD BC,$004E Copy all the data forward.
D645 LDIR
D647 EX DE,HL
Now copy the data from the row below into the buffer.
D648 LD DE,($C872) Get Dan's Y co-ordinate in DE.
D64C LD A,$1A Add 01A to the X co-ordinate.
D64E ADD A,E
D64F LD E,A
D650 CALL $D655 Copy the data to the working buffer.
D653 EXX Swap registers and return.
D654 RET
Prev: D607 Up: Map Next: D655