Mercurial > vba-clojure
comparison clojure/com/aurellem/exp/pokemon.clj @ 161:cd7979aa544e
emabled setting pokemon moves and PP
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Tue, 20 Mar 2012 17:13:12 -0500 |
parents | 9ca350a476f0 |
children | 76b031d2f586 |
comparison
equal
deleted
inserted
replaced
160:9ca350a476f0 | 161:cd7979aa544e |
---|---|
1 (ns com.aurellem.exp.pokemon | 1 (ns com.aurellem.exp.pokemon |
2 "Here I find out how pokemon are stored in memory." | 2 "Here I find out how pokemon are stored in memory." |
3 (:use (com.aurellem.gb gb-driver items assembly util | 3 (:use (com.aurellem.gb gb-driver items assembly util |
4 characters)) | 4 characters)) |
5 (:import java.io.File) | |
5 (:import [com.aurellem.gb.gb_driver SaveState])) | 6 (:import [com.aurellem.gb.gb_driver SaveState])) |
6 | 7 |
7 | 8 |
8 (def pidgeot-lvl-36 (mid-game)) | 9 (def pidgeot-lvl-36 (mid-game)) |
9 | 10 |
534 (defn set-baseline [state] | 535 (defn set-baseline [state] |
535 (clojure.java.io/copy | 536 (clojure.java.io/copy |
536 (with-out-str (print-listing state 0xD162 0xD197)) | 537 (with-out-str (print-listing state 0xD162 0xD197)) |
537 baseline)) | 538 baseline)) |
538 | 539 |
539 | |
540 | |
541 (defn compare-pokemon | 540 (defn compare-pokemon |
542 ([state] | 541 ([state] |
543 (let [target (File. "/home/r/temp-poke")] | 542 (let [target (File. "/home/r/temp-poke")] |
544 (clojure.java.io/copy | 543 (clojure.java.io/copy |
545 (with-out-str (print-listing state 0xD162 0xD197)) | 544 (with-out-str (print-listing state 0xD162 0xD197)) |
546 target) | 545 target) |
547 (println (:out | 546 (println (:out |
548 (clojure.java.shell/sh "diff" | 547 (clojure.java.shell/sh "diff" |
549 (.getCanonicalPath baseline) | 548 (.getCanonicalPath baseline) |
550 (.getCanonicalPath target)))))) | 549 (.getCanonicalPath target)))))) |
551 ([] (compare-pokemon-1 @current-state))) | 550 ([] (compare-pokemon @current-state))) |
552 | 551 |
553 | 552 |
554 (defn crazy-pid [] | 553 (defn crazy-pid [] |
555 (read-state "crazy-pidgeot")) | 554 (read-state "crazy-pidgeot")) |