diff --git a/progress.ods b/progress.ods index 6e16686..35ea9a5 100644 Binary files a/progress.ods and b/progress.ods differ diff --git a/resources/gfx/characters/character_002_magdalenehead.anm2 b/resources/gfx/characters/character_002_magdalenehead.anm2 new file mode 100644 index 0000000..a28df89 --- /dev/null +++ b/resources/gfx/characters/character_002_magdalenehead.anm2 @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/gfx/characters/character_003_cainseyepatch.anm2 b/resources/gfx/characters/character_003_cainseyepatch.anm2 new file mode 100644 index 0000000..056ed18 --- /dev/null +++ b/resources/gfx/characters/character_003_cainseyepatch.anm2 @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/gfx/characters/character_004_judasfez.anm2 b/resources/gfx/characters/character_004_judasfez.anm2 new file mode 100644 index 0000000..1f1b641 --- /dev/null +++ b/resources/gfx/characters/character_004_judasfez.anm2 @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/gfx/characters/costumes/character_001_isaac.png b/resources/gfx/characters/costumes/character_001_isaac.png index 024a588..9683b53 100644 Binary files a/resources/gfx/characters/costumes/character_001_isaac.png and b/resources/gfx/characters/costumes/character_001_isaac.png differ diff --git a/resources/gfx/characters/costumes/character_001_isaac_black.png b/resources/gfx/characters/costumes/character_001_isaac_black.png index 7523a94..42fd7e3 100644 Binary files a/resources/gfx/characters/costumes/character_001_isaac_black.png and b/resources/gfx/characters/costumes/character_001_isaac_black.png differ diff --git a/resources/gfx/characters/costumes/character_001_isaac_blue.png b/resources/gfx/characters/costumes/character_001_isaac_blue.png index d511e01..705b4cf 100644 Binary files a/resources/gfx/characters/costumes/character_001_isaac_blue.png and b/resources/gfx/characters/costumes/character_001_isaac_blue.png differ diff --git a/resources/gfx/characters/costumes/character_001_isaac_green.png b/resources/gfx/characters/costumes/character_001_isaac_green.png index 88ceb99..6e6b31b 100644 Binary files a/resources/gfx/characters/costumes/character_001_isaac_green.png and b/resources/gfx/characters/costumes/character_001_isaac_green.png differ diff --git a/resources/gfx/characters/costumes/character_001_isaac_grey.png b/resources/gfx/characters/costumes/character_001_isaac_grey.png index 6b35d57..56eafe5 100644 Binary files a/resources/gfx/characters/costumes/character_001_isaac_grey.png and b/resources/gfx/characters/costumes/character_001_isaac_grey.png differ diff --git a/resources/gfx/characters/costumes/character_001_isaac_red.png b/resources/gfx/characters/costumes/character_001_isaac_red.png index b26b6ee..c6b2026 100644 Binary files a/resources/gfx/characters/costumes/character_001_isaac_red.png and b/resources/gfx/characters/costumes/character_001_isaac_red.png differ diff --git a/resources/gfx/characters/costumes/character_001_isaac_white.png b/resources/gfx/characters/costumes/character_001_isaac_white.png index 788fc66..294cb0c 100644 Binary files a/resources/gfx/characters/costumes/character_001_isaac_white.png and b/resources/gfx/characters/costumes/character_001_isaac_white.png differ diff --git a/resources/gfx/characters/costumes/character_002_magdalene.png b/resources/gfx/characters/costumes/character_002_magdalene.png index 3beede4..339f2d1 100644 Binary files a/resources/gfx/characters/costumes/character_002_magdalene.png and b/resources/gfx/characters/costumes/character_002_magdalene.png differ diff --git a/resources/gfx/characters/costumes/character_002_magdalene_black.png b/resources/gfx/characters/costumes/character_002_magdalene_black.png new file mode 100644 index 0000000..5c53a21 Binary files /dev/null and b/resources/gfx/characters/costumes/character_002_magdalene_black.png differ diff --git a/resources/gfx/characters/costumes/character_002_magdalene_blue.png b/resources/gfx/characters/costumes/character_002_magdalene_blue.png new file mode 100644 index 0000000..a2d54b8 Binary files /dev/null and b/resources/gfx/characters/costumes/character_002_magdalene_blue.png differ diff --git a/resources/gfx/characters/costumes/character_002_magdalene_green.png b/resources/gfx/characters/costumes/character_002_magdalene_green.png new file mode 100644 index 0000000..7906b58 Binary files /dev/null and b/resources/gfx/characters/costumes/character_002_magdalene_green.png differ diff --git a/resources/gfx/characters/costumes/character_002_magdalene_grey.png b/resources/gfx/characters/costumes/character_002_magdalene_grey.png new file mode 100644 index 0000000..f446cf4 Binary files /dev/null and b/resources/gfx/characters/costumes/character_002_magdalene_grey.png differ diff --git a/resources/gfx/characters/costumes/character_002_magdalene_red.png b/resources/gfx/characters/costumes/character_002_magdalene_red.png new file mode 100644 index 0000000..5402e29 Binary files /dev/null and b/resources/gfx/characters/costumes/character_002_magdalene_red.png differ diff --git a/resources/gfx/characters/costumes/character_002_magdalene_white.png b/resources/gfx/characters/costumes/character_002_magdalene_white.png new file mode 100644 index 0000000..0477904 Binary files /dev/null and b/resources/gfx/characters/costumes/character_002_magdalene_white.png differ diff --git a/resources/gfx/characters/costumes/character_002_maggiesbeautifulgoldenlocks.png b/resources/gfx/characters/costumes/character_002_maggiesbeautifulgoldenlocks.png index 082a528..24f97eb 100644 Binary files a/resources/gfx/characters/costumes/character_002_maggiesbeautifulgoldenlocks.png and b/resources/gfx/characters/costumes/character_002_maggiesbeautifulgoldenlocks.png differ diff --git a/resources/gfx/characters/costumes/character_003_cain.png b/resources/gfx/characters/costumes/character_003_cain.png new file mode 100644 index 0000000..6ffa632 Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cain.png differ diff --git a/resources/gfx/characters/costumes/character_003_cain_black.png b/resources/gfx/characters/costumes/character_003_cain_black.png new file mode 100644 index 0000000..7b22bc5 Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cain_black.png differ diff --git a/resources/gfx/characters/costumes/character_003_cain_blue.png b/resources/gfx/characters/costumes/character_003_cain_blue.png new file mode 100644 index 0000000..f7363b5 Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cain_blue.png differ diff --git a/resources/gfx/characters/costumes/character_003_cain_green.png b/resources/gfx/characters/costumes/character_003_cain_green.png new file mode 100644 index 0000000..8f33b18 Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cain_green.png differ diff --git a/resources/gfx/characters/costumes/character_003_cain_grey.png b/resources/gfx/characters/costumes/character_003_cain_grey.png new file mode 100644 index 0000000..3556028 Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cain_grey.png differ diff --git a/resources/gfx/characters/costumes/character_003_cain_red.png b/resources/gfx/characters/costumes/character_003_cain_red.png new file mode 100644 index 0000000..3838595 Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cain_red.png differ diff --git a/resources/gfx/characters/costumes/character_003_cain_white.png b/resources/gfx/characters/costumes/character_003_cain_white.png new file mode 100644 index 0000000..385f1a5 Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cain_white.png differ diff --git a/resources/gfx/characters/costumes/character_003_cainseyepatch.png b/resources/gfx/characters/costumes/character_003_cainseyepatch.png new file mode 100644 index 0000000..05ba54c Binary files /dev/null and b/resources/gfx/characters/costumes/character_003_cainseyepatch.png differ diff --git a/resources/gfx/characters/costumes/character_004_judas.png b/resources/gfx/characters/costumes/character_004_judas.png new file mode 100644 index 0000000..b2f1f43 Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judas.png differ diff --git a/resources/gfx/characters/costumes/character_004_judas_black.png b/resources/gfx/characters/costumes/character_004_judas_black.png new file mode 100644 index 0000000..889a5b6 Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judas_black.png differ diff --git a/resources/gfx/characters/costumes/character_004_judas_blue.png b/resources/gfx/characters/costumes/character_004_judas_blue.png new file mode 100644 index 0000000..f6f2e04 Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judas_blue.png differ diff --git a/resources/gfx/characters/costumes/character_004_judas_green.png b/resources/gfx/characters/costumes/character_004_judas_green.png new file mode 100644 index 0000000..0271d32 Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judas_green.png differ diff --git a/resources/gfx/characters/costumes/character_004_judas_grey.png b/resources/gfx/characters/costumes/character_004_judas_grey.png new file mode 100644 index 0000000..7c577ba Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judas_grey.png differ diff --git a/resources/gfx/characters/costumes/character_004_judas_red.png b/resources/gfx/characters/costumes/character_004_judas_red.png new file mode 100644 index 0000000..fc62987 Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judas_red.png differ diff --git a/resources/gfx/characters/costumes/character_004_judas_white.png b/resources/gfx/characters/costumes/character_004_judas_white.png new file mode 100644 index 0000000..f83f445 Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judas_white.png differ diff --git a/resources/gfx/characters/costumes/character_004_judasfez.png b/resources/gfx/characters/costumes/character_004_judasfez.png new file mode 100644 index 0000000..c3591d9 Binary files /dev/null and b/resources/gfx/characters/costumes/character_004_judasfez.png differ diff --git a/resources/gfx/characters/costumes/make_character_color_variants.sh b/resources/gfx/characters/costumes/make_character_color_variants.sh new file mode 100755 index 0000000..bb36e74 --- /dev/null +++ b/resources/gfx/characters/costumes/make_character_color_variants.sh @@ -0,0 +1,140 @@ +#!/usr/bin/env bash +set -euo pipefail + +variants=(black blue green grey red white) +references=(character_001_isaac character_002_magdalene) + +usage() { + printf 'Usage: %s INPUT.png\n' "$(basename "$0")" >&2 +} + +if [[ $# -ne 1 || "${1:-}" == "-h" || "${1:-}" == "--help" ]]; then + usage + exit 1 +fi + +if command -v magick >/dev/null 2>&1; then + im=(magick) +elif command -v convert >/dev/null 2>&1; then + im=(convert) +else + printf 'error: ImageMagick is required; expected magick or convert in PATH\n' >&2 + exit 1 +fi + +script_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)" +input="$1" + +if [[ ! -f "$input" ]]; then + printf 'error: input file not found: %s\n' "$input" >&2 + exit 1 +fi + +case "$(basename -- "$input")" in + *.png|*.PNG) ;; + *) + printf 'error: input must be a PNG file: %s\n' "$input" >&2 + exit 1 + ;; +esac + +for reference in "${references[@]}"; do + reference_base="$script_dir/${reference}.png" + if [[ ! -f "$reference_base" ]]; then + printf 'error: missing reference file: %s\n' "$reference_base" >&2 + exit 1 + fi +done + +input_dir="$(cd -- "$(dirname -- "$input")" && pwd)" +input_name="$(basename -- "$input")" +stem="${input_name%.*}" + +case "$stem" in + *_black|*_blue|*_green|*_grey|*_red|*_white) + stem="${stem%_*}" + ;; +esac + +build_palette_map() { + local variant="$1" + local reference + local reference_base + local reference_variant + + for reference in "${references[@]}"; do + reference_base="$script_dir/${reference}.png" + reference_variant="$script_dir/${reference}_${variant}.png" + + if [[ ! -f "$reference_variant" ]]; then + printf 'error: missing reference file: %s\n' "$reference_variant" >&2 + return 1 + fi + + paste \ + <("${im[@]}" "$reference_base" -depth 8 txt:-) \ + <("${im[@]}" "$reference_variant" -depth 8 txt:-) | + awk -F '\t' -v reference="$reference" ' + function pixel_hex(line, parts, count, i) { + count = split(line, parts, /[[:space:]]+/) + for (i = 1; i <= count; i++) { + if (parts[i] ~ /^#[[:xdigit:]]{6}([[:xdigit:]]{2})?$/) { + return toupper(parts[i]) + } + } + return "" + } + + NR == 1 { next } + + { + source = pixel_hex($1) + target = pixel_hex($2) + if (source == "" || target == "" || source == target) { + next + } + print source, target, reference + } + ' + done | + awk ' + { + source = $1 + target = $2 + reference = $3 + if ((source in targets) && targets[source] != target) { + printf "error: conflicting map for %s: %s from %s and %s from %s\n", source, targets[source], sources[source], target, reference > "/dev/stderr" + exit 2 + } + targets[source] = target + sources[source] = reference + } + + END { + for (source in targets) { + print source, targets[source] + } + } + ' | + sort +} + +for variant in "${variants[@]}"; do + output="$input_dir/${stem}_${variant}.png" + args=("$input" -alpha on) + pair_count=0 + + while read -r source target; do + [[ -n "$source" && -n "$target" ]] || continue + args+=(-fill "$target" -opaque "$source") + pair_count=$((pair_count + 1)) + done < <(build_palette_map "$variant") + + if [[ "$pair_count" -eq 0 ]]; then + printf 'error: no palette replacements found for %s\n' "$variant" >&2 + exit 1 + fi + + "${im[@]}" "${args[@]}" "$output" + printf 'exported %s\n' "$output" +done diff --git a/resources/gfx/monsters/repentance/bone_fly_champion.png b/resources/gfx/monsters/repentance/bone_fly_champion.png index 5fca4d4..fde3119 100644 Binary files a/resources/gfx/monsters/repentance/bone_fly_champion.png and b/resources/gfx/monsters/repentance/bone_fly_champion.png differ