summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2019-11-14 08:48:32 -0500
committerDavid Thompson <dthompson2@worcester.edu>2019-11-14 08:48:32 -0500
commita92f569176de809ecdd8f73e9862ee1043b39da0 (patch)
treed674d18e52f920795a459249e5ed9dcfa190a8bc
parent2dae30227cd7c3ba4c8ab20b04414469c309913a (diff)
render: tiled: Respect image transparent color values.
-rw-r--r--chickadee/render/tiled.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/chickadee/render/tiled.scm b/chickadee/render/tiled.scm
index e51e3c0..7ce8c53 100644
--- a/chickadee/render/tiled.scm
+++ b/chickadee/render/tiled.scm
@@ -231,8 +231,10 @@
(parse-color-channel value 1)))
(_ (error "unsupported property type" type))))))
(define (parse-image node)
- (let ((source (attr node 'source)))
- (load-image (scope source))))
+ (let ((source (attr node 'source))
+ (trans (attr node 'trans)))
+ (load-image (scope source)
+ #:transparent-color (and trans (string->color trans)))))
(define (parse-frame node)
(let ((tile-id (attr node 'tileid string->number))
(duration (attr node 'duration string->number)))