diff 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
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/item_bridge.clj	Sun Mar 25 22:33:17 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/item_bridge.clj	Mon Mar 26 03:08:54 2012 -0500
     1.3 @@ -217,3 +217,41 @@
     1.4      ]))
     1.5  
     1.6  
     1.7 +
     1.8 +(def pc-item-list-start 0xD539)
     1.9 +(def pc-item-list-width 101)
    1.10 +
    1.11 +(def corrupted-items-width 512)
    1.12 +
    1.13 +(defn items-record
    1.14 +  ([^SaveState state]
    1.15 +     (subvec (vec (memory state))
    1.16 +             item-list-start
    1.17 +             (+ item-list-start corrupted-items-width)))
    1.18 +  ([] (items-record @current-state)))
    1.19 +
    1.20 +(defn pc-items-record
    1.21 +  ([^SaveState state]
    1.22 +     (subvec (vec (memory state))
    1.23 +             pc-item-list-start
    1.24 +             (+ pc-item-list-width pc-item-list-start)))
    1.25 +  ([] (pc-items-record @current-state)))
    1.26 +             
    1.27 +(defn print-listing-items
    1.28 +  ([^SaveState state]
    1.29 +     (print-listing state item-list-start
    1.30 +                    (+ item-list-start corrupted-items-width))
    1.31 +     state)
    1.32 +  ([] (print-listing-items @current-state)))
    1.33 +
    1.34 +(defn print-listing-pc-items
    1.35 +  ([^SaveState state]
    1.36 +     (print-listing
    1.37 +      state
    1.38 +      pc-item-list-start
    1.39 +      (+ pc-item-list-width pc-item-list-start))
    1.40 +     state)
    1.41 +  ([] (print-listing-pc-items @current-state)))
    1.42 +  
    1.43 +                     
    1.44 +      
    1.45 \ No newline at end of file