Mercurial > vba-clojure
diff clojure/com/aurellem/gb/items.clj @ 173:8665160f0f3d
saved corrupted save.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 21 Mar 2012 03:31:12 -0500 |
parents | cd7979aa544e |
children | 4ea8ff49af87 c8ec477beeac |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/gb/items.clj Wed Mar 21 03:24:18 2012 -0500 1.2 +++ b/clojure/com/aurellem/gb/items.clj Wed Mar 21 03:31:12 2012 -0500 1.3 @@ -8,12 +8,14 @@ 1.4 1.5 (def item-list-start 0xD31C) 1.6 1.7 -(defn item-list [^SaveState state] 1.8 - (subvec 1.9 - (vec (memory state)) 1.10 - item-list-start 1.11 - (+ item-list-start 150))) 1.12 - 1.13 +(defn item-list 1.14 + ([^SaveState state] 1.15 + (subvec 1.16 + (vec (memory state)) 1.17 + item-list-start 1.18 + (+ item-list-start 255))) 1.19 + ([] (item-list @current-state))) 1.20 + 1.21 (def item-code->item-name 1.22 (hash-map 1.23 0x01 :master-ball 1.24 @@ -78,7 +80,7 @@ 1.25 0x3E :lemonade 1.26 0x3F :s.s.ticket 1.27 0x40 :gold-teeth 1.28 - 0x41 :x-attach 1.29 + 0x41 :x-attack 1.30 0x42 :x-defend 1.31 0x43 :x-speed 1.32 0x44 :x-special