Table of Contents
Scripts > Export fractal
Script contents// Author: A. Torpy // Updated: 14 Jul 2011 // create settings list 'ls' varlist ls int ls.PowerOfTwo float ls.AltRange float ls.Roughness bool ls.WrapFlag set ls.PowerOfTwo 10 // 8 = 256x256, 9 = 512x512, 10 = 1024x1024 set ls.Roughness 0.55 set ls.AltRange 100 set ls.WrapFlag false // edit settings list assert <EditUI &ls "Enter fractal settings"> "Calculation aborted!" // create our map variable map mymap // create the fractal map assert <calc.HF.Fractal &mymap ls.PowerOfTwo ls.Roughness ls.AltRange ls.WrapFlag true> "Error generating fractal map" // initialise and edit file selector FileSelector FS filesel.Init &FS false NULL "Bitmap image (*.bmp)|*.bmp|PNG image (*.png)|*.png|Terragen file (*.ter)|*.ter|Heightfield file (*.hfz)|*.hfz|All files (*.*)|*.*|" NULL NULL assert <EditUI &FS "Select export filename"> "Export aborted" // save the map file assert <map.SaveFile2 &mymap <filesel.GetPathA &FS> false true> "Export failed!" CommentsNone. Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Share Alike 3.0 Unported
|