added FOV

This commit is contained in:
Lukas Nöllemeyer 2024-08-17 12:09:19 +02:00
parent 1b5d512a4b
commit 0a0ff2d1ed
2 changed files with 24 additions and 5 deletions

View file

@ -12,6 +12,12 @@ from tcod.map import Map
from game.components import Gold, Graphic, Position
from game.tags import IsActor, IsItem, IsPlayer, IsDoor
def world_pos_to_map_pos(pos):
return pos+g.world_center
def map_pos_to_world_pos(pos):
return pos-g.world_center
def add_wall(world, pos, remove=False):
r_pos = g.world_center + pos
map = world[None].components[Map]