hi again,

here is my options string maker script (put after file close instead of the current exec).

does anyone know how to run the compiler in background? if I use exec_wait instead of exec, and include -close among options, it is nearly okay, compilation is done while my application is fullscreen and displays a please wait message, but when ready it gets minimized... so at the moment it is better to use simply exec and no -close.

Click to reveal..
//----------------------------------------------------------

// rgb values are iterated from 0..255 to 0..100 !!! and from BRG to RGB !!!

// create string for exec options - to set sun pos, sun color, ambient color, fog colors, and default settings
str_cpy(temp_str,"export.$$M -pal expalette.pcx ");
// sun azimuth
str_cat(temp_str,"
-az ");
str_cat(temp_str,str_for_int(NULL,(int)sun_angle.pan));
str_cat(temp_str," ");
// sun elevation
str_cat(temp_str,"-el ");
str_cat(temp_str,str_for_int(NULL,(int)sun_angle.tilt));
str_cat(temp_str," ");
// sun color
str_cat(temp_str,"
-sunrgb ");
str_cat(temp_str,str_for_int(NULL,integer(sun_color.red/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(sun_color.green/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(sun_color.blue/2.55)));
str_cat(temp_str," ");
// ambient
str_cat(temp_str,"
-ambrgb ");
str_cat(temp_str,str_for_int(NULL,integer(ambient_color.red/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(ambient_color.green/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(ambient_color.blue/2.55)));
str_cat(temp_str," ");
// fog1
str_cat(temp_str,"
-fog1 ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor1.red/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor1.green/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor1.blue/2.55)));
str_cat(temp_str," ");
// fog2
str_cat(temp_str,"
-fog2 ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor2.red/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor2.green/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor2.blue/2.55)));
str_cat(temp_str," ");
// fog3
str_cat(temp_str,"
-fog3 ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor3.red/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor3.green/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor3.blue/2.55)));
str_cat(temp_str," ");
// fog4
str_cat(temp_str,"
-fog4 ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor4.red/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor4.green/2.55)));
str_cat(temp_str," ");
str_cat(temp_str,str_for_int(NULL,integer(d3d_fogcolor4.blue/2.55)));
str_cat(temp_str," ");
// remaining default values
str_cat(temp_str,"
-hiprec
-litmapsonly
-writelog
-mesh
-mergeacross
-tesselate
-solidsky
-nodetail
-threads 1
-gamma 1.50
-phongangle 120
-lmambient 50
-sizeshaded 236
-litres 1.00
-litcomp 0.50
-litmax 196
-litscale 0.50
-radsubdiv 64
-radbounce 0
-noportals
-nobsp
-bound 56000
-fat 64 48 8
-narrow 32 32 0 ");


exec( "%EXE_DIR%\\wwmp2wmb.exe" , temp_str );



Free world editor for 3D Gamestudio: MapBuilder Editor