Routines |
Prev: DC4B | Up: Map | Next: DCD1 |
Used by the routines at Handler_Bonus, DABF, Print_Numbers, MoveTile_Right, MoveTile_Left, MoveTile_Down, MoveTile_Up, Print_HelperPreviewImage, Draw_Tile, Draw_Cursor, Print_Score, Print_Level and StaticAnimation.
|
||||||||||||||
Calculate_ScreenBlockAddress | DCC2 | LD A,B | Load the X position into A. | |||||||||||
DCC3 | AND %11111000 | Divide X by 08 to extract only the column number. | ||||||||||||
DCC5 | ADD A,$40 | Add 40 to get the high byte of screen address and store the result in H. | ||||||||||||
DCC7 | LD H,A | |||||||||||||
DCC8 | LD A,B | Load the X position into A again. | ||||||||||||
DCC9 | AND %00000111 | Extract only the pixel offset within the character block. | ||||||||||||
DCCB | RRCA | Multiply A by 20. | ||||||||||||
DCCC | RRCA | |||||||||||||
DCCD | RRCA | |||||||||||||
DCCE | ADD A,C | Add the Y co-ordinate store the result in L. | ||||||||||||
DCCF | LD L,A | |||||||||||||
DCD0 | RET | Return. |
Prev: DC4B | Up: Map | Next: DCD1 |