comparison clojure/com/aurellem/exp/item_bridge.clj @ 179:d63886d63b2f

cleaned up code; added gb.saves
author Robert McIntyre <rlm@mit.edu>
date Wed, 21 Mar 2012 23:02:45 -0500
parents 95b2758dd517
children 426fce7e609d
comparison
equal deleted inserted replaced
178:8d9e2804af9b 179:d63886d63b2f
1 (ns com.aurellem.exp.item-bridge 1 (ns com.aurellem.exp.item-bridge
2 (:use (com.aurellem.gb util constants gb-driver vbm items assembly)) 2 (:use (com.aurellem.gb saves util constants gb-driver vbm items assembly))
3 (:use (com.aurellem.run title save-corruption)) 3 (:use (com.aurellem.run title save-corruption))
4 (:use (com.aurellem.exp pokemon)) 4 ;;(:use (com.aurellem.exp pokemon))
5 (:import [com.aurellem.gb.gb_driver SaveState])) 5 (:import [com.aurellem.gb.gb_driver SaveState]))
6 6
7 (defn corrupt-item-state [] 7 (defn corrupt-item-state []
8 (second (destroy-item-end-of-list-marker))) 8 (second (destroy-item-end-of-list-marker)))
9 9
54 (tick state) 54 (tick state)
55 55
56 (loop [i 0 56 (loop [i 0
57 pcs []] 57 pcs []]
58 (if (= i ticks) 58 (if (= i ticks)
59 (set pcs) 59 (filter (partial < 0x2000)(sort (set pcs)))
60 (do 60 (do
61 (com.aurellem.gb.Gb/tick) 61 (com.aurellem.gb.Gb/tick)
62 (recur (inc i) 62 (recur (inc i)
63 (conj pcs (first (registers)))))))) 63 (conj pcs (first (registers))))))))
64 64