mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-27 05:28:30 +00:00
REVIEWED: <name>Count for consistency
Following english rules, it should be singular name before Count.
This commit is contained in:
46
src/core.c
46
src/core.c
@@ -385,7 +385,7 @@ typedef struct CoreData {
|
||||
Matrix screenScale; // Matrix to scale screen (framebuffer rendering)
|
||||
|
||||
char **dropFilesPath; // Store dropped files paths as strings
|
||||
int dropFilesCount; // Count dropped files strings
|
||||
int dropFileCount; // Count dropped files strings
|
||||
|
||||
} Window;
|
||||
#if defined(PLATFORM_ANDROID)
|
||||
@@ -411,7 +411,7 @@ typedef struct CoreData {
|
||||
int keyPressedQueue[MAX_KEY_PRESSED_QUEUE]; // Input keys queue
|
||||
int keyPressedQueueCount; // Input keys queue count
|
||||
|
||||
int charPressedQueue[MAX_CHAR_PRESSED_QUEUE]; // Input characters queue
|
||||
int charPressedQueue[MAX_CHAR_PRESSED_QUEUE]; // Input characters queue (unicode)
|
||||
int charPressedQueueCount; // Input characters queue count
|
||||
|
||||
#if defined(PLATFORM_RPI) || defined(PLATFORM_DRM)
|
||||
@@ -481,14 +481,14 @@ typedef struct CoreData {
|
||||
static CoreData CORE = { 0 }; // Global CORE state context
|
||||
|
||||
static char **dirFilesPath = NULL; // Store directory files paths as strings
|
||||
static int dirFilesCount = 0; // Count directory files strings
|
||||
static int dirFileCount = 0; // Count directory files strings
|
||||
|
||||
#if defined(SUPPORT_SCREEN_CAPTURE)
|
||||
static int screenshotCounter = 0; // Screenshots counter
|
||||
#endif
|
||||
|
||||
#if defined(SUPPORT_GIF_RECORDING)
|
||||
static int gifFramesCounter = 0; // GIF frames counter
|
||||
static int gifFrameCounter = 0; // GIF frames counter
|
||||
static bool gifRecording = false; // GIF recording state
|
||||
static MsfGifState gifState = { 0 }; // MSGIF context state
|
||||
#endif
|
||||
@@ -1926,10 +1926,10 @@ void EndDrawing(void)
|
||||
if (gifRecording)
|
||||
{
|
||||
#define GIF_RECORD_FRAMERATE 10
|
||||
gifFramesCounter++;
|
||||
gifFrameCounter++;
|
||||
|
||||
// NOTE: We record one gif frame every 10 game frames
|
||||
if ((gifFramesCounter%GIF_RECORD_FRAMERATE) == 0)
|
||||
if ((gifFrameCounter%GIF_RECORD_FRAMERATE) == 0)
|
||||
{
|
||||
// Get image data for the current frame (from backbuffer)
|
||||
// NOTE: This process is quite slow... :(
|
||||
@@ -1939,7 +1939,7 @@ void EndDrawing(void)
|
||||
RL_FREE(screenData); // Free image data
|
||||
}
|
||||
|
||||
if (((gifFramesCounter/15)%2) == 1)
|
||||
if (((gifFrameCounter/15)%2) == 1)
|
||||
{
|
||||
DrawCircle(30, CORE.Window.screen.height - 20, 10, MAROON);
|
||||
DrawText("GIF RECORDING", 50, CORE.Window.screen.height - 25, 10, RED);
|
||||
@@ -1953,9 +1953,9 @@ void EndDrawing(void)
|
||||
// Draw record/play indicator
|
||||
if (eventsRecording)
|
||||
{
|
||||
gifFramesCounter++;
|
||||
gifFrameCounter++;
|
||||
|
||||
if (((gifFramesCounter/15)%2) == 1)
|
||||
if (((gifFrameCounter/15)%2) == 1)
|
||||
{
|
||||
DrawCircle(30, CORE.Window.screen.height - 20, 10, MAROON);
|
||||
DrawText("EVENTS RECORDING", 50, CORE.Window.screen.height - 25, 10, RED);
|
||||
@@ -1965,9 +1965,9 @@ void EndDrawing(void)
|
||||
}
|
||||
else if (eventsPlaying)
|
||||
{
|
||||
gifFramesCounter++;
|
||||
gifFrameCounter++;
|
||||
|
||||
if (((gifFramesCounter/15)%2) == 1)
|
||||
if (((gifFrameCounter/15)%2) == 1)
|
||||
{
|
||||
DrawCircle(30, CORE.Window.screen.height - 20, 10, LIME);
|
||||
DrawText("EVENTS PLAYING", 50, CORE.Window.screen.height - 25, 10, GREEN);
|
||||
@@ -2895,8 +2895,8 @@ char **GetDirectoryFiles(const char *dirPath, int *fileCount)
|
||||
}
|
||||
else TRACELOG(LOG_WARNING, "FILEIO: Failed to open requested directory"); // Maybe it's a file...
|
||||
|
||||
dirFilesCount = counter;
|
||||
*fileCount = dirFilesCount;
|
||||
dirFileCount = counter;
|
||||
*fileCount = dirFileCount;
|
||||
|
||||
return dirFilesPath;
|
||||
}
|
||||
@@ -2904,14 +2904,14 @@ char **GetDirectoryFiles(const char *dirPath, int *fileCount)
|
||||
// Clear directory files paths buffers
|
||||
void ClearDirectoryFiles(void)
|
||||
{
|
||||
if (dirFilesCount > 0)
|
||||
if (dirFileCount > 0)
|
||||
{
|
||||
for (int i = 0; i < MAX_DIRECTORY_FILES; i++) RL_FREE(dirFilesPath[i]);
|
||||
|
||||
RL_FREE(dirFilesPath);
|
||||
}
|
||||
|
||||
dirFilesCount = 0;
|
||||
dirFileCount = 0;
|
||||
}
|
||||
|
||||
// Change working directory, returns true on success
|
||||
@@ -2927,27 +2927,27 @@ bool ChangeDirectory(const char *dir)
|
||||
// Check if a file has been dropped into window
|
||||
bool IsFileDropped(void)
|
||||
{
|
||||
if (CORE.Window.dropFilesCount > 0) return true;
|
||||
if (CORE.Window.dropFileCount > 0) return true;
|
||||
else return false;
|
||||
}
|
||||
|
||||
// Get dropped files names
|
||||
char **GetDroppedFiles(int *count)
|
||||
{
|
||||
*count = CORE.Window.dropFilesCount;
|
||||
*count = CORE.Window.dropFileCount;
|
||||
return CORE.Window.dropFilesPath;
|
||||
}
|
||||
|
||||
// Clear dropped files paths buffer
|
||||
void ClearDroppedFiles(void)
|
||||
{
|
||||
if (CORE.Window.dropFilesCount > 0)
|
||||
if (CORE.Window.dropFileCount > 0)
|
||||
{
|
||||
for (int i = 0; i < CORE.Window.dropFilesCount; i++) RL_FREE(CORE.Window.dropFilesPath[i]);
|
||||
for (int i = 0; i < CORE.Window.dropFileCount; i++) RL_FREE(CORE.Window.dropFilesPath[i]);
|
||||
|
||||
RL_FREE(CORE.Window.dropFilesPath);
|
||||
|
||||
CORE.Window.dropFilesCount = 0;
|
||||
CORE.Window.dropFileCount = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4922,7 +4922,7 @@ static void KeyCallback(GLFWwindow *window, int key, int scancode, int action, i
|
||||
else
|
||||
{
|
||||
gifRecording = true;
|
||||
gifFramesCounter = 0;
|
||||
gifFrameCounter = 0;
|
||||
|
||||
msf_gif_begin(&gifState, CORE.Window.screen.width, CORE.Window.screen.height);
|
||||
screenshotCounter++;
|
||||
@@ -5085,7 +5085,7 @@ static void WindowDropCallback(GLFWwindow *window, int count, const char **paths
|
||||
strcpy(CORE.Window.dropFilesPath[i], paths[i]);
|
||||
}
|
||||
|
||||
CORE.Window.dropFilesCount = count;
|
||||
CORE.Window.dropFileCount = count;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5145,7 +5145,7 @@ static void AndroidCommandCallback(struct android_app *app, int32_t cmd)
|
||||
/*
|
||||
if (assetsReloadRequired)
|
||||
{
|
||||
for (int i = 0; i < assetsCount; i++)
|
||||
for (int i = 0; i < assetCount; i++)
|
||||
{
|
||||
// TODO: Unload old asset if required
|
||||
|
||||
|
Reference in New Issue
Block a user