Routines |
Prev: 967F | Up: Map | Next: 9749 |
Used by the routine at 947A.
|
||||
969B | LD A,($A05D) | Return if Rex is not visible | ||
969E | OR A | |||
969F | RET Z | |||
96A0 | LD A,($A055) | Jump to handle dead animation if Rex is dead | ||
96A3 | OR A | |||
96A4 | JP NZ,$9AC5 | |||
This entry point is used by the routine at 9AC5.
|
||||
96A7 | LD A,($A0B6) | Set A0AF the x-position of Rex | ||
96AA | LD ($A0AF),A | |||
96AD | LD A,($A0B7) | Set A0B0 the y-position of Rex | ||
96B0 | LD ($A0B0),A | |||
96B3 | LD A,$03 | Set A0B1 the width in bytes of Rex | ||
96B5 | LD ($A0B1),A | |||
96B8 | LD A,$10 | Set A0B2 the height in pixels of Rex | ||
96BA | LD ($A0B2),A | |||
96BD | XOR A | Set the entity type for Rex | ||
96BE | LD ($A033),A | |||
96C1 | LD HL,$AE5D | Set HL the address for the offset animation for Rex | ||
96C4 | LD DE,$8F62 | Set DE the address for graphic data of Rex falling/jumping | ||
96C7 | LD A,($A07A) | Jump forward if Rex on elevator | ||
96CA | OR A | |||
96CB | JP NZ,$96DC | |||
96CE | LD A,($A0BD) | Jump forward if Rex is jumping | ||
96D1 | OR A | |||
96D2 | JP NZ,$96E2 | |||
96D5 | LD A,($A0BC) | Jump forward if Rex is falling | ||
96D8 | OR A | |||
96D9 | JP NZ,$96E2 | |||
96DC | LD HL,$AE5D | Set HL the address for the offset animation for Rex | ||
96DF | LD DE,$80F2 | Set DE the address for graphic data of Rex walking | ||
Rex is falling or jumping
|
||||
96E2 | LD A,($A0BB) | Set A the facing direction of Rex | ||
96E5 | CALL $B258 | Draw Rex | ||
96E8 | LD A,($A049) | Return if shield not active | ||
96EB | OR A | |||
96EC | RET Z | |||
96ED | LD A,($D83A) | Jump forward if channel 2 is playing | ||
96F0 | CP $FF | |||
96F2 | JP NZ,$970A | |||
96F5 | CALL $A375 | Set A to a pseudo random number between 0-31 | ||
96F8 | AND $1F | |||
96FA | LD E,A | Configure random fine/noise pitch into shield sound data | ||
96FB | LD D,$00 | |||
96FD | LD HL,$04B0 | |||
9700 | ADD HL,DE | |||
9701 | LD ($D7A0),HL | |||
9704 | LD DE,$D79C | Set DE to play shield sound | ||
9707 | CALL $D5E7 | Configure sound channel and mixer register | ||
970A | LD L,$01 | Decrease 1 shield point | ||
970C | CALL $99D3 | |||
970F | LD A,($A0B6) | Set A0AF the x-position for the shield | ||
9712 | SUB $04 | |||
9714 | LD ($A0AF),A | |||
9717 | LD A,($A0BB) | Jump forward if Rex facing right | ||
971A | OR A | |||
971B | JP Z,$9726 | |||
971E | LD A,($A0AF) | Increment x-position of shield if Rex is facing left | ||
9721 | ADD A,$08 | |||
9723 | LD ($A0AF),A | |||
9726 | LD A,($A0B7) | Set A0B0 the y-position for the shield | ||
9729 | SUB $02 | |||
972B | LD ($A0B0),A | |||
972E | LD A,$04 | Set A0B1 the width in bytes of the shield | ||
9730 | LD ($A0B1),A | |||
9733 | LD A,$15 | Set A0B2 the height in pixels of the shield | ||
9735 | LD ($A0B2),A | |||
9738 | XOR A | Set entity type of #0 | ||
9739 | LD ($A033),A | |||
973C | LD HL,$AE65 | Set HL the address pointer for shield offsets | ||
973F | LD DE,$88F2 | Set HL the address pointer for shield graphic data | ||
9742 | LD A,($A0BB) | Set A the face direction of Rex | ||
9745 | CALL $B258 | Draw shield | ||
9748 | RET |
Prev: 967F | Up: Map | Next: 9749 |