== writing files (localfilesystem = CPP type = Windows/Mac ==
check out also: http://cookbooks.adobe.com/post_Save_a_local_image_file__JPEG_or_PNG__from_an_imag-8406.html
var f=File.write("here_io.txt", false);
for( ti in 0 ... 3){
var counter=1;
for(tik in 0 ... getGameAttribute("MaxSceneTiles") ){
for(tin in 0 ... getGameAttribute("MaxSceneTiles") ){
// write T[ti][Std.int(tik*getGameAttribute("MaxSceneTiles"))+tin]=255;
var t=T[ti][Std.int(tik*getGameAttribute("MaxSceneTiles"))+tin];
if(t<255){
f.writeString(getGameAttribute("scenenr")+"."+ti+"."+counter+".x="+tin+"\n");
f.writeString(getGameAttribute("scenenr")+"."+ti+"."+counter+".y="+tik+"\n");
f.writeString(getGameAttribute("scenenr")+"."+ti+"."+counter+".t="+tin+"\n");
counter++;
}
}
}
f.writeString(getGameAttribute("scenenr")+"."+ti+".nrofitems="+counter+"\n");
} // for all layers
f.close();
Geen opmerkingen:
Een reactie posten