diff clojure/com/aurellem/gb/hxc.clj @ 347:ff65ee0944fe

more progess: now rom.org tangles into hxc.clj; i'll be subdividing the code blocks as I write more.
author Dylan Holmes <ocsenave@gmail.com>
date Sun, 08 Apr 2012 06:13:39 -0500
parents 5639312a393f
children 497ca041f5af
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/gb/hxc.clj	Sun Apr 08 01:28:39 2012 -0500
     1.2 +++ b/clojure/com/aurellem/gb/hxc.clj	Sun Apr 08 06:13:39 2012 -0500
     1.3 @@ -1,3 +1,4 @@
     1.4 +
     1.5  (ns com.aurellem.gb.hxc
     1.6    (:use (com.aurellem.gb assembly characters gb-driver util mem-util
     1.7                           constants species))
     1.8 @@ -8,8 +9,6 @@
     1.9  
    1.10  ; ************* HANDWRITTEN CONSTANTS
    1.11  
    1.12 -
    1.13 -
    1.14  (def pkmn-types
    1.15    [:normal    ;;0
    1.16     :fighting  ;;1
    1.17 @@ -138,7 +137,6 @@
    1.18     "(disable)"
    1.19     ])
    1.20  
    1.21 -
    1.22  ;; ************** HARDCODED DATA
    1.23  
    1.24  (defn hxc-thunk
    1.25 @@ -162,7 +160,6 @@
    1.26     (partial comp (partial map character-codes->str))
    1.27     hxc-thunk))
    1.28  
    1.29 -
    1.30  ;; --------------------------------------------------
    1.31  
    1.32  
    1.33 @@ -510,6 +507,15 @@
    1.34  
    1.35  
    1.36  (defn format-evo
    1.37 +  "Parse a sequence of evolution data, returning a map. First is the
    1.38 +method: 0 = end-evolution-data. 1 = level-up, 2 = item, 3 = trade. Next is an item id, if the
    1.39 +  method of evolution is by item (only stones will actually make pokemon
    1.40 +  evolve, for some auxillary reason.) Finally, the minimum level for
    1.41 +  evolution to occur (level 1 means no limit, which is used for trade
    1.42 +  and item evolutions), followed by the internal id of the pokemon
    1.43 +  into which to evolve. Hence, level up and trade evolutions are
    1.44 +  described with 3
    1.45 +  bytes; item evolutions with four."
    1.46    [coll]
    1.47    (let [method (first coll)]
    1.48      (cond (empty? coll) []
    1.49 @@ -555,7 +561,7 @@
    1.50  (defn hxc-learnsets
    1.51    "Hardcoded map associating pokemon names to lists of pairs [lvl
    1.52    move] of abilities they learn as they level up. The data
    1.53 -exists at ROM@3400, sorted by internal order. Pointers to the data
    1.54 +exists at ROM@34000, sorted by internal order. Pointers to the data
    1.55    exist at ROM@3B1E5; see also, hxc-ptrs-evolve"
    1.56    ([] (hxc-learnsets com.aurellem.gb.gb-driver/original-rom))
    1.57    ([rom]
    1.58 @@ -932,6 +938,9 @@
    1.59  ;; note: 1195C-6A says ABLE#NOT ABLE#, but so does 119C0-119CE.
    1.60  ;; The first instance is for Machines; the second, for stones.
    1.61  
    1.62 +;; 0x251A (in indexable mem): image decompression routine seems to begin here.
    1.63 +
    1.64 +
    1.65  (comment 
    1.66  
    1.67  (def hxc-later
    1.68 @@ -951,9 +960,3 @@
    1.69      (map character-codes->str
    1.70           (take-nth 4 dex))))
    1.71  )
    1.72 -
    1.73 -
    1.74 -
    1.75 -
    1.76 -
    1.77 -