From aa475b10461018f6f2ed02cfe0bc628d6a8b9698 Mon Sep 17 00:00:00 2001 From: Ray Date: Tue, 2 Sep 2025 12:34:04 +0200 Subject: [PATCH] REVIEWED: Code sections description for consistency --- examples/models/rlights.h | 2 +- examples/shaders/rlights.h | 2 +- examples/shapes/raygui.h | 4 ++-- src/external/rprand.h | 6 +++--- src/rcamera.h | 2 +- src/rgestures.h | 4 ++-- src/utils.c | 4 ++-- tools/rexm/rexm.c | 7 +++---- 8 files changed, 15 insertions(+), 16 deletions(-) diff --git a/examples/models/rlights.h b/examples/models/rlights.h index e38b0015a..aba907b5f 100644 --- a/examples/models/rlights.h +++ b/examples/models/rlights.h @@ -109,7 +109,7 @@ void UpdateLightValues(Shader shader, Light light); // Send light proper static int lightsCount = 0; // Current amount of created lights //---------------------------------------------------------------------------------- -// Module specific Functions Declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- // ... diff --git a/examples/shaders/rlights.h b/examples/shaders/rlights.h index e38b0015a..aba907b5f 100644 --- a/examples/shaders/rlights.h +++ b/examples/shaders/rlights.h @@ -109,7 +109,7 @@ void UpdateLightValues(Shader shader, Light light); // Send light proper static int lightsCount = 0; // Current amount of created lights //---------------------------------------------------------------------------------- -// Module specific Functions Declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- // ... diff --git a/examples/shapes/raygui.h b/examples/shapes/raygui.h index 85c477870..a3fc51f0f 100644 --- a/examples/shapes/raygui.h +++ b/examples/shapes/raygui.h @@ -1480,7 +1480,7 @@ static void DrawRectangleGradientV(int posX, int posY, int width, int height, Co #endif // RAYGUI_STANDALONE //---------------------------------------------------------------------------------- -// Module specific Functions Declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- static void GuiLoadStyleFromMemory(const unsigned char *fileData, int dataSize); // Load style from memory (binary only) @@ -4479,7 +4479,7 @@ void GuiSetIconScale(int scale) #endif // !RAYGUI_NO_ICONS //---------------------------------------------------------------------------------- -// Module specific Functions Definition +// Module Internal Functions Definition //---------------------------------------------------------------------------------- // Load style from memory diff --git a/src/external/rprand.h b/src/external/rprand.h index 95147d270..cdef03c01 100644 --- a/src/external/rprand.h +++ b/src/external/rprand.h @@ -156,13 +156,13 @@ static uint32_t rprand_state[4] = { // Xoshiro128** state, initializ }; //---------------------------------------------------------------------------------- -// Module internal functions declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- static uint32_t rprand_xoshiro(void); // Xoshiro128** generator (uses global rprand_state) static uint64_t rprand_splitmix64(void); // SplitMix64 generator (uses seed to generate rprand_state) //---------------------------------------------------------------------------------- -// Module functions definition +// Module Functions Definition //---------------------------------------------------------------------------------- // Set rprand_state for Xoshiro128** // NOTE: We use a custom generation algorithm using SplitMix64 @@ -236,7 +236,7 @@ void rprand_unload_sequence(int *sequence) } //---------------------------------------------------------------------------------- -// Module internal functions definition +// Module Internal Functions Definition //---------------------------------------------------------------------------------- static inline uint32_t rprand_rotate_left(const uint32_t x, int k) { diff --git a/src/rcamera.h b/src/rcamera.h index 62c1225ec..3e9f83095 100644 --- a/src/rcamera.h +++ b/src/rcamera.h @@ -216,7 +216,7 @@ RLAPI Matrix GetCameraProjectionMatrix(Camera *camera, float aspect); //... //---------------------------------------------------------------------------------- -// Module specific Functions Declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- //... diff --git a/src/rgestures.h b/src/rgestures.h index 1bf4e0555..389df64a1 100644 --- a/src/rgestures.h +++ b/src/rgestures.h @@ -238,7 +238,7 @@ static GesturesData GESTURES = { }; //---------------------------------------------------------------------------------- -// Module specific Functions Declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- static float rgVector2Angle(Vector2 initialPosition, Vector2 finalPosition); static float rgVector2Distance(Vector2 v1, Vector2 v2); @@ -481,7 +481,7 @@ float GetGesturePinchAngle(void) } //---------------------------------------------------------------------------------- -// Module specific Functions Definition +// Module Internal Functions Definition //---------------------------------------------------------------------------------- // Get angle from two-points vector with X-axis static float rgVector2Angle(Vector2 v1, Vector2 v2) diff --git a/src/utils.c b/src/utils.c index 26e7a1bab..310ebfc78 100644 --- a/src/utils.c +++ b/src/utils.c @@ -82,7 +82,7 @@ static const char *internalDataPath = NULL; // Android internal data pat #endif //---------------------------------------------------------------------------------- -// Module specific Functions Declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- #if defined(PLATFORM_ANDROID) FILE *funopen(const void *cookie, int (*readfn)(void *, char *, int), int (*writefn)(void *, const char *, int), @@ -482,7 +482,7 @@ FILE *android_fopen(const char *fileName, const char *mode) #endif // PLATFORM_ANDROID //---------------------------------------------------------------------------------- -// Module specific Functions Definition +// Module Internal Functions Definition //---------------------------------------------------------------------------------- #if defined(PLATFORM_ANDROID) static int android_read(void *cookie, char *data, int dataSize) diff --git a/tools/rexm/rexm.c b/tools/rexm/rexm.c index 9ab4950c8..d1bfb1a62 100644 --- a/tools/rexm/rexm.c +++ b/tools/rexm/rexm.c @@ -129,7 +129,7 @@ static const char *exCollectionFilePath = NULL; // Env: REXM_EXAMPLES_COLLECTION static const char *exVSProjectSolutionFile = NULL; // Env REXM_EXAMPLES_VS2022_SLN_FILE //---------------------------------------------------------------------------------- -// Module specific functions declaration +// Module Internal Functions Declaration //---------------------------------------------------------------------------------- static int FileTextFind(const char *fileName, const char *find); static int FileTextReplace(const char *fileName, const char *find, const char *replace); @@ -1283,9 +1283,8 @@ int main(int argc, char *argv[]) } //---------------------------------------------------------------------------------- -// Module specific functions definition +// Module Internal Functions Definition //---------------------------------------------------------------------------------- - // Update required files from examples collection static int UpdateRequiredFiles(void) { @@ -1772,7 +1771,7 @@ static int FileMove(const char *srcPath, const char *dstPath) // Get example info from example file header // NOTE: Expecting the example to follow raylib_example_template.c -rlExampleInfo *LoadExampleInfo(const char *exFileName) +static rlExampleInfo *LoadExampleInfo(const char *exFileName) { rlExampleInfo *exInfo = (rlExampleInfo *)RL_CALLOC(1, sizeof(rlExampleInfo));