33 lines
527 B
C++
33 lines
527 B
C++
#include "raylib.h"
|
|
#include "Tree.hpp"
|
|
|
|
const int screenWidth = 800;
|
|
const int screenHeight = 800;
|
|
|
|
int main(void)
|
|
{
|
|
InitWindow(screenWidth, screenHeight, "raylib");
|
|
|
|
SetTargetFPS(60);
|
|
{
|
|
Tree tre(800);
|
|
tre.new_tree();
|
|
|
|
Rectangle dest = {0, 0, screenWidth, screenHeight};
|
|
|
|
while (!WindowShouldClose())
|
|
{
|
|
|
|
if (IsMouseButtonPressed(MOUSE_BUTTON_LEFT))
|
|
{
|
|
tre.new_tree();
|
|
}
|
|
|
|
BeginDrawing();
|
|
tre.Draw(dest);
|
|
EndDrawing();
|
|
}
|
|
}
|
|
CloseWindow();
|
|
return 0;
|
|
} |