Mercurial > vba-clojure
comparison clojure/com/aurellem/run/bootstrap_0.clj @ 320:9637a0f52e7b
located item-list related addresses.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 03 Apr 2012 23:17:33 -0500 |
parents | 92c47a9cdaea |
children | af86b5ba622b |
comparison
equal
deleted
inserted
replaced
319:92c47a9cdaea | 320:9637a0f52e7b |
---|---|
1 (ns com.aurellem.run.bootstrap-0 | 1 (ns com.aurellem.run.bootstrap-0 |
2 (:use (com.aurellem.gb gb-driver util items vbm characters money)) | 2 (:use (com.aurellem.gb saves gb-driver util |
3 items vbm characters money)) | |
3 (:use (com.aurellem.run util title save-corruption)) | 4 (:use (com.aurellem.run util title save-corruption)) |
4 (:use (com.aurellem.exp item-bridge)) | 5 (:use (com.aurellem.exp item-bridge)) |
5 (:import [com.aurellem.gb.gb_driver SaveState])) | 6 (:import [com.aurellem.gb.gb_driver SaveState])) |
6 | 7 |
7 (defn-memo boot-root [] | 8 (defn-memo boot-root [] |
314 ([] (walk-to-counter | 315 ([] (walk-to-counter |
315 (return-to-viridian-mart))) | 316 (return-to-viridian-mart))) |
316 ([script] | 317 ([script] |
317 (->> script | 318 (->> script |
318 (walk [↑ ↑ ←])))) | 319 (walk [↑ ↑ ←])))) |
320 | |
321 | |
322 | |
323 ;; useful addresses | |
324 52262 ;; --- current-cursor-offset | |
325 52278 ;; --- current screen-offset | |
326 | |
327 | |
328 (defn exp-item-list [] | |
329 (clojure.pprint/pprint | |
330 (apply harmonic-compare | |
331 (map read-state | |
332 ["up-1" "down-1" | |
333 "up-2" "down-2" | |
334 "up-3" "down-3" | |
335 "up-4" "down-4" | |
336 "up-5" "down-5" | |
337 "up-6"])))) | |
338 | |
339 | |
319 | 340 |
320 (defn buy-item | 341 (defn buy-item |
321 "Assumes that the main item-screen is up, and buys | 342 "Assumes that the main item-screen is up, and buys |
322 quantity of the nth item in the list, assuming that you | 343 quantity of the nth item in the list, assuming that you |
323 have enough money." | 344 have enough money." |