5 procedure DrawSmall(id
, x
, y
: integer);
6 procedure Draw(id
, sum
, x
, y
: integer; drawIndicator
: boolean);
10 uses Items
, Vars
, Func
;
12 procedure DrawSmall(id
, x
, y
: integer);
14 texid
, source
: integer;
16 texid
:= Items
.GetTexture(id
);
17 source
:= Items
.GetTextureSource(id
);
18 if source
= 0 then DrawImage(Vars
.tex8
[texid
], x
, y
)
19 else if source
= 1 then DrawImage(Vars
.item8
[texid
], x
, y
)
22 procedure Draw(id
, sum
, x
, y
: integer; drawIndicator
: boolean);
28 texid
, source
, class, max
, len
: integer;
30 if sum
<= 0 then exit
;
32 texid
:= Items
.GetTexture(id
);
33 source
:= Items
.GetTextureSource(id
);
34 if source
= 0 then DrawImage(Vars
.tex
[texid
], x
, y
)
35 else if source
= 1 then DrawImage(Vars
.item
[texid
], x
, y
)
37 if drawIndicator
and (sum
> 1) then begin
38 class := Items
.GetIndicatorType(id
);
39 if class = numeric
then begin
40 Func
.DrawFontText('' + sum
, x
, y
+ 8)
41 end else if class = line
then begin
42 max
:= Items
.GetMaximum(id
);
43 len
:= sum
* maxLength
/ max
;
44 if len
<= redLength
then SetColor(255, 0, 0) else SetColor(0, 255, 0);
45 DrawLine(x
, y
+ maxHeight
, x
+ len
, y
+ maxHeight
);