![]() |
Routines |
| Prev: 33267 | Up: Map | Next: 33375 |
|
||||||||
| 33319 | LD C,H | Store screen display address high byte in C register | ||||||
| 33320 | LD A,(35759) | Get number of columns to draw | ||||||
| 33323 | LD (35761),A | Store as a counter | ||||||
| 33326 | LD H,C | Retrieve screen display address from C register | ||||||
| 33327 | LD B,8 | 8 pixel lines to draw | ||||||
| 33329 | LD DE,(31940) | Retrieve address pointing to graphics to draw | ||||||
|
Draw a series of character column graphics:
|
||||||||
| 33333 | LD A,(DE) | ...get graphics byte | ||||||
| 33334 | LD (HL),A | ...and copy it to the screen | ||||||
| 33335 | INC H | Increment screen display position (move down one pixel line) | ||||||
| 33336 | INC DE | ...and move to next graphic byte | ||||||
| 33337 | DJNZ 33333 | Repeat until 8 pixel lines printed | ||||||
| 33339 | INC L | Move right 1 square on screen | ||||||
| 33340 | LD A,(35761) | Retrieve the graphic column counter | ||||||
| 33343 | DEC A | ...Decrement it... | ||||||
| 33344 | LD (35761),A | ...And re-store it... | ||||||
| 33347 | JR NZ,33326 | Keep drawing until column counter = 0 | ||||||
|
Recalculate screen display address for next character row of graphics:
|
||||||||
| 33349 | LD A,(35759) | Retrieve column counter | ||||||
| 33352 | LD B,A | |||||||
| 33353 | LD A,33 | Subtract from 33 to get next line offset position | ||||||
| 33355 | SUB B | |||||||
| 33356 | DEC L | L was incremented before finishing earlier so move back a space | ||||||
| 33357 | ADD A,L | Add the offset so we're at the correct position for the next character row | ||||||
| 33358 | LD L,A | |||||||
| 33359 | JR NC,33365 | Check that we're not crossing a 1/3 screen boundary | ||||||
| 33361 | LD A,C | Crossing a 1/3 screen boundary, so | ||||||
| 33362 | ADD A,8 | Amend the screen display address by adding 8 | ||||||
| 33364 | LD C,A | ...and store byte in C for retrieval later | ||||||
|
Check if any more graphics need drawing:
|
||||||||
| 33365 | LD A,(35760) | Retrieve row counter | ||||||
| 33368 | DEC A | Decrement and re-store it | ||||||
| 33369 | LD (35760),A | |||||||
| 33372 | JR NZ,33320 | Continue drawing until counter = 0 | ||||||
| 33374 | RET | |||||||
| Prev: 33267 | Up: Map | Next: 33375 |