![]() |
Routines |
| Prev: 52193 | Up: Map | Next: 52309 |
|
The call at 52243 will be returned from if Drutt's is-jumping flag is reset. Otherwise, E will be loaded with Drutt's jump state index (see table).
Used by the routine at 48096.
|
||||||||
| 52243 | CALL 55023 | Handle Drutt's jump, and load A with jump state index as appropriate | ||||||
| 52246 | LD A,E | If jump state index is zero... | ||||||
| 52247 | OR A | ... | ||||||
| 52248 | JP Z,48096 | ...then jump to 48096 (advance HL to next script instruction and execute) | ||||||
| 52251 | CP 1 | If jump state index is 1... | ||||||
| 52253 | JR Z,52259 | ...then skip ahead to 52259 | ||||||
| 52255 | CP 2 | If jump state index is not 2... | ||||||
| 52257 | JR NZ,52265 | ...then skip ahead to 52265 | ||||||
|
Jump state index is 1 (landed on floor / platform and back (control input) bit set) or 2 (unused)
|
||||||||
| 52259 | LD HL,51674 | Point HL at script data for Drutt starting to jump straight up... | ||||||
| 52262 | JP 48098 | ...and execute | ||||||
|
Jump state index is not 2
|
||||||||
| 52265 | CP 3 | If jump state index is not 3... | ||||||
| 52267 | JR NZ,52275 | ...then skip ahead to 52275 | ||||||
|
Jump state index is 3 (Drutt's jump velocity less than 4, and back not pressed, i.e. terminate jumping)
|
||||||||
| 52269 | LD HL,51524 | Point HL at script data for Drutt facing out of screen... | ||||||
| 52272 | JP 48098 | ...and execute | ||||||
|
Jump state index is not 3
|
||||||||
| 52275 | CP 4 | If jump state index is not 4... | ||||||
| 52277 | JR NZ,52285 | ...then skip ahead to 52285 | ||||||
|
Jump state index is 4 (bounced off an obstruction to the right or left (control input) bit set)
|
||||||||
| 52279 | LD HL,51686 | Point HL at script data for Drutt jumping left... | ||||||
| 52282 | JP 48098 | ...and execute | ||||||
|
Jump state index is not 4
|
||||||||
| 52285 | CP 5 | If jump state index is not 5... | ||||||
| 52287 | JR NZ,52295 | ...then skip ahead to 52295 | ||||||
|
Jump state index is 5 (bounced off an obstruction to the left or right (control input) bit set)
|
||||||||
| 52289 | LD HL,51696 | Point HL at script data for Drutt jumping right... | ||||||
| 52292 | JP 48098 | ...and execute | ||||||
|
Jump state index is not 5
|
||||||||
| 52295 | CP 6 | If jump state index is not 6... | ||||||
| 52297 | JP NZ,48096 | ...then jump to 48096 (advance HL to next script instruction and execute) | ||||||
|
Jump state index is 6 (Drutt has banged his head on something above him)
|
||||||||
| 52300 | CALL 55516 | Set Drutt's can-fall flag and set initial velocity factor of 2 | ||||||
| 52303 | LD HL,51520 | Point HL at script data for Drutt facing out of screen (falling)... | ||||||
| 52306 | JP 48098 | ...and execute | ||||||
| Prev: 52193 | Up: Map | Next: 52309 |