Mercurial > vba-clojure
view clojure/com/aurellem/gb/characters.clj @ 147:279e9ee6fccb
can now determine the number of pokemon in the party.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Mon, 19 Mar 2012 22:42:36 -0500 |
parents | 412ca096a9ba |
children | 06426d25c65b |
line wrap: on
line source
1 (ns com.aurellem.gb.characters2 (:use (com.aurellem.gb gb-driver))3 (:import [com.aurellem.gb.gb_driver SaveState]))5 (def character-code->character6 {7 0x00 "end-of-name-sentinel"8 0x50 "end-of-pokemon-name-sentinel"9 0x60 "A-bold"10 0x61 "B-bold"11 0x62 "C-bold"12 0x63 "D-bold"13 0x64 "E-bold"14 0x65 "F-bold"15 0x66 "G-bold"16 0x67 "H-bold"17 0x68 "I-bold"18 0x69 "V-bold"19 0x6A "S-bold"20 0x6B "L-bold"21 0x6C "M-bold"22 0x80 "A"23 0x81 "B"24 0x82 "C"25 0x83 "D"26 0x84 "E"27 0x85 "F"28 0x86 "G"29 0x87 "H"30 0x88 "I"31 0x89 "J"32 0x8A "K"33 0x8B "L"34 0x8C "M"35 0x8D "N"36 0x8E "O"37 0x8F "P"38 0x90 "Q"39 0x91 "R"40 0x92 "S"41 0x93 "T"42 0x94 "U"43 0x95 "V"44 0x96 "W"45 0x97 "X"46 0x98 "Y"47 0x99 "Z"48 0x9A "("49 0x9B ")"50 0x9C ":"51 0x9D ";"52 0xA0 "a"53 0xA1 "b"54 0xA2 "c"55 0xA3 "d"56 0xA4 "e"57 0xA5 "f"58 0xA6 "g"59 0xA7 "h"60 0xA8 "i"61 0xA9 "j"62 0xAA "k"63 0xAB "l"64 0xAC "m"65 0xAD "n"66 0xAE "o"67 0xAF "p"68 0xB0 "q"69 0xB1 "r"70 0xB2 "s"71 0xB3 "t"72 0xB4 "u"73 0xB5 "v"74 0xB6 "w"75 0xB7 "x"76 0xB8 "y"77 0xB9 "z"78 0xBA "e-with-grave"79 0xE0 "'"80 0xE1 "PK"81 0xE2 "MN"82 0xE6 "?"83 0xE7 "!"84 0xE8 "."85 0xEF "male-symbol"86 0xF0 "pokemon-money-symbol"87 0xF1 "."88 0xF2 "/"89 0xF3 ","90 0xF4 "female-symbol"91 0xF6 "0 "92 0xF7 "1"93 0xF8 "2"94 0xF9 "3"95 0xFA "4"96 0xFB "5"97 0xFC "6"98 0xFD "7"99 0xFE "8"100 0xFF "9"101 })103 (def character->character-code104 (zipmap (vals character-code->character)105 (keys character-code->character)))107 (defn str->character-codes [s]108 (map character->character-code (map str s)))110 (defn character-codes->str [codes]111 (apply str112 (map #(character-code->character113 %114 (format "[0x%02X]" %))115 codes)))