changeset 244:27ca947084cf

minor fixes
author Dylan Holmes <ocsenave@gmail.com>
date Sun, 25 Mar 2012 22:33:17 -0500
parents 5b59c6f17cd5
children a50faba43967 22f58fa47c3c
files clojure/com/aurellem/gb/hxc.clj
diffstat 1 files changed, 38 insertions(+), 41 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/hxc.clj	Sun Mar 25 22:29:12 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/hxc.clj	Sun Mar 25 22:33:17 2012 -0500
     1.3 @@ -22,6 +22,17 @@
     1.4                   (partition-by #(= % 0x50)
     1.5                                 (take 1200
     1.6                                       (drop 0x45B7 (rom (root))))))))
     1.7 +
     1.8 +(def hxc-types
     1.9 +  "The hardcoded type names in memory. List begins at ROM@27D99,
    1.10 +  shortly before hxc-titles."
    1.11 +  (map character-codes->str
    1.12 +       (take-nth 2
    1.13 +                 (partition-by #(= 0x50 %)
    1.14 +                               (take 102
    1.15 +                                     (drop 0x27D99
    1.16 +                                           (rom (root))))))))
    1.17 +
    1.18  (def hxc-titles
    1.19    "The hardcoded names of the trainer titles in memory. List begins at
    1.20  ROM@27E77"
    1.21 @@ -74,23 +85,33 @@
    1.22  
    1.23  
    1.24  (def pkmn-types
    1.25 -  {0 :normal
    1.26 -   1 :fighting
    1.27 -   2 :flying
    1.28 -   3 :poison
    1.29 -   4 :ground
    1.30 -   5 :rock
    1.31 -   7 :bug
    1.32 -   8 :ghost
    1.33 -
    1.34 -   20 :fire
    1.35 -   21 :water
    1.36 -   22 :grass
    1.37 -   23 :electric
    1.38 -   24 :psychic
    1.39 -   25 :ice
    1.40 -   26 :dragon
    1.41 -   })
    1.42 +  [:normal
    1.43 +   :fighting
    1.44 +   :flying
    1.45 +   :poison
    1.46 +   :ground
    1.47 +   :rock
    1.48 +   :bug
    1.49 +   :ghost
    1.50 +   :A
    1.51 +   :B
    1.52 +   :C
    1.53 +   :D
    1.54 +   :E
    1.55 +   :F
    1.56 +   :G
    1.57 +   :H
    1.58 +   :I
    1.59 +   :J
    1.60 +   :K
    1.61 +   :fire
    1.62 +   :water
    1.63 +   :grass
    1.64 +   :electric
    1.65 +   :psychic
    1.66 +   :ice
    1.67 +   :dragon
    1.68 +   ])
    1.69  
    1.70  
    1.71  (def hxc-advantage
    1.72 @@ -104,30 +125,6 @@
    1.73    
    1.74  
    1.75  
    1.76 -;; (def pkmn-types
    1.77 -;;   [:normal
    1.78 -;;    :fighting
    1.79 -;;    :flying
    1.80 -;;    :poison
    1.81 -;;    :ground
    1.82 -;;    :rock
    1.83 -;;    :bird ;;?
    1.84 -;;    :bug
    1.85 -;;    :ghost
    1.86 -;;    :A
    1.87 -;;    :B
    1.88 -;;    :C
    1.89 -;;    :D
    1.90 -;;    :E
    1.91 -;;    :fire
    1.92 -;;    :water
    1.93 -;;    :grass
    1.94 -;;    :electric
    1.95 -;;    :psychic
    1.96 -;;    :ice
    1.97 -;;    :poision?])
    1.98 -
    1.99 -
   1.100  
   1.101  
   1.102