Prev: F157 Up: Map Next: F1B4
F199: Turn facing bits back into a direction, and find the view's sprite
Used by the routines at PICK_UP and KNIGHT_CONTROLS.
The author's FACING, the other way from MIRROR (MITRO): bits 6 and 5 of E give C one of $08 or $40 (view 0) or $04 or $80 (view 1), and for view 0 HL moves on by the word at IY+$62, from the first view's sprite to the other's. Picking up (PICK_UP) and fighting (KNIGHT_CONTROLS) use it to take the pose for the way the knight faces.
Input
E The facing, in bits 5 and 6
HL The pose's sprite in view 1
Output
C The direction bit
HL The pose's sprite in the view he faces
FACING F199 BIT 6,E View 1?
F19B JR NZ,FA0
F19D PUSH DE View 0: its sprite is further on
F19E LD DE,(AWAY_FRAMES)
F1A2 ADD HL,DE
F1A3 POP DE
F1A4 LD C,$08 $08, or $40 when mirrored
F1A6 BIT 5,E
F1A8 RET Z
F1A9 LD C,$40
F1AB RET
FA0 F1AC LD C,$04 FA0: $80, or $04 when mirrored
F1AE BIT 5,E
F1B0 RET NZ
F1B1 LD C,$80
F1B3 RET
Prev: F157 Up: Map Next: F1B4