|
@ -60,7 +60,6 @@ int main(void) |
|
|
bool showFontAtlas = false; |
|
|
bool showFontAtlas = false; |
|
|
|
|
|
|
|
|
int codepointSize = 0; |
|
|
int codepointSize = 0; |
|
|
int codepoint = 0; |
|
|
|
|
|
char *ptr = text; |
|
|
char *ptr = text; |
|
|
|
|
|
|
|
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second |
|
|
SetTargetFPS(60); // Set our game to run at 60 frames-per-second |
|
@ -77,13 +76,13 @@ int main(void) |
|
|
if (IsKeyPressed(KEY_RIGHT)) |
|
|
if (IsKeyPressed(KEY_RIGHT)) |
|
|
{ |
|
|
{ |
|
|
// Get next codepoint in string and move pointer |
|
|
// Get next codepoint in string and move pointer |
|
|
codepoint = GetCodepointNext(ptr, &codepointSize); |
|
|
|
|
|
|
|
|
GetCodepointNext(ptr, &codepointSize); |
|
|
ptr += codepointSize; |
|
|
ptr += codepointSize; |
|
|
} |
|
|
} |
|
|
else if (IsKeyPressed(KEY_LEFT)) |
|
|
else if (IsKeyPressed(KEY_LEFT)) |
|
|
{ |
|
|
{ |
|
|
// Get previous codepoint in string and move pointer |
|
|
// Get previous codepoint in string and move pointer |
|
|
codepoint = GetCodepointPrevious(ptr, &codepointSize); |
|
|
|
|
|
|
|
|
GetCodepointPrevious(ptr, &codepointSize); |
|
|
ptr -= codepointSize; |
|
|
ptr -= codepointSize; |
|
|
} |
|
|
} |
|
|
//---------------------------------------------------------------------------------- |
|
|
//---------------------------------------------------------------------------------- |
|
|