![]() |
Routines |
| Prev: 28382 | Up: Map | Next: 28463 |
|
Used by the routines at MenuWriteText, HandlerCup, DisplayBestTime, DisplayPlaceName, PrintStringColour, FlashPlayerMarker, DisplayNightDriver, PlotPixels, PrepareOldSprite and PrepareActorSprite.
Converts pixel co-ordinates into the matching address in the screen buffer.
|
||||||||||||
| ScreenAddress | 28432 | LD A,L | A=L. | |||||||||
| 28433 | RRCA | A=A / 8. | ||||||||||
| 28434 | RRCA | |||||||||||
| 28435 | RRCA | |||||||||||
| 28436 | AND %00011111 | Keep only bits 0-4. | ||||||||||
| 28438 | LD L,A | L=A. | ||||||||||
| 28439 | LD A,H | A=H. | ||||||||||
| 28440 | RLCA | A=A * 4. | ||||||||||
| 28441 | RLCA | |||||||||||
| 28442 | AND %11100000 | Keep only bits 5-7. | ||||||||||
| 28444 | OR L | Set the bits from L. | ||||||||||
| 28445 | LD L,A | L=A. | ||||||||||
| 28446 | LD A,H | A=H. | ||||||||||
| 28447 | AND %00000111 | Keep only bits 0-2. | ||||||||||
| 28449 | EX AF,AF' | Switch to the shadow AF register. | ||||||||||
| 28450 | LD A,H | A=H. | ||||||||||
| 28451 | RRCA | A=A / 8. | ||||||||||
| 28452 | RRCA | |||||||||||
| 28453 | RRCA | |||||||||||
| 28454 | AND %00011000 | Keep only bits 3-4. | ||||||||||
| 28456 | OR %01000000 | Set bit 6. | ||||||||||
| 28458 | LD H,A | H=A. | ||||||||||
| 28459 | EX AF,AF' | Switch to the shadow AF register. | ||||||||||
| 28460 | OR H | Set the bits from H. | ||||||||||
| 28461 | LD H,A | H=A. | ||||||||||
| 28462 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 28382 | Up: Map | Next: 28463 |