Skip to content

Commit d7059e3

Browse files
committed
Adjusted the symbols used for displaying the D-Pad directions for JP
1 parent a71c8a6 commit d7059e3

File tree

3 files changed

+51
-10
lines changed

3 files changed

+51
-10
lines changed

ttyd-tools/rel/include/global.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,12 @@ extern uint8_t OnScreenTimerOptionsSize;
486486
extern const char *WarpDestinations[];
487487
extern uint8_t WarpDestinationsSize;
488488
extern const char *WarpDescriptions[];
489-
extern char ButtonInputDisplay[];
489+
490+
#ifndef TTYD_JP
491+
extern const char ButtonInputDisplay[];
492+
#else
493+
extern const char *ButtonInputDisplay[];
494+
#endif
490495

491496
extern bool MenuIsDisplayed;
492497
extern bool PreventClosingMenu;

ttyd-tools/rel/source/draw.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2352,9 +2352,15 @@ void drawButtonInputs()
23522352

23532353
if (ButtonInput & (1 << i))
23542354
{
2355+
#ifndef TTYD_JP
23552356
sprintf(tempDisplayBuffer,
23562357
"%c",
23572358
ButtonInputDisplay[Counter]);
2359+
#else
2360+
sprintf(tempDisplayBuffer,
2361+
"%s",
2362+
ButtonInputDisplay[Counter]);
2363+
#endif
23582364

23592365
ttyd::fontmgr::FontDrawString(PosX, PosY, tempDisplayBuffer);
23602366
}
@@ -2731,7 +2737,7 @@ void drawTitleScreenInfo()
27312737
PosX += 113;
27322738
PosY -= 14;
27332739

2734-
const char *String = "Practice Codes v3.0.4\nCreated by Zephiles";
2740+
const char *String = "Practice Codes v3.0.5\nCreated by Zephiles";
27352741
drawText(String, PosX, PosY, Alpha, TextColor, Scale);
27362742
}
27372743

ttyd-tools/rel/source/global.cpp

Lines changed: 38 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,44 @@ const char *ReturnPlaceholder[] =
728728
"Return",
729729
};
730730

731-
char ButtonInputDisplay[] = {'(', ')', 'v', '^', 'Z', 'R', 'L', 'A', 'B', 'X', 'Y', 'S'};
731+
#ifndef TTYD_JP
732+
const char ButtonInputDisplay[] =
733+
{
734+
static_cast<char>(171), // Left
735+
static_cast<char>(187), // Right
736+
static_cast<char>(179), // Down
737+
static_cast<char>(178), // Up
738+
'Z',
739+
'R',
740+
'L',
741+
'A',
742+
'B',
743+
'X',
744+
'Y',
745+
'S',
746+
};
747+
#else
748+
uint8_t ButtonLeft[] = {0x81, 0xA9, 0};
749+
uint8_t ButtonRight[] = {0x81, 0xA8, 0};
750+
uint8_t ButtonDown[] = {0x81, 0xAB, 0};
751+
uint8_t ButtonUp[] = {0x81, 0xAA, 0};
752+
753+
const char *ButtonInputDisplay[] =
754+
{
755+
reinterpret_cast<const char *>(&ButtonLeft),
756+
reinterpret_cast<const char *>(&ButtonRight),
757+
reinterpret_cast<const char *>(&ButtonDown),
758+
reinterpret_cast<const char *>(&ButtonUp),
759+
"Z",
760+
"R",
761+
"L",
762+
"A",
763+
"B",
764+
"X",
765+
"Y",
766+
"S",
767+
};
768+
#endif
732769

733770
struct Menus Menu[20];
734771
struct Cheats Cheat[18];
@@ -948,13 +985,6 @@ void initMenuVars()
948985

949986
OnScreenTimer.ButtonCombo[START_PAUSE_RESUME] = PAD_L | PAD_Z;
950987
OnScreenTimer.ButtonCombo[RESET] = PAD_L | PAD_DPAD_RIGHT;
951-
952-
#ifndef TTYD_JP
953-
*reinterpret_cast<uint8_t *>(&ButtonInputDisplay[0]) = 171; // Left
954-
*reinterpret_cast<uint8_t *>(&ButtonInputDisplay[1]) = 187; // Right
955-
*reinterpret_cast<uint8_t *>(&ButtonInputDisplay[2]) = 179; // Down
956-
*reinterpret_cast<uint8_t *>(&ButtonInputDisplay[3]) = 178; // Up
957-
#endif
958988
}
959989

960990
}

0 commit comments

Comments
 (0)