Prev: B339 Up: Map Next: B37B
B33D: Tick Actor Frame
Decrease *IX+12, apply speed, and redraw the actor.
Input
IX Actor slot
Reload the frame timer, or apply speed and redraw.
TickActorFrame B33D DEC (IX+$12) Jump to TickActorFrame_ApplyMotion if the frame timer is not zero.
B340 JR NZ,TickActorFrame_ApplyMotion
B342 LD A,(IX+$13) Fetch *IX+13.
B345 LD (IX+$12),A Reload the frame timer.
B348 INC (IX+$06) Increase the actor thrust by one.
B34B LD A,(IX+$05) Fetch the actor speed.
B34E AND A Jump to TickActorFrame_ApplyMotion if the speed is zero.
B34F JR Z,TickActorFrame_ApplyMotion
B351 JP P,TickActorFrame_DecreaseSpeed Jump to TickActorFrame_DecreaseSpeed if the speed is positive.
B354 INC A Increase the speed by two.
B355 INC A
TickActorFrame_DecreaseSpeed B356 DEC A Decrease the speed by one.
Apply the speed, then drop the actor by its thrust.
TickActorFrame_ApplyMotion B357 CALL ApplyJetmanSpeed Call ApplyJetmanSpeed.
B35A LD A,(IX+$04) Fetch the actor Y.
B35D ADD A,(IX+$06) Add the thrust.
B360 CP $AF Jump to ExplodeAtGround if the actor has reached the ground line.
B362 JR NC,ExplodeAtGround
B364 LD (IX+$04),A Write the new Y.
B367 LD C,A Stash it in C.
B368 LD D,$03 D=03.
B36A CALL SquareWave_Loop Call SquareWave_Loop.
Pick the dying frame from the frame counter and redraw.
B36D LD A,($5E42) Fetch GameTimer.
B370 RRCA Rotate it right once.
B371 AND %00000011 Keep only bits 0-1.
Sprite IDs begin at DC ("Jetman: Falling Frame 1").
B373 ADD A,$DC Add DC for the dying frames.
B375 LD (IX+$00),A Write it to the actor type.
B378 JP DrawCurrentActor_Draw Jump to DrawCurrentActor_Draw.
Prev: B339 Up: Map Next: B37B