![]() |
Routines |
| Prev: 8F31 | Up: Map | Next: 9052 |
|
Used by the routine at 5B5B.
|
||||
|
Animate all opening / closing platforms, crushers, water, and Monty dying (if appropriate)
|
||||
| 8F9F | PUSH AF | Save all registers, as this was called by an interrupt. | ||
| 8FA0 | PUSH BC | |||
| 8FA1 | PUSH DE | |||
| 8FA2 | PUSH HL | |||
| 8FA3 | PUSH IX | |||
| 8FA5 | PUSH IY | |||
| 8FA7 | LD A,($9649) | Is this room 11? | ||
| 8FAA | CP $11 | |||
| 8FAC | CALL Z,$90BD | If so, animate the shower. | ||
| 8FAF | LD IX,$8D53 | Point IX to game flags. | ||
| 8FB3 | BIT 0,(IX+$00) | Can animation happen? | ||
| 8FB7 | JP NZ,$9048 | Jump forward if not. | ||
| 8FBA | BIT 1,(IX+$00) | Is Monty still alive? | ||
| 8FBE | JP NZ,$8EDD | No, so animate the angel. | ||
| 8FC1 | CALL $F7C7 | Perform background actions. | ||
| 8FC4 | CALL $8DCD | Animate all moving objects. | ||
|
Some rooms have water in them which needs animating.
|
||||
| 8FC7 | LD A,($9649) | Is this room 08? | ||
| 8FCA | CP $08 | |||
| 8FCC | JR NZ,$8FDC | No, so jump forward. | ||
|
Animate the water in room 08.
|
||||
| 8FCE | LD HL,($EAAA) | Get the screen offset for the water's y co-ordinate in room 08. | ||
| 8FD1 | LD DE,$000B | Add the x co-ordinate. | ||
| 8FD4 | ADD HL,DE | |||
| 8FD5 | LD C,$05 | Width is 5. | ||
| 8FD7 | CALL $90A8 | Animate the water and skip the rest of this routine. | ||
| 8FDA | JR $9048 | |||
|
Animate the water in room 09.
|
||||
| 8FDC | CP $09 | Is this room 09? | ||
| 8FDE | JR NZ,$8FEE | No, so jump forward. | ||
| 8FE0 | LD HL,($EACA) | Get the screen offset for the water's y co-ordinate in room 09. | ||
| 8FE3 | LD DE,$000E | Add the x co-ordinate. | ||
| 8FE6 | ADD HL,DE | |||
| 8FE7 | LD C,$12 | Width is 12. | ||
| 8FE9 | CALL $90A8 | Animate the water and skip the rest of this routine. | ||
| 8FEC | JR $9048 | |||
|
Animate the water in room 0A.
|
||||
| 8FEE | CP $0A | Is this room 0A? | ||
| 8FF0 | JR NZ,$8FFC | No, so jump forward. | ||
| 8FF2 | LD HL,($EACA) | Get the screen offset for the water's y co-ordinate in room 0A. | ||
| 8FF5 | LD C,$14 | Width is 14. | ||
| 8FF7 | CALL $90A8 | Animate the water and skip the rest of this routine. | ||
| 8FFA | JR $9048 | |||
|
Animate the water in room 0B.
|
||||
| 8FFC | CP $0B | Is this room 0B? | ||
| 8FFE | JR NZ,$9048 | No, so jump foward. | ||
| 9000 | LD HL,($EAAA) | Get the screen offset for the first water's y co-ordinate in room 0B. | ||
| 9003 | LD DE,$0006 | Set the x co-ordinate. | ||
| 9006 | LD C,$03 | Width is 3. | ||
| 9008 | ADD HL,DE | Add the x co-ordinate. | ||
| 9009 | CALL $90A8 | Animate the water. | ||
| 900C | LD HL,($EA9A) | Get the screen offset for the second water's y co-ordinate. | ||
| 900F | LD DE,$000C | Add the x co-ordinate. | ||
| 9012 | ADD HL,DE | |||
| 9013 | LD C,$06 | Width is 6. | ||
| 9015 | CALL $90A8 | Animate the water. | ||
| 9018 | LD HL,($EAAA) | Get the screen offset for the third water's y co-ordinate. | ||
| 901B | LD DE,$0015 | Add the x co-ordinate. | ||
| 901E | ADD HL,DE | |||
| 901F | LD C,$03 | Width is 3. | ||
| 9021 | CALL $90A8 | Animate the water. | ||
| 9024 | LD HL,($EAAA) | Get the screen offset for the fourth water's y co-ordinate. | ||
| 9027 | LD DE,$001B | Add the x co-ordinate. | ||
| 902A | ADD HL,DE | |||
| 902B | LD C,$02 | Width is 2. | ||
| 902D | CALL $90A8 | Animate the water. | ||
| 9030 | LD HL,($EB2A) | Get the screen offset for the fifth water's y co-ordinate. | ||
| 9033 | LD DE,$0015 | Add the x co-ordinate. | ||
| 9036 | ADD HL,DE | |||
| 9037 | LD C,$02 | Width is 2. | ||
| 9039 | CALL $90A8 | Animate the water. | ||
| 903C | LD HL,($EB1A) | Get the screen offset for the sixth water's y co-ordinate. | ||
| 903F | LD DE,$0018 | Add the x co-ordinate. | ||
| 9042 | ADD HL,DE | |||
| 9043 | LD C,$03 | Width is 3. | ||
| 9045 | CALL $90A8 | Animate the water. | ||
|
This entry point is used by the routine at 8EDD, and is a common exit point.
|
||||
| 9048 | POP IY | Restore all registers. | ||
| 904A | POP IX | |||
| 904C | POP HL | |||
| 904D | POP DE | |||
| 904E | POP BC | |||
| 904F | POP AF | |||
| 9050 | EI | Re-enable interrupts and return. | ||
| 9051 | RET | |||
| Prev: 8F31 | Up: Map | Next: 9052 |