![]() |
Routines |
| Prev: 54625 | Up: Map | Next: 54677 |
|
Used by the routine at DrawGameScreen.
Draws the picture of the revolver, which is a block of eight by eight tiles, and then colours the chambers which are loaded.
|
|||||
|
Draw the picture of the revolver.
|
|||||
| DrawRevolverDisplay | 54629 | LD A,65 | Set the attribute to INK:BLUE, PAPER:BLACK (BRIGHT). | ||
| 54631 | EX AF,AF' | ||||
| 54632 | LD HL,20484 | Point HL at 20484 (in the screen buffer). | |||
|
Move it to the right in the town.
|
|||||
| 54635 | CALL AddTownOffsetToHL | Call AddTownOffsetToHL. | |||
| 54638 | LD DE,24145 | Point DE at RevolverTilesDisplay. | |||
| 54641 | LD BC,2056 | Set the size of the block to eight by eight. | |||
|
Draw the block.
|
|||||
| 54644 | CALL DrawTileBlock | Call DrawTileBlock. | |||
|
Colour the chambers which are loaded.
|
|||||
| 54647 | LD A,(41570) | Return if BulletsLoaded is zero. | |||
| 54650 | AND A | ||||
| 54651 | RET Z | ||||
| 54652 | LD E,A | Keep the number in E. | |||
| 54653 | XOR A | Start with the first chamber. | |||
|
Colour a loaded chamber.
|
|||||
| DrawRevolverDisplay_Chamber | 54654 | PUSH AF | Stash the chamber number and the number of bullets on the stack. | ||
| 54655 | PUSH DE | ||||
| 54656 | LD BC,51680 | Point BC at ChamberAddresses. | |||
|
Find the attribute address of the chamber.
|
|||||
| 54659 | CALL GetTableEntry | Call GetTableEntry. | |||
|
Move it to the right in the town.
|
|||||
| 54662 | CALL AddTownOffsetToHL | Call AddTownOffsetToHL. | |||
| 54665 | LD A,113 | Set the attribute to INK:BLUE, PAPER:YELLOW (BRIGHT). | |||
|
Colour the chamber.
|
|||||
| 54667 | CALL FillChamber | Call FillChamber. | |||
| 54670 | POP DE | Restore the chamber number and the number of bullets from the stack. | |||
| 54671 | POP AF | ||||
| 54672 | INC A | Move on to the next chamber. | |||
| 54673 | CP E | Jump to DrawRevolverDisplay_Chamber if there are chambers left. | |||
| 54674 | JR NZ,DrawRevolverDisplay_Chamber | ||||
| 54676 | RET | Return. | |||
| Prev: 54625 | Up: Map | Next: 54677 |