Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 104-add-hard-grids
  • 23-add-timer
  • 65-update-icons
  • 82-fix-colors
  • 84-improve-app-metadata
  • master
  • Release_0.0.16_16
  • Release_0.0.17_17
  • Release_0.0.18_18
  • Release_0.0.19_19
  • Release_0.0.20_20
  • Release_0.0.21_21
  • Release_0.0.22_22
  • Release_0.0.23_23
  • Release_0.0.24_24
  • Release_0.0.25_25
  • Release_0.0.26_26
  • Release_0.0.27_27
  • Release_0.0.28_28
  • Release_0.0.29_29
  • Release_0.0.30_30
  • Release_0.0.31_31
  • Release_0.0.32_32
  • Release_0.0.33_33
  • Release_0.0.34_34
  • Release_0.0.35_35
  • Release_0.0.36_36
  • Release_0.0.37_37
  • Release_0.0.38_38
  • Release_0.0.39_39
  • Release_0.0.40_40
  • Release_0.0.41_41
  • Release_0.0.42_42
  • Release_0.0.43_43
  • Release_0.0.44_44
  • Release_0.0.45_45
  • Release_0.0.46_46
  • Release_0.0.47_47
  • Release_0.0.48_48
  • Release_0.1.0_49
  • Release_0.1.10_59
  • Release_0.1.11_60
  • Release_0.1.12_61
  • Release_0.1.13_62
  • Release_0.1.14_63
  • Release_0.1.15_64
  • Release_0.1.16_65
  • Release_0.1.17_66
  • Release_0.1.18_67
  • Release_0.1.19_68
  • Release_0.1.1_50
  • Release_0.1.20_69
  • Release_0.1.21_70
  • Release_0.1.22_71
  • Release_0.1.2_51
  • Release_0.1.3_52
  • Release_0.1.4_53
  • Release_0.1.5_54
  • Release_0.1.6_55
  • Release_0.1.7_56
  • Release_0.1.8_57
  • Release_0.1.9_58
  • Release_0.10.0_87
  • Release_0.10.1_88
  • Release_0.10.2_89
  • Release_0.10.3_90
  • Release_0.2.0_72
  • Release_0.2.1_73
  • Release_0.3.0_74
  • Release_0.3.1_75
  • Release_0.4.0_76
  • Release_0.4.1_77
  • Release_0.5.0_78
  • Release_0.5.1_79
  • Release_0.5.2_80
  • Release_0.6.0_81
  • Release_0.7.0_82
  • Release_0.8.0_83
  • Release_0.9.0_84
  • Release_0.9.1_85
  • Release_0.9.2_86
81 results

Target

