mikeBot BSP loading code | version 0.1 |
© copyright 1997 mike warren | contact info |
mikeBot's BSP loading code is a set of C++ classes (you only need to interact with one) which will enable you to load everything except textures, lightmaps and visibility lists from version 29 .BSP files. (I don't need the textures, etc. for mikeBot, so I don't load 'em ;) )I have compiled and run (a test program) succesfully on:
Please, tell me of other success stories...
download |
Before downloading, it is important to note that this code is not freeware; to use it, you must:If these terms are unsuitable, don't download anything.
- Notify me before you release any project using this code (wheather with or without source)
- Give me credit in the documentation.
- Include all the files (with the possible exception of the source code) contained in the distributions below in your distribution.
- and, give me 5% of gross revenue if you plan on selling the product, shareware or commercial.
- mbbsp.zip
- PKZIPed version.
documentation |
The code is, I think, well-documented and fairly straight-forward. Please, though, mail me at mbwarren@acs.ucalgary.ca with any questions you may have and I will answer them here.
overview
There is basically only one step to load a .BSP file:
- Declare an instance of bspFile with the filename of the .BSP you want. bspFile throws char * exceptions (if QTHROW is #define'd as 1) on errors, or just prints errors and exits. The newly-created object now contains the loaded .BSP.
things you should never be doing:
- calling the ::read() functions in any class; these are used by the constructors (only).
- Messing with the pointers in the bspFile class; I made them public for ease of access, but this does not imply you should change them (treat them as const
const * ).- DO NOT COPY OBJECTS: there are no copy constructors defined, and i even remembered to make a private: copy ctor in many cases ;), 'cause you don't ever want to copy stuff around, or even change it for that matter; you can't write the changes anyway...(yet)