diff --git a/game/constants.py b/game/constants.py index cfb3d87..a187442 100644 --- a/game/constants.py +++ b/game/constants.py @@ -41,4 +41,5 @@ ACTION_KEYS: Final = { } -WALL_CHAR: Final = ord('#') +WALL_CHAR: Final = ord('_') +VERTICAL_WALL_CHAR: Final = ord('|') diff --git a/game/screens/game_screens.py b/game/screens/game_screens.py index bbbfde1..778808e 100644 --- a/game/screens/game_screens.py +++ b/game/screens/game_screens.py @@ -14,7 +14,7 @@ from game.components import Action, Gold, Graphic, Position from game.constants import DIRECTION_KEYS, ACTION_KEYS from game.screens import Push, Screen, ScreenResult from game.tags import IsItem, IsPlayer, IsActor -from game.constants import WALL_CHAR +from game.constants import WALL_CHAR, VERTICAL_WALL_CHAR from game.screens import menu_screens from game.world_tools import world_pos_to_map_pos, map_pos_to_world_pos @@ -94,7 +94,9 @@ class MainScreen(Screen): for (y, row) in enumerate(map.walkable): for (x, val) in enumerate(row): pos = map_pos_to_world_pos(Position(x,y)) - draw(pos, Graphic(0) if val else Graphic(WALL_CHAR)) + graphic = Graphic(0) if val else\ + Graphic(WALL_CHAR) if map.walkable[y+1,x] else Graphic(VERTICAL_WALL_CHAR) + draw(pos, graphic) # draw all entities that are not actors for entity in g.world.Q.all_of(components=[Position, Graphic]).none_of(tags=[IsActor]): draw(entity.components[Position], entity.components[Graphic]) diff --git a/game/world_tools.py b/game/world_tools.py index c7d1837..f311f69 100644 --- a/game/world_tools.py +++ b/game/world_tools.py @@ -83,6 +83,6 @@ def new_world() -> Registry: def unlock_door(door: Entity): - door.components[Graphic] = Graphic(ord("_")) + door.components[Graphic] = Graphic(ord("/")) door.components.pop(Action) add_wall(g.world, door.components[Position], remove=True) diff --git a/main.py b/main.py index 335a5f3..e5bc6d0 100755 --- a/main.py +++ b/main.py @@ -15,11 +15,11 @@ from game.screens.menu_screens import MainMenu def main() -> None: """Entry point function.""" tileset = game.tilesetmanager.valid_tileset() - + #tcod.tileset.procedural_block_elements(tileset=tileset) g.screens = [MainMenu()] - g.console = tcod.console.Console(80, 50) + g.console = tcod.console.Console(80, 35) with tcod.context.new(console=g.console, tileset=tileset) as g.context: game.screens.main_loop()