mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +00:00
Create FILENAME_ macros for NTSC filename encoding (#1986)
* Create FILENAME_ macros for NTSC filename encoding * Add defines/comments for all filename characters * FILENAME_EXCLAMATION_POINT -> FILENAME_EXCLAMATION_MARK to match kanji file * hirigana -> hiragana
This commit is contained in:
parent
f0796afb86
commit
4fbb48177f
6 changed files with 113 additions and 56 deletions
|
@ -23,6 +23,37 @@ typedef enum {
|
|||
// TODO get these properties from the textures themselves
|
||||
#define MESSAGE_TEXTURE_STATIC_TEX_SIZE 0x900
|
||||
|
||||
// Macros for generating characters in the filename encoding (specified by message 0xFFFC
|
||||
// and loaded by Font_LoadOrderedFont). For example, FILENAME_UPPERCASE('A') will encode
|
||||
// the character 'A'.
|
||||
#if OOT_NTSC
|
||||
#define FILENAME_DIGIT(c) ((c) - '0')
|
||||
// 0x0A - 0x59: hiragana
|
||||
// 0x5A - 0xAA: katakana
|
||||
#define FILENAME_UPPERCASE(c) ((c) - 'A' + 0xAB)
|
||||
#define FILENAME_LOWERCASE(c) ((c) - 'a' + 0xC5)
|
||||
#define FILENAME_SPACE 0xDF
|
||||
// 0xE0: unknown
|
||||
#define FILENAME_QUESTION_MARK 0xE1
|
||||
#define FILENAME_EXCLAMATION_MARK 0xE2
|
||||
#define FILENAME_COLON 0xE3
|
||||
#define FILENAME_DASH 0xE4
|
||||
#define FILENAME_LEFT_PARENTHESES 0xE5
|
||||
#define FILENAME_RIGHT_PARENTHESES 0xE6
|
||||
#define FILENAME_DAKUTEN 0xE7
|
||||
#define FILENAME_HANDAKUTEN 0xE8
|
||||
#define FILENAME_COMMA 0xE9
|
||||
#define FILENAME_PERIOD 0xEA
|
||||
#define FILENAME_SLASH 0xEB
|
||||
#else
|
||||
#define FILENAME_DIGIT(c) ((c) - '0')
|
||||
#define FILENAME_UPPERCASE(c) ((c) - 'A' + 0x0A)
|
||||
#define FILENAME_LOWERCASE(c) ((c) - 'a' + 0x24)
|
||||
#define FILENAME_SPACE 0x3E
|
||||
#define FILENAME_DASH 0x3F
|
||||
#define FILENAME_PERIOD 0x40
|
||||
#endif
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ MSGMODE_NONE,
|
||||
/* 0x01 */ MSGMODE_TEXT_START,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue