![]() |
Routines |
| Prev: 58507 | Up: Map | Next: 58575 |
|
Draws a piece of terrain that is three bytes wide, going up the screen two pixel rows at a time, using three words of the picture for each pair of rows. The entry points at DrawThreeByteRows and DrawThreeByteRows_Two first move to the right by three columns and two columns.
|
||||||||||||
| DrawThreeByteRows | 58535 | INC L | Advance L. | |||||||||
| DrawThreeByteRows_Two | 58536 | INC L | Advance L. | |||||||||
| 58537 | INC L | Advance L. | ||||||||||
| 58538 | LD B,A | B=A. | ||||||||||
| DrawThreeByteRows_Loop | 58539 | POP DE | Bring DE back off the stack. | |||||||||
| 58540 | LD (HL),E | Write E where HL points. | ||||||||||
| 58541 | INC L | Advance L. | ||||||||||
| 58542 | LD (HL),D | Write D where HL points. | ||||||||||
| 58543 | INC L | Advance L. | ||||||||||
| 58544 | POP DE | Bring DE back off the stack. | ||||||||||
| 58545 | LD (HL),E | Write E where HL points. | ||||||||||
| 58546 | DEC H | Step H back. | ||||||||||
| 58547 | LD (HL),D | Write D where HL points. | ||||||||||
| 58548 | DEC L | Step L back. | ||||||||||
| 58549 | POP DE | Bring DE back off the stack. | ||||||||||
| 58550 | LD (HL),E | Write E where HL points. | ||||||||||
| 58551 | DEC L | Step L back. | ||||||||||
| 58552 | LD (HL),D | Write D where HL points. | ||||||||||
| 58553 | DEC H | Step H back. | ||||||||||
| 58554 | LD A,H | A=H. | ||||||||||
| 58555 | INC A | Advance A. | ||||||||||
| 58556 | AND %00000111 | Keep the bits of A that are set in 7. | ||||||||||
| 58558 | JR NZ,DrawThreeByteRows_Next | Jump to DrawThreeByteRows_Next if the zero flag is clear. | ||||||||||
| 58560 | LD A,L | A=L. | ||||||||||
| 58561 | SUB 32 | Subtract 32 from A. | ||||||||||
| 58563 | LD L,A | L=A. | ||||||||||
| 58564 | JR C,DrawThreeByteRows_Next | Jump to DrawThreeByteRows_Next if the carry flag is set. | ||||||||||
| 58566 | LD A,H | A=H. | ||||||||||
| 58567 | ADD A,8 | Add 8 to A. | ||||||||||
| 58569 | LD H,A | H=A. | ||||||||||
| DrawThreeByteRows_Next | 58570 | DJNZ DrawThreeByteRows_Loop | Decrease B and jump to DrawThreeByteRows_Loop until none remain. | |||||||||
| 58572 | JP FinishStep | Jump to FinishStep. | ||||||||||
| Prev: 58507 | Up: Map | Next: 58575 |