mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-25 10:22:33 -05:00
Review variables initialization
This commit is contained in:
@ -26,9 +26,9 @@ int main(void)
|
||||
Texture2D midground = LoadTexture("resources/cyberpunk_street_midground.png");
|
||||
Texture2D foreground = LoadTexture("resources/cyberpunk_street_foreground.png");
|
||||
|
||||
float scrollingBack = 0;
|
||||
float scrollingMid = 0;
|
||||
float scrollingFore = 0;
|
||||
float scrollingBack = 0.0f;
|
||||
float scrollingMid = 0.0f;
|
||||
float scrollingFore = 0.0f;
|
||||
|
||||
SetTargetFPS(60); // Set our game to run at 60 frames-per-second
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
||||
@ -30,7 +30,8 @@ int main(void)
|
||||
Image perlinNoise = GenImagePerlinNoise(screenWidth, screenHeight, 50, 50, 4.0f);
|
||||
Image cellular = GenImageCellular(screenWidth, screenHeight, 32);
|
||||
|
||||
Texture2D textures[NUM_TEXTURES];
|
||||
Texture2D textures[NUM_TEXTURES] = { 0 };
|
||||
|
||||
textures[0] = LoadTextureFromImage(verticalGradient);
|
||||
textures[1] = LoadTextureFromImage(horizontalGradient);
|
||||
textures[2] = LoadTextureFromImage(radialGradient);
|
||||
|
||||
@ -57,7 +57,7 @@ int main(void)
|
||||
int currentProcess = NONE;
|
||||
bool textureReload = false;
|
||||
|
||||
Rectangle selectRecs[NUM_PROCESSES];
|
||||
Rectangle selectRecs[NUM_PROCESSES] = { 0 };
|
||||
|
||||
for (int i = 0; i < NUM_PROCESSES; i++) selectRecs[i] = (Rectangle){ 40.0f, (float)(50 + 32*i), 150.0f, 30.0f };
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ int main(void)
|
||||
InitWindow(screenWidth, screenHeight, "raylib [textures] example - particles blending");
|
||||
|
||||
// Particles pool, reuse them!
|
||||
Particle mouseTail[MAX_PARTICLES];
|
||||
Particle mouseTail[MAX_PARTICLES] = { 0 };
|
||||
|
||||
// Initialize particles
|
||||
for (int i = 0; i < MAX_PARTICLES; i++)
|
||||
|
||||
@ -31,7 +31,7 @@ int main(void)
|
||||
Texture2D fudesumi = LoadTextureFromImage(fudesumiRaw); // Upload CPU (RAM) image to GPU (VRAM)
|
||||
UnloadImage(fudesumiRaw); // Unload CPU (RAM) image data
|
||||
|
||||
// Generate a checked texture by code (1024x1024 pixels)
|
||||
// Generate a checked texture by code
|
||||
int width = 960;
|
||||
int height = 480;
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ int main(void)
|
||||
int currentLine = 0;
|
||||
|
||||
Rectangle frameRec = { 0, 0, frameWidth, frameHeight };
|
||||
Vector2 position = { 0, 0 };
|
||||
Vector2 position = { 0.0f, 0.0f };
|
||||
|
||||
bool active = false;
|
||||
int framesCounter = 0;
|
||||
|
||||
Reference in New Issue
Block a user