#include #include "display.h" static dspl_createinfo info; void dspl_create(dspl_createinfo createinfo) { info = createinfo; } void dspl_start() { InitWindow(info.width, info.height, info.name); SetTargetFPS(info.fps); while(!WindowShouldClose()) { BeginDrawing(); ClearBackground(RAYWHITE); DrawFPS(10, 10); info.update_func(); EndDrawing(); } } void dspl_destroy() { CloseWindow(); } void dspl_draw_circle(int cx, int cy, int r) { int offsetx = (info.width/2); int offsety = (info.height/4); DrawCircle(offsetx + cx, offsety + cy, r, RED); } void dspl_draw_line(int x1, int y1, int x2, int y2, int c) { int offsetx = (info.width/2); int offsety = (info.height/4); DrawLine(offsetx + x1, offsety + y1, offsetx + x2, offsety + y2 , (c == 0) ? BLUE : RED); }