Merge from trunk, revisions 4495-4510. Mostly whitespace and indentation fixes; mipmap fixes

git-svn-id: http://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4511 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2013-04-17 17:45:53 +00:00
parent 50779c829e
commit 20199e3912
207 changed files with 1267 additions and 1264 deletions

View File

@ -29,7 +29,7 @@ namespace scene
"box", // camera box against node box
"frustum_box", // camera frustum against node box
"frustum_sphere", // camera frustum against node sphere
"occ_query", // occlusion query
"occ_query", // occlusion query
0
};

View File

@ -19,7 +19,7 @@ namespace scene
enum ESCENE_NODE_TYPE
{
//! of type CSceneManager (note that ISceneManager is not(!) an ISceneNode)
ESNT_SCENE_MANAGER = MAKE_IRR_ID('s','m','n','g'),
ESNT_SCENE_MANAGER = MAKE_IRR_ID('s','m','n','g'),
//! simple cube scene node
ESNT_CUBE = MAKE_IRR_ID('c','u','b','e'),

View File

@ -80,17 +80,17 @@ namespace scene
//! this holds the header info of the MD3 file
struct SMD3Header
{
c8 headerID[4]; //id of file, always "IDP3"
s32 Version; //this is a version number, always 15
s8 fileName[68]; //sometimes left Blank... 65 chars, 32bit aligned == 68 chars
s32 numFrames; //number of KeyFrames
s32 numTags; //number of 'tags' per frame
s32 numMeshes; //number of meshes/skins
s32 numMaxSkins; //maximum number of unique skins used in md3 file. artefact md2
s32 frameStart; //starting position of frame-structur
s32 tagStart; //starting position of tag-structures
s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures
s32 fileSize;
c8 headerID[4]; //id of file, always "IDP3"
s32 Version; //this is a version number, always 15
s8 fileName[68];//sometimes left Blank... 65 chars, 32bit aligned == 68 chars
s32 numFrames; //number of KeyFrames
s32 numTags; //number of 'tags' per frame
s32 numMeshes; //number of meshes/skins
s32 numMaxSkins;//maximum number of unique skins used in md3 file. artefact md2
s32 frameStart; //starting position of frame-structur
s32 tagStart; //starting position of tag-structures
s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures
s32 fileSize;
} PACK_STRUCT;
//! this holds the header info of an MD3 mesh section

View File

@ -76,7 +76,7 @@ namespace scene
/** If the camera's target and rotation are bound ( @see
bindTargetAndRotation() ) then calling this will also change
the camera's scene node rotation to match the target.
Note that setTarget uses the current absolute position
Note that setTarget uses the current absolute position
internally, so if you changed setPosition since last rendering you must
call updateAbsolutePosition before using this function.
\param pos Look at target of the camera, in world co-ordinates. */
@ -179,7 +179,7 @@ namespace scene
if (!out)
return;
out->addBool ("IsOrthogonal", IsOrthogonal );
out->addBool("IsOrthogonal", IsOrthogonal);
}
//! Reads attributes of the camera node

View File

