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