Prev: C1FD Up: Map Next: C29A
C28A: 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 C28A DEC D Move up a pixel row, and return if that is still in the same character row.
C28B LD A,D
C28C CPL
C28D AND $07
C28F RET NZ
C290 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).
C291 SUB $20
C293 LD E,A
C294 RET C
C295 LD A,D Otherwise go to the bottom pixel row of the character row above in the same third of the screen.
C296 ADD A,$08
C298 LD D,A
C299 RET Return.
View the equivalent code in;
Prev: C1FD Up: Map Next: C29A