diff --git a/android/README.ANDROID b/android/README.ANDROID index 334ce4a38..94429d86e 100644 --- a/android/README.ANDROID +++ b/android/README.ANDROID @@ -32,7 +32,7 @@ after some tweaks, but atm. only linux is supported. Dependencies list (may be incomplete): autoconf, automake, make, python, gradle, ant, imagemagick, cmake, - vorbis-tools + vorbis-tools, pngquant Additionally some dependencies for optimize_data script: diff --git a/android/generate_assets.sh b/android/generate_assets.sh index 75b8811ca..eb036c858 100755 --- a/android/generate_assets.sh +++ b/android/generate_assets.sh @@ -14,8 +14,8 @@ # value greater than 0. # The CONVERT_TO_JPG variable enables converting all images that are safe to # convert and keeps other images untouched. -# The script needs imagemagick and ogg utils installed to use DECREASE_QUALITY -# feature +# The script needs imagemagick, pngquant and ogg utils installed in order to +# use DECREASE_QUALITY feature ################################################################################ @@ -203,7 +203,7 @@ convert_image() fi convert $SCALE_CMD $QUALITY_CMD "$FILE" "tmp.$FILE_TYPE" - + if [ -s "tmp.$FILE_TYPE" ]; then SIZE_OLD=`du -k "$FILE" | cut -f1` SIZE_NEW=`du -k "tmp.$FILE_TYPE" | cut -f1` @@ -259,10 +259,23 @@ convert_sound() rm -f tmp.wav tmp.ogg } +optimize_png() +{ + FILE="$1" + echo "Optimize file: $FILE" + + if [ ! -f "$FILE" ]; then + echo " File doesn't exist." + return + fi + + pngquant --force --skip-if-larger --output "$FILE" -- "$FILE" +} + convert_to_jpg() { FILE="$1" - echo "Convert file: $FILE" + echo "Convert file to jpg: $FILE" if [ ! -f "$FILE" ]; then echo " File doesn't exist." @@ -347,7 +360,7 @@ convert_to_jpg() convert_to_jpg_extract_b3dz() { FILE="$1" - echo "Convert file: $FILE" + echo "Extract b3dz file: $FILE" if [ ! -f "$FILE" ]; then echo " File doesn't exist." @@ -368,7 +381,7 @@ convert_to_jpg_extract_b3dz() convert_to_jpg_update_b3d() { FILE="$1" - echo "Convert file: $FILE" + echo "Update b3d file: $FILE" if [ ! -f "$1" ]; then echo " File doesn't exist." @@ -448,7 +461,7 @@ convert_to_jpg_update_b3d() convert_to_jpg_update_spm() { FILE="$1" - echo "Convert file: $FILE" + echo "Update spm file: $FILE" if [ ! -f "$1" ]; then echo " File doesn't exist." @@ -520,7 +533,7 @@ convert_to_jpg_update_spm() convert_to_jpg_update_xml() { FILE="$1" - echo "Convert file: $FILE" + echo "Update xml file: $FILE" if [ ! -f "$FILE" ]; then echo " File doesn't exist." @@ -568,6 +581,10 @@ if [ $CONVERT_TO_JPG -gt 0 ]; then fi fi +if [ $DECREASE_QUALITY -gt 0 ]; then + find assets/data -iname "*.png" | while read f; do optimize_png "$f" "png"; done +fi + # Copy data directory echo "Copy data directory" diff --git a/data/gui/addons.png b/data/gui/addons.png index 6ba7216f4..824b3a4f5 100644 Binary files a/data/gui/addons.png and b/data/gui/addons.png differ diff --git a/data/gui/android/blur_bg_button.png b/data/gui/android/blur_bg_button.png index 9fc2c50c4..ed859861d 100644 Binary files a/data/gui/android/blur_bg_button.png and b/data/gui/android/blur_bg_button.png differ diff --git a/data/gui/android/drift.png b/data/gui/android/drift.png index 8128a2353..15a586a14 100644 Binary files a/data/gui/android/drift.png and b/data/gui/android/drift.png differ diff --git a/data/gui/android/nitro.png b/data/gui/android/nitro.png index c0afbffa8..449895d01 100644 Binary files a/data/gui/android/nitro.png and b/data/gui/android/nitro.png differ diff --git a/data/gui/android/nitro_empty.png b/data/gui/android/nitro_empty.png index 009d14669..9c9ea9059 100644 Binary files a/data/gui/android/nitro_empty.png and b/data/gui/android/nitro_empty.png differ diff --git a/data/gui/android/pause.png b/data/gui/android/pause.png index 8d8f6fe81..3adbff4c2 100644 Binary files a/data/gui/android/pause.png and b/data/gui/android/pause.png differ diff --git a/data/gui/android/steering_wheel.png b/data/gui/android/steering_wheel.png index 794cee9c6..a2d53d895 100644 Binary files a/data/gui/android/steering_wheel.png and b/data/gui/android/steering_wheel.png differ diff --git a/data/gui/android/thunderbird_reset.png b/data/gui/android/thunderbird_reset.png index f4efb0668..4d9c4b7de 100644 Binary files a/data/gui/android/thunderbird_reset.png and b/data/gui/android/thunderbird_reset.png differ diff --git a/data/gui/android/up_down.png b/data/gui/android/up_down.png index e03381a4f..6e61770af 100644 Binary files a/data/gui/android/up_down.png and b/data/gui/android/up_down.png differ diff --git a/data/gui/android/wing_mirror.png b/data/gui/android/wing_mirror.png index 925d315fc..d0c81cc74 100644 Binary files a/data/gui/android/wing_mirror.png and b/data/gui/android/wing_mirror.png differ diff --git a/data/gui/back.png b/data/gui/back.png index 1578cc3bc..483e99a87 100644 Binary files a/data/gui/back.png and b/data/gui/back.png differ diff --git a/data/gui/banana.png b/data/gui/banana.png index 2eb0e0b04..75bfd5cc7 100644 Binary files a/data/gui/banana.png and b/data/gui/banana.png differ diff --git a/data/gui/blue_plus.png b/data/gui/blue_plus.png index 6e0898abd..39fcb506a 100644 Binary files a/data/gui/blue_plus.png and b/data/gui/blue_plus.png differ diff --git a/data/gui/challenge.png b/data/gui/challenge.png index 2f7f0b05a..cbe2fe624 100644 Binary files a/data/gui/challenge.png and b/data/gui/challenge.png differ diff --git a/data/gui/credits.stkgui b/data/gui/credits.stkgui index 988f09c14..f3d6ce4c4 100644 --- a/data/gui/credits.stkgui +++ b/data/gui/credits.stkgui @@ -2,11 +2,19 @@ -
+
--> + +
- +
+ + + +