![]() |
Routines |
| Prev: 28210 | Up: Map | Next: 28382 |
|
||||||||||||
|
Calculates the new address for writing a sprite pixel, in an upward direction, taking into consideration the screen memory layout.
|
||||||||||||
| ScreenPos1PixelAbove | 28363 | DEC H | Decrement H to move up one pixel on screen. | |||||||||
| 28364 | LD A,H | Store the inverted result in A. | ||||||||||
| 28365 | CPL | |||||||||||
| 28366 | AND %00000111 | Keep only bits 0-2. | ||||||||||
| 28368 | RET NZ | If a character line has not been crossed then return. | ||||||||||
| 28369 | LD A,L | Else subtract 32 from L. | ||||||||||
| 28370 | SUB 32 | |||||||||||
| 28372 | LD L,A | |||||||||||
| 28373 | CPL | Invert the bits in A. | ||||||||||
| 28374 | AND %11100000 | Keep only bits 5-7. | ||||||||||
| 28376 | RET Z | If a new section of the screen has not been crossed then return. | ||||||||||
| 28377 | LD A,H | Else add 8 to H and return. | ||||||||||
| 28378 | ADD A,8 | |||||||||||
| 28380 | LD H,A | |||||||||||
| 28381 | RET | |||||||||||
| Prev: 28210 | Up: Map | Next: 28382 |