diff options
Diffstat (limited to 'source/encoding.c')
-rw-r--r-- | source/encoding.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/encoding.c b/source/encoding.c new file mode 100644 index 0000000..7b70df2 --- /dev/null +++ b/source/encoding.c | |||
@@ -0,0 +1,23 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2017 hatkirby | ||
3 | * | ||
4 | * This software may be modified and distributed under the terms | ||
5 | * of the MIT license. See the LICENSE file for details. | ||
6 | * | ||
7 | * Gen 3 proprietary encoding information from Bulbapedia: | ||
8 | * https://bulbapedia.bulbagarden.net/wiki/Character_encoding_in_Generation_III | ||
9 | */ | ||
10 | #include "encoding.h" | ||
11 | |||
12 | const char charmap[] = { | ||
13 | ' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '!', '?', '.', '-', ' ', | ||
14 | ' ', '\"', '\"', '\'', '\'', '*', '*', ' ', ',', ' ', '/', 'A', 'B', 'C', 'D', 'E', | ||
15 | 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', | ||
16 | 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', | ||
17 | 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', ' ' | ||
18 | }; | ||
19 | |||
20 | char debugGen3Decode(u8 val) | ||
21 | { | ||
22 | return charmap[val - 0xA0]; | ||
23 | } | ||