Prev: 8EC5 Up: Map Next: 8F61
8F34: Apply Upward Thrust
Strengthen the upward thrust in *IX+06 while UP is held, then continue the movement handler.
Input
IX Actor slot
Strengthen the upward thrust while fuel remains.
ApplyJetmanUpwardThrust 8F34 LD A,(IX+$06) Fetch the vertical thrust.
8F37 AND A
8F38 LD B,A Jump to ApplyJetmanUpwardThrust_Normal if it is already positive.
8F39 JP P,ApplyJetmanUpwardThrust_Normal
8F3C NEG Store the absolute thrust in B.
8F3E LD B,A
8F3F NEG
Bit 0 of the actor flags is set while Jetman is carrying an item.
8F41 BIT 0,(IX+$08) Jump to ApplyJetmanUpwardThrust_Carrying if Jetman is carrying an item.
8F45 JR NZ,ApplyJetmanUpwardThrust_Carrying
8F47 CP $C0 Jump to Handler_JetmanMovement_Loop if the thrust is already below C0.
8F49 JP C,Handler_JetmanMovement_Loop
The normal upward step is F8 (signed -08). Gravity uses the opposite step of 08.
ApplyJetmanUpwardThrust_Normal 8F4C LD C,$F8 Set the normal upward step to F8.
8F4E JP Handler_JetmanMovement_AddThrust Jump to Handler_JetmanMovement_AddThrust.
While Jetman is carrying an item, use a weaker upward step of FC (signed -04).
ApplyJetmanUpwardThrust_Carrying 8F51 CP $E0 Compare the thrust with E0.
8F53 LD C,$FC Set the upward step to FC.
8F55 JP NC,Handler_JetmanMovement_AddThrust Jump to Handler_JetmanMovement_AddThrust if the thrust is at least E0.
Cap Jetman's upward thrust at E0 and spend extra fuel: B=40 is the base added at Handler_JetmanMovement_FuelFromSpeed.
8F58 LD (IX+$06),$E0 Write E0 to the vertical thrust.
8F5C LD B,$40 Set the fuel-spend base to 40.
8F5E JP Handler_JetmanMovement_Loop Jump to Handler_JetmanMovement_Loop.
Prev: 8EC5 Up: Map Next: 8F61