@ -24,12 +24,12 @@ namespace scene
{
//! Blinn-phong which is default for opengl and dx fixed function pipelines.
//! But several well-known renderers don't support it and prefer phong.
ECTF_BLINN,
ECTF_BLINN,
//! Phong shading, default in many external renderers.
ECTF_PHONG,
//! diffuse shaded surface that is independent of lighting.
ECTF_LAMBERT,
// constantly shaded surface that is independent of lighting.
// constantly shaded surface that is independent of lighting.
ECTF_CONSTANT
};
@ -39,7 +39,7 @@ namespace scene
//! default - only alpha channel of color or texture is used.
ECOF_A_ONE = 0,
//! Alpha values for each RGB channel of color or texture are used.
//! Alpha values for each RGB channel of color or texture are used.
ECOF_RGB_ZERO = 1
};
@ -80,7 +80,7 @@ namespace scene
enum E_COLLADA_GEOMETRY_WRITING
{
//! Default - write each mesh exactly once to collada. Optimal but will not work with many tools.
ECGI_PER_MESH,
ECGI_PER_MESH,
//! Write each mesh as often as it's used with different materials-names in the scene.
//! Material names which are used here are created on export, so using the IColladaMeshWriterNames
@ -92,25 +92,25 @@ namespace scene
class IColladaMeshWriterProperties : public virtual IReferenceCounted
{
public:
virtual ~IColladaMeshWriterProperties () {}
virtual ~IColladaMeshWriterProperties () {}
//! Which lighting model should be used in the technique (FX) section when exporting effects (materials)
virtual E_COLLADA_TECHNIQUE_FX getTechniqueFx(const video::SMaterial& material) const = 0;
//! Which texture index should be used when writing the texture of the given sampler color.
/** \return the index to the texture-layer or -1 if that texture should never be exported
/** \return the index to the texture-layer or -1 if that texture should never be exported
Note: for ECCS_TRANSPARENT by default the alpha channel is used, if you want to use RGB you have to set
also the ECOF_RGB_ZERO flag in getTransparentFx. */
virtual s32 getTextureIdx(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0;
//! Return which color from Irrlicht should be used for the color requested by collada
/** Note that collada allows exporting either texture or color, not both.
/** Note that collada allows exporting either texture or color, not both.
So color mapping is only checked if we have no valid texture already.
By default we try to return best fits when possible. For example ECCS_DIFFUSE is mapped to ECIC_DIFFUSE.
When ECIC_CUSTOM is returned then the result of getCustomColor will be used. */
virtual E_COLLADA_IRR_COLOR getColorMapping(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0;
//! Return custom colors for certain color types requested by collada.
//! Return custom colors for certain color types requested by collada.
/** Only used when getColorMapping returns ECIC_CUSTOM for the same paramters. */
virtual video::SColor getCustomColor(const video::SMaterial & material, E_COLLADA_COLOR_SAMPLER cs) const = 0;
@ -118,18 +118,18 @@ namespace scene
/** Not this is only about ECCS_TRANSPARENT and does not affect getTransparency. */
virtual E_COLLADA_TRANSPARENT_FX getTransparentFx(const video::SMaterial& material) const = 0;
//! Transparency value for that material.
//! Transparency value for that material.
/** This value is additional to transparent settings, if both are set they will be multiplicated.
\return 1.0 for fully transparent, 0.0 for not transparent and not written at all when < 0.f */
virtual f32 getTransparency(const video::SMaterial& material) const = 0;
//! Reflectivity value for that material
/** The amount of perfect mirror reflection to be added to the reflected light
/** The amount of perfect mirror reflection to be added to the reflected light
\return 0.0 - 1.0 for reflectivity and element is not written at all when < 0.f */
virtual f32 getReflectivity(const video::SMaterial& material) const = 0;
//! Return index of refraction for that material
/** By default we don't write that.
/** By default we don't write that.
\return a value greater equal 0.f to write \<index_of_refraction\> when it is lesser than 0 nothing will be written */
virtual f32 getIndexOfRefraction(const video::SMaterial& material) const = 0;
@ -137,7 +137,7 @@ namespace scene
//! By default all visible nodes are exported.
virtual bool isExportable(const irr::scene::ISceneNode * node) const = 0;
//! Return the mesh for the given node. If it has no mesh or shouldn't export it's mesh
//! Return the mesh for the given node. If it has no mesh or shouldn't export it's mesh
//! you can return 0 in which case only the transformation matrix of the node will be used.
// TODO: Function is not const because there is no const getMesh() function for several Irrlicht nodes.
virtual IMesh* getMesh(irr::scene::ISceneNode * node) = 0;
@ -158,40 +158,40 @@ namespace scene
class IColladaMeshWriterNames : public virtual IReferenceCounted
{
public:
virtual ~IColladaMeshWriterNames () {}
//! Return a unique name for the given mesh
/** Note that names really must be unique here per mesh-pointer, so
mostly it's a good idea to return the nameForMesh from
IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow
the xs::NCName standard to be valid, you can run them through
/** Note that names really must be unique here per mesh-pointer, so
mostly it's a good idea to return the nameForMesh from
IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow
the xs::NCName standard to be valid, you can run them through
IColladaMeshWriter::toNCName to ensure that.
\param mesh Pointer to the mesh which needs a name
\param instance When E_COLLADA_GEOMETRY_WRITING is not ECGI_PER_MESH then
\param instance When E_COLLADA_GEOMETRY_WRITING is not ECGI_PER_MESH then
several instances of the same mesh can be written and this counts them.
*/
virtual irr::core::stringw nameForMesh(const scene::IMesh* mesh, int instance) = 0;
//! Return a unique name for the given node
/** Note that names really must be unique here per node-pointer, so
mostly it's a good idea to return the nameForNode from
IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow
the xs::NCName standard to be valid, you can run them through
/** Note that names really must be unique here per node-pointer, so
mostly it's a good idea to return the nameForNode from
IColladaMeshWriter::getDefaultNameGenerator(). Also names must follow
the xs::NCName standard to be valid, you can run them through
IColladaMeshWriter::toNCName to ensure that.
*/
virtual irr::core::stringw nameForNode(const scene::ISceneNode* node) = 0;
//! Return a name for the material
/** There is one material created in the writer for each unique name.
So you can use this to control the number of materials which get written.
/** There is one material created in the writer for each unique name.
So you can use this to control the number of materials which get written.
For example Irrlicht does by default write one material for each material
instanced by a node. So if you know that in your application material
instances per node are identical between different nodes you can reduce
the number of exported materials using that knowledge by using identical
names for such shared materials.
Names must follow the xs::NCName standard to be valid, you can run them
through IColladaMeshWriter::toNCName to ensure that.
instanced by a node. So if you know that in your application material
instances per node are identical between different nodes you can reduce
the number of exported materials using that knowledge by using identical
names for such shared materials.
Names must follow the xs::NCName standard to be valid, you can run them
through IColladaMeshWriter::toNCName to ensure that.
*/
virtual irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) = 0;
};
@ -202,7 +202,7 @@ namespace scene
{
public:
IColladaMeshWriter()
IColladaMeshWriter()
: Properties(0), DefaultProperties(0), NameGenerator(0), DefaultNameGenerator(0)
, WriteTextures(true), WriteDefaultScene(true), ExportSMaterialOnce(true)
, AmbientLight(0.f, 0.f, 0.f, 1.f)
@ -211,7 +211,7 @@ namespace scene
}
//! Destructor
virtual ~IColladaMeshWriter()
virtual ~IColladaMeshWriter()
{
if ( Properties )
Properties->drop();
@ -234,7 +234,7 @@ namespace scene
}
//! Get if texture information should be written
virtual bool getWriteTextures() const
virtual bool getWriteTextures() const
{
return WriteTextures;
}
@ -271,11 +271,11 @@ namespace scene
/** Optimally ECGI_PER_MESH would be always sufficent - writing geometry once per mesh.
Unfortunately many tools (at the time of writing this nearly all of them) have trouble
on import when different materials are used per node. So when you override materials
per node and importing the resuling collada has materials problems in other tools try
using other values here.
\param writeStyle One of the E_COLLADA_GEOMETRY_WRITING settings.
per node and importing the resuling collada has materials problems in other tools try
using other values here.
\param writeStyle One of the E_COLLADA_GEOMETRY_WRITING settings.
*/
virtual void setGeometryWriting(E_COLLADA_GEOMETRY_WRITING writeStyle)
virtual void setGeometryWriting(E_COLLADA_GEOMETRY_WRITING writeStyle)
{
GeometryWriting = writeStyle;
}
@ -287,10 +287,10 @@ namespace scene
}
//! Make certain there is only one collada material generated per Irrlicht material
/** Checks before creating a collada material-name if an identical
irr:::video::SMaterial has been exported already. If so don't export it with
/** Checks before creating a collada material-name if an identical
irr:::video::SMaterial has been exported already. If so don't export it with
another name. This is set by default and leads to way smaller .dae files.
Note that if you need to disable this flag for some reason you can still
Note that if you need to disable this flag for some reason you can still
get a similar effect using the IColladaMeshWriterNames::nameForMaterial
by returning identical names for identical materials there.
*/
@ -305,13 +305,13 @@ namespace scene
}
//! Set properties to use by the meshwriter instead of it's default properties.
/** Overloading properties with an own class allows modifying the writing process in certain ways.
/** Overloading properties with an own class allows modifying the writing process in certain ways.
By default properties are set to the DefaultProperties. */
virtual void setProperties(IColladaMeshWriterProperties * p)
{
if ( p == Properties )
return;
if ( p )
if ( p )
p->grab();
if ( Properties )
Properties->drop();
@ -324,19 +324,19 @@ namespace scene
return Properties;
}
//! Return the original default properties of the writer.
//! Return the original default properties of the writer.
/** You can use this pointer in your own properties to access and return default values. */
IColladaMeshWriterProperties * getDefaultProperties() const
{
return DefaultProperties;
IColladaMeshWriterProperties * getDefaultProperties() const
{
return DefaultProperties;
}
//! Install a generator to create custom names on export.
//! Install a generator to create custom names on export.
virtual void setNameGenerator(IColladaMeshWriterNames * nameGenerator)
{
if ( nameGenerator == NameGenerator )
return;
if ( nameGenerator )
if ( nameGenerator )
nameGenerator->grab();
if ( NameGenerator )
NameGenerator->drop();
@ -349,11 +349,11 @@ namespace scene
return NameGenerator;
}
//! Return the original default name generator of the writer.
//! Return the original default name generator of the writer.
/** You can use this pointer in your own generator to access and return default values. */
IColladaMeshWriterNames * getDefaultNameGenerator() const
{
return DefaultNameGenerator;
IColladaMeshWriterNames * getDefaultNameGenerator() const
{
return DefaultNameGenerator;
}
//! Restrict the characters of oldString a set of allowed characters in xs::NCName and add the prefix.
@ -361,8 +361,8 @@ namespace scene
virtual irr::core::stringw toNCName(const irr::core::stringw& oldString, const irr::core::stringw& prefix=irr::core::stringw(L"_NC_")) const = 0;
//! After export you can find out which name had been used for writing the geometry for this node.
/** The name comes from IColladaMeshWriterNames::nameForMesh, but you can't access the node there.
\return Either a pointer to the name or NULL */
/** The name comes from IColladaMeshWriterNames::nameForMesh, but you can't access the node there.
\return Either a pointer to the name or NULL */
// TODO: Function is not const because there is no const getMesh() function for several Irrlicht nodes.
virtual const irr::core::stringw* findGeometryNameForNode(ISceneNode* node) = 0;
@ -373,7 +373,7 @@ namespace scene
{
if ( p == DefaultProperties )
return;
if ( p )
if ( p )
p->grab();
if ( DefaultProperties )
DefaultProperties->drop();
@ -385,7 +385,7 @@ namespace scene
{
if ( p == DefaultNameGenerator )
return;
if ( p )
if ( p )
p->grab();
if ( DefaultNameGenerator )
DefaultNameGenerator->drop();

View File

@ -20,19 +20,19 @@ namespace gui
enum ECURSOR_ICON
{
// Following cursors might be system specific, or might use an Irrlicht icon-set. No guarantees so far.
ECI_NORMAL, // arrow
ECI_CROSS, // Crosshair
ECI_HAND, // Hand
ECI_HELP, // Arrow and question mark
ECI_IBEAM, // typical text-selection cursor
ECI_NO, // should not click icon
ECI_WAIT, // hourclass
ECI_SIZEALL, // arrow in all directions
ECI_NORMAL, // arrow
ECI_CROSS, // Crosshair
ECI_HAND, // Hand
ECI_HELP, // Arrow and question mark
ECI_IBEAM, // typical text-selection cursor
ECI_NO, // should not click icon
ECI_WAIT, // hourclass
ECI_SIZEALL, // arrow in all directions
ECI_SIZENESW, // resizes in direction north-east or south-west
ECI_SIZENWSE, // resizes in direction north-west or south-east
ECI_SIZENS, // resizes in direction north or south
ECI_SIZEWE, // resizes in direction west or east
ECI_UP, // up-arrow
ECI_SIZENWSE, // resizes in direction north-west or south-east
ECI_SIZENS, // resizes in direction north or south
ECI_SIZEWE, // resizes in direction west or east
ECI_UP, // up-arrow
// Implementer note: Should we add system specific cursors, which use guaranteed the system icons,
// then I would recommend using a naming scheme like ECI_W32_CROSS, ECI_X11_CROSSHAIR and adding those

View File

@ -247,7 +247,7 @@ namespace irr
//! The text in an editbox was changed. This does not include automatic changes in text-breaking.
EGET_EDITBOX_CHANGED,
//! The marked area in an editbox was changed.
//! The marked area in an editbox was changed.
EGET_EDITBOX_MARKING_CHANGED,
//! The tab was changed in an tab control
@ -467,7 +467,7 @@ struct SEvent
{
NUMBER_OF_BUTTONS = 32,
AXIS_X = 0, // e.g. analog stick 1 left to right
AXIS_X = 0, // e.g. analog stick 1 left to right
AXIS_Y, // e.g. analog stick 1 top to bottom
AXIS_Z, // e.g. throttle, or analog 2 stick 2 left to right
AXIS_R, // e.g. rudder, or analog 2 stick 2 top to bottom
@ -579,18 +579,18 @@ struct SJoystickInfo
/** This is an internal Irrlicht index; it does not map directly
* to any particular hardware joystick. It corresponds to the
* irr::SJoystickEvent Joystick ID. */
u8 Joystick;
u8 Joystick;
//! The name that the joystick uses to identify itself.
core::stringc Name;
core::stringc Name;
//! The number of buttons that the joystick has.
u32 Buttons;
u32 Buttons;
//! The number of axes that the joystick has, i.e. X, Y, Z, R, U, V.
/** Note: with a Linux device, the POV hat (if any) will use two axes. These
* will be included in this count. */
u32 Axes;
u32 Axes;
//! An indication of whether the joystick has a POV hat.
/** A Windows device will identify the presence or absence or the POV hat. A

View File

@ -24,7 +24,7 @@ namespace gui
//! call setVisible(false)
ECMC_HIDE = 2
// note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags.
// note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags.
};
//! GUI Context menu interface.
@ -64,10 +64,10 @@ namespace gui
virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
//! Insert a menu item at specified position.
/** \param idx: Position to insert the new element,
should be smaller than itemcount otherwise the item is added to the end.
\param text: Text of menu item. Set this to 0 to create
//! Insert a menu item at specified position.
/** \param idx: Position to insert the new element,
should be smaller than itemcount otherwise the item is added to the end.
\param text: Text of menu item. Set this to 0 to create
an separator instead of a real item, which is the same like
calling addSeparator();
\param commandId: Command id of menu item, a simple id you may
@ -81,11 +81,11 @@ namespace gui
virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true,
bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
//! Find an item by it's CommandID
//! Find an item by its CommandID
/**
\param commandId: We are looking for the first item which has this commandID
\param idxStartSearch: Start searching from this index.
\return Returns the index of the item when found or otherwise -1. */
\return Returns the index of the item when found or otherwise -1. */
virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0;
//! Adds a separator item to the menu

View File

@ -134,11 +134,11 @@ namespace gui
//! Returns maximum amount of characters, previously set by setMax();
virtual u32 getMax() const = 0;
//! Set the character used for the cursor.
//! Set the character used for the cursor.
/** By default it's "_" */
virtual void setCursorChar(const wchar_t cursorChar) = 0;
//! Get the character used for the cursor.
//! Get the character used for the cursor.
virtual wchar_t getCursorChar() const = 0;
//! Set the blinktime for the cursor. 2x blinktime is one full cycle.
@ -146,8 +146,7 @@ namespace gui
virtual void setCursorBlinkTime(irr::u32 timeMs) = 0;
//! Get the cursor blinktime
virtual irr::u32 getCursorBlinkTime() const = 0;
virtual irr::u32 getCursorBlinkTime() const = 0;
};

View File

@ -564,7 +564,7 @@ public:
virtual bool sendToBack(IGUIElement* child)
{
core::list<IGUIElement*>::Iterator it = Children.begin();
if (child == (*it)) // already there
if (child == (*it)) // already there
return true;
for (; it != Children.end(); ++it)
{
@ -748,7 +748,7 @@ public:
{
return GUIElementTypeNames[Type];
}
//! Returns the name of the element.
/** \return Name as character string. */
virtual const c8* getName() const
@ -778,7 +778,7 @@ public:
scripting languages, editors, debuggers or xml serialization purposes. */
virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const
{
out->addString("Name", Name.c_str());
out->addString("Name", Name.c_str());
out->addInt("Id", ID );
out->addString("Caption", getText());
out->addRect("Rect", DesiredRect);
@ -1017,7 +1017,7 @@ protected:
//! tooltip
core::stringw ToolTipText;
//! users can set this for identificating the element by string
core::stringc Name;

View File

@ -87,8 +87,8 @@ public:
virtual IGUIElement* getFocus() const = 0;
//! Returns the element which was last under the mouse cursor
/** NOTE: This information is updated _after_ the user-eventreceiver
received it's mouse-events. To find the hovered element while catching
/** NOTE: This information is updated _after_ the user-eventreceiver
received it's mouse-events. To find the hovered element while catching
mouse events you have to use instead:
IGUIEnvironment::getRootGUIElement()->getElementFromPoint(mousePos);
\return Pointer to the element under the mouse. */
@ -215,7 +215,7 @@ public:
//! Returns the root gui element.
/** This is the first gui element, the (direct or indirect) parent of all
other gui elements. It is a valid IGUIElement, with dimensions the same
size as the screen.
size as the screen.
\return Pointer to the root element of the GUI. The returned pointer
should not be dropped. See IReferenceCounted::drop() for more
information. */
@ -584,8 +584,8 @@ public:
//! Loads the gui. Note that the current gui is not cleared before.
/** When a parent is set the elements will be added below the parent, the parent itself does not deserialize.
When the file contains skin-settings from the gui-environment those are always serialized into the
guienvironment independent of the parent setting.
When the file contains skin-settings from the gui-environment those are always serialized into the
guienvironment independent of the parent setting.
\param filename Name of the file.
\param parent Parent for the loaded GUI, root if 0.
\return True if loading succeeded, else false. */
@ -593,8 +593,8 @@ public:
//! Loads the gui. Note that the current gui is not cleared before.
/** When a parent is set the elements will be added below the parent, the parent itself does not deserialize.
When the file contains skin-settings from the gui-environment those are always serialized into the
guienvironment independent of the parent setting.
When the file contains skin-settings from the gui-environment those are always serialized into the
guienvironment independent of the parent setting.
\param file The file to load from.
\param parent Parent for the loaded GUI, root if 0.
\return True if loading succeeded, else false. */

View File

@ -88,7 +88,7 @@ namespace gui
virtual bool hasChildren() const = 0;
//! returns true if this node has child nodes
/** \deprecated Deprecated in 1.8, use hasChildren() instead.
/** \deprecated Deprecated in 1.8, use hasChildren() instead.
This method may be removed by Irrlicht 1.9 */
_IRR_DEPRECATED_ bool hasChilds() const
{

View File

@ -62,7 +62,7 @@ namespace gui
So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.<br>
To get it relative to the parent element you have to add the resulting rectangle to getRelativePosition().UpperLeftCorner.
Beware that adding a menu will not change the clientRect as menus are own gui elements, so in that case you might want to subtract
the menu area additionally. */
the menu area additionally. */
virtual core::rect<s32> getClientRect() const = 0;
};

View File

@ -103,7 +103,7 @@ namespace scene
}
//! Renames a loaded mesh.
/** \deprecated Use renameMesh() instead. This method may be removed by
/** \deprecated Use renameMesh() instead. This method may be removed by
Irrlicht 1.9 */
_IRR_DEPRECATED_ bool setMeshFilename(u32 index, const io::path& filename)
{
@ -125,12 +125,12 @@ namespace scene
//! Get the name of a loaded mesh, based on its index.
/** \param index: Index of the mesh, number between 0 and getMeshCount()-1.
\return The name if mesh was found and has a name, else the path is empty. */
\return The name if mesh was found and has a name, else the path is empty. */
virtual const io::SNamedPath& getMeshName(u32 index) const = 0;
//! Get the name of the loaded mesh if there is any.
/** \param mesh Pointer to mesh to query.
\return The name if mesh was found and has a name, else the path is empty. */
\return The name if mesh was found and has a name, else the path is empty. */
virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0;
//! Renames a loaded mesh.

View File

@ -119,7 +119,7 @@ namespace scene
}
//! Scales the actual mesh, not a scene node.
/** \deprecated Use scale() instead. This method may be removed by Irrlicht 1.9
/** \deprecated Use scale() instead. This method may be removed by Irrlicht 1.9
\param mesh Mesh on which the operation is performed.
\param factor Scale factor for each axis. */
_IRR_DEPRECATED_ void scaleMesh(IMesh* mesh, const core::vector3df& factor) const {return scale(mesh,factor);}
@ -159,7 +159,7 @@ namespace scene
}
//! Applies a transformation to a mesh
/** \deprecated Use transform() instead. This method may be removed by Irrlicht 1.9
/** \deprecated Use transform() instead. This method may be removed by Irrlicht 1.9
\param mesh Mesh on which the operation is performed.
\param m transformation matrix. */
_IRR_DEPRECATED_ virtual void transformMesh(IMesh* mesh, const core::matrix4& m) const {return transform(mesh,m);}

View File

@ -81,7 +81,7 @@ public:
//! Set the maximum particle life-time in milliseconds
virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0;
//! Set maximal random derivation from the direction
//! Set maximal random derivation from the direction
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0;
//! Get direction the emitter emits particles
@ -111,10 +111,9 @@ public:
//! Get the maximum particle life-time in milliseconds
virtual u32 getMaxLifeTime() const = 0;
//! Get maximal random derivation from the direction
//! Get maximal random derivation from the direction
virtual s32 getMaxAngleDegrees() const = 0;
//! Get emitter type
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; }
};

View File

@ -68,8 +68,9 @@ public:
virtual void clearParticles() = 0;
//! Do manually update the particles.
//! This should only be called when you want to render the node outside the scenegraph,
//! as the node will care about this otherwise automatically.
/** This should only be called when you want to render the node outside
the scenegraph, as the node will care about this otherwise
automatically. */
virtual void doParticleSystem(u32 time) = 0;
//! Gets the particle emitter, which creates the particles.

View File

@ -371,50 +371,48 @@ namespace quake3
enum eQ3ModifierFunction
{
TCMOD = 0,
TCMOD = 0,
DEFORMVERTEXES = 1,
RGBGEN = 2,
TCGEN = 3,
MAP = 4,
ALPHAGEN = 5,
RGBGEN = 2,
TCGEN = 3,
MAP = 4,
ALPHAGEN = 5,
FUNCTION2 = 0x10,
SCROLL = FUNCTION2 + 1,
SCALE = FUNCTION2 + 2,
ROTATE = FUNCTION2 + 3,
STRETCH = FUNCTION2 + 4,
TURBULENCE = FUNCTION2 + 5,
WAVE = FUNCTION2 + 6,
FUNCTION2 = 0x10,
SCROLL = FUNCTION2 + 1,
SCALE = FUNCTION2 + 2,
ROTATE = FUNCTION2 + 3,
STRETCH = FUNCTION2 + 4,
TURBULENCE = FUNCTION2 + 5,
WAVE = FUNCTION2 + 6,
IDENTITY = FUNCTION2 + 7,
VERTEX = FUNCTION2 + 8,
TEXTURE = FUNCTION2 + 9,
LIGHTMAP = FUNCTION2 + 10,
ENVIRONMENT = FUNCTION2 + 11,
IDENTITY = FUNCTION2 + 7,
VERTEX = FUNCTION2 + 8,
TEXTURE = FUNCTION2 + 9,
LIGHTMAP = FUNCTION2 + 10,
ENVIRONMENT = FUNCTION2 + 11,
DOLLAR_LIGHTMAP = FUNCTION2 + 12,
BULGE = FUNCTION2 + 13,
AUTOSPRITE = FUNCTION2 + 14,
AUTOSPRITE2 = FUNCTION2 + 15,
TRANSFORM = FUNCTION2 + 16,
EXACTVERTEX = FUNCTION2 + 17,
CONSTANT = FUNCTION2 + 18,
BULGE = FUNCTION2 + 13,
AUTOSPRITE = FUNCTION2 + 14,
AUTOSPRITE2 = FUNCTION2 + 15,
TRANSFORM = FUNCTION2 + 16,
EXACTVERTEX = FUNCTION2 + 17,
CONSTANT = FUNCTION2 + 18,
LIGHTINGSPECULAR = FUNCTION2 + 19,
MOVE = FUNCTION2 + 20,
NORMAL = FUNCTION2 + 21,
MOVE = FUNCTION2 + 20,
NORMAL = FUNCTION2 + 21,
IDENTITYLIGHTING = FUNCTION2 + 22,
WAVE_MODIFIER_FUNCTION = 0x30,
SINUS = WAVE_MODIFIER_FUNCTION + 1,
COSINUS = WAVE_MODIFIER_FUNCTION + 2,
SQUARE = WAVE_MODIFIER_FUNCTION + 3,
TRIANGLE = WAVE_MODIFIER_FUNCTION + 4,
SAWTOOTH = WAVE_MODIFIER_FUNCTION + 5,
SINUS = WAVE_MODIFIER_FUNCTION + 1,
COSINUS = WAVE_MODIFIER_FUNCTION + 2,
SQUARE = WAVE_MODIFIER_FUNCTION + 3,
TRIANGLE = WAVE_MODIFIER_FUNCTION + 4,
SAWTOOTH = WAVE_MODIFIER_FUNCTION + 5,
SAWTOOTH_INVERSE = WAVE_MODIFIER_FUNCTION + 6,
NOISE = WAVE_MODIFIER_FUNCTION + 7,
UNKNOWN = -2
NOISE = WAVE_MODIFIER_FUNCTION + 7,
UNKNOWN = -2
};
struct SModifierFunction

View File

@ -9,7 +9,7 @@
#ifdef _IRR_COMPILE_WITH_LEAK_HUNTER_
#include "leakHunter.h"
#endif
#endif
namespace irr
{

View File

@ -702,17 +702,17 @@ namespace scene
{
if (!out)
return;
out->addString ("Name", Name.c_str());
out->addInt ("Id", ID );
out->addString("Name", Name.c_str());
out->addInt("Id", ID );
out->addVector3d("Position", getPosition() );
out->addVector3d("Rotation", getRotation() );
out->addVector3d("Scale", getScale() );
out->addBool ("Visible", IsVisible );
out->addInt ("AutomaticCulling", AutomaticCullingState);
out->addInt ("DebugDataVisible", DebugDataVisible );
out->addBool ("IsDebugObject", IsDebugObject );
out->addBool("Visible", IsVisible );
out->addInt("AutomaticCulling", AutomaticCullingState);
out->addInt("DebugDataVisible", DebugDataVisible );
out->addBool("IsDebugObject", IsDebugObject );
}

View File

@ -18,7 +18,7 @@ namespace scene
//! Special scene node animator for FPS cameras
/** This scene node animator can be attached to a camera to make it act
like a first person shooter
like a first person shooter
*/
class ISceneNodeAnimatorCameraFPS : public ISceneNodeAnimator
{
@ -45,15 +45,15 @@ namespace scene
virtual void setKeyMap(SKeyMap *map, u32 count) = 0;
//! Sets the keyboard mapping for this animator
//! \param keymap The new keymap array
//! \param keymap The new keymap array
virtual void setKeyMap(const core::array<SKeyMap>& keymap) = 0;
//! Gets the keyboard mapping for this animator
virtual const core::array<SKeyMap>& getKeyMap() const = 0;
//! Sets whether vertical movement should be allowed.
/** If vertical movement is enabled then the camera may fight with
gravity causing camera shake. Disable this if the camera has
/** If vertical movement is enabled then the camera may fight with
gravity causing camera shake. Disable this if the camera has
a collision animator with gravity enabled. */
virtual void setVerticalMovement(bool allow) = 0;

View File

@ -29,7 +29,7 @@ public:
//! Called when the scene manager create a scene node while loading a file.
virtual void OnCreateNode(ISceneNode* node) = 0;
//! Called when the scene manager read a scene node while loading a file.
/** The userData pointer contains a list of attributes with userData which
were attached to the scene node in the read scene file.*/

View File

@ -152,7 +152,7 @@ namespace scene
\param file The file to read the image from. File is not rewinded.
\param vertexColor Color of all vertices.
\param smoothFactor Number of smoothing passes. */
virtual bool loadHeightMap(io::IReadFile* file,
virtual bool loadHeightMap(io::IReadFile* file,
video::SColor vertexColor=video::SColor(255,255,255,255),
s32 smoothFactor=0) =0;

View File

@ -51,7 +51,7 @@ public:
// Day of the year, from 1 to 366
u32 Yearday;
// Whether daylight saving is on
bool IsDST;
bool IsDST;
};
virtual RealTimeDate getRealTimeAndDate() const = 0;

View File

@ -15,7 +15,7 @@ namespace io
{
//! Interface providing methods for making it easier to write XML files.
/** This XML Writer writes xml files using in the platform dependent
/** This XML Writer writes xml files using in the platform dependent
wchar_t format and sets the xml-encoding correspondingly. */
class IXMLWriter : public virtual IReferenceCounted
{

View File

@ -7,12 +7,12 @@
//! Irrlicht SDK Version
#define IRRLICHT_VERSION_MAJOR 1
#define IRRLICHT_VERSION_MINOR 8
#define IRRLICHT_VERSION_MINOR 9
#define IRRLICHT_VERSION_REVISION 0
// This flag will be defined only in SVN, the official release code will have
// it undefined
//#define IRRLICHT_VERSION_SVN -alpha
#define IRRLICHT_SDK_VERSION "1.8.0"
#define IRRLICHT_VERSION_SVN alpha
#define IRRLICHT_SDK_VERSION "1.9.0"
#include <stdio.h> // TODO: Although included elsewhere this is required at least for mingw
@ -177,7 +177,7 @@ If not defined, Windows Multimedia library is used, which offers also broad supp
#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
#endif
// can't get this to compile currently under borland, can be removed if someone has a better solution
#if defined(__BORLANDC__)
#if defined(__BORLANDC__)
#undef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
#endif
@ -463,7 +463,7 @@ B3D, MS3D or X meshes */
#ifdef NO_IRR_COMPILE_WITH_OGRE_LOADER_
#undef _IRR_COMPILE_WITH_OGRE_LOADER_
#endif
#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
//! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files
#define _IRR_COMPILE_WITH_IRR_MESH_LOADER_
@ -917,7 +917,6 @@ precision will be lower but speed higher. currently X86 only
#define _tfindnext __tfindnext
typedef long intptr_t;
#endif
#endif
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__

View File

@ -429,14 +429,14 @@ namespace video
{
u16 * dest = (u16*)data;
*dest = video::A8R8G8B8toA1R5G5B5( color );
}
}
break;
case ECF_R5G6B5:
{
u16 * dest = (u16*)data;
*dest = video::A8R8G8B8toR5G6B5( color );
}
}
break;
case ECF_R8G8B8:
@ -445,14 +445,14 @@ namespace video
dest[0] = (u8)getRed();
dest[1] = (u8)getGreen();
dest[2] = (u8)getBlue();
}
}
break;
case ECF_A8R8G8B8:
{
u32 * dest = (u32*)data;
*dest = color;
}
}
break;
default:

View File

@ -22,15 +22,15 @@ namespace video
//! Flag for EMT_ONETEXTURE_BLEND, ( BlendFactor ) BlendFunc = source * sourceFactor + dest * destFactor
enum E_BLEND_FACTOR
{
EBF_ZERO = 0, //!< src & dest (0, 0, 0, 0)
EBF_ONE, //!< src & dest (1, 1, 1, 1)
EBF_DST_COLOR, //!< src (destR, destG, destB, destA)
EBF_ZERO = 0, //!< src & dest (0, 0, 0, 0)
EBF_ONE, //!< src & dest (1, 1, 1, 1)
EBF_DST_COLOR, //!< src (destR, destG, destB, destA)
EBF_ONE_MINUS_DST_COLOR, //!< src (1-destR, 1-destG, 1-destB, 1-destA)
EBF_SRC_COLOR, //!< dest (srcR, srcG, srcB, srcA)
EBF_ONE_MINUS_SRC_COLOR, //!< dest (1-srcR, 1-srcG, 1-srcB, 1-srcA)
EBF_SRC_ALPHA, //!< src & dest (srcA, srcA, srcA, srcA)
EBF_SRC_COLOR, //!< dest (srcR, srcG, srcB, srcA)
EBF_ONE_MINUS_SRC_COLOR, //!< dest (1-srcR, 1-srcG, 1-srcB, 1-srcA)
EBF_SRC_ALPHA, //!< src & dest (srcA, srcA, srcA, srcA)
EBF_ONE_MINUS_SRC_ALPHA, //!< src & dest (1-srcA, 1-srcA, 1-srcA, 1-srcA)
EBF_DST_ALPHA, //!< src & dest (destA, destA, destA, destA)
EBF_DST_ALPHA, //!< src & dest (destA, destA, destA, destA)
EBF_ONE_MINUS_DST_ALPHA, //!< src & dest (1-destA, 1-destA, 1-destA, 1-destA)
EBF_SRC_ALPHA_SATURATE //!< src (min(srcA, 1-destA), idem, ...)
};
@ -39,11 +39,11 @@ namespace video
enum E_BLEND_OPERATION
{
EBO_NONE = 0, //!< No blending happens
EBO_ADD, //!< Default blending adds the color values
EBO_ADD, //!< Default blending adds the color values
EBO_SUBTRACT, //!< This mode subtracts the color values
EBO_REVSUBTRACT,//!< This modes subtracts destination from source
EBO_MIN, //!< Choose minimum value of each color channel
EBO_MAX, //!< Choose maximum value of each color channel
EBO_MIN, //!< Choose minimum value of each color channel
EBO_MAX, //!< Choose maximum value of each color channel
EBO_MIN_FACTOR, //!< Choose minimum value of each color channel after applying blend factors, not widely supported
EBO_MAX_FACTOR, //!< Choose maximum value of each color channel after applying blend factors, not widely supported
EBO_MIN_ALPHA, //!< Choose minimum value of each color channel based on alpha value, not widely supported
@ -128,7 +128,7 @@ namespace video
{
const u32 state = IR(param);
alphaSource = (state & 0x0000F000) >> 12;
modulo = E_MODULATE_FUNC( ( state & 0x00000F00 ) >> 8 );
modulo = E_MODULATE_FUNC( ( state & 0x00000F00 ) >> 8 );
srcFact = E_BLEND_FACTOR ( ( state & 0x000000F0 ) >> 4 );
dstFact = E_BLEND_FACTOR ( ( state & 0x0000000F ) );
}
@ -370,7 +370,7 @@ namespace video
u8 ZBuffer;
//! Sets the antialiasing mode
/** Values are chosen from E_ANTI_ALIASING_MODE. Default is
/** Values are chosen from E_ANTI_ALIASING_MODE. Default is
EAAM_SIMPLE|EAAM_LINE_SMOOTH, i.e. simple multi-sample
anti-aliasing and lime smoothing is enabled. */
u8 AntiAliasing;
@ -384,7 +384,7 @@ namespace video
//! Defines the interpretation of vertex color in the lighting equation
/** Values should be chosen from E_COLOR_MATERIAL.
When lighting is enabled, vertex color can be used instead of the
When lighting is enabled, vertex color can be used instead of the
material values for light modulation. This allows to easily change e.g. the
diffuse light behavior of each face. The default, ECM_DIFFUSE, will result in
a very similar rendering as with lighting turned off, just with light shading. */

View File

@ -73,7 +73,7 @@ namespace video
~SMaterialLayer()
{
MatrixAllocator.destruct(TextureMatrix);
MatrixAllocator.deallocate(TextureMatrix);
MatrixAllocator.deallocate(TextureMatrix);
}
//! Assignment operator
@ -93,7 +93,7 @@ namespace video
else
{
MatrixAllocator.destruct(TextureMatrix);
MatrixAllocator.deallocate(TextureMatrix);
MatrixAllocator.deallocate(TextureMatrix);
TextureMatrix = 0;
}
}
@ -200,8 +200,8 @@ namespace video
/** In Irrlicht you can use anisotropic texture filtering
in conjunction with bilinear or trilinear texture
filtering to improve rendering results. Primitives
will look less blurry with this flag switched on. The number gives
the maximal anisotropy degree, and is often in the range 2-16.
will look less blurry with this flag switched on. The number gives
the maximal anisotropy degree, and is often in the range 2-16.
Value 1 is equivalent to 0, but should be avoided. */
u8 AnisotropicFilter;

View File

@ -20,27 +20,26 @@ namespace core
// ----------- some basic quite often used string functions -----------------
//! search if a filename has a proper extension
inline s32 isFileExtension ( const io::path& filename,
const io::path& ext0,
const io::path& ext1,
const io::path& ext2)
inline s32 isFileExtension (const io::path& filename, const io::path& ext0,
const io::path& ext1, const io::path& ext2)
{
s32 extPos = filename.findLast ( '.' );
if ( extPos < 0 )
return 0;
extPos += 1;
if ( filename.equals_substring_ignore_case ( ext0, extPos ) ) return 1;
if ( filename.equals_substring_ignore_case ( ext1, extPos ) ) return 2;
if ( filename.equals_substring_ignore_case ( ext2, extPos ) ) return 3;
if ( filename.equals_substring_ignore_case ( ext0, extPos ) )
return 1;
if ( filename.equals_substring_ignore_case ( ext1, extPos ) )
return 2;
if ( filename.equals_substring_ignore_case ( ext2, extPos ) )
return 3;
return 0;
}
//! search if a filename has a proper extension
inline bool hasFileExtension ( const io::path& filename,
const io::path& ext0,
const io::path& ext1 = "",
const io::path& ext2 = "")
inline bool hasFileExtension(const io::path& filename, const io::path& ext0,
const io::path& ext1 = "", const io::path& ext2 = "")
{
return isFileExtension ( filename, ext0, ext1, ext2 ) > 0;
}

View File

@ -13,8 +13,8 @@ namespace irr
namespace core
{
//! Selection of characters which count as decimal point in fast_atof
// TODO: This should probably also be used in irr::core::string, but the float-to-string code
// used there has to be rewritten first.
// TODO: This should probably also be used in irr::core::string, but
// the float-to-string code used there has to be rewritten first.
IRRLICHT_API extern irr::core::stringc LOCALE_DECIMAL_POINTS;
// we write [17] here instead of [] to work around a swig bug

View File

@ -25,8 +25,7 @@ class array
public:
//! Default constructor for empty array.
array()
: data(0), allocated(0), used(0),
array() : data(0), allocated(0), used(0),
strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true)
{
}
@ -34,9 +33,9 @@ public:
//! Constructs an array and allocates an initial chunk of memory.
/** \param start_count Amount of elements to pre-allocate. */
array(u32 start_count)
: data(0), allocated(0), used(0),
strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true)
array(u32 start_count) : data(0), allocated(0), used(0),
strategy(ALLOC_STRATEGY_DOUBLE),
free_when_destroyed(true), is_sorted(true)
{
reallocate(start_count);
}
@ -468,8 +467,8 @@ public:
//! it is used for searching a multiset
/** The array will be sorted before the binary search if it is not
already sorted.
\param element Element to search for.
\param &last return lastIndex of equal elements
\param element Element to search for.
\param &last return lastIndex of equal elements
\return Position of the first searched element if it was found,
otherwise -1 is returned. */
s32 binary_search_multi(const T& element, s32 &last)
@ -567,12 +566,12 @@ public:
for (i=index+count; i<used; ++i)
{
if (i-count >= index+count) // not already destructed before loop
if (i-count >= index+count) // not already destructed before loop
allocator.destruct(&data[i-count]);
allocator.construct(&data[i-count], data[i]); // data[i-count] = data[i];
if (i >= used-count) // those which are not overwritten
if (i >= used-count) // those which are not overwritten
allocator.destruct(&data[i]);
}
@ -590,14 +589,14 @@ public:
//! Swap the content of this array container with the content of another array
/** Afterwards this object will contain the content of the other object and the other
object will contain the content of this object.
\param other Swap content with this object */
\param other Swap content with this object */
void swap(array<T, TAlloc>& other)
{
core::swap(data, other.data);
core::swap(allocated, other.allocated);
core::swap(used, other.used);
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
eAllocStrategy helper_strategy(strategy); // can't use core::swap with bitfields
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
eAllocStrategy helper_strategy(strategy); // can't use core::swap with bitfields
strategy = other.strategy;
other.strategy = helper_strategy;
bool helper_free_when_destroyed(free_when_destroyed);

View File

@ -389,13 +389,13 @@ public:
/** Afterwards this object will contain the content of the other object and the other
object will contain the content of this object. Iterators will afterwards be valid for
the swapped object.
\param other Swap content with this object */
\param other Swap content with this object */
void swap(list<T>& other)
{
core::swap(First, other.First);
core::swap(Last, other.Last);
core::swap(Size, other.Size);
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
}

View File

@ -41,16 +41,16 @@ class map
p->setParent(this);
}
void setParent(RBTree* p) { Parent=p; }
void setParent(RBTree* p) { Parent=p; }
void setValue(const ValueTypeRB& v) { Value = v; }
void setValue(const ValueTypeRB& v) { Value = v; }
void setRed() { IsRed = true; }
void setBlack() { IsRed = false; }
void setRed() { IsRed = true; }
void setBlack() { IsRed = false; }
RBTree* getLeftChild() const { return LeftChild; }
RBTree* getRightChild() const { return RightChild; }
RBTree* getParent() const { return Parent; }
RBTree* getLeftChild() const { return LeftChild; }
RBTree* getRightChild() const { return RightChild; }
RBTree* getParent() const { return Parent; }
const ValueTypeRB& getValue() const
{
@ -118,13 +118,13 @@ class map
private:
RBTree();
RBTree* LeftChild;
RBTree* RightChild;
RBTree* LeftChild;
RBTree* RightChild;
RBTree* Parent;
RBTree* Parent;
KeyTypeRB Key;
ValueTypeRB Value;
KeyTypeRB Key;
ValueTypeRB Value;
bool IsRed;
}; // RBTree
@ -442,7 +442,7 @@ class map
{
public:
ParentFirstIterator() : Root(0), Cur(0) {}
ParentFirstIterator() : Root(0), Cur(0) {}
explicit ParentFirstIterator(Node* root) : Root(root), Cur(0)
{
@ -938,7 +938,7 @@ class map
/** Afterwards this object will contain the content of the other object and the other
object will contain the content of this object. Iterators will afterwards be valid for
the swapped object.
\param other Swap content with this object */
\param other Swap content with this object */
void swap(map<KeyType, ValueType>& other)
{
core::swap(Root, other.Root);

View File

@ -53,19 +53,19 @@ namespace core
#undef PI
#endif
//! Constant for PI.
const f32 PI = 3.14159265359f;
const f32 PI = 3.14159265359f;
//! Constant for reciprocal of PI.
const f32 RECIPROCAL_PI = 1.0f/PI;
const f32 RECIPROCAL_PI = 1.0f/PI;
//! Constant for half of PI.
const f32 HALF_PI = PI/2.0f;
const f32 HALF_PI = PI/2.0f;
#ifdef PI64 // make sure we don't collide with a define
#undef PI64
#endif
//! Constant for 64bit PI.
const f64 PI64 = 3.1415926535897932384626433832795028841971693993751;
const f64 PI64 = 3.1415926535897932384626433832795028841971693993751;
//! Constant for 64bit reciprocal of PI.
const f64 RECIPROCAL_PI64 = 1.0/PI64;
@ -84,7 +84,7 @@ namespace core
//! Utility function to convert a radian value to degrees
/** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X
\param radians The radians value to convert to degrees.
\param radians The radians value to convert to degrees.
*/
inline f32 radToDeg(f32 radians)
{
@ -93,7 +93,7 @@ namespace core
//! Utility function to convert a radian value to degrees
/** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X
\param radians The radians value to convert to degrees.
\param radians The radians value to convert to degrees.
*/
inline f64 radToDeg(f64 radians)
{
@ -102,7 +102,7 @@ namespace core
//! Utility function to convert a degrees value to radians
/** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X
\param degrees The degrees value to convert to radians.
\param degrees The degrees value to convert to radians.
*/
inline f32 degToRad(f32 degrees)
{
@ -111,7 +111,7 @@ namespace core
//! Utility function to convert a degrees value to radians
/** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X
\param degrees The degrees value to convert to radians.
\param degrees The degrees value to convert to radians.
*/
inline f64 degToRad(f64 degrees)
{
@ -348,26 +348,26 @@ namespace core
//! code is taken from IceFPU
//! Integer representation of a floating-point value.
#ifdef IRRLICHT_FAST_MATH
#define IR(x) ((u32&)(x))
#define IR(x) ((u32&)(x))
#else
inline u32 IR(f32 x) {inttofloat tmp; tmp.f=x; return tmp.u;}
#endif
//! Absolute integer representation of a floating-point value
#define AIR(x) (IR(x)&0x7fffffff)
#define AIR(x) (IR(x)&0x7fffffff)
//! Floating-point representation of an integer value.
#ifdef IRRLICHT_FAST_MATH
#define FR(x) ((f32&)(x))
#define FR(x) ((f32&)(x))
#else
inline f32 FR(u32 x) {inttofloat tmp; tmp.u=x; return tmp.f;}
inline f32 FR(s32 x) {inttofloat tmp; tmp.s=x; return tmp.f;}
#endif
//! integer representation of 1.0
#define IEEE_1_0 0x3f800000
#define IEEE_1_0 0x3f800000
//! integer representation of 255.0
#define IEEE_255_0 0x437f0000
#define IEEE_255_0 0x437f0000
#ifdef IRRLICHT_FAST_MATH
#define F32_LOWER_0(f) (F32_AS_U32(f) > F32_SIGN_BIT)

View File

@ -74,7 +74,7 @@ typedef signed int s32;
typedef unsigned __int64 u64;
#elif __GNUC__
#if __WORDSIZE == 64
typedef unsigned long int u64;
typedef unsigned long int u64;
#else
__extension__ typedef unsigned long long u64;
#endif
@ -88,7 +88,7 @@ typedef unsigned long long u64;
typedef __int64 s64;
#elif __GNUC__
#if __WORDSIZE == 64
typedef long int s64;
typedef long int s64;
#else
__extension__ typedef long long s64;
#endif
@ -164,18 +164,18 @@ strings
//! define a break macro for debugging.
#if defined(_DEBUG)
#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE)
#if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration
#include <crtdbg.h>
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
#else
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
#endif
#if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration
#include <crtdbg.h>
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
#else
#include "assert.h"
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
#endif
#else
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
#include "assert.h"
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
#endif
#else
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
#endif
//! Defines a deprecated macro which generates a warning at compile time

View File

@ -381,7 +381,7 @@ namespace io
xmlChar<T>(unsigned short in) : c(static_cast<T>(in)) {}
xmlChar<T>(unsigned int in) : c(static_cast<T>(in)) {}
xmlChar<T>(unsigned long in) : c(static_cast<T>(in)) {}
#else
#else
explicit xmlChar<T>(unsigned char in) : c(static_cast<T>(in)) {}
explicit xmlChar<T>(unsigned short in) : c(static_cast<T>(in)) {}
explicit xmlChar<T>(unsigned int in) : c(static_cast<T>(in)) {}

View File

@ -187,7 +187,7 @@
#include "vector2d.h"
#include "vector3d.h"
/*! \mainpage Irrlicht Engine 1.8 API documentation
/*! \mainpage Irrlicht Engine 1.9 API documentation
*
* <div align="center"><img src="logobig.png" ></div>
*

View File

@ -13,40 +13,40 @@
namespace irr
{
class IReferenceCounted;
//! A calls helping to find unrelease objects of type IReferenceCounted.
/** To use this you have recompile Irrlicht with _IRR_COMPILE_WITH_LEAK_HUNTER_.
Note that this will slow down your application and should only be used for debugging.
Note that this will slow down your application and should only be used for debugging.
The way to use is that you can check after you closed and dropped your last Irrlicht device
if there are still any IReferenceCounted left over which have not been deleted.
*/
class LeakHunter
class LeakHunter
{
public:
friend class IReferenceCounted;
//! Clear all IReferenceCounted objects inside LeakHunter
/** This does not affect the IReferenceCounted themselfes only the
counting of them. Usually you don't ever need to clear, but
sometimes it helps when for example you want for to ignore
/** This does not affect the IReferenceCounted themselfes only the
counting of them. Usually you don't ever need to clear, but
sometimes it helps when for example you want for to ignore
certain leaks.
*/
static void clearReferenceCountedObjects()
static void clearReferenceCountedObjects()
{
ReferenceCountedObjects.clear();
}
static inline irr::core::array<const IReferenceCounted*> getReferenceCountedObjects()
{
return ReferenceCountedObjects;
return ReferenceCountedObjects;
}
protected:
protected:
static inline void addObject(const IReferenceCounted* object)
{
ReferenceCountedObjects.push_back(object);
}
static inline void removeObject(const IReferenceCounted* object)
{
irr::s32 idx = ReferenceCountedObjects.linear_search(object );
@ -56,10 +56,10 @@ namespace irr
ReferenceCountedObjects.erase( ReferenceCountedObjects.size()-1 );
}
}
private:
// NOTE: We don't do additional grab()/drop()'s here as we want to supervise reference counted objects and not affect them otherwise.
IRRLICHT_API static irr::core::array<const IReferenceCounted*> ReferenceCountedObjects;
IRRLICHT_API static irr::core::array<const IReferenceCounted*> ReferenceCountedObjects;
};
} // end namespace irr

View File

@ -78,14 +78,14 @@ class line2d
{
// Uses the method given at:
// http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
const f32 commonDenominator = (f32)(l.end.Y - l.start.Y)*(end.X - start.X) -
(l.end.X - l.start.X)*(end.Y - start.Y);
const f32 commonDenominator = (f32)((l.end.Y - l.start.Y)*(end.X - start.X) -
(l.end.X - l.start.X)*(end.Y - start.Y));
const f32 numeratorA = (f32)(l.end.X - l.start.X)*(start.Y - l.start.Y) -
(l.end.Y - l.start.Y)*(start.X -l.start.X);
const f32 numeratorA = (f32)((l.end.X - l.start.X)*(start.Y - l.start.Y) -
(l.end.Y - l.start.Y)*(start.X -l.start.X));
const f32 numeratorB = (f32)(end.X - start.X)*(start.Y - l.start.Y) -
(end.Y - start.Y)*(start.X -l.start.X);
const f32 numeratorB = (f32)((end.X - start.X)*(start.Y - l.start.Y) -
(end.Y - start.Y)*(start.X -l.start.X));
if(equals(commonDenominator, 0.f))
{
@ -218,7 +218,7 @@ class line2d
vector2d<f64> c((f64)(point.X-start.X), (f64)(point.Y- start.Y));
vector2d<f64> v((f64)(end.X-start.X), (f64)(end.Y-start.Y));
f64 d = v.getLength();
if ( d == 0 ) // can't tell much when the line is just a single point
if ( d == 0 ) // can't tell much when the line is just a single point
return start;
v /= d;
f64 t = v.dotProduct(c);
@ -246,7 +246,7 @@ class line2d
vector2df c = point - start;
vector2df v = end - start;
f32 d = (f32)v.getLength();
if ( d == 0 ) // can't tell much when the line is just a single point
if ( d == 0 ) // can't tell much when the line is just a single point
return start;
v /= d;
f32 t = v.dotProduct(c);

View File

@ -947,18 +947,18 @@ namespace core
template <class T>
inline CMatrix4<T>& CMatrix4<T>::setRotationAxisRadians( const T& angle, const vector3d<T>& axis )
{
const f64 c = cos(angle);
const f64 c = cos(angle);
const f64 s = sin(angle);
const f64 t = 1.0 - c;
const f64 tx = t * axis.X;
const f64 ty = t * axis.Y;
const f64 ty = t * axis.Y;
const f64 tz = t * axis.Z;
const f64 sx = s * axis.X;
const f64 sy = s * axis.Y;
const f64 sz = s * axis.Z;
M[0] = (T)(tx * axis.X + c);
M[1] = (T)(tx * axis.Y + sz);
M[2] = (T)(tx * axis.Z - sy);

View File

@ -37,14 +37,14 @@ class plane3d
// Constructors
plane3d(): Normal(0,1,0) { recalculateD(vector3d<T>(0,0,0)); }
plane3d(const vector3d<T>& MPoint, const vector3d<T>& Normal) : Normal(Normal) { recalculateD(MPoint); }
plane3d(T px, T py, T pz, T nx, T ny, T nz) : Normal(nx, ny, nz) { recalculateD(vector3d<T>(px, py, pz)); }
plane3d(const vector3d<T>& point1, const vector3d<T>& point2, const vector3d<T>& point3)
{ setPlane(point1, point2, point3); }
plane3d(const vector3d<T> & normal, const T d) : Normal(normal), D(d) { }
// operators

View File

@ -11,7 +11,7 @@
#include "vector3d.h"
// Between Irrlicht 1.7 and Irrlicht 1.8 the quaternion-matrix conversions got fixed.
// This define disables all involved functions completely to allow finding all places
// This define disables all involved functions completely to allow finding all places
// where the wrong conversions had been in use.
#define IRR_TEST_BROKEN_QUATERNION_USE 0
@ -101,7 +101,7 @@ class quaternion
#if !IRR_TEST_BROKEN_QUATERNION_USE
//! Creates a matrix from this quaternion
matrix4 getMatrix() const;
#endif
#endif
//! Creates a matrix from this quaternion
void getMatrix( matrix4 &dest, const core::vector3df &translation=core::vector3df() ) const;

View File

@ -93,8 +93,8 @@ namespace core
vector3d<f64> cf64((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z);
vector3d<f64> pf64((f64)p.X, (f64)p.Y, (f64)p.Z);
return (isOnSameSide(pf64, af64, bf64, cf64) &&
isOnSameSide(pf64, bf64, af64, cf64) &&
isOnSameSide(pf64, cf64, af64, bf64));
isOnSameSide(pf64, bf64, af64, cf64) &&
isOnSameSide(pf64, cf64, af64, bf64));
}
//! Check if a point is inside the triangle (border-points count also as inside)
@ -254,9 +254,9 @@ namespace core
// This catches some floating point troubles.
// Unfortunately slightly expensive and we don't really know the best epsilon for iszero.
vector3d<f64> cp1 = bminusa.normalize().crossProduct((p1 - a).normalize());
if ( core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) )
if (core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32)
&& core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) )
{
res = 0.f;
}

View File

@ -67,28 +67,28 @@ public:
//! sort in order X, Y. Equality with rounding tolerance.
bool operator<=(const vector2d<T>&other) const
{
return (X<other.X || core::equals(X, other.X)) ||
return (X<other.X || core::equals(X, other.X)) ||
(core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y)));
}
//! sort in order X, Y. Equality with rounding tolerance.
bool operator>=(const vector2d<T>&other) const
{
return (X>other.X || core::equals(X, other.X)) ||
return (X>other.X || core::equals(X, other.X)) ||
(core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y)));
}
//! sort in order X, Y. Difference must be above rounding tolerance.
bool operator<(const vector2d<T>&other) const
{
return (X<other.X && !core::equals(X, other.X)) ||
return (X<other.X && !core::equals(X, other.X)) ||
(core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y));
}
//! sort in order X, Y. Difference must be above rounding tolerance.
bool operator>(const vector2d<T>&other) const
{
return (X>other.X && !core::equals(X, other.X)) ||
return (X>other.X && !core::equals(X, other.X)) ||
(core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y));
}

View File

@ -60,7 +60,7 @@ namespace core
//! sort in order X, Y, Z. Equality with rounding tolerance.
bool operator<=(const vector3d<T>&other) const
{
return (X<other.X || core::equals(X, other.X)) ||
return (X<other.X || core::equals(X, other.X)) ||
(core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y))) ||
(core::equals(X, other.X) && core::equals(Y, other.Y) && (Z<other.Z || core::equals(Z, other.Z)));
}
@ -68,7 +68,7 @@ namespace core
//! sort in order X, Y, Z. Equality with rounding tolerance.
bool operator>=(const vector3d<T>&other) const
{
return (X>other.X || core::equals(X, other.X)) ||
return (X>other.X || core::equals(X, other.X)) ||
(core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y))) ||
(core::equals(X, other.X) && core::equals(Y, other.Y) && (Z>other.Z || core::equals(Z, other.Z)));
}
@ -76,7 +76,7 @@ namespace core
//! sort in order X, Y, Z. Difference must be above rounding tolerance.
bool operator<(const vector3d<T>&other) const
{
return (X<other.X && !core::equals(X, other.X)) ||
return (X<other.X && !core::equals(X, other.X)) ||
(core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y)) ||
(core::equals(X, other.X) && core::equals(Y, other.Y) && Z<other.Z && !core::equals(Z, other.Z));
}
@ -84,7 +84,7 @@ namespace core
//! sort in order X, Y, Z. Difference must be above rounding tolerance.
bool operator>(const vector3d<T>&other) const
{
return (X>other.X && !core::equals(X, other.X)) ||
return (X>other.X && !core::equals(X, other.X)) ||
(core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y)) ||
(core::equals(X, other.X) && core::equals(Y, other.Y) && Z>other.Z && !core::equals(Z, other.Z));
}

