REVIEWED: Examples section comments, for better organization and consistency
This commit is contained in:
parent
1fa3c15942
commit
c579eef4b7
19 changed files with 253 additions and 170 deletions
|
|
@ -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
|
||||
//------------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -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),
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue