moved render stuff

This commit is contained in:
Lukas Nöllemeyer 2024-08-19 21:30:29 +02:00
parent 733c6ec30e
commit 5b2a68ff2c
6 changed files with 109 additions and 100 deletions

41
g.py
View file

@ -2,47 +2,20 @@
from __future__ import annotations
import tcod.console
import tcod.context
import tcod.ecs
import tcod.sdl.video
import tcod.tileset
import tcod.sdl.render
import tcod.render
from tcod.context import Context
from tcod.ecs import Registry
from game.screens import Screen
from game.components import Position
from game.render import Renderer
context: tcod.context.Context
context: Context
"""The window managed by tcod."""
world: tcod.ecs.Registry
world: Registry
"""The active ECS registry and current session."""
screens: list[Screen] = []
"""A stack of states with the last item being the active state."""
foreground: tcod.console.Console
"""The foreground console"""
background: tcod.console.Console
"""The background console"""
tileset: tcod.tileset.Tileset
"""The tileset to use"""
sdl_window: tcod.sdl.video.Window
"""The SDL window"""
sdl_renderer: tcod.sdl.render.Renderer
"""The SDL renderer"""
target_texture: tcod.sdl.render.Texture
"""The final texture that is rendered"""
atlas: tcod.render.SDLTilesetAtlas
"""The tileset atlas"""
console_render1: tcod.render.SDLConsoleRender
console_render2: tcod.render.SDLConsoleRender
"""The console renderer"""
renderer: Renderer
"""Renderer for the game"""