From d5a454eff8e722c372b42efd476b52a51bba327d Mon Sep 17 00:00:00 2001 From: Gene Pasquet Date: Thu, 15 May 2025 14:20:19 +0200 Subject: Define player start position in level tmx --- src/macroknight/tiles.hy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/macroknight/tiles.hy') diff --git a/src/macroknight/tiles.hy b/src/macroknight/tiles.hy index 40692e7..f9e112d 100644 --- a/src/macroknight/tiles.hy +++ b/src/macroknight/tiles.hy @@ -1,13 +1,13 @@ (import pygame) (defclass TileSet [] - (defn __init__ [self image scaling tile-w tile-h [padding 0]] + (defn __init__ [self image-file scaling tile-w tile-h [padding 0]] (setv self.tile-w tile-w) (setv self.tile-h tile-h) (setv self.scaling scaling) (setv self.sheet - (let [surf (pygame.image.load "assets/monochrome-transparent.png") + (let [surf (pygame.image.load image-file) map-width (* (.get_width surf) self.scaling) map-height (* (.get_height surf) self.scaling)] (if (!= self.scaling 1) -- cgit v1.2.3