Mercurial > vba-clojure
comparison clojure/com/aurellem/gb/gb_driver.clj @ 488:09b3bc0b71b5
added rgb->gbRGB translation code.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 07 May 2012 12:31:16 -0500 |
parents | 8484e6f6db2c |
children | 641e1c511224 |
comparison
equal
deleted
inserted
replaced
487:09df21060be6 | 488:09b3bc0b71b5 |
---|---|
267 (let [fun-name (first forms)] | 267 (let [fun-name (first forms)] |
268 `(do | 268 `(do |
269 (defn ~@forms) | 269 (defn ~@forms) |
270 (alter-var-root (var ~fun-name) memoize)))) | 270 (alter-var-root (var ~fun-name) memoize)))) |
271 | 271 |
272 | |
273 | |
274 (def original-rom (rom (root))) | 272 (def original-rom (rom (root))) |
273 | |
274 (defn rgb->gb-rb [[r g b :as color]] | |
275 (let [store (int-array 3)] | |
276 (Gb/translateRGB (int-array color) store) | |
277 (vec store))) |