From aec5a3afae9aa98d4881a07fea455e2ec9431719 Mon Sep 17 00:00:00 2001 From: hybrid Date: Wed, 17 Apr 2013 17:45:53 +0000 Subject: [PATCH] Merge from trunk, revisions 4495-4510. Mostly whitespace and indentation fixes; mipmap fixes git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4511 dfc29bdd-3216-0410-991c-e03cc46cb475 --- include/ECullingTypes.h | 2 +- include/ESceneNodeTypes.h | 2 +- include/IAnimatedMeshMD3.h | 22 ++-- include/ICameraSceneNode.h | 4 +- include/IColladaMeshWriter.h | 112 +++++++++--------- include/ICursorControl.h | 24 ++-- include/IEventReceiver.h | 12 +- include/IGUIContextMenu.h | 14 +-- include/IGUIEditBox.h | 7 +- include/IGUIElement.h | 8 +- include/IGUIEnvironment.h | 14 +-- include/IGUITreeView.h | 2 +- include/IGUIWindow.h | 2 +- include/IMeshCache.h | 6 +- include/IMeshManipulator.h | 4 +- include/IParticleEmitter.h | 5 +- include/IParticleSystemSceneNode.h | 5 +- include/IQ3Shader.h | 66 +++++------ include/IReferenceCounted.h | 2 +- include/ISceneNode.h | 12 +- include/ISceneNodeAnimatorCameraFPS.h | 8 +- include/ISceneUserDataSerializer.h | 2 +- include/ITerrainSceneNode.h | 2 +- include/ITimer.h | 2 +- include/IXMLWriter.h | 2 +- include/IrrCompileConfig.h | 11 +- include/SColor.h | 8 +- include/SMaterial.h | 26 ++-- include/SMaterialLayer.h | 8 +- include/coreutil.h | 21 ++-- include/fast_atof.h | 4 +- include/irrArray.h | 23 ++-- include/irrList.h | 4 +- include/irrMap.h | 28 ++--- include/irrMath.h | 26 ++-- include/irrTypes.h | 22 ++-- include/irrXML.h | 2 +- include/irrlicht.h | 2 +- include/leakHunter.h | 30 ++--- include/line2d.h | 16 +-- include/matrix4.h | 6 +- include/plane3d.h | 8 +- include/quaternion.h | 4 +- include/triangle3d.h | 10 +- include/vector2d.h | 8 +- include/vector3d.h | 8 +- readme.txt | 2 +- scripts/libIrrlicht1.spec | 2 +- source/Irrlicht/CAnimatedMeshHalfLife.h | 8 +- source/Irrlicht/CAnimatedMeshMD2.h | 6 +- source/Irrlicht/CAnimatedMeshMD3.h | 2 +- source/Irrlicht/CAttributeImpl.h | 6 +- source/Irrlicht/CAttributes.cpp | 12 +- source/Irrlicht/CAttributes.h | 2 +- source/Irrlicht/CBillboardSceneNode.cpp | 4 +- source/Irrlicht/CBillboardSceneNode.h | 16 +-- source/Irrlicht/CBlit.h | 22 ++-- .../CBurningShader_Raster_Reference.cpp | 18 ++- source/Irrlicht/CCameraSceneNode.h | 12 +- source/Irrlicht/CColladaFileLoader.cpp | 2 +- source/Irrlicht/CColladaFileLoader.h | 2 +- source/Irrlicht/CColladaMeshWriter.cpp | 4 +- source/Irrlicht/CColladaMeshWriter.h | 10 +- source/Irrlicht/CColorConverter.cpp | 2 +- source/Irrlicht/CColorConverter.h | 4 +- source/Irrlicht/CCubeSceneNode.h | 2 +- source/Irrlicht/CD3D8Driver.cpp | 2 +- source/Irrlicht/CD3D8NormalMapRenderer.cpp | 24 ++-- source/Irrlicht/CD3D8ParallaxMapRenderer.cpp | 28 ++--- source/Irrlicht/CD3D9Driver.h | 4 +- source/Irrlicht/CD3D9NormalMapRenderer.cpp | 24 ++-- source/Irrlicht/CD3D9NormalMapRenderer.h | 2 +- source/Irrlicht/CD3D9ParallaxMapRenderer.cpp | 3 +- source/Irrlicht/CD3D9ShaderMaterialRenderer.h | 2 +- source/Irrlicht/CD3D9Texture.cpp | 2 +- source/Irrlicht/CDefaultGUIElementFactory.h | 2 +- .../CDefaultSceneNodeAnimatorFactory.cpp | 4 +- .../CDefaultSceneNodeAnimatorFactory.h | 10 +- source/Irrlicht/CDefaultSceneNodeFactory.h | 8 +- .../Irrlicht/CDummyTransformationSceneNode.h | 2 +- source/Irrlicht/CFPSCounter.cpp | 4 +- source/Irrlicht/CFPSCounter.h | 6 +- source/Irrlicht/CFileList.cpp | 2 +- source/Irrlicht/CGUIButton.cpp | 4 +- source/Irrlicht/CGUIContextMenu.h | 2 +- source/Irrlicht/CGUIEditBox.cpp | 4 +- source/Irrlicht/CGUIEditBox.h | 6 +- source/Irrlicht/CGUIImageList.cpp | 6 +- source/Irrlicht/CGUIImageList.h | 9 +- source/Irrlicht/CGUIListBox.h | 5 +- source/Irrlicht/CGUIModalScreen.cpp | 2 +- source/Irrlicht/CGUIModalScreen.h | 10 +- source/Irrlicht/CGUISpinBox.cpp | 2 +- source/Irrlicht/CGUIWindow.h | 22 ++-- source/Irrlicht/CGeometryCreator.cpp | 8 +- source/Irrlicht/CImageLoaderDDS.cpp | 2 +- source/Irrlicht/CImageLoaderJPG.h | 30 ++--- source/Irrlicht/CImageLoaderPNG.h | 14 +-- source/Irrlicht/CImageLoaderRGB.h | 13 +- source/Irrlicht/CImageWriterPNG.cpp | 18 +-- source/Irrlicht/CIrrDeviceConsole.h | 6 +- source/Irrlicht/CIrrDeviceFB.cpp | 12 +- source/Irrlicht/CIrrDeviceFB.h | 2 +- source/Irrlicht/CIrrDeviceLinux.cpp | 14 ++- source/Irrlicht/CIrrDeviceSDL.h | 6 +- source/Irrlicht/CIrrDeviceWin32.h | 70 ++++++----- source/Irrlicht/CIrrDeviceWinCE.h | 10 +- source/Irrlicht/CIrrMeshWriter.cpp | 2 +- source/Irrlicht/CIrrMeshWriter.h | 2 +- source/Irrlicht/CLightSceneNode.h | 5 +- source/Irrlicht/CLogger.h | 2 +- source/Irrlicht/CMS3DMeshFileLoader.cpp | 2 +- source/Irrlicht/CMemoryFile.h | 2 +- source/Irrlicht/CMeshManipulator.cpp | 20 ++-- source/Irrlicht/CMeshManipulator.h | 6 +- source/Irrlicht/CMeshSceneNode.h | 4 +- source/Irrlicht/CMetaTriangleSelector.cpp | 2 +- source/Irrlicht/COBJMeshWriter.h | 2 +- source/Irrlicht/COCTLoader.h | 2 +- source/Irrlicht/COSOperator.h | 4 +- source/Irrlicht/COctreeTriangleSelector.cpp | 2 +- source/Irrlicht/COgreMeshFileLoader.cpp | 6 +- source/Irrlicht/COpenGLDriver.h | 102 ++++++++-------- source/Irrlicht/COpenGLMaterialRenderer.h | 33 +++--- .../Irrlicht/COpenGLParallaxMapRenderer.cpp | 2 +- source/Irrlicht/COpenGLSLMaterialRenderer.h | 12 +- source/Irrlicht/COpenGLTexture.cpp | 57 +++++---- source/Irrlicht/CPLYMeshWriter.cpp | 24 ++-- source/Irrlicht/CPLYMeshWriter.h | 2 +- source/Irrlicht/CParticleBoxEmitter.cpp | 4 +- source/Irrlicht/CParticleCylinderEmitter.cpp | 12 +- source/Irrlicht/CParticlePointEmitter.cpp | 2 +- source/Irrlicht/CParticleRingEmitter.cpp | 6 +- source/Irrlicht/CParticleSphereEmitter.cpp | 4 +- source/Irrlicht/CParticleSystemSceneNode.h | 4 +- source/Irrlicht/CQ3LevelMesh.h | 4 +- source/Irrlicht/CQuake3ShaderSceneNode.cpp | 78 ++++++------ source/Irrlicht/CSTLMeshWriter.h | 2 +- source/Irrlicht/CSceneLoaderIrr.h | 5 +- source/Irrlicht/CSceneManager.h | 12 +- source/Irrlicht/CSceneNodeAnimatorCameraFPS.h | 2 +- .../Irrlicht/CSceneNodeAnimatorCameraMaya.cpp | 2 +- .../Irrlicht/CSceneNodeAnimatorCameraMaya.h | 6 +- source/Irrlicht/CSceneNodeAnimatorDelete.cpp | 2 +- source/Irrlicht/CSceneNodeAnimatorDelete.h | 2 +- .../Irrlicht/CSceneNodeAnimatorFlyCircle.cpp | 4 +- source/Irrlicht/CSceneNodeAnimatorFlyCircle.h | 4 +- .../Irrlicht/CSceneNodeAnimatorRotation.cpp | 4 +- source/Irrlicht/CSceneNodeAnimatorRotation.h | 2 +- source/Irrlicht/CSceneNodeAnimatorTexture.cpp | 4 +- source/Irrlicht/CSceneNodeAnimatorTexture.h | 2 +- source/Irrlicht/CShadowVolumeSceneNode.h | 4 +- source/Irrlicht/CSkinnedMesh.cpp | 2 +- source/Irrlicht/CSkinnedMesh.h | 2 +- source/Irrlicht/CSkyBoxSceneNode.h | 2 +- source/Irrlicht/CSoftware2MaterialRenderer.h | 10 +- source/Irrlicht/CSphereSceneNode.h | 2 +- source/Irrlicht/CTRFlat.cpp | 8 +- source/Irrlicht/CTRFlatWire.cpp | 8 +- source/Irrlicht/CTRGouraud.cpp | 12 +- source/Irrlicht/CTRGouraud2.cpp | 24 ++-- source/Irrlicht/CTRGouraudAlpha2.cpp | 24 ++-- source/Irrlicht/CTRGouraudAlphaNoZ2.cpp | 24 ++-- source/Irrlicht/CTRGouraudWire.cpp | 6 +- source/Irrlicht/CTRNormalMap.cpp | 32 ++--- source/Irrlicht/CTRStencilShadow.cpp | 32 ++--- source/Irrlicht/CTRTextureBlend.cpp | 40 +++---- source/Irrlicht/CTRTextureDetailMap2.cpp | 24 ++-- source/Irrlicht/CTRTextureFlat.cpp | 12 +- source/Irrlicht/CTRTextureFlatWire.cpp | 8 +- source/Irrlicht/CTRTextureGouraud.cpp | 14 +-- source/Irrlicht/CTRTextureGouraud.h | 4 +- source/Irrlicht/CTRTextureGouraud2.cpp | 24 ++-- source/Irrlicht/CTRTextureGouraudAdd.cpp | 12 +- source/Irrlicht/CTRTextureGouraudAdd2.cpp | 28 ++--- source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp | 24 ++-- source/Irrlicht/CTRTextureGouraudAlpha.cpp | 34 +++--- source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp | 34 +++--- source/Irrlicht/CTRTextureGouraudNoZ.cpp | 12 +- source/Irrlicht/CTRTextureGouraudNoZ2.cpp | 24 ++-- .../CTRTextureGouraudVertexAlpha2.cpp | 28 ++--- source/Irrlicht/CTRTextureGouraudWire.cpp | 6 +- source/Irrlicht/CTRTextureLightMap2_Add.cpp | 34 +++--- source/Irrlicht/CTRTextureLightMap2_M1.cpp | 29 ++--- source/Irrlicht/CTRTextureLightMap2_M2.cpp | 29 ++--- source/Irrlicht/CTRTextureLightMap2_M4.cpp | 59 +++++---- .../CTRTextureLightMapGouraud2_M4.cpp | 24 ++-- source/Irrlicht/CTRTextureWire2.cpp | 1 - source/Irrlicht/CTerrainSceneNode.h | 6 +- source/Irrlicht/CTextSceneNode.cpp | 2 +- source/Irrlicht/CTriangleSelector.cpp | 2 +- source/Irrlicht/CVolumeLightSceneNode.h | 6 +- source/Irrlicht/CWADReader.cpp | 4 +- source/Irrlicht/CWADReader.h | 6 +- source/Irrlicht/CWaterSurfaceSceneNode.h | 2 +- source/Irrlicht/CWriteFile.h | 2 +- source/Irrlicht/CXMLReaderImpl.h | 31 ++--- source/Irrlicht/CXMeshFileLoader.cpp | 4 +- source/Irrlicht/IBurningShader.h | 2 +- source/Irrlicht/IImagePresenter.h | 4 +- source/Irrlicht/ITriangleRenderer.h | 2 +- source/Irrlicht/Irrlicht.rc | Bin 4598 -> 4598 bytes source/Irrlicht/Irrlicht10.0.vcxproj | 10 +- source/Irrlicht/Irrlicht11.0.vcxproj | 10 +- source/Irrlicht/Makefile | 4 +- source/Irrlicht/S4DVertex.h | 4 +- source/Irrlicht/SoftwareDriver2_helper.h | 112 +++++++++--------- 207 files changed, 1267 insertions(+), 1264 deletions(-) diff --git a/include/ECullingTypes.h b/include/ECullingTypes.h index 4a562a40..eeb3d912 100644 --- a/include/ECullingTypes.h +++ b/include/ECullingTypes.h @@ -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 }; diff --git a/include/ESceneNodeTypes.h b/include/ESceneNodeTypes.h index a0d5aa44..0e055e2f 100644 --- a/include/ESceneNodeTypes.h +++ b/include/ESceneNodeTypes.h @@ -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'), diff --git a/include/IAnimatedMeshMD3.h b/include/IAnimatedMeshMD3.h index 35c1c971..de825db1 100644 --- a/include/IAnimatedMeshMD3.h +++ b/include/IAnimatedMeshMD3.h @@ -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 diff --git a/include/ICameraSceneNode.h b/include/ICameraSceneNode.h index d905def0..213e6ead 100644 --- a/include/ICameraSceneNode.h +++ b/include/ICameraSceneNode.h @@ -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 diff --git a/include/IColladaMeshWriter.h b/include/IColladaMeshWriter.h index 56b67dee..c88b199c 100644 --- a/include/IColladaMeshWriter.h +++ b/include/IColladaMeshWriter.h @@ -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 \ 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(); diff --git a/include/ICursorControl.h b/include/ICursorControl.h index 62957813..1deff662 100644 --- a/include/ICursorControl.h +++ b/include/ICursorControl.h @@ -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 diff --git a/include/IEventReceiver.h b/include/IEventReceiver.h index 4ec9b7da..85c155c6 100644 --- a/include/IEventReceiver.h +++ b/include/IEventReceiver.h @@ -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 diff --git a/include/IGUIContextMenu.h b/include/IGUIContextMenu.h index c9a06591..c425e435 100644 --- a/include/IGUIContextMenu.h +++ b/include/IGUIContextMenu.h @@ -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 diff --git a/include/IGUIEditBox.h b/include/IGUIEditBox.h index aecb2a36..0c126a3f 100644 --- a/include/IGUIEditBox.h +++ b/include/IGUIEditBox.h @@ -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; }; diff --git a/include/IGUIElement.h b/include/IGUIElement.h index edb55176..8e293789 100644 --- a/include/IGUIElement.h +++ b/include/IGUIElement.h @@ -564,7 +564,7 @@ public: virtual bool sendToBack(IGUIElement* child) { core::list::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; diff --git a/include/IGUIEnvironment.h b/include/IGUIEnvironment.h index 77937bbc..45dbe3b6 100644 --- a/include/IGUIEnvironment.h +++ b/include/IGUIEnvironment.h @@ -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. */ diff --git a/include/IGUITreeView.h b/include/IGUITreeView.h index 4552b29f..31991b05 100644 --- a/include/IGUITreeView.h +++ b/include/IGUITreeView.h @@ -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 { diff --git a/include/IGUIWindow.h b/include/IGUIWindow.h index 6383bf0a..60349d67 100644 --- a/include/IGUIWindow.h +++ b/include/IGUIWindow.h @@ -62,7 +62,7 @@ namespace gui So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.
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 getClientRect() const = 0; }; diff --git a/include/IMeshCache.h b/include/IMeshCache.h index 083fc5b7..8916d77d 100644 --- a/include/IMeshCache.h +++ b/include/IMeshCache.h @@ -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. diff --git a/include/IMeshManipulator.h b/include/IMeshManipulator.h index 3476c578..c7b4a305 100644 --- a/include/IMeshManipulator.h +++ b/include/IMeshManipulator.h @@ -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);} diff --git a/include/IParticleEmitter.h b/include/IParticleEmitter.h index 4b88266f..907cf7ba 100644 --- a/include/IParticleEmitter.h +++ b/include/IParticleEmitter.h @@ -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; } }; diff --git a/include/IParticleSystemSceneNode.h b/include/IParticleSystemSceneNode.h index adb2050a..d41b68bf 100644 --- a/include/IParticleSystemSceneNode.h +++ b/include/IParticleSystemSceneNode.h @@ -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. diff --git a/include/IQ3Shader.h b/include/IQ3Shader.h index e6e46a30..e1fb818e 100644 --- a/include/IQ3Shader.h +++ b/include/IQ3Shader.h @@ -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 diff --git a/include/IReferenceCounted.h b/include/IReferenceCounted.h index 1f042430..42dfc92a 100644 --- a/include/IReferenceCounted.h +++ b/include/IReferenceCounted.h @@ -9,7 +9,7 @@ #ifdef _IRR_COMPILE_WITH_LEAK_HUNTER_ #include "leakHunter.h" -#endif +#endif namespace irr { diff --git a/include/ISceneNode.h b/include/ISceneNode.h index 8082f48b..fe6e0b66 100644 --- a/include/ISceneNode.h +++ b/include/ISceneNode.h @@ -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 ); } diff --git a/include/ISceneNodeAnimatorCameraFPS.h b/include/ISceneNodeAnimatorCameraFPS.h index 7b7a867e..5eaea817 100644 --- a/include/ISceneNodeAnimatorCameraFPS.h +++ b/include/ISceneNodeAnimatorCameraFPS.h @@ -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& keymap) = 0; //! Gets the keyboard mapping for this animator virtual const core::array& 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; diff --git a/include/ISceneUserDataSerializer.h b/include/ISceneUserDataSerializer.h index 309443b3..46b15b53 100644 --- a/include/ISceneUserDataSerializer.h +++ b/include/ISceneUserDataSerializer.h @@ -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.*/ diff --git a/include/ITerrainSceneNode.h b/include/ITerrainSceneNode.h index 07067094..26160e9f 100644 --- a/include/ITerrainSceneNode.h +++ b/include/ITerrainSceneNode.h @@ -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; diff --git a/include/ITimer.h b/include/ITimer.h index 815ebd6c..de1cbff0 100644 --- a/include/ITimer.h +++ b/include/ITimer.h @@ -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; diff --git a/include/IXMLWriter.h b/include/IXMLWriter.h index bb6901e9..653b92d3 100644 --- a/include/IXMLWriter.h +++ b/include/IXMLWriter.h @@ -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 { diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h index 94da52a3..5f4d0123 100644 --- a/include/IrrCompileConfig.h +++ b/include/IrrCompileConfig.h @@ -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 // 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__ diff --git a/include/SColor.h b/include/SColor.h index b9297b2b..10ee6e8d 100644 --- a/include/SColor.h +++ b/include/SColor.h @@ -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: diff --git a/include/SMaterial.h b/include/SMaterial.h index 5ff6b1c3..7ffcb6fc 100644 --- a/include/SMaterial.h +++ b/include/SMaterial.h @@ -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. */ diff --git a/include/SMaterialLayer.h b/include/SMaterialLayer.h index 068c0309..6723e5be 100644 --- a/include/SMaterialLayer.h +++ b/include/SMaterialLayer.h @@ -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; diff --git a/include/coreutil.h b/include/coreutil.h index 2ab4855b..a1e47edf 100644 --- a/include/coreutil.h +++ b/include/coreutil.h @@ -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; } diff --git a/include/fast_atof.h b/include/fast_atof.h index 7d4917a1..22b333fa 100644 --- a/include/fast_atof.h +++ b/include/fast_atof.h @@ -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 diff --git a/include/irrArray.h b/include/irrArray.h index 7dab5937..52b89b02 100644 --- a/include/irrArray.h +++ b/include/irrArray.h @@ -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= 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& 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); diff --git a/include/irrList.h b/include/irrList.h index 54eed834..f04119b1 100644 --- a/include/irrList.h +++ b/include/irrList.h @@ -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& 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 } diff --git a/include/irrMap.h b/include/irrMap.h index 9e9ae737..28a7c9e4 100644 --- a/include/irrMap.h +++ b/include/irrMap.h @@ -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& other) { core::swap(Root, other.Root); diff --git a/include/irrMath.h b/include/irrMath.h index 11cd670c..fec97cb0 100644 --- a/include/irrMath.h +++ b/include/irrMath.h @@ -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) diff --git a/include/irrTypes.h b/include/irrTypes.h index 403f890f..a6db0188 100644 --- a/include/irrTypes.h +++ b/include/irrTypes.h @@ -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 - #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 + #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 diff --git a/include/irrXML.h b/include/irrXML.h index 29d8faa4..4e51b508 100644 --- a/include/irrXML.h +++ b/include/irrXML.h @@ -381,7 +381,7 @@ namespace io xmlChar(unsigned short in) : c(static_cast(in)) {} xmlChar(unsigned int in) : c(static_cast(in)) {} xmlChar(unsigned long in) : c(static_cast(in)) {} -#else +#else explicit xmlChar(unsigned char in) : c(static_cast(in)) {} explicit xmlChar(unsigned short in) : c(static_cast(in)) {} explicit xmlChar(unsigned int in) : c(static_cast(in)) {} diff --git a/include/irrlicht.h b/include/irrlicht.h index 74783ceb..2aa0a120 100644 --- a/include/irrlicht.h +++ b/include/irrlicht.h @@ -187,7 +187,7 @@ #include "vector2d.h" #include "vector3d.h" -/*! \mainpage Irrlicht Engine 1.8 API documentation +/*! \mainpage Irrlicht Engine 1.9 API documentation * *
* diff --git a/include/leakHunter.h b/include/leakHunter.h index 913424b4..a3512264 100644 --- a/include/leakHunter.h +++ b/include/leakHunter.h @@ -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 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 ReferenceCountedObjects; + IRRLICHT_API static irr::core::array ReferenceCountedObjects; }; } // end namespace irr diff --git a/include/line2d.h b/include/line2d.h index 2a0dee4f..de2a5dd0 100644 --- a/include/line2d.h +++ b/include/line2d.h @@ -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 c((f64)(point.X-start.X), (f64)(point.Y- start.Y)); vector2d 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); diff --git a/include/matrix4.h b/include/matrix4.h index df1e4ea5..4b926b2b 100644 --- a/include/matrix4.h +++ b/include/matrix4.h @@ -947,18 +947,18 @@ namespace core template inline CMatrix4& CMatrix4::setRotationAxisRadians( const T& angle, const vector3d& 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); diff --git a/include/plane3d.h b/include/plane3d.h index 9056dcda..21701f04 100644 --- a/include/plane3d.h +++ b/include/plane3d.h @@ -37,14 +37,14 @@ class plane3d // Constructors plane3d(): Normal(0,1,0) { recalculateD(vector3d(0,0,0)); } - + plane3d(const vector3d& MPoint, const vector3d& Normal) : Normal(Normal) { recalculateD(MPoint); } - + plane3d(T px, T py, T pz, T nx, T ny, T nz) : Normal(nx, ny, nz) { recalculateD(vector3d(px, py, pz)); } - + plane3d(const vector3d& point1, const vector3d& point2, const vector3d& point3) { setPlane(point1, point2, point3); } - + plane3d(const vector3d & normal, const T d) : Normal(normal), D(d) { } // operators diff --git a/include/quaternion.h b/include/quaternion.h index 2c6f0cf8..6204c1ca 100644 --- a/include/quaternion.h +++ b/include/quaternion.h @@ -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; diff --git a/include/triangle3d.h b/include/triangle3d.h index 2f5a36cd..43500208 100644 --- a/include/triangle3d.h +++ b/include/triangle3d.h @@ -93,8 +93,8 @@ namespace core vector3d cf64((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z); vector3d 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 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; } diff --git a/include/vector2d.h b/include/vector2d.h index 360da8ff..2555fbd2 100644 --- a/include/vector2d.h +++ b/include/vector2d.h @@ -67,28 +67,28 @@ public: //! sort in order X, Y. Equality with rounding tolerance. bool operator<=(const vector2d&other) const { - return (X=(const vector2d&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&other) const { - return (X(const vector2d&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)); } diff --git a/include/vector3d.h b/include/vector3d.h index fd6c50dc..a0707b2f 100644 --- a/include/vector3d.h +++ b/include/vector3d.h @@ -60,7 +60,7 @@ namespace core //! sort in order X, Y, Z. Equality with rounding tolerance. bool operator<=(const vector3d&other) const { - return (X=(const vector3d&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&other) const { - return (X(const vector3d&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)); } diff --git a/readme.txt b/readme.txt index f63398ef..5c1610e1 100644 --- a/readme.txt +++ b/readme.txt @@ -1,5 +1,5 @@ ========================================================================== -The Irrlicht Engine SDK version 1.8 +The Irrlicht Engine SDK version 1.9 ========================================================================== Welcome the Irrlicht Engine SDK. diff --git a/scripts/libIrrlicht1.spec b/scripts/libIrrlicht1.spec index af5c80a2..7fae22d3 100644 --- a/scripts/libIrrlicht1.spec +++ b/scripts/libIrrlicht1.spec @@ -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 diff --git a/source/Irrlicht/CAnimatedMeshHalfLife.h b/source/Irrlicht/CAnimatedMeshHalfLife.h index 32a4ef80..5b8885e1 100644 --- a/source/Irrlicht/CAnimatedMeshHalfLife.h +++ b/source/Irrlicht/CAnimatedMeshHalfLife.h @@ -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 }; diff --git a/source/Irrlicht/CAnimatedMeshMD2.h b/source/Irrlicht/CAnimatedMeshMD2.h index 00149102..3d4472b5 100644 --- a/source/Irrlicht/CAnimatedMeshMD2.h +++ b/source/Irrlicht/CAnimatedMeshMD2.h @@ -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 FrameTransforms; + core::array FrameTransforms; //! keyframe vertex data core::array *FrameList; - + //! bounding boxes for each keyframe core::array > BoxList; diff --git a/source/Irrlicht/CAnimatedMeshMD3.h b/source/Irrlicht/CAnimatedMeshMD3.h index 1b01eee5..dcb68510 100644 --- a/source/Irrlicht/CAnimatedMeshMD3.h +++ b/source/Irrlicht/CAnimatedMeshMD3.h @@ -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 diff --git a/source/Irrlicht/CAttributeImpl.h b/source/Irrlicht/CAttributeImpl.h index f59c27cf..987983de 100644 --- a/source/Irrlicht/CAttributeImpl.h +++ b/source/Irrlicht/CAttributeImpl.h @@ -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); } diff --git a/source/Irrlicht/CAttributes.cpp b/source/Irrlicht/CAttributes.cpp index 924e0984..cdd6cc11 100644 --- a/source/Irrlicht/CAttributes.cpp +++ b/source/Irrlicht/CAttributes.cpp @@ -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; } diff --git a/source/Irrlicht/CAttributes.h b/source/Irrlicht/CAttributes.h index f4474d56..0da1cda7 100644 --- a/source/Irrlicht/CAttributes.h +++ b/source/Irrlicht/CAttributes.h @@ -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); diff --git a/source/Irrlicht/CBillboardSceneNode.cpp b/source/Irrlicht/CBillboardSceneNode.cpp index 22d41bd9..3d157ea0 100644 --- a/source/Irrlicht/CBillboardSceneNode.cpp +++ b/source/Irrlicht/CBillboardSceneNode.cpp @@ -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 diff --git a/source/Irrlicht/CBillboardSceneNode.h b/source/Irrlicht/CBillboardSceneNode.h index 416b6ffe..e22315c0 100644 --- a/source/Irrlicht/CBillboardSceneNode.h +++ b/source/Irrlicht/CBillboardSceneNode.h @@ -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& 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& getSize() const; - + //! gets the size of the billboard + virtual const core::dimension2d& 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 diff --git a/source/Irrlicht/CBlit.h b/source/Irrlicht/CBlit.h index a8572e92..ba8c129b 100644 --- a/source/Irrlicht/CBlit.h +++ b/source/Irrlicht/CBlit.h @@ -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 *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& rect, const //! draws a line from to with color static void drawLine(video::IImage* img, const core::position2d& from, - const core::position2d& to, const video::SColor &color) + const core::position2d& to, const video::SColor &color) { AbsRectangle clip; GetClip(clip, img); diff --git a/source/Irrlicht/CBurningShader_Raster_Reference.cpp b/source/Irrlicht/CBurningShader_Raster_Reference.cpp index 4ff02701..c392e9e3 100644 --- a/source/Irrlicht/CBurningShader_Raster_Reference.cpp +++ b/source/Irrlicht/CBurningShader_Raster_Reference.cpp @@ -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 diff --git a/source/Irrlicht/CCameraSceneNode.h b/source/Irrlicht/CCameraSceneNode.h index d0514d45..70f3d018 100644 --- a/source/Irrlicht/CCameraSceneNode.h +++ b/source/Irrlicht/CCameraSceneNode.h @@ -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; diff --git a/source/Irrlicht/CColladaFileLoader.cpp b/source/Irrlicht/CColladaFileLoader.cpp index 65098121..0848d9f9 100644 --- a/source/Irrlicht/CColladaFileLoader.cpp +++ b/source/Irrlicht/CColladaFileLoader.cpp @@ -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; iMat.TextureLayer[i].TextureWrapU = twu; diff --git a/source/Irrlicht/CColladaFileLoader.h b/source/Irrlicht/CColladaFileLoader.h index df1a5518..b1a47757 100644 --- a/source/Irrlicht/CColladaFileLoader.h +++ b/source/Irrlicht/CColladaFileLoader.h @@ -136,7 +136,7 @@ struct SColladaEffect core::array 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 { diff --git a/source/Irrlicht/CColladaMeshWriter.cpp b/source/Irrlicht/CColladaMeshWriter.cpp index 08fcfa1f..d4befb64 100644 --- a/source/Irrlicht/CColladaMeshWriter.cpp +++ b/source/Irrlicht/CColladaMeshWriter.cpp @@ -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(node); diff --git a/source/Irrlicht/CColladaMeshWriter.h b/source/Irrlicht/CColladaMeshWriter.h index 119fd03d..f4adbfaa 100644 --- a/source/Irrlicht/CColladaMeshWriter.h +++ b/source/Irrlicht/CColladaMeshWriter.h @@ -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::Node CameraNode; core::map 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 MaterialsWritten; core::map 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; diff --git a/source/Irrlicht/CColorConverter.cpp b/source/Irrlicht/CColorConverter.cpp index f2ec49a6..a8a3c4fb 100644 --- a/source/Irrlicht/CColorConverter.cpp +++ b/source/Irrlicht/CColorConverter.cpp @@ -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; diff --git a/source/Irrlicht/CColorConverter.h b/source/Irrlicht/CColorConverter.h index ca075d9e..91565bba 100644 --- a/source/Irrlicht/CColorConverter.h +++ b/source/Irrlicht/CColorConverter.h @@ -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); diff --git a/source/Irrlicht/CCubeSceneNode.h b/source/Irrlicht/CCubeSceneNode.h index b676938a..ad40fa14 100644 --- a/source/Irrlicht/CCubeSceneNode.h +++ b/source/Irrlicht/CCubeSceneNode.h @@ -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) {} diff --git a/source/Irrlicht/CD3D8Driver.cpp b/source/Irrlicht/CD3D8Driver.cpp index 72e9d62e..196ac136 100644 --- a/source/Irrlicht/CD3D8Driver.cpp +++ b/source/Irrlicht/CD3D8Driver.cpp @@ -794,7 +794,7 @@ bool CD3D8Driver::setRenderTarget(video::ITexture* texture, CurrentRendertargetSize = tex->getSize(); } - Transformation3DChanged = true; + Transformation3DChanged = true; if (clearBackBuffer || clearZBuffer) { diff --git a/source/Irrlicht/CD3D8NormalMapRenderer.cpp b/source/Irrlicht/CD3D8NormalMapRenderer.cpp index c5e039d3..3cfb231c 100644 --- a/source/Irrlicht/CD3D8NormalMapRenderer.cpp +++ b/source/Irrlicht/CD3D8NormalMapRenderer.cpp @@ -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 (igetDynamicLight(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 diff --git a/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp b/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp index ca30966b..800cb66a 100644 --- a/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp +++ b/source/Irrlicht/CD3D8ParallaxMapRenderer.cpp @@ -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 (igetDynamicLight(i); @@ -309,7 +309,7 @@ namespace video f32 c6[] = {factor, factor, factor, 0}; services->setPixelShaderConstant(c6, 6, 1); } - + } // end namespace video } // end namespace irr diff --git a/source/Irrlicht/CD3D9Driver.h b/source/Irrlicht/CD3D9Driver.h index b6463b45..38759b33 100644 --- a/source/Irrlicht/CD3D9Driver.h +++ b/source/Irrlicht/CD3D9Driver.h @@ -106,8 +106,8 @@ namespace video IDirect3DIndexBuffer9* indexBuffer; u32 vertexBufferSize; - u32 indexBufferSize; - }; + u32 indexBufferSize; + }; bool updateVertexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer); bool updateIndexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer); diff --git a/source/Irrlicht/CD3D9NormalMapRenderer.cpp b/source/Irrlicht/CD3D9NormalMapRenderer.cpp index eb6f7324..13c6d361 100644 --- a/source/Irrlicht/CD3D9NormalMapRenderer.cpp +++ b/source/Irrlicht/CD3D9NormalMapRenderer.cpp @@ -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 (igetDynamicLight(i); diff --git a/source/Irrlicht/CD3D9NormalMapRenderer.h b/source/Irrlicht/CD3D9NormalMapRenderer.h index 70b4a5ce..fa218ff9 100644 --- a/source/Irrlicht/CD3D9NormalMapRenderer.h +++ b/source/Irrlicht/CD3D9NormalMapRenderer.h @@ -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 #include "CD3D9ShaderMaterialRenderer.h" diff --git a/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp b/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp index 954a5520..2f4e6410 100644 --- a/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp +++ b/source/Irrlicht/CD3D9ParallaxMapRenderer.cpp @@ -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. diff --git a/source/Irrlicht/CD3D9ShaderMaterialRenderer.h b/source/Irrlicht/CD3D9ShaderMaterialRenderer.h index 2c2bb19a..cfb90714 100644 --- a/source/Irrlicht/CD3D9ShaderMaterialRenderer.h +++ b/source/Irrlicht/CD3D9ShaderMaterialRenderer.h @@ -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, diff --git a/source/Irrlicht/CD3D9Texture.cpp b/source/Irrlicht/CD3D9Texture.cpp index dd4e0872..8cceede0 100644 --- a/source/Irrlicht/CD3D9Texture.cpp +++ b/source/Irrlicht/CD3D9Texture.cpp @@ -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 diff --git a/source/Irrlicht/CDefaultGUIElementFactory.h b/source/Irrlicht/CDefaultGUIElementFactory.h index fd92c6d7..bf6bba25 100644 --- a/source/Irrlicht/CDefaultGUIElementFactory.h +++ b/source/Irrlicht/CDefaultGUIElementFactory.h @@ -16,7 +16,7 @@ namespace gui { class IGUIElement; class IGUIEnvironment; - + //! This interface makes it possible to dynamically create gui elements. class CDefaultGUIElementFactory : public IGUIElementFactory { diff --git a/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp b/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp index ec52d25a..4b24e4d3 100644 --- a/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp +++ b/source/Irrlicht/CDefaultSceneNodeAnimatorFactory.cpp @@ -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= 1500 ) { const f32 invMilli = core::reciprocal ( (f32) milliseconds ); - + FPS = core::ceil32 ( ( 1000 * FramesCounted ) * invMilli ); PrimitiveAverage = core::ceil32 ( ( 1000 * PrimitivesCounted ) * invMilli ); diff --git a/source/Irrlicht/CFPSCounter.h b/source/Irrlicht/CFPSCounter.h index ca36527e..12e0d4e8 100644 --- a/source/Irrlicht/CFPSCounter.h +++ b/source/Irrlicht/CFPSCounter.h @@ -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 diff --git a/source/Irrlicht/CFileList.cpp b/source/Irrlicht/CFileList.cpp index 1b8ff4f6..18940d42 100644 --- a/source/Irrlicht/CFileList.cpp +++ b/source/Irrlicht/CFileList.cpp @@ -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 diff --git a/source/Irrlicht/CGUIButton.cpp b/source/Irrlicht/CGUIButton.cpp index f01e8692..6264b64c 100644 --- a/source/Irrlicht/CGUIButton.cpp +++ b/source/Irrlicht/CGUIButton.cpp @@ -21,7 +21,7 @@ CGUIButton::CGUIButton(IGUIEnvironment* environment, IGUIElement* parent, s32 id, core::rect 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) { diff --git a/source/Irrlicht/CGUIContextMenu.h b/source/Irrlicht/CGUIContextMenu.h index 843b2b7c..8521033a 100644 --- a/source/Irrlicht/CGUIContextMenu.h +++ b/source/Irrlicht/CGUIContextMenu.h @@ -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); diff --git a/source/Irrlicht/CGUIEditBox.cpp b/source/Irrlicht/CGUIEditBox.cpp index cd9fb994..63ec2797 100644 --- a/source/Irrlicht/CGUIEditBox.cpp +++ b/source/Irrlicht/CGUIEditBox.cpp @@ -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]; diff --git a/source/Irrlicht/CGUIEditBox.h b/source/Irrlicht/CGUIEditBox.h index 2ca94240..e96cc19c 100644 --- a/source/Irrlicht/CGUIEditBox.h +++ b/source/Irrlicht/CGUIEditBox.h @@ -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 diff --git a/source/Irrlicht/CGUIImageList.cpp b/source/Irrlicht/CGUIImageList.cpp index e02030d5..2896712a 100644 --- a/source/Irrlicht/CGUIImageList.cpp +++ b/source/Irrlicht/CGUIImageList.cpp @@ -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& destPos, +void CGUIImageList::draw( s32 index, const core::position2d& destPos, const core::rect* clip /*= 0*/ ) { core::rect sourceRect; @@ -85,7 +85,7 @@ void CGUIImageList::draw( s32 index, const core::position2d& 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 ); } diff --git a/source/Irrlicht/CGUIImageList.h b/source/Irrlicht/CGUIImageList.h index 18221c8e..12d6a7e0 100644 --- a/source/Irrlicht/CGUIImageList.h +++ b/source/Irrlicht/CGUIImageList.h @@ -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 imageSize, - bool useAlphaChannel ); + bool createImageList(video::ITexture* texture, + core::dimension2d 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& destPos, + virtual void draw( s32 index, const core::position2d& destPos, const core::rect* clip = 0 ); //! Returns the count of Images in the list. diff --git a/source/Irrlicht/CGUIListBox.h b/source/Irrlicht/CGUIListBox.h index d00921f2..43dc27d1 100644 --- a/source/Irrlicht/CGUIListBox.h +++ b/source/Irrlicht/CGUIListBox.h @@ -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: diff --git a/source/Irrlicht/CGUIModalScreen.cpp b/source/Irrlicht/CGUIModalScreen.cpp index 879cb495..047fc716 100644 --- a/source/Irrlicht/CGUIModalScreen.cpp +++ b/source/Irrlicht/CGUIModalScreen.cpp @@ -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() ) diff --git a/source/Irrlicht/CGUIModalScreen.h b/source/Irrlicht/CGUIModalScreen.h index 8548eb52..3385b217 100644 --- a/source/Irrlicht/CGUIModalScreen.h +++ b/source/Irrlicht/CGUIModalScreen.h @@ -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: diff --git a/source/Irrlicht/CGUISpinBox.cpp b/source/Irrlicht/CGUISpinBox.cpp index 06e39607..77d68d20 100644 --- a/source/Irrlicht/CGUISpinBox.cpp +++ b/source/Irrlicht/CGUISpinBox.cpp @@ -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) ) { diff --git a/source/Irrlicht/CGUIWindow.h b/source/Irrlicht/CGUIWindow.h index 980da592..6517c14b 100644 --- a/source/Irrlicht/CGUIWindow.h +++ b/source/Irrlicht/CGUIWindow.h @@ -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 getClientRect() const; @@ -85,8 +85,8 @@ namespace gui core::position2d DragStart; bool Dragging, IsDraggable; - bool DrawBackground; - bool DrawTitlebar; + bool DrawBackground; + bool DrawTitlebar; bool IsActive; }; diff --git a/source/Irrlicht/CGeometryCreator.cpp b/source/Irrlicht/CGeometryCreator.cpp index c5928332..fb04de71 100644 --- a/source/Irrlicht/CGeometryCreator.cpp +++ b/source/Irrlicht/CGeometryCreator.cpp @@ -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 { diff --git a/source/Irrlicht/CImageLoaderDDS.cpp b/source/Irrlicht/CImageLoaderDDS.cpp index 127fe133..2d3786f7 100644 --- a/source/Irrlicht/CImageLoaderDDS.cpp +++ b/source/Irrlicht/CImageLoaderDDS.cpp @@ -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 diff --git a/source/Irrlicht/CImageLoaderJPG.h b/source/Irrlicht/CImageLoaderJPG.h index d3d0633f..98a428a4 100644 --- a/source/Irrlicht/CImageLoaderJPG.h +++ b/source/Irrlicht/CImageLoaderJPG.h @@ -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 diff --git a/source/Irrlicht/CImageLoaderPNG.h b/source/Irrlicht/CImageLoaderPNG.h index a3faac2a..58bad0e3 100644 --- a/source/Irrlicht/CImageLoaderPNG.h +++ b/source/Irrlicht/CImageLoaderPNG.h @@ -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; }; diff --git a/source/Irrlicht/CImageLoaderRGB.h b/source/Irrlicht/CImageLoaderRGB.h index 1fe6454f..0f532ce4 100644 --- a/source/Irrlicht/CImageLoaderRGB.h +++ b/source/Irrlicht/CImageLoaderRGB.h @@ -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 diff --git a/source/Irrlicht/CImageWriterPNG.cpp b/source/Irrlicht/CImageWriterPNG.cpp index 6c6386e0..0566676a 100644 --- a/source/Irrlicht/CImageWriterPNG.cpp +++ b/source/Irrlicht/CImageWriterPNG.cpp @@ -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) { diff --git a/source/Irrlicht/CIrrDeviceConsole.h b/source/Irrlicht/CIrrDeviceConsole.h index b2cd1b78..1f9ca198 100644 --- a/source/Irrlicht/CIrrDeviceConsole.h +++ b/source/Irrlicht/CIrrDeviceConsole.h @@ -69,7 +69,7 @@ namespace irr virtual bool isWindowMinimized() const; //! returns current window position (not supported for this device) - virtual core::position2di getWindowPosition() + virtual core::position2di getWindowPosition() { return core::position2di(-1, -1); } @@ -212,8 +212,8 @@ namespace irr core::position2d CursorPos; core::dimension2d WindowSize; core::dimension2d InvWindowSize; - bool IsVisible, - UseReferenceRect; + bool IsVisible; + bool UseReferenceRect; core::rect ReferenceRect; }; diff --git a/source/Irrlicht/CIrrDeviceFB.cpp b/source/Irrlicht/CIrrDeviceFB.cpp index e3af6c2e..41dd997a 100644 --- a/source/Irrlicht/CIrrDeviceFB.cpp +++ b/source/Irrlicht/CIrrDeviceFB.cpp @@ -45,7 +45,7 @@ CIrrDeviceFB::CIrrDeviceFB(const SIrrlichtCreationParameters& params) // print version, distribution etc. // thx to LynxLuna for pointing me to the uname function core::stringc linuxversion; - struct utsname FBInfo; + struct utsname FBInfo; uname(&FBInfo); linuxversion += FBInfo.sysname; @@ -116,10 +116,10 @@ bool CIrrDeviceFB::createWindow(const core::dimension2d& windowSize, u32 bi if (ioctl(KeyboardDevice, KDSETMODE, KD_GRAPHICS) <0) perror("Set keyboard mode"); - Framebuffer=open("/dev/fb/0", O_RDWR); + Framebuffer=open("/dev/fb/0", O_RDWR); if (Framebuffer == -1) { - Framebuffer=open("/dev/fb0", O_RDWR); + Framebuffer=open("/dev/fb0", O_RDWR); if (Framebuffer == -1) { perror("Open framebuffer"); @@ -197,7 +197,7 @@ void CIrrDeviceFB::createDriver() os::Printer::log("No Software driver support compiled in.", ELL_WARNING); #endif break; - + case video::EDT_BURNINGSVIDEO: #ifdef _IRR_COMPILE_WITH_BURNINGSVIDEO_ VideoDriver = video::createBurningVideoDriver(CreationParams, FileSystem, this); @@ -236,7 +236,7 @@ bool CIrrDeviceFB::run() irr::SEvent irrevent; irrevent.EventType = irr::EET_KEY_INPUT_EVENT; irrevent.KeyInput.PressedDown = true; - + switch (ev.code) { case KEY_RIGHTCTRL: @@ -289,7 +289,7 @@ void CIrrDeviceFB::yield() void CIrrDeviceFB::sleep(u32 timeMs, bool pauseTimer=false) { bool wasStopped = Timer ? Timer->isStopped() : true; - + struct timespec ts; ts.tv_sec = (time_t) (timeMs / 1000); ts.tv_nsec = (long) (timeMs % 1000) * 1000000; diff --git a/source/Irrlicht/CIrrDeviceFB.h b/source/Irrlicht/CIrrDeviceFB.h index 0108fa8a..dab9ae85 100644 --- a/source/Irrlicht/CIrrDeviceFB.h +++ b/source/Irrlicht/CIrrDeviceFB.h @@ -64,7 +64,7 @@ namespace irr virtual void restoreWindow(); //! returns current window position (not supported for this device) - virtual core::position2di getWindowPosition() + virtual core::position2di getWindowPosition() { return core::position2di(-1, -1); } diff --git a/source/Irrlicht/CIrrDeviceLinux.cpp b/source/Irrlicht/CIrrDeviceLinux.cpp index 9150e9d5..db8d4b3e 100644 --- a/source/Irrlicht/CIrrDeviceLinux.cpp +++ b/source/Irrlicht/CIrrDeviceLinux.cpp @@ -675,13 +675,15 @@ bool CIrrDeviceLinux::createWindow() { int x = 0; int y = 0; - + if (!CreationParams.Fullscreen) - { - if (CreationParams.WindowPosition.X > 0) x = CreationParams.WindowPosition.X; - if (CreationParams.WindowPosition.Y > 0) y = CreationParams.WindowPosition.Y; + { + if (CreationParams.WindowPosition.X > 0) + x = CreationParams.WindowPosition.X; + if (CreationParams.WindowPosition.Y > 0) + y = CreationParams.WindowPosition.Y; } - + // create new Window // Remove window manager decoration in fullscreen attributes.override_redirect = CreationParams.Fullscreen; @@ -691,7 +693,7 @@ bool CIrrDeviceLinux::createWindow() InputOutput, visual->visual, CWBorderPixel | CWColormap | CWEventMask | CWOverrideRedirect, &attributes); - + XMapRaised(display, window); CreationParams.WindowId = (void*)window; Atom wmDelete; diff --git a/source/Irrlicht/CIrrDeviceSDL.h b/source/Irrlicht/CIrrDeviceSDL.h index e1e1e0a3..90369aaf 100644 --- a/source/Irrlicht/CIrrDeviceSDL.h +++ b/source/Irrlicht/CIrrDeviceSDL.h @@ -77,9 +77,9 @@ namespace irr //! Restores the window size. virtual void restoreWindow(); - //! Get the position of this window on screen - virtual core::position2di getWindowPosition(); - + //! Get the position of this window on screen + virtual core::position2di getWindowPosition(); + //! Activate any joysticks, and generate events for them. virtual bool activateJoysticks(core::array & joystickInfo); diff --git a/source/Irrlicht/CIrrDeviceWin32.h b/source/Irrlicht/CIrrDeviceWin32.h index b80b6434..7ba33b9b 100644 --- a/source/Irrlicht/CIrrDeviceWin32.h +++ b/source/Irrlicht/CIrrDeviceWin32.h @@ -140,17 +140,31 @@ namespace irr BOOL gotCursorInfo = GetCursorInfo(&info); while ( gotCursorInfo ) { - if ( (visible && info.flags == CURSOR_SHOWING) // visible - || (!visible && info.flags == 0 ) ) // hidden +#ifdef CURSOR_SUPPRESSED + // new flag for Windows 8, where cursor + // might be suppressed for touch interface + if (info.flags == CURSOR_SUPPRESSED) + { + visible=false; + break; + } +#endif + if ( (visible && info.flags == CURSOR_SHOWING) || // visible + (!visible && info.flags == 0 ) ) // hidden { break; } - int showResult = ShowCursor(visible); // this only increases an internal display counter in windows, so it might have to be called some more - if ( showResult < 0 ) - { + // this only increases an internal + // display counter in windows, so it + // might have to be called some more + const int showResult = ShowCursor(visible); + // if result has correct sign we can + // stop here as well + if (( !visible && showResult < 0 ) || + (visible && showResult >= 0)) break; - } - info.cbSize = sizeof(CURSORINFO); // yes, it really must be set each time + // yes, it really must be set each time + info.cbSize = sizeof(CURSORINFO); gotCursorInfo = GetCursorInfo(&info); } IsVisible = visible; @@ -190,7 +204,7 @@ namespace irr if (UseReferenceRect) { SetCursorPos(ReferenceRect.UpperLeftCorner.X + x, - ReferenceRect.UpperLeftCorner.Y + y); + ReferenceRect.UpperLeftCorner.Y + y); } else { @@ -263,23 +277,23 @@ namespace irr /** Used to notify the cursor that the window resizable settings changed. */ void updateBorderSize(bool fullscreen, bool resizable) { - if (!fullscreen) - { - if (resizable) - { - BorderX = GetSystemMetrics(SM_CXSIZEFRAME); - BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYSIZEFRAME); - } - else - { - BorderX = GetSystemMetrics(SM_CXDLGFRAME); - BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME); - } - } - else - { - BorderX = BorderY = 0; - } + if (!fullscreen) + { + if (resizable) + { + BorderX = GetSystemMetrics(SM_CXSIZEFRAME); + BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYSIZEFRAME); + } + else + { + BorderX = GetSystemMetrics(SM_CXDLGFRAME); + BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME); + } + } + else + { + BorderX = BorderY = 0; + } } @@ -298,10 +312,10 @@ namespace irr //! replace the given cursor icon. virtual void changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon); - //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. + //! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work. virtual core::dimension2di getSupportedIconSize() const; - void update(); + void update(); private: @@ -339,7 +353,7 @@ namespace irr } } - CIrrDeviceWin32* Device; + CIrrDeviceWin32* Device; core::position2d CursorPos; core::dimension2d WindowSize; core::dimension2d InvWindowSize; diff --git a/source/Irrlicht/CIrrDeviceWinCE.h b/source/Irrlicht/CIrrDeviceWinCE.h index 2212d4ca..30e0b8e2 100644 --- a/source/Irrlicht/CIrrDeviceWinCE.h +++ b/source/Irrlicht/CIrrDeviceWinCE.h @@ -54,7 +54,7 @@ namespace irr virtual bool isWindowMinimized() const; //! returns current window position (not supported for this device) - virtual core::position2di getWindowPosition() + virtual core::position2di getWindowPosition() { return core::position2di(-1, -1); } @@ -155,7 +155,7 @@ namespace irr if (UseReferenceRect) { SetCursorPos(ReferenceRect.UpperLeftCorner.X + x, - ReferenceRect.UpperLeftCorner.Y + y); + ReferenceRect.UpperLeftCorner.Y + y); } else { @@ -215,9 +215,9 @@ namespace irr WindowSize = size; if (size.Width!=0) InvWindowSize.Width = 1.0f / size.Width; - else + else InvWindowSize.Width = 0.f; - + if (size.Height!=0) InvWindowSize.Height = 1.0f / size.Height; else @@ -235,7 +235,7 @@ namespace irr DWORD xy = GetMessagePos(); p.x = GET_X_LPARAM(xy); p.y = GET_Y_LPARAM(xy); - } + } if (UseReferenceRect) { diff --git a/source/Irrlicht/CIrrMeshWriter.cpp b/source/Irrlicht/CIrrMeshWriter.cpp index 2f7f9bd8..5834c80f 100644 --- a/source/Irrlicht/CIrrMeshWriter.cpp +++ b/source/Irrlicht/CIrrMeshWriter.cpp @@ -2,7 +2,7 @@ // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h -#include "IrrCompileConfig.h" +#include "IrrCompileConfig.h" #ifdef _IRR_COMPILE_WITH_IRR_WRITER_ diff --git a/source/Irrlicht/CIrrMeshWriter.h b/source/Irrlicht/CIrrMeshWriter.h index 4b62633c..d0557aa7 100644 --- a/source/Irrlicht/CIrrMeshWriter.h +++ b/source/Irrlicht/CIrrMeshWriter.h @@ -34,7 +34,7 @@ namespace scene //! Returns the type of the mesh writer virtual EMESH_WRITER_TYPE getType() const; - //! writes a mesh + //! writes a mesh virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); protected: diff --git a/source/Irrlicht/CLightSceneNode.h b/source/Irrlicht/CLightSceneNode.h index b2940eae..16501346 100644 --- a/source/Irrlicht/CLightSceneNode.h +++ b/source/Irrlicht/CLightSceneNode.h @@ -12,7 +12,7 @@ namespace irr namespace scene { -//! Scene node which is a dynamic light. You can switch the light on and off by +//! Scene node which is a dynamic light. You can switch the light on and off by //! making it visible or not, and let it be animated by ordinary scene node animators. class CLightSceneNode : public ILightSceneNode { @@ -58,8 +58,7 @@ public: virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); //! Creates a clone of this scene node and its children. - virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); - + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); //! Sets the light's radius of influence. /** Outside this radius the light won't lighten geometry and cast no diff --git a/source/Irrlicht/CLogger.h b/source/Irrlicht/CLogger.h index 314cb13f..d320b045 100644 --- a/source/Irrlicht/CLogger.h +++ b/source/Irrlicht/CLogger.h @@ -31,7 +31,7 @@ public: //! Prints out a text into the log virtual void log(const wchar_t* text, ELOG_LEVEL ll=ELL_INFORMATION); - + //! Prints out a text into the log virtual void log(const c8* text, const c8* hint, ELOG_LEVEL ll=ELL_INFORMATION); diff --git a/source/Irrlicht/CMS3DMeshFileLoader.cpp b/source/Irrlicht/CMS3DMeshFileLoader.cpp index 9a88d492..a3919fe1 100644 --- a/source/Irrlicht/CMS3DMeshFileLoader.cpp +++ b/source/Irrlicht/CMS3DMeshFileLoader.cpp @@ -501,7 +501,7 @@ bool CMS3DMeshFileLoader::load(io::IReadFile* file) tmpMatrix=jnt->LocalMatrix*tmpMatrix; - // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from tmpMatrix to tmpMatrix.getTransposed() for downward compatibility. + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from tmpMatrix to tmpMatrix.getTransposed() for downward compatibility. // Not tested so far if this was correct or wrong before quaternion fix! k->rotation = core::quaternion(tmpMatrix.getTransposed()); } diff --git a/source/Irrlicht/CMemoryFile.h b/source/Irrlicht/CMemoryFile.h index fcea43fa..c777d097 100644 --- a/source/Irrlicht/CMemoryFile.h +++ b/source/Irrlicht/CMemoryFile.h @@ -15,7 +15,7 @@ namespace irr namespace io { - /*! + /*! Class for reading from memory. */ class CMemoryReadFile : public IReadFile diff --git a/source/Irrlicht/CMeshManipulator.cpp b/source/Irrlicht/CMeshManipulator.cpp index 823c4e38..102c19e2 100644 --- a/source/Irrlicht/CMeshManipulator.cpp +++ b/source/Irrlicht/CMeshManipulator.cpp @@ -279,21 +279,21 @@ void recalculateTangentsT(IMeshBuffer* buffer, bool recalculateNormals, bool smo for ( i=0; iVertices.push_back(v[i]); } } - + break; } case video::EVT_2TCOORDS: diff --git a/source/Irrlicht/CMeshManipulator.h b/source/Irrlicht/CMeshManipulator.h index c8029be5..af51f62f 100644 --- a/source/Irrlicht/CMeshManipulator.h +++ b/source/Irrlicht/CMeshManipulator.h @@ -27,12 +27,12 @@ public: //! Recalculates all normals of the mesh. /** \param mesh: Mesh on which the operation is performed. - \param smooth: Whether to use smoothed normals. */ + \param smooth: Whether to use smoothed normals. */ virtual void recalculateNormals(scene::IMesh* mesh, bool smooth = false, bool angleWeighted = false) const; //! Recalculates all normals of the mesh buffer. /** \param buffer: Mesh buffer on which the operation is performed. - \param smooth: Whether to use smoothed normals. */ + \param smooth: Whether to use smoothed normals. */ virtual void recalculateNormals(IMeshBuffer* buffer, bool smooth = false, bool angleWeighted = false) const; //! Clones a static IMesh into a modifiable SMesh. @@ -41,7 +41,7 @@ public: //! Creates a planar texture mapping on the mesh /** \param mesh: Mesh on which the operation is performed. \param resolution: resolution of the planar mapping. This is the value - specifying which is the relation between world space and + specifying which is the relation between world space and texture coordinate space. */ virtual void makePlanarTextureMapping(scene::IMesh* mesh, f32 resolution=0.001f) const; diff --git a/source/Irrlicht/CMeshSceneNode.h b/source/Irrlicht/CMeshSceneNode.h index 513664f7..3f48da94 100644 --- a/source/Irrlicht/CMeshSceneNode.h +++ b/source/Irrlicht/CMeshSceneNode.h @@ -41,7 +41,7 @@ namespace scene //! optimal position for minimizing renderstate changes, but can also be used //! to directly modify the material of a scene node. virtual video::SMaterial& getMaterial(u32 i); - + //! returns amount of materials used by this scene node. virtual u32 getMaterialCount() const; @@ -66,7 +66,7 @@ namespace scene s32 id, bool zfailmethod=true, f32 infinity=10000.0f); //! 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); diff --git a/source/Irrlicht/CMetaTriangleSelector.cpp b/source/Irrlicht/CMetaTriangleSelector.cpp index 843fa79e..206be192 100644 --- a/source/Irrlicht/CMetaTriangleSelector.cpp +++ b/source/Irrlicht/CMetaTriangleSelector.cpp @@ -152,7 +152,7 @@ ISceneNode* CMetaTriangleSelector::getSceneNodeForTriangle(u32 triangleIndex) co } -/* Return the number of TriangleSelectors that are inside this one, +/* Return the number of TriangleSelectors that are inside this one, Only useful for MetaTriangleSelector others return 1 */ u32 CMetaTriangleSelector::getSelectorCount() const diff --git a/source/Irrlicht/COBJMeshWriter.h b/source/Irrlicht/COBJMeshWriter.h index 34b91081..40df009a 100644 --- a/source/Irrlicht/COBJMeshWriter.h +++ b/source/Irrlicht/COBJMeshWriter.h @@ -31,7 +31,7 @@ namespace scene //! Returns the type of the mesh writer virtual EMESH_WRITER_TYPE getType() const; - //! writes a mesh + //! writes a mesh virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); protected: diff --git a/source/Irrlicht/COCTLoader.h b/source/Irrlicht/COCTLoader.h index 57eef611..15c3abd5 100644 --- a/source/Irrlicht/COCTLoader.h +++ b/source/Irrlicht/COCTLoader.h @@ -1,4 +1,4 @@ -// Copyright (C) 2002-2012 Nikolaus Gebhardt +// Copyright (C) 2002-2012 Nikolaus Gebhardt // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h // diff --git a/source/Irrlicht/COSOperator.h b/source/Irrlicht/COSOperator.h index 819805fb..149e01bb 100644 --- a/source/Irrlicht/COSOperator.h +++ b/source/Irrlicht/COSOperator.h @@ -21,7 +21,7 @@ public: #if defined(_IRR_COMPILE_WITH_X11_DEVICE_) COSOperator(const core::stringc& osversion, CIrrDeviceLinux* device); #endif - COSOperator(const core::stringc& osversion); + COSOperator(const core::stringc& osversion); //! returns the current operation system version as string. virtual const core::stringc& getOperatingSystemVersion() const; @@ -49,7 +49,7 @@ private: core::stringc OperatingSystem; #if defined(_IRR_COMPILE_WITH_X11_DEVICE_) - CIrrDeviceLinux * IrrDeviceLinux; + CIrrDeviceLinux * IrrDeviceLinux; #endif }; diff --git a/source/Irrlicht/COctreeTriangleSelector.cpp b/source/Irrlicht/COctreeTriangleSelector.cpp index 657f9114..806fd769 100644 --- a/source/Irrlicht/COctreeTriangleSelector.cpp +++ b/source/Irrlicht/COctreeTriangleSelector.cpp @@ -153,7 +153,7 @@ void COctreeTriangleSelector::getTrianglesFromOctree( for (u32 i=0; iTriangles[i]; - // This isn't an accurate test, but it's fast, and the + // This isn't an accurate test, but it's fast, and the // API contract doesn't guarantee complete accuracy. if (srcTri.isTotalOutsideBox(box)) continue; diff --git a/source/Irrlicht/COgreMeshFileLoader.cpp b/source/Irrlicht/COgreMeshFileLoader.cpp index fe9b4520..1ecad194 100644 --- a/source/Irrlicht/COgreMeshFileLoader.cpp +++ b/source/Irrlicht/COgreMeshFileLoader.cpp @@ -773,7 +773,7 @@ void COgreMeshFileLoader::composeObject(void) ISkinnedMesh::SJoint* joint = m->addJoint(); joint->Name=Skeleton.Bones[i].Name; - // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched to getMatrix_transposed instead of getMatrix for downward compatibility. + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched to getMatrix_transposed instead of getMatrix for downward compatibility. // Not tested so far if this was correct or wrong before quaternion fix! Skeleton.Bones[i].Orientation.getMatrix_transposed(joint->LocalMatrix); @@ -827,8 +827,8 @@ void COgreMeshFileLoader::composeObject(void) ISkinnedMesh::SRotationKey* rotkey = m->addRotationKey(keyjoint); rotkey->frame=frame.Time*25; - // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from keyjoint->LocalMatrix to keyjoint->LocalMatrix.getTransposed() for downward compatibility. - // Not tested so far if this was correct or wrong before quaternion fix! + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from keyjoint->LocalMatrix to keyjoint->LocalMatrix.getTransposed() for downward compatibility. + // Not tested so far if this was correct or wrong before quaternion fix! rotkey->rotation=core::quaternion(keyjoint->LocalMatrix.getTransposed())*frame.Orientation; ISkinnedMesh::SScaleKey* scalekey = m->addScaleKey(keyjoint); diff --git a/source/Irrlicht/COpenGLDriver.h b/source/Irrlicht/COpenGLDriver.h index a057d83e..9a2ff72b 100644 --- a/source/Irrlicht/COpenGLDriver.h +++ b/source/Irrlicht/COpenGLDriver.h @@ -33,12 +33,12 @@ namespace irr namespace video { - class COpenGLCallBridge; + class COpenGLCallBridge; class COpenGLTexture; class COpenGLDriver : public CNullDriver, public IMaterialRendererServices, public COpenGLExtensionHandler { - friend class COpenGLCallBridge; + friend class COpenGLCallBridge; friend class COpenGLTexture; public: @@ -280,15 +280,15 @@ namespace video bool resetAllRenderstates) { setBasicRenderStates(material, lastmaterial, resetAllRenderstates, true); - setTextureRenderStates(material, resetAllRenderstates, true); + setTextureRenderStates(material, resetAllRenderstates, true); } //! Can be called by an IMaterialRenderer to make its work easier. virtual void setBasicRenderStates(const SMaterial& material, const SMaterial& lastmaterial, bool resetAllRenderstates, bool fixedPipeline); - - //! Compare in SMaterial doesn't check texture parameters, so we should call this on each OnRender call. - virtual void setTextureRenderStates(const SMaterial& material, bool resetAllRenderstates, bool fixedPipeline); + + //! Compare in SMaterial doesn't check texture parameters, so we should call this on each OnRender call. + virtual void setTextureRenderStates(const SMaterial& material, bool resetAllRenderstates, bool fixedPipeline); //! Get a vertex shader constant index. virtual s32 getVertexShaderConstantID(const c8* name); @@ -417,12 +417,12 @@ namespace video //! Get ZBuffer bits. GLenum getZBufferBits() const; - - //! Get current material. - const SMaterial& getCurrentMaterial() const; - - //! Get bridge calls. - COpenGLCallBridge* getBridgeCalls() const; + + //! Get current material. + const SMaterial& getCurrentMaterial() const; + + //! Get bridge calls. + COpenGLCallBridge* getBridgeCalls() const; //! Get Cg context #ifdef _IRR_COMPILE_WITH_CG_ @@ -473,9 +473,9 @@ namespace video //! helper function doing the actual rendering. void renderArray(const void* indexList, u32 primitiveCount, scene::E_PRIMITIVE_TYPE pType, E_INDEX_TYPE iType); - + // Bridge calls. - COpenGLCallBridge* BridgeCalls; + COpenGLCallBridge* BridgeCalls; core::stringw Name; core::matrix4 Matrices[ETS_COUNT]; @@ -603,7 +603,7 @@ namespace video //! Built-in 2D quad for 2D rendering. S3DVertex Quad2DVertices[4]; u16 Quad2DIndices[6]; - u16 Line2DIndices[2]; + u16 Line2DIndices[2]; #ifdef _IRR_WINDOWS_API_ HDC HDc; // Private GDI Device Context @@ -629,14 +629,14 @@ namespace video E_DEVICE_TYPE DeviceType; }; - - //! This bridge between Irlicht pseudo OpenGL calls - //! and true OpenGL calls. - - class COpenGLCallBridge - { - public: - COpenGLCallBridge(COpenGLDriver* driver); + + //! This bridge between Irlicht pseudo OpenGL calls + //! and true OpenGL calls. + + class COpenGLCallBridge + { + public: + COpenGLCallBridge(COpenGLDriver* driver); // Alpha calls. @@ -659,29 +659,29 @@ namespace video void setCullFaceFunc(GLenum mode); void setCullFace(bool enable); - - // Depth calls. + + // Depth calls. void setDepthFunc(GLenum mode); - void setDepthMask(bool enable); + void setDepthMask(bool enable); void setDepthTest(bool enable); - - // Matrix calls. - - void setMatrixMode(GLenum mode); - - // Texture calls. - - void setActiveTexture(GLenum texture); + + // Matrix calls. + + void setMatrixMode(GLenum mode); + + // Texture calls. + + void setActiveTexture(GLenum texture); void setClientActiveTexture(GLenum texture); - - void setTexture(u32 stage, bool fixedPipeline); - - private: - COpenGLDriver* Driver; + + void setTexture(u32 stage, bool fixedPipeline); + + private: + COpenGLDriver* Driver; GLenum AlphaMode; GLclampf AlphaRef; @@ -698,19 +698,19 @@ namespace video GLenum CullFaceMode; bool CullFace; - - GLenum DepthFunc; - bool DepthMask; - bool DepthTest; - - GLenum MatrixMode; - - GLenum ActiveTexture; - GLenum ClientActiveTexture; - const ITexture* Texture[MATERIAL_MAX_TEXTURES]; - bool TextureFixedPipeline[MATERIAL_MAX_TEXTURES]; - }; + GLenum DepthFunc; + bool DepthMask; + bool DepthTest; + + GLenum MatrixMode; + + GLenum ActiveTexture; + GLenum ClientActiveTexture; + + const ITexture* Texture[MATERIAL_MAX_TEXTURES]; + bool TextureFixedPipeline[MATERIAL_MAX_TEXTURES]; + }; } // end namespace video } // end namespace irr diff --git a/source/Irrlicht/COpenGLMaterialRenderer.h b/source/Irrlicht/COpenGLMaterialRenderer.h index b1ca0177..48e73d31 100644 --- a/source/Irrlicht/COpenGLMaterialRenderer.h +++ b/source/Irrlicht/COpenGLMaterialRenderer.h @@ -35,13 +35,12 @@ public: virtual void OnUnsetBaseMaterial() { } - - virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) - { - Driver->setTextureRenderStates(Driver->getCurrentMaterial(), false, true); - - return true; - } + + virtual bool OnRender(IMaterialRendererServices* service, E_VERTEX_TYPE vtxtype) + { + Driver->setTextureRenderStates(Driver->getCurrentMaterial(), false, true); + return true; + } protected: @@ -106,7 +105,7 @@ public: glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); - glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, (f32) modulate ); #endif @@ -176,7 +175,7 @@ public: glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); - glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); + glTexEnvf(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); glTexEnvf(GL_TEXTURE_ENV, GL_RGB_SCALE_EXT, (f32) modulate ); #endif @@ -249,12 +248,12 @@ public: Driver->getBridgeCalls()->setAlphaTest(false); } - //! Returns if the material is transparent. - /** Is not always transparent, but mostly. */ - virtual bool isTransparent() const - { - return true; - } + //! Returns if the material is transparent. + /** Is not always transparent, but mostly. */ + virtual bool isTransparent() const + { + return true; + } }; @@ -648,12 +647,12 @@ public: glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_ALPHA_ARB, GL_PREVIOUS_ARB); #else glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); - + if (material.MaterialType == EMT_LIGHTMAP_ADD) glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_ADD); else glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_MODULATE); - + glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB_EXT, GL_TEXTURE); glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB_EXT, GL_PREVIOUS_EXT); glTexEnvf(GL_TEXTURE_ENV, GL_COMBINE_ALPHA_EXT, GL_MODULATE); diff --git a/source/Irrlicht/COpenGLParallaxMapRenderer.cpp b/source/Irrlicht/COpenGLParallaxMapRenderer.cpp index b0c3abed..a18c38aa 100644 --- a/source/Irrlicht/COpenGLParallaxMapRenderer.cpp +++ b/source/Irrlicht/COpenGLParallaxMapRenderer.cpp @@ -319,7 +319,7 @@ void COpenGLParallaxMapRenderer::OnSetConstants(IMaterialRendererServices* servi // Transform the light by the inverse world matrix to get it into object space. invWorldMat.transformVect(light.Position); - + services->setVertexShaderConstant( reinterpret_cast(&light.Position), 12+(i*2), 1); diff --git a/source/Irrlicht/COpenGLSLMaterialRenderer.h b/source/Irrlicht/COpenGLSLMaterialRenderer.h index 3d79e9e8..c7836c1b 100644 --- a/source/Irrlicht/COpenGLSLMaterialRenderer.h +++ b/source/Irrlicht/COpenGLSLMaterialRenderer.h @@ -39,7 +39,7 @@ namespace irr { -namespace video +namespace video { class COpenGLDriver; @@ -54,8 +54,8 @@ public: //! Constructor COpenGLSLMaterialRenderer( - COpenGLDriver* driver, - s32& outMaterialTypeNr, + COpenGLDriver* driver, + s32& outMaterialTypeNr, const c8* vertexShaderProgram = 0, const c8* vertexShaderEntryPointName = 0, E_VERTEX_SHADER_TYPE vsCompileTarget = video::EVST_VS_1_1, @@ -106,8 +106,8 @@ protected: E_MATERIAL_TYPE baseMaterial, s32 userData=0); - void init(s32& outMaterialTypeNr, - const c8* vertexShaderProgram, + void init(s32& outMaterialTypeNr, + const c8* vertexShaderProgram, const c8* pixelShaderProgram, const c8* geometryShaderProgram, scene::E_PRIMITIVE_TYPE inType=scene::EPT_TRIANGLES, @@ -117,7 +117,7 @@ protected: bool createProgram(); bool createShader(GLenum shaderType, const char* shader); bool linkProgram(); - + COpenGLDriver* Driver; IShaderConstantSetCallBack* CallBack; COpenGLMaterialRenderer* BaseMaterial; diff --git a/source/Irrlicht/COpenGLTexture.cpp b/source/Irrlicht/COpenGLTexture.cpp index 034ea3ce..f75f3e20 100644 --- a/source/Irrlicht/COpenGLTexture.cpp +++ b/source/Irrlicht/COpenGLTexture.cpp @@ -445,30 +445,15 @@ void COpenGLTexture::uploadTexture(bool newTexture, void* mipmapData, u32 level) if (!level && newTexture) { - if (!IsCompressed && HasMipMaps && !mipmapData && Driver->queryFeature(EVDF_MIP_MAP_AUTO_UPDATE)) + if (IsCompressed && !mipmapData) { - if (!MipmapLegacyMode && AutomaticMipmapUpdate) - { - glEnable(GL_TEXTURE_2D); - Driver->extGlGenerateMipmap(GL_TEXTURE_2D); - } + if (image->hasMipMaps()) + mipmapData = static_cast(image->lock())+compressedDataSize; + else + HasMipMaps = false; } - else if(HasMipMaps) - { - // Either generate manually due to missing capability - // or use predefined mipmap data eg. for compressed textures - AutomaticMipmapUpdate=false; - if (IsCompressed && !mipmapData) - { - if (image->hasMipMaps()) - mipmapData = static_cast(image->lock())+compressedDataSize; - else - HasMipMaps = false; - } - - regenerateMipMapLevels(mipmapData); - } + regenerateMipMapLevels(mipmapData); if (HasMipMaps) // might have changed in regenerateMipMapLevels { @@ -686,12 +671,34 @@ bool COpenGLTexture::hasMipMaps() const //! modifying the texture void COpenGLTexture::regenerateMipMapLevels(void* mipmapData) { - if (AutomaticMipmapUpdate || !HasMipMaps || !Image) + // texture require mipmaps? + if (!HasMipMaps) return; - if (IsCompressed && !mipmapData) - return; - if ((Image->getDimension().Width==1) && (Image->getDimension().Height==1)) + + // we don't use custom data for mipmaps. + if (!mipmapData) + { + // compressed textures require custom data for prepare mipmaps. + if (IsCompressed) + return; + + // texture use legacy method for generate mipmaps? + if (AutomaticMipmapUpdate && MipmapLegacyMode) + return; + + // hardware doesn't support generate mipmaps for certain texture but image data doesn't exist or is wrong. + if (!AutomaticMipmapUpdate && (!Image || (Image && ((Image->getDimension().Width==1) && (Image->getDimension().Height==1))))) + return; + } + + // hardware moethods for generate mipmaps. + if (!mipmapData && AutomaticMipmapUpdate && !MipmapLegacyMode) + { + glEnable(GL_TEXTURE_2D); + Driver->extGlGenerateMipmap(GL_TEXTURE_2D); + return; + } // Manually create mipmaps or use prepared version u32 compressedDataSize = 0; diff --git a/source/Irrlicht/CPLYMeshWriter.cpp b/source/Irrlicht/CPLYMeshWriter.cpp index c9f05c89..04216cba 100644 --- a/source/Irrlicht/CPLYMeshWriter.cpp +++ b/source/Irrlicht/CPLYMeshWriter.cpp @@ -2,7 +2,7 @@ // This file is part of the "Irrlicht Engine". // For conditions of distribution and use, see copyright notice in irrlicht.h -#include "IrrCompileConfig.h" +#include "IrrCompileConfig.h" #ifdef _IRR_COMPILE_WITH_PLY_WRITER_ @@ -40,9 +40,9 @@ bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla os::Printer::log("Writing mesh", file->getFileName()); // write PLY header - core::stringc header = + core::stringc header = "ply\n" - "format ascii 1.0\n" + "format ascii 1.0\n" "comment Irrlicht Engine "; header += IRRLICHT_SDK_VERSION; @@ -84,7 +84,7 @@ bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla header += "element face "; header += TriangleCount; - header += "\n" + header += "\n" "property list uchar int vertex_indices\n" "end_header\n"; @@ -120,11 +120,11 @@ bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla // video::SColor &col = ( (video::S3DVertex*)buf )->Color; // x y z nx ny nz red green blue alpha u v [u1 v1 | tx ty tz]\n - snprintf(outLine, 1024, - "%f %f %f %f %f %f\n",// %u %u %u %u %f %f\n", + snprintf(outLine, 1024, + "%f %f %f %f %f %f\n",// %u %u %u %u %f %f\n", pos.X, pos.Z, pos.Y, // Y and Z are flipped - n.X, n.Z, n.Y); - /*col.getRed(), col.getGreen(), col.getBlue(), col.getAlpha(), + n.X, n.Z, n.Y); + /*col.getRed(), col.getGreen(), col.getBlue(), col.getAlpha(), tc.X, tc.Y);*/ // write the line @@ -142,9 +142,9 @@ bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla for (u32 j=0; j < mb->getIndexCount(); j+=3) { // y and z are flipped so triangles are reversed - u32 a=StartOffset, - b=StartOffset, - c=StartOffset; + u32 a=StartOffset; + u32 b=StartOffset; + u32 c=StartOffset; switch(mb->getIndexType()) { @@ -171,8 +171,6 @@ bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla } // all done! - - return true; } diff --git a/source/Irrlicht/CPLYMeshWriter.h b/source/Irrlicht/CPLYMeshWriter.h index 79c2450a..863423cb 100644 --- a/source/Irrlicht/CPLYMeshWriter.h +++ b/source/Irrlicht/CPLYMeshWriter.h @@ -24,7 +24,7 @@ namespace scene //! Returns the type of the mesh writer virtual EMESH_WRITER_TYPE getType() const; - //! writes a mesh + //! writes a mesh virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); }; diff --git a/source/Irrlicht/CParticleBoxEmitter.cpp b/source/Irrlicht/CParticleBoxEmitter.cpp index 9728f6f0..eaf06e3d 100644 --- a/source/Irrlicht/CParticleBoxEmitter.cpp +++ b/source/Irrlicht/CParticleBoxEmitter.cpp @@ -112,7 +112,7 @@ void CParticleBoxEmitter::serializeAttributes(io::IAttributes* out, io::SAttribu out->addFloat("MinStartSizeWidth", MinStartSize.Width); out->addFloat("MinStartSizeHeight", MinStartSize.Height); out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); - out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); out->addColor("MinStartColor", MinStartColor); @@ -160,7 +160,7 @@ void CParticleBoxEmitter::deserializeAttributes(io::IAttributes* in, io::SAttrib MaxStartSize.Width = in->getAttributeAsFloat(idx); idx = in->findAttribute("MaxStartSizeHeight"); if ( idx >= 0 ) - MaxStartSize.Height = in->getAttributeAsFloat(idx); + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleCylinderEmitter.cpp b/source/Irrlicht/CParticleCylinderEmitter.cpp index a2078f95..2778a10d 100644 --- a/source/Irrlicht/CParticleCylinderEmitter.cpp +++ b/source/Irrlicht/CParticleCylinderEmitter.cpp @@ -121,15 +121,15 @@ void CParticleCylinderEmitter::serializeAttributes(io::IAttributes* out, io::SAt out->addFloat("MinStartSizeWidth", MinStartSize.Width); out->addFloat("MinStartSizeHeight", MinStartSize.Height); out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); - out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); out->addColor("MinStartColor", MinStartColor); out->addColor("MaxStartColor", MaxStartColor); out->addInt("MinLifeTime", MinLifeTime); out->addInt("MaxLifeTime", MaxLifeTime); - out->addFloat("Radius", Radius); - out->addFloat("Length", Length); + out->addFloat("Radius", Radius); + out->addFloat("Length", Length); out->addInt("MaxAngleDegrees", MaxAngleDegrees); out->addBool("OutlineOnly", OutlineOnly); } @@ -157,7 +157,7 @@ void CParticleCylinderEmitter::deserializeAttributes(io::IAttributes* in, io::SA MaxStartSize.Width = in->getAttributeAsFloat(idx); idx = in->findAttribute("MaxStartSizeHeight"); if ( idx >= 0 ) - MaxStartSize.Height = in->getAttributeAsFloat(idx); + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); @@ -175,8 +175,8 @@ void CParticleCylinderEmitter::deserializeAttributes(io::IAttributes* in, io::SA MaxLifeTime = core::max_(MaxLifeTime, MinLifeTime); MinLifeTime = core::min_(MinLifeTime, MaxLifeTime); - Radius = in->getAttributeAsFloat("Radius"); - Length = in->getAttributeAsFloat("Length"); + Radius = in->getAttributeAsFloat("Radius"); + Length = in->getAttributeAsFloat("Length"); MaxAngleDegrees = in->getAttributeAsInt("MaxAngleDegrees"); OutlineOnly = in->getAttributeAsBool("OutlineOnly"); } diff --git a/source/Irrlicht/CParticlePointEmitter.cpp b/source/Irrlicht/CParticlePointEmitter.cpp index 34dc51d7..51a98189 100644 --- a/source/Irrlicht/CParticlePointEmitter.cpp +++ b/source/Irrlicht/CParticlePointEmitter.cpp @@ -91,7 +91,7 @@ void CParticlePointEmitter::serializeAttributes(io::IAttributes* out, io::SAttri out->addFloat("MinStartSizeWidth", MinStartSize.Width); out->addFloat("MinStartSizeHeight", MinStartSize.Height); out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); - out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); out->addColor("MinStartColor", MinStartColor); diff --git a/source/Irrlicht/CParticleRingEmitter.cpp b/source/Irrlicht/CParticleRingEmitter.cpp index 5f398cdc..9ac3e45e 100644 --- a/source/Irrlicht/CParticleRingEmitter.cpp +++ b/source/Irrlicht/CParticleRingEmitter.cpp @@ -118,7 +118,7 @@ void CParticleRingEmitter::serializeAttributes(io::IAttributes* out, io::SAttrib out->addFloat("MinStartSizeWidth", MinStartSize.Width); out->addFloat("MinStartSizeHeight", MinStartSize.Height); out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); - out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); out->addColor("MinStartColor", MinStartColor); @@ -132,8 +132,8 @@ void CParticleRingEmitter::serializeAttributes(io::IAttributes* out, io::SAttrib void CParticleRingEmitter::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options) { Center = in->getAttributeAsVector3d("Center"); - Radius = in->getAttributeAsFloat("Radius"); - RingThickness = in->getAttributeAsFloat("RingThickness"); + Radius = in->getAttributeAsFloat("Radius"); + RingThickness = in->getAttributeAsFloat("RingThickness"); Direction = in->getAttributeAsVector3d("Direction"); if (Direction.getLength() == 0) diff --git a/source/Irrlicht/CParticleSphereEmitter.cpp b/source/Irrlicht/CParticleSphereEmitter.cpp index 42e4e52e..31d78f6b 100644 --- a/source/Irrlicht/CParticleSphereEmitter.cpp +++ b/source/Irrlicht/CParticleSphereEmitter.cpp @@ -118,7 +118,7 @@ void CParticleSphereEmitter::serializeAttributes(io::IAttributes* out, io::SAttr out->addFloat("MinStartSizeWidth", MinStartSize.Width); out->addFloat("MinStartSizeHeight", MinStartSize.Height); out->addFloat("MaxStartSizeWidth", MaxStartSize.Width); - out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); + out->addFloat("MaxStartSizeHeight", MaxStartSize.Height); out->addInt("MinParticlesPerSecond", MinParticlesPerSecond); out->addInt("MaxParticlesPerSecond", MaxParticlesPerSecond); out->addColor("MinStartColor", MinStartColor); @@ -150,7 +150,7 @@ void CParticleSphereEmitter::deserializeAttributes(io::IAttributes* in, io::SAtt MaxStartSize.Width = in->getAttributeAsFloat(idx); idx = in->findAttribute("MaxStartSizeHeight"); if ( idx >= 0 ) - MaxStartSize.Height = in->getAttributeAsFloat(idx); + MaxStartSize.Height = in->getAttributeAsFloat(idx); MinParticlesPerSecond = in->getAttributeAsInt("MinParticlesPerSecond"); MaxParticlesPerSecond = in->getAttributeAsInt("MaxParticlesPerSecond"); diff --git a/source/Irrlicht/CParticleSystemSceneNode.h b/source/Irrlicht/CParticleSystemSceneNode.h index 24ae48c8..259a67a9 100644 --- a/source/Irrlicht/CParticleSystemSceneNode.h +++ b/source/Irrlicht/CParticleSystemSceneNode.h @@ -194,8 +194,8 @@ public: virtual void clearParticles(); //! 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); //! Writes attributes of the scene node. diff --git a/source/Irrlicht/CQ3LevelMesh.h b/source/Irrlicht/CQ3LevelMesh.h index b7e9cf11..c60d7e8c 100644 --- a/source/Irrlicht/CQ3LevelMesh.h +++ b/source/Irrlicht/CQ3LevelMesh.h @@ -25,7 +25,7 @@ namespace scene //! constructor CQ3LevelMesh(io::IFileSystem* fs, scene::ISceneManager* smgr, - const quake3::Q3LevelLoadParameter &loadParam); + const quake3::Q3LevelLoadParameter &loadParam); //! destructor virtual ~CQ3LevelMesh(); @@ -105,7 +105,7 @@ namespace scene } //! Returns pointer to a mesh buffer which fits a material - /** \param material: material to search for + /** \param material: material to search for \return Pointer to the mesh buffer or 0 if there is no such mesh buffer. */ virtual IMeshBuffer* getMeshBuffer( const video::SMaterial &material) const { diff --git a/source/Irrlicht/CQuake3ShaderSceneNode.cpp b/source/Irrlicht/CQuake3ShaderSceneNode.cpp index 36943c2c..70c59390 100644 --- a/source/Irrlicht/CQuake3ShaderSceneNode.cpp +++ b/source/Irrlicht/CQuake3ShaderSceneNode.cpp @@ -30,7 +30,7 @@ CQuake3ShaderSceneNode::CQuake3ShaderSceneNode( scene::ISceneNode* parent, scene::ISceneManager* mgr,s32 id, io::IFileSystem *fileSystem, const scene::IMeshBuffer *original, const IShader * shader) -: scene::IMeshSceneNode(parent, mgr, id, +: scene::IMeshSceneNode(parent, mgr, id, core::vector3df(0.f, 0.f, 0.f), core::vector3df(0.f, 0.f, 0.f), core::vector3df(1.f, 1.f, 1.f)), @@ -58,7 +58,7 @@ CQuake3ShaderSceneNode::CQuake3ShaderSceneNode( Original->grab(); // clone meshbuffer to modifiable buffer - cloneBuffer(MeshBuffer, Original, + cloneBuffer(MeshBuffer, Original, Original->getMaterial().ColorMask != 0); // load all Textures in all stages @@ -249,7 +249,7 @@ E_SCENE_NODE_RENDER_PASS CQuake3ShaderSceneNode::getRenderStage() const ret = ESNRP_TRANSPARENT_EFFECT; } else -*/ +*/ if ( group->isDefined( "sort", "opaque" ) ) { ret = ESNRP_SOLID; @@ -411,8 +411,8 @@ void CQuake3ShaderSceneNode::render() video::SMaterial deb_m; IAnimatedMesh * arrow = SceneManager->addArrowMesh ( - "__debugnormalq3", - 0xFFECEC00,0xFF999900, + "__debugnormalq3", + 0xFFECEC00,0xFF999900, 4, 8, 8.f, 6.f, 0.5f,1.f @@ -534,7 +534,7 @@ IShadowVolumeSceneNode* CQuake3ShaderSceneNode::addShadowVolumeSceneNode( 3.3.1 deformVertexes wave
Designed for water surfaces, modifying the values differently at each point. It accepts the standard wave functions of the type sin, triangle, square, sawtooth - or inversesawtooth. The "div" parameter is used to control the wave "spread" + or inversesawtooth. The "div" parameter is used to control the wave "spread" - a value equal to the tessSize of the surface is a good default value (tessSize is subdivision size, in game units, used for the shader when seen in the game world) . */ @@ -572,15 +572,15 @@ void CQuake3ShaderSceneNode::deformvertexes_wave( f32 dt, SModifierFunction &fun /*! deformVertexes move x y z func base amplitude phase freq - The move parameter is used to make a brush, curve patch or model + The move parameter is used to make a brush, curve patch or model appear to move together as a unit. The x y z values are the distance - and direction in game units the object appears to move relative to + and direction in game units the object appears to move relative to it's point of origin in the map. The func base amplitude phase freq values are the same as found in other waveform manipulations. The product of the function modifies the values x, y, and z. - Therefore, if you have an amplitude of 5 and an x value of 2, - the object will travel 10 units from its point of origin along the x axis. + Therefore, if you have an amplitude of 5 and an x value of 2, + the object will travel 10 units from its point of origin along the x axis. This results in a total of 20 units of motion along the x axis, since the amplitude is the variation both above and below the base. @@ -588,7 +588,7 @@ void CQuake3ShaderSceneNode::deformvertexes_wave( f32 dt, SModifierFunction &fun change position, it only appears to. Design Notes: - If an object is made up of surfaces with different shaders, all must have + If an object is made up of surfaces with different shaders, all must have matching deformVertexes move values or the object will appear to tear itself apart. */ void CQuake3ShaderSceneNode::deformvertexes_move( f32 dt, SModifierFunction &function ) @@ -626,7 +626,7 @@ void CQuake3ShaderSceneNode::deformvertexes_move( f32 dt, SModifierFunction &fun be no visible effect. Design Notes: Putting values of 0.1 t o 0.5 in Amplitude and 1.0 to 4.0 in the - Frequency can produce some satisfying results. Some things that have been + Frequency can produce some satisfying results. Some things that have been done with it: A small fluttering bat, falling leaves, rain, flags. */ void CQuake3ShaderSceneNode::deformvertexes_normal( f32 dt, SModifierFunction &function ) @@ -663,31 +663,31 @@ void CQuake3ShaderSceneNode::deformvertexes_normal( f32 dt, SModifierFunction &f Specific parameter definitions for deform keywords:
This is roughly defined as the size of the waves that occur. - It is measured in game units. Smaller values create a greater - density of smaller wave forms occurring in a given area. + It is measured in game units. Smaller values create a greater + density of smaller wave forms occurring in a given area. Larger values create a lesser density of waves, or otherwise put, - the appearance of larger waves. To look correct this value should + the appearance of larger waves. To look correct this value should closely correspond to the value (in pixels) set for tessSize (tessellation size) - of the texture. A value of 100.0 is a good default value + of the texture. A value of 100.0 is a good default value (which means your tessSize should be close to that for things to look "wavelike"). - This is the type of wave form being created. Sin stands for sine wave, + This is the type of wave form being created. Sin stands for sine wave, a regular smoothly flowing wave. Triangle is a wave with a sharp ascent and a sharp decay. It will make a choppy looking wave forms. - A square wave is simply on or off for the period of the + A square wave is simply on or off for the period of the frequency with no in between. The sawtooth wave has the ascent of a - triangle wave, but has the decay cut off sharply like a square wave. + triangle wave, but has the decay cut off sharply like a square wave. An inversesawtooth wave reverses this. - This is the distance, in game units that the apparent surface of the - texture is displaced from the actual surface of the brush as placed - in the editor. A positive value appears above the brush surface. - A negative value appears below the brush surface. - An example of this is the Quad effect, which essentially is a - shell with a positive base value to stand it away from the model + This is the distance, in game units that the apparent surface of the + texture is displaced from the actual surface of the brush as placed + in the editor. A positive value appears above the brush surface. + A negative value appears below the brush surface. + An example of this is the Quad effect, which essentially is a + shell with a positive base value to stand it away from the model surface and a 0 (zero) value for amplitude. - The distance that the deformation moves away from the base value. + The distance that the deformation moves away from the base value. See Wave Forms in the introduction for a description of amplitude. See Wave Forms in the introduction for a description of phase) @@ -696,7 +696,7 @@ void CQuake3ShaderSceneNode::deformvertexes_normal( f32 dt, SModifierFunction &f Design Note: The div and amplitude parameters, when used in conjunction with liquid volumes like water should take into consideration how much the water - will be moving. A large ocean area would have have massive swells (big div values) + will be moving. A large ocean area would have have massive swells (big div values) that rose and fell dramatically (big amplitude values). While a small, quiet pool may move very little. */ @@ -739,10 +739,10 @@ void CQuake3ShaderSceneNode::deformvertexes_bulge( f32 dt, SModifierFunction &fu /*! deformVertexes autosprite - This function can be used to make any given triangle quad + This function can be used to make any given triangle quad (pair of triangles that form a square rectangle) automatically behave - like a sprite without having to make it a separate entity. This means - that the "sprite" on which the texture is placed will rotate to always + like a sprite without having to make it a separate entity. This means + that the "sprite" on which the texture is placed will rotate to always appear at right angles to the player's view as a sprite would. Any four-sided brush side, flat patch, or pair of triangles in a model can have the autosprite effect on it. The brush face containing a texture with this shader keyword must @@ -784,7 +784,7 @@ void CQuake3ShaderSceneNode::deformvertexes_autosprite( f32 dt, SModifierFunctio /*! deformVertexes autosprite2 Is a slightly modified "sprite" that only rotates around the middle of its longest axis. - This allows you to make a pillar of fire that you can walk around, or an energy beam + This allows you to make a pillar of fire that you can walk around, or an energy beam stretched across the room. */ @@ -1014,8 +1014,8 @@ void CQuake3ShaderSceneNode::vertextransform_tcgen( f32 dt, SModifierFunction &f n += Original->Vertices[i].Normal; n.normalize(); - MeshBuffer->Vertices[i].TCoords.X = 0.5f*(1.f+(n.X*m[0]+n.Y*m[1]+n.Z*m[2])); - MeshBuffer->Vertices[i].TCoords.Y = 0.5f*(1.f+(n.X*m[4]+n.Y*m[5]+n.Z*m[6])); + MeshBuffer->Vertices[i].TCoords.X = 0.5f*(1.f+(n.X*m[0]+n.Y*m[1]+n.Z*m[2])); + MeshBuffer->Vertices[i].TCoords.Y = 0.5f*(1.f+(n.X*m[4]+n.Y*m[5]+n.Z*m[6])); } } break; @@ -1101,9 +1101,9 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) { const SVariable &v = group->Variable[g]; - // get the modifier + // get the modifier static const c8 * const modifierList[] = - { + { "tcmod","deformvertexes","rgbgen","tcgen","map","alphagen" }; @@ -1125,7 +1125,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) // get the modifier function static const c8 * const funclist[] = - { + { "scroll","scale","rotate","stretch","turb", "wave","identity","vertex", "texture","lightmap","environment","$lightmap", @@ -1156,7 +1156,7 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) break; case ROTATE: // tcmod rotate - m2.setTextureRotationCenter( getAsFloat( v.content, pos ) * + m2.setTextureRotationCenter( getAsFloat( v.content, pos ) * core::DEGTORAD * TimeAbs ); @@ -1228,8 +1228,8 @@ void CQuake3ShaderSceneNode::animate( u32 stage,core::matrix4 &texture ) case TURBULENCE: //tcMod turb //function.tcgen = TURBULENCE; - m2.setTextureRotationCenter( function.frequency * - core::DEGTORAD * + m2.setTextureRotationCenter( function.frequency * + core::DEGTORAD * TimeAbs ); break; diff --git a/source/Irrlicht/CSTLMeshWriter.h b/source/Irrlicht/CSTLMeshWriter.h index 0b0b76d4..c016cc1f 100644 --- a/source/Irrlicht/CSTLMeshWriter.h +++ b/source/Irrlicht/CSTLMeshWriter.h @@ -27,7 +27,7 @@ namespace scene //! Returns the type of the mesh writer virtual EMESH_WRITER_TYPE getType() const; - //! writes a mesh + //! writes a mesh virtual bool writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 flags=EMWF_NONE); protected: diff --git a/source/Irrlicht/CSceneLoaderIrr.h b/source/Irrlicht/CSceneLoaderIrr.h index f8c9532a..400cf62d 100644 --- a/source/Irrlicht/CSceneLoaderIrr.h +++ b/source/Irrlicht/CSceneLoaderIrr.h @@ -40,8 +40,9 @@ public: virtual bool isALoadableFileFormat(io::IReadFile *file) const; //! Loads the scene into the scene manager. - virtual bool loadScene(io::IReadFile* file, ISceneUserDataSerializer* userDataSerializer=0, - ISceneNode* rootNode=0); + virtual bool loadScene(io::IReadFile* file, + ISceneUserDataSerializer* userDataSerializer=0, + ISceneNode* rootNode=0); private: diff --git a/source/Irrlicht/CSceneManager.h b/source/Irrlicht/CSceneManager.h index f13f65e9..476fc8ef 100644 --- a/source/Irrlicht/CSceneManager.h +++ b/source/Irrlicht/CSceneManager.h @@ -298,12 +298,12 @@ namespace scene //! creates a fly circle animator /** Lets the attached scene node fly around a center. \param center Center relative to node origin - \param speed: The orbital speed, in radians per millisecond. - \param direction: Specifies the upvector used for alignment of the mesh. - \param startPosition: The position on the circle where the animator will - begin. Value is in multiples of a circle, i.e. 0.5 is half way around. - \return The animator. Attach it to a scene node with ISceneNode::addAnimator() - */ + \param speed: The orbital speed, in radians per millisecond. + \param direction: Specifies the upvector used for alignment of the mesh. + \param startPosition: The position on the circle where the animator will + begin. Value is in multiples of a circle, i.e. 0.5 is half way around. + \return The animator. Attach it to a scene node with ISceneNode::addAnimator() + */ virtual ISceneNodeAnimator* createFlyCircleAnimator( const core::vector3df& center=core::vector3df(0.f, 0.f, 0.f), f32 radius=100.f, f32 speed=0.001f, diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h index 9b4ad2ed..d039ade4 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h +++ b/source/Irrlicht/CSceneNodeAnimatorCameraFPS.h @@ -59,7 +59,7 @@ namespace scene virtual void setKeyMap(SKeyMap *map, u32 count); //! 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& keymap); //! Gets the keyboard mapping for this animator diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp index 00ac1338..41d6c4a7 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.cpp @@ -276,7 +276,7 @@ void CSceneNodeAnimatorCameraMaya::setDistance(f32 distance) CurrentZoom=distance; } - + //! Gets the rotation speed f32 CSceneNodeAnimatorCameraMaya::getRotateSpeed() const { diff --git a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h index 495a77ba..38ba6312 100644 --- a/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h +++ b/source/Irrlicht/CSceneNodeAnimatorCameraMaya.h @@ -24,11 +24,11 @@ namespace scene /** This scene node animator can be attached to a camera to make it act like a 3d modelling tool camera */ - class CSceneNodeAnimatorCameraMaya : public ISceneNodeAnimatorCameraMaya + class CSceneNodeAnimatorCameraMaya : public ISceneNodeAnimatorCameraMaya { public: //! Constructor - CSceneNodeAnimatorCameraMaya(gui::ICursorControl* cursor, f32 rotateSpeed = -1500.f, + CSceneNodeAnimatorCameraMaya(gui::ICursorControl* cursor, f32 rotateSpeed = -1500.f, f32 zoomSpeed = 200.f, f32 translationSpeed = 1500.f, f32 distance=70.f); //! Destructor @@ -71,7 +71,7 @@ namespace scene } //! Returns type of the scene node - virtual ESCENE_NODE_ANIMATOR_TYPE getType() const + virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_CAMERA_MAYA; } diff --git a/source/Irrlicht/CSceneNodeAnimatorDelete.cpp b/source/Irrlicht/CSceneNodeAnimatorDelete.cpp index 2ef584d8..3a519de8 100644 --- a/source/Irrlicht/CSceneNodeAnimatorDelete.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorDelete.cpp @@ -39,7 +39,7 @@ void CSceneNodeAnimatorDelete::animateNode(ISceneNode* node, u32 timeMs) ISceneNodeAnimator* CSceneNodeAnimatorDelete::createClone(ISceneNode* node, ISceneManager* newManager) { - CSceneNodeAnimatorDelete * newAnimator = + CSceneNodeAnimatorDelete * newAnimator = new CSceneNodeAnimatorDelete(SceneManager, FinishTime); return newAnimator; diff --git a/source/Irrlicht/CSceneNodeAnimatorDelete.h b/source/Irrlicht/CSceneNodeAnimatorDelete.h index f62848f0..eec78b66 100644 --- a/source/Irrlicht/CSceneNodeAnimatorDelete.h +++ b/source/Irrlicht/CSceneNodeAnimatorDelete.h @@ -26,7 +26,7 @@ namespace scene { return ESNAT_DELETION; } - + //! Creates a clone of this animator. /** Please note that you will have to drop (IReferenceCounted::drop()) the returned pointer after calling diff --git a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp index dc887fa2..ce8d8ea6 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.cpp @@ -75,7 +75,7 @@ void CSceneNodeAnimatorFlyCircle::deserializeAttributes(io::IAttributes* in, io: Speed = in->getAttributeAsFloat("Speed"); Direction = in->getAttributeAsVector3d("Direction"); StartTime = 0; - + if (Direction.equals(core::vector3df(0,0,0))) Direction.set(0,1,0); // irrlicht 1.1 backwards compatibility else @@ -88,7 +88,7 @@ void CSceneNodeAnimatorFlyCircle::deserializeAttributes(io::IAttributes* in, io: ISceneNodeAnimator* CSceneNodeAnimatorFlyCircle::createClone(ISceneNode* node, ISceneManager* newManager) { - CSceneNodeAnimatorFlyCircle * newAnimator = + CSceneNodeAnimatorFlyCircle * newAnimator = new CSceneNodeAnimatorFlyCircle(StartTime, Center, Radius, Speed, Direction, RadiusEllipsoid); return newAnimator; diff --git a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h index c17b0365..cd084112 100644 --- a/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h +++ b/source/Irrlicht/CSceneNodeAnimatorFlyCircle.h @@ -18,7 +18,7 @@ namespace scene //! constructor CSceneNodeAnimatorFlyCircle(u32 time, const core::vector3df& center, f32 radius, - f32 speed, const core::vector3df& direction, + f32 speed, const core::vector3df& direction, f32 radiusEllipsoid); //! animates a scene node @@ -32,7 +32,7 @@ namespace scene //! Returns type of the scene node animator virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_FLY_CIRCLE; } - + //! Creates a clone of this animator. /** Please note that you will have to drop (IReferenceCounted::drop()) the returned pointer after calling diff --git a/source/Irrlicht/CSceneNodeAnimatorRotation.cpp b/source/Irrlicht/CSceneNodeAnimatorRotation.cpp index f3c5473e..5e56c345 100644 --- a/source/Irrlicht/CSceneNodeAnimatorRotation.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorRotation.cpp @@ -39,7 +39,7 @@ void CSceneNodeAnimatorRotation::animateNode(ISceneNode* node, u32 timeMs) if (rot.Z>360.f) rot.Z=fmodf(rot.Z, 360.f); node->setRotation(rot); - StartTime=timeMs; + StartTime=timeMs; } } } @@ -61,7 +61,7 @@ void CSceneNodeAnimatorRotation::deserializeAttributes(io::IAttributes* in, io:: ISceneNodeAnimator* CSceneNodeAnimatorRotation::createClone(ISceneNode* node, ISceneManager* newManager) { - CSceneNodeAnimatorRotation * newAnimator = + CSceneNodeAnimatorRotation * newAnimator = new CSceneNodeAnimatorRotation(StartTime, Rotation); return newAnimator; diff --git a/source/Irrlicht/CSceneNodeAnimatorRotation.h b/source/Irrlicht/CSceneNodeAnimatorRotation.h index aa26c66e..d285ca7e 100644 --- a/source/Irrlicht/CSceneNodeAnimatorRotation.h +++ b/source/Irrlicht/CSceneNodeAnimatorRotation.h @@ -29,7 +29,7 @@ namespace scene //! Returns type of the scene node animator virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_ROTATION; } - + //! Creates a clone of this animator. /** Please note that you will have to drop (IReferenceCounted::drop()) the returned pointer after calling this. */ diff --git a/source/Irrlicht/CSceneNodeAnimatorTexture.cpp b/source/Irrlicht/CSceneNodeAnimatorTexture.cpp index 1cedf3d5..efc1c11c 100644 --- a/source/Irrlicht/CSceneNodeAnimatorTexture.cpp +++ b/source/Irrlicht/CSceneNodeAnimatorTexture.cpp @@ -12,7 +12,7 @@ namespace scene //! constructor -CSceneNodeAnimatorTexture::CSceneNodeAnimatorTexture(const core::array& textures, +CSceneNodeAnimatorTexture::CSceneNodeAnimatorTexture(const core::array& textures, s32 timePerFrame, bool loop, u32 now) : ISceneNodeAnimatorFinishing(0), TimePerFrame(timePerFrame), StartTime(now), Loop(loop) @@ -128,7 +128,7 @@ void CSceneNodeAnimatorTexture::deserializeAttributes(io::IAttributes* in, io::S ISceneNodeAnimator* CSceneNodeAnimatorTexture::createClone(ISceneNode* node, ISceneManager* newManager) { - CSceneNodeAnimatorTexture * newAnimator = + CSceneNodeAnimatorTexture * newAnimator = new CSceneNodeAnimatorTexture(Textures, TimePerFrame, Loop, StartTime); return newAnimator; diff --git a/source/Irrlicht/CSceneNodeAnimatorTexture.h b/source/Irrlicht/CSceneNodeAnimatorTexture.h index a27eef0a..3784226c 100644 --- a/source/Irrlicht/CSceneNodeAnimatorTexture.h +++ b/source/Irrlicht/CSceneNodeAnimatorTexture.h @@ -34,7 +34,7 @@ namespace scene //! Returns type of the scene node animator virtual ESCENE_NODE_ANIMATOR_TYPE getType() const { return ESNAT_TEXTURE; } - + //! Creates a clone of this animator. /** Please note that you will have to drop (IReferenceCounted::drop()) the returned pointer after calling diff --git a/source/Irrlicht/CShadowVolumeSceneNode.h b/source/Irrlicht/CShadowVolumeSceneNode.h index c66b8f97..b344528d 100644 --- a/source/Irrlicht/CShadowVolumeSceneNode.h +++ b/source/Irrlicht/CShadowVolumeSceneNode.h @@ -18,8 +18,8 @@ namespace scene public: //! constructor - CShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, ISceneManager* mgr, - s32 id, bool zfailmethod=true, f32 infinity=10000.0f); + CShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, ISceneManager* mgr, + s32 id, bool zfailmethod=true, f32 infinity=10000.0f); //! destructor virtual ~CShadowVolumeSceneNode(); diff --git a/source/Irrlicht/CSkinnedMesh.cpp b/source/Irrlicht/CSkinnedMesh.cpp index e1ab5a52..83b68367 100644 --- a/source/Irrlicht/CSkinnedMesh.cpp +++ b/source/Irrlicht/CSkinnedMesh.cpp @@ -167,7 +167,7 @@ void CSkinnedMesh::buildAllLocalAnimatedMatrices() { joint->GlobalSkinningSpace=false; - // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched to getMatrix_transposed instead of getMatrix for downward compatibility. + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched to getMatrix_transposed instead of getMatrix for downward compatibility. // Not tested so far if this was correct or wrong before quaternion fix! joint->Animatedrotation.getMatrix_transposed(joint->LocalAnimatedMatrix); diff --git a/source/Irrlicht/CSkinnedMesh.h b/source/Irrlicht/CSkinnedMesh.h index cb3665ca..959e3455 100644 --- a/source/Irrlicht/CSkinnedMesh.h +++ b/source/Irrlicht/CSkinnedMesh.h @@ -61,7 +61,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; diff --git a/source/Irrlicht/CSkyBoxSceneNode.h b/source/Irrlicht/CSkyBoxSceneNode.h index 91580dce..85ab5a4d 100644 --- a/source/Irrlicht/CSkyBoxSceneNode.h +++ b/source/Irrlicht/CSkyBoxSceneNode.h @@ -45,7 +45,7 @@ namespace scene virtual ESCENE_NODE_TYPE getType() const { return ESNT_SKY_BOX; } //! Creates a clone of this scene node and its children. - virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); + virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); private: diff --git a/source/Irrlicht/CSoftware2MaterialRenderer.h b/source/Irrlicht/CSoftware2MaterialRenderer.h index 80936139..24a24f0e 100644 --- a/source/Irrlicht/CSoftware2MaterialRenderer.h +++ b/source/Irrlicht/CSoftware2MaterialRenderer.h @@ -12,7 +12,7 @@ namespace irr { -namespace video +namespace video { //! Base class for all internal Software2 material renderers @@ -38,10 +38,10 @@ public: CSoftware2MaterialRenderer_SOLID ( video::CBurningVideoDriver* driver ) :CSoftware2MaterialRenderer ( driver ) {} - //! Returns if the material is transparent. + //! Returns if the material is transparent. virtual bool isTransparent() const { - return false; + return false; } }; @@ -56,10 +56,10 @@ public: : CSoftware2MaterialRenderer ( driver ) {} - //! Returns if the material is transparent. + //! Returns if the material is transparent. virtual bool isTransparent() const { - return true; + return true; } }; diff --git a/source/Irrlicht/CSphereSceneNode.h b/source/Irrlicht/CSphereSceneNode.h index 7dcc4c87..2c6f4c93 100644 --- a/source/Irrlicht/CSphereSceneNode.h +++ b/source/Irrlicht/CSphereSceneNode.h @@ -62,7 +62,7 @@ namespace scene virtual IMesh* getMesh() { 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) {} diff --git a/source/Irrlicht/CTRFlat.cpp b/source/Irrlicht/CTRFlat.cpp index 216e1a19..0c0e866b 100644 --- a/source/Irrlicht/CTRFlat.cpp +++ b/source/Irrlicht/CTRFlat.cpp @@ -37,7 +37,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels @@ -50,7 +50,7 @@ public: lockedSurface = (u16*)RenderTarget->lock(); lockedZBuffer = ZBuffer->lock(); - + for (s32 i=0; i ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -164,7 +164,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } diff --git a/source/Irrlicht/CTRFlatWire.cpp b/source/Irrlicht/CTRFlatWire.cpp index 4f0c5c7b..200efd47 100644 --- a/source/Irrlicht/CTRFlatWire.cpp +++ b/source/Irrlicht/CTRFlatWire.cpp @@ -37,7 +37,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span core::rect TriangleRect; @@ -48,7 +48,7 @@ public: lockedSurface = (u16*)RenderTarget->lock(); lockedZBuffer = ZBuffer->lock(); - + for (s32 i=0; i ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -162,7 +162,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } diff --git a/source/Irrlicht/CTRGouraud.cpp b/source/Irrlicht/CTRGouraud.cpp index 9edf908d..4f96069c 100644 --- a/source/Irrlicht/CTRGouraud.cpp +++ b/source/Irrlicht/CTRGouraud.cpp @@ -37,7 +37,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels @@ -171,7 +171,7 @@ public: if (spanEnd > ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -183,7 +183,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } @@ -238,8 +238,8 @@ public: spanZTarget = zTarget + leftx; hSpanEnd = targetSurface + rightx; - spanR = leftR; - spanG = leftG; + spanR = leftR; + spanG = leftG; spanB = leftB; spanStepR = (s32)((rightR - leftR) * tmpDiv); spanStepG = (s32)((rightG - leftG) * tmpDiv); @@ -256,7 +256,7 @@ public: spanR += spanStepR; spanG += spanStepG; spanB += spanStepB; - + spanZValue += spanZStep; ++hSpanBegin; ++spanZTarget; diff --git a/source/Irrlicht/CTRGouraud2.cpp b/source/Irrlicht/CTRGouraud2.cpp index 48ed4d19..35bc4514 100644 --- a/source/Irrlicht/CTRGouraud2.cpp +++ b/source/Irrlicht/CTRGouraud2.cpp @@ -359,31 +359,31 @@ void CTRGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4D // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -519,31 +519,31 @@ void CTRGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4D // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRGouraudAlpha2.cpp b/source/Irrlicht/CTRGouraudAlpha2.cpp index 3c014f3e..965471ec 100644 --- a/source/Irrlicht/CTRGouraudAlpha2.cpp +++ b/source/Irrlicht/CTRGouraudAlpha2.cpp @@ -373,31 +373,31 @@ void CTRGouraudAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,cons // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -533,31 +533,31 @@ void CTRGouraudAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,cons // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp b/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp index 24b87793..9a879609 100644 --- a/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp +++ b/source/Irrlicht/CTRGouraudAlphaNoZ2.cpp @@ -371,31 +371,31 @@ void CTRGouraudAlphaNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,c // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -531,31 +531,31 @@ void CTRGouraudAlphaNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,c // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRGouraudWire.cpp b/source/Irrlicht/CTRGouraudWire.cpp index 1d233a77..a40e9c1b 100644 --- a/source/Irrlicht/CTRGouraudWire.cpp +++ b/source/Irrlicht/CTRGouraudWire.cpp @@ -36,7 +36,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values @@ -167,7 +167,7 @@ public: if (spanEnd > ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -179,7 +179,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } diff --git a/source/Irrlicht/CTRNormalMap.cpp b/source/Irrlicht/CTRNormalMap.cpp index 94c0962c..b3fd35cc 100644 --- a/source/Irrlicht/CTRNormalMap.cpp +++ b/source/Irrlicht/CTRNormalMap.cpp @@ -485,41 +485,41 @@ void CTRNormalMap::drawTriangle ( const s4DVertex *a,const s4DVertex *b,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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #ifdef IPOL_T2 scan.t[2][0] += scan.slopeT[2][0] * subPixel; - scan.t[2][1] += scan.slopeT[2][1] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; #endif #ifdef IPOL_L0 scan.l[0][0] += scan.slopeL[0][0] * subPixel; - scan.l[0][1] += scan.slopeL[0][1] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; #endif #endif @@ -693,41 +693,41 @@ void CTRNormalMap::drawTriangle ( const s4DVertex *a,const s4DVertex *b,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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #ifdef IPOL_T2 scan.t[2][0] += scan.slopeT[2][0] * subPixel; - scan.t[2][1] += scan.slopeT[2][1] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; #endif #ifdef IPOL_L0 scan.l[0][0] += scan.slopeL[0][0] * subPixel; - scan.l[0][1] += scan.slopeL[0][1] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRStencilShadow.cpp b/source/Irrlicht/CTRStencilShadow.cpp index be974b64..4a425df2 100644 --- a/source/Irrlicht/CTRStencilShadow.cpp +++ b/source/Irrlicht/CTRStencilShadow.cpp @@ -567,41 +567,41 @@ void CTRStencilShadow::drawTriangle ( const s4DVertex *a,const s4DVertex *b,cons // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #ifdef IPOL_T2 scan.t[2][0] += scan.slopeT[2][0] * subPixel; - scan.t[2][1] += scan.slopeT[2][1] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; #endif #ifdef IPOL_L0 scan.l[0][0] += scan.slopeL[0][0] * subPixel; - scan.l[0][1] += scan.slopeL[0][1] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; #endif #endif @@ -775,41 +775,41 @@ void CTRStencilShadow::drawTriangle ( const s4DVertex *a,const s4DVertex *b,cons // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #ifdef IPOL_T2 scan.t[2][0] += scan.slopeT[2][0] * subPixel; - scan.t[2][1] += scan.slopeT[2][1] * subPixel; + scan.t[2][1] += scan.slopeT[2][1] * subPixel; #endif #ifdef IPOL_L0 scan.l[0][0] += scan.slopeL[0][0] * subPixel; - scan.l[0][1] += scan.slopeL[0][1] * subPixel; + scan.l[0][1] += scan.slopeL[0][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureBlend.cpp b/source/Irrlicht/CTRTextureBlend.cpp index 82372e8e..67bfca1b 100644 --- a/source/Irrlicht/CTRTextureBlend.cpp +++ b/source/Irrlicht/CTRTextureBlend.cpp @@ -191,8 +191,8 @@ void CTRTextureBlend::setParam ( u32 index, f32 value) fragmentShader = &CTRTextureBlend::fragment_dst_color_zero; } - static const c8 *n[] = - { + static const c8 *n[] = + { "gl_zero", "gl_one", "gl_dst_color", @@ -334,12 +334,12 @@ void CTRTextureBlend::fragment_dst_color_src_alpha () iw = fix_inverse32 ( line.w[0] ); #endif - getSample_texture ( a0,r0,g0,b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,iw), tofix ( line.t[0][0].y,iw) ); - + color_to_fix ( r1, g1, b1, dst[i] ); dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), @@ -377,12 +377,12 @@ void CTRTextureBlend::fragment_dst_color_src_alpha () iw = fix_inverse32 ( line.w[0] ); #endif - getSample_texture ( a0,r0,g0,b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,iw), tofix ( line.t[0][0].y,iw) ); - + color_to_fix ( r1, g1, b1, dst[i] ); dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), @@ -557,12 +557,12 @@ void CTRTextureBlend::fragment_src_color_src_alpha () iw = fix_inverse32 ( line.w[0] ); #endif - getSample_texture ( a0,r0,g0,b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,iw), tofix ( line.t[0][0].y,iw) ); - + color_to_fix ( r1, g1, b1, dst[i] ); dst[i] = fix_to_color ( clampfix_maxcolor ( imulFix_tex2 ( r0, r1 ) ), @@ -2100,31 +2100,31 @@ void CTRTextureBlend::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -2260,31 +2260,31 @@ void CTRTextureBlend::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureDetailMap2.cpp b/source/Irrlicht/CTRTextureDetailMap2.cpp index 514383fe..13b4a0fb 100644 --- a/source/Irrlicht/CTRTextureDetailMap2.cpp +++ b/source/Irrlicht/CTRTextureDetailMap2.cpp @@ -376,31 +376,31 @@ void CTRTextureDetailMap2::drawTriangle ( const s4DVertex *a,const s4DVertex *b, // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -536,31 +536,31 @@ void CTRTextureDetailMap2::drawTriangle ( const s4DVertex *a,const s4DVertex *b, // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureFlat.cpp b/source/Irrlicht/CTRTextureFlat.cpp index d1c0c54c..19618765 100644 --- a/source/Irrlicht/CTRTextureFlat.cpp +++ b/source/Irrlicht/CTRTextureFlat.cpp @@ -36,7 +36,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels @@ -53,7 +53,7 @@ public: lockedSurface = (u16*)RenderTarget->lock(); lockedZBuffer = ZBuffer->lock(); lockedTexture = (u16*)Texture->lock(); - + for (s32 i=0; i ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -176,7 +176,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } @@ -229,7 +229,7 @@ public: spanZTarget = zTarget + leftx; hSpanEnd = targetSurface + rightx; - spanTx = leftTx; + spanTx = leftTx; spanTy = leftTy; spanTxStep = (s32)((rightTx - leftTx) * tmpDiv); spanTyStep = (s32)((rightTy - leftTy) * tmpDiv); @@ -244,7 +244,7 @@ public: spanTx += spanTxStep; spanTy += spanTyStep; - + spanZValue += spanZStep; ++hSpanBegin; ++spanZTarget; diff --git a/source/Irrlicht/CTRTextureFlatWire.cpp b/source/Irrlicht/CTRTextureFlatWire.cpp index d15ba044..edddd724 100644 --- a/source/Irrlicht/CTRTextureFlatWire.cpp +++ b/source/Irrlicht/CTRTextureFlatWire.cpp @@ -36,7 +36,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span s32 leftTx, rightTx, leftTy, rightTy; // texture interpolating values @@ -50,7 +50,7 @@ public: lockedSurface = (u16*)RenderTarget->lock(); lockedZBuffer = ZBuffer->lock(); lockedTexture = (u16*)Texture->lock(); - + for (s32 i=0; i ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -173,7 +173,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } diff --git a/source/Irrlicht/CTRTextureGouraud.cpp b/source/Irrlicht/CTRTextureGouraud.cpp index 3b2795da..7176a1b7 100644 --- a/source/Irrlicht/CTRTextureGouraud.cpp +++ b/source/Irrlicht/CTRTextureGouraud.cpp @@ -86,7 +86,7 @@ void CTRTextureGouraud::setRenderTarget(video::IImage* surface, const core::rect SurfaceHeight = RenderTarget->getDimension().Height; RenderTarget->grab(); ViewPortRect = viewPort; - } + } } @@ -103,7 +103,7 @@ void CTRTextureGouraud::drawIndexedTriangleList(S2DVertex* vertices, s32 vertexC s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels @@ -124,7 +124,7 @@ void CTRTextureGouraud::drawIndexedTriangleList(S2DVertex* vertices, s32 vertexC lockedSurface = (u16*)RenderTarget->lock(); lockedZBuffer = ZBuffer->lock(); lockedTexture = (u16*)Texture->lock(); - + for (s32 i=0; i ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -262,7 +262,7 @@ void CTRTextureGouraud::drawIndexedTriangleList(S2DVertex* vertices, s32 vertexC } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } @@ -333,7 +333,7 @@ void CTRTextureGouraud::drawIndexedTriangleList(S2DVertex* vertices, s32 vertexC spanZTarget = zTarget + leftx+tDiffLeft; hSpanEnd = targetSurface + rightx+tDiffRight; - while (hSpanBegin < hSpanEnd) + while (hSpanBegin < hSpanEnd) { if (spanZValue > *spanZTarget) { @@ -350,7 +350,7 @@ void CTRTextureGouraud::drawIndexedTriangleList(S2DVertex* vertices, s32 vertexC spanTx += spanTxStep; spanTy += spanTyStep; - + spanZValue += spanZStep; ++hSpanBegin; ++spanZTarget; diff --git a/source/Irrlicht/CTRTextureGouraud.h b/source/Irrlicht/CTRTextureGouraud.h index 0885363d..b0c92a62 100644 --- a/source/Irrlicht/CTRTextureGouraud.h +++ b/source/Irrlicht/CTRTextureGouraud.h @@ -34,10 +34,10 @@ namespace video //! constructor CTRTextureGouraud(IZBuffer* zbuffer); - + //! destructor virtual ~CTRTextureGouraud(); - + //! sets a render target virtual void setRenderTarget(video::IImage* surface, const core::rect& viewPort); diff --git a/source/Irrlicht/CTRTextureGouraud2.cpp b/source/Irrlicht/CTRTextureGouraud2.cpp index b4e81787..6ede55ab 100644 --- a/source/Irrlicht/CTRTextureGouraud2.cpp +++ b/source/Irrlicht/CTRTextureGouraud2.cpp @@ -390,31 +390,31 @@ void CTRTextureGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,co // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -550,31 +550,31 @@ void CTRTextureGouraud2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,co // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureGouraudAdd.cpp b/source/Irrlicht/CTRTextureGouraudAdd.cpp index 557bb483..ffcea8a5 100644 --- a/source/Irrlicht/CTRTextureGouraudAdd.cpp +++ b/source/Irrlicht/CTRTextureGouraudAdd.cpp @@ -49,7 +49,7 @@ void CTRTextureGouraudAdd::drawIndexedTriangleList(S2DVertex* vertices, s32 vert s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels @@ -70,7 +70,7 @@ void CTRTextureGouraudAdd::drawIndexedTriangleList(S2DVertex* vertices, s32 vert lockedSurface = (u16*)RenderTarget->lock(); lockedZBuffer = ZBuffer->lock(); lockedTexture = (u16*)Texture->lock(); - + for (s32 i=0; i ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -208,7 +208,7 @@ void CTRTextureGouraudAdd::drawIndexedTriangleList(S2DVertex* vertices, s32 vert } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } @@ -279,7 +279,7 @@ void CTRTextureGouraudAdd::drawIndexedTriangleList(S2DVertex* vertices, s32 vert spanZTarget = zTarget + leftx+tDiffLeft; hSpanEnd = targetSurface + rightx+tDiffRight; - while (hSpanBegin < hSpanEnd) + while (hSpanBegin < hSpanEnd) { if (spanZValue > *spanZTarget) { @@ -303,7 +303,7 @@ void CTRTextureGouraudAdd::drawIndexedTriangleList(S2DVertex* vertices, s32 vert spanTx += spanTxStep; spanTy += spanTyStep; - + spanZValue += spanZStep; ++hSpanBegin; ++spanZTarget; diff --git a/source/Irrlicht/CTRTextureGouraudAdd2.cpp b/source/Irrlicht/CTRTextureGouraudAdd2.cpp index 1738f33c..2f14a182 100644 --- a/source/Irrlicht/CTRTextureGouraudAdd2.cpp +++ b/source/Irrlicht/CTRTextureGouraudAdd2.cpp @@ -229,13 +229,13 @@ void CTRTextureGouraudAdd2::scanline_bilinear () dst[i] = PixelAdd32 ( dst[i], - getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), d + tofix ( line.t[0][0].y,inversew) ) ); #else dst[i] = PixelAdd32 ( dst[i], - getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), d + tofix ( line.t[0][0].y) ) ); @@ -395,31 +395,31 @@ void CTRTextureGouraudAdd2::drawTriangle ( const s4DVertex *a,const s4DVertex *b // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -555,31 +555,31 @@ void CTRTextureGouraudAdd2::drawTriangle ( const s4DVertex *a,const s4DVertex *b // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp b/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp index 58b6d71e..b4b58f8d 100644 --- a/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp +++ b/source/Irrlicht/CTRTextureGouraudAddNoZ2.cpp @@ -362,31 +362,31 @@ void CTRTextureGouraudAddNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -522,31 +522,31 @@ void CTRTextureGouraudAddNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureGouraudAlpha.cpp b/source/Irrlicht/CTRTextureGouraudAlpha.cpp index 62a7c9a3..35d29ea6 100644 --- a/source/Irrlicht/CTRTextureGouraudAlpha.cpp +++ b/source/Irrlicht/CTRTextureGouraudAlpha.cpp @@ -243,13 +243,13 @@ void CTRTextureGouraudAlpha2::scanline_bilinear () inversew = fix_inverse32 ( line.w[0] ); - u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), d + tofix ( line.t[0][0].y,inversew) ); #else - u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), d + tofix ( line.t[0][0].y) ); @@ -273,13 +273,13 @@ void CTRTextureGouraudAlpha2::scanline_bilinear () #ifdef INVERSE_W inversew = fix_inverse32 ( line.w[0] ); - getSample_texture ( a0,r0,g0,b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); #else - getSample_texture ( a0,r0,g0,b0, + getSample_texture ( a0,r0,g0,b0, &IT[0], tofix ( line.t[0][0].x), tofix ( line.t[0][0].y) @@ -313,7 +313,7 @@ void CTRTextureGouraudAlpha2::scanline_bilinear () dst[i] = fix4_to_color ( a0, r2, g2, b2 ); /* - dst[i] = PixelBlend32 ( dst[i], + dst[i] = PixelBlend32 ( dst[i], fix_to_color ( r0,g0, b0 ), fixPointu_to_u32 ( a0 ) ); @@ -459,31 +459,31 @@ void CTRTextureGouraudAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -619,31 +619,31 @@ void CTRTextureGouraudAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp b/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp index 96e15191..597b32e0 100644 --- a/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp +++ b/source/Irrlicht/CTRTextureGouraudAlphaNoZ.cpp @@ -243,13 +243,13 @@ void CTRTextureGouraudAlphaNoZ::scanline_bilinear () inversew = fix_inverse32 ( line.w[0] ); - u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), d + tofix ( line.t[0][0].y,inversew) ); #else - u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + u32 argb = getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), d + tofix ( line.t[0][0].y) ); @@ -273,13 +273,13 @@ void CTRTextureGouraudAlphaNoZ::scanline_bilinear () #ifdef INVERSE_W inversew = fix_inverse32 ( line.w[0] ); - getSample_texture ( a0, r0, g0, b0, + getSample_texture ( a0, r0, g0, b0, &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ); #else - getSample_texture ( a0, r0, g0,b0, + getSample_texture ( a0, r0, g0,b0, &IT[0], tofix ( line.t[0][0].x), tofix ( line.t[0][0].y) @@ -313,7 +313,7 @@ void CTRTextureGouraudAlphaNoZ::scanline_bilinear () dst[i] = fix4_to_color ( a0, r2, g2, b2 ); /* - dst[i] = PixelBlend32 ( dst[i], + dst[i] = PixelBlend32 ( dst[i], fix_to_color ( r0,g0, b0 ), fixPointu_to_u32 ( a0 ) ); @@ -459,31 +459,31 @@ void CTRTextureGouraudAlphaNoZ::drawTriangle ( const s4DVertex *a,const s4DVerte // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -619,31 +619,31 @@ void CTRTextureGouraudAlphaNoZ::drawTriangle ( const s4DVertex *a,const s4DVerte // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureGouraudNoZ.cpp b/source/Irrlicht/CTRTextureGouraudNoZ.cpp index ea472776..7c43cf2b 100644 --- a/source/Irrlicht/CTRTextureGouraudNoZ.cpp +++ b/source/Irrlicht/CTRTextureGouraudNoZ.cpp @@ -38,7 +38,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span u16 *hSpanBegin, *hSpanEnd; // pointer used when plotting pixels @@ -53,7 +53,7 @@ public: lockedSurface = (u16*)RenderTarget->lock(); lockedTexture = (u16*)Texture->lock(); - + for (s32 i=0; i ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -183,7 +183,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } @@ -248,7 +248,7 @@ public: hSpanBegin = targetSurface + leftx+tDiffLeft; hSpanEnd = targetSurface + rightx+tDiffRight; - while (hSpanBegin < hSpanEnd) + while (hSpanBegin < hSpanEnd) { color = lockedTexture[((spanTy>>8)&textureYMask) * lockedTextureWidth + ((spanTx>>8)&textureXMask)]; *hSpanBegin = video::RGB16(video::getRed(color) * (spanR>>8) >>2, @@ -261,7 +261,7 @@ public: spanTx += spanTxStep; spanTy += spanTyStep; - + ++hSpanBegin; } } diff --git a/source/Irrlicht/CTRTextureGouraudNoZ2.cpp b/source/Irrlicht/CTRTextureGouraudNoZ2.cpp index e9eeee01..0a30c4c9 100644 --- a/source/Irrlicht/CTRTextureGouraudNoZ2.cpp +++ b/source/Irrlicht/CTRTextureGouraudNoZ2.cpp @@ -362,31 +362,31 @@ void CTRTextureGouraudNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex *b // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -522,31 +522,31 @@ void CTRTextureGouraudNoZ2::drawTriangle ( const s4DVertex *a,const s4DVertex *b // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp b/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp index 5dad0454..961c1738 100644 --- a/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp +++ b/source/Irrlicht/CTRTextureGouraudVertexAlpha2.cpp @@ -193,7 +193,7 @@ void CTRTextureVertexAlpha2::scanline_bilinear ( ) f32 inversew; #endif -//#define __TEST_THIS +//#define __TEST_THIS #ifdef __TEST_THIS @@ -228,7 +228,7 @@ void CTRTextureVertexAlpha2::scanline_bilinear ( ) dst[i] = PixelAdd32 ( dst[i], - getTexel_plain ( &IT[0], tofix ( line.t[0][0].x,inversew), + getTexel_plain ( &IT[0], tofix ( line.t[0][0].x,inversew), tofix ( line.t[0][0].y,inversew) ) ); @@ -405,31 +405,31 @@ void CTRTextureVertexAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -565,31 +565,31 @@ void CTRTextureVertexAlpha2::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureGouraudWire.cpp b/source/Irrlicht/CTRTextureGouraudWire.cpp index 8a07e439..224fc718 100644 --- a/source/Irrlicht/CTRTextureGouraudWire.cpp +++ b/source/Irrlicht/CTRTextureGouraudWire.cpp @@ -37,7 +37,7 @@ public: s32 spanEnd; // saves end of spans f32 leftdeltaxf; // amount of pixels to increase on left side of triangle f32 rightdeltaxf; // amount of pixels to increase on right side of triangle - s32 leftx, rightx; // position where we are + s32 leftx, rightx; // position where we are f32 leftxf, rightxf; // same as above, but as f32 values s32 span; // current span s32 leftR, leftG, leftB, rightR, rightG, rightB; // color values @@ -180,7 +180,7 @@ public: if (spanEnd > ViewPortRect.LowerRightCorner.Y) spanEnd = ViewPortRect.LowerRightCorner.Y; - // if the span <0, than we can skip these spans, + // if the span <0, than we can skip these spans, // and proceed to the next spans which are really on the screen. if (span < ViewPortRect.UpperLeftCorner.Y) { @@ -192,7 +192,7 @@ public: } else { - leftx = ViewPortRect.UpperLeftCorner.Y - span; + leftx = ViewPortRect.UpperLeftCorner.Y - span; span = ViewPortRect.UpperLeftCorner.Y; } diff --git a/source/Irrlicht/CTRTextureLightMap2_Add.cpp b/source/Irrlicht/CTRTextureLightMap2_Add.cpp index 82f39f32..e8043274 100644 --- a/source/Irrlicht/CTRTextureLightMap2_Add.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_Add.cpp @@ -197,7 +197,7 @@ REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear () #else - // + // tFixPoint r0, g0, b0; tFixPoint r1, g1, b1; #endif @@ -229,18 +229,18 @@ REALINLINE void CTRTextureLightMap2_Add::scanline_bilinear () const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; dst[i] = PixelAdd32 ( - getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x,inversew), d + tofix ( line.t[0][0].y,inversew) ), - getTexel_plain ( &IT[1], d + tofix ( line.t[1][0].x,inversew), + getTexel_plain ( &IT[1], d + tofix ( line.t[1][0].x,inversew), d + tofix ( line.t[1][0].y,inversew) ) ); #else const tFixPointu d = dithermask [ dIndex | ( i ) & 3 ]; dst[i] = PixelAdd32 ( - getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), + getTexel_plain ( &IT[0], d + tofix ( line.t[0][0].x), d + tofix ( line.t[0][0].y) ), - getTexel_plain ( &IT[1], d + tofix ( line.t[1][0].x), + getTexel_plain ( &IT[1], d + tofix ( line.t[1][0].x), d + tofix ( line.t[1][0].y) ) ); @@ -386,31 +386,31 @@ void CTRTextureLightMap2_Add::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -546,31 +546,31 @@ void CTRTextureLightMap2_Add::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureLightMap2_M1.cpp b/source/Irrlicht/CTRTextureLightMap2_M1.cpp index 59a13b19..108362f6 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M1.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M1.cpp @@ -144,7 +144,6 @@ REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -164,7 +163,6 @@ REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -190,7 +188,7 @@ REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 () tFixPoint r1, g1, b1; #else - // + // tFixPoint r0, g0, b0; tFixPoint r1, g1, b1; #endif @@ -244,7 +242,6 @@ REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 () } } - void CTRTextureLightMap2_M1::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) @@ -356,31 +353,31 @@ void CTRTextureLightMap2_M1::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -517,31 +514,31 @@ void CTRTextureLightMap2_M1::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureLightMap2_M2.cpp b/source/Irrlicht/CTRTextureLightMap2_M2.cpp index 40da9668..7c0e38a4 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M2.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M2.cpp @@ -144,7 +144,6 @@ REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -164,7 +163,6 @@ REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -190,7 +188,7 @@ REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 () tFixPoint r1, g1, b1; #else - // + // tFixPoint r0, g0, b0; tFixPoint r1, g1, b1; #endif @@ -244,7 +242,6 @@ REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 () } } - void CTRTextureLightMap2_M2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c ) @@ -356,31 +353,31 @@ void CTRTextureLightMap2_M2::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -517,31 +514,31 @@ void CTRTextureLightMap2_M2::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureLightMap2_M4.cpp b/source/Irrlicht/CTRTextureLightMap2_M4.cpp index 989a9159..9573a902 100644 --- a/source/Irrlicht/CTRTextureLightMap2_M4.cpp +++ b/source/Irrlicht/CTRTextureLightMap2_M4.cpp @@ -149,7 +149,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -169,7 +168,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -194,7 +192,7 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag () tFixPoint r1, g1, b1; #else - // + // tFixPoint r0, g0, b0; tFixPoint r1, g1, b1; #endif @@ -248,9 +246,8 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag () } } - -/*! -*/ + + REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min () { tVideoSample *dst; @@ -292,7 +289,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -312,7 +308,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min () i += 1; if ( i > dx ) return; - } // lazy setup rest of scanline @@ -494,31 +489,31 @@ void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex *a,const s4DVert // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -655,31 +650,31 @@ void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex *a,const s4DVert // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -868,31 +863,31 @@ void CTRTextureLightMap2_M4::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -1029,31 +1024,31 @@ void CTRTextureLightMap2_M4::drawTriangle ( const s4DVertex *a,const s4DVertex * // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0] += scan.slopeC[0] * subPixel; - scan.c[1] += scan.slopeC[1] * subPixel; + scan.c[1] += scan.slopeC[1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp b/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp index d7397f49..969124b1 100644 --- a/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp +++ b/source/Irrlicht/CTRTextureLightMapGouraud2_M4.cpp @@ -402,31 +402,31 @@ void CTRGTextureLightMap2_M4::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif @@ -564,31 +564,31 @@ void CTRGTextureLightMap2_M4::drawTriangle ( const s4DVertex *a,const s4DVertex // 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; #ifdef IPOL_Z scan.z[0] += scan.slopeZ[0] * subPixel; - scan.z[1] += scan.slopeZ[1] * subPixel; + scan.z[1] += scan.slopeZ[1] * subPixel; #endif #ifdef IPOL_W scan.w[0] += scan.slopeW[0] * subPixel; - scan.w[1] += scan.slopeW[1] * subPixel; + scan.w[1] += scan.slopeW[1] * subPixel; #endif #ifdef IPOL_C0 scan.c[0][0] += scan.slopeC[0][0] * subPixel; - scan.c[0][1] += scan.slopeC[0][1] * subPixel; + scan.c[0][1] += scan.slopeC[0][1] * subPixel; #endif #ifdef IPOL_T0 scan.t[0][0] += scan.slopeT[0][0] * subPixel; - scan.t[0][1] += scan.slopeT[0][1] * subPixel; + scan.t[0][1] += scan.slopeT[0][1] * subPixel; #endif #ifdef IPOL_T1 scan.t[1][0] += scan.slopeT[1][0] * subPixel; - scan.t[1][1] += scan.slopeT[1][1] * subPixel; + scan.t[1][1] += scan.slopeT[1][1] * subPixel; #endif #endif diff --git a/source/Irrlicht/CTRTextureWire2.cpp b/source/Irrlicht/CTRTextureWire2.cpp index 5cf8b3cd..a953e82d 100644 --- a/source/Irrlicht/CTRTextureWire2.cpp +++ b/source/Irrlicht/CTRTextureWire2.cpp @@ -114,7 +114,6 @@ static inline void swap_xor ( s32 &a, s32 &b ) */ void CTRTextureWire2::renderLine ( const s4DVertex *a,const s4DVertex *b ) const { - int pitch0 = RenderTarget->getDimension().Width << VIDEO_SAMPLE_GRANULARITY; int pitch1 = RenderTarget->getDimension().Width << 2; diff --git a/source/Irrlicht/CTerrainSceneNode.h b/source/Irrlicht/CTerrainSceneNode.h index 1d92f660..075e429a 100644 --- a/source/Irrlicht/CTerrainSceneNode.h +++ b/source/Irrlicht/CTerrainSceneNode.h @@ -258,10 +258,8 @@ namespace scene core::aabbox3df BoundingBox; core::array LODDistanceThreshold; }; - - - virtual void preRenderCalculationsIfNeeded(); - + + virtual void preRenderCalculationsIfNeeded(); virtual void preRenderLODCalculations(); virtual void preRenderIndicesCalculations(); diff --git a/source/Irrlicht/CTextSceneNode.cpp b/source/Irrlicht/CTextSceneNode.cpp index 7edf2f5f..2d82543b 100644 --- a/source/Irrlicht/CTextSceneNode.cpp +++ b/source/Irrlicht/CTextSceneNode.cpp @@ -239,7 +239,7 @@ void CBillboardTextSceneNode::setText(const wchar_t* text) void CBillboardTextSceneNode::OnAnimate(u32 timeMs) { ISceneNode::OnAnimate(timeMs); - + if (!IsVisible || !Font || !Mesh) return; diff --git a/source/Irrlicht/CTriangleSelector.cpp b/source/Irrlicht/CTriangleSelector.cpp index 7b308825..375fbcc2 100644 --- a/source/Irrlicht/CTriangleSelector.cpp +++ b/source/Irrlicht/CTriangleSelector.cpp @@ -216,7 +216,7 @@ void CTriangleSelector::getTriangles(core::triangle3df* triangles, const u32 cnt = Triangles.size(); for (u32 i=0; idrop (); } - + return archive; } @@ -143,7 +143,7 @@ CWADReader::~CWADReader() //! return the id of the file Archive const io::path& CWADReader::getArchiveName () const -{ +{ return Base; } diff --git a/source/Irrlicht/CWADReader.h b/source/Irrlicht/CWADReader.h index 2d519024..cd0876b4 100644 --- a/source/Irrlicht/CWADReader.h +++ b/source/Irrlicht/CWADReader.h @@ -48,8 +48,8 @@ namespace io struct SWADFileHeader { - c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife - u32 numlumps; + c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife + u32 numlumps; u32 infotableofs; } PACK_STRUCT; @@ -144,7 +144,7 @@ namespace io private: - + io::path Type; //! scans for a local header, returns false if there is no more local file header. diff --git a/source/Irrlicht/CWaterSurfaceSceneNode.h b/source/Irrlicht/CWaterSurfaceSceneNode.h index f8ce2d0d..19d2fe0d 100644 --- a/source/Irrlicht/CWaterSurfaceSceneNode.h +++ b/source/Irrlicht/CWaterSurfaceSceneNode.h @@ -17,7 +17,7 @@ namespace scene public: //! constructor - CWaterSurfaceSceneNode(f32 waveHeight, f32 waveSpeed, f32 waveLength, + CWaterSurfaceSceneNode(f32 waveHeight, f32 waveSpeed, f32 waveLength, IMesh* mesh, ISceneNode* parent, ISceneManager* mgr, s32 id, const core::vector3df& position = core::vector3df(0,0,0), const core::vector3df& rotation = core::vector3df(0,0,0), diff --git a/source/Irrlicht/CWriteFile.h b/source/Irrlicht/CWriteFile.h index 1bc23744..cd72e441 100644 --- a/source/Irrlicht/CWriteFile.h +++ b/source/Irrlicht/CWriteFile.h @@ -41,7 +41,7 @@ namespace io //! returns if file is open bool isOpen() const; - //! creator method + //! creator method static IWriteFile* createWriteFile(const io::path& fileName, bool append); private: diff --git a/source/Irrlicht/CXMLReaderImpl.h b/source/Irrlicht/CXMLReaderImpl.h index cfd89b0a..2dfcd373 100644 --- a/source/Irrlicht/CXMLReaderImpl.h +++ b/source/Irrlicht/CXMLReaderImpl.h @@ -265,9 +265,9 @@ private: //! sets the state that text was found. Returns true if set should be set bool setText(char_type* start, char_type* end) { - // By default xml preserves all whitespace. But Irrlicht dropped some whitespace by default - // in the past which did lead to OS dependent behavior. We just ignore all whitespace for now - // as it's the closest to fixing behavior without breaking downward compatibility too much. + // By default xml preserves all whitespace. But Irrlicht dropped some whitespace by default + // in the past which did lead to OS dependent behavior. We just ignore all whitespace for now + // as it's the closest to fixing behavior without breaking downward compatibility too much. if ( IgnoreWhitespaceText ) { char_type* p = start; @@ -467,8 +467,8 @@ private: while(*P && !cDataEnd) { if (*P == L'>' && - (*(P-1) == L']') && - (*(P-2) == L']')) + (*(P-1) == L']') && + (*(P-2) == L']')) { cDataEnd = P - 2; } @@ -566,8 +566,9 @@ private: long size = callback->getSize(); if (size<0) return false; - size += 4; // We need four terminating 0's at the end. - // For ASCII we need 1 0's, for UTF-16 2, for UTF-32 4. + // We need four terminating 0's at the end. + // For ASCII we need 1 0's, for UTF-16 2, for UTF-32 4. + size += 4; char* data8 = new char[size]; @@ -595,7 +596,7 @@ private: // check source for all utf versions and convert to target data format - if (size >= 4 && data32[0] + if (size >= 4 && data32[0] == static_cast(UTF32_BE)) { // UTF-32, big endian @@ -704,9 +705,9 @@ private: while(*t) { *t = ((*t & 0xff000000) >> 24) | - ((*t & 0x00ff0000) >> 8) | - ((*t & 0x0000ff00) << 8) | - ((*t & 0x000000ff) << 24); + ((*t & 0x00ff0000) >> 8) | + ((*t & 0x0000ff00) << 8) | + ((*t & 0x000000ff) << 24); ++t; } } @@ -726,9 +727,9 @@ private: inline bool isLittleEndian(ETEXT_FORMAT f) { return f == ETF_ASCII || - f == ETF_UTF8 || - f == ETF_UTF16_LE || - f == ETF_UTF32_LE; + f == ETF_UTF8 || + f == ETF_UTF16_LE || + f == ETF_UTF32_LE; } @@ -793,7 +794,7 @@ private: // instance variables: - bool IgnoreWhitespaceText; // do not return EXN_TEXT nodes for pure whitespace + bool IgnoreWhitespaceText; // do not return EXN_TEXT nodes for pure whitespace char_type* TextData; // data block of the text file char_type* P; // current point in text to parse char_type* TextBegin; // start of text to parse diff --git a/source/Irrlicht/CXMeshFileLoader.cpp b/source/Irrlicht/CXMeshFileLoader.cpp index 595e9110..6ea9a48a 100644 --- a/source/Irrlicht/CXMeshFileLoader.cpp +++ b/source/Irrlicht/CXMeshFileLoader.cpp @@ -1878,8 +1878,8 @@ bool CXMeshFileLoader::parseDataObjectAnimationKey(ISkinnedMesh::SJoint *joint) ISkinnedMesh::SRotationKey *keyR=AnimatedMesh->addRotationKey(joint); keyR->frame=time; - // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from mat to mat.getTransposed() for downward compatibility. - // Not tested so far if this was correct or wrong before quaternion fix! + // IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from mat to mat.getTransposed() for downward compatibility. + // Not tested so far if this was correct or wrong before quaternion fix! keyR->rotation= core::quaternion(mat.getTransposed()); ISkinnedMesh::SPositionKey *keyP=AnimatedMesh->addPositionKey(joint); diff --git a/source/Irrlicht/IBurningShader.h b/source/Irrlicht/IBurningShader.h index 50f10591..8e734ac3 100644 --- a/source/Irrlicht/IBurningShader.h +++ b/source/Irrlicht/IBurningShader.h @@ -104,7 +104,7 @@ namespace video ETR_TEXTURE_GOURAUD_DETAIL_MAP, ETR_TEXTURE_GOURAUD_LIGHTMAP_ADD, - + ETR_GOURAUD_ALPHA, ETR_GOURAUD_ALPHA_NOZ, diff --git a/source/Irrlicht/IImagePresenter.h b/source/Irrlicht/IImagePresenter.h index 4f083f09..c93fc855 100644 --- a/source/Irrlicht/IImagePresenter.h +++ b/source/Irrlicht/IImagePresenter.h @@ -9,11 +9,11 @@ namespace irr { -namespace video +namespace video { /*! - Interface for a class which is able to present an IImage + Interface for a class which is able to present an IImage an the Screen. Usually only implemented by an IrrDevice for presenting Software Device Rendered images. diff --git a/source/Irrlicht/ITriangleRenderer.h b/source/Irrlicht/ITriangleRenderer.h index 629a736d..954ce6de 100644 --- a/source/Irrlicht/ITriangleRenderer.h +++ b/source/Irrlicht/ITriangleRenderer.h @@ -34,7 +34,7 @@ namespace video class ITriangleRenderer : public virtual IReferenceCounted { public: - + //! sets a render target virtual void setRenderTarget(video::IImage* surface, const core::rect& viewPort) = 0; diff --git a/source/Irrlicht/Irrlicht.rc b/source/Irrlicht/Irrlicht.rc index 57f8f37e60d3861c4d37f5af27a81a26fd8a0157..cb79e56ff144043268398cf84531a329e92de800 100644 GIT binary patch delta 27 hcmeyS{7rd73kRd+$tM$66HIXGE?)InZT766O{2&e!6 delta 27 hcmeyS{7rd73kRdc$tMvKkcIXGE?)InZT766Oh2&Di3 diff --git a/source/Irrlicht/Irrlicht10.0.vcxproj b/source/Irrlicht/Irrlicht10.0.vcxproj index e5866811..8182462b 100644 --- a/source/Irrlicht/Irrlicht10.0.vcxproj +++ b/source/Irrlicht/Irrlicht10.0.vcxproj @@ -343,7 +343,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 + 1.9 @@ -420,7 +420,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 + 1.9 @@ -504,7 +504,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib Windows - 1.8 + 1.9 @@ -791,7 +791,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 + 1.9 @@ -1579,4 +1579,4 @@ - \ No newline at end of file + diff --git a/source/Irrlicht/Irrlicht11.0.vcxproj b/source/Irrlicht/Irrlicht11.0.vcxproj index a9b28689..531816bf 100644 --- a/source/Irrlicht/Irrlicht11.0.vcxproj +++ b/source/Irrlicht/Irrlicht11.0.vcxproj @@ -349,7 +349,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 + 1.9 @@ -426,7 +426,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 + 1.9 @@ -510,7 +510,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib Windows - 1.8 + 1.9 @@ -797,7 +797,7 @@ ..\..\lib\Win32-visualstudio\Irrlicht.lib - 1.8 + 1.9 @@ -1585,4 +1585,4 @@ - \ No newline at end of file + diff --git a/source/Irrlicht/Makefile b/source/Irrlicht/Makefile index 20458dc6..137be305 100644 --- a/source/Irrlicht/Makefile +++ b/source/Irrlicht/Makefile @@ -1,7 +1,7 @@ VERSION_MAJOR = 1 -VERSION_MINOR = 8 +VERSION_MINOR = 9 VERSION_RELEASE = 0 -# Irrlicht Engine 1.8.0 +# Irrlicht Engine 1.9.0 # Makefile for Linux # # To use, just run: diff --git a/source/Irrlicht/S4DVertex.h b/source/Irrlicht/S4DVertex.h index 3b80919b..49d4e87b 100644 --- a/source/Irrlicht/S4DVertex.h +++ b/source/Irrlicht/S4DVertex.h @@ -88,7 +88,7 @@ struct sCompressedVec4 void setColorf ( const video::SColorf & color ) { - argb = core::floor32 ( color.a * 255.f ) << 24 | + argb = core::floor32 ( color.a * 255.f ) << 24 | core::floor32 ( color.r * 255.f ) << 16 | core::floor32 ( color.g * 255.f ) << 8 | core::floor32 ( color.b * 255.f ); @@ -390,7 +390,7 @@ struct sVec3 inline void sCompressedVec4::setVec4 ( const sVec4 & v ) { - argb = core::floor32 ( v.x * 255.f ) << 24 | + argb = core::floor32 ( v.x * 255.f ) << 24 | core::floor32 ( v.y * 255.f ) << 16 | core::floor32 ( v.z * 255.f ) << 8 | core::floor32 ( v.w * 255.f ); diff --git a/source/Irrlicht/SoftwareDriver2_helper.h b/source/Irrlicht/SoftwareDriver2_helper.h index 263548b5..e74fdafc 100644 --- a/source/Irrlicht/SoftwareDriver2_helper.h +++ b/source/Irrlicht/SoftwareDriver2_helper.h @@ -16,7 +16,6 @@ #include "SMaterial.h" - namespace irr { @@ -300,10 +299,10 @@ REALINLINE u32 PixelAdd32 ( const u32 c2, const u32 c1) // 1 - Bit Alpha Blending inline u16 PixelBlend16 ( const u16 destination, const u16 source ) { - if((source & 0x8000) == 0x8000) - return source; // The source is visible, so use it. - else - return destination; // The source is transparent, so use the destination. + if((source & 0x8000) == 0x8000) + return source; // The source is visible, so use it. + else + return destination; // The source is transparent, so use the destination. } // 1 - Bit Alpha Blending 16Bit SIMD @@ -577,8 +576,8 @@ inline s32 roundFix ( const tFixPoint x ) // x in [0;1[ inline s32 f32_to_23Bits(const f32 x) { - f32 y = x + 1.f; - return IR(y) & 0x7FFFFF; // last 23 bits + f32 y = x + 1.f; + return IR(y) & 0x7FFFFF; // last 23 bits } /*! @@ -624,9 +623,9 @@ REALINLINE tVideoSample fix4_to_color ( const tFixPoint a, const tFixPoint r, co */ inline void color_to_fix ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) { - (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE ); - (tFixPointu&) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); - (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); } /*! @@ -634,10 +633,10 @@ inline void color_to_fix ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVide */ inline void color_to_fix ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) { - (tFixPointu&) a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE ); - (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE ); - (tFixPointu&) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); - (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + (tFixPointu&) a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE ); + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); } /*! @@ -645,9 +644,9 @@ inline void color_to_fix ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint & */ inline void color_to_fix1 ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) { - (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R + COLOR_MAX_LOG2 - FIX_POINT_PRE ); - (tFixPointu&) g = (t00 & MASK_G) >> ( SHIFT_G + COLOR_MAX_LOG2 - FIX_POINT_PRE ); - (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - COLOR_MAX_LOG2 ); + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) >> ( SHIFT_G + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - COLOR_MAX_LOG2 ); } /*! @@ -655,10 +654,10 @@ inline void color_to_fix1 ( tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVid */ inline void color_to_fix1 ( tFixPoint &a, tFixPoint &r, tFixPoint &g, tFixPoint &b, const tVideoSample t00 ) { - (tFixPointu&) a = (t00 & MASK_A) >> ( SHIFT_A + COLOR_MAX_LOG2 - FIX_POINT_PRE ); - (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R + COLOR_MAX_LOG2 - FIX_POINT_PRE ); - (tFixPointu&) g = (t00 & MASK_G) >> ( SHIFT_G + COLOR_MAX_LOG2 - FIX_POINT_PRE ); - (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - COLOR_MAX_LOG2 ); + (tFixPointu&) a = (t00 & MASK_A) >> ( SHIFT_A + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) r = (t00 & MASK_R) >> ( SHIFT_R + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) g = (t00 & MASK_G) >> ( SHIFT_G + COLOR_MAX_LOG2 - FIX_POINT_PRE ); + (tFixPointu&) b = (t00 & MASK_B) << ( FIX_POINT_PRE - COLOR_MAX_LOG2 ); } @@ -676,15 +675,15 @@ struct fp24 fp24 ( const f32 f ) { - f32 y = f + 1.f; - v = ((u32&)y) & 0x7FFFFF; // last 23 bits + f32 y = f + 1.f; + v = ((u32&)y) & 0x7FFFFF; // last 23 bits } void operator=(const f32 f ) { - f32 y = f + 1.f; - v = ((u32&)y) & 0x7FFFFF; // last 23 bits - } + f32 y = f + 1.f; + v = ((u32&)y) & 0x7FFFFF; // last 23 bits + } void operator+=(const fp24 &other ) { @@ -743,16 +742,15 @@ inline void getTexel_fix ( tFixPoint &r, tFixPoint &g, tFixPoint &b, tVideoSample t00; t00 = *((tVideoSample*)( (u8*) t->data + ofs )); - r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); - g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); - b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); } // get video sample to fixpoint REALINLINE void getTexel_fix ( tFixPoint &a, - const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty - ) + const sInternalTexture * t, const tFixPointu tx, const tFixPointu ty) { u32 ofs; @@ -763,7 +761,7 @@ REALINLINE void getTexel_fix ( tFixPoint &a, tVideoSample t00; t00 = *((tVideoSample*)( (u8*) t->data + ofs )); - a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE); + a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE); } @@ -792,9 +790,9 @@ inline void getSample_texture_dither ( tFixPoint &r, tFixPoint &g, tFixPoint &b, // texel const tVideoSample t00 = *((tVideoSample*)( (u8*) t->data + ofs )); - (tFixPointu &) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); - (tFixPointu &) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); - (tFixPointu &) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + (tFixPointu &) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + (tFixPointu &) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu &) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); } @@ -817,9 +815,9 @@ inline void getSample_texture ( tFixPoint &r, tFixPoint &g, tFixPoint &b, // texel const tVideoSample t00 = *((tVideoSample*)( (u8*) t->data + ofs )); - (tFixPointu &) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); - (tFixPointu &) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); - (tFixPointu &) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + (tFixPointu &) r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + (tFixPointu &) g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu &) b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); } inline void getSample_texture ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tFixPointu &b, @@ -834,10 +832,10 @@ inline void getSample_texture ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tFi // texel const tVideoSample t00 = *((tVideoSample*)( (u8*) t->data + ofs )); - (tFixPointu &)a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE); - (tFixPointu &)r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); - (tFixPointu &)g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); - (tFixPointu &)b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); + (tFixPointu &)a = (t00 & MASK_A) >> ( SHIFT_A - FIX_POINT_PRE); + (tFixPointu &)r = (t00 & MASK_R) >> ( SHIFT_R - FIX_POINT_PRE); + (tFixPointu &)g = (t00 & MASK_G) << ( FIX_POINT_PRE - SHIFT_G ); + (tFixPointu &)b = (t00 & MASK_B) << ( FIX_POINT_PRE - SHIFT_B ); } @@ -858,9 +856,9 @@ REALINLINE void getSample_linear ( tFixPointu &r, tFixPointu &g, tFixPointu &b, tVideoSample t00; t00 = *((tVideoSample*)( (u8*) t->data + ofs )); - r = (t00 & MASK_R) >> SHIFT_R; - g = (t00 & MASK_G) >> SHIFT_G; - b = (t00 & MASK_B); + r = (t00 & MASK_R) >> SHIFT_R; + g = (t00 & MASK_G) >> SHIFT_G; + b = (t00 & MASK_B); } // get Sample bilinear @@ -889,16 +887,24 @@ REALINLINE void getSample_texture ( tFixPoint &r, tFixPoint &g, tFixPoint &b, o3 = ( (tx+FIX_POINT_ONE) & t->textureXMask ) >> ( FIX_POINT_PRE - VIDEO_SAMPLE_GRANULARITY ); t00 = *((tVideoSample*)( (u8*) t->data + (o0 | o2 ) )); - r00 = (t00 & MASK_R) >> SHIFT_R; g00 = (t00 & MASK_G) >> SHIFT_G; b00 = (t00 & MASK_B); + r00 = (t00 & MASK_R) >> SHIFT_R; + g00 = (t00 & MASK_G) >> SHIFT_G; + b00 = (t00 & MASK_B); t00 = *((tVideoSample*)( (u8*) t->data + (o0 | o3 ) )); - r10 = (t00 & MASK_R) >> SHIFT_R; g10 = (t00 & MASK_G) >> SHIFT_G; b10 = (t00 & MASK_B); + r10 = (t00 & MASK_R) >> SHIFT_R; + g10 = (t00 & MASK_G) >> SHIFT_G; + b10 = (t00 & MASK_B); t00 = *((tVideoSample*)( (u8*) t->data + (o1 | o2 ) )); - r01 = (t00 & MASK_R) >> SHIFT_R; g01 = (t00 & MASK_G) >> SHIFT_G; b01 = (t00 & MASK_B); + r01 = (t00 & MASK_R) >> SHIFT_R; + g01 = (t00 & MASK_G) >> SHIFT_G; + b01 = (t00 & MASK_B); t00 = *((tVideoSample*)( (u8*) t->data + (o1 | o3 ) )); - r11 = (t00 & MASK_R) >> SHIFT_R; g11 = (t00 & MASK_G) >> SHIFT_G; b11 = (t00 & MASK_B); + r11 = (t00 & MASK_R) >> SHIFT_R; + g11 = (t00 & MASK_G) >> SHIFT_G; + b11 = (t00 & MASK_B); #endif @@ -945,10 +951,10 @@ REALINLINE void getSample_linear ( tFixPointu &a, tFixPointu &r, tFixPointu &g, tVideoSample t00; t00 = *((tVideoSample*)( (u8*) t->data + ofs )); - a = (t00 & MASK_A) >> SHIFT_A; - r = (t00 & MASK_R) >> SHIFT_R; - g = (t00 & MASK_G) >> SHIFT_G; - b = (t00 & MASK_B); + a = (t00 & MASK_A) >> SHIFT_A; + r = (t00 & MASK_R) >> SHIFT_R; + g = (t00 & MASK_G) >> SHIFT_G; + b = (t00 & MASK_B); } // get Sample bilinear