![]() |
Routines |
| Prev: 28891 | Up: Map | Next: 29153 |
|
Used by the routine at Handler_Frogs.
|
||||
|
Return if an egg isn't being dropped at this point.
|
||||
| HandlerFrog01_CheckEggCollision | 29072 | LD A,(24489) | Return if *EggDropFlag is unset. | |
| 29075 | OR A | |||
| 29076 | RET Z | |||
|
Check the first frog.
|
||||
| 29077 | LD HL,29161 | HL=Frog1_StunCountdown. | ||
| 29080 | LD IY,56032 | IY=Egg_X_Position. | ||
| 29084 | LD IX,56008 | IX=Sprite02_3Wide_X_Position. | ||
| 29088 | CALL CheckEggCollision | Call CheckEggCollision. | ||
| 29091 | JR C,HandlerFrog02_CheckEggCollision | Jump to HandlerFrog02_CheckEggCollision if the egg isn't colliding with the first frog. | ||
|
Item hit the first frog.
|
||||
| 29093 | LD A,(HL) | Jump to HandlerEggCollision_Destroy01 if the frog is already stunned. | ||
| 29094 | OR A | |||
| 29095 | JR NZ,HandlerEggCollision_Destroy01 | |||
|
Stun the frog and set a random stun timer/ award points.
|
||||
| 29097 | LD A,R | A=the contents of the Memory Refresh Register. | ||
| 29099 | OR %01000000 | Set bit 6 (ensure a minimum stun duration). | ||
| 29101 | LD (HL),A | Write the stun duration to the first frogs stun countdown. | ||
| 29102 | LD A,10 | Call AddToScore to add 10 points to the score. | ||
| 29104 | CALL AddToScore | |||
| 29107 | CALL PlayHitSound | Call PlayHitSound. | ||
| HandlerEggCollision_Destroy01 | 29110 | CALL CancelEggDrop | Call CancelEggDrop. | |
|
Check if the second frog is active (level above 1).
|
||||
| HandlerFrog02_CheckEggCollision | 29113 | LD A,(24497) | Return if *CurrentLevel is equal to 1. | |
| 29116 | CP 1 | |||
| 29118 | RET Z | |||
|
Check the second frog.
|
||||
| 29119 | LD IX,56012 | IX=Sprite03_3Wide_X_Position. | ||
| 29123 | LD HL,29164 | HL=Frog2_StunCountdown. | ||
| 29126 | CALL CheckEggCollision | Call CheckEggCollision. | ||
| 29129 | RET C | Return if the egg isn't colliding with the second frog. | ||
|
Item hit the second frog.
|
||||
| 29130 | LD A,(HL) | Jump to HandlerEggCollision_Destroy02 if the frog is already stunned. | ||
| 29131 | OR A | |||
| 29132 | JR NZ,HandlerEggCollision_Destroy02 | |||
|
Stun the second frog and award points.
|
||||
| 29134 | LD A,R | A=the contents of the Memory Refresh Register. | ||
| 29136 | OR %00011111 | Set bits 0-4 (ensure minimum stun duration). | ||
| 29138 | AND %01111111 | Clear bit 7 (cap the maximum duration). | ||
| 29140 | LD (HL),A | Write the stun duration to the second frogs stun countdown. | ||
| 29141 | LD A,10 | Call AddToScore to add 10 points to the score. | ||
| 29143 | CALL AddToScore | |||
| HandlerEggCollision_Destroy02 | 29146 | CALL CancelEggDrop | Call CancelEggDrop. | |
| 29149 | CALL PlayHitSound | Call PlayHitSound. | ||
| 29152 | RET | Return. | ||
| Prev: 28891 | Up: Map | Next: 29153 |