#!/bin/sh # SPDX-License-Identifier: GPL-3.0-or-later printf '/* SPDX-License-Identifier: GPL-3.0-or-later */\n' printf '#pragma once\n' printf '#include \n\n' printf 'static const uint16_t filepaths[][64] = {\n' cd assets/levels for PACK in *; do PACK_NAME="$(basename $PACK)" cd "$PACK" for LEVEL in *; do LEVEL_NAME="$(basename $LEVEL | cut -c2- | awk -F '.' '{print $1}')" [ -z "$LEVEL_NAMES" ] && LEVEL_NAMES=" \"$LEVEL_NAME\"" || LEVEL_NAMES="$LEVEL_NAMES, \"$LEVEL_NAME\"" printf 'u"\\\\\\\\fls0\\\\mtem\\\\%s\\\\' "$PACK_NAME" printf '%s",\n' "$LEVEL" done cd .. done printf '};\n' printf 'static const char level_names[][32] = { %s\n};\n' "$LEVEL_NAMES"