Select target project
No results found
Select Git revision
  • 104-add-hard-grids
  • 23-add-timer
  • 65-update-icons
  • 82-fix-colors
  • 84-improve-app-metadata
  • master
  • Release_0.0.16_16
  • Release_0.0.17_17
  • Release_0.0.18_18
  • Release_0.0.19_19
  • Release_0.0.20_20
  • Release_0.0.21_21
  • Release_0.0.22_22
  • Release_0.0.23_23
  • Release_0.0.24_24
  • Release_0.0.25_25
  • Release_0.0.26_26
  • Release_0.0.27_27
  • Release_0.0.28_28
  • Release_0.0.29_29
  • Release_0.0.30_30
  • Release_0.0.31_31
  • Release_0.0.32_32
  • Release_0.0.33_33
  • Release_0.0.34_34
  • Release_0.0.35_35
  • Release_0.0.36_36
  • Release_0.0.37_37
  • Release_0.0.38_38
  • Release_0.0.39_39
  • Release_0.0.40_40
  • Release_0.0.41_41
  • Release_0.0.42_42
  • Release_0.0.43_43
  • Release_0.0.44_44
  • Release_0.0.45_45
  • Release_0.0.46_46
  • Release_0.0.47_47
  • Release_0.0.48_48
  • Release_0.1.0_49
  • Release_0.1.10_59
  • Release_0.1.11_60
  • Release_0.1.12_61
  • Release_0.1.13_62
  • Release_0.1.14_63
  • Release_0.1.15_64
  • Release_0.1.16_65
  • Release_0.1.17_66
  • Release_0.1.18_67
  • Release_0.1.19_68
  • Release_0.1.1_50
  • Release_0.1.20_69
  • Release_0.1.21_70
  • Release_0.1.22_71
  • Release_0.1.2_51
  • Release_0.1.3_52
  • Release_0.1.4_53
  • Release_0.1.5_54
  • Release_0.1.6_55
  • Release_0.1.7_56
  • Release_0.1.8_57
  • Release_0.1.9_58
  • Release_0.10.0_87
  • Release_0.10.1_88
  • Release_0.10.2_89
  • Release_0.10.3_90
  • Release_0.2.0_72
  • Release_0.2.1_73
  • Release_0.3.0_74
  • Release_0.3.1_75
  • Release_0.4.0_76
  • Release_0.4.1_77
  • Release_0.5.0_78
  • Release_0.5.1_79
  • Release_0.5.2_80
  • Release_0.6.0_81
  • Release_0.7.0_82
  • Release_0.8.0_83
  • Release_0.9.0_84
  • Release_0.9.1_85
  • Release_0.9.2_86
81 results
Show changes
107 files
+ 510
391
Compare changes
  • Side-by-side
  • Inline

Files

Original line number Original line Diff line number Diff line
org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.useAndroidX=true
android.enableJetifier=true
android.enableJetifier=true
app.versionName=0.1.6
app.versionName=0.1.7
app.versionCode=55
app.versionCode=56
Original line number Original line Diff line number Diff line
@@ -9,8 +9,18 @@ CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
BASE_DIR="$(dirname "${CURRENT_DIR}")"
BASE_DIR="$(dirname "${CURRENT_DIR}")"


SOURCE="${CURRENT_DIR}/icon.svg"
SOURCE="${CURRENT_DIR}/icon.svg"
SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg"

OPTIPNG_OPTIONS="-preserve -quiet -o7"
OPTIPNG_OPTIONS="-preserve -quiet -o7"


if [ ! -f "${SOURCE}" ]; then
  echo "Missing file: ${SOURCE}"
fi

if [ ! -f "${SOURCE_FASTLANE}" ]; then
  echo "Missing file: ${SOURCE_FASTLANE}"
fi

# optimize svg
# optimize svg
cp ${SOURCE} ${SOURCE}.tmp
cp ${SOURCE} ${SOURCE}.tmp
scour \
scour \
@@ -19,6 +29,7 @@ scour \
    --enable-viewboxing \
    --enable-viewboxing \
    --enable-comment-stripping \
    --enable-comment-stripping \
    --nindent=4 \
    --nindent=4 \
    --quiet \
    -i ${SOURCE}.tmp \
    -i ${SOURCE}.tmp \
    -o ${SOURCE}
    -o ${SOURCE}
