forked from bunder/qpakman
-
Notifications
You must be signed in to change notification settings - Fork 2
/
TODO
173 lines (104 loc) · 3.21 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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*