diff --git a/Makefile b/Makefile index f14c5c7..dd73d17 100644 --- a/Makefile +++ b/Makefile @@ -77,10 +77,10 @@ models: iqmtool palette ./Tools/build_models.sh $(GAME) gfx: imgtool palette - cd $(GAME)/gfxsrc/ && ls | grep -v palette\.lmp | grep \.xcf | xargs ../../imgtool --rgb8 --ext png - cd $(GAME)/gfxsrc/ && ls | grep -v palette\.png | grep \.png | xargs mogrify -type TrueColor -compress None -flip -format tga + cd $(GAME)/gfxsrc/ && ls | grep -v palette | grep \.xcf | xargs ../../imgtool --rgb8 --ext png + cd $(GAME)/gfxsrc/ && ls | grep -v palette | grep \.png | xargs mogrify -type TrueColor -compress None -flip -format tga cp $(GAME)/gfx/palette.lmp $(GAME)/gfxsrc/palette.lmp - cd $(GAME)/gfxsrc/ && ls | grep -v palette\.tga | grep \.tga | xargs ../../tga2lmp + cd $(GAME)/gfxsrc/ && ls | grep -v palette | grep \.tga | xargs ../../tga2lmp rm $(GAME)/gfxsrc/*.tga cp $(GAME)/gfx/palette.lmp $(GAME)/gfxsrc/palette.lmp rsync -va $(GAME)/gfxsrc/*.lmp $(GAME)/gfx/ @@ -110,14 +110,22 @@ qfiles: palette: pal2colormap tga2pal tga2lmp if [ ! -d $(GAME)/gfx ];then mkdir $(GAME)/gfx; fi - mogrify -type TrueColor -compress None -flip -format tga $(GAME)/gfxsrc/palette.png + convert $(GAME)/gfxsrc/palette.png -strokewidth 0 -fill "rgb( 255, 0, 255 )" -draw "rectangle 0,14 16,16" $(GAME)/gfxsrc/palette_nofb.png + convert $(GAME)/gfxsrc/palette.png -strokewidth 0 -fill "rgb( 255, 0, 255 )" -draw "rectangle 0,0 16,13" $(GAME)/gfxsrc/palette_fbonly.png + mogrify -type TrueColor -compress None -flip -format tga $(GAME)/gfxsrc/palette.png + mogrify -type TrueColor -compress None -flip -format tga $(GAME)/gfxsrc/palette_nofb.png + mogrify -type TrueColor -compress None -flip -format tga $(GAME)/gfxsrc/palette_fbonly.png cd $(GAME)/gfxsrc/ && ../../tga2pal palette.tga + cd $(GAME)/gfxsrc/ && ../../tga2pal palette_nofb.tga + cd $(GAME)/gfxsrc/ && ../../tga2pal palette_fbonly.tga cd $(GAME)/gfxsrc/ && ../../pal2colormap palette.lmp mv $(GAME)/gfxsrc/palette.lmp $(GAME)/gfx/palette.lmp + mv $(GAME)/gfxsrc/palette_nofb.lmp $(GAME)/gfx/palette_nofb.lmp mv $(GAME)/gfxsrc/colormap.lmp $(GAME)/gfx/colormap.lmp cp $(GAME)/gfx/palette.lmp $(GAME)/gfx/palette.pal -mkdir -p $(GAME)/gfxsrc - rm $(GAME)/gfxsrc/palette.tga + #rm $(GAME)/gfxsrc/palette.tga + #rm $(GAME)/gfxsrc/palette_nofb.tga # fteqw repo update: diff --git a/Tools/build_maps.sh b/Tools/build_maps.sh index 02657e2..3bd1665 100755 --- a/Tools/build_maps.sh +++ b/Tools/build_maps.sh @@ -29,4 +29,12 @@ then mkdir -p "$NEWPATHDIR" mv -v "$MAPFILE" "$NEWPATH" done + + find "$GAMEDIR/mapsrc/" -name "*.lit" | while read MAPFILE + do + NEWPATH="$(echo "$MAPFILE" | sed 's/\/mapsrc\//\/maps\//g')" + NEWPATHDIR=$(dirname "$NEWPATH") + mkdir -p "$NEWPATHDIR" + mv -v "$MAPFILE" "$NEWPATH" + done fi diff --git a/Tools/build_wads.sh b/Tools/build_wads.sh index 5336c62..ff691cf 100755 --- a/Tools/build_wads.sh +++ b/Tools/build_wads.sh @@ -23,10 +23,15 @@ build_wads() printf "WAD3 building %s:\n" "$DIRNAME" imgtool --genwad3 ../"$DIRNAME".wad ./"$DIRNAME" else - if [ -f "../gfx/palette.lmp" ] + if [ -f "../gfx/palette_nofb.lmp" ] then printf "WAD2 Building %s:\n" "$DIRNAME" - imgtool --palette ../gfx/palette.lmp --genwad2 ../"$DIRNAME".wad ./"$DIRNAME" + if [ -f "$CWD/$1/texturesrc/$DIRNAME/palette.lmp" ] + then + imgtool --palette "$CWD/$1/texturesrc/$DIRNAME/palette.lmp" --genwad2 ../"$DIRNAME".wad ./"$DIRNAME" + else + imgtool --palette ../gfx/palette_nofb.lmp --genwad2 ../"$DIRNAME".wad ./"$DIRNAME" + fi else printf "WAD2 (using Quake palette) building %s:\n" "$DIRNAME" imgtool --genwad2 ../"$DIRNAME".wad ./"$DIRNAME"