diff --git a/exec/load/graphic.js b/exec/load/graphic.js index fc8a526f89e4b1ad95e5d478d04f9fff05e50c00..5e0cf6941f041ee9c484fe9df93830b8ac0abb67 100644 --- a/exec/load/graphic.js +++ b/exec/load/graphic.js @@ -507,7 +507,7 @@ Graphic.prototype.drawfx = function(xpos,ypos,width,height,xoff,yoff) * Loads a ANS or BIN file. * TODO: The ASC load is pretty much guaranteed to be broken. */ -Graphic.prototype.load = function(filename) +Graphic.prototype.load = function(filename, offset) { var file_type=file_getext(filename).substr(1); var f=new File(filename); @@ -525,7 +525,9 @@ Graphic.prototype.load = function(filename) case "BIN": if(!(f.open("rb",true))) return(false); - this.BIN = f.read(); + if(offset) + f.position = offset * this.height * this.width * 2; + this.BIN = f.read(this.height * this.width * 2); f.close(); break; case "ASC":