Prev: 49661 Up: Map Next: 49818
49802: Screen Address One Pixel Above
Used by the routine at DrawMonsterIcons.
Moves a screen address up by one row of pixels.
Input
DE Screen address
Output
DE The screen address one row of pixels above
ScreenPosition1PixelAbove 49802 DEC D Move up a pixel row, and return if that is still in the same character row.
49803 LD A,D
49804 CPL
49805 AND 7
49807 RET NZ
49808 LD A,E Move up a character row, and return if that crossed into the previous third of the screen (the carry flag is set).
49809 SUB 32
49811 LD E,A
49812 RET C
49813 LD A,D Otherwise go to the bottom pixel row of the character row above in the same third of the screen.
49814 ADD A,8
49816 LD D,A
49817 RET Return.
View the equivalent code in;
Prev: 49661 Up: Map Next: 49818