diff --git a/data-with-overlays/challenging/bounds.json b/data-with-overlays/challenging/bounds.json new file mode 100644 index 000000000..446bdadd2 --- /dev/null +++ b/data-with-overlays/challenging/bounds.json @@ -0,0 +1,28 @@ +{ + "xMin": 31744, + "xMax": 34048, + "yMin": 30976, + "yMax": 32768, + "zMin": 0, + "zMax": 15, + "width": 2560, + "height": 2048, + "floorIDs": [ + "00", + "01", + "02", + "03", + "04", + "05", + "06", + "07", + "08", + "09", + "10", + "11", + "12", + "13", + "14", + "15" + ] +} diff --git a/data-with-overlays/challenging/floor-00-map.png b/data-with-overlays/challenging/floor-00-map.png new file mode 100644 index 000000000..9a2d919f9 Binary files /dev/null and b/data-with-overlays/challenging/floor-00-map.png differ diff --git a/data-with-overlays/challenging/floor-01-map.png b/data-with-overlays/challenging/floor-01-map.png new file mode 100644 index 000000000..d49ccaec8 Binary files /dev/null and b/data-with-overlays/challenging/floor-01-map.png differ diff --git a/data-with-overlays/challenging/floor-02-map.png b/data-with-overlays/challenging/floor-02-map.png new file mode 100644 index 000000000..ea4ee2f37 Binary files /dev/null and b/data-with-overlays/challenging/floor-02-map.png differ diff --git a/data-with-overlays/challenging/floor-03-map.png b/data-with-overlays/challenging/floor-03-map.png new file mode 100644 index 000000000..975c8e2cc Binary files /dev/null and b/data-with-overlays/challenging/floor-03-map.png differ diff --git a/data-with-overlays/challenging/floor-04-map.png b/data-with-overlays/challenging/floor-04-map.png new file mode 100644 index 000000000..fe6e6a493 Binary files /dev/null and b/data-with-overlays/challenging/floor-04-map.png differ diff --git a/data-with-overlays/challenging/floor-05-map.png b/data-with-overlays/challenging/floor-05-map.png new file mode 100644 index 000000000..c39b28cba Binary files /dev/null and b/data-with-overlays/challenging/floor-05-map.png differ diff --git a/data-with-overlays/challenging/floor-06-map.png b/data-with-overlays/challenging/floor-06-map.png new file mode 100644 index 000000000..5b7b74e34 Binary files /dev/null and b/data-with-overlays/challenging/floor-06-map.png differ diff --git a/data-with-overlays/challenging/floor-07-map.png b/data-with-overlays/challenging/floor-07-map.png new file mode 100644 index 000000000..366fc7f63 Binary files /dev/null and b/data-with-overlays/challenging/floor-07-map.png differ diff --git a/data-with-overlays/challenging/floor-08-map.png b/data-with-overlays/challenging/floor-08-map.png new file mode 100644 index 000000000..e458a19ab Binary files /dev/null and b/data-with-overlays/challenging/floor-08-map.png differ diff --git a/data-with-overlays/challenging/floor-09-map.png b/data-with-overlays/challenging/floor-09-map.png new file mode 100644 index 000000000..526edc409 Binary files /dev/null and b/data-with-overlays/challenging/floor-09-map.png differ diff --git a/data-with-overlays/challenging/floor-10-map.png b/data-with-overlays/challenging/floor-10-map.png new file mode 100644 index 000000000..30ce6d27d Binary files /dev/null and b/data-with-overlays/challenging/floor-10-map.png differ diff --git a/data-with-overlays/challenging/floor-11-map.png b/data-with-overlays/challenging/floor-11-map.png new file mode 100644 index 000000000..6be60967a Binary files /dev/null and b/data-with-overlays/challenging/floor-11-map.png differ diff --git a/data-with-overlays/challenging/floor-12-map.png b/data-with-overlays/challenging/floor-12-map.png new file mode 100644 index 000000000..452b0a4ed Binary files /dev/null and b/data-with-overlays/challenging/floor-12-map.png differ diff --git a/data-with-overlays/challenging/floor-13-map.png b/data-with-overlays/challenging/floor-13-map.png new file mode 100644 index 000000000..b40168094 Binary files /dev/null and b/data-with-overlays/challenging/floor-13-map.png differ diff --git a/data-with-overlays/challenging/floor-14-map.png b/data-with-overlays/challenging/floor-14-map.png new file mode 100644 index 000000000..ff2fd64c2 Binary files /dev/null and b/data-with-overlays/challenging/floor-14-map.png differ diff --git a/data-with-overlays/challenging/floor-15-map.png b/data-with-overlays/challenging/floor-15-map.png new file mode 100644 index 000000000..1137b9466 Binary files /dev/null and b/data-with-overlays/challenging/floor-15-map.png differ diff --git a/overlays/challenging/floor-03.png b/overlays/challenging/floor-03.png new file mode 100644 index 000000000..6940b8f60 Binary files /dev/null and b/overlays/challenging/floor-03.png differ diff --git a/overlays/challenging/floor-04.png b/overlays/challenging/floor-04.png new file mode 100644 index 000000000..36e4c9f4f Binary files /dev/null and b/overlays/challenging/floor-04.png differ diff --git a/overlays/challenging/floor-05.png b/overlays/challenging/floor-05.png new file mode 100644 index 000000000..2664d32e0 Binary files /dev/null and b/overlays/challenging/floor-05.png differ diff --git a/overlays/challenging/floor-07.png b/overlays/challenging/floor-07.png new file mode 100644 index 000000000..dd6609417 Binary files /dev/null and b/overlays/challenging/floor-07.png differ diff --git a/overlays/challenging/floor-08.png b/overlays/challenging/floor-08.png new file mode 100644 index 000000000..4c867e6ac Binary files /dev/null and b/overlays/challenging/floor-08.png differ diff --git a/overlays/challenging/floor-09.png b/overlays/challenging/floor-09.png new file mode 100644 index 000000000..447beae99 Binary files /dev/null and b/overlays/challenging/floor-09.png differ diff --git a/overlays/challenging/floor-10.png b/overlays/challenging/floor-10.png new file mode 100644 index 000000000..a7019487c Binary files /dev/null and b/overlays/challenging/floor-10.png differ diff --git a/overlays/challenging/floor-11.png b/overlays/challenging/floor-11.png new file mode 100644 index 000000000..b9b5e7a21 Binary files /dev/null and b/overlays/challenging/floor-11.png differ diff --git a/overlays/challenging/floor-12.png b/overlays/challenging/floor-12.png new file mode 100644 index 000000000..c8478a478 Binary files /dev/null and b/overlays/challenging/floor-12.png differ diff --git a/overlays/challenging/floor-13.png b/overlays/challenging/floor-13.png new file mode 100644 index 000000000..fc93f1223 Binary files /dev/null and b/overlays/challenging/floor-13.png differ diff --git a/overlays/challenging/floor-14.png b/overlays/challenging/floor-14.png new file mode 100644 index 000000000..9c03457b0 Binary files /dev/null and b/overlays/challenging/floor-14.png differ diff --git a/overlays/challenging/floor-15.png b/overlays/challenging/floor-15.png new file mode 100644 index 000000000..60008dd36 Binary files /dev/null and b/overlays/challenging/floor-15.png differ diff --git a/scripts/apply-overlay.sh b/scripts/apply-overlay.sh new file mode 100755 index 000000000..dff6b0c95 --- /dev/null +++ b/scripts/apply-overlay.sh @@ -0,0 +1,42 @@ +#!/usr/bin/env bash + +# Navigate to the root of the repository. +cd "$(dirname "${BASH_SOURCE}")/.."; + +# Ensure `tibia-maps` is in the PATH on CI. +PATH="${PATH}:$(pwd)/node_modules/.bin"; + +if [ -z "${1}" ]; then + echo 'No argument supplied. Example usage:'; + echo ''; + echo 'scripts/apply-overlay.sh challenging'; + exit 0; +fi; + +if [ 'challenging' != "${1}" ]; then + echo "Invalid argument. Try 'challenging'."; + exit 0; +fi; + +overlayID="${1}"; +for floorID in 00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15; do + echo "Processing ${floorID}..."; + input_path="./data/floor-${floorID}-map.png"; + overlay_path="./overlays/${overlayID}/floor-${floorID}.png"; + mkdir -p "./data-with-overlays/${overlayID}"; + output_path="./data-with-overlays/${overlayID}/floor-${floorID}-map.png"; + if [ -f "${overlay_path}" ]; then + magick "${input_path}" \ + \( -clone 0 -fill black -colorize 60% \) \ + -compose over -gravity center -composite \ + "${overlay_path}" -gravity center -compose over -composite \ + "${output_path}"; + else + # No overlay image; only apply the darkening. + magick "${input_path}" \ + \( -clone 0 -fill black -colorize 60% \) \ + -compose over -gravity center -composite \ + "${output_path}"; + fi; +done; +cp ./data/bounds.json "./data-with-overlays/${overlayID}/bounds.json";