diff clojure/com/aurellem/gb/gb_driver.clj @ 489:641e1c511224

cleanup.
author Robert McIntyre <rlm@mit.edu>
date Mon, 07 May 2012 12:37:04 -0500
parents 09b3bc0b71b5
children a6d060a64246
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/gb_driver.clj	Mon May 07 12:31:16 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/gb_driver.clj	Mon May 07 12:37:04 2012 -0500
     1.3 @@ -271,6 +271,11 @@
     1.4  
     1.5  (def original-rom (rom (root)))
     1.6  
     1.7 +
     1.8 +;; RGB colors in an image are not the same as those in a GameBoy, so I
     1.9 +;; need to convert them.  Fortunately, this code is already written
    1.10 +;; for me in this C-code from the public domain hi-color converter by
    1.11 +;; Glen Cook, Jeff Frohwein, and Rob Jones.
    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)