mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 06:24:30 +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
|
@ -409,10 +409,14 @@ void EnMag_DrawInner(Actor* thisx, PlayState* play, Gfx** gfxP) {
|
|||
static s16 textFadeDirection = 0;
|
||||
static s16 textFadeTimer = 0;
|
||||
static u8 noControllerFontIndices[] = {
|
||||
0x17, 0x18, 0x0C, 0x18, 0x17, 0x1D, 0x1B, 0x18, 0x15, 0x15, 0x0E, 0x1B,
|
||||
FILENAME_UPPERCASE('N'), FILENAME_UPPERCASE('O'), FILENAME_UPPERCASE('C'), FILENAME_UPPERCASE('O'),
|
||||
FILENAME_UPPERCASE('N'), FILENAME_UPPERCASE('T'), FILENAME_UPPERCASE('R'), FILENAME_UPPERCASE('O'),
|
||||
FILENAME_UPPERCASE('L'), FILENAME_UPPERCASE('L'), FILENAME_UPPERCASE('E'), FILENAME_UPPERCASE('R'),
|
||||
};
|
||||
static u8 pressStartFontIndices[] = {
|
||||
0x19, 0x1B, 0x0E, 0x1C, 0x1C, 0x1C, 0x1D, 0x0A, 0x1B, 0x1D,
|
||||
FILENAME_UPPERCASE('P'), FILENAME_UPPERCASE('R'), FILENAME_UPPERCASE('E'), FILENAME_UPPERCASE('S'),
|
||||
FILENAME_UPPERCASE('S'), FILENAME_UPPERCASE('S'), FILENAME_UPPERCASE('T'), FILENAME_UPPERCASE('A'),
|
||||
FILENAME_UPPERCASE('R'), FILENAME_UPPERCASE('T'),
|
||||
};
|
||||
static void* effectMaskTextures[] = {
|
||||
gTitleEffectMask00Tex, gTitleEffectMask01Tex, gTitleEffectMask02Tex,
|
||||
|
|
|
@ -169,7 +169,10 @@ void FileSelect_FinishFadeIn(GameState* thisx) {
|
|||
* Update function for `CM_MAIN_MENU`
|
||||
*/
|
||||
void FileSelect_UpdateMainMenu(GameState* thisx) {
|
||||
static u8 emptyName[] = { 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E, 0x3E };
|
||||
static u8 emptyName[] = {
|
||||
FILENAME_SPACE, FILENAME_SPACE, FILENAME_SPACE, FILENAME_SPACE,
|
||||
FILENAME_SPACE, FILENAME_SPACE, FILENAME_SPACE, FILENAME_SPACE,
|
||||
};
|
||||
FileSelectState* this = (FileSelectState*)thisx;
|
||||
SramContext* sramCtx = &this->sramCtx;
|
||||
Input* input = &this->state.input[0];
|
||||
|
|
|
@ -373,12 +373,12 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
|
|||
this->kbdY = 5;
|
||||
this->kbdX = 4;
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_B)) {
|
||||
if ((this->newFileNameCharCount == 7) && (this->fileNames[this->buttonIndex][7] != 0x3E)) {
|
||||
if ((this->newFileNameCharCount == 7) && (this->fileNames[this->buttonIndex][7] != FILENAME_SPACE)) {
|
||||
for (i = this->newFileNameCharCount; i < 7; i++) {
|
||||
this->fileNames[this->buttonIndex][i] = this->fileNames[this->buttonIndex][i + 1];
|
||||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
} else {
|
||||
|
@ -392,7 +392,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
|
|||
this->fileNames[this->buttonIndex][i] = this->fileNames[this->buttonIndex][i + 1];
|
||||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
|
||||
}
|
||||
|
@ -419,12 +419,13 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
|
|||
}
|
||||
} else if (CHECK_BTN_ALL(input->press.button, BTN_A) && (this->charPage != this->kbdButton)) {
|
||||
if (this->kbdButton == FS_KBD_BTN_BACKSPACE) {
|
||||
if ((this->newFileNameCharCount == 7) && (this->fileNames[this->buttonIndex][7] != 0x3E)) {
|
||||
if ((this->newFileNameCharCount == 7) &&
|
||||
(this->fileNames[this->buttonIndex][7] != FILENAME_SPACE)) {
|
||||
for (i = this->newFileNameCharCount; i < 7; i++) {
|
||||
this->fileNames[this->buttonIndex][i] = this->fileNames[this->buttonIndex][i + 1];
|
||||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
@ -439,7 +440,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
|
|||
this->fileNames[this->buttonIndex][i] = this->fileNames[this->buttonIndex][i + 1];
|
||||
}
|
||||
|
||||
this->fileNames[this->buttonIndex][i] = 0x3E;
|
||||
this->fileNames[this->buttonIndex][i] = FILENAME_SPACE;
|
||||
Audio_PlaySfxGeneral(NA_SE_SY_FSEL_DECIDE_S, &gSfxDefaultPos, 4,
|
||||
&gSfxDefaultFreqAndVolScale, &gSfxDefaultFreqAndVolScale,
|
||||
&gSfxDefaultReverb);
|
||||
|
@ -448,7 +449,7 @@ void FileSelect_DrawNameEntry(GameState* thisx) {
|
|||
validName = false;
|
||||
|
||||
for (i = 0; i < 8; i++) {
|
||||
if (this->fileNames[this->buttonIndex][i] != 0x3E) {
|
||||
if (this->fileNames[this->buttonIndex][i] != FILENAME_SPACE) {
|
||||
validName = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue