![]() |
Routines |
| Prev: 59068 | Up: Map | Next: 59183 |
|
Used by the routines at InitialiseGame, AllTreasureCollected, PrintStatusBarIcons, PrintStatusBar, Handler_Items, PrintSpriteUpdateBuffer, PrintSprite and 61143.
|
||||||||
| PrintColourCharacter | 59100 | EXX | Switch to the shadow registers. | |||||
| 59101 | LD E,A | DE'=A*8. | ||||||
| 59102 | LD D,0 | |||||||
| 59104 | SLA E | |||||||
| 59106 | RL D | |||||||
| 59108 | SLA E | |||||||
| 59110 | RL D | |||||||
| 59112 | SLA E | |||||||
| 59114 | RL D | |||||||
| 59116 | LD HL,(23606) | HL'=*CHARS+DE'. | ||||||
| 59119 | ADD HL,DE | |||||||
| 59120 | LD DE,(23684) | Increment *DF_CC by one. | ||||||
| 59124 | INC DE | |||||||
| 59125 | LD (23684),DE | |||||||
| 59129 | DEC DE | Decrease DE' by one. | ||||||
|
All character blocks are 1 x 8 bytes.
Copy the data from the current character set to the screen buffer.
|
||||||||
| 59130 | LD B,8 | B'=8 (byte counter). | ||||||
| PrintColourCharacter_Loop | 59132 | LD A,(HL) | Fetch the byte from the character set. | |||||
| 59133 | LD (DE),A | Write the byte to the screen buffer. | ||||||
| 59134 | INC HL | Increment the character set data pointer in HL' by one. | ||||||
| 59135 | INC D | Move down one line in the screen buffer. | ||||||
| 59136 | DJNZ PrintColourCharacter_Loop | Decrease the byte counter by one and loop back to PrintColourCharacter_Loop until all lines of the letter have been written to the screen buffer. | ||||||
|
Calculate the attribute buffer position.
|
||||||||
| 59138 | LD BC,(23688) | BC'=*S_POSN. | ||||||
| 59142 | LD HL,22528 | HL'=22528 (attribute buffer location). | ||||||
| 59145 | DEC C | Decrease C' by one. | ||||||
| 59146 | LD (23688),BC | Write BC' to *S_POSN. | ||||||
| 59150 | INC C | Increment C' by one. | ||||||
| 59151 | LD A,33 | E'=33-C'. | ||||||
| 59153 | SUB C | |||||||
| 59154 | LD E,A | |||||||
| 59155 | LD D,0 | D'=0. | ||||||
| 59157 | ADD HL,DE | HL'+=DE'. | ||||||
| 59158 | LD A,24 | E'=24-B'. | ||||||
| 59160 | SUB B | |||||||
| 59161 | LD E,A | |||||||
| 59162 | SLA E | Shift E' left four positions (with carry). | ||||||
| 59164 | SLA E | |||||||
| 59166 | SLA E | |||||||
| 59168 | SLA E | |||||||
| 59170 | RL D | Rotate D' left. | ||||||
| 59172 | SLA E | Shift E' left (with carry). | ||||||
| 59174 | RL D | Rotate D' left. | ||||||
| 59176 | ADD HL,DE | HL'+=DE'. | ||||||
| 59177 | LD A,(23695) | A=*ATTR_T. | ||||||
| 59180 | LD (HL),A | Write A to *HL'. | ||||||
| 59181 | EXX | Switch back to the normal registers. | ||||||
| 59182 | RET | Return. | ||||||
| Prev: 59068 | Up: Map | Next: 59183 |