nitro-engine/examples/loading/filesystem_multiple_textures/assets.sh
Antonio Niño Díaz d52a92812e examples: Use BLOCKSDS environment variables to find tools
Only use the hardcoded paths if the variable isn't set to anything.
2025-03-24 21:18:00 +00:00

27 lines
546 B
Bash

#!/bin/sh
NITRO_ENGINE=../../..
ASSETS=$NITRO_ENGINE/examples/assets
TOOLS=$NITRO_ENGINE/tools
OBJ2DL=$TOOLS/obj2dl/obj2dl.py
BLOCKSDS="${BLOCKSDS:-/opt/blocksds/core/}"
GRIT=$BLOCKSDS/tools/grit/grit
rm -rf nitrofiles
mkdir -p nitrofiles
python3 $OBJ2DL \
--input $ASSETS/cube.obj \
--output nitrofiles/cube.bin \
--texture 64 64
$GRIT \
graphics/spiral_blue_pal32.png \
-ftb -fh! -W1 \
-onitrofiles/spiral_blue_pal32
$GRIT \
graphics/spiral_red_pal32.png \
-ftb -fh! -W1 \
-onitrofiles/spiral_red_pal32