mirror of
https://github.com/freedoom/freedoom.git
synced 2025-08-31 02:16:55 -04:00
automatically generate a GIMP-compatible palette file
Either `make gimp-palette` or `make doom.gpl` will convert the playpal lump into a file that can be imported into GIMP for paletted image modes.
This commit is contained in:
parent
d9c68f376a
commit
383854430b
5 changed files with 29 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -15,6 +15,7 @@
|
|||
.\#*
|
||||
\#*\#
|
||||
wad*.txt
|
||||
doom.gpl
|
||||
|
||||
# Per directory patterns to ignore. These do not apply recursively to
|
||||
# subdirectories. Each line should begin with "[!]/". Please keep the
|
||||
|
|
8
Makefile
8
Makefile
|
@ -102,8 +102,14 @@ else
|
|||
JSON=$(JSON) VERSION=$(VERSION) scripts/makejson
|
||||
endif
|
||||
|
||||
doom.gpl: lumps/playpal/playpal-base.lmp
|
||||
$(MAKE) -C lumps/playpal $@
|
||||
mv lumps/playpal/$@ .
|
||||
|
||||
gimp-palette: doom.gpl
|
||||
|
||||
clean: wad-image-clean
|
||||
$(RM) *.html $(OBJS) \
|
||||
$(RM) *.html doom.gpl $(OBJS) \
|
||||
./COPYING.txt ./CREDITS.txt \
|
||||
./wadinfo_phase1.txt \
|
||||
./wadinfo_phase2.txt \
|
||||
|
|
|
@ -2,7 +2,11 @@ playpal.lmp: playpal-base.lmp playpal
|
|||
./playpal playpal-base.lmp > playpal.lmp
|
||||
cp playpal.lmp ../
|
||||
|
||||
doom.gpl: playpal-base.lmp
|
||||
./gen-gimp-palette
|
||||
|
||||
clean:
|
||||
$(RM) playpal.lmp ../playpal.lmp
|
||||
$(RM) doom.gpl
|
||||
|
||||
.PHONY: clean
|
||||
|
|
|
@ -13,3 +13,6 @@ The input for the script is playpal-base.lmp which contains the default
|
|||
palette seen during normal gameplay. The script translates this palette
|
||||
into the various other forms which are shown in different situations.
|
||||
|
||||
There is additionally a “gen-gimp-palette” script that may be used to
|
||||
create a “doom.gpl” file suitable for importing into GIMP’s palette
|
||||
selection.
|
||||
|
|
14
lumps/playpal/gen-gimp-palette
Executable file
14
lumps/playpal/gen-gimp-palette
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Generates a file suitable for importing into GIMP based on
|
||||
# playpal-base.lmp, and placed into doom.gpl
|
||||
|
||||
# File header
|
||||
cat > doom.gpl <<EOF
|
||||
GIMP Palette
|
||||
Name: Doom
|
||||
Columns: 16
|
||||
#
|
||||
EOF
|
||||
|
||||
od -An -w3 -tu1 playpal-base.lmp >> doom.gpl
|
Loading…
Add table
Add a link
Reference in a new issue