Prev: B939 Up: Map Next: B9A9
B969: Prepare Draw 2 Byte Sprite
Used by the routines at DrawEntity and DisplayEntity.
PrepDraw2 B969 CALL GetEntitySprite Call GetEntitySprite.
B96C LD L,(IX+$03)
B96F LD H,(IX+$04)
B972 LD A,L
B973 DEC A
B974 RLCA
B975 AND %00001110 Keep only bits 1-3.
B977 OR %11110000 Set bits 4-7.
B979 LD B,A
B97A LD A,L
B97B AND %00000111 Keep only bits 0-2.
B97D LD A,(DE)
B97E JR Z,PrepDraw2_0
B980 INC A
PrepDraw2_0 B981 LD ($96A6),A
B984 LD A,(DE)
B985 INC DE
B986 NEG
B988 AND %00000111 Keep only bits 0-2.
B98A ADD A,A
B98B ADD A,A
B98C LD C,A
B98D ADD A,A
B98E ADD A,C
B98F LD C,A
B990 LD A,L
B991 AND %00000111 Keep only bits 0-2.
B993 LD A,C
B994 JR NZ,PrepDraw2_1
B996 ADD A,$06
PrepDraw2_1 B998 LD ($BA92),A
B99B LD A,(DE)
B99C INC DE
B99D LD ($96A4),A
B9A0 LD ($96A5),A
B9A3 CALL ScreenAddress Call ScreenAddress.
B9A6 LD C,$00 C=00.
B9A8 RET Return.
View the equivalent code in;
View the equivalent code in;
Prev: B939 Up: Map Next: B9A9