Merge branch 'master' into master

This commit is contained in:
Sergei Baigerov 2024-05-08 21:19:31 +08:00 • committed by GitHub
commit 8d6254b352
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,7 @@ int main(void)
// Set bilinear scale filter for better font scaling
SetTextureFilter(font.texture, TEXTURE_FILTER_BILINEAR);
SetTextLineSpacing(54); // Set line spacing for multiline text (when line breaks are included '\n')
SetTextLineSpacing(20); // Set line spacing for multiline text (when line breaks are included '\n')
// Free codepoints, atlas has already been generated
free(codepointsNoDups);
@ -60,7 +60,6 @@ int main(void)
bool showFontAtlas = false;
int codepointSize = 0;
int codepoint = 0;
char *ptr = text;
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
@ -77,13 +76,13 @@ int main(void)
if (IsKeyPressed(KEY_RIGHT))
{
// Get next codepoint in string and move pointer
codepoint = GetCodepointNext(ptr, &codepointSize);
GetCodepointNext(ptr, &codepointSize);
ptr += codepointSize;
}
else if (IsKeyPressed(KEY_LEFT))
{
// Get previous codepoint in string and move pointer
codepoint = GetCodepointPrevious(ptr, &codepointSize);
GetCodepointPrevious(ptr, &codepointSize);
ptr -= codepointSize;
}
//----------------------------------------------------------------------------------