
TODO for QPakMan
================


Support 'Half-Life' as a game

- no warning for folders which already exist



>>>>  SKIP tinttab, invpal (etc) for LMP-->PNG conversion

++ convert to/from the gfx/xxx.lmp files
   When -raw option is used, lmps will be unpacked (not pngs)
   For packing, -raw will ignore png files in gfx/

+  handle special lumps:

   Quake/HexenII:

   N  gfx/pop.lmp  : to/from PNG file (16x16)

   Y  gfx/palette.lmp  :  to/from TXT file

      gfx/colormap.lmp  : unpack: create analysis file ".ana"

                          qpakman gfx/colormap.gen -o gfx/colormap.lmp

                          ANA and GEN files ignored for packing

   HexenII only:

      gfx/menu/conchars.lmp : to/from PNG  [SEE MIPWAD for size logic]

   Y  gfx/menu/fontsize.lmp : to/from TXT file

      gfx/player.lmp  : as per colormap.lmp

   Y  gfx/tinttab.lmp   : as per colormap.lmp
   Y  gfx/tinttab2.lmp  : as per colormap.lmp

   Y  gfx/invpal.lmp  :  qpakman -o gfx/invpal.lmp

   QuakeII only:
   N  pics/pop.lmp  :  to/from PNG file (16x16)

      pics/colormap.pcx  :  as per colormap.lmp
                            also creates palette.ana

   Y  pics/16to8.dat  :  qpakman -o pics/16to8.dat


-  convert to/from textures/xxx.wal files (Quake2)
   >>> handle + and * prefixes

-  make MakeTEX mode more robust (no FatalError calls).

-  for -colors option: support PCX format (Quake2)

-  PAK creation: if input file is "pak", merge rather than store
-  WAD creation: if input file is "wad", merge it

-  unpacking images from PAK: find palette in PAK file [unless -c option]

-  implement -raw option
   - miptex wad unpack  (.mip is the raw file)
   - gfx.wad    unpack  (.pic is the raw file)
   - pak files  unpack
   etc....


----------------------------------------------------------------------

PALETTE SOURCE FORMAT

768 numbers, 3 per line


----------------------------------------------------------------------

FONTSIZE FORMAT

729 numbers, 27 per line


----------------------------------------------------------------------

COLORMAP SOURCE FORMAT

# comment
// comment

bright_pixels = { num, num, low-high, low-high ... }

row_factor = 85
column_factor = 171
clamp_hue = 0

map =
{
  intensity,
  intensity,
  intensity,
  intensity,
  # ... 64 intensity numbers

  # each intensity is 256 for medium, 0-255 for darker, 257+ for brighter
}

bright_map =
{
  intensity,
  intensity,
  intensity,
  # ... 64 intensity numbers
}


----------------------------------------------------------------------

TINTTAB FORMAT

row_factor = 85
column_factor = 171


----------------------------------------------------------------------

PLAYER.LMP FORMAT

# comment
// comment

[CRUSADER]
...

[NECROMANCER]
...

[PALADIN]
top_pixels = { num, num, low-high, low-high ... }
bottom_pixels = { num, num, low-high, low-high ... }
targets =
{
  low, high,
  low, high,
  low, high,
  ....  # 11 pairs of pixels
}



==============
 PARSING CODE
==============

TOKENS:
  word     :  [a-zA-Z][a-zA-Z_0-9]*  or  ["][^"]*["]
  number   :  [+-]?[0-9][0-9]*
  symbols  :  { }  [ ]  ,  =

PRODUCTIONS:
  value    :  word | number

  section  :  \[ value \]

  list     :  \{ value (\, value)* \}

  assign   :  word \= (value | list)

  block    :  section? assign assign*