rm ${SOURCE}.tmp
rm ${SOURCE}.tmp
@@ -28,6 +39,8 @@ function build_icon() {
  ICON_SIZE="$1"
  ICON_SIZE="$1"
  TARGET="$2"
  TARGET="$2"


  echo "Building ${TARGET}"

  TARGET_PNG="${TARGET}.png"
  TARGET_PNG="${TARGET}.png"


  inkscape \
  inkscape \
@@ -45,7 +58,7 @@ function build_fastlane_image() {
  HEIGHT="$2"
  HEIGHT="$2"
  TARGET="$3"
  TARGET="$3"


  SOURCE_FASTLANE="${CURRENT_DIR}/featureGraphic.svg"
  echo "Building ${TARGET}"


  cp ${SOURCE_FASTLANE} ${SOURCE_FASTLANE}.tmp
  cp ${SOURCE_FASTLANE} ${SOURCE_FASTLANE}.tmp
  scour \
  scour \
@@ -54,6 +67,7 @@ function build_fastlane_image() {
      --enable-viewboxing \
      --enable-viewboxing \
      --enable-comment-stripping \
      --enable-comment-stripping \
      --nindent=4 \
      --nindent=4 \
      --quiet \
      -i ${SOURCE_FASTLANE}.tmp \
      -i ${SOURCE_FASTLANE}.tmp \
      -o ${SOURCE_FASTLANE}
      -o ${SOURCE_FASTLANE}
  rm ${SOURCE_FASTLANE}.tmp
  rm ${SOURCE_FASTLANE}.tmp
Original line number Original line Diff line number Diff line
@@ -7,8 +7,59 @@ command -v optipng >/dev/null 2>&1 || { echo >&2 "I require optipng but it's not


CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
CURRENT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
BASE_DIR="$(dirname "${CURRENT_DIR}")"
BASE_DIR="$(dirname "${CURRENT_DIR}")"
ASSETS_DIR="${BASE_DIR}/assets"


OPTIPNG_OPTIONS="-preserve -quiet -o7"
OPTIPNG_OPTIONS="-preserve -quiet -o7"
ICON_SIZE=192

#######################################################

# Game images
AVAILABLE_GAME_IMAGES="
  button_back
  button_start
  button_help
  button_show_conflicts
  game_win
  placeholder
  cell_empty
"

# Settings images
AVAILABLES_GAME_SETTINGS="
  level:easy,medium,hard,nightmare
  size:2x2,3x2,3x3,4x4
"

# Skins
AVAILABLE_SKINS="
  default
  food
  monsters
  nature
"

# Images per skin
SKIN_IMAGES="
  1
  2
  3
  4
  5
  6
  7
  8
  9
  10
  11
  12
  13
  14
  15
  16
"

#######################################################


# optimize svg
# optimize svg
function optimize_svg() {
function optimize_svg() {
@@ -21,6 +72,7 @@ function optimize_svg() {
      --enable-viewboxing \
      --enable-viewboxing \
      --enable-comment-stripping \
      --enable-comment-stripping \
      --nindent=4 \
      --nindent=4 \
      --quiet \
      -i ${SOURCE}.tmp \
      -i ${SOURCE}.tmp \
      -o ${SOURCE}
      -o ${SOURCE}
  rm ${SOURCE}.tmp
  rm ${SOURCE}.tmp
@@ -28,10 +80,16 @@ function optimize_svg() {


# build icons
# build icons
function build_icon() {
function build_icon() {
  ICON_SIZE=192
  SOURCE="$1"
  SOURCE="$1"
  TARGET="$2"
  TARGET="$2"


  echo "Building ${TARGET}"

  if [ ! -f "${SOURCE}" ]; then
    echo "Missing file: ${SOURCE}"
    exit 1
  fi

  optimize_svg "${SOURCE}"
  optimize_svg "${SOURCE}"


  inkscape \
  inkscape \
@@ -43,36 +101,56 @@ function build_icon() {
  optipng ${OPTIPNG_OPTIONS} ${TARGET}
  optipng ${OPTIPNG_OPTIONS} ${TARGET}
}
}


function build_settings_icons() {
  INPUT_STRING="$1"

  SETTING_NAME="$(echo "${INPUT_STRING}" | cut -d":" -f1)"
  SETTING_VALUES="$(echo "${INPUT_STRING}" | cut -d":" -f2 | tr "," " ")"

  for SETTING_VALUE in ${SETTING_VALUES}
  do
    SETTING_CODE="${SETTING_NAME}_${SETTING_VALUE}"
    build_icon ${CURRENT_DIR}/${SETTING_CODE}.svg ${ASSETS_DIR}/icons/${SETTING_CODE}.png
  done
}

function build_icon_for_skin() {
function build_icon_for_skin() {
  SKIN_CODE="$1"
  SKIN_CODE="$1"


  build_icon ${CURRENT_DIR}/skin_${SKIN_CODE}.svg ${BASE_DIR}/assets/icons/skin_${SKIN_CODE}.png
  # skin main image
  for VALUE in {1..16};
  build_icon ${CURRENT_DIR}/skin_${SKIN_CODE}.svg ${ASSETS_DIR}/icons/skin_${SKIN_CODE}.png

  # skin images
  for SKIN_IMAGE in ${SKIN_IMAGES}
  do
  do
    if [ -f "${CURRENT_DIR}/skins/${SKIN_CODE}/${VALUE}.svg" ]; then
    build_icon ${CURRENT_DIR}/skins/${SKIN_CODE}/${SKIN_IMAGE}.svg ${ASSETS_DIR}/skins/${SKIN_CODE}_${SKIN_IMAGE}.png
      build_icon ${CURRENT_DIR}/skins/${SKIN_CODE}/${VALUE}.svg ${BASE_DIR}/assets/skins/${SKIN_CODE}_${VALUE}.png
    fi
  done
  done
}
}


# Game icons
#######################################################
build_icon ${CURRENT_DIR}/button_back.svg ${BASE_DIR}/assets/icons/button_back.png
build_icon ${CURRENT_DIR}/button_help.svg ${BASE_DIR}/assets/icons/button_help.png
build_icon ${CURRENT_DIR}/button_show_conflicts.svg ${BASE_DIR}/assets/icons/button_show_conflicts.png
build_icon ${CURRENT_DIR}/button_start.svg ${BASE_DIR}/assets/icons/button_start.png
build_icon ${CURRENT_DIR}/difficulty_easy.svg ${BASE_DIR}/assets/icons/difficulty_easy.png
build_icon ${CURRENT_DIR}/difficulty_medium.svg ${BASE_DIR}/assets/icons/difficulty_medium.png
build_icon ${CURRENT_DIR}/difficulty_hard.svg ${BASE_DIR}/assets/icons/difficulty_hard.png
build_icon ${CURRENT_DIR}/difficulty_nightmare.svg ${BASE_DIR}/assets/icons/difficulty_nightmare.png
build_icon ${CURRENT_DIR}/game_win.svg ${BASE_DIR}/assets/icons/game_win.png
build_icon ${CURRENT_DIR}/size_2x2.svg ${BASE_DIR}/assets/icons/size_2x2.png
build_icon ${CURRENT_DIR}/size_3x2.svg ${BASE_DIR}/assets/icons/size_3x2.png
build_icon ${CURRENT_DIR}/size_3x3.svg ${BASE_DIR}/assets/icons/size_3x3.png
build_icon ${CURRENT_DIR}/size_4x4.svg ${BASE_DIR}/assets/icons/size_4x4.png
build_icon ${CURRENT_DIR}/skins/empty.svg ${BASE_DIR}/assets/skins/empty.png


# Skins
# Create output folders
build_icon_for_skin "default"
mkdir -p ${ASSETS_DIR}/icons
build_icon_for_skin "food"
mkdir -p ${ASSETS_DIR}/skins
build_icon_for_skin "monsters"

build_icon_for_skin "nature"
# Delete existing generated images
find ${ASSETS_DIR}/icons -type f -name "*.png" -delete
find ${ASSETS_DIR}/skins -type f -name "*.png" -delete

# build game images
for GAME_IMAGE in ${AVAILABLE_GAME_IMAGES}
do
  build_icon ${CURRENT_DIR}/${GAME_IMAGE}.svg ${ASSETS_DIR}/icons/${GAME_IMAGE}.png
done

# build settings images
for GAME_SETTING in ${AVAILABLES_GAME_SETTINGS}
do
  build_settings_icons "${GAME_SETTING}"
done

# build skins images
for SKIN in ${AVAILABLE_SKINS}
do
  build_icon_for_skin "${SKIN}"
done