REVIEWED: Comments for consistency and spelling

This commit is contained in:
Ray
2026-04-27 11:34:58 +02:00
parent 3b9ee2e9f3
commit 06621eb3b7
18 changed files with 89 additions and 88 deletions

2
src/external/rlsw.h vendored
View File

@ -153,7 +153,7 @@
#define SW_MAX_TEXTURES 128
#endif
// Enables the use of a lookup table for uint8_t to float conversion
// Enable the use of a lookup table for uint8_t to float conversion
// Requires an additional 1KB of global memory
// Disabled when SIMD intrinsics are enabled
#ifndef SW_USE_COLOR_LUT

View File

@ -616,13 +616,13 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
// Set cursor position in the middle

View File

@ -1129,7 +1129,7 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
glfwSetInputMode(platform.handle, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
@ -1137,7 +1137,7 @@ void HideCursor(void)
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
glfwSetInputMode(platform.handle, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
@ -1151,7 +1151,7 @@ void EnableCursor(void)
CORE.Input.Mouse.cursorLocked = false;
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
// Reset mouse position within the window area before disabling cursor

View File

@ -1097,14 +1097,14 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
RGFW_window_showMouse(platform.window, false);
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
RGFW_window_captureRawMouse(platform.window, false);
@ -1116,7 +1116,7 @@ void EnableCursor(void)
CORE.Input.Mouse.cursorLocked = true;
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
RGFW_window_captureRawMouse(platform.window, true);

View File

@ -1227,7 +1227,7 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
#if defined(USING_VERSION_SDL3)
@ -1238,7 +1238,7 @@ void HideCursor(void)
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
SDL_SetRelativeMouseMode(SDL_FALSE);
@ -1247,7 +1247,7 @@ void EnableCursor(void)
CORE.Input.Mouse.cursorLocked = false;
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
SDL_SetRelativeMouseMode(SDL_TRUE);

View File

@ -1146,7 +1146,7 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
// NOTE: Using SetCursor() instead of ShowCursor() because
@ -1155,7 +1155,7 @@ void HideCursor(void)
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
if (CORE.Input.Mouse.cursorLocked)

View File

@ -561,13 +561,13 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
// Set cursor position in the middle
@ -577,7 +577,7 @@ void EnableCursor(void)
CORE.Input.Mouse.cursorLocked = false;
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
// Set cursor position in the middle

View File

@ -324,13 +324,13 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
// Set cursor position in the middle
@ -339,7 +339,7 @@ void EnableCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
// Set cursor position in the middle

View File

@ -303,13 +303,13 @@ void ShowCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
CORE.Input.Mouse.cursorHidden = true;
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
// Set cursor position in the middle
@ -318,7 +318,7 @@ void EnableCursor(void)
CORE.Input.Mouse.cursorHidden = false;
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
// Set cursor position in the middle

View File

@ -913,7 +913,7 @@ void ShowCursor(void)
}
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
if (!CORE.Input.Mouse.cursorHidden)
@ -924,7 +924,7 @@ void HideCursor(void)
}
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
emscripten_exit_pointerlock();
@ -935,7 +935,7 @@ void EnableCursor(void)
// NOTE: CORE.Input.Mouse.cursorLocked handled by EmscriptenPointerlockCallback()
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
emscripten_request_pointerlock(platform.canvasId, 1);

View File

@ -891,7 +891,7 @@ void ShowCursor(void)
}
}
// Hides mouse cursor
// Hide mouse cursor
void HideCursor(void)
{
if (!CORE.Input.Mouse.cursorHidden)
@ -902,7 +902,7 @@ void HideCursor(void)
}
}
// Enables cursor (unlock cursor)
// Enable cursor (unlock cursor)
void EnableCursor(void)
{
emscripten_exit_pointerlock();
@ -913,7 +913,7 @@ void EnableCursor(void)
// NOTE: CORE.Input.Mouse.cursorLocked handled by EmscriptenPointerlockCallback()
}
// Disables cursor (lock cursor)
// Disable cursor (lock cursor)
void DisableCursor(void)
{
emscripten_request_pointerlock(platform.canvasId, 1);

View File

@ -378,7 +378,7 @@ struct rAudioProcessor {
rAudioProcessor *prev; // Previous audio processor on the list
};
#define AudioBuffer rAudioBuffer // HACK: To avoid CoreAudio (macOS) symbol collision
#define AudioBuffer rAudioBuffer // WARNING: Renamed to avoid symbol collision with CoreAudio (macOS) AudioBuffer type
// Audio data context
typedef struct AudioData {
@ -913,7 +913,7 @@ Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int
return wave;
}
// Checks if wave data is valid (data loaded and parameters)
// Check if wave data is valid (data loaded and parameters)
bool IsWaveValid(Wave wave)
{
bool result = false;
@ -981,7 +981,7 @@ Sound LoadSoundFromWave(Wave wave)
return sound;
}
// Clone sound from existing sound data, clone does not own wave data
// Load sound alias, clone sound from existing sound data, clone does not own wave data
// NOTE: Wave data must be unallocated manually and will be shared across all clones
Sound LoadSoundAlias(Sound source)
{
@ -1013,7 +1013,7 @@ Sound LoadSoundAlias(Sound source)
return sound;
}
// Checks if a sound is valid (data loaded and buffers initialized)
// Check if a sound is valid (data loaded and buffers initialized)
bool IsSoundValid(Sound sound)
{
bool result = false;
@ -1750,7 +1750,7 @@ Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data,
return music;
}
// Checks if a music stream is valid (context and buffers initialized)
// Check if a music stream is valid (context and buffers initialized)
bool IsMusicValid(Music music)
{
return ((music.ctxData != NULL) && // Validate context loaded
@ -2067,7 +2067,7 @@ void SetMusicPitch(Music music, float pitch)
SetAudioBufferPitch(music.stream.buffer, pitch);
}
// Set pan for a music
// Set pan for music
void SetMusicPan(Music music, float pan)
{
SetAudioBufferPan(music.stream.buffer, pan);
@ -2155,7 +2155,7 @@ AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, un
return stream;
}
// Checks if an audio stream is valid (buffers initialized)
// Check if an audio stream is valid (buffers initialized)
bool IsAudioStreamValid(AudioStream stream)
{
return ((stream.buffer != NULL) && // Validate stream buffer

View File

@ -1034,23 +1034,23 @@ RLAPI void EnableEventWaiting(void); // Enable wait
RLAPI void DisableEventWaiting(void); // Disable waiting for events on EndDrawing(), automatic events polling
// Cursor-related functions
RLAPI void ShowCursor(void); // Shows cursor
RLAPI void HideCursor(void); // Hides cursor
RLAPI void ShowCursor(void); // Show cursor
RLAPI void HideCursor(void); // Hide cursor
RLAPI bool IsCursorHidden(void); // Check if cursor is not visible
RLAPI void EnableCursor(void); // Enables cursor (unlock cursor)
RLAPI void DisableCursor(void); // Disables cursor (lock cursor)
RLAPI void EnableCursor(void); // Enable cursor (unlock cursor)
RLAPI void DisableCursor(void); // Disable cursor (lock cursor)
RLAPI bool IsCursorOnScreen(void); // Check if cursor is on the screen
// Drawing-related functions
RLAPI void ClearBackground(Color color); // Set background color (framebuffer clear color)
RLAPI void BeginDrawing(void); // Setup canvas (framebuffer) to start drawing
RLAPI void EndDrawing(void); // End canvas drawing and swap buffers (double buffering)
RLAPI void ClearBackground(Color color); // Clear background (framebuffer) to color
RLAPI void BeginDrawing(void); // Begin canvas (framebuffer) drawing
RLAPI void EndDrawing(void); // End canvas (framebuffer) drawing and swap buffers (double buffering)
RLAPI void BeginMode2D(Camera2D camera); // Begin 2D mode with custom camera (2D)
RLAPI void EndMode2D(void); // Ends 2D mode with custom camera
RLAPI void EndMode2D(void); // End 2D mode with custom camera
RLAPI void BeginMode3D(Camera3D camera); // Begin 3D mode with custom camera (3D)
RLAPI void EndMode3D(void); // Ends 3D mode and returns to default 2D orthographic mode
RLAPI void EndMode3D(void); // End 3D mode and returns to default 2D orthographic mode
RLAPI void BeginTextureMode(RenderTexture2D target); // Begin drawing to render texture
RLAPI void EndTextureMode(void); // Ends drawing to render texture
RLAPI void EndTextureMode(void); // End drawing to render texture
RLAPI void BeginShaderMode(Shader shader); // Begin custom shader drawing
RLAPI void EndShaderMode(void); // End custom shader drawing (use default shader)
RLAPI void BeginBlendMode(int mode); // Begin blending mode (alpha, additive, multiplied, subtract, custom)
@ -1081,10 +1081,10 @@ RLAPI void UnloadShader(Shader shader); // Un
#define GetMouseRay GetScreenToWorldRay // Compatibility hack for previous raylib versions
RLAPI Ray GetScreenToWorldRay(Vector2 position, Camera camera); // Get a ray trace from screen position (i.e mouse)
RLAPI Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height); // Get a ray trace from screen position (i.e mouse) in a viewport
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get the screen space position for a 3d world space position
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get size position for a 3d world space position
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get the screen space position for a 2d camera world space position
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get the world space position for a 2d camera screen space position
RLAPI Vector2 GetWorldToScreen(Vector3 position, Camera camera); // Get screen space position for a 3d world space position
RLAPI Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height); // Get sized screen space position for a 3d world space position
RLAPI Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera); // Get screen space position for a 2d camera world space position
RLAPI Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera); // Get world space position for a 2d camera screen space position
RLAPI Matrix GetCameraMatrix(Camera camera); // Get camera transform matrix (view matrix)
RLAPI Matrix GetCameraMatrix2D(Camera2D camera); // Get camera 2d transform matrix
@ -1110,7 +1110,7 @@ RLAPI void UnloadRandomSequence(int *sequence); // Unload random values
// Misc. functions
RLAPI void TakeScreenshot(const char *fileName); // Takes a screenshot of current screen (filename extension defines format)
RLAPI void SetConfigFlags(unsigned int flags); // Setup init configuration flags (view FLAGS)
RLAPI void SetConfigFlags(unsigned int flags); // Set up init configuration flags (view FLAGS)
RLAPI void OpenURL(const char *url); // Open URL with default system browser (if available)
// Logging system
@ -1245,7 +1245,7 @@ RLAPI int GetTouchPointCount(void); // Get number of t
// Gestures and Touch Handling Functions (Module: rgestures)
//------------------------------------------------------------------------------------
RLAPI void SetGesturesEnabled(unsigned int flags); // Enable a set of gestures using flags
RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture have been detected
RLAPI bool IsGestureDetected(unsigned int gesture); // Check if a gesture has been detected
RLAPI int GetGestureDetected(void); // Get latest detected gesture
RLAPI float GetGestureHoldDuration(void); // Get gesture hold time in seconds
RLAPI Vector2 GetGestureDragVector(void); // Get gesture drag vector
@ -1302,12 +1302,13 @@ RLAPI void DrawRectangleLines(int posX, int posY, int width, int height, Color c
RLAPI void DrawRectangleLinesEx(Rectangle rec, float lineThick, Color color); // Draw rectangle outline with extended parameters
RLAPI void DrawRectangleRounded(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle with rounded edges
RLAPI void DrawRectangleRoundedLines(Rectangle rec, float roundness, int segments, Color color); // Draw rectangle lines with rounded edges
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle with rounded edges outline
RLAPI void DrawRectangleRoundedLinesEx(Rectangle rec, float roundness, int segments, float lineThick, Color color); // Draw rectangle lines with rounded edges outline
RLAPI void DrawTriangle(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw a color-filled triangle (vertex in counter-clockwise order!)
RLAPI void DrawTriangleGradient(Vector2 v1, Vector2 v2, Vector2 v3, Color c1, Color c2, Color c3); // Draw triangle with interpolated colors (vertex in counter-clockwise order!)
RLAPI void DrawTriangleLines(Vector2 v1, Vector2 v2, Vector2 v3, Color color); // Draw triangle outline (vertex in counter-clockwise order!)
RLAPI void DrawTriangleFan(const Vector2 *points, int pointCount, Color color); // Draw a triangle fan defined by points (first vertex is the center)
RLAPI void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color); // Draw a triangle strip defined by points
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a regular polygon (Vector version)
RLAPI void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon of n sides
RLAPI void DrawPolyLines(Vector2 center, int sides, float radius, float rotation, Color color); // Draw a polygon outline of n sides
RLAPI void DrawPolyLinesEx(Vector2 center, int sides, float radius, float rotation, float lineThick, Color color); // Draw a polygon outline of n sides with extended parameters
@ -1334,7 +1335,7 @@ RLAPI Vector2 GetSplinePointBezierCubic(Vector2 p1, Vector2 c2, Vector2 c3, Vect
RLAPI bool CheckCollisionRecs(Rectangle rec1, Rectangle rec2); // Check collision between two rectangles
RLAPI bool CheckCollisionCircles(Vector2 center1, float radius1, Vector2 center2, float radius2); // Check collision between two circles
RLAPI bool CheckCollisionCircleRec(Vector2 center, float radius, Rectangle rec); // Check collision between circle and rectangle
RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created betweeen two points [p1] and [p2]
RLAPI bool CheckCollisionCircleLine(Vector2 center, float radius, Vector2 p1, Vector2 p2); // Check if circle collides with a line created between two points [p1] and [p2]
RLAPI bool CheckCollisionPointRec(Vector2 point, Rectangle rec); // Check if point is inside rectangle
RLAPI bool CheckCollisionPointCircle(Vector2 point, Vector2 center, float radius); // Check if point is inside circle
RLAPI bool CheckCollisionPointTriangle(Vector2 point, Vector2 p1, Vector2 p2, Vector2 p3); // Check if point is inside a triangle
@ -1355,7 +1356,7 @@ RLAPI Image LoadImageAnim(const char *fileName, int *frames);
RLAPI Image LoadImageAnimFromMemory(const char *fileType, const unsigned char *fileData, int dataSize, int *frames); // Load image sequence from memory buffer
RLAPI Image LoadImageFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load image from memory buffer, fileType refers to extension: i.e. '.png'
RLAPI Image LoadImageFromTexture(Texture2D texture); // Load image from GPU texture data
RLAPI Image LoadImageFromScreen(void); // Load image from screen buffer and (screenshot)
RLAPI Image LoadImageFromScreen(void); // Load image from screen buffer (screenshot)
RLAPI bool IsImageValid(Image image); // Check if an image is valid (data and parameters)
RLAPI void UnloadImage(Image image); // Unload image from CPU memory (RAM)
RLAPI bool ExportImage(Image image, const char *fileName); // Export image data to file, returns true on success
@ -1460,7 +1461,7 @@ RLAPI void DrawTextureV(Texture2D texture, Vector2 position, Color tint);
RLAPI void DrawTextureEx(Texture2D texture, Vector2 position, float rotation, float scale, Color tint); // Draw a Texture2D with extended parameters
RLAPI void DrawTextureRec(Texture2D texture, Rectangle source, Vector2 position, Color tint); // Draw a part of a texture defined by a rectangle
RLAPI void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a part of a texture defined by a rectangle with 'pro' parameters
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draws a texture (or part of it) that stretches or shrinks nicely
RLAPI void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint); // Draw a texture (or part of it) that stretches or shrinks nicely
// Color/pixel related functions
RLAPI bool ColorIsEqual(Color col1, Color col2); // Check if two colors are equal
@ -1504,7 +1505,7 @@ RLAPI void DrawText(const char *text, int posX, int posY, int fontSize, Color co
RLAPI void DrawTextEx(Font font, const char *text, Vector2 position, float fontSize, float spacing, Color tint); // Draw text using font and additional parameters
RLAPI void DrawTextPro(Font font, const char *text, Vector2 position, Vector2 origin, float rotation, float fontSize, float spacing, Color tint); // Draw text using Font and pro parameters (rotation)
RLAPI void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSize, Color tint); // Draw one character (codepoint)
RLAPI void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple character (codepoint)
RLAPI void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint); // Draw multiple characters (codepoint)
// Text font info functions
RLAPI void SetTextLineSpacing(int spacing); // Set vertical line spacing when drawing with line-breaks
@ -1532,7 +1533,7 @@ RLAPI const char *CodepointToUTF8(int codepoint, int *utf8Size);
RLAPI char **LoadTextLines(const char *text, int *count); // Load text as separate lines ('\n')
RLAPI void UnloadTextLines(char **text, int lineCount); // Unload text lines
RLAPI int TextCopy(char *dst, const char *src); // Copy one string to another, returns bytes copied
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text string are equal
RLAPI bool TextIsEqual(const char *text1, const char *text2); // Check if two text strings are equal
RLAPI unsigned int TextLength(const char *text); // Get text length, checks for '\0' ending
RLAPI const char *TextFormat(const char *text, ...); // Text formatting with variables (sprintf() style)
RLAPI const char *TextSubtext(const char *text, int position, int length); // Get a piece of a text string
@ -1668,15 +1669,15 @@ RLAPI float GetMasterVolume(void); // Get mas
// Wave/Sound loading/unloading functions
RLAPI Wave LoadWave(const char *fileName); // Load wave data from file
RLAPI Wave LoadWaveFromMemory(const char *fileType, const unsigned char *fileData, int dataSize); // Load wave from memory buffer, fileType refers to extension: i.e. '.wav'
RLAPI bool IsWaveValid(Wave wave); // Checks if wave data is valid (data loaded and parameters)
RLAPI bool IsWaveValid(Wave wave); // Check if wave data is valid (data loaded and parameters)
RLAPI Sound LoadSound(const char *fileName); // Load sound from file
RLAPI Sound LoadSoundFromWave(Wave wave); // Load sound from wave data
RLAPI Sound LoadSoundAlias(Sound source); // Create a new sound that shares the same sample data as the source sound, does not own the sound data
RLAPI bool IsSoundValid(Sound sound); // Checks if a sound is valid (data loaded and buffers initialized)
RLAPI void UpdateSound(Sound sound, const void *data, int sampleCount); // Update sound buffer with new data (default data format: 32 bit float, stereo)
RLAPI Sound LoadSoundAlias(Sound source); // Load sound alias, new sound that shares the same sample data as the source sound, does not own the sound data
RLAPI bool IsSoundValid(Sound sound); // Check if a sound is valid (data loaded and buffers initialized)
RLAPI void UnloadWave(Wave wave); // Unload wave data
RLAPI void UnloadSound(Sound sound); // Unload sound
RLAPI void UnloadSoundAlias(Sound alias); // Unload a sound alias (does not deallocate sample data)
RLAPI void UnloadSoundAlias(Sound alias); // Unload sound alias (does not deallocate sample data)
RLAPI bool ExportWave(Wave wave, const char *fileName); // Export wave data to file, returns true on success
RLAPI bool ExportWaveAsCode(Wave wave, const char *fileName); // Export wave sample data to code (.h), returns true on success
@ -1698,24 +1699,24 @@ RLAPI void UnloadWaveSamples(float *samples); // Unload
// Music management functions
RLAPI Music LoadMusicStream(const char *fileName); // Load music stream from file
RLAPI Music LoadMusicStreamFromMemory(const char *fileType, const unsigned char *data, int dataSize); // Load music stream from data
RLAPI bool IsMusicValid(Music music); // Checks if a music stream is valid (context and buffers initialized)
RLAPI bool IsMusicValid(Music music); // Check if a music stream is valid (context and buffers initialized)
RLAPI void UnloadMusicStream(Music music); // Unload music stream
RLAPI void PlayMusicStream(Music music); // Start music playing
RLAPI bool IsMusicStreamPlaying(Music music); // Check if music is playing
RLAPI void UpdateMusicStream(Music music); // Updates buffers for music streaming
RLAPI void UpdateMusicStream(Music music); // Update buffers for music streaming
RLAPI void StopMusicStream(Music music); // Stop music playing
RLAPI void PauseMusicStream(Music music); // Pause music playing
RLAPI void ResumeMusicStream(Music music); // Resume playing paused music
RLAPI void SeekMusicStream(Music music, float position); // Seek music to a position (in seconds)
RLAPI void SetMusicVolume(Music music, float volume); // Set volume for music (1.0 is max level)
RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for a music (1.0 is base level)
RLAPI void SetMusicPan(Music music, float pan); // Set pan for a music (-1.0 left, 0.0 center, 1.0 right)
RLAPI void SetMusicPitch(Music music, float pitch); // Set pitch for music (1.0 is base level)
RLAPI void SetMusicPan(Music music, float pan); // Set pan for music (-1.0 left, 0.0 center, 1.0 right)
RLAPI float GetMusicTimeLength(Music music); // Get music time length (in seconds)
RLAPI float GetMusicTimePlayed(Music music); // Get current music time played (in seconds)
// AudioStream management functions
RLAPI AudioStream LoadAudioStream(unsigned int sampleRate, unsigned int sampleSize, unsigned int channels); // Load audio stream (to stream raw audio pcm data)
RLAPI bool IsAudioStreamValid(AudioStream stream); // Checks if an audio stream is valid (buffers initialized)
RLAPI bool IsAudioStreamValid(AudioStream stream); // Check if an audio stream is valid (buffers initialized)
RLAPI void UnloadAudioStream(AudioStream stream); // Unload audio stream and free memory
RLAPI void UpdateAudioStream(AudioStream stream, const void *data, int frameCount); // Update audio stream buffers with data
RLAPI bool IsAudioStreamProcessed(AudioStream stream); // Check if any audio stream buffers requires refill
@ -1726,7 +1727,7 @@ RLAPI bool IsAudioStreamPlaying(AudioStream stream); // Check i
RLAPI void StopAudioStream(AudioStream stream); // Stop audio stream
RLAPI void SetAudioStreamVolume(AudioStream stream, float volume); // Set volume for audio stream (1.0 is max level)
RLAPI void SetAudioStreamPitch(AudioStream stream, float pitch); // Set pitch for audio stream (1.0 is base level)
RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (-1.0 to 1.0 range, 0.0 is centered)
RLAPI void SetAudioStreamPan(AudioStream stream, float pan); // Set pan for audio stream (-1.0 left, 0.0 center, 1.0 right)
RLAPI void SetAudioStreamBufferSizeDefault(int size); // Default size for new audio streams
RLAPI void SetAudioStreamCallback(AudioStream stream, AudioCallback callback); // Audio thread callback to request new data

View File

@ -869,14 +869,14 @@ bool IsCursorOnScreen(void)
// Module Functions Definition: Screen Drawing
//----------------------------------------------------------------------------------
// Set background color (framebuffer clear color)
// Clear background (framebuffer) to color
void ClearBackground(Color color)
{
rlClearColor(color.r, color.g, color.b, color.a); // Set clear color
rlClearScreenBuffers(); // Clear current framebuffers
}
// Setup canvas (framebuffer) to start drawing
// Begin canvas (framebuffer) drawing
void BeginDrawing(void)
{
// WARNING: Previously to BeginDrawing() other render textures drawing could happen,
@ -893,7 +893,7 @@ void BeginDrawing(void)
// NOTE: Not required with OpenGL 3.3+
}
// End canvas drawing and swap buffers (double buffering)
// End canvas (framebuffer) drawing and swap buffers (double buffering)
void EndDrawing(void)
{
rlDrawRenderBatchActive(); // Update and draw internal render batch
@ -949,7 +949,7 @@ void BeginMode2D(Camera2D camera)
rlMultMatrixf(MatrixToFloat(GetCameraMatrix2D(camera)));
}
// Ends 2D mode with custom camera
// End 2D mode with custom camera
void EndMode2D(void)
{
rlDrawRenderBatchActive(); // Update and draw internal render batch
@ -998,7 +998,7 @@ void BeginMode3D(Camera camera)
rlEnableDepthTest(); // Enable DEPTH_TEST for 3D
}
// Ends 3D mode and returns to default 2D orthographic mode
// End 3D mode and returns to default 2D orthographic mode
void EndMode3D(void)
{
rlDrawRenderBatchActive(); // Update and draw internal render batch
@ -1045,7 +1045,7 @@ void BeginTextureMode(RenderTexture2D target)
CORE.Window.usingFbo = true;
}
// Ends drawing to render texture
// End drawing to render texture
void EndTextureMode(void)
{
rlDrawRenderBatchActive(); // Update and draw internal render batch
@ -1514,7 +1514,7 @@ Matrix GetCameraMatrix2D(Camera2D camera)
return matTransform;
}
// Get the screen space position from a 3d world space position
// Get screen space position from a 3d world space position
Vector2 GetWorldToScreen(Vector3 position, Camera camera)
{
Vector2 screenPosition = GetWorldToScreenEx(position, camera, GetScreenWidth(), GetScreenHeight());
@ -1522,7 +1522,7 @@ Vector2 GetWorldToScreen(Vector3 position, Camera camera)
return screenPosition;
}
// Get size position for a 3d world space position (useful for texture drawing)
// Get sized screen space position for a 3d world space position (useful for texture drawing)
Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int height)
{
// Calculate projection matrix (from perspective instead of frustum
@ -1564,7 +1564,7 @@ Vector2 GetWorldToScreenEx(Vector3 position, Camera camera, int width, int heigh
return screenPosition;
}
// Get the screen space position for a 2d camera world space position
// Get screen space position for a 2d camera world space position
Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera)
{
Matrix matCamera = GetCameraMatrix2D(camera);
@ -1573,7 +1573,7 @@ Vector2 GetWorldToScreen2D(Vector2 position, Camera2D camera)
return (Vector2){ transform.x, transform.y };
}
// Get the world space position for a 2d camera screen space position
// Get world space position for a 2d camera screen space position
Vector2 GetScreenToWorld2D(Vector2 position, Camera2D camera)
{
Matrix invMatCamera = MatrixInvert(GetCameraMatrix2D(camera));
@ -1853,7 +1853,7 @@ void TakeScreenshot(const char *fileName)
#endif
}
// Setup window configuration flags (view FLAGS)
// Set up window configuration flags (view FLAGS)
// NOTE: This function is expected to be called before window creation,
// because it sets up some flags for the window creation process
// To configure window states after creation, use SetWindowState()

