Mercurial > vba-clojure
comparison clojure/com/aurellem/gb/pokemon.clj @ 197:659764a2ea40
break for eating!
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Fri, 23 Mar 2012 00:14:37 -0500 |
parents | 8dd17081829f |
children | 1e2aa688e6e4 |
comparison
equal
deleted
inserted
replaced
196:8dd17081829f | 197:659764a2ea40 |
---|---|
83 (+ (* poke-num name-width) OT-start) | 83 (+ (* poke-num name-width) OT-start) |
84 (concat (str->character-codes new-name) [end-of-name-marker]))) | 84 (concat (str->character-codes new-name) [end-of-name-marker]))) |
85 ([n new-name] | 85 ([n new-name] |
86 (set-original-trainer @current-state n new-name))) | 86 (set-original-trainer @current-state n new-name))) |
87 | 87 |
88 (def OT-ID-addresses [0xD176 0xD1A2 0xD1CE 0xD1FA 0xD228 0xD252]) | 88 (def OT-ID-addresses [0xD176 0xD1A2 0xD1CE 0xD1FA 0xD226 0xD252]) |
89 | 89 |
90 (defn read-OT-id | 90 (defn read-OT-id |
91 ([^SaveState state poke-num] | 91 ([^SaveState state poke-num] |
92 (let [mem (memory state) | 92 (let [mem (memory state) |
93 start (OT-ID-addresses poke-num)] | 93 start (OT-ID-addresses poke-num)] |
299 (print "\n") | 299 (print "\n") |
300 (println "+------------------+----+--------+--------+") | 300 (println "+------------------+----+--------+--------+") |
301 (println "| Move | PP | Max PP | PP UPs |") | 301 (println "| Move | PP | Max PP | PP UPs |") |
302 (println "+------------------+----+--------+--------+") | 302 (println "+------------------+----+--------+--------+") |
303 | 303 |
304 | 304 (dorun |
305 (for [[name {:keys [pp-ups current-pp]}] (:moves info)] | |
306 (printf | |
307 "| %-17s| %2d | %02d | %02d |\n" | |
308 (.substring (str name) 1) | |
309 current-pp (max-pp name pp-ups) pp-ups))) | |
305 | 310 |
306 (println "+------------------+----+--------+--------+") | 311 (println "+------------------+----+--------+--------+") |
307 | 312 |
308 | 313 |
309 | 314 |