From 790d3cc339d223e00e5dd12212194f6050455c85 Mon Sep 17 00:00:00 2001 From: Koz Ross Date: Sat, 28 Apr 2018 11:57:16 +1200 Subject: [PATCH 1/4] Add .gitignore --- .gitignore | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3f5ad21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,41 @@ +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +# Prerequisites +*.d + +# Compiled Object files +*.slo +*.lo +*.o +*.obj + +# Precompiled Headers +*.gch +*.pch + +# Compiled Dynamic libraries +*.so +*.dylib +*.dll + +# Fortran module files +*.mod +*.smod + +# Compiled Static libraries +*.lai +*.la +*.a +*.lib + +# Executables +*.exe +*.out +*.app From 3297014cb19e393495557cae7ba80b258481bc1b Mon Sep 17 00:00:00 2001 From: Koz Ross Date: Sat, 28 Apr 2018 12:00:13 +1200 Subject: [PATCH 2/4] Add Zlib to dependencies --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3d8a79d..ce3356b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 2.6) project(QPAKMAN CXX) +find_package(ZLIB REQUIRED) find_package(PNG REQUIRED) add_definitions(${PNG_DEFINITIONS}) From 0f0a5c04ec5cbac8d0ea4c29dcad62ae28ba83eb Mon Sep 17 00:00:00 2001 From: Koz Ross Date: Sat, 28 Apr 2018 12:01:05 +1200 Subject: [PATCH 3/4] Change README to Markdown --- README | 218 --------------------------------------------------------- 1 file changed, 218 deletions(-) delete mode 100644 README diff --git a/README b/README deleted file mode 100644 index e84256d..0000000 --- a/README +++ /dev/null @@ -1,218 +0,0 @@ - -QPakMan 0.66 README -=================== - -by Andrew Apted. October 2008 - - -INTRODUCTION ------------- - -QPakMan is a command-line (text only) program for managing the -PAK and WAD files used by the games Quake, Quake II and Hexen II. - - -COMMON TASKS -============ - -1. Listing the contents of PAK and WAD files: - - qpakman -list pak1.pak - qpakman -list gfx.wad - -Shows all the lumps contained in the PAK or WAD file. The -first big number (prefixed by +) is the offset of the lump -(in hexadecimal) and the second number is the lump size. - -In the WAD format there is a type letter for each lump, -shown after the size and before the name. Here is a list -of all the types (only 'M' and 'P' are common) : - - M : Miptex texture - P : PIC image - x : unknown / invalid - - C : Color palette - L : Label - S : Sound - T : QTex - - -2. Unpacking a PAK file: - - qpakman -extract pak0.pak - -The entire contents of the PAK file are extracted into the -current folder. If a file already exists, it will NOT be -overwritten (unless the -force option is given). - -Certain files (such as Quake LMP files, Quake II WAL files) -will be converted to PNG image format during unpack. This -can be suppressed with the -raw option. - - -3. Creating a PAK file: - - qpakman FILES.... -o dest.pak - -All the specified files are stored in a newly created PAK file. -Folders can be given and their contents are recursively added -to the PAK. - -Certain files will be converted from PNG format to a custom -format during the packing process. In particular, files in -the "gfx/" folder are converted to LMP (Quake and Hexen II -only), and files in the "textures/" folder are converted to -WAL format (Quake II only). The -raw option prevents this. - -[[TODO: palette.lmp & fontsize.lmp]] - - -4. Unpacking a WAD file: - - qpakman -extract textures.wad - -The whole contents of the WAD file are extracted as PNG images -into the current folder. If a file already exists, it will NOT -be overwritten (unless the -force option is present). - -Certain Quake texture names begin with a symbol which is not -suitable in filenames, e.g. "*lava" or "+2shoot". Therefore -QPakMan will convert them to a prefix (four letters and '_') -while unpacking, and reconvert to a symbol while packing, as -per the following table: - - * star_ - + plus_ - - minu_ - / divd_ - -There are also textures which contain "full bright" pixels, -palette colors in the range 224-255 which are never drawn -darker (e.g. in shadows). To support this feature, QPakMan -saves textures containing full bright pixels with a "_fbr" -suffix (for example "tlight03_fbr.png"), and will only use -full bright pixels while packing if that suffix is present. - - -5. Creating a textures WAD: - - qpakman IMAGES... -o textures.wad - -All the specified images are converted to MIPTEX (Quake's -texture format) and stored in a newly created WAD file. -Currently the input images must be in PNG format. - -See the notes above about filename conventions. - - -6. Creating the GFX.WAD file: - - qpakman IMAGES... -o GFX.WAD - -This stores the images as PIC format in a newly created -file called "GFX.WAD" (upper or lower case does not matter). -If you want to use a different output name, the -pic option -must also be given to enable conversion to PIC format. - -Conversion to PIC format uses all colors in the palette -(no special treatment of full bright pixels). - - -7. Making a texture wad for editing: - - qpakman -maketex *.pak -o textures.wad - -This creates a texture WAD which a quake editor (like Quark -or GTKradiant) needs to work properly. You need to specify -the PAK files for the full game (Quake I or Hexen II). It -can also process individual BSP files. - - -COMMON OPTIONS -============== - -Options have a short form (like -g) and a long form (-game), -it doesn't matter which one you use. Some options take a -value or keyword after them, which must be separated from the -option by a space (like: -game hexen2). - - --g -game XXX This specifies which game the PAK or WAD - is for. It sets the default palette and - might affect how lumps are converted. - - Usable keywords are: - q1 quake1 h2 hexen2 - q2 quake2 hak haktoria - --c -colors XXX Lets you load a different palette than - the default one (even when -game is used). - - Must be followed by a filename for the - palette. It can be either raw format - (768 bytes) or text format (768 numbers). - --f -force Forces extracted files to overwrite any - existing file with the same name. Normally - QPakMan will not overwrite existing files - when extracting from a PAK or WAD. - --r -raw Prevents conversion of lumps (especially - from/to PNG images) while packing or - unpacking a PAK file. - --p -pic When creating a WAD, stores the images in - Quake PIC format instead of MIPTEX format. - - NOTE: this option is automatically enabled - when the output file is called "gfx.wad" - (or "GFX.WAD", case is not significant). - - NOTE 2: the CONCHARS and TINYFONT lumps - are special, and are always created as a - raw blocks of pixels. - - -LESS COMMON TASKS -================= - -1. Creating an inverse palette lump for Hexen II: - - qpakman -game h2 -o invpal.lmp - - -2. Creating an inverse palette lump for Quake II: - - qpakman -game q2 -o 16to8.dat - - -3. Making the tint tables for Hexen II: - - qpakman -game h2 -o tinttab.lmp - qpakman -game h2 -o tinttab2.lmp - - -COPYRIGHT and LICENSE ---------------------- - -Copyright (C) 2008 Andrew Apted - -QPakMan is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published -by the Free Software Foundation; either version 2 of the License, -or (at your option) any later version. - -QPakMan is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - - -CONTACT DETAILS ---------------- - -Email: - -Forum: http://openarena.ws/board/index.php?topic=1710.0 - From cbd30ce2cdaf1a8dcad90cbc8a3b5d00b5cf36d1 Mon Sep 17 00:00:00 2001 From: Koz Ross Date: Sat, 28 Apr 2018 12:01:41 +1200 Subject: [PATCH 4/4] Actually add README.md --- README.md | 217 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 217 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..659a0eb --- /dev/null +++ b/README.md @@ -0,0 +1,217 @@ +QPakMan 0.66 README +=================== + +by Andrew Apted. October 2008 + + +INTRODUCTION +------------ + +QPakMan is a command-line (text only) program for managing the +PAK and WAD files used by the games Quake, Quake II and Hexen II. + + +COMMON TASKS +============ + +1. Listing the contents of PAK and WAD files: + + qpakman -list pak1.pak + qpakman -list gfx.wad + +Shows all the lumps contained in the PAK or WAD file. The +first big number (prefixed by +) is the offset of the lump +(in hexadecimal) and the second number is the lump size. + +In the WAD format there is a type letter for each lump, +shown after the size and before the name. Here is a list +of all the types (only 'M' and 'P' are common) : + + M : Miptex texture + P : PIC image + x : unknown / invalid + + C : Color palette + L : Label + S : Sound + T : QTex + + +2. Unpacking a PAK file: + + qpakman -extract pak0.pak + +The entire contents of the PAK file are extracted into the +current folder. If a file already exists, it will NOT be +overwritten (unless the -force option is given). + +Certain files (such as Quake LMP files, Quake II WAL files) +will be converted to PNG image format during unpack. This +can be suppressed with the -raw option. + + +3. Creating a PAK file: + + qpakman FILES.... -o dest.pak + +All the specified files are stored in a newly created PAK file. +Folders can be given and their contents are recursively added +to the PAK. + +Certain files will be converted from PNG format to a custom +format during the packing process. In particular, files in +the "gfx/" folder are converted to LMP (Quake and Hexen II +only), and files in the "textures/" folder are converted to +WAL format (Quake II only). The -raw option prevents this. + +[[TODO: palette.lmp & fontsize.lmp]] + + +4. Unpacking a WAD file: + + qpakman -extract textures.wad + +The whole contents of the WAD file are extracted as PNG images +into the current folder. If a file already exists, it will NOT +be overwritten (unless the -force option is present). + +Certain Quake texture names begin with a symbol which is not +suitable in filenames, e.g. "*lava" or "+2shoot". Therefore +QPakMan will convert them to a prefix (four letters and '_') +while unpacking, and reconvert to a symbol while packing, as +per the following table: + + * star_ + + plus_ + - minu_ + / divd_ + +There are also textures which contain "full bright" pixels, +palette colors in the range 224-255 which are never drawn +darker (e.g. in shadows). To support this feature, QPakMan +saves textures containing full bright pixels with a "_fbr" +suffix (for example "tlight03_fbr.png"), and will only use +full bright pixels while packing if that suffix is present. + + +5. Creating a textures WAD: + + qpakman IMAGES... -o textures.wad + +All the specified images are converted to MIPTEX (Quake's +texture format) and stored in a newly created WAD file. +Currently the input images must be in PNG format. + +See the notes above about filename conventions. + + +6. Creating the GFX.WAD file: + + qpakman IMAGES... -o GFX.WAD + +This stores the images as PIC format in a newly created +file called "GFX.WAD" (upper or lower case does not matter). +If you want to use a different output name, the -pic option +must also be given to enable conversion to PIC format. + +Conversion to PIC format uses all colors in the palette +(no special treatment of full bright pixels). + + +7. Making a texture wad for editing: + + qpakman -maketex *.pak -o textures.wad + +This creates a texture WAD which a quake editor (like Quark +or GTKradiant) needs to work properly. You need to specify +the PAK files for the full game (Quake I or Hexen II). It +can also process individual BSP files. + + +COMMON OPTIONS +============== + +Options have a short form (like -g) and a long form (-game), +it doesn't matter which one you use. Some options take a +value or keyword after them, which must be separated from the +option by a space (like: -game hexen2). + + +-g -game XXX This specifies which game the PAK or WAD + is for. It sets the default palette and + might affect how lumps are converted. + + Usable keywords are: + q1 quake1 h2 hexen2 + q2 quake2 hak haktoria + +-c -colors XXX Lets you load a different palette than + the default one (even when -game is used). + + Must be followed by a filename for the + palette. It can be either raw format + (768 bytes) or text format (768 numbers). + +-f -force Forces extracted files to overwrite any + existing file with the same name. Normally + QPakMan will not overwrite existing files + when extracting from a PAK or WAD. + +-r -raw Prevents conversion of lumps (especially + from/to PNG images) while packing or + unpacking a PAK file. + +-p -pic When creating a WAD, stores the images in + Quake PIC format instead of MIPTEX format. + + NOTE: this option is automatically enabled + when the output file is called "gfx.wad" + (or "GFX.WAD", case is not significant). + + NOTE 2: the CONCHARS and TINYFONT lumps + are special, and are always created as a + raw blocks of pixels. + + +LESS COMMON TASKS +================= + +1. Creating an inverse palette lump for Hexen II: + + qpakman -game h2 -o invpal.lmp + + +2. Creating an inverse palette lump for Quake II: + + qpakman -game q2 -o 16to8.dat + + +3. Making the tint tables for Hexen II: + + qpakman -game h2 -o tinttab.lmp + qpakman -game h2 -o tinttab2.lmp + + +COPYRIGHT and LICENSE +--------------------- + +Copyright (C) 2008 Andrew Apted + +QPakMan is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published +by the Free Software Foundation; either version 2 of the License, +or (at your option) any later version. + +QPakMan is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + + +CONTACT DETAILS +--------------- + +Email: + +Forum: http://openarena.ws/board/index.php?topic=1710.0 +