#include <OgreQuake3Level.h>
This class implements the required methods for opening Quake3 level files and extracting the pertinent data within. Ogre supports BSP based levels through it's own BspLevel class, which is not specific to any file format, so this class is here to source that data from the Quake3 format. Quake3 levels include far more than just data for rendering - typically the leaves of the tree are used for rendering, and brushes, are used to define convex hulls made of planes for collision detection. There are also entities which define non-visual elements like player start points, triggers etc and models which are used for movable scenery like doors and platforms. Shaders meanwhile are textures with extra effects and 'content flags' indicating special properties like water or lava. I will try to support as much of this as I can in Ogre, but I won't duplicate the structure or necesarily use the same terminology. Quake3 is designed for a very specific purpose and code structure, whereas Ogre is designed to be more flexible, so for example I'm likely to separate game-related properties like surface flags from the generics of materials in my implementation. This is a utility class only - a single call to loadFromChunk should be enough. You should not expect the state of this object to be consistent between calls, since it uses pointers to memory which may no longer be valid after the original call. This is why it has no accessor methods for reading it's internal state.
Definition at line 59 of file OgreQuake3Level.h.
|
Definition at line 33 of file OgreQuake3Level.cpp. |
|
Debug method.
Definition at line 164 of file OgreQuake3Level.cpp. References bsp_vis_t::cluster_count, mEntities, mNumElements, mNumEntities, mNumFaces, mNumLeafFaces, mNumLeaves, mNumLightmaps, mNumModels, mNumNodes, mNumPlanes, mNumShaders, mNumVertices, mShaders, mVis, bsp_shader_t::name, and Ogre::of. Referenced by loadFromChunk(). |
|
Definition at line 209 of file OgreQuake3Level.cpp. References BSP_LIGHTMAP_BANKSIZE, Ogre::Image::loadRawData(), mLightmaps, mNumLightmaps, Ogre::PF_R8G8B8, and Ogre::TEX_TYPE_2D. Referenced by Ogre::BspLevel::loadQuake3Level(). |
|
Utility function to return a pointer to a lump.
Definition at line 144 of file OgreQuake3Level.cpp. References bsp_header_t::lumps, mHeader, bsp_lump_entry_t::offset, and Ogre::SwapFourBytes(). Referenced by initialise(). |
|
Definition at line 154 of file OgreQuake3Level.cpp. References bsp_header_t::lumps, mHeader, bsp_lump_entry_t::size, and Ogre::SwapFourBytes(). Referenced by initialise(). |
|
Utility function read the header and set up pointers.
Definition at line 70 of file OgreQuake3Level.cpp. References BSP_BRUSH_LUMP, BSP_BRUSHSIDES_LUMP, BSP_ELEMENTS_LUMP, BSP_ENTITIES_LUMP, BSP_FACES_LUMP, BSP_LBRUSHES_LUMP, BSP_LEAVES_LUMP, BSP_LFACES_LUMP, BSP_LIGHTMAP_BANKSIZE, BSP_LIGHTMAPS_LUMP, BSP_MODELS_LUMP, BSP_NODES_LUMP, BSP_PLANES_LUMP, BSP_SHADERS_LUMP, BSP_VERTICES_LUMP, BSP_VISIBILITY_LUMP, bsp_vis_t::cluster_count, getLump(), getLumpSize(), Ogre::DataChunk::getPtr(), mBrushes, mBrushSides, mChunk, mElements, mEntities, mFaces, mHeader, mLeafBrushes, mLeafFaces, mLeaves, mLightmaps, mLumpStart, mModels, mNodes, mNumBrushes, mNumBrushSides, mNumElements, mNumEntities, mNumFaces, mNumLeafBrushes, mNumLeafFaces, mNumLeaves, mNumLightmaps, mNumModels, mNumNodes, mNumPlanes, mNumShaders, mNumVertices, mPlanes, mShaders, mVertices, mVis, bsp_vis_t::row_size, Ogre::SwapFourBytes(), Ogre::SwapFourBytesGrup(), and bsp_header_t::version. Referenced by loadFromChunk(). |
|
Reads Quake3 bsp data from a chunk of memory as read from the file. Since ResourceManagers generally locate data in a variety of places they typically manipulate them as a chunk of data, rather than a file pointer since this is unsupported through compressed archives. Quake3 files are made up of a header (which contains version info and a table of the contents) and 17 'lumps' i.e. sections of data, the offsets to which are kept in the table of contents. The 17 types are predefined (You can find them in OgreQuake3Types.h)
Definition at line 38 of file OgreQuake3Level.cpp. References dumpContents(), initialise(), and mChunk. Referenced by Ogre::BspLevel::load(). |
|
Definition at line 139 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 142 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 100 of file OgreQuake3Level.h. Referenced by initialise(), and loadFromChunk(). |
|
Definition at line 104 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 107 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadEntities(). |
|
Definition at line 125 of file OgreQuake3Level.h. Referenced by initialise(), Ogre::BspLevel::initQuake3Patches(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 101 of file OgreQuake3Level.h. Referenced by getLump(), getLumpSize(), and initialise(). |
|
Definition at line 145 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 119 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 116 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 134 of file OgreQuake3Level.h. Referenced by extractLightmaps(), and initialise(). |
|
Definition at line 102 of file OgreQuake3Level.h. Referenced by initialise(). |
|
Definition at line 110 of file OgreQuake3Level.h. Referenced by initialise(). |
|
Definition at line 113 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 140 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 143 of file OgreQuake3Level.h. Referenced by initialise(). |
|
Definition at line 105 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 108 of file OgreQuake3Level.h. Referenced by dumpContents(), and initialise(). |
|
Definition at line 126 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), Ogre::BspLevel::initQuake3Patches(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 146 of file OgreQuake3Level.h. Referenced by initialise(). |
|
Definition at line 120 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 117 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 135 of file OgreQuake3Level.h. Referenced by dumpContents(), extractLightmaps(), and initialise(). |
|
Definition at line 111 of file OgreQuake3Level.h. Referenced by dumpContents(), and initialise(). |
|
Definition at line 114 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 123 of file OgreQuake3Level.h. Referenced by dumpContents(), and initialise(). |
|
Definition at line 132 of file OgreQuake3Level.h. Referenced by dumpContents(), and initialise(). |
|
Definition at line 129 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 122 of file OgreQuake3Level.h. Referenced by initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 131 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 128 of file OgreQuake3Level.h. Referenced by initialise(), Ogre::BspLevel::initQuake3Patches(), and Ogre::BspLevel::loadQuake3Level(). |
|
Definition at line 137 of file OgreQuake3Level.h. Referenced by dumpContents(), initialise(), and Ogre::BspLevel::loadQuake3Level(). |
Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:50:21 2004