1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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;
}
|