View File

@ -1,5 +1,5 @@
==========================================================================
The Irrlicht Engine SDK version 1.8
The Irrlicht Engine SDK version 1.9
==========================================================================
Welcome the Irrlicht Engine SDK.

View File

@ -11,7 +11,7 @@
# norootforbuild
Name: libIrrlicht1
Version: 1.8.0
Version: 1.9.0
Release: 0.pm.1
Summary: The Irrlicht Engine SDK
License: see readme.txt

View File

@ -139,8 +139,8 @@ namespace scene
} PACK_STRUCT;
#ifndef ZONE_H
// NOTE: this was a void*, but that crashes on 64bit.
// I have found no mdl format desc, so not sure what it's meant to be, but s32 at least works.
// NOTE: this was a void*, but that crashes on 64bit.
// I have found no mdl format desc, so not sure what it's meant to be, but s32 at least works.
typedef s32 cache_user_t;
#endif
@ -391,9 +391,9 @@ namespace scene
EAMT_STILL,
//! From Start to End, then Stop ( Limited Line )
EAMT_WAYPOINT,
//! Linear Cycling Animation ( Sawtooth )
//! Linear Cycling Animation ( Sawtooth )
EAMT_LOOPING,
//! Linear bobbing ( Triangle )
//! Linear bobbing ( Triangle )
EAMT_PINGPONG
};

