comparison clojure/com/aurellem/gb_driver.clj @ 134:718abf3bec8a

removed hardcoded /home/r/ strings from paths and made them relative to user.home
author Robert McIntyre <rlm@mit.edu>
date Sun, 18 Mar 2012 00:56:29 -0500
parents bcb5c41626b4
children d125a294f9d8
comparison
equal deleted inserted replaced
133:424510993296 134:718abf3bec8a
5 (:import (java.nio IntBuffer ByteOrder))) 5 (:import (java.nio IntBuffer ByteOrder)))
6 6
7 ;; Savestates 7 ;; Savestates
8 (defrecord SaveState [data]) 8 (defrecord SaveState [data])
9 9
10 (def user-home (File. (System/getProperty "user.home")))
11
10 (def ^:dynamic *save-state-cache* 12 (def ^:dynamic *save-state-cache*
11 (File. "/home/r/proj/pokemon-escape/save-states/")) 13 (File. user-home "proj/pokemon-escape/save-states/"))
12 14
13 (def current-state (atom nil)) 15 (def current-state (atom nil))
14 16
15 (defn state-cache-file [name] 17 (defn state-cache-file [name]
16 (File. *save-state-cache* (str name ".sav"))) 18 (File. *save-state-cache* (str name ".sav")))
39 41
40 ;; Gameboy management 42 ;; Gameboy management
41 (Gb/loadVBA) 43 (Gb/loadVBA)
42 44
43 (def yellow-rom-image 45 (def yellow-rom-image
44 (File. "/home/r/proj/pokemon-escape/roms/yellow.gbc")) 46 (File. user-home "proj/pokemon-escape/roms/yellow.gbc"))
45 47
46 (def yellow-save-file 48 (def yellow-save-file
47 (File. "/home/r/proj/pokemon-escape/roms/yellow.sav")) 49 (File. user-home "proj/pokemon-escape/roms/yellow.sav"))
48 50
49 (def on? (atom nil)) 51 (def on? (atom nil))
50 52
51 (defn shutdown! [] (Gb/shutdown) (reset! on? false)) 53 (defn shutdown! [] (Gb/shutdown) (reset! on? false))
52 54