REVIEWED: Code sections definition

This commit is contained in:
Ray
2025-09-02 12:10:40 +02:00
parent b6ae380260
commit 8f32c502a7
10 changed files with 19 additions and 25 deletions

View File

@@ -111,7 +111,7 @@ extern CoreData CORE; // Global CORE state context
static PlatformData platform = { 0 }; // Platform specific data
//----------------------------------------------------------------------------------
// Local Variables Definition
// Global Variables Definition
//----------------------------------------------------------------------------------
#define SCANCODE_MAPPED_NUM 232
static const KeyboardKey mapScancodeToKey[SCANCODE_MAPPED_NUM] = {

View File

@@ -156,7 +156,7 @@ extern CoreData CORE; // Global CORE state context
static PlatformData platform = { 0 }; // Platform specific data
//----------------------------------------------------------------------------------
// Local Variables Definition
// Global Variables Definition
//----------------------------------------------------------------------------------
// NOTE: The complete evdev EV_KEY list can be found at /usr/include/linux/input-event-codes.h

View File

@@ -86,7 +86,7 @@ extern CoreData CORE; // Global CORE state context
static PlatformData platform = { 0 }; // Platform specific data
//----------------------------------------------------------------------------------
// Local Variables Definition
// Global Variables Definition
//----------------------------------------------------------------------------------
static const char cursorLUT[11][12] = {
"default", // 0 MOUSE_CURSOR_DEFAULT

View File

@@ -407,7 +407,7 @@ static AudioData AUDIO = { // Global AUDIO context
};
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
// Module Internal Functions Declaration
//----------------------------------------------------------------------------------
static void OnLog(void *pUserData, ma_uint32 level, const char *pMessage);
@@ -2352,9 +2352,8 @@ void DetachAudioMixedProcessor(AudioCallback process)
}
//----------------------------------------------------------------------------------
// Module specific Functions Definition
// Module Internal Functions Definition
//----------------------------------------------------------------------------------
// Log callback function
static void OnLog(void *pUserData, ma_uint32 level, const char *pMessage)
{

View File

@@ -115,7 +115,7 @@
#endif
//----------------------------------------------------------------------------------
// Some basic Defines
// Defines and Macros
//----------------------------------------------------------------------------------
#ifndef PI
#define PI 3.14159265358979323846f
@@ -201,7 +201,7 @@
#define RAYWHITE CLITERAL(Color){ 245, 245, 245, 255 } // My own White (raylib logo)
//----------------------------------------------------------------------------------
// Structures Definition
// Types and Structures Definition
//----------------------------------------------------------------------------------
// Boolean type
#if (defined(__STDC__) && __STDC_VERSION__ >= 199901L) || (defined(_MSC_VER) && _MSC_VER >= 1800)

View File

@@ -1039,7 +1039,7 @@ RLAPI void rlLoadDrawQuad(void); // Load and draw a quad
#endif
//----------------------------------------------------------------------------------
// Types and Structures Definition
// Module Types and Structures Definition
//----------------------------------------------------------------------------------
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
@@ -1145,7 +1145,7 @@ static PFNGLVERTEXATTRIBDIVISOREXTPROC glVertexAttribDivisor = NULL;
#endif
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
// Module Functions Declaration
//----------------------------------------------------------------------------------
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
static void rlLoadShaderDefault(void); // Load default shader
@@ -4864,7 +4864,7 @@ const char *rlGetPixelFormatName(unsigned int format)
}
//----------------------------------------------------------------------------------
// Module specific Functions Definition
// Module Functions Definition
//----------------------------------------------------------------------------------
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Load default shader (just vertex positioning and texture coloring)

View File

@@ -144,7 +144,7 @@
// ...
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
// Module Internal Functions Declaration
//----------------------------------------------------------------------------------
#if defined(SUPPORT_FILEFORMAT_OBJ)
static Model LoadOBJ(const char *fileName); // Load OBJ mesh data
@@ -171,7 +171,6 @@ static void ProcessMaterialsOBJ(Material *rayMaterials, tinyobj_material_t *mate
//----------------------------------------------------------------------------------
// Module Functions Definition
//----------------------------------------------------------------------------------
// Draw a line in 3D world space
void DrawLine3D(Vector3 startPos, Vector3 endPos, Color color)
{
@@ -4244,7 +4243,7 @@ RayCollision GetRayCollisionQuad(Ray ray, Vector3 p1, Vector3 p2, Vector3 p3, Ve
}
//----------------------------------------------------------------------------------
// Module specific Functions Definition
// Module Internal Functions Definition
//----------------------------------------------------------------------------------
#if defined(SUPPORT_FILEFORMAT_IQM) || defined(SUPPORT_FILEFORMAT_GLTF)
// Build pose from parent joints

View File

@@ -83,14 +83,13 @@ static Texture2D texShapes = { 1, 1, 1, 1, 7 }; // Texture used o
static Rectangle texShapesRec = { 0.0f, 0.0f, 1.0f, 1.0f }; // Texture source rectangle used on shapes drawing
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
// Module Internal Functions Declaration
//----------------------------------------------------------------------------------
static float EaseCubicInOut(float t, float b, float c, float d); // Cubic easing
//----------------------------------------------------------------------------------
// Module Functions Definition
//----------------------------------------------------------------------------------
// Set texture and rectangle to be used on shapes drawing
// NOTE: It can be useful when using basic shapes and one single font,
// defining a font char white rectangle would allow drawing everything in a single draw call
@@ -2371,7 +2370,7 @@ bool CheckCollisionPointLine(Vector2 point, Vector2 p1, Vector2 p2, int threshol
}
// Check if circle collides with a line created between two points [p1] and [p2]
RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2)
bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2)
{
float dx = p1.x - p2.x;
float dy = p1.y - p2.y;
@@ -2420,7 +2419,7 @@ Rectangle GetCollisionRec(Rectangle rec1, Rectangle rec2)
}
//----------------------------------------------------------------------------------
// Module specific Functions Definition
// Module Internal Functions Definition
//----------------------------------------------------------------------------------
// Cubic easing in-out

View File

@@ -141,7 +141,7 @@ static int textLineSpacing = 2; // Text vertical line spacing in
//...
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
// Module Internal Functions Declaration
//----------------------------------------------------------------------------------
#if defined(SUPPORT_FILEFORMAT_FNT)
static Font LoadBMFont(const char *fileName); // Load a BMFont file (AngelCode font file)
@@ -2197,7 +2197,7 @@ int GetCodepointPrevious(const char *text, int *codepointSize)
}
//----------------------------------------------------------------------------------
// Module specific Functions Definition
// Module Internal Functions Definition
//----------------------------------------------------------------------------------
#if defined(SUPPORT_FILEFORMAT_FNT) || defined(SUPPORT_FILEFORMAT_BDF)
// Read a line from memory
@@ -2380,11 +2380,9 @@ static Font LoadBMFont(const char *fileName)
return font;
}
#endif
#if defined(SUPPORT_FILEFORMAT_BDF)
// Convert hexadecimal to decimal (single digit)
static unsigned char HexToInt(char hex)
{

View File

@@ -258,7 +258,7 @@
extern void LoadFontDefault(void); // [Module: text] Loads default font, required by ImageDrawText()
//----------------------------------------------------------------------------------
// Module specific Functions Declaration
// Module Internal Functions Declaration
//----------------------------------------------------------------------------------
static float HalfToFloat(unsigned short x);
static unsigned short FloatToHalf(float x);
@@ -267,7 +267,6 @@ static Vector4 *LoadImageDataNormalized(Image image); // Load pixel data f
//----------------------------------------------------------------------------------
// Module Functions Definition
//----------------------------------------------------------------------------------
// Load image from file into CPU memory (RAM)
Image LoadImage(const char *fileName)
{
@@ -5406,7 +5405,7 @@ int GetPixelDataSize(int width, int height, int format)
}
//----------------------------------------------------------------------------------
// Module specific Functions Definition
// Module Internal Functions Definition
//----------------------------------------------------------------------------------
// Convert half-float (stored as unsigned short) to float
// REF: https://stackoverflow.com/questions/1659440/32-bit-to-16-bit-floating-point-conversion/60047308#60047308