Prev: BF4E Up: Map Next: BF91
BF59: Draw one carried object
Used by the routine at show_carried_slot.
Clears a box three cells wide and 24 rows high in the buffer, draws the object's sprite in it if the slot is not empty, copies the box to the screen and colours its nine cells from object_attributes.
display_object BF59 PUSH BC
BF5A PUSH HL
BF5B LD A,B x = 24 x (slot number) + 16, y = 0
BF5C NEG
BF5E ADD A,$03
BF60 SLA A
BF62 SLA A
BF64 SLA A
BF66 LD C,A
BF67 SLA A
BF69 ADD A,C
BF6A ADD A,$10
BF6C LD (IX+$1A),A
BF6F LD (IX+$1B),$00
BF73 LD C,(IX+$1A) blank the box in the buffer
BF76 LD B,(IX+$1B)
BF79 PUSH HL
BF7A CALL calc_vidbuf_addr
BF7D LD L,C
BF7E LD H,B
BF7F LD BC,$0318
BF82 XOR A
BF83 CALL fill_window
BF86 POP HL
BF87 LD A,(HL) an empty slot has type 0: nothing to draw
BF88 AND A
BF89 JR Z,show_carried_slot
BF8B LD (IX+$00),A
BF8E CALL print_sprite
Prev: BF4E Up: Map Next: BF91