![]() |
Routines |
| Prev: F56A | Up: Map | Next: F5EC |
|
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 | F5C4 | LD ($5C88),BC | Write BC to *S_POSN. | |
| F5C8 | EXX | Switch to the shadow registers. | ||
| F5C9 | LD BC,($5C88) | Fetch the stored position and clear A, D and B. | ||
| F5CD | LD E,B | |||
| F5CE | XOR A | |||
| F5CF | LD D,A | |||
| F5D0 | LD B,A | |||
| F5D1 | LD HL,$FF02 | Look up the line address from the table at FF02. | ||
| F5D4 | SLA E | |||
| F5D6 | ADD HL,DE | |||
| F5D7 | LD E,(HL) | Subtract the column and write *DF_CC. | ||
| F5D8 | INC HL | |||
| F5D9 | LD D,(HL) | |||
| F5DA | EX DE,HL | |||
| F5DB | SBC HL,BC | |||
| F5DD | LD ($5C84),HL | |||
| F5E0 | LD A,H | Rotate the high byte into an attribute offset. | ||
| F5E1 | RRCA | |||
| F5E2 | RRCA | |||
| F5E3 | RRCA | |||
| F5E4 | AND %00000011 | Keep only bits 0-1. | ||
| F5E6 | LD H,A | Write the offset to *Print_BufferOffset. | ||
| F5E7 | LD ($6412),HL | |||
| F5EA | EXX | Switch back. | ||
| F5EB | RET | Return. | ||
| Prev: F56A | Up: Map | Next: F5EC |