Prev: CC5E Up: Map Next: CC89
CC5F: Animate the river
Used by the routine at C800.
CC5F LD A,($CFCA) Get the current room. (CFCA).
CC62 CP $08 Is it greater than 8?
CC64 RET NC Return if it is, the room's not by the river.
CC65 LD HL,$CC5E Get the river's animation frame. (CC5E)
CC68 DEC (HL) Decrement it, and return if it's not zero.
CC69 JR Z,$CC6C
CC6B RET
The river needs updating.
CC6C LD (HL),$03 Set the tick count back to 3.
CC6E LD DE,$5060 Load DE at the correct place on screen.
CC71 LD C,$03 3 rows to update.
CC73 PUSH DE Remember DE.
CC74 LD A,(DE) Get the next byte of the river.
CC75 LD H,A Store it in H.
CC76 INC E Move to the next column.
CC77 LD B,$1F 1F columns to update.
CC79 LD A,(DE) Move this graphic data to the previous column.
CC7A DEC E
CC7B LD (DE),A
CC7C INC E Move back to this column, then onto the next one.
CC7D INC E
CC7E DJNZ $CC79 Loop while there are more columns to copy.
CC80 DEC E Move back to the last column.
CC81 LD A,H Put the old value of the first column (that was in H) here.
CC82 LD (DE),A
CC83 POP DE Restore DE.
CC84 INC D Move up a row.
CC85 DEC C Loop until all row have been updated.
CC86 JR NZ,$CC73
CC88 RET
Prev: CC5E Up: Map Next: CC89