aboutsummaryrefslogtreecommitdiff
path: root/advtrains
Commit message (Expand)AuthorAge
* Fix for path invalidation within update callbacks (issue was caused by detect...orwell962019-01-22
* Correct last commitorwell962019-01-22
* Debugging code to trace down path_invalidate within callbacks errororwell962019-01-22
* Workaroundorwell962019-01-21
* Do not run train steps when path has been deletedorwell962019-01-21
* Avoid division through zero in get_accelerationorwell962019-01-21
* Index NaN check (tracking obscure error detected on LW migration)orwell962019-01-21
* Additional info print for path_print()orwell962019-01-21
* Do not clear tarvelocity when setting new, potential no-op commandorwell962019-01-15
* Add "routingcode" propertyorwell962019-01-09
* Make track protection radius configurableorwell962018-12-18
* Fix player_to_train_mapping (H#74)orwell962018-12-16
* Fix 144e1fc4e01741f8cdd5a579ae84cde85c420d78 (there's no self in one of the i...orwell962018-12-10
* Fix crashes:orwell962018-12-10
* Change get_inventory_formspec API - add invname parameterorwell962018-12-10
* Shunt signals (not exactly Ks), along with fixes in other components that tho...orwell962018-12-08
* Apply speed restriction 0.5 indexes later, do not cap tarvelocity by speed_re...orwell962018-12-04
* Added on_train_approach callback, non-permanent external LZB brakepoints and ...orwell962018-11-29
* Implement new position encoding function and benchmark itorwell962018-11-29
* Fix discouple positioning when wagon was just loadedorwell962018-11-20
* Remove superfluous "tarvelocity" assignmentsorwell962018-11-20
* Make "Line" property accessible from OBC and gettable via LATC, change subway...orwell962018-11-20
* Remove debug printorwell962018-11-20
* Fix protection regarding tracks (track_builder and railway_operator) and docu...orwell962018-11-12
* Increase savefile version to 2orwell962018-11-10
* Remove "couple locks" and apply protection to the actual coupling process, an...orwell962018-11-10
* No static_save for discouple entitiesorwell962018-10-30
* Document fix 0a982b6356b2f4b6a28e74f9f90c4f584169a96dorwell962018-10-29
* Actually set last_connid to 1, to prevent warningorwell962018-10-29
* Handle the case that a train is not initialized (train_ensure_init returns ni...orwell962018-10-29
* atdump() to treat certain values specialorwell962018-10-29
* Small fixes which do not have any effectorwell962018-10-29
* Complete Ks Main signalsorwell962018-10-26
* Fix node database ATC rail bugorwell962018-10-17
* Prevent any user control except "Brake" when an ATC override is presentorwell962018-10-17
* Improve ATC-LZB-User control interaction, smoothen LZB control operationsorwell962018-10-17
* Address H#60, H#17, M#18 and M#7orwell962018-10-17
* Fix H#69orwell962018-10-17
* Fix H#66 (Hemiptera 66) crash on missing double_conn matchorwell962018-10-17
* Actually allow what manual promises (setting IP on non-assigned signals)orwell962018-10-17
* Properly handle speed restrictionsorwell962018-10-10
* Remote Routesetting from Onboard Computerorwell962018-10-10
* Properly implement invalidate_all_paths, recheck lzb on aspect changeorwell962018-10-10
* Add signal safety control override, restructure control systemorwell962018-10-10
* Make signal influence point (~halt point) specifiableorwell962018-10-09
* Improve route programming:orwell962018-10-07
* Add interlocking guide/manual, silence debug outputsorwell962018-09-14
* Move passive API to the advtrains coreorwell962018-08-16
* Fix various bugs found while testingorwell962018-08-13
* Teleport player to their train every 2 seconds instead of just on_joinplayerorwell962018-08-12
filter=0 ;; esac shift shift ;; --heightalpha|-a) heightsource=1 shift ;; --conversion|-c) if [ -z "$2" ] ; then echo "Missing conversion parameter"; exit 1; fi case "$2" in biased|1) conversion=1 ;; red|2) conversion=2 ;; green|3) conversion=3 ;; blue|4) conversion=4 ;; maxrgb|5) conversion=5 ;; minrgb|6) conversion=6 ;; colorspace|7) conversion=7 ;; normalize-only|8) conversion=8 ;; heightmap|9) conversion=9 ;; *) conversion=0 ;; esac shift shift ;; --wrap|-w) wrap=1 shift ;; --invertx|-x) invertx=1 shift ;; --inverty|-y) inverty=1 shift ;; --dryrun|-d) dryrun=true shift ;; *) echo -e "\nUsage:\n" echo "`basename $0` [--scale|-s <value>] [--filter|-f <string>]" echo " [--wrap|-w] [--heightalpha|-a] [--invertx|-x] [--inverty|-y]" echo " [--conversion|-c <string>] [--skiptools|-t] [--skipinventory|-i [<value>]]" echo " [--dryrun|-d] [--pattern|-p <pattern>]" echo -e "\nDefaults to a scale of 8, checking all files in the current directory, and not" echo "skipping apparent tools or inventory images. Filter, if specified, may be one" echo "of: sobel3, sobel5, prewitt3, prewitt5, 3x3, 5x5, 7x7, or 9x9, or a value 1" echo "through 8 (1=sobel3, 2=sobel5, etc.). Defaults to 0 (four-sample). The height" echo "source is taken from the image's alpha channel if heightalpha is specified.\n" echo "" echo "If inventory skip is specified, an optional resolution may also be included" echo "(default is 64). Conversion can be one of: biased, red, green, blue, maxrgb," echo "minrgb, colorspace, normalize-only, heightmap or a value from 1 to 9" echo "corresponding respectively to those keywords. Defaults to 0 (simple" echo "normalize) if not specified. Wrap, if specified, enables wrapping of the" echo "normalmap around the edges of the texture (defaults to no). Invert X/Y" echo "reverses the calculated gradients for the X and/or Y dimensions represented" echo "by the normalmap (both default to non-inverted)." echo "" echo "The pattern, can be an escaped pattern string such as \*apple\* or" echo "default_\*.png or similar (defaults to all PNG and JPG images in the current" echo "directory that do not contain \"_normal\" or \"_specular\" in their filenames)." echo "" echo "If set for dry-run, the actions this script will take will be printed, but no" echo "images will be generated. Passing an invalid value to a switch will generally" echo "cause that switch to revert to its default value." echo "" exit 1 ;; esac done echo -e "\nProcessing files based on pattern \"$pattern\" ..." normalMap() { out=`echo "$1" | sed 's/.png/_normal.png/' | sed 's/.jpg/_normal.png/'` echo "Launched process to generate normalmap: \"$1\" --> \"$out\"" >&2 gimp -i -b " (define (normalMap-fbx-conversion fileName newFileName filter nscale wrap heightsource conversion invertx inverty) (let* ( (image (car (gimp-file-load RUN-NONINTERACTIVE fileName fileName))) (drawable (car (gimp-image-get-active-layer image))) (drawable (car (gimp-image-flatten image))) ) (if (> (car (gimp-drawable-type drawable)) 1) (gimp-convert-rgb image) () ) (plug-in-normalmap RUN-NONINTERACTIVE image drawable filter 0.0 nscale wrap heightsource 0 conversion 0 invertx inverty 0 0.0 drawable) (gimp-file-save RUN-NONINTERACTIVE image drawable newFileName newFileName) (gimp-image-delete image) ) ) (normalMap-fbx-conversion \"$1\" \"$out\" $2 $3 $4 $5 $6 $7 $8)" -b '(gimp-quit 0)' } export -f normalMap for file in `ls $pattern |grep -v "_normal.png"|grep -v "_specular"` ; do invtest=`file "$file" |grep "$invresolution x $invresolution"` if $skipinventory && [ -n "$invtest" ] ; then echo "Skipped presumed "$invresolution"px inventory image: $file" >&2 continue fi tooltest=`echo "$file" \ | grep -v "_tool" \ | grep -v "_shovel" \ | grep -v "_pick" \ | grep -v "_axe" \ | grep -v "_sword" \ | grep -v "_hoe" \ | grep -v "bucket_"` if $skiptools && [ -z "$tooltest" ] ; then echo "Skipped presumed tool image: $file" >&2 continue fi if $dryrun ; then echo "Would have generated a normalmap for $file" >&2 continue else echo \"$file\" $filter $scale $wrap $heightsource $conversion $invertx $inverty fi done | xargs -P $numprocs -n 8 -I{} bash -c normalMap\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}