Prev: EA93 Up: Map Next: EB49
EB05: Player: Move Right
Used by the routines at PlayerControls_Kempston and PlayerControls.
Input
IX On entry will be set to TablePlayerAttributes
PlayerMoveRight EB05 LD A,(IX+$11) Return if *IX+11 is equal to 02.
EB08 CP $02
EB0A RET Z
EB0B CP $03 Jump to PlayerMoveRight_0 if *IX+11 is not equal to 03.
EB0D JR NZ,PlayerMoveRight_0
EB0F LD A,(IX+$03) Return if *IX+03 is not equal to 03.
EB12 CP $03
EB14 RET NZ
EB15 LD A,$FF Write FF to *F32D.
EB17 LD ($F32D),A
EB1A LD A,(IX+$01) Jump to PlayerMoveRight_0 if *IX+01 is equal to *IX+12.
EB1D CP (IX+$12)
EB20 JR Z,PlayerMoveRight_0
EB22 CP (IX+$13) Return if *IX+01 is not equal to *IX+13.
EB25 RET NZ
PlayerMoveRight_0 EB26 LD A,(IX+$11) Jump to PlayerMoveRight_1 if *IX+11 is equal to 13.
EB29 CP $13
EB2B JR Z,PlayerMoveRight_1
EB2D LD (IX+$11),$13 Write 13 to *IX+11.
EB31 LD (IX+$06),$1A Write 1A to *IX+06.
PlayerMoveRight_1 EB35 LD A,(IX+$06) A=*IX+06.
EB38 ADD A,$06 A+=06.
EB3A LD (IX+$06),A Write A to *IX+06.
EB3D CP $50 Jump to PlayerMoveRight_2 if A is not equal to 50.
EB3F JR NZ,PlayerMoveRight_2
EB41 LD (IX+$06),$20 Write 20 to *IX+06.
PlayerMoveRight_2 EB45 DEC (IX+$04) Decrease *IX+04 by one.
EB48 RET Return.
Prev: EA93 Up: Map Next: EB49