Prev: 32810 Up: Map Next: 32915
32890: Create Delay
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.
Input
IX The entity
CreateDelay 32890 PUSH IX Copy IX to HL (using the stack).
32892 POP HL
32893 LD DE,61024 Point DE at the creatures at CreatureRecords.
32896 AND A Subtract DE from HL, to get the offset of the entity into the 16-byte records.
32897 SBC HL,DE
32899 LD A,H Return if the high byte of the offset is not zero.
32900 AND A
32901 RET NZ
32902 LD A,L Return if the low byte of the offset is 48 or more.
32903 CP 48
32905 RET NC
32906 LD HL,192 HL=0192 (the length of the delay).
CreateDelay_Loop 32909 DEC HL Decrease the delay counter by one.
32910 LD A,H Loop back to CreateDelay_Loop until the delay counter is zero.
32911 OR L
32912 JR NZ,CreateDelay_Loop
32914 RET Return.
Prev: 32810 Up: Map Next: 32915