Mercurial > vba-clojure
changeset 322:d604bd3c122c
added function to determine wuantity of items currently selected
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 04 Apr 2012 00:35:44 -0500 |
parents | af86b5ba622b |
children | 92ee94945327 |
files | clojure/com/aurellem/run/bootstrap_0.clj save-states/1-item.sav save-states/2-items.sav save-states/3-items.sav save-states/4-items.sav |
diffstat | 5 files changed, 20 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
1.1 --- a/clojure/com/aurellem/run/bootstrap_0.clj Wed Apr 04 00:16:49 2012 -0500 1.2 +++ b/clojure/com/aurellem/run/bootstrap_0.clj Wed Apr 04 00:35:44 2012 -0500 1.3 @@ -336,6 +336,8 @@ 1.4 "up-5" "down-5" 1.5 "up-6"])))) 1.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 @@ -347,6 +349,24 @@ 1.13 ([] (item-offset @current-state))) 1.14 1.15 1.16 +(defn exp-item-selection [] 1.17 + (clojure.pprint/pprint 1.18 + (apply memory-compare 1.19 + (map read-state 1.20 + ["1-item" 1.21 + "2-items" 1.22 + "3-items" 1.23 + "4-items" 1.24 + ])))) 1.25 + 1.26 +(def item-quantity-selected-address 65432) 1.27 + 1.28 +(defn item-quantity-selected 1.29 + ([^SaveState state] 1.30 + (aget (memory state) item-quantity-selected-address)) 1.31 + ([] (item-quantity-selected @current-state))) 1.32 + 1.33 + 1.34 (defn buy-item 1.35 "Assumes that the main item-screen is up, and buys 1.36 quantity of the nth item in the list, assuming that you
2.1 Binary file save-states/1-item.sav has changed
3.1 Binary file save-states/2-items.sav has changed
4.1 Binary file save-states/3-items.sav has changed
5.1 Binary file save-states/4-items.sav has changed