Mercurial > vba-clojure
view clojure/com/aurellem/run/image.clj @ 486:3f0156038802
added image.clj
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 07 May 2012 11:15:44 -0500 |
parents | |
children | 09b3bc0b71b5 |
line wrap: on
line source
1 (ns com.aurellem.run.music2 (:use (com.aurellem.gb saves gb-driver util constants3 items vbm characters money4 rlm-assembly))5 (:use (com.aurellem.run util title save-corruption6 bootstrap-0 bootstrap-1))7 (:require clojure.string)8 (:import [com.aurellem.gb.gb_driver SaveState])9 (:import java.io.File))15 ;; want to display an image onto the screen.16 ;; probably will be the six ponies, possibly with scrolling.18 ;; probably don't need hi-color mode since the images shuld be19 ;; simple.21 ;; use background tiles? they provide greater color depth than22 ;; sprites, and can still be scrolled, so why not?25 ;; First of all, RGB colors in an image are not the same as those in a26 ;; GameBoy, so I need to convert them. Fortunately, this code is27 ;; already written for me in this C-code from the public domain28 ;; hi-color converter by Glen Cook, Jeff Frohwein, and Rob Jones.30 ;; the code snipped itself is by Brett Bibby and is translated here31 ;; from C into clojure.33 ;; TODO include original code36 (def intensity [38 (defn rgb->gb-rb [[r g b]]