#!/bin/bash BASE="/opt/X-Plane 10/Custom Scenery/zPhotoXP_+49+016_17_Brno_XP10_2013-01" TER="terrain" PIC="textures-new" LXB=49.158950 LYB=16.669775 RXB=49.143272 RYB=16.720532 LX=`echo $LXB*1000000 | bc | cut -d "." -f 1` LY=`echo $LYB*1000000 | bc | cut -d "." -f 1` RX=`echo $RXB*1000000 | bc | cut -d "." -f 1` RY=`echo $RYB*1000000 | bc | cut -d "." -f 1` dX=$((14374/2)) dY=$((21973/2)) cat << EOF PROPERTY sim/planet earth PROPERTY sim/overlay 1 PROPERTY sim/require_object 1/0 PROPERTY sim/require_facade 1/0 PROPERTY sim/creation_agent gmdownload.sh PROPERTY sim/west 16 PROPERTY sim/east 17 PROPERTY sim/north 50 PROPERTY sim/south 49 POLYGON_DEF polygons/pink.pol EOF CNT=0 for ter in "$BASE/$TER/"*.ter do Xbase=`grep "LOAD_CENTER" "$ter" | cut -d " " -f 2` Ybase=`grep "LOAD_CENTER" "$ter" | cut -d " " -f 3` X=`echo $Xbase*1000000 | bc | cut -d "." -f 1` Y=`echo $Ybase*1000000 | bc | cut -d "." -f 1` # echo "`basename \"$ter\"`: $Xbase; $Ybase; $X; $Y" # echo "if [ $LX -gt $((X-delta)) ] && [ $LY -lt $((Y+delta)) ] && [ $RX -lt $((X+delta)) ] && [ $RY -gt $((Y-delta)) ]" # sleep 1 if [ $LX -gt $((X-dX)) ] && [ $LY -lt $((Y+dY)) ] && [ $RX -lt $((X+dX)) ] && [ $RY -gt $((Y-dY)) ] then NAME=`basename "$ter"` #echo "$NAME: $Xbase; $Ybase; $X; $Y" #cp "`echo $BASE/$PIC/$NAME | sed 's:\.ter:\.jpg:g'`" /tmp/ cat << EOF BEGIN_POLYGON $CNT 65535 4 BEGIN_WINDING POLYGON_POINT $(echo "scale=6; ($Y+$dY)/1000000" | bc -l) $(echo "scale=6; ($X-$dX)/1000000" | bc -l) 1.00000000 0.00000000 POLYGON_POINT $(echo "scale=6; ($Y+$dY)/1000000" | bc -l) $(echo "scale=6; ($X+$dX)/1000000" | bc -l) 1.00000000 1.00000000 POLYGON_POINT $(echo "scale=6; ($Y-$dY)/1000000" | bc -l) $(echo "scale=6; ($X+$dX)/1000000" | bc -l) 0.00000000 1.00000000 POLYGON_POINT $(echo "scale=6; ($Y-$dY)/1000000" | bc -l) $(echo "scale=6; ($X-$dX)/1000000" | bc -l) 0.00000000 0.00000000 END_WINDING END_POLYGON EOF #CNT=$((CNT+1)) fi done
for file in g2xpl* ; do convert "$file" "$file.png"; done
úprava kontrastu
for file in *.png ; do convert -sigmoidal-contrast 3,60% "$file" "$file"; done
převod png → dds
for file in *.png ; do ./DDSTool --png2dxt1 "$file" "$file"; done
úprava jména souboru
for file in *.dds.png ; do mv "$file" "${file/.dds.png/.dds}"; done
djbuldog@Pharaon:/opt/X-Plane 10/Custom Scenery$ find zPhotoXP_+49+016_17_Brno_XP10_2013-01/ -name '*.ter' -exec sed -i '$ a DECAL_LIB lib/g10/decals/flinty_dirt_2.dcl' '{}' \; find zPhotoXP_+49+016_17_Brno_XP10_2013-01/ -name '*.ter' -exec sed -i 's/flinty_dirt_2.dcl/long_grass_and_shrubs.dcl/' '{}' \;
find zPhotoXP_+49+013_17_Pilsen_XP10_2013-01/terrain/ -name *.ter -exec sed -i '$ a DECAL_LIB lib/g10/decals/long_grass_and_shrubs.dcl' '{}' \;
#!/bin/bash #set -x HEADER="--header=accept:image/webp,*/*;q=0.8 \ --header=accept-encoding:gzip,deflate,sdch \ --header=accept-language:cs-CZ,cs;q=0.8" UA="Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.63 Safari/537.36" R="--referer=https://maps.google.com/" FCOOK="--cookies=on --keep-session-cookies --save-cookies=/tmp/testcookie.txt" SCOOK="--cookies=on --load-cookies=testcookie.txt --keep-session-cookies --save-cookies=/tmp/testcookie.txt" function logit() { echo `date "+%Y/%m/%d %H:%M:%S"` $@ } function init_down() { wget $HEADER -U "$UA" $FCOOK http://maps.google.com -O /tmp/firstout.html 2> /tmp/wget.out if [ $? != 0 ] then echo "Something wrong with wget, returned $?:" cat /tmp/wget.out exit 1 fi } function down_link() { wget $HEADER -U "$UA" $R $SCOOK $2 -O /tmp/$1 2> /tmp/wget.out if [ $? != 0 ] then echo "Something wrong with wget, returned $?:" cat /tmp/wget.out exit 1 fi } function down_square() { X=$1 Y=$2 logit "Downloading square ($X,$Y) files" xi=$X yi=$((131064-Y)) for i in `seq 0 7`; do for j in `seq 0 7`; do down_link g2xpl_8_17_${X}_${Y}-${xi}-${yi}.jpg "https://khms0.google.com/kh/v=145&src=app&x=$xi&y=$yi&z=17&s=Gali" xi=$((xi+1)) done xi=$X yi=$((yi+1)) done } function join_square() { X=$1 Y=$2 xi=$X yi=$((131064-Y)) logit "Merging square ($X,$Y) files" FL="" for i in `seq 0 7`; do for j in `seq 0 7`; do FL="$FL g2xpl_8_17_${X}_${Y}-${xi}-${yi}.jpg" xi=$((xi+1)) done xi=$X yi=$((yi+1)) done [ -e /tmp/gx2pl_finished ] || mkdir /tmp/gx2pl_finished montage -mode concatenate -tile 8x8 $FL /tmp/gx2pl_finished/g2xpl_8_17_${X}_${Y}.jpg if [ $? != 0 ] then echo "Something wrong with montage, returned $?:" exit 1 fi rm $FL } function usage() { echo "./script.sh <X> <Y> [ <X2> <Y2> ]" echo "X,Y dds zl17 coordinates" echo "X2,Y2 dds zl17 coordinates for range X,Y - X2,Y2" } if [ $# != 2 ] && [ $# != 4 ] then usage exit fi cd /tmp if [ $# == 2 ] then #init_down #down_square $1 $2 #join_square $1 $2 echo something fi if [ $# == 4 ] then for x in `seq $1 8 $3` do for y in `seq $2 8 $4` do init_down down_square $x $y join_square $x $y done done fi
#!/bin/bash CORE=4 DDSTool="/home/djbuldog/Downloads/x-plane/dev_scenery/xptools_lin_12-2/tools/DDSTool" DIR="/opt/X-Plane 10/Custom Scenery/zPhotoXP_+49+016_17_Brno_XP10_2013-01/textures3" function 2png() { task=1 for jpgfile in *.jpg do if [ $((task%CORE)) == $1 ] then file=`echo $jpgfile | cut -d "." -f 1` echo -n "$1" convert "$file.jpg" "$file.png" fi task=$((task+1)) done } function 2dds() { task=1 for jpgfile in *.jpg do if [ $((task%CORE)) == $1 ] then file=`echo $jpgfile | cut -d "." -f 1` echo -n "$1" #$DDSTool --png2dxt1 "$file.png" "$file.dds" nvcompress "$file.jpg" "$file.dds" fi task=$((task+1)) done } function kill_childs() { for i in `seq 0 $CORE` do kill ${pid[$i]} 2>/dev/null done echo echo "All childs killed" exit 0 } trap 'kill_childs' SIGINT cd "$DIR" for i in `seq 0 $CORE` do 2png $i & pid[$i]=$! done for i in `seq 0 $CORE` do wait ${pid[$i]} done echo echo "Finished"
X-Plane 10 will support X-Plane 9 scenery. X-Plane 10 will support X-Plane 9 airplanes. X-Plane 10 will support X-Plane 9 objects. X-Plane 10 will support X-Plane 9 airfoils. X-Plane 10 will support X-Plane 8 airfoils. X-Plane 10 will support X-Plane 7 airfoils.
To update all of your airfoils to the latest (version 9) format, run Airfoil-Maker, go to the FILE menu, and select BATCH UPDATE AIRFOILS To update all of your airplanes to the latest (version 9) format, runPlane-Maker, go to the SPECIAL menu, and select BATCH CONVERT AIRCRAFT TO LATEST FORMAT