# HG changeset patch # User Robert McIntyre # Date 1336407349 18000 # Node ID 09df21060be66e59fa80d9104292a27386b0409f # Parent 3f01560388028462292a9759a1d4f3a9eaf0bba9# Parent cd6a96a07d2e1b7a5d7748f15589f1377e1cccbc merge diff -r cd6a96a07d2e -r 09df21060be6 clojure/com/aurellem/run/image.clj --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/clojure/com/aurellem/run/image.clj Mon May 07 11:15:49 2012 -0500 @@ -0,0 +1,39 @@ +(ns com.aurellem.run.music + (:use (com.aurellem.gb saves gb-driver util constants + items vbm characters money + rlm-assembly)) + (:use (com.aurellem.run util title save-corruption + bootstrap-0 bootstrap-1)) + (:require clojure.string) + (:import [com.aurellem.gb.gb_driver SaveState]) + (:import java.io.File)) + + + + + +;; want to display an image onto the screen. +;; probably will be the six ponies, possibly with scrolling. + +;; probably don't need hi-color mode since the images shuld be +;; simple. + +;; use background tiles? they provide greater color depth than +;; sprites, and can still be scrolled, so why not? + + +;; First of all, RGB colors in an image are not the same as those in a +;; GameBoy, so I need to convert them. Fortunately, this code is +;; already written for me in this C-code from the public domain +;; hi-color converter by Glen Cook, Jeff Frohwein, and Rob Jones. + +;; the code snipped itself is by Brett Bibby and is translated here +;; from C into clojure. + +;; TODO include original code + + +(def intensity [ + +(defn rgb->gb-rb [[r g b]] + \ No newline at end of file diff -r cd6a96a07d2e -r 09df21060be6 clojure/com/aurellem/run/music.clj --- a/clojure/com/aurellem/run/music.clj Sun May 06 20:54:09 2012 -0500 +++ b/clojure/com/aurellem/run/music.clj Mon May 07 11:15:49 2012 -0500 @@ -392,6 +392,7 @@ (->signed-8-bit (+ ;; two music-steps (- (* 2 (count (music-step 0 0 false)))) + ;; one noise (- (count (music-step nil nil true))) -2 ;; this jump instruction -2 ;; activate frame 1 @@ -542,7 +543,7 @@ (def midi-code->gb-noise-code {nil 0xFF - 35 87 + 35 90 38 20 39 0 }) diff -r cd6a96a07d2e -r 09df21060be6 music/mother.rg Binary file music/mother.rg has changed diff -r cd6a96a07d2e -r 09df21060be6 music/wizards5.mid Binary file music/wizards5.mid has changed