Prev: 47277 Up: Map Next: 47325
47308: Screen Address One Pixel Below
Used by the routines at HallOfFame and DrawRoom.
Input
HL Current position
Output
HL Address for new position
Calculates the new address for writing a sprite pixel, in a downward direction, taking into consideration the screen memory layout.
ScreenPos1PixelBelow 47308 INC H Increment H to move down one pixel on screen.
47309 LD A,H Stash H in A temporarily.
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.
Prev: 47277 Up: Map Next: 47325