![]() |
Routines |
| Prev: 9924 | Up: Map | Next: 9970 |
|
Used by the routine at DrawItemGraphic.
Draws a graphic on the screen. The way that it is drawn depends on bits 5-7 of the attribute, which choose one of the handlers in DrawGraphicHandlers. Bits 0-1 choose how it is mixed with what is already on the screen (see GetBlendInstruction).
|
|||||||||||||||||||||||||||||||||||||||||
| DrawGraphic | 9962 | LD HL,$9970 | Point HL at the draw graphic handlers at DrawGraphicHandlers. | ||||||||||||||||||||||||||||||||||||||
|
This entry point is used by the routine at SetGraphicAttributes.
This is also used by SetGraphicAttributes, with a different table of handlers.
|
|||||||||||||||||||||||||||||||||||||||||
| DrawGraphic_Dispatch | 9965 | PUSH BC | Stash the attribute and graphic ID on the stack. | ||||||||||||||||||||||||||||||||||||||
| 9966 | LD A,B | Fetch the attribute. | |||||||||||||||||||||||||||||||||||||||
| 9967 | RLCA | Rotate A left three times, to move bits 5-7 to bits 0-2. | |||||||||||||||||||||||||||||||||||||||
| 9968 | RLCA | ||||||||||||||||||||||||||||||||||||||||
| 9969 | RLCA | ||||||||||||||||||||||||||||||||||||||||
| 996A | AND %00000111 | Keep only bits 0-2. | |||||||||||||||||||||||||||||||||||||||
| 996C | LD C,A | Keep the type of handler in C. | |||||||||||||||||||||||||||||||||||||||
| 996D | JP ProcessAction_Offset | Jump to ProcessAction_Offset, which jumps to the handler in the table at HL. | |||||||||||||||||||||||||||||||||||||||
| Prev: 9924 | Up: Map | Next: 9970 |