Prev: 47277 Up: Map Next: 47325
47308: 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 47308 INC H Increment H to move down one pixel on screen.
47309 LD A,H A=H.
47310 AND %00000111 Keep only bits 0-2.
47312 RET NZ If a character line has not been crossed then return.
47313 LD A,L L=L+32.
47314 ADD A,32
47316 LD L,A
47317 AND %11100000 Keep only bits 5-7.
47319 RET Z If a new section of the screen has not been crossed then return.
47320 LD A,H H=H-8.
47321 SUB 8
47323 LD H,A
47324 RET Return.
View the equivalent code in;
Prev: 47277 Up: Map Next: 47325