Skip to content

Commit 7ee99dd

Browse files
committed
Reduced the sizes of most displays
Most were reduced from 0.75 to 0.65. The Guard/Superguard Timings display was changed from 0.75 to 0.7, while the timers were changed from 0.8 to 0.7.
1 parent dc10ffa commit 7ee99dd

File tree

1 file changed

+28
-34
lines changed

1 file changed

+28
-34
lines changed

ttyd-tools/rel/source/draw.cpp

Lines changed: 28 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,6 @@ uint32_t getNextLineIndex(char *str)
221221

222222
void drawStringMultiline(float x, float y, const char *text, float scale)
223223
{
224-
// Get the line increment amount
225-
// Round the value down
226-
float increment = (scale * 25) + 5;
227-
int32_t tempIncrementValue = static_cast<int32_t>(increment);
228-
increment = static_cast<float>(tempIncrementValue);
229-
230224
// Copy the text to a temporary array, as it will be modified
231225
uint32_t textSize = strlen(text);
232226
char tempText[textSize + 1];
@@ -254,7 +248,7 @@ void drawStringMultiline(float x, float y, const char *text, float scale)
254248
index = getNextLineIndex(currentLine);
255249

256250
// Implement the new line space
257-
y -= increment;
251+
y -= 20.f;
258252
}
259253
while (index != 0);
260254
}
@@ -1633,7 +1627,7 @@ void drawMemoryChangeWatchPosition()
16331627
int32_t PosY = MemoryWatchPosition.PosY;
16341628
uint32_t TextColor = 0xFFFFFFFF;
16351629
uint8_t Alpha = 0xFF;
1636-
float Scale = 0.75;
1630+
float Scale = 0.65;
16371631

16381632
drawText(getValueString(tempMenuSelectedOption), PosX, PosY, Alpha, TextColor, Scale);
16391633

@@ -1648,7 +1642,7 @@ void drawMemoryChangeWatchPosition()
16481642
uint32_t WindowColor = 0x151515F6;
16491643
int32_t TextPosX = -135;
16501644
int32_t TextPosY = 140;
1651-
Scale = 0.6;
1645+
Scale = 0.6;
16521646

