From 299bc210a41347976fd69c90522c4af9770f85b3 Mon Sep 17 00:00:00 2001 From: Severin Meyer Date: Sun, 25 Jan 2015 14:10:22 +0100 Subject: [PATCH] Add crosshairs sourcefiles --- gfx/crosshairs/luma/gfx/common.css | 1 + gfx/crosshairs/luma/gfx/common.filters | 14 +++++++ gfx/crosshairs/luma/gfx/crosshair29.svg | 7 ++++ gfx/crosshairs/luma/gfx/crosshair30.svg | 7 ++++ gfx/crosshairs/luma/gfx/crosshair31.svg | 9 +++++ gfx/crosshairs/luma/gfx/crosshair32.svg | 10 +++++ gfx/crosshairs/luma/gfx/crosshair33.svg | 9 +++++ gfx/crosshairs/luma/gfx/crosshair34.svg | 10 +++++ gfx/crosshairs/luma/gfx/crosshair35.svg | 10 +++++ gfx/crosshairs/luma/gfx/crosshair36.svg | 11 ++++++ gfx/crosshairs/luma/gfx/crosshair37.svg | 10 +++++ gfx/crosshairs/luma/gfx/crosshair38.svg | 11 ++++++ gfx/crosshairs/luma/gfx/crosshair39.svg | 15 ++++++++ gfx/crosshairs/luma/gfx/crosshair40.svg | 19 ++++++++++ gfx/crosshairs/luma/gfx/crosshair41.svg | 7 ++++ gfx/crosshairs/luma/gfx/crosshair42.svg | 8 ++++ gfx/crosshairs/luma/render-crosshairs.sh | 48 ++++++++++++++++++++++++ 17 files changed, 206 insertions(+) create mode 100644 gfx/crosshairs/luma/gfx/common.css create mode 100644 gfx/crosshairs/luma/gfx/common.filters create mode 100644 gfx/crosshairs/luma/gfx/crosshair29.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair30.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair31.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair32.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair33.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair34.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair35.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair36.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair37.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair38.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair39.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair40.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair41.svg create mode 100644 gfx/crosshairs/luma/gfx/crosshair42.svg create mode 100755 gfx/crosshairs/luma/render-crosshairs.sh diff --git a/gfx/crosshairs/luma/gfx/common.css b/gfx/crosshairs/luma/gfx/common.css new file mode 100644 index 0000000..6165e88 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/common.css @@ -0,0 +1 @@ +.crosshair { fill:#ffffff; filter:url(common.filters#shadow) } diff --git a/gfx/crosshairs/luma/gfx/common.filters b/gfx/crosshairs/luma/gfx/common.filters new file mode 100644 index 0000000..49a9c85 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/common.filters @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair29.svg b/gfx/crosshairs/luma/gfx/crosshair29.svg new file mode 100644 index 0000000..0fe757d --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair29.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair30.svg b/gfx/crosshairs/luma/gfx/crosshair30.svg new file mode 100644 index 0000000..8994fa1 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair30.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair31.svg b/gfx/crosshairs/luma/gfx/crosshair31.svg new file mode 100644 index 0000000..35b40a3 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair31.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair32.svg b/gfx/crosshairs/luma/gfx/crosshair32.svg new file mode 100644 index 0000000..9a3fa5f --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair32.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair33.svg b/gfx/crosshairs/luma/gfx/crosshair33.svg new file mode 100644 index 0000000..c09a0c3 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair33.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair34.svg b/gfx/crosshairs/luma/gfx/crosshair34.svg new file mode 100644 index 0000000..6838a7c --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair34.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair35.svg b/gfx/crosshairs/luma/gfx/crosshair35.svg new file mode 100644 index 0000000..cb8fa6d --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair35.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair36.svg b/gfx/crosshairs/luma/gfx/crosshair36.svg new file mode 100644 index 0000000..5aa6197 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair36.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair37.svg b/gfx/crosshairs/luma/gfx/crosshair37.svg new file mode 100644 index 0000000..c648293 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair37.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair38.svg b/gfx/crosshairs/luma/gfx/crosshair38.svg new file mode 100644 index 0000000..ef749a4 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair38.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair39.svg b/gfx/crosshairs/luma/gfx/crosshair39.svg new file mode 100644 index 0000000..fdd4343 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair39.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair40.svg b/gfx/crosshairs/luma/gfx/crosshair40.svg new file mode 100644 index 0000000..288de05 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair40.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair41.svg b/gfx/crosshairs/luma/gfx/crosshair41.svg new file mode 100644 index 0000000..9b436cb --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair41.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/gfx/crosshairs/luma/gfx/crosshair42.svg b/gfx/crosshairs/luma/gfx/crosshair42.svg new file mode 100644 index 0000000..725ce93 --- /dev/null +++ b/gfx/crosshairs/luma/gfx/crosshair42.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/gfx/crosshairs/luma/render-crosshairs.sh b/gfx/crosshairs/luma/render-crosshairs.sh new file mode 100755 index 0000000..ccbf489 --- /dev/null +++ b/gfx/crosshairs/luma/render-crosshairs.sh @@ -0,0 +1,48 @@ +#!/bin/sh -e +# TASK +# Render crosshairs from gfx/crosshair*.svg to DATADIR/gfx/crosshair*.tga, +# if they are newer than their target tga file. +# +# NOTES +# To compensate for filter rendering errors and to reduce rbg noise, +# the svg files are rendered at a large size and then scaled down. +# +# DEPENDENCIES +# librsvg +# imagemagick +# +# USAGE +# ./render-svg.sh DATADIR +# +# USAGE EXAMPLE +# ./render-crosshairs.sh ~/.xonotic/data + + +# Check for argument +if [ -z "$1" ]; then + echo "Usage: $0 DATADIR" + exit 1 +fi + + +data="$1"; shift +maxScale=8 +maxPixels=100000000 + + +for svg in gfx/*.svg; do + ext="${svg##*.}" + dir="$data/${svg%/*}" + tga="$data/${svg%.*}.tga" + + if [ "$ext" = "svg" ] && [ -f "$svg" ] && [ "$svg" -nt "$tga" ]; then + echo "Rendering $tga" + + w=$(identify -format "%w" "$svg") + h=$(identify -format "%h" "$svg") + scale=$(echo "s=sqrt($maxPixels/$w/$h);if(s>$maxScale)s=$maxScale;s" | bc) + + mkdir -p "$dir" + rsvg-convert -z "$scale" "$svg" | convert - -scale "$w" "$tga" + fi +done -- 2.39.2