View File

@ -56,7 +56,7 @@ namespace scene
virtual IMeshBuffer* getMeshBuffer(u32 nr) const;
//! Returns pointer to a mesh buffer which fits a material
/** \param material: material to search for
/** \param material: material to search for
\return Returns the pointer to the mesh buffer or
NULL if there is no such mesh buffer. */
virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const;
@ -126,11 +126,11 @@ namespace scene
};
//! keyframe transformations
core::array<SKeyFrameTransform> FrameTransforms;
core::array<SKeyFrameTransform> FrameTransforms;
//! keyframe vertex data
core::array<SMD2Vert> *FrameList;
//! bounding boxes for each keyframe
core::array<core::aabbox3d<f32> > BoxList;

View File

@ -30,7 +30,7 @@ namespace scene
virtual ~CAnimatedMeshMD3();
//! loads a quake3 md3 file
virtual bool loadModelFile(u32 modelIndex, io::IReadFile* file,
virtual bool loadModelFile(u32 modelIndex, io::IReadFile* file,
io::IFileSystem* fs, video::IVideoDriver* driver);
// IAnimatedMeshMD3

View File

@ -660,14 +660,14 @@ public:
ret.Normal.X = Count > 0 ? ValueF[0] : 0.0f;
ret.Normal.Y = Count > 1 ? ValueF[1] : 0.0f;
ret.Normal.Z = Count > 2 ? ValueF[2] : 0.0f;
ret.D = Count > 3 ? ValueF[3] : 0.0f;
ret.D = Count > 3 ? ValueF[3] : 0.0f;
}
else
{
ret.Normal.X = Count > 0 ? (f32)ValueI[0] : 0.0f;
ret.Normal.Y = Count > 1 ? (f32)ValueI[1] : 0.0f;
ret.Normal.Z = Count > 2 ? (f32)ValueI[2] : 0.0f;
ret.D = Count > 3 ? (f32)ValueI[3] : 0.0f;
ret.D = Count > 3 ? (f32)ValueI[3] : 0.0f;
}
return ret;
@ -1918,7 +1918,7 @@ public:
if ( Value )
return core::stringc(Value->getName().getPath().c_str());
return core::stringc(0);
}

