-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7db7b34
commit 9cb3870
Showing
30 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
] | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; |