Created
January 15, 2015 03:41
-
-
Save Kirkman/a8f9162bd51c4572b0aa to your computer and use it in GitHub Desktop.
maskFrame() function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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