Routines |
Prev: 37695 | Up: Map | Next: 38063 |
Used by the routine at MainMenu.
|
|||||
|
|||||
MainMenu_ColourDartPointer | 37966 | LD A,(39414) | Fetch *DartPointer_Position and store it in A. | ||
37969 | ADD A,A | Double the value as the entries have spacing between them. | |||
37970 | ADD A,5 | Add 5 as the entries start five rows from the top of the screen. | |||
37972 | LD H,A | Store the result in H as the Y co-ordinate. | |||
37973 | LD L,1 | Store 1 in L as the X co-ordinate. | |||
This entry point is used by the routine at MainMenu.
|
|||||
PrintDartPointer | 37975 | LD A,L | Return if L is greater than 32. | ||
37976 | CP 32 | ||||
37978 | RET NC | ||||
37979 | 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.
|
|||||
37980 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
37983 | LD B,69 | Set the flight colour of INK: CYAN, PAPER: BLACK (BRIGHT) in B. | |||
37985 | LD DE,32 | Set one row length of 0032 in DE. | |||
37988 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
37989 | ADD HL,DE | Move down one row. | |||
37990 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
37991 | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
37992 | INC L | Move right one character block. | |||
37993 | LD A,L | Return if L is greater than 32. | |||
37994 | CP 32 | ||||
37996 | RET NC | ||||
37997 | 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.
|
|||||
37998 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
38001 | LD B,69 | Set the shaft colour of INK: CYAN, PAPER: BLACK (BRIGHT) in B. | |||
38003 | LD DE,32 | Set one row length of 0032 in DE. | |||
38006 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38007 | ADD HL,DE | Move down one row. | |||
38008 | LD (HL),B | Write INK: CYAN, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38009 | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
38010 | INC L | Move right one character block. | |||
38011 | LD A,L | Return if L is greater than 32. | |||
38012 | CP 32 | ||||
38014 | RET NC | ||||
38015 | 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.
|
|||||
38016 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
38019 | LD B,70 | Set the barrel colour of INK: YELLOW, PAPER: BLACK (BRIGHT) in B. | |||
38021 | LD DE,32 | Set one row length of 0032 in DE. | |||
38024 | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38025 | ADD HL,DE | Move down one row. | |||
38026 | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38027 | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
38028 | INC L | Move right one character block. | |||
38029 | LD A,L | Return if L is greater than 32. | |||
38030 | CP 32 | ||||
38032 | RET NC | ||||
38033 | 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.
|
|||||
38034 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
38037 | LD B,70 | Set the barrel colour of INK: YELLOW, PAPER: BLACK (BRIGHT) in B. | |||
38039 | LD DE,32 | Set one row length of 0032 in DE. | |||
38042 | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38043 | ADD HL,DE | Move down one row. | |||
38044 | LD (HL),B | Write INK: YELLOW, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38045 | POP HL | Restore the dart attribute co-ordinates from the stack. | |||
38046 | INC L | Move right one character block. | |||
38047 | LD A,L | Return if L is greater than 32. | |||
38048 | CP 32 | ||||
38050 | RET NC | ||||
Lastly, colour the point.
Convert the co-ordinates to an actual attribute buffer memory location.
|
|||||
38051 | CALL CalculateAttributeBuffer | Call CalculateAttributeBuffer. | |||
38054 | LD B,71 | Set the barrel colour of INK: WHITE, PAPER: BLACK (BRIGHT) in B. | |||
38056 | LD DE,32 | Set one row length of 0032 in DE. | |||
38059 | LD (HL),B | Write INK: WHITE, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38060 | ADD HL,DE | Move down one row. | |||
38061 | LD (HL),B | Write INK: WHITE, PAPER: BLACK (BRIGHT) to the attribute buffer pointer. | |||
38062 | RET | Return. |
Prev: 37695 | Up: Map | Next: 38063 |