comparison clojure/com/aurellem/gb/species.clj @ 222:c9a855de1d07

enabled pokedex printing.
author Robert McIntyre <rlm@mit.edu>
date Sat, 24 Mar 2012 03:10:56 -0500
parents ca9d2897435b
children 3dfb9dd3db9d
comparison
equal deleted inserted replaced
221:2fac825a4de9 222:c9a855de1d07
1 (ns com.aurellem.gb.species 1 (ns com.aurellem.gb.species
2 (:use (com.aurellem.gb assembly characters gb-driver util 2 (:use (com.aurellem.gb assembly characters gb-driver util
3 constants)) 3 constants))
4 (:import [com.aurellem.gb.gb_driver SaveState])) 4 (:import [com.aurellem.gb.gb_driver SaveState]))
5 5
6
7
6 (def species-code->species-name 8 (def species-code->species-name
7 {0x01 :rhydon 9 {0x01 :rhydon
8 0x02 :kangaskhan 10 0x02 :kangaskhan
9 0x03 :nidoran-male 11 0x03 :nidoran♂
10 0x04 :clefairy 12 0x04 :clefairy
11 0x05 :spearow 13 0x05 :spearow
12 0x06 :voltorb 14 0x06 :voltorb
13 0x07 :nidoking 15 0x07 :nidoking
14 0x08 :slowbro 16 0x08 :slowbro
16 0x0A :exeggutor 18 0x0A :exeggutor
17 0x0B :lickitung 19 0x0B :lickitung
18 0x0C :exeggcute 20 0x0C :exeggcute
19 0x0D :grimer 21 0x0D :grimer
20 0x0E :gengar 22 0x0E :gengar
21 0x0F :nidoran-female 23 0x0F :nidoran♀
22 0x10 :nidoqueen 24 0x10 :nidoqueen
23 0x11 :cubone 25 0x11 :cubone
24 0x12 :rhyhorn 26 0x12 :rhyhorn
25 0x13 :lapras 27 0x13 :lapras
26 0x14 :arcanine 28 0x14 :arcanine
70 0x4B :zapdos 72 0x4B :zapdos
71 0x4C :ditto 73 0x4C :ditto
72 0x4D :meowth 74 0x4D :meowth
73 0x4E :krabby 75 0x4E :krabby
74 0x52 :vulpix 76 0x52 :vulpix
75 0x53 :ninetails 77 0x53 :ninetales
76 0x54 :pikachu 78 0x54 :pikachu
77 0x55 :riachu 79 0x55 :raichu
78 0x58 :dratini 80 0x58 :dratini
79 0x59 :dragonair 81 0x59 :dragonair
80 0x5A :kabuto 82 0x5A :kabuto
81 0x5B :kabutops 83 0x5B :kabutops
82 0x5C :horsea 84 0x5C :horsea
83 0x5D :sedra 85 0x5D :seadra
84 0x60 :sandshrew 86 0x60 :sandshrew
85 0x61 :sandslash 87 0x61 :sandslash
86 0x62 :omanyte 88 0x62 :omanyte
87 0x63 :omastar 89 0x63 :omastar
88 0x64 :jigglypuff 90 0x64 :jigglypuff
118 0x88 :muk 120 0x88 :muk
119 0x8A :kingler 121 0x8A :kingler
120 0x8B :cloyster 122 0x8B :cloyster
121 0x8D :electrode 123 0x8D :electrode
122 0x8E :clefable 124 0x8E :clefable
123 0x8F :wheezing 125 0x8F :weezing
124 0x90 :persian 126 0x90 :persian
125 0x91 :marowak 127 0x91 :marowak
126 0x93 :haunter 128 0x93 :haunter
127 0x94 :abra 129 0x94 :abra
128 0x95 :alakazam 130 0x95 :alakazam
151 0xB4 :charizard 153 0xB4 :charizard
152 0xB9 :oddish 154 0xB9 :oddish
153 0xBA :gloom 155 0xBA :gloom
154 0xBB :vileplume 156 0xBB :vileplume
155 0xBC :bellsprout 157 0xBC :bellsprout
156 0xBD :weepenbell 158 0xBD :weepinbell
157 0xBE :victreebel}) 159 0xBE :victreebel})
158 160
159 (def species-ID-1 0xD163) 161 (def species-ID-1 0xD163)
160 162
161 (def species-name->species-code 163 (def species-name->species-code
210 (set-memory state (pokemon-species2-address poke-num) 212 (set-memory state (pokemon-species2-address poke-num)
211 species-code))) 213 species-code)))
212 ([poke-num new-species] 214 ([poke-num new-species]
213 (set-species2 @current-state poke-num new-species))) 215 (set-species2 @current-state poke-num new-species)))
214 216
215 217
218 (def pokedex-num->species-name
219 {1 :bulbasaur
220 2 :ivysaur
221 3 :venusaur
222 4 :charmander
223 5 :charmeleon
224 6 :charizard
225 7 :squirtle
226 8 :wartortle
227 9 :blastoise
228 10 :caterpie
229 11 :metapod
230 12 :butterfree
231 13 :weedle
232 14 :kakuna
233 15 :beedrill
234 16 :pidgey
235 17 :pidgeotto
236 18 :pidgeot
237 19 :rattata
238 20 :raticate
239 21 :spearow
240 22 :fearow
241 23 :ekans
242 24 :arbok
243 25 :pikachu
244 26 :raichu
245 27 :sandshrew
246 28 :sandslash
247 29 :nidoran♀
248 30 :nidorina
249 31 :nidoqueen
250 32 :nidoran♂
251 33 :nidorino
252 34 :nidoking
253 35 :clefairy
254 36 :clefable
255 37 :vulpix
256 38 :ninetales
257 39 :jigglypuff
258 40 :wigglytuff
259 41 :zubat
260 42 :golbat
261 43 :oddish
262 44 :gloom
263 45 :vileplume
264 46 :paras
265 47 :parasect
266 48 :venonat
267 49 :venomoth
268 50 :diglett
269 51 :dugtrio
270 52 :meowth
271 53 :persian
272 54 :psyduck
273 55 :golduck
274 56 :mankey
275 57 :primeape
276 58 :growlithe
277 59 :arcanine
278 60 :poliwag
279 61 :poliwhirl
280 62 :poliwrath
281 63 :abra
282 64 :kadabra
283 65 :alakazam
284 66 :machop
285 67 :machoke
286 68 :machamp
287 69 :bellsprout
288 70 :weepinbell
289 71 :victreebel
290 72 :tentacool
291 73 :tentacruel
292 74 :geodude
293 75 :graveler
294 76 :golem
295 77 :ponyta
296 78 :rapidash
297 79 :slowpoke
298 80 :slowbro
299 81 :magnemite
300 82 :magneton
301 83 :farfetch
302 84 :doduo
303 85 :dodrio
304 86 :seel
305 87 :dewgong
306 88 :grimer
307 89 :muk
308 90 :shellder
309 91 :cloyster
310 92 :gastly
311 93 :haunter
312 94 :gengar
313 95 :onix
314 96 :drowzee
315 97 :hypno
316 98 :krabby
317 99 :kingler
318 100 :voltorb
319 101 :electrode
320 102 :exeggcute
321 103 :exeggutor
322 104 :cubone
323 105 :marowak
324 106 :hitmonlee
325 107 :hitmonchan
326 108 :lickitung
327 109 :koffing
328 110 :weezing
329 111 :rhyhorn
330 112 :rhydon
331 113 :chansey
332 114 :tangela
333 115 :kangaskhan
334 116 :horsea
335 117 :seadra
336 118 :goldeen
337 119 :seaking
338 120 :staryu
339 121 :starmie
340 122 :mr-mime
341 123 :scyther
342 124 :jynx
343 125 :electabuzz
344 126 :magmar
345 127 :pinsir
346 128 :tauros
347 129 :magikarp
348 130 :gyarados
349 131 :lapras
350 132 :ditto
351 133 :eevee
352 134 :vaporeon
353 135 :jolteon
354 136 :flareon
355 137 :porygon
356 138 :omanyte
357 139 :omastar
358 140 :kabuto
359 141 :kabutops
360 142 :aerodactyl
361 143 :snorlax
362 144 :articuno
363 145 :zapdos
364 146 :moltres
365 147 :dratini
366 148 :dragonair
367 149 :dragonite
368 150 :mewtwo
369 151 :mew})
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526