diff options
author | David Thompson <dthompson2@worcester.edu> | 2019-11-14 08:48:32 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2019-11-14 08:48:32 -0500 |
commit | a92f569176de809ecdd8f73e9862ee1043b39da0 (patch) | |
tree | d674d18e52f920795a459249e5ed9dcfa190a8bc | |
parent | 2dae30227cd7c3ba4c8ab20b04414469c309913a (diff) |
render: tiled: Respect image transparent color values.
-rw-r--r-- | chickadee/render/tiled.scm | 6 |
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))) |