Skip to content

Commit 523998b

Browse files
committed
(building) SUpport loading groudsprites with different height
1 parent 17ded1a commit 523998b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

agrf/lib/building/image_sprite.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
from agrf.graphics import SCALE_TO_ZOOM
33

44

5-
def image_sprite(path, crop=True, child=False):
5+
def image_sprite(path, y=127, crop=True, child=False):
66
return grf.AlternativeSprites(
77
grf.FileSprite(
88
grf.ImageFile(path),
99
0,
1010
0,
1111
256,
12-
127,
12+
y,
1313
xofs=0 if child else -124,
14-
yofs=0,
14+
yofs=127 - y,
1515
bpp=32,
1616
zoom=SCALE_TO_ZOOM[4],
1717
crop=crop,

0 commit comments

Comments
 (0)