Mercurial > vba-clojure
view clojure/com/aurellem/item_bridge.clj @ 131:7f7cc8858d2e
added rival-name letter-map
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 17 Mar 2012 21:29:08 -0500 |
parents | 69f241de436d |
children | d16cf9d829dd |
line wrap: on
line source
1 (ns com.aurellem.item-bridge2 (:use (com.aurellem gb-driver vbm title save-corruption items assembly))3 (:import [com.aurellem.gb_driver SaveState]))6 (defn corrupt-item-state []7 (second (destroy-item-end-of-list-marker)))9 (defn corrupt-item-state []10 (read-state "corrupt-items"))12 (defn talk-to-rival []13 (read-state "talk-to-rival"))15 (def rival-name-start 0xD349)18 (defn set-rival-name [^SaveState state codes]19 (set-state! state)20 (let [mem (memory state)]21 (dorun (map (fn [index val]22 (aset mem index val))23 (range rival-name-start24 (+ rival-name-start25 (count codes))) codes))26 (write-memory! mem)27 (update-state)))29 (defn view-rival-name [name-codes]30 (->31 (set-rival-name (talk-to-rival) name-codes)32 (step [:a])33 (play 50)))35 (defn rival-name-sequence []36 (let [i (atom 1)]37 (fn []38 (let [codes (range @i (+ 5 @i))]39 (println codes)40 (view-rival-name codes)41 (reset! i (+ 5 @i))))))45 0 : end-of-name-sentinel46 1 :47 2 :48 3 :49 4 :50 5 :51 6 :52 7 :53 8 :54 9 :55 10 :56 11 :57 12 :58 13 :59 14 :60 15 :61 16 :62 17 :63 18 :64 19 :65 20 :66 21 :67 22 :68 23 :69 24 :70 25 :71 26 :72 27 :73 28 :74 29 :75 30 :76 31 :77 32 :78 33 :79 34 :80 35 :81 36 :82 37 :83 38 :84 39 :85 40 :86 41 :87 42 :88 43 :89 44 :90 45 :91 46 :92 47 :93 48 :94 49 :95 50 :96 51 :97 52 :98 53 :99 54 :100 55 :101 56 :102 57 :103 58 :104 59 :105 60 :106 61 :107 62 :108 63 :109 64 :110 65 :111 66 :112 67 :113 68 :114 69 :115 70 :116 71 :117 72 :118 73 :119 74 :120 75 :121 76 :122 77 :123 78 :124 79 :125 80 :126 81 :127 82 :128 83 :129 84 :130 85 :131 86 :132 87 :133 88 :134 89 :135 90 :136 91 :137 92 :138 93 :139 94 :140 95 :141 96 : A (small-bold)142 97 : B (small-bold)143 98 : C (small-bold)144 99 : D (small-bold)145 100 : E (small-bold)146 101 : F (small-bold)147 102 : G (small-bold)148 103 : H (small-bold)149 104 : I (small-bold)150 105 : V (small-bold)151 106 : S (small-bold)152 107 : L (small-bold)153 108 : M (small-bold)154 109 :155 110 :156 111 :157 112 :158 113 :159 114 :160 115 :161 116 :162 117 :163 118 :164 119 :165 120 :166 121 :167 122 :168 123 :169 124 :170 125 :171 126 :172 127 :173 128 : A174 129 : B175 130 : C176 131 : D177 132 : E178 133 : F179 134 : G180 135 : H181 136 : I182 137 : J183 138 : K184 139 : L185 140 : M186 141 : N187 142 : O188 143 : P189 144 : Q190 145 : R191 146 : S192 147 : T193 148 : U194 149 : V195 150 : W196 151 : X197 152 : Y198 153 : Z199 154 : (200 155 : )201 156 : :202 157 : ;203 158 :204 159 :205 160 : a206 161 : b207 162 : c208 163 : d209 164 : e210 165 : f211 166 : g212 167 : h213 168 : i214 169 : j215 170 : k216 171 : l217 172 : m218 173 : n219 174 : o220 175 : p221 176 : q222 177 : r223 178 : s224 179 : t225 180 : u226 181 : v227 182 : w228 183 : x229 184 : y230 185 : z231 186 : e-with-grave232 187 :233 188 :234 189 :235 190 :236 191 :237 192 :238 193 :239 194 :240 195 :241 196 :242 197 :243 198 :244 199 :245 200 :246 201 :247 202 :248 203 :249 204 :250 205 :251 206 :252 207 :253 208 :254 209 :255 210 :256 211 :257 212 :258 213 :259 214 :260 215 :261 216 :262 217 :263 218 :264 219 :265 220 :266 221 :267 222 :268 223 :269 224 : '270 225 : PK271 226 : MN272 227 :273 228 :274 229 :275 230 : ?276 231 : !277 232 : .278 233 :279 234 :280 235 :281 236 :282 237 :283 238 :284 239 : male-symbol285 240 : pokemon-money-symbol286 241 : .287 242 : /288 243 : ,289 244 : female-symbol290 245 :291 246 : 0292 247 : 1293 248 : 2294 249 : 3295 250 : 4296 251 : 5297 252 : 6298 253 : 7299 254 : 8300 255 : 9