View File

@ -341,7 +341,7 @@ video::SColor CAttributes::getAttributeAsColor(const c8* attributeName, const vi
IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getColor();
else
else
return defaultNotFound;
}
@ -1078,7 +1078,7 @@ core::quaternion CAttributes::getAttributeAsQuaternion(const c8* attributeName,
IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getQuaternion();
else
else
return defaultNotFound;
}
@ -1170,7 +1170,7 @@ core::plane3df CAttributes::getAttributeAsPlane3d(const c8* attributeName, const
IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getPlane();
else
else
return defaultNotFound;
}
@ -1216,7 +1216,7 @@ core::triangle3df CAttributes::getAttributeAsTriangle3d(const c8* attributeName,
IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getTriangle();
else
else
return defaultNotFound;
}
@ -1263,7 +1263,7 @@ core::line2df CAttributes::getAttributeAsLine2d(const c8* attributeName, const c
IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getLine2d();
else
else
return defaultNotFound;
}
@ -1358,7 +1358,7 @@ void* CAttributes::getAttributeAsUserPointer(const c8* attributeName, void* defa
IAttribute* att = getAttributeP(attributeName);
if (att)
return att->getUserPointer();
else
else
return defaultNotFound;
}

View File

@ -66,7 +66,7 @@ public:
//! \param readCurrentElementOnly: If set to true, reading only works if current element has the name 'attributes'.
//! IF set to false, the first appearing list attributes are read.
virtual bool read(io::IXMLReader* reader, bool readCurrentElementOnly=false,
const wchar_t* nonDefaultElementName = 0);
const wchar_t* nonDefaultElementName = 0);
//! Write these attributes into a xml file
virtual bool write(io::IXMLWriter* writer, bool writeXMLHeader=false, const wchar_t* nonDefaultElementName=0);

View File

