![]() |
Routines |
| Prev: 62826 | Up: Map | Next: 62956 |
|
Used by the routines at JumpTable_SetPrintPosition, Draw_Box, Draw_StatusIcons, Draw_StatusIcons_Branch, Print_Message, Print_Sprite, Draw_Entity and Fill_Tiles.
Sets the print position from BC.
|
||||
| Set_PrintPosition | 62916 | LD (23688),BC | Write BC to *S_POSN. | |
| 62920 | EXX | Switch to the shadow registers. | ||
| 62921 | LD BC,(23688) | Fetch the stored position and clear A, D and B. | ||
| 62925 | LD E,B | |||
| 62926 | XOR A | |||
| 62927 | LD D,A | |||
| 62928 | LD B,A | |||
| 62929 | LD HL,65282 | Look up the line address from the table at 65282. | ||
| 62932 | SLA E | |||
| 62934 | ADD HL,DE | |||
| 62935 | LD E,(HL) | Subtract the column and write *DF_CC. | ||
| 62936 | INC HL | |||
| 62937 | LD D,(HL) | |||
| 62938 | EX DE,HL | |||
| 62939 | SBC HL,BC | |||
| 62941 | LD (23684),HL | |||
| 62944 | LD A,H | Rotate the high byte into an attribute offset. | ||
| 62945 | RRCA | |||
| 62946 | RRCA | |||
| 62947 | RRCA | |||
| 62948 | AND %00000011 | Keep only bits 0-1. | ||
| 62950 | LD H,A | Write the offset to *Print_BufferOffset. | ||
| 62951 | LD (25618),HL | |||
| 62954 | EXX | Switch back. | ||
| 62955 | RET | Return. | ||
| Prev: 62826 | Up: Map | Next: 62956 |