summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorleo <leo@azuminha.com>2024-02-14 21:34:17 -0300
committerleo <leo@azuminha.com>2024-02-14 21:34:17 -0300
commit282c24f7f940b3b7e0caf76bd6e20d2993bf42b6 (patch)
tree6637a4cf3ae144cf7d172d8df6ca95fd6bb34368 /main.c
donut rodando, falta adicionar sombra
Diffstat (limited to 'main.c')
-rw-r--r--main.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/main.c b/main.c
new file mode 100644
index 0000000..cadbf42
--- /dev/null
+++ b/main.c
@@ -0,0 +1,31 @@
+#include <raylib.h>
+#include "donut.h"
+
+int main(){
+ const int screenWidth = SCREEN_WIDTH;
+ const int screenHeight = SCREEN_HEIGHT;
+
+ InitWindow(screenWidth, screenHeight, "donut");
+ SetTargetFPS(60);
+
+ point2d p1 = {0, 0};
+ p1 = map(p1);
+ point2d p2 = (point2d){0.5, 0.5};
+ p2 = map(p2);
+ debug_printp2(p1);
+ debug_printp2(p2);
+ while(!WindowShouldClose()){
+
+ BeginDrawing();
+ ClearBackground(BLACK);
+ DrawText("DONUT", 0, 0, 16, WHITE);
+
+ //draw line 0 0 0.5 0.5
+ DrawLine(p1.x, p1.y, p2.x, p2.y, RED);
+ draw_circle((point2d){0.50, 0.0}, 0.25);
+ EndDrawing();
+ }
+
+ CloseWindow();
+ return 0;
+} \ No newline at end of file