#!/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.constants import tcod.render import tcod.tileset import tcod.sdl.video import tcod.sdl.render import g import game.tilesetmanager import game.screens from game.screens.menu_screens import MainMenu def main() -> None: """Entry point function.""" g.tileset = game.tilesetmanager.valid_tileset() #tcod.tileset.procedural_block_elements(tileset=tileset) g.screens = [MainMenu()] g.background = tcod.console.Console(80, 35) g.foreground = tcod.console.Console(80, 35) w, h = g.background.width * g.tileset.tile_width, g.background.height * g.tileset.tile_height win = tcod.sdl.video.new_window(w,h, flags=tcod.lib.SDL_WINDOW_RESIZABLE) g.sdl_window = win g.sdl_renderer = tcod.sdl.render.new_renderer(g.sdl_window, target_textures=True) g.target_texture = g.sdl_renderer.new_texture(w, h, access=tcod.sdl.render.TextureAccess.TARGET) g.atlas = tcod.render.SDLTilesetAtlas(g.sdl_renderer, g.tileset) g.console_render1 = tcod.render.SDLConsoleRender(atlas=g.atlas) g.console_render2 = tcod.render.SDLConsoleRender(atlas=g.atlas) game.screens.main_loop() if __name__ == "__main__": main()