mirror of
https://github.com/luksamuk/engine-psx.git
synced 2025-04-28 13:28:02 +03:00
Move all .VAG encoding to makefile
This commit is contained in:
parent
d04f0fa4b1
commit
52a6aa42ef
2 changed files with 21 additions and 22 deletions
30
Makefile
30
Makefile
|
@ -11,6 +11,7 @@ LVLSRC := $(shell ls ./assets/levels/**/Z*.tmx)
|
||||||
MDLSRC := $(shell ls ./assets/models/**/*.rsd)
|
MDLSRC := $(shell ls ./assets/models/**/*.rsd)
|
||||||
PRLSRC := $(shell ls ./assets/levels/**/parallax.toml)
|
PRLSRC := $(shell ls ./assets/levels/**/parallax.toml)
|
||||||
XASRC := $(shell ls ./assets/bgm/*.txt)
|
XASRC := $(shell ls ./assets/bgm/*.txt)
|
||||||
|
VAGSRC := $(shell ls ./assets/sfx/*.ogg)
|
||||||
|
|
||||||
MAP16OUT := $(addsuffix MAP16.MAP,$(dir $(MAP16SRC)))
|
MAP16OUT := $(addsuffix MAP16.MAP,$(dir $(MAP16SRC)))
|
||||||
COL16OUT := $(addsuffix MAP16.COL,$(dir $(COL16SRC)))
|
COL16OUT := $(addsuffix MAP16.COL,$(dir $(COL16SRC)))
|
||||||
|
@ -20,6 +21,7 @@ OMPOUT := $(addsuffix .OMP,$(basename $(LVLSRC)))
|
||||||
MDLOUT := $(addsuffix .mdl,$(basename $(MDLSRC)))
|
MDLOUT := $(addsuffix .mdl,$(basename $(MDLSRC)))
|
||||||
PRLOUT := $(addsuffix PRL.PRL,$(dir $(PRLSRC)))
|
PRLOUT := $(addsuffix PRL.PRL,$(dir $(PRLSRC)))
|
||||||
XAOUT := $(addsuffix .XA,$(basename $(XASRC)))
|
XAOUT := $(addsuffix .XA,$(basename $(XASRC)))
|
||||||
|
VAGOUT := $(addsuffix .VAG,$(basename $(VAGSRC)))
|
||||||
|
|
||||||
.PHONY: clean ${CUESHEET} run configure chd cook iso elf debug cooktest purge rebuild repack packrun
|
.PHONY: clean ${CUESHEET} run configure chd cook iso elf debug cooktest purge rebuild repack packrun
|
||||||
|
|
||||||
|
@ -106,11 +108,12 @@ mdls: $(MDLOUT)
|
||||||
map16: $(MAP16OUT) $(COL16OUT)
|
map16: $(MAP16OUT) $(COL16OUT)
|
||||||
map128: $(MAP128OUT)
|
map128: $(MAP128OUT)
|
||||||
lvl: $(LVLOUT)
|
lvl: $(LVLOUT)
|
||||||
prl: $(PRLOUT)
|
prl: $(PRLOUT)
|
||||||
objs: $(OMPOUT)
|
objs: $(OMPOUT)
|
||||||
xa: $(XAOUT)
|
xa: $(XAOUT)
|
||||||
|
vag: $(VAGOUT)
|
||||||
|
|
||||||
cook: mdls map16 map128 lvl objs prl xa
|
cook: mdls map16 map128 lvl objs prl vag xa
|
||||||
|
|
||||||
cleancook:
|
cleancook:
|
||||||
rm -rf assets/models/**/*.mdl \
|
rm -rf assets/models/**/*.mdl \
|
||||||
|
@ -125,26 +128,28 @@ cleancook:
|
||||||
assets/levels/**/tilemap128_solid.csv \
|
assets/levels/**/tilemap128_solid.csv \
|
||||||
assets/levels/**/tilemap128_oneway.csv \
|
assets/levels/**/tilemap128_oneway.csv \
|
||||||
assets/levels/**/tilemap128_front.csv \
|
assets/levels/**/tilemap128_front.csv \
|
||||||
|
assets/sfx/*.WAV \
|
||||||
|
assets/sfx/*.VAG \
|
||||||
assets/bgm/*.XA \
|
assets/bgm/*.XA \
|
||||||
assets/bgm/*.xa
|
assets/bgm/*.xa
|
||||||
|
|
||||||
# Object models
|
# =========== Object models ===========
|
||||||
%.mdl: %.rsd %.ply %.mat
|
%.mdl: %.rsd %.ply %.mat
|
||||||
./tools/convrsd/convrsd.py $<
|
./tools/convrsd/convrsd.py $<
|
||||||
|
|
||||||
# 16x16 tile mapping
|
# =========== 16x16 tile mapping ===========
|
||||||
# (Depends on mapping generated on Aseprite)
|
# (Depends on mapping generated on Aseprite)
|
||||||
%/MAP16.MAP: %/map16.json
|
%/MAP16.MAP: %/map16.json
|
||||||
./tools/framepacker.py --tilemap $< $@
|
./tools/framepacker.py --tilemap $< $@
|
||||||
|
|
||||||
# 16x16 collision
|
# =========== 16x16 collision ===========
|
||||||
# (Depends on tiles16.tsx tile map with collision data, generated on Tiled).
|
# (Depends on tiles16.tsx tile map with collision data, generated on Tiled).
|
||||||
%/MAP16.COL: %/tiles16.tsx
|
%/MAP16.COL: %/tiles16.tsx
|
||||||
tiled --export-tileset $< "$(dir $<)collision16.json"
|
tiled --export-tileset $< "$(dir $<)collision16.json"
|
||||||
./tools/cookcollision.py "$(dir $<)collision16.json" $@
|
./tools/cookcollision.py "$(dir $<)collision16.json" $@
|
||||||
rm "$(dir $@)collision16.json"
|
rm "$(dir $@)collision16.json"
|
||||||
|
|
||||||
# 128x128 tile mapping
|
# =========== 128x128 tile mapping ===========
|
||||||
# Also generates 128.png to create a 128x128 tileset (should be done manually)
|
# Also generates 128.png to create a 128x128 tileset (should be done manually)
|
||||||
# (Depends on tilemap128.tmx map generated on Tiled)
|
# (Depends on tilemap128.tmx map generated on Tiled)
|
||||||
%/MAP128.MAP: %/tilemap128.tmx
|
%/MAP128.MAP: %/tilemap128.tmx
|
||||||
|
@ -157,7 +162,7 @@ cleancook:
|
||||||
rm -f "$(basename $<)_none.psxcsv"
|
rm -f "$(basename $<)_none.psxcsv"
|
||||||
rm -f "$(basename $<)_front.psxcsv"
|
rm -f "$(basename $<)_front.psxcsv"
|
||||||
|
|
||||||
# Level maps
|
# =========== Level maps ===========
|
||||||
# These maps should use a tileset generated from "128.png".
|
# These maps should use a tileset generated from "128.png".
|
||||||
# (Depends on files such as Z1.tmx, Z2.tmx, etc., generated on Tiled)
|
# (Depends on files such as Z1.tmx, Z2.tmx, etc., generated on Tiled)
|
||||||
%.LVL: %.tmx
|
%.LVL: %.tmx
|
||||||
|
@ -166,16 +171,23 @@ cleancook:
|
||||||
rm "$(basename $@).psxlvl"
|
rm "$(basename $@).psxlvl"
|
||||||
|
|
||||||
|
|
||||||
# Object level placement
|
# =========== Object level placement ===========
|
||||||
# (Depends on files such as Z1.tmx, Z2.tmx, etc., generated on Tiled)
|
# (Depends on files such as Z1.tmx, Z2.tmx, etc., generated on Tiled)
|
||||||
%.OMP: %.tmx
|
%.OMP: %.tmx
|
||||||
./tools/cookobj/cookobj.py $<
|
./tools/cookobj/cookobj.py $<
|
||||||
|
|
||||||
# Level parallax data
|
# =========== Level parallax data ===========
|
||||||
# (Depends on a specific file named parallax.toml within level directory)
|
# (Depends on a specific file named parallax.toml within level directory)
|
||||||
%/PRL.PRL: %/parallax.toml
|
%/PRL.PRL: %/parallax.toml
|
||||||
./tools/buildprl/buildprl.py $<
|
./tools/buildprl/buildprl.py $<
|
||||||
|
|
||||||
|
# =========== VAG audio encoding ===========
|
||||||
|
%.VAG: %.ogg
|
||||||
|
ffmpeg -loglevel quiet -y -i "$<" -acodec pcm_s16le -ac 1 -ar 22050 "$(basename $<).WAV"
|
||||||
|
wav2vag "$(basename $<).WAV" "$@"
|
||||||
|
@rm "$(basename $<).WAV"
|
||||||
|
|
||||||
|
# =========== XA audio encoding ===========
|
||||||
# Individual file XA songs
|
# Individual file XA songs
|
||||||
%.xa: %.flac
|
%.xa: %.flac
|
||||||
psxavenc -f 37800 -t xa -b 4 -c 2 -F 1 -C 0 $< $@
|
psxavenc -f 37800 -t xa -b 4 -c 2 -F 1 -C 0 $< $@
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
for f in *.ogg; do
|
|
||||||
ffmpeg -y -i "$f" -acodec pcm_s16le -ac 1 -ar 22050 "${f%%.ogg}.WAV";
|
|
||||||
wav2vag "${f%%.ogg}.WAV" "${f%%.ogg}.VAG";
|
|
||||||
rm "${f%%.ogg}.WAV";
|
|
||||||
done
|
|
||||||
|
|
||||||
# for f in *.wav; do
|
|
||||||
# ffmpeg -y -i "$f" -acodec pcm_s16le -ac 1 -ar 22050 "${f%%.wav}_2.WAV";
|
|
||||||
# wav2vag "${f%%.wav}_2.WAV" "${f%%.wav}.VAG";
|
|
||||||
# rm "${f%%.wav}_2.WAV";
|
|
||||||
# done
|
|
Loading…
Add table
Add a link
Reference in a new issue