Prev: 47412 Up: Map Next: 47465
47417: Prepare Draw 2/ 3 Byte Sprite
Used by the routines at RemoveEntity and DisplayEntity.
PrepDraw23 47417 CALL GetSpriteA Call GetSpriteA.
47420 LD HL,(38560) HL=Saved_X (saved X position).
47423 LD A,L
47424 DEC A
47425 RLCA
47426 AND %00001110 Keep only bits 1-3.
47428 OR %11110000 Set bits 4-7.
47430 LD B,A Store the result in B.
47431 LD A,(DE)
47432 INC DE
47433 NEG
47435 AND %00000111 Keep only bits 0-2.
47437 ADD A,A
47438 ADD A,A
47439 LD C,A
47440 ADD A,A
47441 ADD A,C
47442 LD C,A
47443 LD A,L
47444 AND %00000111 Keep only bits 0-2.
47446 LD A,C
47447 JR NZ,PrepDraw23_0
47449 ADD A,6
PrepDraw23_0 47451 LD (47635),A
47454 LD A,(DE)
47455 INC DE
47456 LD (38563),A Write A to SomeHeight.
47459 CALL ScreenAddress Call ScreenAddress.
47462 LD C,0 C=0.
47464 RET Return.
Prev: 47412 Up: Map Next: 47465