Prev: E5D0 Up: Map Next: E62B
E5D6: Draws the text for an object in a pocket.
Used by the routine at Inv_Redraw.
Input
C Colour
DE Position(y,x)
HL Address of text string.
Output
InventoryDrawText E5D6 LD A,(HL)
E5D7 INC HL
E5D8 BIT 7,A
E5DA JR Z,InventoryDrawText_0
E5DC CP $FF
E5DE JR Z,InventoryDrawText_1
E5E0 CP $FC
E5E2 JR NZ,InventoryDrawText_0
E5E4 LD A,E
E5E5 ADD A,(HL)
E5E6 LD E,A
E5E7 INC HL
E5E8 LD A,D
E5E9 ADD A,(HL)
E5EA LD D,A
E5EB INC HL
E5EC JR InventoryDrawText
InventoryDrawText_0 E5EE CALL TileDraw
E5F1 INC E
E5F2 JR InventoryDrawText
InventoryDrawText_1 E5F4 LD A,(HL) See if object can be empty or full. This appears as '$FA' after the '$FF' end of string marker.
E5F5 CP $FA
E5F7 RET NZ
E5F8 LD A,C Use the text colour to see which pocket we are drawing the text for.
E5F9 CP $44
E5FB JR NZ,InventoryDrawText_2
E5FD LD A,(Pocket1)
E600 JR InventoryDrawText_3
InventoryDrawText_2 E602 LD A,(Pocket2)
InventoryDrawText_3 E605 LD C,$06
E607 PUSH BC
E608 CP $0D
E60A JR NZ,InventoryDrawText_4
E60C LD BC,Flag_LaserGun
E60F JR InventoryDrawText_6
InventoryDrawText_4 E611 CP $08
E613 JR NZ,InventoryDrawText_5
E615 LD BC,Flag_FuelCan
E618 JR InventoryDrawText_6
InventoryDrawText_5 E61A LD BC,Flag_WaterBucket
InventoryDrawText_6 E61D INC E
E61E LD HL,"FULL"
E621 LD A,(BC)
E622 POP BC
E623 OR A
E624 JR NZ,InventoryDrawText
E626 LD HL,"EMPTY"
E629 JR InventoryDrawText
Prev: E5D0 Up: Map Next: E62B