Commit 2a5a21fc authored by bitplane's avatar bitplane

Reset all line endings to Windows-style CRLF

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2268 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 22bf412c
// Copyright (C) 2002-2009 Nikolaus Gebhardt // Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __E_DRIVER_FEATURES_H_INCLUDED__ #ifndef __E_DRIVER_FEATURES_H_INCLUDED__
#define __E_DRIVER_FEATURES_H_INCLUDED__ #define __E_DRIVER_FEATURES_H_INCLUDED__
namespace irr namespace irr
{ {
namespace video namespace video
{ {
//! enumeration for querying features of the video driver. //! enumeration for querying features of the video driver.
enum E_VIDEO_DRIVER_FEATURE enum E_VIDEO_DRIVER_FEATURE
{ {
//! Is driver able to render to a surface? //! Is driver able to render to a surface?
EVDF_RENDER_TO_TARGET = 0, EVDF_RENDER_TO_TARGET = 0,
//! Is hardeware transform and lighting supported? //! Is hardeware transform and lighting supported?
EVDF_HARDWARE_TL, EVDF_HARDWARE_TL,
//! Are multiple textures per material possible? //! Are multiple textures per material possible?
EVDF_MULTITEXTURE, EVDF_MULTITEXTURE,
//! Is driver able to render with a bilinear filter applied? //! Is driver able to render with a bilinear filter applied?
EVDF_BILINEAR_FILTER, EVDF_BILINEAR_FILTER,
//! Can the driver handle mip maps? //! Can the driver handle mip maps?
EVDF_MIP_MAP, EVDF_MIP_MAP,
//! Can the driver update mip maps automatically? //! Can the driver update mip maps automatically?
EVDF_MIP_MAP_AUTO_UPDATE, EVDF_MIP_MAP_AUTO_UPDATE,
//! Are stencilbuffers switched on and does the device support stencil buffers? //! Are stencilbuffers switched on and does the device support stencil buffers?
EVDF_STENCIL_BUFFER, EVDF_STENCIL_BUFFER,
//! Is Vertex Shader 1.1 supported? //! Is Vertex Shader 1.1 supported?
EVDF_VERTEX_SHADER_1_1, EVDF_VERTEX_SHADER_1_1,
//! Is Vertex Shader 2.0 supported? //! Is Vertex Shader 2.0 supported?
EVDF_VERTEX_SHADER_2_0, EVDF_VERTEX_SHADER_2_0,
//! Is Vertex Shader 3.0 supported? //! Is Vertex Shader 3.0 supported?
EVDF_VERTEX_SHADER_3_0, EVDF_VERTEX_SHADER_3_0,
//! Is Pixel Shader 1.1 supported? //! Is Pixel Shader 1.1 supported?
EVDF_PIXEL_SHADER_1_1, EVDF_PIXEL_SHADER_1_1,
//! Is Pixel Shader 1.2 supported? //! Is Pixel Shader 1.2 supported?
EVDF_PIXEL_SHADER_1_2, EVDF_PIXEL_SHADER_1_2,
//! Is Pixel Shader 1.3 supported? //! Is Pixel Shader 1.3 supported?
EVDF_PIXEL_SHADER_1_3, EVDF_PIXEL_SHADER_1_3,
//! Is Pixel Shader 1.4 supported? //! Is Pixel Shader 1.4 supported?
EVDF_PIXEL_SHADER_1_4, EVDF_PIXEL_SHADER_1_4,
//! Is Pixel Shader 2.0 supported? //! Is Pixel Shader 2.0 supported?
EVDF_PIXEL_SHADER_2_0, EVDF_PIXEL_SHADER_2_0,
//! Is Pixel Shader 3.0 supported? //! Is Pixel Shader 3.0 supported?
EVDF_PIXEL_SHADER_3_0, EVDF_PIXEL_SHADER_3_0,
//! Are ARB vertex programs v1.0 supported? //! Are ARB vertex programs v1.0 supported?
EVDF_ARB_VERTEX_PROGRAM_1, EVDF_ARB_VERTEX_PROGRAM_1,
//! Are ARB fragment programs v1.0 supported? //! Are ARB fragment programs v1.0 supported?
EVDF_ARB_FRAGMENT_PROGRAM_1, EVDF_ARB_FRAGMENT_PROGRAM_1,
//! Is GLSL supported? //! Is GLSL supported?
EVDF_ARB_GLSL, EVDF_ARB_GLSL,
//! Is HLSL supported? //! Is HLSL supported?
EVDF_HLSL, EVDF_HLSL,
//! Are non-square textures supported? //! Are non-square textures supported?
EVDF_TEXTURE_NSQUARE, EVDF_TEXTURE_NSQUARE,
//! Are non-power-of-two textures supported? //! Are non-power-of-two textures supported?
EVDF_TEXTURE_NPOT, EVDF_TEXTURE_NPOT,
//! Are framebuffer objects supported? //! Are framebuffer objects supported?
EVDF_FRAMEBUFFER_OBJECT, EVDF_FRAMEBUFFER_OBJECT,
//! Are vertex buffer objects supported? //! Are vertex buffer objects supported?
EVDF_VERTEX_BUFFER_OBJECT, EVDF_VERTEX_BUFFER_OBJECT,
//! Supports Alpha To Coverage //! Supports Alpha To Coverage
EVDF_ALPHA_TO_COVERAGE, EVDF_ALPHA_TO_COVERAGE,
//! Supports Color masks (disabling color planes in output) //! Supports Color masks (disabling color planes in output)
EVDF_COLOR_MASK, EVDF_COLOR_MASK,
//! Only used for counting the elements of this enum //! Only used for counting the elements of this enum
EVDF_COUNT EVDF_COUNT
}; };
} // end namespace video } // end namespace video
} // end namespace irr } // end namespace irr
#endif #endif
// Copyright (C) 2002-2009 Nikolaus Gebhardt // Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __E_HARDWARE_BUFFER_FLAGS_INCLUDED__ #ifndef __E_HARDWARE_BUFFER_FLAGS_INCLUDED__
#define __E_HARDWARE_BUFFER_FLAGS_INCLUDED__ #define __E_HARDWARE_BUFFER_FLAGS_INCLUDED__
namespace irr namespace irr
{ {
namespace scene namespace scene
{ {
enum E_HARDWARE_MAPPING enum E_HARDWARE_MAPPING
{ {
//! Don't load in hardware //! Don't load in hardware
EHM_NEVER=0, EHM_NEVER=0,
//! Rarely changed //! Rarely changed
EHM_STATIC, EHM_STATIC,
//! Sometimes changed //! Sometimes changed
EHM_DYNAMIC, EHM_DYNAMIC,
//! Always changed //! Always changed
EHM_STREAM EHM_STREAM
}; };
enum E_BUFFER_TYPE enum E_BUFFER_TYPE
{ {
EBT_NONE=0, EBT_NONE=0,
EBT_VERTEX, EBT_VERTEX,
EBT_INDEX, EBT_INDEX,
EBT_VERTEX_AND_INDEX EBT_VERTEX_AND_INDEX
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
#endif #endif
// Copyright (C) 2002-2009 Nikolaus Gebhardt // Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __E_TERRAIN_ELEMENTS_H__ #ifndef __E_TERRAIN_ELEMENTS_H__
#define __E_TERRAIN_ELEMENTS_H__ #define __E_TERRAIN_ELEMENTS_H__
namespace irr namespace irr
{ {
namespace scene namespace scene
{ {
//! enumeration for patch sizes specifying the size of patches in the TerrainSceneNode //! enumeration for patch sizes specifying the size of patches in the TerrainSceneNode
enum E_TERRAIN_PATCH_SIZE enum E_TERRAIN_PATCH_SIZE
{ {
//! patch size of 9, at most, use 4 levels of detail with this patch size. //! patch size of 9, at most, use 4 levels of detail with this patch size.
ETPS_9 = 9, ETPS_9 = 9,
//! patch size of 17, at most, use 5 levels of detail with this patch size. //! patch size of 17, at most, use 5 levels of detail with this patch size.
ETPS_17 = 17, ETPS_17 = 17,
//! patch size of 33, at most, use 6 levels of detail with this patch size. //! patch size of 33, at most, use 6 levels of detail with this patch size.
ETPS_33 = 33, ETPS_33 = 33,
//! patch size of 65, at most, use 7 levels of detail with this patch size. //! patch size of 65, at most, use 7 levels of detail with this patch size.
ETPS_65 = 65, ETPS_65 = 65,
//! patch size of 129, at most, use 8 levels of detail with this patch size. //! patch size of 129, at most, use 8 levels of detail with this patch size.
ETPS_129 = 129 ETPS_129 = 129
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
#endif #endif
// Copyright (C) 2006-2009 Michael Zeilfelder // Copyright (C) 2006-2009 Michael Zeilfelder
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __I_GUI_SPIN_BOX_H_INCLUDED__ #ifndef __I_GUI_SPIN_BOX_H_INCLUDED__
#define __I_GUI_SPIN_BOX_H_INCLUDED__ #define __I_GUI_SPIN_BOX_H_INCLUDED__
#include "IGUIElement.h" #include "IGUIElement.h"
namespace irr namespace irr
{ {
namespace gui namespace gui
{ {
class IGUIEditBox; class IGUIEditBox;
//! Single line edit box + spin buttons //! Single line edit box + spin buttons
class IGUISpinBox : public IGUIElement class IGUISpinBox : public IGUIElement
{ {
public: public:
//! constructor //! constructor
IGUISpinBox(IGUIEnvironment* environment, IGUIElement* parent, IGUISpinBox(IGUIEnvironment* environment, IGUIElement* parent,
s32 id, core::rect<s32> rectangle) s32 id, core::rect<s32> rectangle)
: IGUIElement(EGUIET_SPIN_BOX, environment, parent, id, rectangle) {} : IGUIElement(EGUIET_SPIN_BOX, environment, parent, id, rectangle) {}
//! Access the edit box used in the spin control //! Access the edit box used in the spin control
virtual IGUIEditBox* getEditBox() const = 0; virtual IGUIEditBox* getEditBox() const = 0;
//! set the current value of the spinbox //! set the current value of the spinbox
/** \param val: value to be set in the spinbox */ /** \param val: value to be set in the spinbox */
virtual void setValue(f32 val) = 0; virtual void setValue(f32 val) = 0;
//! Get the current value of the spinbox //! Get the current value of the spinbox
virtual f32 getValue() const = 0; virtual f32 getValue() const = 0;
//! set the range of values which can be used in the spinbox //! set the range of values which can be used in the spinbox
/** \param min: minimum value /** \param min: minimum value
\param max: maximum value */ \param max: maximum value */
virtual void setRange(f32 min, f32 max) = 0; virtual void setRange(f32 min, f32 max) = 0;
//! get the minimum value which can be used in the spinbox //! get the minimum value which can be used in the spinbox
virtual f32 getMin() const = 0; virtual f32 getMin() const = 0;
//! get the maximum value which can be used in the spinbox //! get the maximum value which can be used in the spinbox
virtual f32 getMax() const = 0; virtual f32 getMax() const = 0;
//! Step size by which values are changed when pressing the spinbuttons //! Step size by which values are changed when pressing the spinbuttons
/** The step size also determines the number of decimal places to display /** The step size also determines the number of decimal places to display
\param step: stepsize used for value changes when pressing spinbuttons */ \param step: stepsize used for value changes when pressing spinbuttons */
virtual void setStepSize(f32 step=1.f) = 0; virtual void setStepSize(f32 step=1.f) = 0;
//! Sets the number of decimal places to display. //! Sets the number of decimal places to display.
/** \param places: The number of decimal places to display, use -1 to reset */ /** \param places: The number of decimal places to display, use -1 to reset */
virtual void setDecimalPlaces(s32 places) = 0; virtual void setDecimalPlaces(s32 places) = 0;
//! get the current step size //! get the current step size
virtual f32 getStepSize() const = 0; virtual f32 getStepSize() const = 0;
}; };
} // end namespace gui } // end namespace gui
} // end namespace irr } // end namespace irr
#endif // __I_GUI_SPIN_BOX_H_INCLUDED__ #endif // __I_GUI_SPIN_BOX_H_INCLUDED__
// Copyright (C) 2002-2009 Nikolaus Gebhardt // Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
// //
// created by Dean Wadsworth aka Varmint Dec 31 2007 // created by Dean Wadsworth aka Varmint Dec 31 2007
#ifndef __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ #ifndef __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__
#define __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__ #define __I_VOLUME_LIGHT_SCENE_NODE_H_INCLUDED__
#include "ISceneNode.h" #include "ISceneNode.h"
namespace irr namespace irr
{ {
namespace scene namespace scene
{ {
class IMeshBuffer; class IMeshBuffer;
class IVolumeLightSceneNode : public ISceneNode class IVolumeLightSceneNode : public ISceneNode
{ {
public: public:
//! constructor //! constructor
IVolumeLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, IVolumeLightSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
const core::vector3df& position, const core::vector3df& position,
const core::vector3df& rotation, const core::vector3df& rotation,
const core::vector3df& scale) const core::vector3df& scale)
: ISceneNode(parent, mgr, id, position, rotation, scale) {}; : ISceneNode(parent, mgr, id, position, rotation, scale) {};
//! Returns type of the scene node //! Returns type of the scene node
virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; } virtual ESCENE_NODE_TYPE getType() const { return ESNT_CUBE; }
virtual void setSubDivideU (const u32 inU) =0; virtual void setSubDivideU (const u32 inU) =0;
virtual void setSubDivideV (const u32 inV) =0; virtual void setSubDivideV (const u32 inV) =0;
virtual u32 getSubDivideU () const =0; virtual u32 getSubDivideU () const =0;
virtual u32 getSubDivideV () const =0; virtual u32 getSubDivideV () const =0;
virtual void setFootColour(const video::SColor inColour) =0; virtual void setFootColour(const video::SColor inColour) =0;
virtual void setTailColour(const video::SColor inColour) =0; virtual void setTailColour(const video::SColor inColour) =0;
virtual video::SColor getFootColour () const =0; virtual video::SColor getFootColour () const =0;
virtual video::SColor getTailColour () const =0; virtual video::SColor getTailColour () const =0;
virtual IMeshBuffer * getMeshBuffer(void) const =0; virtual IMeshBuffer * getMeshBuffer(void) const =0;
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
#endif #endif
This diff is collapsed.
This diff is collapsed.
// Copyright (C) 2002-2009 Nikolaus Gebhardt // Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __IRR_CORE_UTIL_H_INCLUDED__ #ifndef __IRR_CORE_UTIL_H_INCLUDED__
#define __IRR_CORE_UTIL_H_INCLUDED__ #define __IRR_CORE_UTIL_H_INCLUDED__
#include "irrString.h" #include "irrString.h"
namespace irr namespace irr
{ {
namespace core namespace core
{ {
/*! \file irrxml.h /*! \file irrxml.h
\brief File containing useful basic utility functions \brief File containing useful basic utility functions
*/ */
// ----------- some basic quite often used string functions ----------------- // ----------- some basic quite often used string functions -----------------
//! search if a filename has a proper extension //! search if a filename has a proper extension
inline s32 isFileExtension ( const core::string<c16>& filename, inline s32 isFileExtension ( const core::string<c16>& filename,
const core::string<c16>& ext0, const core::string<c16>& ext0,
const core::string<c16>& ext1, const core::string<c16>& ext1,
const core::string<c16>& ext2 const core::string<c16>& ext2
) )
{ {
s32 extPos = filename.findLast ( '.' ); s32 extPos = filename.findLast ( '.' );
if ( extPos < 0 ) if ( extPos < 0 )
return 0; return 0;
extPos += 1; extPos += 1;
if ( filename.equals_substring_ignore_case ( ext0, extPos ) ) return 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 ( ext1, extPos ) ) return 2;
if ( filename.equals_substring_ignore_case ( ext2, extPos ) ) return 3; if ( filename.equals_substring_ignore_case ( ext2, extPos ) ) return 3;
return 0; return 0;
} }
//! search if a filename has a proper extension //! search if a filename has a proper extension
inline bool hasFileExtension ( const core::string<c16>& filename, inline bool hasFileExtension ( const core::string<c16>& filename,
const core::string<c16>& ext0, const core::string<c16>& ext0,
const core::string<c16>& ext1 = "", const core::string<c16>& ext1 = "",
const core::string<c16>& ext2 = "" const core::string<c16>& ext2 = ""
) )
{ {
return isFileExtension ( filename, ext0, ext1, ext2 ) > 0; return isFileExtension ( filename, ext0, ext1, ext2 ) > 0;
} }
//! cut the filename extension from a source string and stores in the dest string //! cut the filename extension from a source string and stores in the dest string
inline stringc& cutFilenameExtension ( stringc &dest, const stringc &source ) inline stringc& cutFilenameExtension ( stringc &dest, const stringc &source )
{ {
s32 endPos = source.findLast ( '.' ); s32 endPos = source.findLast ( '.' );
dest = source.subString ( 0, endPos < 0 ? source.size () : endPos ); dest = source.subString ( 0, endPos < 0 ? source.size () : endPos );
return dest; return dest;
} }
//! cut the filename extension from a source string and stores in the dest string //! cut the filename extension from a source string and stores in the dest string
inline stringw& cutFilenameExtension ( stringw &dest, const stringw &source ) inline stringw& cutFilenameExtension ( stringw &dest, const stringw &source )
{ {
s32 endPos = source.findLast ( '.' ); s32 endPos = source.findLast ( '.' );
dest = source.subString ( 0, endPos < 0 ? source.size () : endPos ); dest = source.subString ( 0, endPos < 0 ? source.size () : endPos );
return dest; return dest;
} }
//! get the filename extension from a string //! get the filename extension from a string
inline stringc& getFileNameExtension ( stringc &dest, const stringc &source ) inline stringc& getFileNameExtension ( stringc &dest, const stringc &source )
{ {
s32 endPos = source.findLast ( '.' ); s32 endPos = source.findLast ( '.' );
if ( endPos < 0 ) if ( endPos < 0 )
dest = ""; dest = "";
else else
dest = source.subString ( endPos, source.size () ); dest = source.subString ( endPos, source.size () );
return dest; return dest;
} }
//! delete path from filename //! delete path from filename
inline core::stringw& deletePathFromFilename(core::stringw& filename) inline core::stringw& deletePathFromFilename(core::stringw& filename)
{ {
// delete path from filename // delete path from filename
const wchar_t *s = filename.c_str(); const wchar_t *s = filename.c_str();
const wchar_t* p = s + filename.size(); const wchar_t* p = s + filename.size();
// search for path separator or beginning // search for path separator or beginning
while ( *p != '/' && *p != '\\' && p != s ) while ( *p != '/' && *p != '\\' && p != s )
p--; p--;
if ( p != s ) if ( p != s )
{ {
++p; ++p;
filename = p; filename = p;
} }
return filename; return filename;
} }
//! delete path from filename //! delete path from filename
inline core::stringc& deletePathFromFilename(core::stringc& filename) inline core::stringc& deletePathFromFilename(core::stringc& filename)
{ {
// delete path from filename // delete path from filename
const c8 *s = filename.c_str(); const c8 *s = filename.c_str();
const c8* p = s + filename.size(); const c8* p = s + filename.size();
// search for path separator or beginning // search for path separator or beginning
while ( *p != '/' && *p != '\\' && p != s ) while ( *p != '/' && *p != '\\' && p != s )
p--; p--;
if ( p != s ) if ( p != s )
{ {
++p; ++p;
filename = p; filename = p;
} }
return filename; return filename;
} }
//! trim paths //! trim paths
inline core::string<c16>& deletePathFromPath(core::string<c16>& filename, s32 pathCount) inline core::string<c16>& deletePathFromPath(core::string<c16>& filename, s32 pathCount)
{ {
// delete path from filename // delete path from filename
s32 i = filename.size(); s32 i = filename.size();
// search for path separator or beginning // search for path separator or beginning
while ( i ) while ( i )
{ {
if ( filename[i] == '/' || filename[i] == '\\' ) if ( filename[i] == '/' || filename[i] == '\\' )
{ {
if ( --pathCount <= 0 ) if ( --pathCount <= 0 )
break; break;
} }
i -= 1; i -= 1;
} }
if ( i ) if ( i )
{ {
filename [ i + 1 ] = 0; filename [ i + 1 ] = 0;
filename.validate(); filename.validate();
} }
return filename; return filename;
} }
//! gets the last char of a string or null //! gets the last char of a string or null
inline c16 lastChar( const core::string<c16>& s) inline c16 lastChar( const core::string<c16>& s)
{ {
return s.size() ? s [ s.size() - 1 ] : 0; return s.size() ? s [ s.size() - 1 ] : 0;
} }
//! looks if file is in the same directory of path. returns offset of directory. //! looks if file is in the same directory of path. returns offset of directory.
//! 0 means in same directory. 1 means file is direct child of path //! 0 means in same directory. 1 means file is direct child of path
inline s32 isInSameDirectory ( const core::string<c16>& path, const core::string<c16>& file ) inline s32 isInSameDirectory ( const core::string<c16>& path, const core::string<c16>& file )
{ {
s32 subA = 0; s32 subA = 0;
s32 subB = 0; s32 subB = 0;
s32 pos; s32 pos;
if ( path.size() && !path.equalsn ( file, path.size() ) ) if ( path.size() && !path.equalsn ( file, path.size() ) )
return -1; return -1;
pos = 0; pos = 0;
while ( (pos = path.findNext ( '/', pos )) >= 0 ) while ( (pos = path.findNext ( '/', pos )) >= 0 )
{ {
subA += 1; subA += 1;
pos += 1; pos += 1;
} }
pos = 0; pos = 0;
while ( (pos = file.findNext ( '/', pos )) >= 0 ) while ( (pos = file.findNext ( '/', pos )) >= 0 )
{ {
subB += 1; subB += 1;
pos += 1; pos += 1;
} }
return subB - subA; return subB - subA;
} }
//! some standard function ( to remove dependencies ) //! some standard function ( to remove dependencies )
#undef isdigit #undef isdigit
#undef isspace #undef isspace
#undef isupper #undef isupper
inline s32 isdigit(s32 c) { return c >= '0' && c <= '9'; } inline s32 isdigit(s32 c) { return c >= '0' && c <= '9'; }
inline s32 isspace(s32 c) { return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; } inline s32 isspace(s32 c) { return c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v'; }
inline s32 isupper(s32 c) { return c >= 'A' && c <= 'Z'; } inline s32 isupper(s32 c) { return c >= 'A' && c <= 'Z'; }
} // end namespace core } // end namespace core
} // end namespace irr } // end namespace irr
#endif #endif
This diff is collapsed.
This diff is collapsed.
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de // written by Reinhard Ostermeier, reinhard@nospam.r-ostermeier.de
#ifndef __C_GUI_IMAGE_LIST_H_INCLUDED__ #ifndef __C_GUI_IMAGE_LIST_H_INCLUDED__
#define __C_GUI_IMAGE_LIST_H_INCLUDED__ #define __C_GUI_IMAGE_LIST_H_INCLUDED__
#include "IGUIImageList.h" #include "IGUIImageList.h"
#include "IVideoDriver.h" #include "IVideoDriver.h"
namespace irr namespace irr
{ {
namespace gui namespace gui
{ {
class CGUIImageList : public IGUIImageList class CGUIImageList : public IGUIImageList
{ {
public: public:
//! constructor //! constructor
CGUIImageList( video::IVideoDriver* Driver ); CGUIImageList( video::IVideoDriver* Driver );
//! destructor //! destructor
virtual ~CGUIImageList(); virtual ~CGUIImageList();
//! Creates the image list from texture. //! Creates the image list from texture.
//! \param texture: The texture to use //! \param texture: The texture to use
//! \param imageSize: Size of a single image //! \param imageSize: Size of a single image
//! \param useAlphaChannel: true if the alpha channel from the texture should be used //! \param useAlphaChannel: true if the alpha channel from the texture should be used
//! \return //! \return
//! true if the image list was created //! true if the image list was created
bool createImageList( bool createImageList(
video::ITexture* texture, video::ITexture* texture,
core::dimension2d<s32> imageSize, core::dimension2d<s32> imageSize,
bool useAlphaChannel ); bool useAlphaChannel );
//! Draws an image and clips it to the specified rectangle if wanted //! Draws an image and clips it to the specified rectangle if wanted
//! \param index: Index of the image //! \param index: Index of the image
//! \param destPos: Position of the image to draw //! \param destPos: Position of the image to draw
...@@ -50,19 +50,19 @@ public: ...@@ -50,19 +50,19 @@ public:
//! \return Returns the size of the images in the list. //! \return Returns the size of the images in the list.
virtual core::dimension2d<s32> getImageSize() const virtual core::dimension2d<s32> getImageSize() const
{ return ImageSize; } { return ImageSize; }
private: private:
video::IVideoDriver* Driver; video::IVideoDriver* Driver;
video::ITexture* Texture; video::ITexture* Texture;
s32 ImageCount; s32 ImageCount;
core::dimension2d<s32> ImageSize; core::dimension2d<s32> ImageSize;
s32 ImagesPerRow; s32 ImagesPerRow;
bool UseAlphaChannel; bool UseAlphaChannel;
}; };
} // end namespace gui } // end namespace gui
} // end namespace irr } // end namespace irr
#endif #endif
...@@ -689,6 +689,9 @@ s32 CGUITabControl::getTabExtraWidth() const ...@@ -689,6 +689,9 @@ s32 CGUITabControl::getTabExtraWidth() const
void CGUITabControl::recalculateScrollBar() void CGUITabControl::recalculateScrollBar()
{ {
if (!UpButton || !DownButton)
return;
ScrollControl = needScrollControl() || CurrentScrollTabIndex > 0; ScrollControl = needScrollControl() || CurrentScrollTabIndex > 0;
if (ScrollControl) if (ScrollControl)
...@@ -702,8 +705,8 @@ void CGUITabControl::recalculateScrollBar() ...@@ -702,8 +705,8 @@ void CGUITabControl::recalculateScrollBar()
DownButton->setVisible( false ); DownButton->setVisible( false );
} }
this->bringToFront( UpButton ); bringToFront( UpButton );
this->bringToFront( DownButton ); bringToFront( DownButton );
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -24,10 +24,8 @@ namespace scene ...@@ -24,10 +24,8 @@ namespace scene
public: public:
//! constructor //! constructor
CQ3LevelMesh( io::IFileSystem* fs, CQ3LevelMesh(io::IFileSystem* fs, scene::ISceneManager* smgr,
scene::ISceneManager* smgr, const quake3::Q3LevelLoadParameter &loadParam);
const quake3::Q3LevelLoadParameter &loadParam
);
//! destructor //! destructor
virtual ~CQ3LevelMesh(); virtual ~CQ3LevelMesh();
......
// Copyright (C) 2002-2009 Nikolaus Gebhardt // Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine". // This file is part of the "Irrlicht Engine".
// For conditions of distribution and use, see copyright notice in irrlicht.h // For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ #ifndef __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__
#define __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__ #define __C_SCENE_NODE_ANIMATOR_DELETE_H_INCLUDED__
#include "ISceneNodeAnimatorFinishing.h" #include "ISceneNodeAnimatorFinishing.h"
namespace irr namespace irr
{ {
namespace scene namespace scene
{ {
class CSceneNodeAnimatorDelete : public ISceneNodeAnimatorFinishing class CSceneNodeAnimatorDelete : public ISceneNodeAnimatorFinishing
{ {
public: public:
//! constructor //! constructor
CSceneNodeAnimatorDelete(ISceneManager* manager, u32 when); CSceneNodeAnimatorDelete(ISceneManager* manager, u32 when);
//! destructor //! destructor
virtual ~CSceneNodeAnimatorDelete(); virtual ~CSceneNodeAnimatorDelete();
//! animates a scene node //! animates a scene node
virtual void animateNode(ISceneNode* node, u32 timeMs); virtual void animateNode(ISceneNode* node, u32 timeMs);
//! Returns type of the scene node animator //! Returns type of the scene node animator
virtual ESCENE_NODE_ANIMATOR_TYPE getType() const virtual ESCENE_NODE_ANIMATOR_TYPE getType() const
{ {
return ESNAT_DELETION; return ESNAT_DELETION;
} }
//! Creates a clone of this animator. //! Creates a clone of this animator.
/** Please note that you will have to drop /** Please note that you will have to drop
(IReferenceCounted::drop()) the returned pointer after calling (IReferenceCounted::drop()) the returned pointer after calling
this. */ this. */
virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0); virtual ISceneNodeAnimator* createClone(ISceneNode* node, ISceneManager* newManager=0);
private: private:
ISceneManager* SceneManager; ISceneManager* SceneManager;
}; };
} // end namespace scene } // end namespace scene
} // end namespace irr } // end namespace irr
#endif #endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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