Totally a pile of garbage with a bunch of debug prints because I'm going to have to rewrite the renderer resizing to allow for any size image, not just the map. But this does display an image using averaged squares.
This commit is contained in:
parent
3bb3b654e7
commit
19b8bf1850
7 changed files with 262 additions and 98 deletions
|
@ -67,6 +67,10 @@ using namespace fmt;
|
|||
color = sf::Color(100,100,100);
|
||||
color_cb(color, bgcolor);
|
||||
}
|
||||
action red_text {
|
||||
color = sf::Color::Red;
|
||||
color_cb(color, bgcolor);
|
||||
}
|
||||
|
||||
action red { target.r = value; }
|
||||
action blue { target.g = value; }
|
||||
|
@ -96,6 +100,7 @@ using namespace fmt;
|
|||
"5" |
|
||||
"6" |
|
||||
"7" %invert |
|
||||
"31" %red_text |
|
||||
"22" |
|
||||
"27" %reset_invert |
|
||||
"9" ["0"-"7"] |
|
||||
|
@ -137,14 +142,18 @@ bool ANSIParser::parse(std::wstring_view codes, ColorCB color_cb, WriteCB write_
|
|||
%% write init;
|
||||
%% write exec;
|
||||
|
||||
bool good = p - pe == 0;
|
||||
bool good = pe - p == 0;
|
||||
|
||||
if(!good) {
|
||||
println("FAIL AT {}", p - pe);
|
||||
println("FAIL AT {}", pe - p);
|
||||
p -= 10;
|
||||
// dear cthuhlu, save me from the pain that is wstring
|
||||
for(int i = 0; i < 100; i++) {
|
||||
print("{}", char(p[i]));
|
||||
try {
|
||||
print("{}", p[i] == 0x1B ? '^' : char(p[i]));
|
||||
} catch(...) {
|
||||
print("?=", int(p[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue