![]() |
Routines |
| Prev: 933F | Up: Map | Next: 94AF |
|
Used by the routine at MainMenu.
|
|||||
|
|||||
| MainMenu_ColourDartPointer | 944E | LD A,($99F6) | Fetch *DartPointer_Position and store it in A. | ||
| 9451 | ADD A,A | Double the value as the entries have spacing between them. | |||
| 9452 | ADD A,$05 | Add 05 as the entries start five rows from the top of the screen. | |||
| 9454 | LD H,A | Store the result in H as the Y co-ordinate. | |||
| 9455 | LD L,$01 | Store 01 in L as the X co-ordinate. | |||
|
This entry point is used by the routine at MainMenu.
|
|||||
| PrintDartPointer | 9457 | LD A,L | Return if L is greater than 20. | ||
| 9458 | CP $20 | ||||
| 945A | RET NC | ||||
| 945B | PUSH HL | Stash the dart attribute co-ordinates on the stack. | |||
|
First colour the flight.
Convert the co-ordinates to an actual attribute buffer memory location.
|
|||||
| 945C | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
| 945F | LD B,$45 | Set the flight colour of INK: CYAN, PAPER: BLACK (BRIGHT) in B. | |||
| 9461 | LD DE,$0020 | Set one row length of 0020 in DE. | |||
| 9464 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 9465 | ADD HL,DE | Move down one row. | |||
| 9466 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 9467 | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
| 9468 | INC L | Move right one character block. | |||
| 9469 | LD A,L | Return if L is greater than 20. | |||
| 946A | CP $20 | ||||
| 946C | RET NC | ||||
| 946D | PUSH HL | Stash the dart attribute co-ordinates on the stack. | |||
|
Now the shaft.
Again, convert the co-ordinates to an actual attribute buffer memory location.
|
|||||
| 946E | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
| 9471 | LD B,$45 | Set the shaft colour of INK: CYAN, PAPER: BLACK (BRIGHT) in B. | |||
| 9473 | LD DE,$0020 | Set one row length of 0020 in DE. | |||
| 9476 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 9477 | ADD HL,DE | Move down one row. | |||
| 9478 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 9479 | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
| 947A | INC L | Move right one character block. | |||
| 947B | LD A,L | Return if L is greater than 20. | |||
| 947C | CP $20 | ||||
| 947E | RET NC | ||||
| 947F | PUSH HL | Stash the dart attribute co-ordinates on the stack. | |||
|
Move onto the barrel.
Convert the co-ordinates to an actual attribute buffer memory location.
|
|||||
| 9480 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
| 9483 | LD B,$46 | Set the barrel colour of INK: YELLOW, PAPER: BLACK (BRIGHT) in B. | |||
| 9485 | LD DE,$0020 | Set one row length of 0020 in DE. | |||
| 9488 | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 9489 | ADD HL,DE | Move down one row. | |||
| 948A | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 948B | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
| 948C | INC L | Move right one character block. | |||
| 948D | LD A,L | Return if L is greater than 20. | |||
| 948E | CP $20 | ||||
| 9490 | RET NC | ||||
| 9491 | PUSH HL | Stash the dart attribute co-ordinates on the stack. | |||
|
Continue on with the barrel.
Convert the co-ordinates to an actual attribute buffer memory location.
|
|||||
| 9492 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
| 9495 | LD B,$46 | Set the barrel colour of INK: YELLOW, PAPER: BLACK (BRIGHT) in B. | |||
| 9497 | LD DE,$0020 | Set one row length of 0020 in DE. | |||
| 949A | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 949B | ADD HL,DE | Move down one row. | |||
| 949C | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 949D | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
| 949E | INC L | Move right one character block. | |||
| 949F | LD A,L | Return if L is greater than 20. | |||
| 94A0 | CP $20 | ||||
| 94A2 | RET NC | ||||
|
Lastly, colour the point.
Convert the co-ordinates to an actual attribute buffer memory location.
|
|||||
| 94A3 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
| 94A6 | LD B,$47 | Set the barrel colour of INK: WHITE, PAPER: BLACK (BRIGHT) in B. | |||
| 94A8 | LD DE,$0020 | Set one row length of 0020 in DE. | |||
| 94AB | LD (HL),B | Write INK: WHITE, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 94AC | ADD HL,DE | Move down one row. | |||
| 94AD | LD (HL),B | Write INK: WHITE, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
| 94AE | RET | Return. | |||
| Prev: 933F | Up: Map | Next: 94AF |