#include #include "level.h" #include "raylib.h" int main() { SetConfigFlags(FLAG_WINDOW_RESIZABLE); InitWindow(800, 600, "sillyeditor"); SetTargetFPS(60); int gridSize = 32; Level *level = SE_CreateLevel(30, 30); // creating a dummy side Side *side = malloc(sizeof(Side)); side->a = (Point){1, 1}; side->b = (Point){3, 4}; level->sides[0] = side; while (!WindowShouldClose()) { BeginDrawing(); ClearBackground(RAYWHITE); DrawText("hi world!", GetScreenWidth() / 2 - 16 * 4, GetScreenHeight() / 2 - 16, 32, BLACK); SE_RenderLevel(level, gridSize); // Drawing grid for (int x = 0; x <= level->width; x++) { DrawLine(x * gridSize, 0, x * gridSize, GetScreenHeight(), LIGHTGRAY); } for (int y = 0; y <= level->height; y++) { DrawLine(0, y * gridSize, GetScreenWidth(), y * gridSize, LIGHTGRAY); } EndDrawing(); } SE_FreeLevel(level); return 0; }