#!/usr/bin/env python3
"""Main entry-point module. This script is used to start the program."""

from __future__ import annotations

import tcod.console
import tcod.context
import tcod.tileset

import g

import game.screens
from game.screens.menu_screens import MainMenu

def main() -> None:
    """Entry point function."""
    tileset = tcod.tileset.load_tilesheet(
        "data/Bmac_smooth_16x24.png", columns=16, rows=16, charmap=tcod.tileset.CHARMAP_CP437
        # "Oryx/oryx_roguelike_2.0/V1/oryx_roguelike_16x24_only_heroes.png", columns=19, rows=10, charmap=tcod.tileset.CHARMAP_CP437
    )
    tileset2 = tcod.tileset.load_tilesheet(
        "Oryx/oryx_roguelike_2.0/Monsters.png", columns=19, rows=26, charmap=tcod.tileset.CHARMAP_CP437
    )
    tileset.set_tile(64, tileset2.get_tile(0))
    #tcod.tileset.procedural_block_elements(tileset=tileset)
    g.screens = [MainMenu()]

    g.console = tcod.console.Console(80, 50)
    with tcod.context.new(console=g.console, tileset=tileset) as g.context:
        game.screens.main_loop()


if __name__ == "__main__":
    main()
