![]() |
Routines |
| Prev: 48142 | Up: Map | Next: 48210 |
|
Used by the routines at Draw_3Wide_Sprite_Column and Draw_2Wide_Sprite_Column.
Adjusts the screen buffer address in HL when a pixel row crosses a character cell boundary.
|
||||||||||||
| Adjust_Screen_Address | 48183 | LD A,L | Load the low byte of the screen address. | |||||||||
| 48184 | DEC H | Undo the previous row increment and test if the next character row would cross into the next screen third. | ||||||||||
| 48185 | CPL | |||||||||||
| 48186 | AND %11100000 | |||||||||||
| 48188 | JR Z,Next_Screen_Third | Jump to Next_Screen_Third if crossing into the next screen third. | ||||||||||
| 48190 | LD A,L | Add 32 to L to move to the next character row. | ||||||||||
| 48191 | ADD A,32 | |||||||||||
| 48193 | LD L,A | |||||||||||
| 48194 | LD A,H | Mask H to reset the pixel row bits. | ||||||||||
| 48195 | AND %11111000 | |||||||||||
| 48197 | LD H,A | |||||||||||
| 48198 | RET | Return. | ||||||||||
| Next_Screen_Third | 48199 | LD A,L | Mask L to keep only the column bits. | |||||||||
| 48200 | AND %00011111 | |||||||||||
| 48202 | LD L,A | |||||||||||
| 48203 | LD A,H | Mask H and add 8 to advance to the next screen third. | ||||||||||
| 48204 | AND %11111000 | |||||||||||
| 48206 | ADD A,8 | |||||||||||
| 48208 | LD H,A | |||||||||||
| 48209 | RET | Return. | ||||||||||
| Prev: 48142 | Up: Map | Next: 48210 |