Prev: 5EC7 Up: Map Next: 5F71
5ECF: Routine at 5ECF
Used by the routine at HeroInputHandler.
HeroInputHandle 5ECF PUSH IX
5ED1 LD A,(ManWalkDirection_DFD4)
5ED4 CP $02
5ED6 JP Z,$5FA1
5ED9 LD HL,(ManData_PosSecondary_dfc5) Man is walking right.
5EDC LD A,(CamDirection_DFD2) Facing EAST / WEST?
5EDF AND $01
5EE1 JR Z,HeroInputHandle_0
5EE3 LD HL,(ManData_PosPrimary_dfc3) Yes, so walking NORTH.
HeroInputHandle_0 5EE6 BIT 0,L
5EE8 LD HL,$F629 Right hand column of offscreen.
5EEB LD IX,OffsetRectsB Data?
5EEF CALL Z,Vector_Screen_DrawColumn
5EF2 LD HL,(CamDirection_DFD2) Using the camera workout which direction to move by calling the function which moves in the expected direction. (For Example; if camera is NORTH (0), we already know we are facing RIGHT (1), so call function which moves in EAST direction.)
5EF5 LD H,$00
5EF7 ADD HL,HL
5EF8 LD BC,Vector_MovePositionA
5EFB ADD HL,BC
5EFC CALL Call_HL
5EFF LD DE,$0005
5F02 AND A
5F03 SBC HL,DE
5F05 JR Z,HeroInputHandle_1
5F07 LD DE,$01F6
5F0A AND A
5F0B SBC HL,DE
5F0D JR NZ,HeroInputHandle_2
HeroInputHandle_1 5F0F CALL $61B8
HeroInputHandle_2 5F12 LD C,$02
5F14 LD HL,$FE87
HeroInputHandle_3 5F17 LD B,$88
HeroInputHandle_4 5F19 RLD
5F1B DEC HL
5F1C RLD
5F1E DEC HL
5F1F RLD
5F21 DEC HL
5F22 RLD
5F24 DEC HL
5F25 RLD
5F27 DEC HL
5F28 RLD
5F2A DEC HL
5F2B RLD
5F2D DEC HL
5F2E RLD
5F30 DEC HL
5F31 DJNZ HeroInputHandle_4
5F33 DEC C
5F34 JR NZ,HeroInputHandle_3
5F36 POP IX
5F38 LD A,(BgType)
5F3B CP $01
5F3D JR Z,$5F71
5F3F CP $02
5F41 JR Z,$5F76
5F43 LD HL,$40C0
This entry point is used by the routine at Vector_HeroInit.
RotateScreenBlockLeft 5F46 LD DE,$001F Rotate left an area of the screen. (Clouds)
5F49 LD C,$08
HeroInputHandle_5 5F4B PUSH HL
5F4C LD A,(HL)
5F4D ADD HL,DE
5F4E RLA
5F4F LD B,$04
HeroInputHandle_6 5F51 RL (HL)
5F53 DEC HL
5F54 RL (HL)
5F56 DEC HL
5F57 RL (HL)
5F59 DEC HL
5F5A RL (HL)
5F5C DEC HL
5F5D RL (HL)
5F5F DEC HL
5F60 RL (HL)
5F62 DEC HL
5F63 RL (HL)
5F65 DEC HL
5F66 RL (HL)
5F68 DEC HL
5F69 DJNZ HeroInputHandle_6
5F6B POP HL
5F6C INC H
5F6D DEC C
5F6E JR NZ,HeroInputHandle_5
5F70 RET
Prev: 5EC7 Up: Map Next: 5F71