From 1e7ec08dc9c62df43940d00c1fae4a6e54464b86 Mon Sep 17 00:00:00 2001 From: physick Date: Sun, 30 Aug 2026 16:14:59 +0500 Subject: puzzle collection rewrite --- src/main.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 4093b2e..771f165 100644 --- a/src/main.c +++ b/src/main.c @@ -4,6 +4,12 @@ #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); @@ -21,15 +27,15 @@ int main(void) { return 1; } - // if (!AddScene(CreatePuzzleCollectionScene("puzzles"))) { - // printf("Failed to create a collection scene\n"); - // return 1; - // } - - if (!AddScene(CreatePuzzleScene(puzzle))) { - printf("Failed to create a puzzle menu\n"); + if (!AddScene(CreatePuzzleCollectionScene("puzzles", &el))) { + printf("Failed to create a collection scene\n"); return 1; } + + // if (!AddScene(CreatePuzzleScene(puzzle))) { + // printf("Failed to create a puzzle menu\n"); + // return 1; + // } SetConfigFlags(FLAG_WINDOW_RESIZABLE); InitWindow(800, 600, "Programming game"); -- cgit v1.3