Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| shader_type canvas_item; | |
| // this is a simple godot shader to clip (or crop or mask) a sprite to a smaller area | |
| // pass in 4 values representing the left, right, top, bottom extents to clip to. | |
| // they should be values between 0 and 1 because we're working with an UV texture. | |
| uniform float left_clip = 0.0; | |
| uniform float right_clip = 1.0; | |
| uniform float top_clip = 0.0; | |
| uniform float bottom_clip = 1.0; |
| LOVE_BIN=/usr/bin/love | |
| LOVE_DIR=./src/love | |
| DIST_DIR=./src/dist | |
| PATCH_DIR=./src/patch | |
| BUILD_DIR=./build | |
| BIN_DIR=./bin | |
| LOVE_VERSION=0.9.1 | |
| GAME_NAME=MySampleGame | |
| PRETTY_NAME=My Sample Game |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <math.h> | |
| int grad3[12][3] = {{1,1,0},{-1,1,0},{1,-1,0},{-1,-1,0}, | |
| {1,0,1},{-1,0,1},{1,0,-1},{-1,0,-1}, | |
| {0,1,1},{0,-1,1},{0,1,-1},{0,-1,-1}}; | |
| int p[] = {151,160,137,91,90,15, | |
| 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, |
| --[[ | |
| ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php. | |
| Example: | |
| ProFi = require 'ProFi' | |
| ProFi:start() | |
| some_function() | |
| another_function() | |
| coroutine.resume( some_coroutine ) | |
| ProFi:stop() |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
| #!/bin/bash | |
| # painting2sprites - A simple script to read an ORA, resize and trim output PNGs. | |
| INPUT_FILE=$1 | |
| OUTPUT_DIR=$2 | |
| RESIZE_SCALE="25%" | |
| if [ "$2" == "" ]; then |
| #!/bin/bash | |
| # flattenpsd - A simple script to read a PSD and save each layer as a PNG. | |
| # | |
| INPUT_FILE=$1 | |
| OUTPUT_DIR=$2 | |
| if [ "$2" == "" ]; then | |
| echo "Usage: $0 <input_psd> <output_dir>" |