comparison clojure/com/aurellem/items.clj @ 107:ad96e9464d6a

working on the start of the bootstrap program; expanded register array to 29 elements
author Robert McIntyre <rlm@mit.edu>
date Thu, 15 Mar 2012 03:24:05 -0500
parents 3a60bb14a64a
children
comparison
equal deleted inserted replaced
106:3a60bb14a64a 107:ad96e9464d6a
11 (defn item-list [^SaveState state] 11 (defn item-list [^SaveState state]
12 (subvec 12 (subvec
13 (vec (memory state)) 13 (vec (memory state))
14 item-list-start 14 item-list-start
15 (+ item-list-start 150))) 15 (+ item-list-start 150)))
16
17 (def item-hack-3 (read-state 77557))
18 16
19 (def item-code->item-name 17 (def item-code->item-name
20 (hash-map 18 (hash-map
21 0x01 :master-ball 19 0x01 :master-ball
22 0x02 :ultra-ball 20 0x02 :ultra-ball
156 0xFA :TM50 ;; substitute 154 0xFA :TM50 ;; substitute
157 0xFB :TM51 ;; "cut" 155 0xFB :TM51 ;; "cut"
158 0xFC :TM52 ;; "fly" 156 0xFC :TM52 ;; "fly"
159 0xFD :TM53 ;; "surf" 157 0xFD :TM53 ;; "surf"
160 0xFE :TM54 ;; "strength" 158 0xFE :TM54 ;; "strength"
161 0xFF :end-of-list-sentinel 159 0xFF :end-of-list-sentinel))
162 ))
163 160
164 (def item-name->item-code 161 (def item-name->item-code
165 (zipmap (vals item-code->item-name) 162 (zipmap (vals item-code->item-name)
166 (keys item-code->item-name))) 163 (keys item-code->item-name)))
167 164