Prev: 90A3 Up: Map Next: 90BD
90A8: Animate water
Used by the routines at 8F9F and CDEF.
Input
HL Starting screen address of the water
C Width of the water in UDGs
90A8 DEC C Copy is from 0 to width - 1.
90A9 LD B,$03 3 rows to draw.
90AB PUSH BC Remember this.
90AC LD B,$00 Set B to 0 so that BC can be used as a length.
90AE PUSH HL Remember the screen address.
90AF LD A,(HL) Get the next byte.
90B0 RLCA Shift all bytes left and store the new value.
90B1 LD (HL),A
90B2 LD D,H Copy everything 1 byte forward.
90B3 LD E,L
90B4 INC DE
90B5 LDIR
90B7 POP HL Restore the screen address.
90B8 INC H Move to next row.
90B9 POP BC Restore count of rows.
90BA DJNZ $90AB Loop if there is more to do.
90BC RET Otherwise return.
Prev: 90A3 Up: Map Next: 90BD