Project Setup

This commit is contained in:
n0ffie 2025-02-05 13:31:26 +01:00
parent 8a9d8b1ece
commit 9504620227
13 changed files with 125329 additions and 69 deletions

27
src/main.c Normal file
View file

@ -0,0 +1,27 @@
#include <colysis.h>
int main(int argc, char *argv[]) {
SetTargetFPS(60);
InitWindow(900, 500, "Colysis");
ecs_world_t *world = ecs_init();
ecs_entity_t ray = ecs_entity(world, { .name = "raysan5" });
puts(ecs_get_name(world, ray));
Texture2D logo = LoadTexture("assets/Raylib_logo.png");
while (!WindowShouldClose()) {
BeginDrawing();
DrawTexture(logo, GetScreenWidth() / 2 - logo.width / 2, GetScreenHeight() / 2 - logo.height / 2, WHITE);
DrawText(ecs_get_name(world, ray), GetScreenWidth() / 2 - 25 * 3.5f, GetScreenHeight() - 50, 50, BLACK);
ClearBackground(RAYWHITE);
EndDrawing();
}
UnloadTexture(logo);
CloseWindow();
return ecs_fini(world);
}