#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>

#include <raylib.h>

#include "intro.h"
#include "game.h"

int main(int argc, char** argv) {
    InitWindow(800, 450, "Text Adventure");
    SetTargetFPS(60);

    if (!getenv("SKIP_INTRO") || strcmp(getenv("SKIP_INTRO"), "1") != 0) {
      display_loading();
      Intro *i = load_intro();
      intro_display(i);
    }

    Game *g = game_create();

    game_run_until_close(g);
    CloseWindow();

    free_game(g);
    return 0;
}
