changeset 173:8665160f0f3d

saved corrupted save.
author Robert McIntyre <rlm@mit.edu>
date Wed, 21 Mar 2012 03:31:12 -0500
parents 63ec3db6f6d1
children 5ce074824fac
files clojure/com/aurellem/exp/item_bridge.clj clojure/com/aurellem/gb/items.clj save-states/corrupt-mid-game.sav
diffstat 3 files changed, 12 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
     1.1 --- a/clojure/com/aurellem/exp/item_bridge.clj	Wed Mar 21 03:24:18 2012 -0500
     1.2 +++ b/clojure/com/aurellem/exp/item_bridge.clj	Wed Mar 21 03:31:12 2012 -0500
     1.3 @@ -114,7 +114,9 @@
     1.4     state
     1.5     (corrupt-moves)))
     1.6    ([] (corrupt @current-state)))
     1.7 -  
     1.8 +
     1.9 +(defn mid-game-corrupt []
    1.10 +  (read-state "corrupt-mid-game"))
    1.11     
    1.12  
    1.13               
     2.1 --- a/clojure/com/aurellem/gb/items.clj	Wed Mar 21 03:24:18 2012 -0500
     2.2 +++ b/clojure/com/aurellem/gb/items.clj	Wed Mar 21 03:31:12 2012 -0500
     2.3 @@ -8,12 +8,14 @@
     2.4  
     2.5  (def item-list-start 0xD31C)
     2.6  
     2.7 -(defn item-list [^SaveState state]
     2.8 -  (subvec
     2.9 -   (vec (memory state))
    2.10 -   item-list-start
    2.11 -   (+ item-list-start 150)))
    2.12 -
    2.13 +(defn item-list
    2.14 +  ([^SaveState state]
    2.15 +     (subvec
    2.16 +      (vec (memory state))
    2.17 +      item-list-start
    2.18 +      (+ item-list-start 255)))
    2.19 +  ([] (item-list @current-state)))
    2.20 +  
    2.21  (def item-code->item-name
    2.22    (hash-map
    2.23     0x01 :master-ball       
    2.24 @@ -78,7 +80,7 @@
    2.25     0x3E :lemonade
    2.26     0x3F :s.s.ticket
    2.27     0x40 :gold-teeth
    2.28 -   0x41 :x-attach
    2.29 +   0x41 :x-attack
    2.30     0x42 :x-defend
    2.31     0x43 :x-speed
    2.32     0x44 :x-special
     3.1 Binary file save-states/corrupt-mid-game.sav has changed