annotate clojure/com/aurellem/run/save_corruption.clj @ 317:3c5bf2221ea0

remove crufty functions.
author Robert McIntyre <rlm@mit.edu>
date Mon, 02 Apr 2012 21:25:24 -0500
parents 8e63b0bb8ea3
children 9a4d3f801c89
rev   line source
rlm@170 1 (ns com.aurellem.run.save-corruption
rlm@170 2 (:use (com.aurellem.gb gb-driver vbm))
rlm@170 3 (:use (com.aurellem.run title)))
rlm@90 4
rlm@250 5 (defn-memo start-walking
rlm@250 6 ([script]
rlm@250 7 (->> script
rlm@250 8 (advance [:b] [:b :r])))
rlm@250 9 ([] (start-walking (finish-title))))
rlm@313 10
rlm@250 11 (defn-memo walk-to-stairs
rlm@250 12 ([] (walk-to-stairs (start-walking)))
rlm@250 13 ([script]
rlm@250 14 (->> script
rlm@255 15 (move [:u])
rlm@255 16 (move [:u])
rlm@255 17 (move [:u])
rlm@255 18 (move [:u])
rlm@255 19 (move [:u])
rlm@255 20 (move [:r])
rlm@255 21 (move [:r])
rlm@255 22 (move [:r]))))
rlm@91 23
rlm@250 24 (defn-memo walk-to-door
rlm@250 25 ([] (walk-to-door (walk-to-stairs)))
rlm@250 26 ([script]
rlm@250 27 (->> script
rlm@255 28 (move [:d])
rlm@255 29 (move [:d])
rlm@255 30 (move [:d])
rlm@255 31 (move [:d])
rlm@255 32 (move [:d])
rlm@255 33 (move [:d])
rlm@255 34 (move [:l])
rlm@255 35 (move [:l])
rlm@255 36 (move [:l])
rlm@255 37 (move [:l]))))
rlm@91 38
rlm@250 39 (defn-memo activate-menu
rlm@250 40 ([] (activate-menu (walk-to-door)))
rlm@250 41 ([script]
rlm@250 42 (->> script
rlm@250 43 (advance [:b] [:a :b :start]))))
rlm@90 44
rlm@250 45 (defn-memo save-game
rlm@250 46 ([] (save-game (activate-menu)))
rlm@250 47 ([script]
rlm@250 48 (->> script
rlm@250 49 (advance [] [:d])
rlm@250 50 (play-moves [[] [] [] [:d] [] [] [] [:d] [] [] [:a]])
rlm@250 51 scroll-text)))
rlm@90 52
rlm@250 53 (defn-memo corrupt-save
rlm@250 54 ([] (corrupt-save (save-game)))
rlm@250 55 ([script]
rlm@250 56 (->>
rlm@250 57 script
rlm@250 58 (play-moves
rlm@250 59 ;; this section is copied from speedrun-2942 and corrupts
rlm@250 60 ;; the save so that the end-of-list marker for the pokemon
rlm@250 61 ;; roster is destroyed, but the save is still playable.
rlm@250 62 [[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 63 [] [] [] [] [] [] [] [] [] [] [] [:select] [:restart]]))))
rlm@90 64
rlm@250 65 (defn-memo start-game
rlm@250 66 ([] (start-game (corrupt-save)))
rlm@250 67 ([script]
rlm@250 68 (->> script
rlm@250 69 (title)
rlm@250 70 (advance [] [:start])
rlm@250 71 (advance [] [:a])
rlm@250 72 (advance [:a] [:a :start]))))
rlm@90 73
rlm@250 74 (defn-memo destroy-item-end-of-list-marker
rlm@250 75 ([] (destroy-item-end-of-list-marker (start-game)))
rlm@250 76 ([script]
rlm@250 77 (->>
rlm@250 78 script
rlm@250 79 (play-moves
rlm@250 80 [[:start] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 81 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@250 82 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 83 [] [] [:d] [] [] [] [:a] [] [] [:d] [] [] [:a] [] []
rlm@250 84 [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] []
rlm@250 85 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
rlm@250 86 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
rlm@250 87 [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@250 88 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 89 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
rlm@250 90 [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] []
rlm@250 91 [] [] [] [] [] [] [] [] [:u] [] [] [] [] [:u] [] []
rlm@250 92 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 93 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 94 [] [] [] [] [] [] [] [] [] [] [] []]))))
rlm@91 95
rlm@91 96 (defn warp-to-elite-four
rlm@250 97 "This is copied from speedrun-2942 to ensure that
rlm@250 98 everything is good up to this point."
rlm@91 99 []
rlm@91 100 (->> (corrupt-save)
rlm@91 101 (play-moves
rlm@250 102 [ [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 103 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 104 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 105 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 106 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 107 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 108 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 109 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 110 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 111 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 112 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 113 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 114 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 115 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 116 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 117 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 118 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 119 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 120 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] []
rlm@250 121 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 122 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 123 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 124 [] [] [] [] [] [] [] [] [:start] [] [] [] [] [] []
rlm@250 125 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 126 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 127 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 128 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 129 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 130 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 131 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 132 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 133 [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 134 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 135 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 136 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 137 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 138 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 139 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 140 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 141 [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 142 [:start] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 143 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 144 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 145 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 146 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 147 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 148 [:start] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 149 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@250 150 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 151 [] [] [:d] [] [] [] [:a] [] [] [:d] [] [] [:a] [] []
rlm@250 152 [] [] [] [] [] [] [] [] [] [] [] [:d] [] [] [] []
rlm@250 153 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
rlm@250 154 [:d] [] [] [] [] [:d] [] [] [] [] [:d] [] [] [] []
rlm@250 155 [:d] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@250 156 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 157 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
rlm@250 158 [] [] [] [:a] [] [] [:d] [] [] [:a] [] [] [] [] []
rlm@250 159 [] [] [] [] [] [] [] [] [:u] [] [] [] [] [:u] [] []
rlm@250 160 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 161 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 162 [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] [] [] []
rlm@250 163 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 164 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 165 [] [] [] [] [:d] [] [] [:a] [] [] [] [] [] [] [] []
rlm@250 166 [] [] [] [] [] [] [] [:d] [] [] [] [:d] [] [] []
rlm@250 167 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
rlm@250 168 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@250 169 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
rlm@250 170 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] []
rlm@250 171 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
rlm@250 172 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@250 173 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
rlm@250 174 [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] []
rlm@250 175 [:d] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d]
rlm@250 176 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@250 177 [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] [] [] []
rlm@250 178 [] [] [] [] [] [] [] [] [] [:b] [] [] [] [] [] [] []
rlm@250 179 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:select]
rlm@250 180 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 181 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b]
rlm@250 182 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 183 [] [] [] [] [:d] [] [] [] [] [] [] [] [] [:b] [] []
rlm@250 184 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 185 [] [] [:select] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 186 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 187 [] [] [] [] [] [:b] [] [] [] [] [] [] [] [] [] [] []
rlm@250 188 [] [] [] [] [:d] [] [] [] [] [] [] [] [] [] [] []
rlm@250 189 [:b] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 190 [:d] [] [] [] [] [:b] [] [] [] [] [] [] [] [] [] []
rlm@250 191 [] [] [] [] [] [] [:select] [] [] [] [] [] [] [] []
rlm@250 192 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b]
rlm@250 193 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:d]
rlm@250 194 [] [] [] [] [] [] [] [:d] [] [] [] [] [] [] [] [:d]
rlm@250 195 [] [] [] [] [] [] [:d] [] [] [] [] [] [] [:d] [] []
rlm@250 196 [] [] [] [] [] [] [] [] [] [:select] [] [] [] [] []
rlm@250 197 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 198 [] [] [] [] [] [] [] [] [] [] [:a] [] [] [:d] [] []
rlm@250 199 [:a] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@250 200 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@250 201 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@250 202 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@250 203 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@250 204 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@250 205 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@250 206 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@250 207 [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] []
rlm@250 208 [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u] [] [:u]
rlm@250 209 [] [:u] [] [:u] [:a] [] [] [] [] [] [:a] [] [] []
rlm@250 210 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 211 [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 212 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:b] [] []
rlm@250 213 [] [] [] [] [] [] [:b] [:d] [:d] [:d] [:d] [:d] [:d]
rlm@250 214 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
rlm@250 215 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
rlm@250 216 [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d] [:d]
rlm@250 217 [:d] [:d] [:d] [:d] [] [] [] [] [] [] [] [] [] [] []
rlm@250 218 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 219 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 220 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 221 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 222 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 223 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 224 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 225 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 226 [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] []
rlm@250 227 [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 228 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] []
rlm@250 229 [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] []
rlm@250 230 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 231 [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 232 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 233 [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 234 [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] [] [] []
rlm@250 235 [] [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] []
rlm@250 236 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [:a]
rlm@250 237 [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] []
rlm@250 238 [] [] [] [] [] [] [] [] [] [] [] [] [:a] [] [] [] []
rlm@250 239 [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 240 [] [] [] [] [] [:a] [] [] [] [] [] [] [] [] [] [] []
rlm@250 241 [] [:a] [] [] [] [] [] [] [] [] [] [] [] [] [] []
rlm@250 242 [:b]])))