@ -153,7 +153,7 @@ void CBillboardSceneNode::setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWi
{
Size.set(bottomEdgeWidth, height);
TopEdgeWidth = topEdgeWidth;
if (core::equals(Size.Height, 0.0f))
Size.Height = 1.0f;
@ -197,7 +197,7 @@ void CBillboardSceneNode::getSize(f32& height, f32& bottomEdgeWidth,
bottomEdgeWidth = Size.Width;
topEdgeWidth = TopEdgeWidth;
}
//! Writes attributes of the scene node.
void CBillboardSceneNode::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const

View File

@ -14,13 +14,13 @@ namespace scene
{
//! Scene node which is a billboard. A billboard is like a 3d sprite: A 2d element,
//! which always looks to the camera.
//! which always looks to the camera.
class CBillboardSceneNode : virtual public IBillboardSceneNode
{
public:
//! constructor
CBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
CBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
const core::vector3df& position, const core::dimension2d<f32>& size,
video::SColor colorTop=video::SColor(0xFFFFFFFF),
video::SColor colorBottom=video::SColor(0xFFFFFFFF));
@ -40,17 +40,17 @@ public:
//! Sets the widths of the top and bottom edges of the billboard independently.
virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth);
//! gets the size of the billboard
virtual const core::dimension2d<f32>& getSize() const;
//! gets the size of the billboard
virtual const core::dimension2d<f32>& getSize() const;
//! Gets the widths of the top and bottom edges of the billboard.
virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const;
virtual video::SMaterial& getMaterial(u32 i);
//! returns amount of materials used by this scene node.
virtual u32 getMaterialCount() const;
//! Set the color of all vertices of the billboard
//! \param overallColor: the color to set
virtual void setColor(const video::SColor& overallColor);
@ -78,7 +78,7 @@ public:
//! Creates a clone of this scene node and its children.
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
private:
//! Size.Width is the bottom edge width

View File

@ -465,7 +465,7 @@ static void RenderLine16_Blend(video::IImage *t,
d -= c;
}
run -= 1;
} while (run>=0);
} while (run>=0);
t->unlock();
}
@ -488,7 +488,7 @@ static void executeBlit_TextureCopy_x_to_x( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y );
for ( u32 dx = 0; dx < w; ++dx )
{
const u32 src_x = (u32)(dx*wscale);
@ -531,7 +531,7 @@ static void executeBlit_TextureCopy_32_to_16( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y );
for ( u32 dx = 0; dx < w; ++dx )
{
const u32 src_x = (u32)(dx*wscale);
@ -577,7 +577,7 @@ static void executeBlit_TextureCopy_24_to_16( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (u8*)(job->src) + job->srcPitch*src_y;
for ( u32 dx = 0; dx < w; ++dx )
{
const u8* src_x = src+(u32)(dx*wscale);
@ -622,7 +622,7 @@ static void executeBlit_TextureCopy_16_to_32( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (u16*) ( (u8*) (job->src) + job->srcPitch*src_y );
for ( u32 dx = 0; dx < w; ++dx )
{
const u32 src_x = (u32)(dx*wscale);
@ -662,7 +662,7 @@ static void executeBlit_TextureCopy_16_to_24( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (u16*) ( (u8*) (job->src) + job->srcPitch*src_y );
for ( u32 dx = 0; dx < w; ++dx )
{
const u32 src_x = (u32)(dx*wscale);
@ -712,7 +712,7 @@ static void executeBlit_TextureCopy_24_to_32( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (const u8*)job->src+(job->srcPitch*src_y);
for ( u32 dx = 0; dx < w; ++dx )
{
const u8* s = src+(u32)(dx*wscale);
@ -805,7 +805,7 @@ static void executeBlit_TextureBlend_16_to_16( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y );
for ( u32 dx = 0; dx < rdx; ++dx )
{
const u32 src_x = (u32)(dx*wscale);
@ -857,7 +857,7 @@ static void executeBlit_TextureBlend_32_to_32( const SBlitJob * job )
{
const u32 src_y = (u32)(dy*hscale);
src = (u32*) ( (u8*) (job->src) + job->srcPitch*src_y );
for ( u32 dx = 0; dx < w; ++dx )
{
const u32 src_x = (u32)(dx*wscale);
@ -1060,7 +1060,7 @@ static inline tExecuteBlit getBlitter2( eBlitter operation,const video::IImage *
// bounce clipping to texture
inline void setClip ( AbsRectangle &out, const core::rect<s32> *clip,
const video::IImage * tex, s32 passnative )
const video::IImage * tex, s32 passnative )
{
if ( clip && 0 == tex && passnative )
{
@ -1228,7 +1228,7 @@ static void drawRectangle(video::IImage* img, const core::rect<s32>& rect, const
//! draws a line from to with color
static void drawLine(video::IImage* img, const core::position2d<s32>& from,
const core::position2d<s32>& to, const video::SColor &color)
const core::position2d<s32>& to, const video::SColor &color)
{
AbsRectangle clip;
GetClip(clip, img);

View File

@ -795,7 +795,6 @@ REALINLINE void CBurningShader_Raster_Reference::scanline ()
pShader.i += 1;
if ( pShader.i > pShader.dx )
return;
}
}
@ -846,7 +845,6 @@ REALINLINE void CBurningShader_Raster_Reference::scanline ()
}
}
void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c )
@ -938,21 +936,21 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
// correct to pixel center
scan.x[0] += scan.slopeX[0] * subPixel;
scan.x[1] += scan.slopeX[1] * subPixel;
scan.x[1] += scan.slopeX[1] * subPixel;
scan.w[0] += scan.slopeW[0] * subPixel;
scan.w[1] += scan.slopeW[1] * subPixel;
scan.w[1] += scan.slopeW[1] * subPixel;
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
scan.c[i][0] += scan.slopeC[i][0] * subPixel;
scan.c[i][1] += scan.slopeC[i][1] * subPixel;
scan.c[i][1] += scan.slopeC[i][1] * subPixel;
}
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
scan.t[i][0] += scan.slopeT[i][0] * subPixel;
scan.t[i][1] += scan.slopeT[i][1] * subPixel;
scan.t[i][1] += scan.slopeT[i][1] * subPixel;
}
// rasterize the edge scanlines
@ -1053,21 +1051,21 @@ void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4
// correct to pixel center
scan.x[0] += scan.slopeX[0] * subPixel;
scan.x[1] += scan.slopeX[1] * subPixel;
scan.x[1] += scan.slopeX[1] * subPixel;
scan.w[0] += scan.slopeW[0] * subPixel;
scan.w[1] += scan.slopeW[1] * subPixel;
scan.w[1] += scan.slopeW[1] * subPixel;
for ( i = 0; i != ShaderParam.ColorUnits; ++i )
{
scan.c[i][0] += scan.slopeC[i][0] * subPixel;
scan.c[i][1] += scan.slopeC[i][1] * subPixel;
scan.c[i][1] += scan.slopeC[i][1] * subPixel;
}
for ( i = 0; i != ShaderParam.TextureUnits; ++i )
{
scan.t[i][0] += scan.slopeT[i][0] * subPixel;
scan.t[i][1] += scan.slopeT[i][1] * subPixel;
scan.t[i][1] += scan.slopeT[i][1] * subPixel;
}
// rasterize the edge scanlines

View File

@ -18,7 +18,7 @@ namespace scene
public:
//! constructor
CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
CCameraSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
const core::vector3df& position = core::vector3df(0,0,0),
const core::vector3df& lookat = core::vector3df(0,0,100));
@ -48,10 +48,10 @@ namespace scene
virtual const core::matrix4& getViewMatrixAffector() const;
//! It is possible to send mouse and key events to the camera. Most cameras
//! may ignore this input, but camera scene nodes which are created for
//! may ignore this input, but camera scene nodes which are created for
//! example with scene::ISceneManager::addMayaCameraSceneNode or
//! scene::ISceneManager::addMeshViewerCameraSceneNode, may want to get this input
//! for changing their position, look at target or whatever.
//! for changing their position, look at target or whatever.
virtual bool OnEvent(const SEvent& event);
//! Sets the look at target of the camera
@ -156,9 +156,9 @@ namespace scene
core::vector3df Target;
core::vector3df UpVector;
f32 Fovy; // Field of view, in radians.
f32 Aspect; // Aspect ratio.
f32 ZNear; // value of the near view-plane.
f32 Fovy; // Field of view, in radians.
f32 Aspect; // Aspect ratio.
f32 ZNear; // value of the near view-plane.
f32 ZFar; // Z-value of the far view-plane.
SViewFrustum ViewArea;

View File

@ -1560,7 +1560,7 @@ void CColladaFileLoader::readEffect(io::IXMLReaderUTF8* reader, SColladaEffect *
idx = effect->Parameters->findAttribute(wraptName.c_str());
if ( idx >= 0 )
twv = (video::E_TEXTURE_CLAMP)(effect->Parameters->getAttributeAsInt(idx));
for (u32 i=0; i<video::MATERIAL_MAX_TEXTURES; ++i)
{
effect->Mat.TextureLayer[i].TextureWrapU = twu;

View File

@ -136,7 +136,7 @@ struct SColladaEffect
core::array<core::stringc> Textures;
video::SMaterial Mat;
// TODO: Parameters looks somewhat lazy workaround, I think we should really read all parameters correct.
io::IAttributes * Parameters;
io::IAttributes * Parameters;
inline bool operator< (const SColladaEffect & other) const
{

View File

@ -665,7 +665,7 @@ void CColladaMeshWriter::writeNodeCameras(irr::scene::ISceneNode * node)
irr::f32 xmag = 2.f/projMat[0];
irr::f32 ymag = 2.f/projMat[5];
// Note that Irrlicht camera does not update near/far when setting the projection matrix,
// Note that Irrlicht camera does not update near/far when setting the projection matrix,
// so we have to calculate that here (at least currently - maybe camera code will be updated at some time).
irr::f32 nearMinusFar = -1.f/projMat[10];
irr::f32 zNear = projMat[14]*nearMinusFar;
@ -755,7 +755,7 @@ void CColladaMeshWriter::writeSceneNode(irr::scene::ISceneNode * node )
// node to do that.
// Note: We can't use rotations for the camera as Irrlicht does not regard the up-vector in rotations so far.
// We could maybe use projection matrices, but avoiding them might allow us to get rid of some DummyTransformationSceneNodes on
// We could maybe use projection matrices, but avoiding them might allow us to get rid of some DummyTransformationSceneNodes on
// import in the future. So that's why we use the lookat element instead.
ICameraSceneNode * camNode = static_cast<ICameraSceneNode*>(node);

View File

@ -34,13 +34,13 @@ namespace scene
//! Return which color from Irrlicht should be used for the color requested by collada
virtual irr::scene::E_COLLADA_IRR_COLOR getColorMapping(const irr::video::SMaterial & material, irr::scene::E_COLLADA_COLOR_SAMPLER cs) const;
//! Return custom colors for certain color types requested by collada.
//! Return custom colors for certain color types requested by collada.
virtual irr::video::SColor getCustomColor(const irr::video::SMaterial & material, irr::scene::E_COLLADA_COLOR_SAMPLER cs) const;
//! Return the settings for transparence
virtual irr::scene::E_COLLADA_TRANSPARENT_FX getTransparentFx(const irr::video::SMaterial& material) const;
//! Transparency value for that material.
//! Transparency value for that material.
virtual irr::f32 getTransparency(const irr::video::SMaterial& material) const;
//! Reflectivity value for that material
@ -251,7 +251,7 @@ protected:
typedef core::map<ISceneNode*, irr::core::stringw>::Node CameraNode;
core::map<ISceneNode*, irr::core::stringw> CameraNodes;
// Check per name if stuff has been written already
// Check per name if stuff has been written already
// TODO: second parameter not needed, we just don't have a core::set class yet in Irrlicht
core::map<irr::core::stringw, bool> MaterialsWritten;
core::map<irr::core::stringw, bool> EffectsWritten;
@ -259,8 +259,8 @@ protected:
// Cache material names
struct MaterialName
{
MaterialName(const irr::video::SMaterial & material, const irr::core::stringw& name)
: Material(material), Name(name)
MaterialName(const irr::video::SMaterial & material, const irr::core::stringw& name)
: Material(material), Name(name)
{}
irr::video::SMaterial Material;
irr::core::stringw Name;

View File

@ -273,7 +273,7 @@ void CColorConverter::convert16bitToA8R8G8B8andResize(const s16* in, s32* out, s
return;
// note: this is very very slow. (i didn't want to write a fast version.
// but hopefully, nobody wants to convert surfaces every frame.
// but hopefully, nobody wants to convert surfaces every frame.
f32 sourceXStep = (f32)currentWidth / (f32)newWidth;
f32 sourceYStep = (f32)currentHeight / (f32)newHeight;

View File

@ -35,7 +35,7 @@ public:
//! converts R8G8B8 16 bit data to A1R5G5B5 data
static void convert16BitTo16Bit(const s16* in, s16* out, s32 width, s32 height, s32 linepad=0, bool flip=false);
//! copies R8G8B8 24 bit data to 24 data, and flips and
//! copies R8G8B8 24 bit data to 24 data, and flips and
//! mirrors the image during the process.
static void convert24BitTo24Bit(const u8* in, u8* out, s32 width, s32 height, s32 linepad=0, bool flip=false, bool bgr=false);
@ -43,7 +43,7 @@ public:
//! to an A8R8G8B8 format, returning the pointer to the new buffer.
static void convert16bitToA8R8G8B8andResize(const s16* in, s32* out, s32 newWidth, s32 newHeight, s32 currentWidth, s32 currentHeight);
//! copies X8R8G8B8 32 bit data, and flips and
//! copies X8R8G8B8 32 bit data, and flips and
//! mirrors the image during the process.
static void convert32BitTo32Bit(const s32* in, s32* out, s32 width, s32 height, s32 linepad, bool flip=false);

View File

@ -66,7 +66,7 @@ namespace scene
virtual IMesh* getMesh(void) { return Mesh; }
//! Sets if the scene node should not copy the materials of the mesh but use them in a read only style.
/* In this way it is possible to change the materials a mesh causing all mesh scene nodes
/* In this way it is possible to change the materials a mesh causing all mesh scene nodes
referencing this mesh to change too. */
virtual void setReadOnlyMaterials(bool readonly) {}

View File

@ -794,7 +794,7 @@ bool CD3D8Driver::setRenderTarget(video::ITexture* texture,
CurrentRendertargetSize = tex->getSize();
}
Transformation3DChanged = true;
Transformation3DChanged = true;
if (clearBackBuffer || clearZBuffer)
{

View File

@ -13,13 +13,13 @@
namespace irr
{
namespace video
namespace video
{
// 1.1 Shaders with two lights and vertex based attenuation
// Irrlicht Engine D3D8 render path normal map vertex shader
const char D3D8_NORMAL_MAP_VSH[] =
const char D3D8_NORMAL_MAP_VSH[] =
";Irrlicht Engine 0.8 D3D8 render path normal map vertex shader\n"\
"; c0-3: Transposed world matrix \n"\
"; c8-11: Transposed worldViewProj matrix (Projection * View * World) \n"\
@ -82,7 +82,7 @@ namespace video
"\n";
// Irrlicht Engine D3D8 render path normal map pixel shader
const char D3D8_NORMAL_MAP_PSH[] =
const char D3D8_NORMAL_MAP_PSH[] =
";Irrlicht Engine 0.8 D3D8 render path normal map pixel shader\n"\
";Input: \n"\
";t0: color map texture coord \n"\
@ -107,12 +107,12 @@ namespace video
"mul r0, t0, r0 ; total luminance * base color\n"\
"mov r0.a, v0.a ; write interpolated vertex alpha value \n"\
"\n"\
"";
"";
CD3D8NormalMapRenderer::CD3D8NormalMapRenderer(
IDirect3DDevice8* d3ddev, video::IVideoDriver* driver,
IDirect3DDevice8* d3ddev, video::IVideoDriver* driver,
s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial)
: CD3D8ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial),
: CD3D8ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial),
CompiledShaders(true)
{
@ -120,7 +120,7 @@ namespace video
setDebugName("CD3D8NormalMapRenderer");
#endif
// set this as callback. We could have done this in
// set this as callback. We could have done this in
// the initialization list, but some compilers don't like it.
CallBack = this;
@ -142,7 +142,7 @@ namespace video
video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_NORMAL_MAP_SOLID);
if (renderer)
{
// use the already compiled shaders
// use the already compiled shaders
video::CD3D8NormalMapRenderer* nmr = (video::CD3D8NormalMapRenderer*)renderer;
CompiledShaders = false;
@ -169,7 +169,7 @@ namespace video
if (!CompiledShaders)
{
// prevent this from deleting shaders we did not create
// prevent this from deleting shaders we did not create
VertexShader = 0;
PixelShader = 0;
}
@ -187,7 +187,7 @@ namespace video
return CD3D8ShaderMaterialRenderer::OnRender(service, vtxtype);
}
//! Returns the render capability of the material.
//! Returns the render capability of the material.
s32 CD3D8NormalMapRenderer::getRenderCapability() const
{
if (Driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&
@ -220,7 +220,7 @@ namespace video
for (u32 i=0; i<2; ++i)
{
SLight light;
SLight light;
if (i<cnt)
light = driver->getDynamicLight(i);
@ -239,7 +239,7 @@ namespace video
f32 c95[] = {0.5f, 0.5f, 0.5f, 0.5f};
services->setVertexShaderConstant(c95, 95, 1);
}
} // end namespace video
} // end namespace irr

View File

@ -13,12 +13,12 @@
namespace irr
{
namespace video
namespace video
{
// 1.1/1.4 Shaders with two lights and vertex based attenuation
// Irrlicht Engine D3D8 render path normal map vertex shader
const char D3D8_PARALLAX_MAP_VSH[] =
const char D3D8_PARALLAX_MAP_VSH[] =
";Irrlicht Engine 0.10 D3D8 render path parallax mapping vertex shader\n"\
"; c0-3: Transposed world matrix \n"\
"; c4: Eye position \n"\
@ -96,7 +96,7 @@ namespace video
// Irrlicht Engine D3D8 render path normal map pixel shader version 1.4
const char D3D8_PARALLAX_MAP_PSH[] =
const char D3D8_PARALLAX_MAP_PSH[] =
";Irrlicht Engine 0.10 D3D8 render path parallax mapping pixel shader \n"\
";Input: \n"\
";t0: color map texture coord \n"\
@ -144,9 +144,9 @@ namespace video
CD3D8ParallaxMapRenderer::CD3D8ParallaxMapRenderer(
IDirect3DDevice8* d3ddev, video::IVideoDriver* driver,
IDirect3DDevice8* d3ddev, video::IVideoDriver* driver,
s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial)
: CD3D8ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial),
: CD3D8ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial),
CompiledShaders(true), CurrentScale(0.0f)
{
@ -154,7 +154,7 @@ namespace video
setDebugName("CD3D8ParallaxMapRenderer");
#endif
// set this as callback. We could have done this in
// set this as callback. We could have done this in
// the initialization list, but some compilers don't like it.
CallBack = this;
@ -176,7 +176,7 @@ namespace video
video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_PARALLAX_MAP_SOLID);
if (renderer)
{
// use the already compiled shaders
// use the already compiled shaders
video::CD3D8ParallaxMapRenderer* nmr = (video::CD3D8ParallaxMapRenderer*)renderer;
CompiledShaders = false;
@ -203,7 +203,7 @@ namespace video
if (!CompiledShaders)
{
// prevent this from deleting shaders we did not create
// prevent this from deleting shaders we did not create
VertexShader = 0;
PixelShader = 0;
}
@ -222,18 +222,18 @@ namespace video
}
void CD3D8ParallaxMapRenderer::OnSetMaterial(const video::SMaterial& material,
void CD3D8ParallaxMapRenderer::OnSetMaterial(const video::SMaterial& material,
const video::SMaterial& lastMaterial,
bool resetAllRenderstates, video::IMaterialRendererServices* services)
{
CD3D8ShaderMaterialRenderer::OnSetMaterial(material, lastMaterial,
CD3D8ShaderMaterialRenderer::OnSetMaterial(material, lastMaterial,
resetAllRenderstates, services);
CurrentScale = material.MaterialTypeParam;
}
//! Returns the render capability of the material.
//! Returns the render capability of the material.
s32 CD3D8ParallaxMapRenderer::getRenderCapability() const
{
if (Driver->queryFeature(video::EVDF_PIXEL_SHADER_1_4) &&
@ -276,10 +276,10 @@ namespace video
// and set them as constants
const u32 cnt = driver->getDynamicLightCount();
for (u32 i=0; i<2; ++i)
{
SLight light;
SLight light;
if (i<cnt)
light = driver->getDynamicLight(i);
@ -309,7 +309,7 @@ namespace video
f32 c6[] = {factor, factor, factor, 0};
services->setPixelShaderConstant(c6, 6, 1);
}
} // end namespace video
} // end namespace irr

View File

@ -106,8 +106,8 @@ namespace video
IDirect3DIndexBuffer9* indexBuffer;
u32 vertexBufferSize;
u32 indexBufferSize;
};
u32 indexBufferSize;
};
bool updateVertexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer);
bool updateIndexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer);

View File

@ -13,13 +13,13 @@
namespace irr
{
namespace video
namespace video
{
// 1.1 Shaders with two lights and vertex based attenuation
// Irrlicht Engine D3D9 render path normal map vertex shader
const char D3D9_NORMAL_MAP_VSH[] =
const char D3D9_NORMAL_MAP_VSH[] =
";Irrlicht Engine 0.8 D3D9 render path normal map vertex shader\n"\
"; c0-3: Transposed world matrix \n"\
"; c8-11: Transposed worldViewProj matrix (Projection * View * World) \n"\
@ -82,7 +82,7 @@ namespace video
"\n";
// Irrlicht Engine D3D9 render path normal map pixel shader
const char D3D9_NORMAL_MAP_PSH_1_1[] =
const char D3D9_NORMAL_MAP_PSH_1_1[] =
";Irrlicht Engine 0.8 D3D9 render path normal map pixel shader\n"\
";Input: \n"\
";t0: color map texture coord \n"\
@ -108,10 +108,10 @@ namespace video
"+mov r0.a, v0.a ; write interpolated vertex alpha value \n"\
"\n"\
"";
// Higher-quality normal map pixel shader (requires PS 2.0)
// uses per-pixel normalization for improved accuracy
const char D3D9_NORMAL_MAP_PSH_2_0[] =
const char D3D9_NORMAL_MAP_PSH_2_0[] =
";Irrlicht Engine 0.8 D3D9 render path normal map pixel shader\n"\
";Input: \n"\
";t0: color map texture coord \n"\
@ -145,7 +145,7 @@ namespace video
"nrm r1, r4 ; normalize the normal vector into r1\n"\
"nrm r2, r5 ; normalize the light1 vector into r2\n"\
"nrm r3, r6 ; normalize the light2 vector into r3\n"\
"dp3 r2, r2, r1 ; let r2 = normal DOT light 1 vector\n"\
"max r2, r2, c0 ; clamp result to positive numbers\n"\
"mul r2, r2, v0 ; let r2 = luminance1 * light color 1 \n"\
@ -164,15 +164,15 @@ namespace video
"";
CD3D9NormalMapRenderer::CD3D9NormalMapRenderer(
IDirect3DDevice9* d3ddev, video::IVideoDriver* driver,
IDirect3DDevice9* d3ddev, video::IVideoDriver* driver,
s32& outMaterialTypeNr, IMaterialRenderer* baseMaterial)
: CD3D9ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial)
{
#ifdef _DEBUG
setDebugName("CD3D9NormalMapRenderer");
#endif
// set this as callback. We could have done this in
// set this as callback. We could have done this in
// the initialization list, but some compilers don't like it.
CallBack = this;
@ -195,7 +195,7 @@ namespace video
video::IMaterialRenderer* renderer = driver->getMaterialRenderer(EMT_NORMAL_MAP_SOLID);
if (renderer)
{
// use the already compiled shaders
// use the already compiled shaders
video::CD3D9NormalMapRenderer* nmr = (video::CD3D9NormalMapRenderer*)renderer;
VertexShader = nmr->VertexShader;
if (VertexShader)
@ -244,7 +244,7 @@ namespace video
}
//! Returns the render capability of the material.
//! Returns the render capability of the material.
s32 CD3D9NormalMapRenderer::getRenderCapability() const
{
if (Driver->queryFeature(video::EVDF_PIXEL_SHADER_1_1) &&
@ -277,7 +277,7 @@ namespace video
for (u32 i=0; i<2; ++i)
{
SLight light;
SLight light;
if (i<cnt)
light = driver->getDynamicLight(i);

View File

@ -11,7 +11,7 @@
#ifdef _IRR_COMPILE_WITH_DIRECT3D_9_
#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#include "irrMath.h" // needed by borland for sqrtf define
#endif
#endif
#include <d3d9.h>
#include "CD3D9ShaderMaterialRenderer.h"

View File

@ -227,11 +227,10 @@ namespace video
: CD3D9ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial),
CurrentScale(0.0f)
{
#ifdef _DEBUG
setDebugName("CD3D9ParallaxMapRenderer");
#endif
// set this as callback. We could have done this in
// the initialization list, but some compilers don't like it.

View File

@ -68,7 +68,7 @@ protected:
LPD3DXBUFFER* ppErrorMsgs);
HRESULT stubD3DXAssembleShaderFromFile(LPCSTR pSrcFile,
CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, DWORD Flags,
CONST D3DXMACRO* pDefines, LPD3DXINCLUDE pInclude, DWORD Flags,
LPD3DXBUFFER* ppShader, LPD3DXBUFFER* ppErrorMsgs);
HRESULT stubD3DXCompileShader(LPCSTR pSrcData, UINT SrcDataLen, CONST D3DXMACRO* pDefines,

View File

@ -722,7 +722,7 @@ void CD3D9Texture::regenerateMipMapLevels(void* mipmapData)
memcpy(miplr.pBits, mipmapData, size.getArea()*getPitch()/TextureSize.Width);
mipmapData = (u8*)mipmapData+size.getArea()*getPitch()/TextureSize.Width;
}
// unlock
mipSurface->UnlockRect();
// release

View File

@ -16,7 +16,7 @@ namespace gui
{
class IGUIElement;
class IGUIEnvironment;
//! This interface makes it possible to dynamically create gui elements.
class CDefaultGUIElementFactory : public IGUIElementFactory
{

View File

@ -127,7 +127,7 @@ ESCENE_NODE_ANIMATOR_TYPE CDefaultSceneNodeAnimatorFactory::getCreateableSceneNo
}
//! returns type name of a createable scene node animator type
//! returns type name of a createable scene node animator type
const c8* CDefaultSceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName(u32 idx) const
{
if (idx<ESNAT_COUNT)
@ -136,7 +136,7 @@ const c8* CDefaultSceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeNa
return 0;
}
//! returns type name of a createable scene node animator type
//! returns type name of a createable scene node animator type
const c8* CDefaultSceneNodeAnimatorFactory::getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const
{
// for this factory: index == type

View File

@ -17,8 +17,8 @@ namespace scene
{
class ISceneNodeAnimator;
class ISceneManager;
//! Interface making it possible to dynamicly create scene nodes animators
//! Interface making it possible to dynamicly create scene nodes animators
class CDefaultSceneNodeAnimatorFactory : public ISceneNodeAnimatorFactory
{
public:
@ -49,13 +49,13 @@ namespace scene
getCreatableSceneNodeTypeCount() */
virtual ESCENE_NODE_ANIMATOR_TYPE getCreateableSceneNodeAnimatorType(u32 idx) const;
//! returns type name of a createable scene node animator type
//! returns type name of a createable scene node animator type
/** \param idx: Index of scene node animator type in this factory. Must be a value between 0 and
getCreatableSceneNodeAnimatorTypeCount() */
virtual const c8* getCreateableSceneNodeAnimatorTypeName(u32 idx) const;
//! returns type name of a createable scene node animator type
/** \param type: Type of scene node animator.
//! returns type name of a createable scene node animator type
/** \param type: Type of scene node animator.
\return: Returns name of scene node animator type if this factory can create the type, otherwise 0. */
virtual const c8* getCreateableSceneNodeAnimatorTypeName(ESCENE_NODE_ANIMATOR_TYPE type) const;

View File

@ -15,8 +15,8 @@ namespace scene
{
class ISceneNode;
class ISceneManager;
//! Interface making it possible to dynamicly create scene nodes and animators
//! Interface making it possible to dynamicly create scene nodes and animators
class CDefaultSceneNodeFactory : public ISceneNodeFactory
{
public:
@ -48,8 +48,8 @@ namespace scene
getCreatableSceneNodeTypeCount() */
virtual ESCENE_NODE_TYPE getCreateableSceneNodeType(u32 idx) const;
//! returns type name of a createable scene node type
/** \param idx: Type of scene node.
//! returns type name of a createable scene node type
/** \param idx: Type of scene node.
\return: Returns name of scene node type if this factory can create the type, otherwise 0. */
virtual const c8* getCreateableSceneNodeTypeName(ESCENE_NODE_TYPE type) const;

View File

@ -42,7 +42,7 @@ namespace scene
private:
// TODO: We can add least add some warnings to find troubles faster until we have
// TODO: We can add least add some warnings to find troubles faster until we have
// fixed bug id 2318691.
virtual const core::vector3df& getScale() const;
virtual void setScale(const core::vector3df& scale);

View File

@ -7,7 +7,7 @@
namespace irr
{
namespace video
namespace video
{
@ -60,7 +60,7 @@ void CFPSCounter::registerFrame(u32 now, u32 primitivesDrawn)
if (milliseconds >= 1500 )
{
const f32 invMilli = core::reciprocal ( (f32) milliseconds );
FPS = core::ceil32 ( ( 1000 * FramesCounted ) * invMilli );
PrimitiveAverage = core::ceil32 ( ( 1000 * PrimitivesCounted ) * invMilli );

View File

@ -9,11 +9,11 @@
namespace irr
{
namespace video
namespace video
{
class CFPSCounter
class CFPSCounter
{
public:
CFPSCounter();
@ -50,5 +50,5 @@ private:
} // end namespace irr
#endif
#endif

View File

@ -98,7 +98,7 @@ u32 CFileList::addItem(const io::path& fullPath, u32 offset, u32 size, bool isDi
//! Returns the ID of a file in the file list, based on an index.
u32 CFileList::getID(u32 index) const
{
return index < Files.size() ? Files[index].ID : 0;
return index < Files.size() ? Files[index].ID : 0;
}
bool CFileList::isDirectory(u32 index) const

View File

@ -21,7 +21,7 @@ CGUIButton::CGUIButton(IGUIEnvironment* environment, IGUIElement* parent,
s32 id, core::rect<s32> rectangle, bool noclip)
: IGUIButton(environment, parent, id, rectangle),
SpriteBank(0), OverrideFont(0), Image(0), PressedImage(0),
ClickTime(0), HoverTime(0), FocusTime(0),
ClickTime(0), HoverTime(0), FocusTime(0),
IsPushButton(false), Pressed(false),
UseAlphaChannel(false), DrawBorder(true), ScaleImage(false)
{
@ -161,7 +161,7 @@ bool CGUIButton::OnEvent(const SEvent& event)
}
else if (event.GUIEvent.EventType == EGET_ELEMENT_FOCUSED)
{
FocusTime = os::Timer::getTime();
FocusTime = os::Timer::getTime();
}
else if (event.GUIEvent.EventType == EGET_ELEMENT_HOVERED || event.GUIEvent.EventType == EGET_ELEMENT_LEFT)
{

View File

@ -44,7 +44,7 @@ namespace gui
virtual u32 addItem(const wchar_t* text, s32 commandid,
bool enabled, bool hasSubMenu, bool checked, bool autoChecking);
//! Insert a menu item at specified position.
//! Insert a menu item at specified position.
virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId, bool enabled,
bool hasSubMenu, bool checked, bool autoChecking);

View File

@ -981,14 +981,14 @@ u32 CGUIEditBox::getMax() const
return Max;
}
//! Set the character used for the cursor.
//! Set the character used for the cursor.
/** By default it's "_" */
void CGUIEditBox::setCursorChar(const wchar_t cursorChar)
{
CursorChar[0] = cursorChar;
}
//! Get the character used for the cursor.
//! Get the character used for the cursor.
wchar_t CGUIEditBox::getCursorChar() const
{
return CursorChar[0];

View File

@ -113,11 +113,11 @@ namespace gui
//! Returns maximum amount of characters, previously set by setMax();
virtual u32 getMax() const;
//! Set the character used for the cursor.
//! Set the character used for the cursor.
/** By default it's "_" */
virtual void setCursorChar(const wchar_t cursorChar);
//! Get the character used for the cursor.
//! Get the character used for the cursor.
virtual wchar_t getCursorChar() const;
//! Set the blinktime for the cursor. 2x blinktime is one full cycle.
@ -125,7 +125,7 @@ namespace gui
virtual void setCursorBlinkTime(irr::u32 timeMs);
//! Get the cursor blinktime
virtual irr::u32 getCursorBlinkTime() const;
virtual irr::u32 getCursorBlinkTime() const;
//! Sets whether the edit box is a password box. Setting this to true will
/** disable MultiLine, WordWrap and the ability to copy with ctrl+c or ctrl+x

View File

@ -12,7 +12,7 @@ namespace gui
//! constructor
CGUIImageList::CGUIImageList( video::IVideoDriver* driver )
: Driver( driver ),
: Driver( driver ),
Texture( 0 ),
ImageCount( 0 ),
ImageSize( 0, 0 ),
@ -70,7 +70,7 @@ bool CGUIImageList::createImageList(video::ITexture* texture,
}
//! Draws an image and clips it to the specified rectangle if wanted
void CGUIImageList::draw( s32 index, const core::position2d<s32>& destPos,
void CGUIImageList::draw( s32 index, const core::position2d<s32>& destPos,
const core::rect<s32>* clip /*= 0*/ )
{
core::rect<s32> sourceRect;
@ -85,7 +85,7 @@ void CGUIImageList::draw( s32 index, const core::position2d<s32>& destPos,
sourceRect.LowerRightCorner.X = sourceRect.UpperLeftCorner.X + ImageSize.Width;
sourceRect.LowerRightCorner.Y = sourceRect.UpperLeftCorner.Y + ImageSize.Height;
Driver->draw2DImage( Texture, destPos, sourceRect, clip,
Driver->draw2DImage( Texture, destPos, sourceRect, clip,
video::SColor( 255, 255, 255, 255 ), UseAlphaChannel );
}

View File

@ -28,17 +28,16 @@ public:
//! \param useAlphaChannel: true if the alpha channel from the texture should be used
//! \return
//! true if the image list was created
bool createImageList(
video::ITexture* texture,
core::dimension2d<s32> imageSize,
bool useAlphaChannel );
bool createImageList(video::ITexture* texture,
core::dimension2d<s32> imageSize,
bool useAlphaChannel);
//! Draws an image and clips it to the specified rectangle if wanted
//! \param index: Index of the image
//! \param destPos: Position of the image to draw
//! \param clip: Optional pointer to a rectalgle against which the text will be clipped.
//! If the pointer is null, no clipping will be done.
virtual void draw( s32 index, const core::position2d<s32>& destPos,
virtual void draw( s32 index, const core::position2d<s32>& destPos,
const core::rect<s32>* clip = 0 );
//! Returns the count of Images in the list.

View File

@ -128,9 +128,8 @@ namespace gui
//! set global itemHeight
virtual void setItemHeight( s32 height );
//! Sets whether to draw the background
virtual void setDrawBackground(bool draw);
//! Sets whether to draw the background
virtual void setDrawBackground(bool draw);
private:

View File

@ -92,7 +92,7 @@ bool CGUIModalScreen::OnEvent(const SEvent& event)
Environment->setFocus(event.GUIEvent.Element);
MouseDownTime = os::Timer::getTime();
return true;
}
}
if ( !canTakeFocus(event.GUIEvent.Caller))
{
if ( !Children.empty() )

View File

@ -38,9 +38,9 @@ namespace gui
//! Updates the absolute position.
virtual void updateAbsolutePosition();
//! Modalscreen is not a typical element, but rather acts like a state for it's children.
//! isVisible is overriden to give this a useful behavior, so that a modal will no longer
//! be active when its parent is invisible or all its children are invisible.
//! Modalscreen is not a typical element, but rather acts like a state for it's children.
//! isVisible is overriden to give this a useful behavior, so that a modal will no longer
//! be active when its parent is invisible or all its children are invisible.
virtual bool isVisible() const;
//! Modals are infinite so every point is inside
@ -52,8 +52,8 @@ namespace gui
//! Reads attributes of the element
virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options);
protected:
virtual bool canTakeFocus(IGUIElement* target) const;
protected:
virtual bool canTakeFocus(IGUIElement* target) const;
private:

View File

@ -236,7 +236,7 @@ bool CGUISpinBox::OnEvent(const SEvent& event)
if (event.GUIEvent.Caller == EditBox)
{
if ( (event.GUIEvent.EventType == EGET_EDITBOX_CHANGED && ValidateOn & EGUI_SBV_CHANGE)
|| (event.GUIEvent.EventType == EGET_EDITBOX_ENTER && ValidateOn & EGUI_SBV_ENTER)
|| (event.GUIEvent.EventType == EGET_EDITBOX_ENTER && ValidateOn & EGUI_SBV_ENTER)
|| (event.GUIEvent.EventType == EGET_ELEMENT_FOCUS_LOST && ValidateOn & EGUI_SBV_LOSE_FOCUS)
)
{

View File

@ -50,18 +50,18 @@ namespace gui
//! Sets whether the window is draggable
virtual void setDraggable(bool draggable);
//! Set if the window background will be drawn
virtual void setDrawBackground(bool draw);
//! Set if the window background will be drawn
virtual void setDrawBackground(bool draw);
//! Get if the window background will be drawn
virtual bool getDrawBackground() const;
//! Get if the window background will be drawn
virtual bool getDrawBackground() const;
//! Set if the window titlebar will be drawn
//! Note: If the background is not drawn, then the titlebar is automatically also not drawn
virtual void setDrawTitlebar(bool draw);
//! Set if the window titlebar will be drawn
//! Note: If the background is not drawn, then the titlebar is automatically also not drawn
virtual void setDrawTitlebar(bool draw);
//! Get if the window titlebar will be drawn
virtual bool getDrawTitlebar() const;
//! Get if the window titlebar will be drawn
virtual bool getDrawTitlebar() const;
//! Returns the rectangle of the drawable area (without border and without titlebar)
virtual core::rect<s32> getClientRect() const;
@ -85,8 +85,8 @@ namespace gui
core::position2d<s32> DragStart;
bool Dragging, IsDraggable;
bool DrawBackground;
bool DrawTitlebar;
bool DrawBackground;
bool DrawTitlebar;
bool IsActive;
};

View File

@ -20,7 +20,7 @@ IMesh* CGeometryCreator::createCubeMesh(const core::vector3df& size) const
SMeshBuffer* buffer = new SMeshBuffer();
// Create indices
const u16 u[36] = { 0,2,1, 0,3,2, 1,5,4, 1,2,5, 4,6,7, 4,5,6,
const u16 u[36] = { 0,2,1, 0,3,2, 1,5,4, 1,2,5, 4,6,7, 4,5,6,
7,3,0, 7,6,3, 9,5,2, 9,8,5, 0,11,10, 0,10,7};
buffer->Indices.set_used(36);
@ -505,8 +505,8 @@ IMesh* CGeometryCreator::createSphereMesh(f32 radius, u32 polyCountX, u32 polyCo
/* A cylinder with proper normals and texture coords */
IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
u32 tesselation, const video::SColor& color,
IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
u32 tesselation, const video::SColor& color,
bool closeTop, f32 oblique) const
{
SMeshBuffer* buffer = new SMeshBuffer();
@ -644,7 +644,7 @@ IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
/* A cone with proper normals and texture coords */
IMesh* CGeometryCreator::createConeMesh(f32 radius, f32 length, u32 tesselation,
const video::SColor& colorTop,
const video::SColor& colorTop,
const video::SColor& colorBottom,
f32 oblique) const
{

View File

@ -732,7 +732,7 @@ IImage* CImageLoaderDDS::loadImage(io::IReadFile* file) const
if (header.PixelFormat.Flags & DDPF_RGB) // Uncompressed formats
{
u32 byteCount = header.PixelFormat.RGBBitCount / 8;
if( header.Flags & DDSD_PITCH )
dataSize = header.PitchOrLinearSize * header.Height * header.Depth * (header.PixelFormat.RGBBitCount / 8);
else

View File

@ -53,15 +53,15 @@ public:
private:
#ifdef _IRR_COMPILE_WITH_LIBJPEG_
#ifdef _IRR_COMPILE_WITH_LIBJPEG_
// several methods used via function pointers by jpeglib
/* Receives control for a fatal error. Information sufficient to
/* Receives control for a fatal error. Information sufficient to
generate the error message has been stored in cinfo->err; call
output_message to display it. Control must NOT return to the caller;
output_message to display it. Control must NOT return to the caller;
generally this routine will exit() or longjmp() somewhere.
Typically you would override this routine to get rid of the exit()
default behavior. Note that if you continue processing, you should
default behavior. Note that if you continue processing, you should
clean up the JPEG object with jpeg_abort() or jpeg_destroy().
*/
static void error_exit (j_common_ptr cinfo);
@ -69,35 +69,35 @@ private:
/* output error messages via Irrlicht logger. */
static void output_message(j_common_ptr cinfo);
/* Initialize source. This is called by jpeg_read_header() before any
data is actually read. Unlike init_destination(), it may leave
/* Initialize source. This is called by jpeg_read_header() before any
data is actually read. Unlike init_destination(), it may leave
bytes_in_buffer set to 0 (in which case a fill_input_buffer() call
will occur immediately). */
static void init_source (j_decompress_ptr cinfo);
/* This is called whenever bytes_in_buffer has reached zero and more
data is wanted. In typical applications, it should read fresh data
/* This is called whenever bytes_in_buffer has reached zero and more
data is wanted. In typical applications, it should read fresh data
into the buffer (ignoring the current state of next_input_byte and
bytes_in_buffer), reset the pointer & count to the start of the
buffer, and return TRUE indicating that the buffer has been reloaded.
It is not necessary to fill the buffer entirely, only to obtain at
least one more byte. bytes_in_buffer MUST be set to a positive value
if TRUE is returned. A FALSE return should only be used when I/O
least one more byte. bytes_in_buffer MUST be set to a positive value
if TRUE is returned. A FALSE return should only be used when I/O
suspension is desired (this mode is discussed in the next section). */
static boolean fill_input_buffer (j_decompress_ptr cinfo);
/* Skip num_bytes worth of data. The buffer pointer and count should
/* Skip num_bytes worth of data. The buffer pointer and count should
be advanced over num_bytes input bytes, refilling the buffer as
needed. This is used to skip over a potentially large amount of
uninteresting data (such as an APPn marker). In some applications
needed. This is used to skip over a potentially large amount of
uninteresting data (such as an APPn marker). In some applications
it may be possible to optimize away the reading of the skipped data,
but it's not clear that being smart is worth much trouble; large
skips are uncommon. bytes_in_buffer may be zero on return.
skips are uncommon. bytes_in_buffer may be zero on return.
A zero or negative skip count should be treated as a no-op. */
static void skip_input_data (j_decompress_ptr cinfo, long num_bytes);
/* Terminate source --- called by jpeg_finish_decompress() after all
data has been read. Often a no-op. */
data has been read. Often a no-op. */
static void term_source (j_decompress_ptr cinfo);
// Copy filename to have it around for error-messages

View File

@ -25,15 +25,15 @@ class CImageLoaderPng : public IImageLoader
{
public:
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".png")
virtual bool isALoadableFileExtension(const io::path& filename) const;
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".png")
virtual bool isALoadableFileExtension(const io::path& filename) const;
//! returns true if the file maybe is able to be loaded by this class
virtual bool isALoadableFileFormat(io::IReadFile* file) const;
//! returns true if the file maybe is able to be loaded by this class
virtual bool isALoadableFileFormat(io::IReadFile* file) const;
//! creates a surface from the file
virtual IImage* loadImage(io::IReadFile* file) const;
//! creates a surface from the file
virtual IImage* loadImage(io::IReadFile* file) const;
};

View File

@ -5,7 +5,7 @@
/*
Author: Gary Conway (Viper) - co-author of the ZIP file format, Feb 1989,
see the story at http://www.idcnet.us/ziphistory.html
see the story at http://www.idcnet.us/ziphistory.html
Website: http://idcnet.us
Email: codeslinger@vipergc.com
Created: March 1, 2009
@ -60,12 +60,11 @@ namespace video
typedef struct _RGBdata
{
u8 *tmp,
*tmpR,
*tmpG,
*tmpB,
*tmpA;
u8 *tmp;
u8 *tmpR;
u8 *tmpG;
u8 *tmpB;
u8 *tmpA;
u32 *StartTable; // compressed data table, holds file offsets
u32 *LengthTable; // length for the above data, hold lengths for above

View File

@ -125,19 +125,19 @@ bool CImageWriterPNG::writeImage(io::IWriteFile* file, IImage* image,u32 param)
s32 lineWidth = image->getDimension().Width;
switch(image->getColorFormat())
{
case ECF_R8G8B8:
case ECF_R5G6B5:
lineWidth*=3;
break;
case ECF_A8R8G8B8:
case ECF_A1R5G5B5:
lineWidth*=4;
{
case ECF_R8G8B8:
case ECF_R5G6B5:
lineWidth*=3;
break;
case ECF_A8R8G8B8:
case ECF_A1R5G5B5:
lineWidth*=4;
break;
// TODO: Error handling in case of unsupported color format
default:
break;
}
}
u8* tmpImage = new u8[image->getDimension().Height*lineWidth];
if (!tmpImage)
{

Some files were not shown because too many files have changed in this diff Show More