A bit more cleanup of render but kind of stuck on what to do further.

main
Zed A. Shaw 3 days ago
parent 7cb03594a3
commit c8fa68815b
  1. 11
      render.cpp
  2. 1
      status.txt

@ -122,13 +122,15 @@ void SFMLRender::render_grid(const std::wstring &text, float x, float y) {
}, },
[&](wchar_t tile) { [&](wchar_t tile) {
if(tile == '\n') { switch(tile) {
case '\r': break; // ignore it
case '\n': {
// don't bother processing newlines, just skip // don't bother processing newlines, just skip
y += $line_spacing; y += $line_spacing;
x = start_x; x = start_x;
} else if(tile == L'\r') { }
return; // skip these, just windows junk break;
} else { default: {
$bg_sprite.setPosition({x, y}); $bg_sprite.setPosition({x, y});
// only get a new sprite if the tile changed // only get a new sprite if the tile changed
@ -146,6 +148,7 @@ void SFMLRender::render_grid(const std::wstring &text, float x, float y) {
// next cell // next cell
x += $base_glyph.advance; x += $base_glyph.advance;
} }
}
}); });
} }

@ -1,6 +1,5 @@
TODAY'S GOAL: TODAY'S GOAL:
* Clean up renderer.
* panels and everything except renderer should use character coodinates * panels and everything except renderer should use character coodinates
* Image -> Text converter. * Image -> Text converter.

Loading…
Cancel
Save