Prev: B934 Up: Map Next: B969
B939: Prepare Draw 2/ 3 Byte Sprite
Used by the routines at RemoveEntity and DisplayEntity.
PrepDraw23 B939 CALL GetSpriteA Call GetSpriteA.
B93C LD HL,($96A0) HL=Saved_X (saved X position).
B93F LD A,L
B940 DEC A
B941 RLCA
B942 AND %00001110 Keep only bits 1-3.
B944 OR %11110000 Set bits 4-7.
B946 LD B,A Store the result in B.
B947 LD A,(DE)
B948 INC DE
B949 NEG
B94B AND %00000111 Keep only bits 0-2.
B94D ADD A,A
B94E ADD A,A
B94F LD C,A
B950 ADD A,A
B951 ADD A,C
B952 LD C,A
B953 LD A,L
B954 AND %00000111 Keep only bits 0-2.
B956 LD A,C
B957 JR NZ,PrepDraw23_0
B959 ADD A,$06
PrepDraw23_0 B95B LD ($BA13),A
B95E LD A,(DE)
B95F INC DE
B960 LD ($96A3),A Write A to SomeHeight.
B963 CALL ScreenAddress Call ScreenAddress.
B966 LD C,$00 C=00.
B968 RET Return.
Prev: B934 Up: Map Next: B969