Prev: 83B5 Up: Map Next: 848C
8452: Redraw Monty after jumping or falling
Used by the routines at 8A63 and 8B1F.
Input
A Current Y co-ordinate
8452 LD L,A Double the Y co-ordinate to get a word offset.
8453 LD H,$00
8455 ADD HL,HL
8456 LD DE,$EA60 Get the appropriate pointer to a screen offset and store it in 8499.
8459 ADD HL,DE
845A LD ($8499),HL
845D LD B,$02 Draw 2 rows.
845F LD A,(HL) Put the actual screen address in HL.
8460 INC HL
8461 LD H,(HL)
8462 LD L,A
8463 LD D,$00 Store the top 5 bits of the X co-ordinate in DE.
8465 LD A,($5C7B)
8468 SRL A
846A SRL A
846C SRL A
846E LD E,A
846F ADD HL,DE Add this to get the actual screen address.
8470 EX DE,HL Add a offset to give an address in the screen buffer at D260.
8471 LD HL,$9260
8474 ADD HL,DE
8475 LD A,(HL) Get the graphic data.
8476 EX DE,HL Set it.
8477 LD (HL),A
8478 INC HL Move forward to the next cell.
8479 INC DE
847A EX DE,HL Get the graphic data.
847B LD A,(HL)
847C EX DE,HL Set it.
847D LD (HL),A
847E INC HL Move forward to the next cell.
847F INC DE
8480 EX DE,HL Get the graphic data.
8481 LD A,(HL)
8482 EX DE,HL Set it.
8483 LD (HL),A
8484 LD HL,($8499) Get the screen offset.
8487 DEC HL Move up an entry.
8488 DEC HL
8489 DJNZ $845F Loop until both rows have been drawn. }å
848B RET
Prev: 83B5 Up: Map Next: 848C