sdl rendering progress?

This commit is contained in:
Lukas Nöllemeyer 2024-08-19 18:17:25 +02:00
parent 467c6606da
commit af941dc848
5 changed files with 22 additions and 13 deletions

View file

@ -5,6 +5,7 @@ from __future__ import annotations
import tcod.console
import tcod.context
import tcod.constants
import tcod.render
import tcod.tileset
import tcod.sdl.video
@ -23,6 +24,7 @@ def main() -> None:
g.screens = [MainMenu()]
g.background = tcod.console.Console(80, 35)
g.foreground = tcod.console.Console(80, 35)
win = tcod.sdl.video.new_window(
g.background.width * g.tileset.tile_width,
g.background.height * g.tileset.tile_height,
@ -36,7 +38,8 @@ def main() -> None:
g.atlas = tcod.render.SDLTilesetAtlas(g.sdl_renderer, g.tileset)
g.console_render = tcod.render.SDLConsoleRender(atlas=g.atlas)
g.console_render1 = tcod.render.SDLConsoleRender(atlas=g.atlas)
g.console_render2 = tcod.render.SDLConsoleRender(atlas=g.atlas)
game.screens.main_loop()