diff clojure/com/aurellem/run/bootstrap_0.clj @ 321:af86b5ba622b

created function to determine total item-offset
author Robert McIntyre <rlm@mit.edu>
date Wed, 04 Apr 2012 00:16:49 -0500
parents 9637a0f52e7b
children d604bd3c122c
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj	Tue Apr 03 23:17:33 2012 -0500
     1.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj	Wed Apr 04 00:16:49 2012 -0500
     1.3 @@ -335,7 +335,16 @@
     1.4                  "up-4" "down-4"
     1.5                  "up-5" "down-5"
     1.6                  "up-6"]))))
     1.7 -			
     1.8 +
     1.9 +(def item-cursor-offset-address 52262)
    1.10 +(def item-screen-offset-address 52278)
    1.11 +
    1.12 +(defn item-offset
    1.13 +  ([^SaveState state]
    1.14 +     (let [mem (memory state)]
    1.15 +       (+ (aget mem item-screen-offset-address)
    1.16 +          (aget mem item-cursor-offset-address))))
    1.17 +  ([] (item-offset @current-state)))
    1.18  
    1.19  
    1.20  (defn buy-item