docs: document bspinfo

This commit is contained in:
Eric Wasylishen 2024-01-29 23:09:40 -07:00
parent 135aee178f
commit e3644350f9
3 changed files with 17 additions and 9 deletions

View File

@ -826,4 +826,6 @@ void serialize_bsp(const bspdata_t &bspdata, const mbsp_t &bsp, const fs::path &
fs::path(name).replace_extension(".lm.png")); fs::path(name).replace_extension(".lm.png"));
std::ofstream(name, std::fstream::out | std::fstream::trunc) << std::setw(4) << j; std::ofstream(name, std::fstream::out | std::fstream::trunc) << std::setw(4) << j;
logging::print("wrote {}\n", name);
} }

3
docs/.gitignore vendored
View File

@ -1 +1,2 @@
_build _build
_html

View File

@ -7,19 +7,24 @@ bspinfo - print basic information about a Quake BSP file
Synopsis Synopsis
======== ========
**bspinfo** BSPFILE **bspinfo** BSPFILE [BSPFILES]
Description Description
=========== ===========
**bspinfo** will print a very basic summary of the internal data in **bspinfo** will print various info about each .bsp file:
*BSPFILE*. The BSP version number is printed, followed by one line for
each of the data types inside, giving the count and data size in bytes
of each data type.
If the filename *BSPFILE* does not have a .bsp extension, **bsputil** - BSP type
will look for a .bsp file by stripping the file extension from BSPFILE - list of BSP lumps, the number of objects, and the total size in bytes
(if any) and appending ".bsp". - list of BSPX lumps and their sizes in bytes
For the purpose of previewing lightmaps in Blender, it will also pack the lightmaps into an atlas and output
the following:
- ``mapname.bsp.geometry.obj`` containing the BSP faces plus the lightmap UV's
- ``mapname.bsp.lm_0.png``, ``mapname.bsp.lm_1.png``, etc., containing a lightmap atlas per used style number
For debugging, the bsp is also converted into a JSON representation and written to ``mapname.bsp.json``.
Author Author
====== ======