Prev: 47417 Up: Map Next: 47529
47465: Prepare Draw 2 Byte Sprite
Used by the routines at DrawEntity and DisplayEntity.
PrepDraw2 47465 CALL GetEntitySprite Call GetEntitySprite.
47468 LD L,(IX+3)
47471 LD H,(IX+4)
47474 LD A,L
47475 DEC A
47476 RLCA
47477 AND %00001110 Keep only bits 1-3.
47479 OR %11110000 Set bits 4-7.
47481 LD B,A
47482 LD A,L
47483 AND %00000111 Keep only bits 0-2.
47485 LD A,(DE)
47486 JR Z,PrepDraw2_0
47488 INC A
PrepDraw2_0 47489 LD (38566),A
47492 LD A,(DE)
47493 INC DE
47494 NEG
47496 AND %00000111 Keep only bits 0-2.
47498 ADD A,A
47499 ADD A,A
47500 LD C,A
47501 ADD A,A
47502 ADD A,C
47503 LD C,A
47504 LD A,L
47505 AND %00000111 Keep only bits 0-2.
47507 LD A,C
47508 JR NZ,PrepDraw2_1
47510 ADD A,6
PrepDraw2_1 47512 LD (47762),A
47515 LD A,(DE)
47516 INC DE
47517 LD (38564),A
47520 LD (38565),A
47523 CALL ScreenAddress Call ScreenAddress.
47526 LD C,0 C=0.
47528 RET Return.
View the equivalent code in;
View the equivalent code in;
Prev: 47417 Up: Map Next: 47529