Prev: 51608 Up: Map Next: 51651
51614: Adjust View Origin
Used by the routines at BuildView and ScrollViewLeft.
Adds an amount to the origin of the view, which is held in ViewPosition, 23780 and ViewOriginSum, and changes the scroll position at DrawingFlags to suit.
Input
E The amount
D The high byte of the amount, which is cleared by this entry point
AdjustViewOrigin 51614 LD D,0 The amount is a single byte.
This entry point is used by the routines at BuildView and ScrollViewRight.
AdjustViewOrigin_Signed 51616 LD HL,(23778) Add the amount to the first origin.
51619 ADD HL,DE
51620 LD (23778),HL
51623 LD HL,(23780) Add the amount to the second origin.
51626 ADD HL,DE
51627 LD (23780),HL
51630 LD HL,(23783) Add the amount twice to the view origin.
51633 ADD HL,DE
51634 ADD HL,DE
51635 LD (23783),HL
51638 LD A,(23792) The scroll flags move the other way, by twice the amount.
51641 LD B,A
51642 LD A,E
51643 NEG
51645 ADD A,A
51646 ADD A,B
51647 LD (23792),A
51650 RET Return.
Prev: 51608 Up: Map Next: 51651