Skip to content

Instantly share code, notes, and snippets.

@Kirkman
Created January 15, 2015 03:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Kirkman/a8f9162bd51c4572b0aa to your computer and use it in GitHub Desktop.
Save Kirkman/a8f9162bd51c4572b0aa to your computer and use it in GitHub Desktop.
maskFrame() function
function maskFrame(theFrame,maskChar,maskAttr) {
var x, y, xl, yl;
xl = theFrame.data.length;
for (x=0; x<xl; x++) {
yl = theFrame.data[x].length;
for (y=0; y<yl; y++) {
var theChar = theFrame.data[x][y];
if (theChar.ch == maskChar && theChar.attr == maskAttr) {
theFrame.data[x][y].ch = undefined;
theFrame.data[x][y].attr = undefined;
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment