Mercurial > vba-clojure
view clojure/com/aurellem/gb/saves.clj @ 337:2dd40f6b6a1f
restore memoization.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Sat, 07 Apr 2012 07:43:17 -0500 |
parents | 9637a0f52e7b |
children | 3b3cd62b6106 |
line wrap: on
line source
1 (ns com.aurellem.gb.saves2 (:use (com.aurellem.gb gb-driver))3 (:import [com.aurellem.gb.gb_driver SaveState]))5 (defn pre-wild-battle []6 (read-state "prepare-for-battle"))8 (defn pre-trainer-battle []9 (read-state "pre-trainer-battle"))11 (defn rlm-pallet-town []12 (read-state "rlm-pallet-town"))14 (defn talk-to-oak []15 (read-state "talk-to-oak"))17 (defn normal-conv []18 (read-state "normal-conversation"))20 (defn oak-battle []21 (read-state "oak-battle"))23 (defn crit-fight []24 (read-state "battle-rival"))26 (defn grass-edge []27 (read-state "grass' edge"))29 (defn end-oak-conv []30 (read-state "end-oak-conversation"))33 (defmacro gen-save [save-name]34 `(defn ~save-name35 ~(str "load " save-name " from disk.")36 []37 (read-state ~(str save-name))))39 (gen-save cursor-item-1)40 (gen-save cursor-item-2)41 (gen-save cursor-item-3)42 (gen-save cursor-item-4)43 (gen-save cursor-item-5)44 (gen-save cursor-item-6)