comparison clojure/com/aurellem/gb/characters.clj @ 194:67c42608ef9d

Further explorations in memory.
author Dylan Holmes <ocsenave@gmail.com>
date Fri, 23 Mar 2012 00:24:54 -0500
parents 95b2758dd517
children a67f1df5d096
comparison
equal deleted inserted replaced
193:da1a5ed61a8d 194:67c42608ef9d
2 (:use (com.aurellem.gb gb-driver constants)) 2 (:use (com.aurellem.gb gb-driver constants))
3 (:import [com.aurellem.gb.gb_driver SaveState])) 3 (:import [com.aurellem.gb.gb_driver SaveState]))
4 4
5 (def character-code->character 5 (def character-code->character
6 { 6 {
7 0x00 "end-of-name-sentinel" 7 0x00 "<";;"end-of-name-sentinel" ;; begin messsage
8 0x50 "end-of-pokemon-name-sentinel" 8 0x4F "\n" ; newline
9 0x50 "#";;"end-of-pokemon-name-sentinel"
10 0x51 "\n\n" ;; ocsenave: clear screen
11 0x54 "[POKE]"
12 0x55 "_" ;; ocsenave: breaking space?
13 0x57 ">" ;; ocsenave: end message
9 0x60 "A-bold" 14 0x60 "A-bold"
10 0x61 "B-bold" 15 0x61 "B-bold"
11 0x62 "C-bold" 16 0x62 "C-bold"
12 0x63 "D-bold" 17 0x63 "D-bold"
13 0x64 "E-bold" 18 0x64 "E-bold"
17 0x68 "I-bold" 22 0x68 "I-bold"
18 0x69 "V-bold" 23 0x69 "V-bold"
19 0x6A "S-bold" 24 0x6A "S-bold"
20 0x6B "L-bold" 25 0x6B "L-bold"
21 0x6C "M-bold" 26 0x6C "M-bold"
27 0x7F " " ;space
22 0x80 "A" 28 0x80 "A"
23 0x81 "B" 29 0x81 "B"
24 0x82 "C" 30 0x82 "C"
25 0x83 "D" 31 0x83 "D"
26 0x84 "E" 32 0x84 "E"
73 0xB5 "v" 79 0xB5 "v"
74 0xB6 "w" 80 0xB6 "w"
75 0xB7 "x" 81 0xB7 "x"
76 0xB8 "y" 82 0xB8 "y"
77 0xB9 "z" 83 0xB9 "z"
78 0xBA "e-with-grave" 84 0xBA "[e]" ;é
85 0xBB "'d" ;ocsenave
86 0xBC "'l" ;ocsenave
87 0xBD "'s" ;ocsenave
88 0xBE "'t" ;ocsenave
89 0xBF "'v" ; ocsenave
90
79 0xE0 "'" 91 0xE0 "'"
80 0xE1 "PK" 92 0xE1 "PK"
81 0xE2 "MN" 93 0xE2 "MN"
82 0xE3 "-" 94 0xE3 "-"
95 0xE4 "'r" ;ocsenave
96 0xE5 "'m" ;ocsenave
83 0xE6 "?" 97 0xE6 "?"
84 0xE7 "!" 98 0xE7 "!"
85 0xE8 "." 99 0xE8 "."
86 0xEF "male-symbol" 100 0xEF "male-symbol"
87 0xF0 "pokemon-money-symbol" 101 0xF0 "$" ;;"pokemon-money-symbol"
88 0xF1 "." 102 0xF1 "."
89 0xF2 "/" 103 0xF2 "/"
90 0xF3 "," 104 0xF3 ","
91 0xF4 "female-symbol" 105 0xF4 ", "
106 0xF5 "female-symbol" ;; ocsenave
92 0xF6 "0 " 107 0xF6 "0 "
93 0xF7 "1" 108 0xF7 "1"
94 0xF8 "2" 109 0xF8 "2"
95 0xF9 "3" 110 0xF9 "3"
96 0xFA "4" 111 0xFA "4"
113 (map #(character-code->character 128 (map #(character-code->character
114 % 129 %
115 (format "[0x%02X]" %)) 130 (format "[0x%02X]" %))
116 codes))) 131 codes)))
117 132
133
134
118 (defn print-text 135 (defn print-text
119 ([^SaveState state begin end] 136 ([^SaveState state begin end]
120 (dorun 137 (dorun
121 (map (fn [character-code line] 138 (map (fn [character-code line]
122 (println 139 (println