You need to sign in or sign up before continuing.
Commit 2b067aab authored by hybrid's avatar hybrid

Some more whitespace adjustment.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4502 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 9f7227b7
......@@ -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
};
......
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -40,9 +40,9 @@ public:
//! Sets the widths of the top and bottom edges of the billboard independently.
virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth);
//! gets the size of the billboard
virtual const core::dimension2d<f32>& getSize() const;
//! gets the size of the billboard
virtual const core::dimension2d<f32>& getSize() const;
//! Gets the widths of the top and bottom edges of the billboard.
virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const;
......
......@@ -465,7 +465,7 @@ static void RenderLine16_Blend(video::IImage *t,
d -= c;
}
run -= 1;
} while (run>=0);
} while (run>=0);
t->unlock();
}
......@@ -1060,7 +1060,7 @@ static inline tExecuteBlit getBlitter2( eBlitter operation,const video::IImage *
// bounce clipping to texture
inline void setClip ( AbsRectangle &out, const core::rect<s32> *clip,
const video::IImage * tex, s32 passnative )
const video::IImage * tex, s32 passnative )
{
if ( clip && 0 == tex && passnative )
{
......@@ -1228,7 +1228,7 @@ static void drawRectangle(video::IImage* img, const core::rect<s32>& rect, const
//! draws a line from to with color
static void drawLine(video::IImage* img, const core::position2d<s32>& from,
const core::position2d<s32>& to, const video::SColor &color)
const core::position2d<s32>& to, const video::SColor &color)
{
AbsRectangle clip;
GetClip(clip, img);
......
......@@ -106,8 +106,8 @@ namespace video
IDirect3DIndexBuffer9* indexBuffer;
u32 vertexBufferSize;
u32 indexBufferSize;
};
u32 indexBufferSize;
};
bool updateVertexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer);
bool updateIndexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer);
......
......@@ -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,
......
......@@ -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);
......
......@@ -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:
......
......@@ -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:
......
......@@ -50,18 +50,18 @@ namespace gui
//! Sets whether the window is draggable
virtual void setDraggable(bool draggable);
//! Set if the window background will be drawn
virtual void setDrawBackground(bool draw);
//! Set if the window background will be drawn
virtual void setDrawBackground(bool draw);
//! Get if the window background will be drawn
virtual bool getDrawBackground() const;
//! Get if the window background will be drawn
virtual bool getDrawBackground() const;
//! Set if the window titlebar will be drawn
//! Note: If the background is not drawn, then the titlebar is automatically also not drawn
virtual void setDrawTitlebar(bool draw);
//! Set if the window titlebar will be drawn
//! Note: If the background is not drawn, then the titlebar is automatically also not drawn
virtual void setDrawTitlebar(bool draw);
//! Get if the window titlebar will be drawn
virtual bool getDrawTitlebar() const;
//! Get if the window titlebar will be drawn
virtual bool getDrawTitlebar() const;
//! Returns the rectangle of the drawable area (without border and without titlebar)
virtual core::rect<s32> getClientRect() const;
......@@ -85,8 +85,8 @@ namespace gui
core::position2d<s32> DragStart;
bool Dragging, IsDraggable;
bool DrawBackground;
bool DrawTitlebar;
bool DrawBackground;
bool DrawTitlebar;
bool IsActive;
};
......
......@@ -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
......
......@@ -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;
};
......
......@@ -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
......
......@@ -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<s32> CursorPos;
core::dimension2d<u32> WindowSize;
core::dimension2d<f32> InvWindowSize;
bool IsVisible,
UseReferenceRect;
bool IsVisible;
bool UseReferenceRect;
core::rect<s32> ReferenceRect;
};
......
......@@ -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);
}
......
......@@ -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<SJoystickInfo> & joystickInfo);
......
......@@ -140,8 +140,8 @@ namespace irr
BOOL gotCursorInfo = GetCursorInfo(&info);
while ( gotCursorInfo )
{
if ( (visible && info.flags == CURSOR_SHOWING) // visible
|| (!visible && info.flags == 0 ) ) // hidden
if ( (visible && info.flags == CURSOR_SHOWING) // visible
|| (!visible && info.flags == 0 ) ) // hidden
{
break;
}
......@@ -190,7 +190,7 @@ namespace irr
if (UseReferenceRect)
{
SetCursorPos(ReferenceRect.UpperLeftCorner.X + x,
ReferenceRect.UpperLeftCorner.Y + y);
ReferenceRect.UpperLeftCorner.Y + y);
}
else
{
......@@ -263,23 +263,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 +298,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 +339,7 @@ namespace irr
}
}
CIrrDeviceWin32* Device;
CIrrDeviceWin32* Device;
core::position2d<s32> CursorPos;
core::dimension2d<u32> WindowSize;
core::dimension2d<f32> InvWindowSize;
......
......@@ -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
{
......@@ -217,7 +217,7 @@ namespace irr
InvWindowSize.Width = 1.0f / size.Width;
else
InvWindowSize.Width = 0.f;
if (size.Height!=0)
InvWindowSize.Height = 1.0f / size.Height;
else
......
......@@ -15,7 +15,7 @@ namespace irr
namespace io
{
/*!
/*!
Class for reading from memory.
*/
class CMemoryReadFile : public IReadFile
......
......@@ -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.
......
......@@ -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
};
......
......@@ -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_
......@@ -475,7 +475,7 @@ namespace video
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;
bool DepthMask;
bool DepthTest;
GLenum MatrixMode;
GLenum ActiveTexture;
GLenum ClientActiveTexture;
GLenum ClientActiveTexture;
const ITexture* Texture[MATERIAL_MAX_TEXTURES];
bool TextureFixedPipeline[MATERIAL_MAX_TEXTURES];
};
const ITexture* Texture[MATERIAL_MAX_TEXTURES];
bool TextureFixedPipeline[MATERIAL_MAX_TEXTURES];
};
} // end namespace video
} // end namespace irr
......
......@@ -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:
......@@ -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;
}
};
......
......@@ -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.
......
......@@ -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
{
......
......@@ -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:
......
......@@ -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,
......
......@@ -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;
......
......@@ -258,10 +258,8 @@ namespace scene
core::aabbox3df BoundingBox;
core::array<f64> LODDistanceThreshold;
};
virtual void preRenderCalculationsIfNeeded();
virtual void preRenderCalculationsIfNeeded();
virtual void preRenderLODCalculations();
virtual void preRenderIndicesCalculations();
......
......@@ -82,8 +82,10 @@ namespace scene
video::SColor FootColor; // Color at the source
video::SColor TailColor; // Color at the end.
core::vector3df LightDimensions; // LightDimensions.Y Distance of shooting -- Length of beams
// LightDimensions.X and LightDimensions.Z determine the size/dimension of the plane
// LightDimensions.Y Distance of shooting -- Length of beams
// LightDimensions.X and LightDimensions.Z determine the
// size/dimension of the plane
core::vector3df LightDimensions;
};
} // end namespace scene
......
......@@ -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];
......@@ -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
......
......@@ -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 );
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment