REVIEWED: Examples section comments, for better organization and consistency

This commit is contained in:
Ray
2025-09-03 10:40:31 +02:00
parent 1fa3c15942
commit c579eef4b7
19 changed files with 253 additions and 170 deletions

View File

@ -24,6 +24,9 @@
#define MAX_ENVIRONMENT_ELEMENTS 5
//----------------------------------------------------------------------------------
// Types and Structures Definition
//----------------------------------------------------------------------------------
typedef struct Player {
Vector2 position;
float speed;
@ -36,7 +39,6 @@ typedef struct EnvElement {
Color color;
} EnvElement;
//------------------------------------------------------------------------------------
// Program main entry point
//------------------------------------------------------------------------------------

View File

@ -31,7 +31,7 @@ typedef struct ColorRect {
//------------------------------------------------------------------------------------
// Module Functions Declaration
//------------------------------------------------------------------------------------
static Color GenerateRandomColor();
static Color GenerateRandomColor(void);
static ColorRect *GenerateRandomColorRectSequence(float rectCount, float rectWidth, float screenWidth, float screenHeight);
static void ShuffleColorRectSequence(ColorRect *rectangles, int rectCount);
@ -122,7 +122,7 @@ int main(void)
//------------------------------------------------------------------------------------
// Module Functions Definition
//------------------------------------------------------------------------------------
static Color GenerateRandomColor()
static Color GenerateRandomColor(void)
{
Color color = {
GetRandomValue(0, 255),

View File

@ -25,7 +25,9 @@ typedef enum {
STORAGE_POSITION_HISCORE = 1
} StorageData;
// Persistent storage functions
//------------------------------------------------------------------------------------
// Module Functions Declaration
//------------------------------------------------------------------------------------
static bool SaveStorageValue(unsigned int position, int value);
static int LoadStorageValue(unsigned int position);
@ -101,6 +103,9 @@ int main(void)
return 0;
}
//------------------------------------------------------------------------------------
// Module Functions Declaration
//------------------------------------------------------------------------------------
// Save integer value to storage file (to defined position)
// NOTE: Storage positions is directly related to file memory layout (4 bytes each integer)
bool SaveStorageValue(unsigned int position, int value)