diff 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
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/gb_driver.clj	Mon May 07 11:15:49 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/gb_driver.clj	Mon May 07 12:31:16 2012 -0500
     1.3 @@ -269,6 +269,9 @@
     1.4         (defn ~@forms)
     1.5         (alter-var-root (var ~fun-name) memoize))))
     1.6  
     1.7 +(def original-rom (rom (root)))
     1.8  
     1.9 -
    1.10 -(def original-rom (rom (root)))
    1.11 \ No newline at end of file
    1.12 +(defn rgb->gb-rb [[r g b :as color]]
    1.13 +  (let [store (int-array 3)]
    1.14 +    (Gb/translateRGB (int-array color) store)
    1.15 +    (vec store)))
    1.16 \ No newline at end of file