Prev: 907B Up: Map Next: 919E
917C: Routine at 917C
Used by the routines at 919E and 9356.
Input
HL Terrain Buffer?
917C PUSH HL Stash HL and DE on the stack.
917D PUSH DE
917E LD L,(HL)
917F LD H,$00 H=00.
9181 ADD HL,HL HL=HL^03.
9182 ADD HL,HL
9183 ADD HL,HL
9184 LD DE,$F66E DE=TerrainUDGs.
9187 ADD HL,DE HL=HL+DE.
9188 LD B,$08 B=08.
918A POP DE Restore DE from the stack, but stash a copy of it again.
918B PUSH DE
918C LD A,(HL)
918D LD (DE),A
918E INC HL Increment HL by one.
918F INC D Increment D by one.
9190 DJNZ $918C
9192 POP DE
9193 LD A,E
9194 ADD A,$20
9196 LD E,A
9197 LD A,D
9198 ADC A,$00
919A LD D,A
919B POP HL
919C INC HL
919D RET Return.
Prev: 907B Up: Map Next: 919E