Prev: 45881 Up: Map Next: 45947
45885: Tick Actor Frame
Decrease *IX+18, apply speed, and redraw the actor.
Input
IX Actor slot
Reload the frame timer, or apply speed and redraw.
TickActorFrame 45885 DEC (IX+18) Jump to TickActorFrame_ApplyMotion if the frame timer is not zero.
45888 JR NZ,TickActorFrame_ApplyMotion
45890 LD A,(IX+19) Fetch *IX+19.
45893 LD (IX+18),A Reload the frame timer.
45896 INC (IX+6) Increase the actor thrust by one.
45899 LD A,(IX+5) Fetch the actor speed.
45902 AND A Jump to TickActorFrame_ApplyMotion if the speed is zero.
45903 JR Z,TickActorFrame_ApplyMotion
45905 JP P,TickActorFrame_DecreaseSpeed Jump to TickActorFrame_DecreaseSpeed if the speed is positive.
45908 INC A Increase the speed by two.
45909 INC A
TickActorFrame_DecreaseSpeed 45910 DEC A Decrease the speed by one.
Apply the speed, then drop the actor by its thrust.
TickActorFrame_ApplyMotion 45911 CALL ApplyJetmanSpeed Call ApplyJetmanSpeed.
45914 LD A,(IX+4) Fetch the actor Y.
45917 ADD A,(IX+6) Add the thrust.
45920 CP 175 Jump to ExplodeAtGround if the actor has reached the ground line.
45922 JR NC,ExplodeAtGround
45924 LD (IX+4),A Write the new Y.
45927 LD C,A Stash it in C.
45928 LD D,3 D=3.
45930 CALL SquareWave_Loop Call SquareWave_Loop.
Pick the dying frame from the frame counter and redraw.
45933 LD A,(24130) Fetch GameTimer.
45936 RRCA Rotate it right once.
45937 AND %00000011 Keep only bits 0-1.
Sprite IDs begin at 220 ("Jetman: Falling Frame 1").
45939 ADD A,220 Add 220 for the dying frames.
45941 LD (IX+0),A Write it to the actor type.
45944 JP DrawCurrentActor_Draw Jump to DrawCurrentActor_Draw.
Prev: 45881 Up: Map Next: 45947