Fix call argument is an uninitialized value
This commit is contained in:
parent
df74607479
commit
9459186125
@ -10,7 +10,6 @@
|
|||||||
********************************************************************************************/
|
********************************************************************************************/
|
||||||
|
|
||||||
#include "raylib.h"
|
#include "raylib.h"
|
||||||
|
|
||||||
#include <stdlib.h> // Required for: malloc(), free()
|
#include <stdlib.h> // Required for: malloc(), free()
|
||||||
|
|
||||||
#define MAX_BUNNIES 100000 // 100K bunnies
|
#define MAX_BUNNIES 100000 // 100K bunnies
|
||||||
@ -33,6 +32,7 @@ int main()
|
|||||||
Texture2D texBunny = LoadTexture("resources/wabbit_alpha.png");
|
Texture2D texBunny = LoadTexture("resources/wabbit_alpha.png");
|
||||||
|
|
||||||
Bunny *bunnies = (Bunny *)malloc(MAX_BUNNIES*sizeof(Bunny)); // Bunnies array
|
Bunny *bunnies = (Bunny *)malloc(MAX_BUNNIES*sizeof(Bunny)); // Bunnies array
|
||||||
|
|
||||||
int bunniesCount = 0; // Bunnies counter
|
int bunniesCount = 0; // Bunnies counter
|
||||||
|
|
||||||
SetTargetFPS(60);
|
SetTargetFPS(60);
|
||||||
@ -72,7 +72,7 @@ int main()
|
|||||||
|
|
||||||
ClearBackground(RAYWHITE);
|
ClearBackground(RAYWHITE);
|
||||||
|
|
||||||
for (int i = 0; i <= bunniesCount; i++)
|
for (int i = 0; i < bunniesCount; i++)
|
||||||
{
|
{
|
||||||
// NOTE: When internal QUADS batch limit is reached, a draw call is launched and
|
// NOTE: When internal QUADS batch limit is reached, a draw call is launched and
|
||||||
// batching buffer starts being filled again; before launching the draw call,
|
// batching buffer starts being filled again; before launching the draw call,
|
||||||
@ -84,7 +84,6 @@ int main()
|
|||||||
DrawRectangle(0, 0, screenWidth, 40, LIGHTGRAY);
|
DrawRectangle(0, 0, screenWidth, 40, LIGHTGRAY);
|
||||||
DrawText("raylib bunnymark", 10, 10, 20, DARKGRAY);
|
DrawText("raylib bunnymark", 10, 10, 20, DARKGRAY);
|
||||||
DrawText(FormatText("bunnies: %i", bunniesCount), 400, 10, 20, RED);
|
DrawText(FormatText("bunnies: %i", bunniesCount), 400, 10, 20, RED);
|
||||||
|
|
||||||
DrawFPS(260, 10);
|
DrawFPS(260, 10);
|
||||||
|
|
||||||
EndDrawing();
|
EndDrawing();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user