Commit bf5890e8 authored by cutealien's avatar cutealien

- Add support for bsp brush entities. Written by Hendu.


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3991 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 99cfad9d
Changes in 1.8 (??.??.2011) Changes in 1.8 (??.??.2011)
- Add support for bsp brush entities. Written by Hendu.
- Add IGUIComboBox::setMaxSelectionRows and IGUIComboBox::getMaxSelectionRows - Add IGUIComboBox::setMaxSelectionRows and IGUIComboBox::getMaxSelectionRows
- Scenemanager switches from type ESNT_UNKNOWN to type ESNT_SCENE_MANAGER. - Scenemanager switches from type ESNT_UNKNOWN to type ESNT_SCENE_MANAGER.
......
...@@ -13,9 +13,7 @@ namespace irr ...@@ -13,9 +13,7 @@ namespace irr
namespace scene namespace scene
{ {
//! Interface for a Mesh which can be loaded directly from a Quake3 .bsp-file. //! Interface for a Mesh which can be loaded directly from a Quake3 .bsp-file.
/** The Mesh tries to load all textures of the map. There are currently /** The Mesh tries to load all textures of the map.*/
no additional methods in this class, but maybe there will be some in later
releases if there are feature requests. */
class IQ3LevelMesh : public IAnimatedMesh class IQ3LevelMesh : public IAnimatedMesh
{ {
public: public:
...@@ -31,6 +29,14 @@ namespace scene ...@@ -31,6 +29,14 @@ namespace scene
//! get's an interface to the entities //! get's an interface to the entities
virtual quake3::tQ3EntityList& getEntityList() = 0; virtual quake3::tQ3EntityList& getEntityList() = 0;
//! returns the requested brush entity
/** \param num The number from the model key of the entity.
Use this interface if you parse the entities yourself.*/
virtual IMesh* getBrushEntityMesh(s32 num) const = 0;
//! returns the requested brush entity
virtual IMesh* getBrushEntityMesh(quake3::IEntity &ent) const = 0;
}; };
} // end namespace scene } // end namespace scene
......
This diff is collapsed.
...@@ -69,6 +69,11 @@ namespace scene ...@@ -69,6 +69,11 @@ namespace scene
//! get's an interface to the entities //! get's an interface to the entities
virtual quake3::tQ3EntityList & getEntityList(); virtual quake3::tQ3EntityList & getEntityList();
//! returns the requested brush entity
virtual IMesh* getBrushEntityMesh(s32 num) const;
//! returns the requested brush entity
virtual IMesh* getBrushEntityMesh(quake3::IEntity &ent) const;
//Link to held meshes? ... //Link to held meshes? ...
...@@ -116,6 +121,7 @@ namespace scene ...@@ -116,6 +121,7 @@ namespace scene
void constructMesh(); void constructMesh();
void solveTJunction(); void solveTJunction();
void loadTextures(); void loadTextures();
scene::SMesh** buildMesh(s32 num);
struct STexShader struct STexShader
{ {
...@@ -372,6 +378,9 @@ namespace scene ...@@ -372,6 +378,9 @@ namespace scene
tBSPFace* Faces; tBSPFace* Faces;
s32 NumFaces; s32 NumFaces;
tBSPModel* Models;
s32 NumModels;
tBSPPlane* Planes; tBSPPlane* Planes;
s32 NumPlanes; s32 NumPlanes;
...@@ -390,6 +399,8 @@ namespace scene ...@@ -390,6 +399,8 @@ namespace scene
tBSPBrush* Brushes; tBSPBrush* Brushes;
s32 NumBrushes; s32 NumBrushes;
scene::SMesh** BrushEntities;
scene::SMesh* Mesh[quake3::E_Q3_MESH_SIZE]; scene::SMesh* Mesh[quake3::E_Q3_MESH_SIZE];
video::IVideoDriver* Driver; video::IVideoDriver* Driver;
core::stringc LevelName; core::stringc LevelName;
...@@ -452,6 +463,7 @@ namespace scene ...@@ -452,6 +463,7 @@ namespace scene
}; };
void cleanMeshes(); void cleanMeshes();
void cleanMesh(SMesh *m, const bool texture0important = false);
void cleanLoader (); void cleanLoader ();
void calcBoundingBoxes(); void calcBoundingBoxes();
c8 buf[128]; c8 buf[128];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment