![]() |
Routines |
| Prev: EB05 | Up: Map | Next: EB8D |
|
Used by the routines at PlayerControls_Kempston and PlayerControls.
|
||||||||
| PlayerMoveLeft | EB49 | LD A,(IX+$11) | Return if *PlayerActionState is blocked / no walk. | |||||
| EB4C | CP $02 | |||||||
| EB4E | RET Z | |||||||
| EB4F | CP $03 | Jump to PlayerMoveLeft_FaceAndWalk if *PlayerActionState is not on a ladder. | ||||||
| EB51 | JR NZ,PlayerMoveLeft_FaceAndWalk | |||||||
| EB53 | LD A,(IX+$03) | Return if *PlayerVerticalPosition is not 03. | ||||||
| EB56 | CP $03 | |||||||
| EB58 | RET NZ | |||||||
| EB59 | LD A,$FF | Force *PlayerCollisionMask_Middle so the middle foot does not see a floor. | ||||||
| EB5B | LD ($F32D),A | |||||||
| EB5E | LD A,(IX+$01) | Jump to PlayerMoveLeft_FaceAndWalk if *PlayerVerticalCoordinate is at the top of the ladder. | ||||||
| EB61 | CP (IX+$12) | |||||||
| EB64 | JR Z,PlayerMoveLeft_FaceAndWalk | |||||||
| EB66 | CP (IX+$13) | Return if *PlayerVerticalCoordinate is not at the bottom of the ladder. | ||||||
| EB69 | RET NZ | |||||||
|
Face and walk left.
|
||||||||
| PlayerMoveLeft_FaceAndWalk | EB6A | LD A,(IX+$11) | Jump to PlayerMoveLeft_AdvanceFrame if *PlayerActionState is already facing left. | |||||
| EB6D | CP $04 | |||||||
| EB6F | JR Z,PlayerMoveLeft_AdvanceFrame | |||||||
| EB71 | LD (IX+$11),$04 | Set *PlayerActionState to facing left. | ||||||
| EB75 | LD (IX+$06),$4A | Write the frame before the first left-facing walk sprite to *PlayerSpriteID. | ||||||
| PlayerMoveLeft_AdvanceFrame | EB79 | LD A,(IX+$06) | A=*PlayerSpriteID. | |||||
| EB7C | ADD A,$06 | Advance to the next left-facing walk frame. | ||||||
| EB7E | LD (IX+$06),A | Write it back to *PlayerSpriteID. | ||||||
| EB81 | CP $80 | Jump to PlayerMoveLeft_SetDirection if the walk cycle has not wrapped. | ||||||
| EB83 | JR NZ,PlayerMoveLeft_SetDirection | |||||||
| EB85 | LD (IX+$06),$50 | Reset *PlayerSpriteID to the first left-facing frame. | ||||||
| PlayerMoveLeft_SetDirection | EB89 | INC (IX+$04) | Set *PlayerHorizontalMovement to move left. | |||||
| EB8C | RET | Return. | ||||||
| Prev: EB05 | Up: Map | Next: EB8D |