16531647
const char *HelpText = "Press/Hold the D-Pad directions\nto move the watch\n\nHold Y to hide this window\n\nPress A to confirm\n\nPress B to cancel";
16541648
int32_t Width = static_cast<int32_t>(getMessageWidth(HelpText, Scale));
@@ -3804,9 +3798,9 @@ void drawOnScreenTimer()
38043798
{
38053799
uint32_t TextColor = 0xFFFFFFFF;
38063800
uint8_t Alpha = 0xFF;
3807-
int32_t PosX = 105;
3801+
int32_t PosX = 115;
38083802
int32_t PosY = -160;
3809-
float Scale = 0.8;
3803+
float Scale = 0.7;
38103804

38113805
#ifdef TTYD_JP
38123806
PosX += 5;
@@ -3852,9 +3846,9 @@ void drawFrameCounter()
38523846

38533847
uint32_t TextColor = 0xFFFFFFFF;
38543848
uint8_t Alpha = 0xFF;
3855-
int32_t PosX = 105;
3849+
int32_t PosX = 115;
38563850
int32_t PosY = -160;
3857-
float Scale = 0.8;
3851+
float Scale = 0.7;
38583852

38593853
#ifdef TTYD_JP
38603854
PosX += 5;
@@ -3898,8 +3892,8 @@ void drawMarioCoordinates()
38983892
uint32_t TextColor = 0xFFFFFFFF;
38993893
uint8_t Alpha = 0xFF;
39003894
int32_t PosX = -232;
3901-
int32_t PosY = -162;
3902-
float Scale = 0.75;
3895+
int32_t PosY = -160;
3896+
float Scale = 0.65;
39033897

39043898
// Move the text up if the input display is active
39053899
if (Displays[BUTTON_INPUT_DISPLAY])
@@ -3922,8 +3916,8 @@ void drawMarioSpeedXZ()
39223916
uint32_t TextColor = 0xFFFFFFFF;
39233917
uint8_t Alpha = 0xFF;
39243918
int32_t PosX = -232;
3925-
int32_t PosY = -162;
3926-
float Scale = 0.75;
3919+
int32_t PosY = -160;
3920+
float Scale = 0.65;
39273921

39283922
// Move the text up if the input display is active
39293923
if (Displays[BUTTON_INPUT_DISPLAY])
@@ -3954,9 +3948,9 @@ void drawJumpStorageDetails()
39543948
{
39553949
uint32_t TextColor = 0xFFFFFFFF;
39563950
uint8_t Alpha = 0xFF;
3957-
int32_t PosX = 110;
3951+
int32_t PosX = 140;
39583952
int32_t PosY = 120;
3959-
float Scale = 0.75;
3953+
float Scale = 0.65;
39603954

39613955
ttyd::mario::Player *player = ttyd::mario::marioGetPtr();
39623956
char *tempDisplayBuffer = DisplayBuffer;
@@ -3973,7 +3967,7 @@ void drawJumpStorageDetails()
39733967
const char *TextToDraw;
39743968

39753969
getOnOffTextAndColor(JumpStorageFlag, &TextToDraw, &TextColor);
3976-
drawText(TextToDraw, PosX + 38, PosY, Alpha, TextColor, Scale);
3970+
drawText(TextToDraw, PosX + 33, PosY, Alpha, TextColor, Scale);
39773971
}
39783972

39793973
void drawButtonInputs()
@@ -3982,7 +3976,7 @@ void drawButtonInputs()
39823976
uint8_t Alpha = 0xFF;
39833977
int32_t PosX = -232;
39843978
int32_t PosY = -160;
3985-
float Scale = 0.75;
3979+
float Scale = 0.65;
39863980

39873981
uint32_t ButtonInput = ttyd::system::keyGetButton(0);
39883982
char *tempDisplayBuffer = DisplayBuffer;
@@ -4022,8 +4016,8 @@ void drawStickAngle()
40224016
uint32_t TextColor = 0xFFFFFFFF;
40234017
uint8_t Alpha = 0xFF;
40244018
int32_t PosX = -232;
4025-
int32_t PosY = -162;
4026-
float Scale = 0.75;
4019+
int32_t PosY = -160;
4020+
float Scale = 0.65;
40274021

40284022
// Move the text up if the input display is active
40294023
if (Displays[BUTTON_INPUT_DISPLAY])
@@ -4065,7 +4059,7 @@ void drawMemoryWatchesOnOverworld()
40654059

40664060
uint32_t Color = 0xFFFFFFFF;
40674061
uint8_t Alpha = 0xFF;
4068-
float Scale = 0.75;
4062+
float Scale = 0.65;
40694063

40704064
for (uint32_t i = 0; i < Size; i++)
40714065
{
@@ -4092,8 +4086,8 @@ void drawYoshiSkipDetails()
40924086
uint32_t TextColor = 0xFFFFFFFF;
40934087
uint8_t Alpha = 0xFF;
40944088
int32_t PosX = -232;
4095-
int32_t PosY = -117;
4096-
float Scale = 0.75;
4089+
int32_t PosY = -120;
4090+
float Scale = 0.65;
40974091

40984092
// Move the text up if the input display is active
40994093
if (Displays[BUTTON_INPUT_DISPLAY])
@@ -4227,8 +4221,8 @@ void drawPalaceSkipDetails()
42274221
uint32_t TextColor = 0xFFFFFFFF;
42284222
uint8_t Alpha = 0xFF;
42294223
int32_t PosX = -232;
4230-
int32_t PosY = -70;
4231-
float Scale = 0.75;
4224+
int32_t PosY = -80;
4225+
float Scale = 0.65;
42324226

42334227
// Move the text up if the input display is active
42344228
if (Displays[BUTTON_INPUT_DISPLAY])
@@ -4277,8 +4271,8 @@ void drawBridgeSkipDetails()
42774271
uint32_t TextColor = 0xFFFFFFFF;
42784272
uint8_t Alpha = 0xFF;
42794273
int32_t PosX = -232;
4280-
int32_t PosY = -117;
4281-
float Scale = 0.75;
4274+
int32_t PosY = -120;
4275+
float Scale = 0.65;
42824276

42834277
// Move the text up if the input display is active
42844278
if (Displays[BUTTON_INPUT_DISPLAY])
@@ -4355,8 +4349,8 @@ void drawBlimpTicketSkipDetails()
43554349
uint32_t TextColor = 0xFFFFFFFF;
43564350
uint8_t Alpha = 0xFF;
43574351
int32_t PosX = -232;
4358-
int32_t PosY = -95;
4359-
float Scale = 0.75;
4352+
int32_t PosY = -100;
4353+
float Scale = 0.65;
43604354

43614355
// Move the text up if the input display is active
43624356
if (Displays[BUTTON_INPUT_DISPLAY])
@@ -4541,7 +4535,7 @@ void drawActionCommandsTiming()
45414535
int32_t TextPosY = -105;
45424536
// int32_t WindowWidth = 320;
45434537
int32_t WindowCurve = 10;
4544-
float Scale = 0.75;
4538+
float Scale = 0.7;
45454539

45464540
int32_t WindowWidth = static_cast<int32_t>(getMessageWidth(TextToDraw, Scale));
45474541

@@ -4557,7 +4551,7 @@ void drawEffsActive()
45574551
uint8_t Alpha = 0xFF;
45584552
int32_t PosX = -232;
45594553
int32_t PosY = 60;
4560-
float Scale = 0.75;
4554+
float Scale = 0.65;
45614555

45624556
// Get the total amount of effs active
45634557
ttyd::effdrv::EffWork *EffWrk = ttyd::effdrv::effWorkPointer;

0 commit comments

Comments
 (0)