comparison clojure/com/aurellem/exp/item_bridge.clj @ 247:22f58fa47c3c

starting work on unoptimized bootstrap script.
author Robert McIntyre <rlm@mit.edu>
date Mon, 26 Mar 2012 03:08:54 -0500
parents 19fd38fe376e
children b7f682bb3090
comparison
equal deleted inserted replaced
244:27ca947084cf 247:22f58fa47c3c
215 0x0C ;; to Route 3's map-function 215 0x0C ;; to Route 3's map-function
216 0x55 216 0x55
217 ])) 217 ]))
218 218
219 219
220
221 (def pc-item-list-start 0xD539)
222 (def pc-item-list-width 101)
223
224 (def corrupted-items-width 512)
225
226 (defn items-record
227 ([^SaveState state]
228 (subvec (vec (memory state))
229 item-list-start
230 (+ item-list-start corrupted-items-width)))
231 ([] (items-record @current-state)))
232
233 (defn pc-items-record
234 ([^SaveState state]
235 (subvec (vec (memory state))
236 pc-item-list-start
237 (+ pc-item-list-width pc-item-list-start)))
238 ([] (pc-items-record @current-state)))
239
240 (defn print-listing-items
241 ([^SaveState state]
242 (print-listing state item-list-start
243 (+ item-list-start corrupted-items-width))
244 state)
245 ([] (print-listing-items @current-state)))
246
247 (defn print-listing-pc-items
248 ([^SaveState state]
249 (print-listing
250 state
251 pc-item-list-start
252 (+ pc-item-list-width pc-item-list-start))
253 state)
254 ([] (print-listing-pc-items @current-state)))
255
256
257