Renderer of ANSI codes to SFML is now working. Does seem to be a little slow but that'll be easy to fix later.
This commit is contained in:
parent
ae484bf425
commit
a36b187879
8 changed files with 96 additions and 62 deletions
|
@ -87,10 +87,10 @@ void SFMLRender::draw_screen(bool clear, float map_off_x, float map_off_y) {
|
|||
// make a copy so we don't modify the cached one
|
||||
auto bg_sprite = get_text_sprite(L'█');
|
||||
auto bg_bounds = bg_sprite.getLocalBounds();
|
||||
sf::Color def_fg(color(Value::LIGHT_LIGHT));
|
||||
sf::Color def_fg(color(Value::MID));
|
||||
sf::Color def_bg(color(Value::BLACK));
|
||||
|
||||
parse_ansi(map_screenout, def_fg, def_bg, [&](sf::Color bg, sf::Color fg, char tile) {
|
||||
parse_ansi(map_screen_utf8, def_fg, def_bg, [&](sf::Color bg, sf::Color fg, wchar_t tile) {
|
||||
if(tile == '\n') {
|
||||
// don't bother processing newlines, just skip
|
||||
y += $line_spacing;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue