summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorRay <[email protected]>2024-04-20 20:31:06 +0200
committerRay <[email protected]>2024-04-20 20:31:06 +0200
commite85f245ad43283a46bab866d8612569c3246883b (patch)
treeeaaa6b394b7b5613d53b790221cd5cf6282955a1 /src
parentc1943f0f7c253cd839c7633e02d3d7f3aa3a6833 (diff)
downloadraylib-e85f245ad43283a46bab866d8612569c3246883b.tar.gz
raylib-e85f245ad43283a46bab866d8612569c3246883b.zip
REVIEWED: Remove final punctuation in code comments
Diffstat (limited to 'src')
-rw-r--r--src/rcore.c41
-rw-r--r--src/rmodels.c22
-rw-r--r--src/rtext.c4
-rw-r--r--src/rtextures.c8
-rw-r--r--src/utils.c2
5 files changed, 34 insertions, 43 deletions
diff --git a/src/rcore.c b/src/rcore.c
index b4aaed68..d2e4a35e 100644
--- a/src/rcore.c
+++ b/src/rcore.c
@@ -296,7 +296,7 @@ typedef struct CoreData {
char previousKeyState[MAX_KEYBOARD_KEYS]; // Registers previous frame key state
// NOTE: Since key press logic involves comparing prev vs cur key state, we need to handle key repeats specially
- char keyRepeatInFrame[MAX_KEYBOARD_KEYS]; // Registers key repeats for current frame.
+ char keyRepeatInFrame[MAX_KEYBOARD_KEYS]; // Registers key repeats for current frame
int keyPressedQueue[MAX_KEY_PRESSED_QUEUE]; // Input keys queue
int keyPressedQueueCount; // Input keys queue count
@@ -806,7 +806,7 @@ bool IsCursorHidden(void)
return CORE.Input.Mouse.cursorHidden;
}
-// Check if cursor is on the current screen.
+// Check if cursor is on the current screen
bool IsCursorOnScreen(void)
{
return CORE.Input.Mouse.cursorOnScreen;
@@ -1213,9 +1213,9 @@ VrStereoConfig LoadVrStereoConfig(VrDeviceInfo device)
config.projection[1] = MatrixMultiply(proj, MatrixTranslate(-projOffset, 0.0f, 0.0f));
// Compute camera transformation matrices
- // NOTE: Camera movement might seem more natural if we model the head.
+ // NOTE: Camera movement might seem more natural if we model the head
// Our axis of rotation is the base of our head, so we might want to add
- // some y (base of head to eye level) and -z (center of head to eye protrusion) to the camera positions.
+ // some y (base of head to eye level) and -z (center of head to eye protrusion) to the camera positions
config.viewOffset[0] = MatrixTranslate(device.interpupillaryDistance*0.5f, 0.075f, 0.045f);
config.viewOffset[1] = MatrixTranslate(-device.interpupillaryDistance*0.5f, 0.075f, 0.045f);
@@ -1462,9 +1462,10 @@ Ray GetScreenToWorldRayEx(Vector2 position, Camera camera, int width, int height
Vector3 nearPoint = Vector3Unproject((Vector3){ deviceCoords.x, deviceCoords.y, 0.0f }, matProj, matView);
Vector3 farPoint = Vector3Unproject((Vector3){ deviceCoords.x, deviceCoords.y, 1.0f }, matProj, matView);
- // Unproject the mouse cursor in the near plane.
- // We need this as the source position because orthographic projects, compared to perspective doesn't have a
- // convergence point, meaning that the "eye" of the camera is more like a plane than a point.
+ // Unproject the mouse cursor in the near plane
+ // We need this as the source position because orthographic projects,
+ // compared to perspective doesn't have a convergence point,
+ // meaning that the "eye" of the camera is more like a plane than a point
Vector3 cameraPlanePointerPos = Vector3Unproject((Vector3){ deviceCoords.x, deviceCoords.y, -1.0f }, matProj, matView);
// Calculate normalized direction vector
@@ -1495,12 +1496,12 @@ Matrix GetCameraMatrix2D(Camera2D camera)
// 1. Move it to target
// 2. Rotate by -rotation and scale by (1/zoom)
// When setting higher scale, it's more intuitive for the world to become bigger (= camera become smaller),
- // not for the camera getting bigger, hence the invert. Same deal with rotation.
+ // not for the camera getting bigger, hence the invert. Same deal with rotation
// 3. Move it by (-offset);
// Offset defines target transform relative to screen, but since we're effectively "moving" screen (camera)
// we need to do it into opposite direction (inverse transform)
- // Having camera transform in world-space, inverse of it gives the modelview transform.
+ // Having camera transform in world-space, inverse of it gives the modelview transform
// Since (A*B*C)' = C'*B'*A', the modelview is
// 1. Move to offset
// 2. Rotate and Scale
@@ -1691,7 +1692,7 @@ void WaitTime(double seconds)
req.tv_sec = sec;
req.tv_nsec = nsec;
- // NOTE: Use nanosleep() on Unix platforms... usleep() it's deprecated.
+ // NOTE: Use nanosleep() on Unix platforms... usleep() it's deprecated
while (nanosleep(&req, &req) == -1) continue;
#endif
#if defined(__APPLE__)
@@ -1826,7 +1827,7 @@ void TakeScreenshot(const char *fileName)
// Setup 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.
+// because it sets up some flags for the window creation process
// To configure window states after creation, just use SetWindowState()
void SetConfigFlags(unsigned int flags)
{
@@ -3085,10 +3086,10 @@ int GetTouchPointCount(void)
// Initialize hi-resolution timer
void InitTimer(void)
{
- // Setting a higher resolution can improve the accuracy of time-out intervals in wait functions.
- // However, it can also reduce overall system performance, because the thread scheduler switches tasks more often.
- // High resolutions can also prevent the CPU power management system from entering power-saving modes.
- // Setting a higher resolution does not improve the accuracy of the high-resolution performance counter.
+ // Setting a higher resolution can improve the accuracy of time-out intervals in wait functions
+ // However, it can also reduce overall system performance, because the thread scheduler switches tasks more often
+ // High resolutions can also prevent the CPU power management system from entering power-saving modes
+ // Setting a higher resolution does not improve the accuracy of the high-resolution performance counter
#if defined(_WIN32) && defined(SUPPORT_WINMM_HIGHRES_TIMER) && !defined(SUPPORT_BUSY_WAIT_LOOP) && !defined(PLATFORM_DESKTOP_SDL)
timeBeginPeriod(1); // Setup high-resolution timer to 1ms (granularity of 1-2 ms)
#endif
@@ -3572,16 +3573,6 @@ static void RecordAutomationEvent(void)
}
//-------------------------------------------------------------------------------------
#endif
-
- // Window events recording
- //-------------------------------------------------------------------------------------
- // TODO.
- //-------------------------------------------------------------------------------------
-
- // Custom actions events recording
- //-------------------------------------------------------------------------------------
- // TODO.
- //-------------------------------------------------------------------------------------
}
#endif
diff --git a/src/rmodels.c b/src/rmodels.c
index 4bbceaf2..804b230f 100644
--- a/src/rmodels.c
+++ b/src/rmodels.c
@@ -1593,7 +1593,7 @@ void DrawMeshInstanced(Mesh mesh, Material material, const Matrix *transforms, i
// Enable mesh VAO to attach new buffer
rlEnableVertexArray(mesh.vaoId);
- // This could alternatively use a static VBO and either glMapBuffer() or glBufferSubData().
+ // This could alternatively use a static VBO and either glMapBuffer() or glBufferSubData()
// It isn't clear which would be reliably faster in all cases and on all platforms,
// anecdotally glMapBuffer() seems very slow (syncs) while glBufferSubData() seems
// no faster, since we're transferring all the transform matrices anyway
@@ -2695,7 +2695,7 @@ Mesh GenMeshCylinder(float radius, float height, int slices)
{
// Instance a cylinder that sits on the Z=0 plane using the given tessellation
// levels across the UV domain. Think of "slices" like a number of pizza
- // slices, and "stacks" like a number of stacked rings.
+ // slices, and "stacks" like a number of stacked rings
// Height and radius are both 1.0, but they can easily be changed with par_shapes_scale
par_shapes_mesh *cylinder = par_shapes_create_cylinder(slices, 8);
par_shapes_scale(cylinder, radius, radius, height);
@@ -2759,7 +2759,7 @@ Mesh GenMeshCone(float radius, float height, int slices)
{
// Instance a cone that sits on the Z=0 plane using the given tessellation
// levels across the UV domain. Think of "slices" like a number of pizza
- // slices, and "stacks" like a number of stacked rings.
+ // slices, and "stacks" like a number of stacked rings
// Height and radius are both 1.0, but they can easily be changed with par_shapes_scale
par_shapes_mesh *cone = par_shapes_create_cone(slices, 8);
par_shapes_scale(cone, radius, radius, height);
@@ -3813,7 +3813,7 @@ RayCollision GetRayCollisionBox(Ray ray, BoundingBox box)
RayCollision collision = { 0 };
// Note: If ray.position is inside the box, the distance is negative (as if the ray was reversed)
- // Reversing ray.direction will give use the correct result.
+ // Reversing ray.direction will give use the correct result
bool insideBox = (ray.position.x > box.min.x) && (ray.position.x < box.max.x) &&
(ray.position.y > box.min.y) && (ray.position.y < box.max.y) &&
(ray.position.z > box.min.z) && (ray.position.z < box.max.z);
@@ -5068,7 +5068,7 @@ static Model LoadGLTF(const char *fileName)
{
cgltf_accessor *attribute = data->meshes[i].primitives[p].attributes[j].data;
- // WARNING: SPECS: POSITION accessor MUST have its min and max properties defined.
+ // WARNING: SPECS: POSITION accessor MUST have its min and max properties defined
if ((attribute->component_type == cgltf_component_type_r_32f) && (attribute->type == cgltf_type_vec3))
{
@@ -5129,7 +5129,7 @@ static Model LoadGLTF(const char *fileName)
{
cgltf_accessor *attribute = data->meshes[i].primitives[p].attributes[j].data;
- // WARNING: SPECS: All components of each COLOR_n accessor element MUST be clamped to [0.0, 1.0] range.
+ // WARNING: SPECS: All components of each COLOR_n accessor element MUST be clamped to [0.0, 1.0] range
if ((attribute->component_type == cgltf_component_type_r_8u) && (attribute->type == cgltf_type_vec4))
{
@@ -5369,7 +5369,7 @@ static Model LoadGLTF(const char *fileName)
return model;
}
-// Get interpolated pose for bone sampler at a specific time. Returns true on success.
+// Get interpolated pose for bone sampler at a specific time. Returns true on success
static bool GetPoseAtTimeGLTF(cgltf_interpolation_type interpolationType, cgltf_accessor *input, cgltf_accessor *output, float time, void *data)
{
if (interpolationType >= cgltf_interpolation_type_max_enum) return false;
@@ -5833,7 +5833,7 @@ static Model LoadM3D(const char *fileName)
// We always need a default material, so we add +1
model.materialCount++;
- // Faces must be in non-decreasing materialid order. Verify that quickly, sorting them otherwise.
+ // Faces must be in non-decreasing materialid order. Verify that quickly, sorting them otherwise
// WARNING: Sorting is not needed, valid M3D model files should already be sorted
// Just keeping the sorting function for reference (Check PR #3363 #3385)
/*
@@ -5841,12 +5841,12 @@ static Model LoadM3D(const char *fileName)
{
if (m3d->face[i-1].materialid <= m3d->face[i].materialid) continue;
- // face[i-1] > face[i]. slide face[i] lower.
+ // face[i-1] > face[i]. slide face[i] lower
m3df_t slider = m3d->face[i];
j = i-1;
do
- { // face[j] > slider, face[j+1] is svailable vacant gap.
+ { // face[j] > slider, face[j+1] is svailable vacant gap
m3d->face[j+1] = m3d->face[j];
j = j-1;
}
@@ -6107,7 +6107,7 @@ static Model LoadM3D(const char *fileName)
}
// Load bone-pose default mesh into animation vertices. These will be updated when UpdateModelAnimation gets
- // called, but not before, however DrawMesh uses these if they exist (so not good if they are left empty).
+ // called, but not before, however DrawMesh uses these if they exist (so not good if they are left empty)
if (m3d->numbone && m3d->numskin)
{
for (i = 0; i < model.meshCount; i++)
diff --git a/src/rtext.c b/src/rtext.c
index 2ff6fd92..47f3e062 100644
--- a/src/rtext.c
+++ b/src/rtext.c
@@ -119,7 +119,7 @@
//----------------------------------------------------------------------------------
// Types and Structures Definition
//----------------------------------------------------------------------------------
-// ...
+//...
//----------------------------------------------------------------------------------
// Global variables
@@ -1077,7 +1077,7 @@ bool ExportFontAsCode(Font font, const char *fileName)
#endif
// We have two possible mechanisms to assign font.recs and font.glyphs data,
// that data is already available as global arrays, we two options to assign that data:
- // - 1. Data copy. This option consumes more memory and Font MUST be unloaded by user, requiring additional code.
+ // - 1. Data copy. This option consumes more memory and Font MUST be unloaded by user, requiring additional code
// - 2. Data assignment. This option consumes less memory and Font MUST NOT be unloaded by user because data is on protected DATA segment
//#define SUPPORT_FONT_DATA_COPY
#if defined(SUPPORT_FONT_DATA_COPY)
diff --git a/src/rtextures.c b/src/rtextures.c
index d47df762..35757ba1 100644
--- a/src/rtextures.c
+++ b/src/rtextures.c
@@ -920,8 +920,8 @@ Image GenImageColor(int width, int height, Color color)
#if defined(SUPPORT_IMAGE_GENERATION)
// Generate image: linear gradient
// The direction value specifies the direction of the gradient (in degrees)
-// with 0 being vertical (from top to bottom), 90 being horizontal (from left to right).
-// The gradient effectively rotates counter-clockwise by the specified amount.
+// with 0 being vertical (from top to bottom), 90 being horizontal (from left to right)
+// The gradient effectively rotates counter-clockwise by the specified amount
Image GenImageGradientLinear(int width, int height, int direction, Color start, Color end)
{
Color *pixels = (Color *)RL_MALLOC(width*height*sizeof(Color));
@@ -2152,7 +2152,7 @@ void ImageBlurGaussian(Image *image, int blurSize)
ImageFormat(image, format);
}
-// The kernel matrix is assumed to be square. Only supply the width of the kernel.
+// The kernel matrix is assumed to be square. Only supply the width of the kernel
void ImageKernelConvolution(Image *image, float* kernel, int kernelSize)
{
if ((image->data == NULL) || (image->width == 0) || (image->height == 0) || kernel == NULL) return;
@@ -4243,7 +4243,7 @@ void DrawTexturePro(Texture2D texture, Rectangle source, Rectangle dest, Vector2
// NOTE: Vertex position can be transformed using matrices
// but the process is way more costly than just calculating
- // the vertex positions manually, like done above.
+ // the vertex positions manually, like done above
// I leave here the old implementation for educational purposes,
// just in case someone wants to do some performance test
/*
diff --git a/src/utils.c b/src/utils.c
index 895f7777..fcbdba00 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -41,7 +41,7 @@
#if defined(PLATFORM_ANDROID)
#include <errno.h> // Required for: Android error types
#include <android/log.h> // Required for: Android log system: __android_log_vprint()
- #include <android/asset_manager.h> // Required for: Android assets manager: AAsset, AAssetManager_open(), ...
+ #include <android/asset_manager.h> // Required for: Android assets manager: AAsset, AAssetManager_open()...
#endif
#include <stdlib.h> // Required for: exit()