changeset 227:d5dddf33543c

Added functions for getting and setting badges.
author Dylan Holmes <ocsenave@gmail.com>
date Sat, 24 Mar 2012 05:45:06 -0500
parents 21641c1c3f87
children edce489c3c21
files clojure/com/aurellem/exp/pokemon.clj clojure/com/aurellem/gb/badges.clj clojure/com/aurellem/gb/characters.clj clojure/com/aurellem/gb/gb_driver.clj clojure/com/aurellem/world/practice.clj save-states/inject-surprise.sav save-states/new-game-menu.sav
diffstat 7 files changed, 284 insertions(+), 30 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/pokemon.clj	Sat Mar 24 05:38:17 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/pokemon.clj	Sat Mar 24 05:45:06 2012 -0500
     1.3 @@ -90,14 +90,14 @@
     1.4                                               character)))
     1.5  
     1.6  
     1.7 -(def end-of-name-marker 0x50)
     1.8 -(def max-name-length 10)
     1.9 -(def name-width 11)
    1.10 +;;(def end-of-name-marker 0x50)
    1.11 +;;(def max-name-length 10)
    1.12 +;;(def name-width 11)
    1.13  
    1.14 -(defn read-name [codes]
    1.15 -  (character-codes->str
    1.16 -   (take-while
    1.17 -    (partial not= end-of-name-marker) codes)))
    1.18 +;; (defn read-name [codes]
    1.19 +;;   (character-codes->str
    1.20 +;;    (take-while
    1.21 +;;     (partial not= end-of-name-marker) codes)))
    1.22      
    1.23  
    1.24  (defn sixth-pokemon-name [^SaveState state]
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/clojure/com/aurellem/gb/badges.clj	Sat Mar 24 05:45:06 2012 -0500
     2.3 @@ -0,0 +1,56 @@
     2.4 +(ns com.aurellem.gb.badges
     2.5 +  (:use (com.aurellem.gb gb-driver util constants))
     2.6 +  (:use (com.aurellem.world practice))
     2.7 +  (:import [com.aurellem.gb.gb_driver SaveState]))
     2.8 +
     2.9 +(def badges '(:boulder :cascade :thunder :marsh :rainbow :soul :volcano
    2.10 +     :earth))
    2.11 +
    2.12 +(defn get-badges
    2.13 +  "Returns a list of the current badges held by the player."
    2.14 +  ([state]
    2.15 +    ((fn this [coll n]
    2.16 +      (cond (zero? n) '()
    2.17 +            (zero? (rem n 2)) (recur (pop coll) (int (/ n 2)))
    2.18 +            :else (cons (peek coll) (this (pop coll) (int (/ n
    2.19 +                                                             2))))))
    2.20 +     badges
    2.21 +     (aget (memory state) 0xD355)
    2.22 +     ))
    2.23 +  ([] (get-badges @current-state)))
    2.24 +
    2.25 +(defn set-badges
    2.26 +  "Sets the badges held by the player. badge-list may contain :boulder
    2.27 +:cascade :thunder :marsh :rainbow :soul :volcano."
    2.28 +  ([state badge-list]
    2.29 +     (let [has-badge (set badge-list)]
    2.30 +       (->>
    2.31 +        ((fn [n coll]
    2.32 +           (cond
    2.33 +             (empty? coll) n
    2.34 +             (has-badge (peek coll)) (recur (inc(* 2 n)) (pop coll))
    2.35 +             :else (recur (* 2 n) (pop coll))))
    2.36 +      
    2.37 +         0
    2.38 +         (vec badges))
    2.39 +        (set-memory state 0xD355))))
    2.40 +     
    2.41 +    
    2.42 +  ([badge-list] (set-badges @current-state badge-list)))
    2.43 +
    2.44 +
    2.45 +  
    2.46 +
    2.47 +    
    2.48 +
    2.49 +  
    2.50 +  ;; (let [mem (aget (memory state) 0xD354)]
    2.51 +  ;;   ((fn this [coll n]
    2.52 +  ;;     (cond (zero? n) '()
    2.53 +  ;;           (zero? (rem n 2)) (recur (pop coll) (int (/ n 2)))
    2.54 +  ;;           :else (cons (peek coll) (this (pop coll) (int (/ n
    2.55 +  ;;                                                            2))))))
    2.56 +  ;;    badges
    2.57 +  ;;    (aget (memory state) 0xD354)
    2.58 +  ;;    )))
    2.59 +  
    2.60 \ No newline at end of file
     3.1 --- a/clojure/com/aurellem/gb/characters.clj	Sat Mar 24 05:38:17 2012 -0500
     3.2 +++ b/clojure/com/aurellem/gb/characters.clj	Sat Mar 24 05:45:06 2012 -0500
     3.3 @@ -29,12 +29,12 @@
     3.4     ;;0x00   "<";;"end-of-name-sentinel" ;; begin messsage
     3.5     ;;0x49   "\n //" ;; ocsenave: pagebreak pokedex
     3.6     ;;0x4E   "\n..." ; ocsenave: clearscroll pokedex page
     3.7 -   0x4F   "\n" ; newline
     3.8 +   ;;0x4F   "\n" ; newline
     3.9     ;;0x50   "#";;"end-of-pokemon-name-sentinel"
    3.10 -   0x51   "\n\n" ;; ocsenave: clear screen
    3.11 +   ;;0x51   "\n\n" ;; ocsenave: clear screen
    3.12     0x52 "[RED]" ;;ocsenave: placeholder for your name?
    3.13     0x54   "[POKE]"
    3.14 -   0x55   "_" ;; ocsenave: breaking space?
    3.15 +   ;;0x55   "_" ;; ocsenave: breaking space?
    3.16     ;0x57   ">" ;; ocsenave: end message
    3.17     ;0x5F   ">" ;; ocsenave: end pokedex entry??
    3.18     0x60   "A-bold"
     4.1 --- a/clojure/com/aurellem/gb/gb_driver.clj	Sat Mar 24 05:38:17 2012 -0500
     4.2 +++ b/clojure/com/aurellem/gb/gb_driver.clj	Sat Mar 24 05:45:06 2012 -0500
     4.3 @@ -5,6 +5,7 @@
     4.4      (:import (java.nio IntBuffer ByteOrder)))
     4.5  
     4.6  ;; Savestates
     4.7 +
     4.8  (defrecord SaveState [data])
     4.9  
    4.10  (def user-home (File. (System/getProperty "user.home")))
    4.11 @@ -268,3 +269,6 @@
    4.12         (defn ~@forms)
    4.13         (alter-var-root (var ~fun-name) memoize))))
    4.14  
    4.15 +
    4.16 +
    4.17 +(def original-rom (rom (root)))
    4.18 \ No newline at end of file
     5.1 --- a/clojure/com/aurellem/world/practice.clj	Sat Mar 24 05:38:17 2012 -0500
     5.2 +++ b/clojure/com/aurellem/world/practice.clj	Sat Mar 24 05:45:06 2012 -0500
     5.3 @@ -1,12 +1,15 @@
     5.4  (ns com.aurellem.world.practice
     5.5 -  (:use (com.aurellem.gb saves util constants gb-driver vbm items
     5.6 -  assembly characters))
     5.7 -  (:use (com.aurellem.run title save-corruption))
     5.8 -  ;;(:use (com.aurellem.exp pokemon))
     5.9 -  (:use (com.aurellem.exp item-bridge))
    5.10 -  (:import [com.aurellem.gb.gb_driver SaveState])
    5.11 -  
    5.12 -  )
    5.13 +  (:use (com.aurellem.gb gb-driver))
    5.14 +
    5.15 + (:use (com.aurellem.gb saves util constants gb-driver vbm items assembly characters))
    5.16 + (:use (com.aurellem.run title))
    5.17 + (:use (com.aurellem.exp pokemon))
    5.18 + (:use (com.aurellem.exp item-bridge))
    5.19 + (:import [com.aurellem.gb.gb_driver SaveState]))
    5.20 +
    5.21 +
    5.22 +;;(def original-rom (rom(root)))
    5.23 +
    5.24  
    5.25  (def hex-pc (comp hex PC))
    5.26  
    5.27 @@ -123,17 +126,24 @@
    5.28  
    5.29  
    5.30  
    5.31 -(defn spell [state mem n]
    5.32 -  (print (character-codes->str
    5.33 +
    5.34 +(defn spell-array
    5.35 +  [array mem n]
    5.36 +  (character-codes->str
    5.37            (take n (drop mem
    5.38 -                        (vec(memory state)))))))
    5.39 +                        (vec array)))))
    5.40  
    5.41 +(defn spell
    5.42 +  ([state mem n]
    5.43 +     (spell (memory state) mem n))
    5.44 +  ([mem n] (spell @current-state mem n)))
    5.45  
    5.46 -(do
    5.47 +
    5.48 +
    5.49 +(comment
    5.50    (println)
    5.51    (print (character-codes->str (take 6000 (drop 0xA75F4
    5.52 -                                               (vec(com.aurellem.gb.gb-driver/rom))))))
    5.53 -  )
    5.54 +                                               (vec(com.aurellem.gb.gb-driver/rom)))))))
    5.55  
    5.56  ;(dorun (map println (view-memory* (state-surprise)  0x1AEF 1600)))
    5.57  
    5.58 @@ -151,7 +161,7 @@
    5.59      (= (take (count sub) list) sub) list
    5.60      :else (recur (rest list) sub)))
    5.61  
    5.62 -(defn subloc
    5.63 +(defn find-sublist
    5.64    "Returns the position of the first occurence of sublist."
    5.65    [list sub]
    5.66    (loop [n 0 a list]
    5.67 @@ -160,6 +170,31 @@
    5.68        (= (take (count sub) a) sub) n
    5.69        :else (recur (inc n) (rest a)))))
    5.70  
    5.71 +(defn find-sublists
    5.72 +  "Returns a vector of the occurences of sublists."
    5.73 +  [list sub]
    5.74 +  (let [m (find-sublist list sub)]
    5.75 +    (if (nil? m) '()
    5.76 +        (cons m
    5.77 +              (map (partial + (inc m))
    5.78 +                   (find-sublists
    5.79 +                    (drop (inc m) list)
    5.80 +                    sub))))))
    5.81 +
    5.82 +(defn spelling-bee
    5.83 +  "Search for the given string in ROM, returning short snippets of
    5.84 +text around the results."
    5.85 +  [str k]
    5.86 +  (let [rom (rom(root))]
    5.87 +    (map
    5.88 +     (fn [n]
    5.89 +       [(hex n)
    5.90 +        (character-codes->str (take k (drop n rom)))])
    5.91 +     
    5.92 +     (find-sublists
    5.93 +      rom
    5.94 +      (str->character-codes str)))))
    5.95 +
    5.96  
    5.97  
    5.98  
    5.99 @@ -178,10 +213,169 @@
   5.100    ([str k]
   5.101       (change-speech (state-speak) str k))
   5.102    ([str]
   5.103 -     (change-speech str 0))
   5.104 -       
   5.105 -         
   5.106 -    
   5.107 -      
   5.108 +     (change-speech str 0)))
   5.109 +
   5.110 +
   5.111 +
   5.112 +(defn rewrite-memory
   5.113 +  "Alters the vector of memory. Treats strings as lists of character
   5.114 +ops."
   5.115 +  ([mem start strs-or-ops]
   5.116 +     (let [x (first strs-or-ops)]
   5.117 +       (cond (empty? strs-or-ops) mem
   5.118 +             (string? x)
   5.119 +             
   5.120 +             (recur mem start
   5.121 +                    (concat
   5.122 +                     (str->character-codes x)
   5.123 +                     (rest strs-or-ops)))
   5.124 +        :else
   5.125 +        (recur
   5.126 +         (assoc mem start x)
   5.127 +         (inc start)
   5.128 +         (rest strs-or-ops))))))
   5.129 +
   5.130 +(def rewrite-rom
   5.131 +  "Alters the ROM array using write-memory."
   5.132 +  (partial rewrite-memory (vec (rom(root)))))
   5.133 +
   5.134 +(defn restore-rom! [] (write-rom! original-rom))
   5.135 +
   5.136 +
   5.137 +
   5.138 +(def oak-intro
   5.139 +  
   5.140 +                  (list "Hello there!"
   5.141 +                        0x4F
   5.142 +                        "Welcome to the"
   5.143 +                        0x55
   5.144 +                        "world of "
   5.145 +                        0x54
   5.146 +                        "MON!"
   5.147 +                        0x51
   5.148 +                        "My name is OAK!"
   5.149 +                        0x4F
   5.150 +                        "People call me"
   5.151 +                        0x55
   5.152 +                        "the "
   5.153 +                        0x54
   5.154 +                        "MON PROF!"
   5.155 +                        0x58
   5.156 +                        "This world is"
   5.157 +                        0x4F
   5.158 +                        "inhabited by"
   5.159 +                        0x55
   5.160 +                        "creatures called"
   5.161 +                        0x55
   5.162 +                        0x54
   5.163 +                        "MON!"
   5.164 +                        0x50
   5.165 +                        0x50
   5.166 +                        0x51
   5.167 +                        "For some people, "
   5.168 +                        0x4F
   5.169 +                        0x54
   5.170 +                        "MON are"
   5.171 +                        0x55
   5.172 +                        "pets. Others use"
   5.173 +                        0x55
   5.174 +                        "them for fights."
   5.175 +                        0x51
   5.176 +                        "Myself..."
   5.177 +                        0x51
   5.178 +                        "I study "
   5.179 +                        0x54
   5.180 +                        "MON"
   5.181 +                        0x4F
   5.182 +                        "as a profession."
   5.183 +                        0x58
   5.184 +                        "First,  what is"
   5.185 +                        0x4F
   5.186 +                        "your name?"
   5.187 +                        0x58
   5.188 +                        "This is my grand-"
   5.189 +                        0x4F
   5.190 +                        "son. He's been"
   5.191 +                        0x55
   5.192 +                        "your rival since"
   5.193 +                        0x55
   5.194 +                        "you were a baby."
   5.195 +                        0x51
   5.196 +                        "...Erm,  what is"
   5.197 +                        0x4F
   5.198 +                        "his name again?"
   5.199 +                        0x58
   5.200 +                        0x52
   5.201 +                        "!"
   5.202 +                        0x51
   5.203 +                        "Your very own"
   5.204 +                        0x4F
   5.205 +                        0x54
   5.206 +                        "MON legend is"
   5.207 +                        0x55
   5.208 +                        "about to unfold!"
   5.209 +                        0x51
   5.210 +                        "A world of dreams"
   5.211 +                        0x4F
   5.212 +                        "and adventures"
   5.213 +                        0x55
   5.214 +                        "with "
   5.215 +                        0x54
   5.216 +                        "MON"
   5.217 +                        0x55
   5.218 +                        "awaits! Let's go!"
   5.219 +                        0x57)                 )
   5.220 +
   5.221 +(defn state-intro
   5.222 +  "Professor Oak speaks!"
   5.223 +  []
   5.224 +  (do
   5.225 +    (->
   5.226 +     (rewrite-rom 0xA07BB
   5.227 +                  (list 0x87 0xA4 0xAB 0xAB 0xAE 0x7F 0xB3 0xA7 0xA4 0xB1 0xA4 0xE7 0x4F 0x96 0xA4 0xAB 0xA2 0xAE 0xAC 0xA4 0x7F 0xB3 0xAE 0x7F 0xB3 0xA7 0xA4 0x55 0xB6 0xAE 0xB1 0xAB 0xA3 0x7F 0xAE 0xA5 0x7F 0x54 0x8C 0x8E 0x8D 0xE7 0x51 0x8C 0xB8 0x7F 0xAD 0xA0 0xAC 0xA4 0x7F 0xA8 0xB2 0x7F 0x8E 0x80 0x8A 0xE7 0x4F 0x8F 0xA4 0xAE 0xAF 0xAB 0xA4 0x7F 0xA2 0xA0 0xAB 0xAB 0x7F 0xAC 0xA4 0x55 0xB3 0xA7 0xA4 0x7F 0x8F 0x8C 0x8E 0x8D 0x7F 0x8F 0x91 0x8E 0x85 0xE7 0x58 0x93 0xA7 0xA8 0xB2 0x7F 0xB6 0xAE 0xB1 0xAB 0xA3 0x7F 0xA8 0xB2 0x4F 0xA8 0xAD 0xA7 0xA0 0xA1 0xA8 0xB3 0xA4 0xA3 0x7F 0xA1 0xB8 0x55 0xA2 0xB1 0xA4 0xA0 0xB3 0xB4 0xB1 0xA4 0xB2 0x7F 0xA2 0xA0 0xAB 0xAB 0xA4 0xA3 0x55 0x54 0x8C 0x8E 0x8D 0xE7 0x50 0x50 0x51 0x85 0xAE 0xB1 0x7F 0xB2 0xAE 0xAC 0xA4 0x7F 0xAF 0xA4 0xAE 0xAF 0xAB 0xA4 0xF3 0x7F 0x4F 0x54 0x8C 0x8E 0x8D 0x7F 0xA0 0xB1 0xA4 0x55 0xAF 0xA4 0xB3 0xB2 0xF1 0x7F 0x8E 0xB3 0xA7 0xA4 0xB1 0xB2 0x7F 0xB4 0xB2 0xA4 0x55 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4 0xA4 0xA3 0x7F 0x8B 0xF9 0xF6 0xE7 0x58 0x0 0x80 0xAB 0xAB 0x7F 0x54 0x8C 0x8E 0x8D 0x7F 0xAC 0xB4 0xB2 0xB3 0x4F 0xA1 0xA4 0x7F 0xA0 0xB3 0x7F 0xAB 0xA4 0xA0 0xB2 0xB3 0x7F 0x8B 0xF8 0xFB 0xE7 0x58 0x0 0x98 0xAE 0xB4 0xB1 0x7F 0xB3 0xAE 0xB3 0xA0 0xAB 0x7F 0xAB 0xA4 0xB5 0xA4 0xAB 0xB2 0x4F 0xA4 0xB7 0xA2 0xA4 0xA4 0xA3 0x7F 0xFE 0xF6 0xE7 0x58 0x0 0x8D 0xAE 0x7F 0x54 0x8C 0x8E 0x8D 0x7F 0xA2 0xA0 0xAD 0x4F 0xA4 0xB7 0xA2 0xA4 0xA4 0xA3 0x7F 0x8B 0xF8 0xF6 0xE7 0x58 0x0 0x80 0xAB 0xAB 0x7F 0x54 0x8C 0x8E 0x8D 0x7F 0xAC 0xB4 0xB2 0xB3 0x4F 0xA1 0xA4 0x7F 0xA0 0xB3 0x7F 0xAB 0xA4 0xA0 0xB2 0xB3 0x7F 0x8B 0xF7 0xFB 0xE7 0x58 0x0 0x98 0xAE 0xB4 0xB1 0x7F 0xB3 0xAE 0xB3 0xA0 0xAB 0x7F 0xAB 0xA4 0xB5 0xA4 0xAB 0xB2 0x4F 0xA4 0xB7 0xA2 0xA4 0xA4 0xA3 0x7F 0xFB 0xF6 0xE7 0x58 0x1 0x6D 0xCD 0x0 0x7F 0xA8 0xB2 0x7F 0xAE 0xB5 0xA4 0xB1 0x4F 0xFC 0x71 0xFE 0x73 0x7F 0xB3 0xA0 0xAB 0xAB 0xE7 0x58 0x1 0x6D 0xCD 0x0)
   5.228 +                 ;; (list
   5.229 +                 ;;  "Sleeping on the"
   5.230 +                 ;;  0x4F
   5.231 +                 ;;  "job again are we?"
   5.232 +                 ;;  0x51
   5.233 +                 ;;  0x00
   5.234 +                 ;;  "test"
   5.235 +                 ;;  0x59
   5.236 +                 ;;  "EOM")
   5.237 +
   5.238 + 
   5.239 +                  )
   5.240 +     (int-array)
   5.241 +     (write-rom!))
   5.242 +    (root)
   5.243 +     
   5.244 +    )
   5.245 +  
   5.246    )
   5.247  
   5.248 +(comment
   5.249 +"Hello there![0x4F]Welcome to the[0x55]world of [POKE]MON![0x51]My
   5.250 +name is OAK![0x4F]People call me[0x55]the [POKE]MON PROF![0x58]This
   5.251 +world is[0x4F]inhabited by[0x55]creatures
   5.252 +called[0x55][POKE]MON![0x50][0x50][0x51]For some people,
   5.253 +[0x4F][POKE]MON are[0x55]pets. Others use[0x55]them for
   5.254 +fights.[0x51]Myself...[0x51]I study [POKE]MON[0x4F]as a
   5.255 +profession.[0x58]First,  what is[0x4F]your name?[0x58]This is my
   5.256 +grand-[0x4F]son. He's been[0x55]your rival since[0x55]you were a
   5.257 +baby.[0x51]...Erm,  what is[0x4F]his name again?[0x58][RED]![0x51]Your
   5.258 +very own[0x4F][POKE]MON legend is[0x55]about to unfold![0x51]A world
   5.259 +of dreams[0x4F]and adventures[0x55]with [POKE]MON[0x55]awaits! Let's
   5.260 +go![0x57]")
   5.261 +
   5.262 +
   5.263 +
   5.264 +
   5.265 +
   5.266 +
   5.267 +
   5.268 +
   5.269 +
   5.270 +
   5.271 +
   5.272 +
   5.273 +
     6.1 Binary file save-states/inject-surprise.sav has changed
     7.1 Binary file save-states/new-game-menu.sav has changed