![]() |
Routines |
| Prev: C25A | Up: Map | Next: C2FD |
|
Used by the routine at BFEF.
|
||||
| C27E | LD A,(IX+$00) | Check x-position of SCANNER | ||
| C281 | AND $07 | |||
| C283 | OR A | |||
| C284 | JP NZ,$C2DE | Jump forward if scanner is not grid fixed | ||
|
Scanner shot if rex is moving and on sight
|
||||
| C287 | LD A,($A0BD) | Jump forward if Rex is jumping | ||
| C28A | OR A | |||
| C28B | JP NZ,$C2A4 | |||
| C28E | LD A,($A0BC) | Jump forward if Rex is falling | ||
| C291 | OR A | |||
| C292 | JP NZ,$C2A4 | |||
| C295 | CALL $A4A9 | Check if right key is pressed | ||
| C298 | JP Z,$C2A4 | Jump forward if so | ||
| C29B | CALL $A490 | Check if left key is pressed | ||
| C29E | JP Z,$C2A4 | Jump if so | ||
| C2A1 | JP $C2DE | Jump to handle scanner movement | ||
|
Rex is moving, check if is on sight
|
||||
| C2A4 | LD A,($A0B7) | Check if scanner y-position is the range of rex y-position (y-position - 12 , y-position + 4) | ||
| C2A7 | ADD A,$04 | |||
| C2A9 | CP (IX+$01) | |||
| C2AC | JP C,$C2C1 | |||
| C2AF | SUB $10 | |||
| C2B1 | CP (IX+$01) | |||
| C2B4 | JP NC,$C2C1 | |||
| C2B7 | CALL $C3BE | Configure scanner to fire | ||
| C2BA | LD (IX+$12),$14 | Reset state change counter | ||
| C2BE | CALL $C03A | |||
| C2C1 | LD A,($A0B6) | Check if scanner x-position is in the range of rex x-position (x-position -12 , x-position + 4) | ||
| C2C4 | ADD A,$04 | |||
| C2C6 | CP (IX+$00) | |||
| C2C9 | JP C,$C2DE | |||
| C2CC | SUB $10 | |||
| C2CE | CP (IX+$00) | |||
| C2D1 | JP NC,$C2DE | |||
| C2D4 | CALL $C3BE | Configure scanner to fire | ||
| C2D7 | LD (IX+$12),$14 | Reset state change counter | ||
| C2DB | CALL $C03A | Scanner fires weapon | ||
|
check scanner movement and state change
|
||||
| C2DE | LD A,(IX+$11) | Check scanner state | ||
| C2E1 | CP $03 | Jump if scanner is bumping | ||
| C2E3 | JP Z,$C239 | |||
| C2E6 | OR A | Return if scanner is moving up and down | ||
| C2E7 | RET NZ | |||
| C2E8 | LD A,(IX+$02) | Set A to scanner direction | ||
| C2EB | OR A | Jump to handle collision detection in right direction | ||
| C2EC | CALL Z,$C3E0 | |||
| C2EF | LD A,(IX+$02) | Jump to handle collision detection in left direction | ||
| C2F2 | OR A | |||
| C2F3 | CALL NZ,$C4A6 | |||
| C2F6 | DEC (IX+$12) | Decrement state change counter | ||
| C2F9 | JP Z,$C313 | If counter = 0 jump to handle state change | ||
| C2FC | RET | |||
| Prev: C25A | Up: Map | Next: C2FD |