Skip to content
Snippets Groups Projects
Commit 960c5e79 authored by mcmlxxix's avatar mcmlxxix
Browse files

add ASC file support to Graphic.load()

parent 85368dd2
No related branches found
No related tags found
No related merge requests found
......@@ -171,11 +171,11 @@ function Graphic_drawfx(xpos,ypos,width,height,xoff,yoff)
mswait(15);
}
var randx=random(placeholder.length);
var randy=random(placeholder[randx].length);
if(!placeholder[randx] || !placeholder[randx].length) {
placeholder.splice(randx,1);
continue;
}
var randy=random(placeholder[randx].length);
var position=placeholder[randx][randy];
if(!position)
continue;
......@@ -331,6 +331,14 @@ function Graphic_load(filename)
}
f.close();
break;
case "ASC":
if(!(f.open("r",true,4096)))
return(false);
var lines=f.readAll();
f.close();
for each(var l in lines)
this.putmsg(undefined,undefined,l,true);
break;
default:
throw("unsupported file type");
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment