diff --git a/exec/load/frame.js b/exec/load/frame.js index 526c71e38efb89ece2e753d030f53c769a3acfdb..37ec1f6703cc05b0c1c5a6bc729dd9509777da50 100644 --- a/exec/load/frame.js +++ b/exec/load/frame.js @@ -887,6 +887,9 @@ Frame.prototype.invalidate = function() { this.__properties__.display.invalidate(); this.refresh(); } +Frame.prototype.dump = function() { + return this.__properties__.display.dump(); +} /* console method emulation */ Frame.prototype.home = function() { @@ -1476,6 +1479,21 @@ Display.prototype.screenShot = function(file,append) { Display.prototype.invalidate = function() { this.__properties__.buffer = {}; } +Display.prototype.dump = function() { + var arr = []; + for(var y = 0; y < this.height; y++) { + arr[y] = []; + for(var x = 0; x < this.width; x++) { + var c = this.__getTopCanvas__(x, y); + if(typeof c == "undefined") + continue; + var d = this.__getData__(c, x, y); + if(typeof d.ch != "undefined") + arr[y][x] = d; + } + } + return arr; +} /* private functions */ Display.prototype.__updateChar__ = function(x,y/*,data*/) {