Mercurial > vba-clojure
comparison clojure/com/aurellem/exp/pokemon.clj @ 227:d5dddf33543c
Added functions for getting and setting badges.
author | Dylan Holmes <ocsenave@gmail.com> |
---|---|
date | Sat, 24 Mar 2012 05:45:06 -0500 |
parents | 4f5ea93cbaca |
children |
comparison
equal
deleted
inserted
replaced
226:21641c1c3f87 | 227:d5dddf33543c |
---|---|
88 ([character] | 88 ([character] |
89 (set-sixth-pokemon-name-first-character @current-state | 89 (set-sixth-pokemon-name-first-character @current-state |
90 character))) | 90 character))) |
91 | 91 |
92 | 92 |
93 (def end-of-name-marker 0x50) | 93 ;;(def end-of-name-marker 0x50) |
94 (def max-name-length 10) | 94 ;;(def max-name-length 10) |
95 (def name-width 11) | 95 ;;(def name-width 11) |
96 | 96 |
97 (defn read-name [codes] | 97 ;; (defn read-name [codes] |
98 (character-codes->str | 98 ;; (character-codes->str |
99 (take-while | 99 ;; (take-while |
100 (partial not= end-of-name-marker) codes))) | 100 ;; (partial not= end-of-name-marker) codes))) |
101 | 101 |
102 | 102 |
103 (defn sixth-pokemon-name [^SaveState state] | 103 (defn sixth-pokemon-name [^SaveState state] |
104 (read-name | 104 (read-name |
105 (subvec (vec (memory state)) | 105 (subvec (vec (memory state)) |