Now have a working compass based directional player sprite in the map, but using the compass isn't going to work long term. Need to move that into the raycaster.cpp and get real degrees for facing direction.
This commit is contained in:
parent
3b81959aa9
commit
aa72cfe4a4
9 changed files with 70 additions and 61 deletions
|
@ -27,6 +27,8 @@ namespace gui {
|
|||
$map_sprite($map_render->getTexture()),
|
||||
$map_tiles(matrix::make(map_width, map_height))
|
||||
{
|
||||
auto player = $level.world->get_the<Player>();
|
||||
$player_display = $level.world->get<Tile>(player.entity).display;
|
||||
}
|
||||
|
||||
void MapViewUI::update_level(GameLevel &level) {
|
||||
|
@ -60,8 +62,8 @@ namespace gui {
|
|||
void MapViewUI::render(sf::RenderWindow &window, int compass_dir) {
|
||||
$gui.render(window);
|
||||
|
||||
System::draw_map($level, $map_tiles, $entity_map, compass_dir);
|
||||
System::render_map($map_tiles, $entity_map, *$map_render);
|
||||
System::draw_map($level, $map_tiles, $entity_map);
|
||||
System::render_map($map_tiles, $entity_map, *$map_render, compass_dir, $player_display);
|
||||
$map_sprite.setTexture($map_render->getTexture(), true);
|
||||
window.draw($map_sprite);
|
||||
// $gui.debug_layout(window);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue