![]() |
Routines |
| Prev: 9667 | Up: Map | Next: 9731 |
|
Used by the routine at 9470.
|
||||
| 9683 | LD A,($A1F6) | Return if Rex is not visible | ||
| 9686 | OR A | |||
| 9687 | RET Z | |||
| 9688 | LD A,($A1EE) | Jump to handle dead animation if Rex is dead | ||
| 968B | OR A | |||
| 968C | JP NZ,$9BA7 | |||
|
This entry point is used by the routine at 9BA7.
|
||||
| 968F | LD A,($A24F) | Set A248 the x-position of Rex | ||
| 9692 | LD ($A248),A | |||
| 9695 | LD A,($A250) | Set A249 the y-position of Rex | ||
| 9698 | LD ($A249),A | |||
| 969B | LD A,$03 | Set A24A the width in bytes of Rex | ||
| 969D | LD ($A24A),A | |||
| 96A0 | LD A,$10 | Set A24B the height in pixels of Rex | ||
| 96A2 | LD ($A24B),A | |||
| 96A5 | XOR A | Set the entity type for Rex | ||
| 96A6 | LD ($A1CC),A | |||
| 96A9 | LD HL,$AF52 | Set HL the address for the offset animation for Rex | ||
| 96AC | LD DE,$8418 | Set DE the address for graphic data of Rex falling/jumping | ||
| 96AF | LD A,($A213) | Jump forward if Rex on elevator | ||
| 96B2 | OR A | |||
| 96B3 | JP NZ,$96C4 | |||
| 96B6 | LD A,($A256) | Jump forward if Rex is jumping | ||
| 96B9 | OR A | |||
| 96BA | JP NZ,$96CA | |||
| 96BD | LD A,($A255) | Jump forward if Rex is falling | ||
| 96C0 | OR A | |||
| 96C1 | JP NZ,$96CA | |||
| 96C4 | LD HL,$AF52 | Set HL the address for the offset animation for Rex | ||
| 96C7 | LD DE,$8358 | Set DE the address for graphic data of Rex walking | ||
|
Rex is falling or jumping
|
||||
| 96CA | LD A,($A254) | Set A the facing direction of Rex | ||
| 96CD | CALL $B296 | Draw Rex | ||
| 96D0 | LD A,($A1E2) | Return if shield not active | ||
| 96D3 | OR A | |||
| 96D4 | RET Z | |||
|
draw shield
|
||||
| 96D5 | LD A,($D5D2) | Jump forward if channel 2 is playing | ||
| 96D8 | CP $FF | |||
| 96DA | JP NZ,$96F2 | |||
| 96DD | CALL $A51D | Set A to a pseudo random number between 0-31 | ||
| 96E0 | AND $1F | |||
| 96E2 | LD E,A | Configure random fine/noise pitch into shield sound data | ||
| 96E3 | LD D,$00 | |||
| 96E5 | LD HL,$04B0 | |||
| 96E8 | ADD HL,DE | |||
| 96E9 | LD ($D538),HL | |||
| 96EC | LD DE,$D534 | Set DE to play shield sound | ||
| 96EF | CALL $D37F | Configure sound channel and mixer register | ||
| 96F2 | LD L,$01 | Decrease 1 shield point | ||
| 96F4 | CALL $98F1 | |||
| 96F7 | LD A,($A24F) | Set A248 the x-position for the shield | ||
| 96FA | SUB $04 | |||
| 96FC | LD ($A248),A | |||
| 96FF | LD A,($A254) | Jump forward if Rex facing right | ||
| 9702 | OR A | |||
| 9703 | JP Z,$970E | |||
| 9706 | LD A,($A248) | Increment x-position of shield if Rex is facing left | ||
| 9709 | ADD A,$08 | |||
| 970B | LD ($A248),A | |||
| 970E | LD A,($A250) | Set A249 the y-position for the shield | ||
| 9711 | SUB $02 | |||
| 9713 | LD ($A249),A | |||
| 9716 | LD A,$04 | Set A24A the width in bytes of the shield | ||
| 9718 | LD ($A24A),A | |||
| 971B | LD A,$15 | Set A24B the height in pixels of the shield | ||
| 971D | LD ($A24B),A | |||
| 9720 | XOR A | Set entity type of #0 | ||
| 9721 | LD ($A1CC),A | |||
| 9724 | LD HL,$AF5A | Set HL the address pointer for shield offsets | ||
| 9727 | LD DE,$8918 | Set HL the address pointer for shield graphic data | ||
| 972A | LD A,($A254) | Set A the face direction of Rex | ||
| 972D | CALL $B296 | Draw shield | ||
| 9730 | RET | |||
| Prev: 9667 | Up: Map | Next: 9731 |