Prev: B8E2 Up: Map Next: B913
B8F9: Move View
Used by the routines at ScrollViewDown and ScrollViewUp.
Moves the view by adding a value to 5CE4 and subtracting it from ViewOriginDifference and ViewPosition.
Input
DE The amount
MoveView B8F9 LD HL,($5CE4) Fetch the word at 5CE4 into HL.
B8FC ADD HL,DE HL takes DE.
B8FD LD ($5CE4),HL Write HL at 5CE4.
B900 LD HL,($5CEE) Fetch the word at ViewOriginDifference into HL.
B903 AND A See whether A is zero.
B904 SBC HL,DE Subtract DE from HL. (with the carry)
B906 LD ($5CEE),HL Write HL at ViewOriginDifference.
B909 LD HL,($5CE2) Fetch the word at ViewPosition into HL.
B90C AND A See whether A is zero.
B90D SBC HL,DE Subtract DE from HL. (with the carry)
B90F LD ($5CE2),HL Write HL at ViewPosition.
B912 RET Return.
Prev: B8E2 Up: Map Next: B913