Routines |
Prev: 9298 | Up: Map | Next: 935C |
Used by the routine at 92DF.
|
||||
9327 | LD IX,$C596 | Point IX to the nasties buffer at C596. | ||
932B | LD B,$06 | Maximum of 6 nasties per room. | ||
932D | LD HL,($5C7B) | Get the current | ||
9330 | LD A,L | Put the X co-ordinate in A. | ||
9331 | SUB (IX+$0C) | Subtract the X co-ordinate of the nasty. | ||
9334 | JR NC,$9338 | If it is less than or the same, skip forward. | ||
9336 | NEG | If it is greater than, skip forward. | ||
9338 | AND $F0 | |||
933A | JR NZ,$9350 | |||
933C | LD A,H | Put the Y co-ordinate in A. | ||
933D | SUB (IX+$0D) | Subtract the Y co-ordinate of the nasty. | ||
9340 | JR NC,$9344 | If it is less than or the same, skip forward. | ||
9342 | NEG | If it is greater than, skip forward. | ||
9344 | AND $F0 | |||
9346 | JR NZ,$9350 | |||
9348 | LD A,(IX+$00) | Is the collectable item flag set? | ||
934B | CP $03 | |||
934D | JR Z,$9350 | No, so loop forward. | ||
934F | RET | Return with IX pointing at the nasty found. | ||
9350 | LD DE,$0014 | Loop round to the next nasty. | ||
9353 | ADD IX,DE | |||
9355 | DJNZ $932D | |||
9357 | LD IX,$0000 | Clear IX and return. | ||
935B | RET |
Prev: 9298 | Up: Map | Next: 935C |