![]() |
Routines |
| Prev: 49433 | Up: Map | Next: 49502 |
|
Handles an object for DrawObject when only one object is to be drawn, which is the object whose address is the operand of the first instruction. Every other object is skipped. The block of the object is drawn with the code that is patched to draw a block section instead of a block row.
|
||||
| DrawChosenObject | 49467 | LD HL,0 | Set HL to the address of the chosen object, which is patched in. | |
| 49470 | PUSH IX | Copy the address of the current object into DE. | ||
| 49472 | POP DE | |||
| 49473 | AND A | Subtract the address of the current object. | ||
| 49474 | SBC HL,DE | |||
| 49476 | RET NZ | Return if it is not the chosen object. | ||
| 49477 | LD A,(IX+1) | Fetch the kind of the object. | ||
| 49480 | AND %10001111 | Use bits 0-3 and bit 7. | ||
| 49482 | CP 130 | Compare it with 130. | ||
| 49484 | RET NZ | Return if it is not an object of that kind. | ||
| 49485 | LD A,195 | Set A to the opcode of a JP instruction, 195. | ||
| 49487 | LD (51037),A | Patch it into the drawing code at 51037. | ||
| 49490 | LD HL,51116 | Point HL at DrawBlockSection. | ||
| 49493 | LD (51038),HL | Patch it in as the destination of the jump. | ||
| 49496 | LD HL,246 | HL is 246. | ||
| 49499 | LD (49568),HL | Patch it in as the amount that is used by DrawBlock at 49568. | ||
|
Continue on to DrawBlock.
|
||||
| Prev: 49433 | Up: Map | Next: 49502 |