![]() |
Routines |
| Prev: B8AD | Up: Map | Next: B8DD |
|
Used by the routines at HallOfFame and DrawRoom.
|
||||||||||||
|
Calculates the new address for writing a sprite pixel, in a downward direction, taking into consideration the screen memory layout.
|
||||||||||||
| ScreenPos1PixelBelow | B8CC | INC H | Increment H to move down one pixel on screen. | |||||||||
| B8CD | LD A,H | Stash H in A temporarily. | ||||||||||
| 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. | ||||||||||
| Prev: B8AD | Up: Map | Next: B8DD |