View File

@ -85,7 +85,7 @@
#define VOX_FREE RL_FREE
#define VOX_LOADER_IMPLEMENTATION
#include "external/vox_loader.h" // VOX file format loading (MagikaVoxel)
#include "external/vox_loader.h" // VOX file format loading (MagicaVoxel)
#endif
#if SUPPORT_FILEFORMAT_M3D
@ -3936,7 +3936,7 @@ void DrawModelEx(Model model, Vector3 position, Vector3 rotationAxis, float rota
Color colDiffuse = mat.maps[MATERIAL_MAP_DIFFUSE].color;
// Applying color tint directly to material diffuse map,
// because is comes as an input paramter to the function
// because it comes as an input parameter to the function
Color colTinted = { 0 };
colTinted.r = (unsigned char)(((int)colDiffuse.r*(int)tint.r)/255);
colTinted.g = (unsigned char)(((int)colDiffuse.g*(int)tint.g)/255);

View File

@ -1531,7 +1531,7 @@ void DrawTriangleStrip(const Vector2 *points, int pointCount, Color color)
}
}
// Draw a regular polygon of n sides (Vector version)
// Draw a polygon of n sides
void DrawPoly(Vector2 center, int sides, float radius, float rotation, Color color)
{
if (sides < 3) sides = 3;

View File

@ -156,7 +156,7 @@ extern void LoadFontDefault(void)
{
#define BIT_CHECK(a,b) ((a) & (1u << (b)))
// Check to see if the font for an image has alreeady been allocated,
// Check to see if the font for an image has already been allocated,
// and if no need to upload, then return
if (defaultFont.glyphs != NULL) return;
@ -1279,7 +1279,7 @@ void DrawTextCodepoint(Font font, int codepoint, Vector2 position, float fontSiz
DrawTexturePro(font.texture, srcRec, dstRec, (Vector2){ 0, 0 }, 0.0f, tint);
}
// Draw multiple character (codepoints)
// Draw multiple characters (codepoints)
void DrawTextCodepoints(Font font, const int *codepoints, int codepointCount, Vector2 position, float fontSize, float spacing, Color tint)
{
float textOffsetY = 0; // Offset between lines (on linebreak '\n')
@ -1674,7 +1674,7 @@ int TextCopy(char *dst, const char *src)
return bytes;
}
// Check if two text string are equal
// Check if two text strings are equal
// REQUIRES: strcmp()
bool TextIsEqual(const char *text1, const char *text2)
{

View File

@ -580,7 +580,7 @@ Image LoadImageFromTexture(Texture2D texture)
return image;
}
// Load image from screen buffer and (screenshot)
// Load image from screen buffer (screenshot)
Image LoadImageFromScreen(void)
{
Image image = { 0 };
@ -4624,7 +4624,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
}
}
// Draws a texture (or part of it) that stretches or shrinks nicely using n-patch info
// Draw a texture (or part of it) that stretches or shrinks nicely using n-patch info
void DrawTextureNPatch(Texture2D texture, NPatchInfo nPatchInfo, Rectangle dest, Vector2 origin, float rotation, Color tint)
{
if (texture.id > 0)