(bind-func xtm_light_power
(let ((lights:xtm_lights* null))
(lambda (light:i32 power)
(set! lights (xtm_get_lights))
(if (> light (tref lights 9)) (tset! lights 9 light))
(set! light (- light 1))
(if (or (< light 0) (> light 9))
(begin (printf "No such light!\n") void)
(begin (pset! (tref lights 6) light power) void)))))