Prev: B8AD Up: Map Next: B8DD
B8CC: Screen Address One Pixel Below
Used by the routines at HallOfFame_Clear and DrawRoom.
Calculates the address of the pixel line below the one at a screen address, taking into consideration the layout of the display file.
Input
HL Current screen address
Output
HL Screen address of the pixel line below
ScreenPosition1PixelBelow B8CC INC H Increment H to move down one pixel on screen.
B8CD LD A,H A=H.
B8CE AND %00000111 Keep only bits 0-2.
B8D0 RET NZ If a character line has not been crossed then return.
B8D1 LD A,L L=L+20.
B8D2 ADD A,$20
B8D4 LD L,A
B8D5 AND %11100000 Keep only bits 5-7.
B8D7 RET Z If a new section of the screen has not been crossed then return.
B8D8 LD A,H H=H-08.
B8D9 SUB $08
B8DB LD H,A
B8DC RET Return.
View the equivalent code in;
Prev: B8AD Up: Map Next: B8DD