aboutsummaryrefslogtreecommitdiff
path: root/src/script/cpp_api
Commit message (Expand)AuthorAge
...
* Fix Lua scripting synchronizationkwolekr2015-11-01
* Fix server crashing on Lua errorsShadowNinja2015-10-31
* Remove some abort() callsest312015-10-26
* ABMs: Make catch-up behaviour optionalparamat2015-10-18
* Add new ContentParamType2 "CPT2_DEGROTATE"est312015-10-04
* Push error handler afresh each time lua_pcall is usedKahrl2015-08-27
* Use numeric indices and raw table access with LUA_REGISTRYINDEXKahrl2015-08-27
* Clean up threadingShadowNinja2015-08-23
* SAPI: Track last executed mod and include in error messageskwolekr2015-08-12
* Display Lua memory usage at the time of Out-of-Memory errorkwolekr2015-08-10
* Improve Script CPP API diagnosticskwolekr2015-08-05
* Optional reconnect functionalityest312015-07-23
* Fix code style from recent commits and add misc. optimizationskwolekr2015-07-02
* Add Lua errors to error dialogrubenwardy2015-06-29
* Add minetest.register_on_player_hpchangeTeTpaAka2015-06-13
* dofile error reporting for syntax errorsest312015-06-12
* Fix uninitialized variable errorest312015-06-02
* Fix Windows build, clean up included headersSmallJoker2015-05-22
* Replace instances of std::map<std::string, std::string> with StringMapkwolekr2015-05-19
* Add mod securityShadowNinja2015-05-16
* Add minetest.register_on_punchplayerBrandon2015-05-15
* Clean up and tweak build systemShadowNinja2015-03-27
* For usages of assert() that are meant to persist in Release builds (when NDEB...Craig Robbins2015-03-07
* Performance fixes.onkrot2015-01-13
* Expose mapgen parameters on scripting initkwolekr2014-12-29
* Expose mapgen chunksize in on_mapgen_init callbackskwolekr2014-12-14
* Simplify loading of Android version of menuShadowNinja2014-11-20
* Add meshnode drawtype.RealBadAngel2014-10-18
* Fix object reference pushing functions when called from coroutinesShadowNinja2014-10-07
* Add optional framed glasslike drawtypeBlockMen2014-10-02
* Add firelike drawtypeTriBlade92014-09-21
* Don't call a player event without having player to do a event forsapier2014-08-21
* Fix over-poping and only push the core onceShadowNinja2014-05-30
* Use "core" namespace internallyShadowNinja2014-05-08
* Organize builtin into subdirectoriesShadowNinja2014-05-07
* Fix heart + bubble bar size on different texture packssapier2014-05-07
* Fix code style of async APIShadowNinja2014-04-27
* Remove dependency on marshal and many other async changesShadowNinja2014-04-27
* Only push the Lua error handler onceShadowNinja2014-04-27
* Fix all warnings reported by clangSfan52014-04-15
* Add more informative error messages for inventory and item method errorsShadowNinja2014-03-15
* Remove lua_State parameter from LuaError::LuaErrorShadowNinja2014-03-15
* Revert "Make sure we get a stacktrace for as many lua errors as possible"ShadowNinja2014-03-15
* Make sure we get a stacktrace for as many lua errors as possibleSfan52014-03-15
* Pass arguments by referenceSelat2014-03-12
* Correct misleading detached inventory error messageCiaran Gultnieks2014-03-09
* Make flag strings clear specified flag with 'no' prefixkwolekr2014-02-08
* Fix crash when a error occurs in a globalstep callbackShadowNinja2014-02-03
* Pass pointed_thing to on_punch and minetest.register_on_punchnode callbacksShadowNinja2014-01-23
* Log guilty node name when allow_metadata_inventory_move/put/take failsKahrl2013-12-18
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\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}\ \{\}