Fixed null terminator not being written by `mkrlen`. The compatibility mode is necessary because many rlens are formatted weirdly, and I couldn't find any algorithm to follow that would result in their format. Also only figured out it has a null terminator because without it there's a map part that's a multiple of `0x800` and it was missing a sector.
25 lines
434 B
Bash
Executable File
25 lines
434 B
Bash
Executable File
#!/bin/env bash
|
|
|
|
set -e
|
|
|
|
DIR="$(basename "$(dirname "$1")")"
|
|
FILE="$(basename "$1")"
|
|
|
|
COMPATIBILITY="${DIR%PACK}.${FILE%.bin}"
|
|
OUTPUT="${1%.bin}.out.bin"
|
|
|
|
#cargo build \
|
|
# --manifest-path=tools/Cargo.toml \
|
|
# --release \
|
|
# -p ddw3-unrlen \
|
|
# -p ddw3-mkrlen
|
|
|
|
./tools/target/release/ddw3-unrlen "$1" \
|
|
--output "$OUTPUT"
|
|
|
|
./tools/target/release/ddw3-mkrlen "$OUTPUT" \
|
|
--compatibility "$COMPATIBILITY" \
|
|
--output "$1"
|
|
|
|
#rm "$OUTPUT"
|