# HG changeset patch # User Dylan Holmes # Date 1333263034 18000 # Node ID 3d4f60b4a4af6ac128aea86cb16945503b234243 # Parent e6a5dfd31230e1a5fbfa0bd0f59e3fac0e5f3bf6 added hxc-intro-pkmn for seeing which pokemon is displayed in oak's intro, and sxc-intro-pkmn! for modifying it. diff -r e6a5dfd31230 -r 3d4f60b4a4af clojure/com/aurellem/gb/hxc.clj --- a/clojure/com/aurellem/gb/hxc.clj Sat Mar 31 06:47:05 2012 -0500 +++ b/clojure/com/aurellem/gb/hxc.clj Sun Apr 01 01:50:34 2012 -0500 @@ -736,6 +736,9 @@ :base-def rating-def :base-speed rating-speed :base-special rating-special + :o0 pic-dimensions + :o1 ptr-pic-obverse-1 + :o2 ptr-pic-obverse-2 })) (partition entry-size @@ -744,7 +747,27 @@ rom)))))))) +(defn hxc-intro-pkmn + "The hardcoded pokemon to display in Prof. Oak's introduction; the pokemon's +internal id is stored at ROM@5EDB." + ([] (hxc-intro-pkmn + com.aurellem.gb.gb-driver/original-rom)) + ([rom] + (nth (hxc-pokenames rom) (nth rom 0x5EDB)))) + +(defn sxc-intro-pkmn! + "Set the hardcoded pokemon to display in Prof. Oak's introduction." + [pokemon] + (write-rom! + (rewrite-rom 0x5EDB + [ + (inc + ((zipmap + (hxc-pokenames) + (range)) + pokemon))]))) + (defn hxc-item-prices "The hardcoded list of item prices in memory. List begins at ROM@4495" ([] (hxc-item-prices com.aurellem.gb.gb-driver/original-rom)) diff -r e6a5dfd31230 -r 3d4f60b4a4af clojure/com/aurellem/gb/mem_util.clj --- a/clojure/com/aurellem/gb/mem_util.clj Sat Mar 31 06:47:05 2012 -0500 +++ b/clojure/com/aurellem/gb/mem_util.clj Sun Apr 01 01:50:34 2012 -0500 @@ -140,10 +140,10 @@ (map (fn [n] [(hex n) - (take k (drop n rom))]) + (take k (drop n array))]) (find-sublists - rom + array codes)))) (defn spelling-bee