![]() |
Routines |
| Prev: 802A | Up: Map | Next: 8093 |
|
The handler for entities that have nothing to do. If the entity is one of the first three 16-byte records, which start at CreatureRecords, then a short delay loop is run before returning. Otherwise it returns straight away.
|
||||||||
| CreateDelay | 807A | PUSH IX | Copy IX to HL (using the stack). | |||||
| 807C | POP HL | |||||||
| 807D | LD DE,$EE60 | Point DE at the creatures at CreatureRecords. | ||||||
| 8080 | AND A | Subtract DE from HL, to get the offset of the entity into the 16-byte records. | ||||||
| 8081 | SBC HL,DE | |||||||
| 8083 | LD A,H | Return if the high byte of the offset is not zero. | ||||||
| 8084 | AND A | |||||||
| 8085 | RET NZ | |||||||
| 8086 | LD A,L | Return if the low byte of the offset is 30 or more. | ||||||
| 8087 | CP $30 | |||||||
| 8089 | RET NC | |||||||
| 808A | LD HL,$00C0 | HL=00C0 (the length of the delay). | ||||||
| CreateDelay_Loop | 808D | DEC HL | Decrease the delay counter by one. | |||||
| 808E | LD A,H | Loop back to CreateDelay_Loop until the delay counter is zero. | ||||||
| 808F | OR L | |||||||
| 8090 | JR NZ,CreateDelay_Loop | |||||||
| 8092 | RET | Return. | ||||||
| Prev: 802A | Up: Map | Next: 8093 |