mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
REVIEWED: Examples section comments, for better organization and consistency
This commit is contained in:
@ -23,6 +23,9 @@
|
||||
// this text will be scanned to get all the required codepoints
|
||||
static char *text = "いろはにほへと ちりぬるを\nわかよたれそ つねならむ\nうゐのおくやま けふこえて\nあさきゆめみし ゑひもせす";
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Module Functions Declaration
|
||||
//------------------------------------------------------------------------------------
|
||||
// Remove codepoint duplicates if requested
|
||||
static int *CodepointRemoveDuplicates(int *codepoints, int codepointCount, int *codepointResultCount);
|
||||
|
||||
@ -128,6 +131,9 @@ int main(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
// Module Functions Definition
|
||||
//------------------------------------------------------------------------------------
|
||||
// Remove codepoint duplicates if requested
|
||||
// WARNING: This process could be a bit slow if there text to process is very long
|
||||
static int *CodepointRemoveDuplicates(int *codepoints, int codepointCount, int *codepointsResultCount)
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
#define EMOJI_PER_HEIGHT 4
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Global variables
|
||||
// Global Variables Definition
|
||||
//--------------------------------------------------------------------------------------
|
||||
// Arrays that holds the random emojis
|
||||
struct {
|
||||
@ -34,7 +34,8 @@ struct {
|
||||
Color color; // Emoji color
|
||||
} emoji[EMOJI_PER_WIDTH*EMOJI_PER_HEIGHT] = { 0 };
|
||||
|
||||
static int hovered = -1, selected = -1;
|
||||
static int hovered = -1;
|
||||
static int selected = -1;
|
||||
|
||||
// String containing 180 emoji codepoints separated by a '\0' char
|
||||
const char *const emojiCodepoints = "\xF0\x9F\x8C\x80\x00\xF0\x9F\x98\x80\x00\xF0\x9F\x98\x82\x00\xF0\x9F\xA4\xA3\x00\xF0\x9F\x98\x83\x00\xF0\x9F\x98\x86\x00\xF0\x9F\x98\x89\x00"
|
||||
|
||||
@ -149,7 +149,7 @@ int main(void)
|
||||
(Rectangle){ 400, 16, font.texture.width*atlasScale, font.texture.height*atlasScale }, (Vector2){ 0, 0 }, 0.0f, WHITE);
|
||||
DrawRectangleLines(400, 16, 380, 380, RED);
|
||||
|
||||
DrawText(TextFormat("ATLAS SIZE: %ix%i px (x%02.1f)", font.texture.width, font.texture.height, atlasScale), 20, 380, 20, BLUE);
|
||||
DrawText(TextFormat("ATLAS SIZE: %ix%i px (x%02.2f)", font.texture.width, font.texture.height, atlasScale), 20, 380, 20, BLUE);
|
||||
|
||||
// Display font attribution
|
||||
DrawText("Font: Noto Sans TC. License: SIL Open Font License 1.1", screenWidth - 300, screenHeight - 20, 10, GRAY);
|
||||
|
||||
Reference in New Issue
Block a user