~ubuntu-branches/ubuntu/precise/glbsp/precise

« back to all changes in this revision

Viewing changes to gui/booktext.cc

  • Committer: Bazaar Package Importer
  • Author(s): Darren Salt
  • Date: 2008-01-30 13:33:49 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080130133349-kgojg33vyiu8xbvp
Tags: 2.24-1
* New upstream release.
* Bumped the lib soname and the library package name due to one silly
  little binary incompatibility caused by changes in an exported struct.
  (Safe; nothing else currently in the archive has ever used libglbsp2.)
* Removed my patches since they're all applied upstream.
* Updated the list of documentation files.
* Build-time changes:
  - Switched from dh_movefiles to dh_install.
  - Updated my makefile to cope with upstream changes.
  - Corrected for debian-rules-ignores-make-clean-error.
  - Corrected for substvar-source-version-is-deprecated.
  - Link libglbsp, rather than glbsp, with libm and libz.
* Fixed shlibdeps. (Closes: #460387)
* Bumped standards version to 3.7.3 (no other changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//------------------------------------------------------------------------
 
2
// BOOKTEXT : Unix/FLTK Manual Text
 
3
//------------------------------------------------------------------------
 
4
//
 
5
//  GL-Friendly Node Builder (C) 2000-2007 Andrew Apted
 
6
//
 
7
//  Based on 'BSP 2.3' by Colin Reed, Lee Killough and others.
 
8
//
 
9
//  This program is free software; you can redistribute it and/or
 
10
//  modify it under the terms of the GNU General Public License
 
11
//  as published by the Free Software Foundation; either version 2
 
12
//  of the License, or (at your option) any later version.
 
13
//
 
14
//  This program is distributed in the hope that it will be useful,
 
15
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
//  GNU General Public License for more details.
 
18
//
 
19
//------------------------------------------------------------------------
 
20
 
 
21
#include "local.h"
 
22
 
 
23
#define GRN  "@C61"   // selection looks bad, oh well
 
24
 
 
25
 
 
26
static const char *contents_text[] =
 
27
{
 
28
  "",
 
29
  "@c@l@b glBSPX Manual",
 
30
  "",
 
31
  "@-",
 
32
  "",
 
33
  "@r by Andrew Apted   ",
 
34
  "@r Updated: JULY 2007   ",
 
35
  "",
 
36
  "@c@m Table of Contents",
 
37
  "",
 
38
  "#L01@c" GRN " 1. Introduction",
 
39
  "#L02@c" GRN " 2. Using glBSPX",
 
40
  "#L03@c" GRN " 3. Interaction with other tools",
 
41
  "#L04@c" GRN " 4. How glBSP Works",
 
42
  "#L05@c" GRN " 5. Differences to BSP 2.3",
 
43
  "#L06@c" GRN " 6. Contact and Links",
 
44
  "#L07@c" GRN " 7. Acknowledgements",
 
45
  NULL
 
46
};
 
47
 
 
48
 
 
49
//------------------------------------------------------------------------
 
50
 
 
51
static const char *intro_text[] =
 
52
{
 
53
  "",
 
54
  "@c@l 1. Introduction",
 
55
  "",
 
56
  "@-",
 
57
  "",
 
58
  "#P00",
 
59
  "glBSP is a nodes builder specially designed to be used with OpenGL-based",
 
60
  "DOOM game engines. It adheres to the \"GL-Friendly Nodes\"",
 
61
  "specification, which means it adds some new special nodes to a WAD",
 
62
  "file that makes it very easy for an OpenGL DOOM engine to",
 
63
  "compute the polygons needed for drawing the levels.",
 
64
  "",
 
65
  "#P00",
 
66
  "There are many DOOM ports that understand the GL Nodes which glBSP",
 
67
  "creates, including: EDGE, the Doomsday engine (JDOOM), Doom3D, PrBoom,",
 
68
  "ZDoomGL, Vavoom and Doom3D.#- See the Contact and Links page.",
 
69
  "",
 
70
  "#P00",
 
71
  "glBSPX is the GUI (graphical user interface) version, which runs",
 
72
  "in a window. There is also a command-line version called simply",
 
73
  "'glbsp', which is designed to be run from a DOS box (Windows)",
 
74
  "or a text terminal (Linux etc). ",
 
75
  "glBSPX lets you perform all the usual node-building jobs,",
 
76
  "though the command-line version supports some more (rarely-useful)",
 
77
  "options.",
 
78
  "",
 
79
  "@m Status:",
 
80
  "",
 
81
  "#P00",
 
82
  "The current version is 2.24. It has been tested and",
 
83
  "known to work on numerous large wads, including DOOM I, DOOM II,",
 
84
  "TeamTNT's Eternal III, Fanatic's QDOOM, and many others.",
 
85
  "",
 
86
  "@m Legal stuff:",
 
87
  "",
 
88
  "#P00",
 
89
  "glBSP and glBSPX are Copyright (C) 2000-2007 Andrew Apted.  It",
 
90
  "was originally based on 'BSP 2.3' (C) Colin Reed and Lee Killough,",
 
91
  "which was created from the basic theory stated in DEU5 (OBJECTS.C)",
 
92
  "by Raphael Quinet.",
 
93
  "",
 
94
  "#P00",
 
95
  "This GUI version (glBSPX) is based in part on the work of the FLTK ",
 
96
  "project.  See http://www.fltk.org.",
 
97
  "",
 
98
  "#P00",
 
99
  "glBSP and glBSPX are free software, under the GNU General Public License",
 
100
  "(GPL).  Click on the the Help > License menu to see the full ",
 
101
  "text.  In particular, there is ABSOLUTELY NO WARRANTY.  USE AT",
 
102
  "YOUR OWN RISK.",
 
103
  "",
 
104
  " All trademarks are the propriety of their owners.",
 
105
  "",
 
106
  NULL
 
107
};
 
108
 
 
109
 
 
110
//------------------------------------------------------------------------
 
111
 
 
112
static const char *using_text[] =
 
113
{
 
114
  "",
 
115
  "@c@l 2. Using glBSPX",
 
116
  "",
 
117
  "@-",
 
118
  "",
 
119
  "#P00",
 
120
  "The way glBSP operates is pretty simple: it will load the input",
 
121
  "wad file, build the nodes for the levels that it finds, and then",
 
122
  "save to the output file.  All this is triggered when you press",
 
123
  "on the big 'BUILD' button in the main window. ",
 
124
  "The 'Files' box let you specify the Input and Output filenames,",
 
125
  "and the other boxes let you control various aspects about the way",
 
126
  "nodes are built.",
 
127
  "",
 
128
  "#P00",
 
129
  "On the bottom of the main window is the text output box, which",
 
130
  "shows various messages during node building (stuff that the",
 
131
  "command-line version normally prints in the terminal or DOS box). ",
 
132
  "Watch out for warning messages, which appear in a red font, they",
 
133
  "can indicate serious problems that were found in your levels.",
 
134
  "",
 
135
  
 
136
  "@m  Build Modes",
 
137
  "",
 
138
  "#P00",
 
139
  "There are five different build modes in glBSPX, which can be",
 
140
  "selected in the upper left box in the main window.",
 
141
  "Here is a description of them:",
 
142
  "",
 
143
  "@t   GWA Mode",
 
144
  "#P20",
 
145
  "Use this mode for general use, e.g you've downloaded a normal",
 
146
  "DOOM wad and wish to play it with an OpenGL DOOM engine",
 
147
  "(one which is GLBSP-aware, of course). ",
 
148
  "This mode will put all the GL Nodes into a separate file with",
 
149
  "the \".gwa\" extension.  The engine should notice the GWA file",
 
150
  "and load it automatically.",
 
151
  "",
 
152
  "#P20",
 
153
  "The rest of the modes below create a new self-contained WAD file,",
 
154
  "which will contain any GL Nodes that are built.",
 
155
  "",
 
156
  "@t   GL, Normal if missing",
 
157
  "#P20",
 
158
  "This mode builds the GL nodes, and will detect if the Normal nodes",
 
159
  "are missing and build them too when absent. Hence it will keep any",
 
160
  "pre-existing Normal nodes, so less work to do, plus the normal",
 
161
  "nodes may be better optimised for non-GLBSP-aware DOOM ports.",
 
162
  "",
 
163
  "@t   GL and Normal nodes",
 
164
  "#P20",
 
165
  "This mode builds both the GL nodes and the Normal nodes.",
 
166
  "",
 
167
  "@t   GL nodes only",
 
168
  "#P20",
 
169
  "This mode builds only the GL nodes, completely ignoring any",
 
170
  "pre-existing Normal nodes (even if absent).  This mode is",
 
171
  "probably not very useful.",
 
172
  "",
 
173
 
 
174
  "@m Misc Options",
 
175
  "",
 
176
  "#P00",
 
177
  "The upper right box in the main window contain a set of",
 
178
  "miscellaneous options. Some of them only appear when certain",
 
179
  "build modes are enabled, because in other modes they would",
 
180
  "be ignored.  The full set of misc options are:",
 
181
  "",
 
182
  "@t   Extra Warnings",
 
183
  "#P20",
 
184
  "Shows extra warning messages, which detail various",
 
185
  "non-serious problems that glBSP discovers while building the",
 
186
  "nodes.  Often these warnings show a real",
 
187
  "problem in the level (e.g a non-closed sector or",
 
188
  "invalid sidedef), so they are worth checking now and then.",
 
189
  "",
 
190
  "@t   Don't clobber REJECT",
 
191
  "#P20",
 
192
  "Normally glBSP will create an simple REJECT map for",
 
193
  "each level.  This options prevents any existing",
 
194
  "REJECT map from being clobbered, such as one built by a",
 
195
  "dedicated reject building tool (RMB, etc).",
 
196
  "",
 
197
  "@t   Pack Sidedefs",
 
198
  "#P20",
 
199
  "Pack sidedefs, by detecting which sidedefs are",
 
200
  "identical and removing the duplicates, producing a",
 
201
  "smaller PWAD.",
 
202
  "",
 
203
  "#P20",
 
204
  "NOTE: this may make your level a lot",
 
205
  "harder to edit!  Therefore this option is most useful",
 
206
  "when producing a final WAD for public release.",
 
207
  "",
 
208
  "@t   Fresh Partition Lines",
 
209
  "#P20",
 
210
  "Normally glBSP will cheat a bit and",
 
211
  "re-use the original node information to create the GL",
 
212
  "nodes, doing it much faster.  When this happens, the",
 
213
  "message \"Using original nodes to speed things up\" is",
 
214
  "shown.",
 
215
  "",
 
216
  "#P20",
 
217
  "This option forces glBSP to create \"fresh\" GL nodes.",
 
218
  "The downside to reusing the original nodes is that they",
 
219
  "may not be as good as the ones glBSP creates, e.g. the",
 
220
  "special checks to minimise slime-trails don't kick in,",
 
221
  "and the -factor value doesn't have any effect.",
 
222
  "",
 
223
 
 
224
  "@m Factor",
 
225
  "",
 
226
  "#P00",
 
227
  "The factor value is located just below the Misc options. ",
 
228
  "It specifies the cost assigned to seg splits. ",
 
229
  "Larger values make seg splits more costly (and thus glBSP tries",
 
230
  "harder to avoid them), but smaller values produce better BSP",
 
231
  "trees.  See the section 'How glBSP Works' for more info. ",
 
232
  "The default factor is known to be a good compromise.",
 
233
  "",
 
234
 
 
235
  NULL
 
236
};
 
237
 
 
238
 
 
239
//------------------------------------------------------------------------
 
240
 
 
241
static const char *note_tc_text[] =
 
242
{
 
243
  "",
 
244
  "@c@l 3. Interaction with other tools",
 
245
  "",
 
246
  "@-",
 
247
  "",
 
248
  "#P00",
 
249
  "As far as I know,",
 
250
  "none of the various WAD tools that exist (such as DSHRINK, CLEANWAD,",
 
251
  "DEUTEX, etc..) are 'glBSP aware', they will rearrange or even remove",
 
252
  "some of the special GL entries, and everything goes pear shaped.",
 
253
  "",
 
254
  "#P00",
 
255
  "When using a reject building tool (such as RMB), you need to give",
 
256
  "the -noreject to glBSP to prevent the good REJECT data from being",
 
257
  "overwritten.",
 
258
  "",
 
259
  "@b *** DO NOT: ***",
 
260
  "",
 
261
  "#P13",
 
262
  "+ Run dshrink on your map WADs at any time!",
 
263
  "",
 
264
  "#P13",
 
265
  "+ Run cleanwad on your map WADs *after* you have compiled your GL",
 
266
  "  friendly nodes!  (The GL nodes will be removed).",
 
267
  "",
 
268
  "#P13",
 
269
  "+ Use Wintex/DEUSF to merge map WADs with GL friendly nodes in them!",
 
270
  "  (The GL node entries will be rearranged, causing problems).",
 
271
  "",
 
272
  NULL
 
273
};
 
274
 
 
275
 
 
276
//------------------------------------------------------------------------
 
277
 
 
278
static const char *howwork_text[] =
 
279
{
 
280
  "",
 
281
  "@c@l 4. How glBSP Works",
 
282
  "",
 
283
  "@-",
 
284
  "",
 
285
  "#P00",
 
286
  "A node builder works like this: say you are looking at your level in",
 
287
  "the automap or in the level editor.  The node builder needs to pick a",
 
288
  "line (stretching to infinity) that divides the whole map in two halves",
 
289
  "(can be rough).  Now cover up one half with your hand, and repeat the",
 
290
  "process on the remaining half.  The node builder keeps doing this",
 
291
  "until the areas that remain are convex (i.e. none of the walls can",
 
292
  "block the view of any other walls when you are inside that area).",
 
293
  "",
 
294
  "#P00",
 
295
  "Those infinite lines are called 'partition lines', and when they cross",
 
296
  "a linedef, the linedef has to be split.  Each split piece is called a",
 
297
  "'seg', and every split causes more segs to be created.  Having fewer",
 
298
  "segs is good: less to draw & smaller files, so partition lines are",
 
299
  "chosen so that they minimise splits.  The 'Factor' value controls how",
 
300
  "costly these splits are.  Higher values cause the node builder to try",
 
301
  "harder to avoid splits.",
 
302
  "",
 
303
  "#P00",
 
304
  "So, each 'partition' line splits an area (or 'space') of the level",
 
305
  "into *two* smaller spaces.  This is where the term 'Binary Space",
 
306
  "Partition' (BSP) comes from.",
 
307
  "",
 
308
  "#P00",
 
309
  "Another thing: having a good BSP tree is also important, and helps for",
 
310
  "faster rendering & smaller files.  Thus the node builder also tries to",
 
311
  "make the BSP tree good (by making it balanced, and keeping it small). ",
 
312
  "If the Factor value is too high, it will care too much about the",
 
313
  "splits, and probably make a bad BSP tree.  How good the BSP tree is",
 
314
  "can be gauged by the output line that reads:",
 
315
  "",
 
316
  "@c@t Heights of left and right subtrees = (12,24)",
 
317
  "",
 
318
  "#P00",
 
319
  "Lower values are better (the BSP tree is smaller), and values that are",
 
320
  "closer together are also better (the BSP is more balanced).",
 
321
  "",
 
322
  NULL
 
323
};
 
324
 
 
325
 
 
326
//------------------------------------------------------------------------
 
327
 
 
328
static const char *diff_text[] =
 
329
{
 
330
  "",
 
331
  "@c@l 5. Differences to BSP 2.3",
 
332
  "",
 
333
  "@-",
 
334
  "",
 
335
  "#P00",
 
336
  "As mentioned in the readme file, glBSP was originally based on BSP 2.3.  Most of",
 
337
  "the code has been rewritten, however, and some features of BSP were",
 
338
  "changed or abandoned.  Features that are different:",
 
339
  "",
 
340
  "#P13",
 
341
  "+ This GUI version, glBSPX, is completely new !",
 
342
  "",
 
343
  "#P13",
 
344
  "+ When the output file is not specified (i.e. no -o option), then",
 
345
  "  the default output file will be a GWA file with the same name. ",
 
346
  "  Under BSP 2.3, the default output file would be \"tmp.wad\". ",
 
347
  "  (This only applies to the command-line version).",
 
348
  "",
 
349
  "#P13",
 
350
  "+ All code for doing visplane checks has been removed.  It was very",
 
351
  "  complex stuff, and for OpenGL DOOM ports this checking is not",
 
352
  "  needed.  Thus glBSP does not accept the following options that",
 
353
  "  BSP 2.3 supports: -thold, -vp, -vpmark, -vpwarn.",
 
354
  "",
 
355
  "#P13",
 
356
  "+ glBSP works on big-endian platforms (like the Mac).",
 
357
  "",
 
358
  "#P13",
 
359
  "+ The 'just for a grin' special feature where a linedef with tag",
 
360
  "  999 would cause an angle adjustment was removed.",
 
361
  "",
 
362
  "#P13",
 
363
  "+ glBSP has Hexen support.",
 
364
  "",
 
365
  "#P13",
 
366
  "+ glBSP compresses the blockmap, and can pack sidedefs.",
 
367
  "",
 
368
  "#P13",
 
369
  "+ glBSP has a much more modular architecture, and can even serve",
 
370
  "  as a plug-in for other programs.",
 
371
  "",
 
372
  NULL
 
373
};
 
374
 
 
375
 
 
376
//------------------------------------------------------------------------
 
377
 
 
378
static const char *contact_text[] =
 
379
{
 
380
  "",
 
381
  "@c@l 6. Contact and Links",
 
382
  "",
 
383
  "@-",
 
384
  "",
 
385
  "  The homepage for glBSP can be found here:",
 
386
  "",
 
387
  "@t     http://glbsp.sourceforge.net/",
 
388
  "",
 
389
  "  Questions, bug reports, suggestions, etc... can be made on the",
 
390
  "  web forum at:",
 
391
  "",
 
392
  "@t     https://sourceforge.net/forum/forum.php?forum_id=33133",
 
393
  "",
 
394
  "",
 
395
  "@m Compatible Engines",
 
396
  "",
 
397
  "@t   EDGE     http://edge.sourceforge.net/",
 
398
  "@t   JDOOM    http://www.doomsdayhq.com/",
 
399
  "@t   PrBOOM   http://prboom.sourceforge.net/",
 
400
  "@t   ZDoomGL  http://zdoomgl.mancubus.net/",
 
401
  "@t   Vavoom   http://www.vavoom-engine.com/",
 
402
  "@t   Doom3D   http://doomworld.com/doom3d/",
 
403
  "",
 
404
  NULL
 
405
};
 
406
 
 
407
 
 
408
//------------------------------------------------------------------------
 
409
 
 
410
static const char *acknow_text[] =
 
411
{
 
412
  "",
 
413
  "@c@l 7. Acknowledgements",
 
414
  "",
 
415
  "@-",
 
416
  "",
 
417
  "#P10",
 
418
  "Andy Baker, for making binaries, writing code and other help.",
 
419
  "",
 
420
  "#P10",
 
421
  "Marc A. Pullen, for testing and helping with the documentation.",
 
422
  "",
 
423
  "#P10",
 
424
  "Lee Killough and Andr� Majorel, for giving their permission to put",
 
425
  "glBSP under the GNU GPL.",
 
426
  "",
 
427
  "#P10",
 
428
  "Janis Legzdinsh for fixing many problems with Hexen wads.",
 
429
  "",
 
430
  "#P10",
 
431
  "Darren Salt has sent in numerous patches.",
 
432
  "",
 
433
  "#P10",
 
434
  "Jaakko Ker�nen, who gave some useful feedback on the GL-Friendly",
 
435
  "Nodes specification.",
 
436
  "",
 
437
  "#P10",
 
438
  "The authors of FLTK (Fast Light Tool Kit), for a nice LGPL C++ GUI",
 
439
  "toolkit that even I can get working on both Linux and Win32.",
 
440
  "",
 
441
  "#P10",
 
442
  "Marc Rousseau (author of ZenNode 1.0), Robert Fenske Jr (author of",
 
443
  "Warm 1.6), L.M. Witek (author of Reject 1.1), and others, for",
 
444
  "releasing the source code to their WAD utilities, and giving me lots",
 
445
  "of ideas to \"borrow\" :), like blockmap packing.",
 
446
  "",
 
447
  "#P10",
 
448
  "Colin Reed and Lee Killough (and others), who wrote the original BSP",
 
449
  "2.3 which glBSP was based on.",
 
450
  "",
 
451
  "#P10",
 
452
  "Matt Fell, for the Doom Specs v1.666.",
 
453
  "",
 
454
  "#P10",
 
455
  "Raphael Quinet, for DEU and the original idea.",
 
456
  "",
 
457
  "#P10",
 
458
  "id Software, for not only creating such an irresistable game, but",
 
459
  "releasing the source code for so much of their stuff.",
 
460
  "",
 
461
  "#P10",
 
462
  ". . . and everyone else who deserves it ! ",
 
463
  "",
 
464
  NULL
 
465
};
 
466
 
 
467
 
 
468
//------------------------------------------------------------------------
 
469
 
 
470
const book_page_t book_pages[] =
 
471
{
 
472
  { contents_text },   // #00
 
473
  { intro_text },      // #01
 
474
  { using_text },      // #02
 
475
  { note_tc_text },    // #03
 
476
  { howwork_text },    // #04
 
477
  { diff_text },       // #05
 
478
  { contact_text },    // #06
 
479
  { acknow_text },     // #07
 
480
  { NULL }
 
481
};
 
482