Closed cognitivegears closed 10 months ago
Here is the code from the PabloDraw source base:
void GetRgbColourChanges (StringBuilder sb, bool force, Attribute attr, Attribute standardAttr)
{
if (force || lastRgbAttr.Background != attr.Background) {
var col = palette [attr.Background];
var standardCol = standardPalette [standardAttr.Background];
if (col != standardCol || lastRgbAttr.Background != -1)
{
sb.AppendFormat("\x1b[0;{0};{1};{2}t", (byte)(col.R * 255), (byte)(col.G * 255), (byte)(col.B * 255));
lastRgbAttr.Background = attr.Background;
}
}
if (force || lastRgbAttr.Foreground != attr.Foreground) {
var col = palette [attr.Foreground];
var standardCol = standardPalette [standardAttr.Foreground];
if (col != standardCol || lastRgbAttr.Foreground != -1)
{
sb.AppendFormat("\x1b[1;{0};{1};{2}t", (byte)(col.R * 255), (byte)(col.G * 255), (byte)(col.B * 255));
lastRgbAttr.Foreground = attr.Foreground;
}
}
}
This should be fixed with PR #495
Nice work!
Describe the Bug ANSI art drawn with PabloDraw (at least version 3.3.12.0) is not compatible with Enigma. The reason is an unknown control sequence added by Pablo, "ESC [ #;#;#;#t (where # is various numbers). Since the regex doesn't catch this sequence, it treats it as literals and outputs it, but counts it as columns, throwing off all further processing for MCI codes etc.
To Reproduce Save an art file with PabloDraw that includes at least one MCI code (I used MATRIX.ANS as an example.)
Expected Behavior Page displays correctly with MCI codes in position.
Actual Behavior
MCI codes are off from the expected location.
Screenshots Added in Discord, will add here if needed.
Environment
npm install
oryarn
reports successnode --version
): n/auname -a
on *nix systems): n/agit rev-parse --short HEAD
): n/a