comparison clojure/com/aurellem/gb/species.clj @ 215:aba78e52faba

merge
author Robert McIntyre <rlm@mit.edu>
date Fri, 23 Mar 2012 19:26:04 -0500
parents 62969eb07e04 57258c269bcb
children ca9d2897435b
comparison
equal deleted inserted replaced
214:62969eb07e04 215:aba78e52faba
1 (ns com.aurellem.gb.species 1 (ns com.aurellem.gb.species
2 (:use (com.aurellem.gb characters gb-driver util constants)) 2 (:use (com.aurellem.gb assembly characters gb-driver util
3 constants))
4 (:use (com.aurellem.world practice))
3 (:import [com.aurellem.gb.gb_driver SaveState])) 5 (:import [com.aurellem.gb.gb_driver SaveState]))
4 6
5 7
6 (def hxc-pokenames 8 (def hxc-pokenames
7 "The hardcoded names of the 190 species in memory. List begins at ROM@E8000." 9 "The hardcoded names of the 190 species in memory. List begins at ROM@E8000."
9 name-length 10] 11 name-length 10]
10 (map character-codes->str 12 (map character-codes->str
11 (partition name-length 13 (partition name-length
12 (take (* count-species name-length) 14 (take (* count-species name-length)
13 (drop 0xE8000 15 (drop 0xE8000
14 (rom(root)))))))) 16 (rom(root))))))))
15 17
16 (def hxc-items 18 (def hxc-items
17 "The hardcoded names of the items in memory. List begins at ROM@45B7 " 19 "The hardcoded names of the items in memory. List begins at ROM@45B7 "
18 (map character-codes->str 20 (map character-codes->str
19 (take-nth 2 21 (take-nth 2
59 (partition-by #(= % 0x50) 61 (partition-by #(= % 0x50)
60 (take 560 62 (take 560
61 (drop 0x71500 63 (drop 0x71500
62 (rom (root)))))))) 64 (rom (root))))))))
63 65
66
67 (def hxc-dialog
68 "The hardcoded dialogue in memory, including in-game alerts. List begins at ROM@98000."
69 (character-codes->str(take 0x0F728
70 (drop (+ 0x98000)
71 (rom (root)))))
72
64 (def hxc-later 73 (def hxc-later
65 "Running this code produces, e.g. hardcoded names NPCs give 74 "Running this code produces, e.g. hardcoded names NPCs give
66 their pokemon" 75 their pokemon. Will sort through it later."
67 (print (character-codes->str(take 10000 76 (print (character-codes->str(take 10000
68 (drop 0x71597 77 (drop 0x71597
69 (rom (root))))))) 78 (rom (root)))))))
79
80
81
70 82
71 83
72 84
73 85
74 (let [dex 86 (let [dex
152 0x4D :meowth 164 0x4D :meowth
153 0x4E :krabby 165 0x4E :krabby
154 0x52 :vulpix 166 0x52 :vulpix
155 0x53 :ninetails 167 0x53 :ninetails
156 0x54 :pikachu 168 0x54 :pikachu
157 0x55 :raichu 169 0x55 :riachu
158 0x58 :dratini 170 0x58 :dratini
159 0x59 :dragonair 171 0x59 :dragonair
160 0x5A :kabuto 172 0x5A :kabuto
161 0x5B :kabutops 173 0x5B :kabutops
162 0x5C :horsea 174 0x5C :horsea
290 (set-memory state (pokemon-species2-address poke-num) 302 (set-memory state (pokemon-species2-address poke-num)
291 species-code))) 303 species-code)))
292 ([poke-num new-species] 304 ([poke-num new-species]
293 (set-species2 @current-state poke-num new-species))) 305 (set-species2 @current-state poke-num new-species)))
294 306
295 307
296
297