Files
ddw3/tools/repack-rlen.sh
Filipe Rodrigues 38427e80d3 Added compatibility mode to mkrlen.
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.
2023-10-11 19:01:07 +01:00

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"