36 lines
809 B
C
36 lines
809 B
C
#include <raylib.h>
|
|
|
|
int main() {
|
|
const int width = 800;
|
|
const int height = 600;
|
|
InitWindow(width, height, "naive");
|
|
|
|
const int size = 5000;
|
|
Vector2 data[size];
|
|
for(int i = 0; i < size; i++) {
|
|
data[i] = (Vector2){ GetRandomValue(0, 800), GetRandomValue(0, 600) };
|
|
}
|
|
|
|
while(!WindowShouldClose()) {
|
|
BeginDrawing();
|
|
{
|
|
ClearBackground(BLACK);
|
|
|
|
for(int i = 0; i < size; i++) {
|
|
if(CheckCollisionCircles(GetMousePosition(), 1.0f, data[i], 5.0f)) {
|
|
DrawCircleV(data[i], 5.0f, GREEN);
|
|
} else {
|
|
DrawCircleV(data[i], 5.0f, WHITE);
|
|
}
|
|
}
|
|
|
|
DrawFPS(10, 10);
|
|
}
|
|
EndDrawing();
|
|
}
|
|
|
|
CloseWindow();
|
|
|
|
return 0;
|
|
}
|