#include #include #include #include "scenes/scenes.h" #include "resources/resources.h" int main(void) { CollectionElement el = { .path = "puzzles", .type = COLLECTION_ELEMENT_COLLECTION, .IsInitialized = false, }; Puzzle *puzzle = ReadPuzzleFromFile("puzzles/test.pz"); PrintPuzzle(puzzle); SetConfigFlags(FLAG_WINDOW_RESIZABLE); InitWindow(800, 600, "Programming game"); LoadResources(); if (!ReadConfig(DEFAULT_CONFIG_LOCATION)) { return 1; } if (!InitSceneStack()) { printf("Failed to create a scene stack\n"); return 1; } if (!AddScene(CreateMainMenu())) { printf("Failed to create a main menu\n"); return 1; } if (!AddScene(CreatePuzzleCollectionScene(&el, true))) { printf("Failed to create a collection scene\n"); return 1; } // if (!AddScene(CreatePuzzleScene(puzzle))) { // printf("Failed to create a puzzle menu\n"); // return 1; // } SetExitKey(KEY_NULL); SetTargetFPS(60); while (!WindowShouldClose()) { UpdateScene(); BeginDrawing(); DrawScene(); DrawFPS(0, 0); #ifdef BUILD_VERSION DrawText(BUILD_VERSION, 0, GetScreenHeight() - 20, 20, COLORSCHEME_BROWN); #endif // BUILD_VERSION EndDrawing(); } CloseWindow(); return 0; }