Merge from trunk, revisions 4495-4510. Mostly whitespace and indentation fixes; mipmap fixes
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@4511 dfc29bdd-3216-0410-991c-e03cc46cb475master
parent
875d0cfac8
commit
aec5a3afae
|
@ -29,7 +29,7 @@ namespace scene
|
|||
"box", // camera box against node box
|
||||
"frustum_box", // camera frustum against node box
|
||||
"frustum_sphere", // camera frustum against node sphere
|
||||
"occ_query", // occlusion query
|
||||
"occ_query", // occlusion query
|
||||
0
|
||||
};
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace scene
|
|||
enum ESCENE_NODE_TYPE
|
||||
{
|
||||
//! of type CSceneManager (note that ISceneManager is not(!) an ISceneNode)
|
||||
ESNT_SCENE_MANAGER = MAKE_IRR_ID('s','m','n','g'),
|
||||
ESNT_SCENE_MANAGER = MAKE_IRR_ID('s','m','n','g'),
|
||||
|
||||
//! simple cube scene node
|
||||
ESNT_CUBE = MAKE_IRR_ID('c','u','b','e'),
|
||||
|
|
|
@ -80,17 +80,17 @@ namespace scene
|
|||
//! this holds the header info of the MD3 file
|
||||
struct SMD3Header
|
||||
{
|
||||
c8 headerID[4]; //id of file, always "IDP3"
|
||||
s32 Version; //this is a version number, always 15
|
||||
s8 fileName[68]; //sometimes left Blank... 65 chars, 32bit aligned == 68 chars
|
||||
s32 numFrames; //number of KeyFrames
|
||||
s32 numTags; //number of 'tags' per frame
|
||||
s32 numMeshes; //number of meshes/skins
|
||||
s32 numMaxSkins; //maximum number of unique skins used in md3 file. artefact md2
|
||||
s32 frameStart; //starting position of frame-structur
|
||||
s32 tagStart; //starting position of tag-structures
|
||||
s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures
|
||||
s32 fileSize;
|
||||
c8 headerID[4]; //id of file, always "IDP3"
|
||||
s32 Version; //this is a version number, always 15
|
||||
s8 fileName[68];//sometimes left Blank... 65 chars, 32bit aligned == 68 chars
|
||||
s32 numFrames; //number of KeyFrames
|
||||
s32 numTags; //number of 'tags' per frame
|
||||
s32 numMeshes; //number of meshes/skins
|
||||
s32 numMaxSkins;//maximum number of unique skins used in md3 file. artefact md2
|
||||
s32 frameStart; //starting position of frame-structur
|
||||
s32 tagStart; //starting position of tag-structures
|
||||
s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures
|
||||
s32 fileSize;
|
||||
} PACK_STRUCT;
|
||||
|
||||
//! this holds the header info of an MD3 mesh section
|
||||
|
|
|
@ -179,7 +179,7 @@ namespace scene
|
|||
|
||||
if (!out)
|
||||
return;
|
||||
out->addBool ("IsOrthogonal", IsOrthogonal );
|
||||
out->addBool("IsOrthogonal", IsOrthogonal);
|
||||
}
|
||||
|
||||
//! Reads attributes of the camera node
|
||||
|
|
|
@ -92,7 +92,7 @@ namespace scene
|
|||
class IColladaMeshWriterProperties : public virtual IReferenceCounted
|
||||
{
|
||||
public:
|
||||
virtual ~IColladaMeshWriterProperties () {}
|
||||
virtual ~IColladaMeshWriterProperties () {}
|
||||
|
||||
//! Which lighting model should be used in the technique (FX) section when exporting effects (materials)
|
||||
virtual E_COLLADA_TECHNIQUE_FX getTechniqueFx(const video::SMaterial& material) const = 0;
|
||||
|
@ -129,7 +129,7 @@ namespace scene
|
|||
virtual f32 getReflectivity(const video::SMaterial& material) const = 0;
|
||||
|
||||
//! Return index of refraction for that material
|
||||
/** By default we don't write that.
|
||||
/** By default we don't write that.
|
||||
\return a value greater equal 0.f to write \<index_of_refraction\> when it is lesser than 0 nothing will be written */
|
||||
virtual f32 getIndexOfRefraction(const video::SMaterial& material) const = 0;
|
||||
|
||||
|
@ -191,7 +191,7 @@ namespace scene
|
|||
the number of exported materials using that knowledge by using identical
|
||||
names for such shared materials.
|
||||
Names must follow the xs::NCName standard to be valid, you can run them
|
||||
through IColladaMeshWriter::toNCName to ensure that.
|
||||
through IColladaMeshWriter::toNCName to ensure that.
|
||||
*/
|
||||
virtual irr::core::stringw nameForMaterial(const video::SMaterial & material, int materialId, const scene::IMesh* mesh, const scene::ISceneNode* node) = 0;
|
||||
};
|
||||
|
@ -362,7 +362,7 @@ namespace scene
|
|||
|
||||
//! After export you can find out which name had been used for writing the geometry for this node.
|
||||
/** The name comes from IColladaMeshWriterNames::nameForMesh, but you can't access the node there.
|
||||
\return Either a pointer to the name or NULL */
|
||||
\return Either a pointer to the name or NULL */
|
||||
// TODO: Function is not const because there is no const getMesh() function for several Irrlicht nodes.
|
||||
virtual const irr::core::stringw* findGeometryNameForNode(ISceneNode* node) = 0;
|
||||
|
||||
|
|
|
@ -20,19 +20,19 @@ namespace gui
|
|||
enum ECURSOR_ICON
|
||||
{
|
||||
// Following cursors might be system specific, or might use an Irrlicht icon-set. No guarantees so far.
|
||||
ECI_NORMAL, // arrow
|
||||
ECI_CROSS, // Crosshair
|
||||
ECI_HAND, // Hand
|
||||
ECI_HELP, // Arrow and question mark
|
||||
ECI_IBEAM, // typical text-selection cursor
|
||||
ECI_NO, // should not click icon
|
||||
ECI_WAIT, // hourclass
|
||||
ECI_SIZEALL, // arrow in all directions
|
||||
ECI_NORMAL, // arrow
|
||||
ECI_CROSS, // Crosshair
|
||||
ECI_HAND, // Hand
|
||||
ECI_HELP, // Arrow and question mark
|
||||
ECI_IBEAM, // typical text-selection cursor
|
||||
ECI_NO, // should not click icon
|
||||
ECI_WAIT, // hourclass
|
||||
ECI_SIZEALL, // arrow in all directions
|
||||
ECI_SIZENESW, // resizes in direction north-east or south-west
|
||||
ECI_SIZENWSE, // resizes in direction north-west or south-east
|
||||
ECI_SIZENS, // resizes in direction north or south
|
||||
ECI_SIZEWE, // resizes in direction west or east
|
||||
ECI_UP, // up-arrow
|
||||
ECI_SIZENWSE, // resizes in direction north-west or south-east
|
||||
ECI_SIZENS, // resizes in direction north or south
|
||||
ECI_SIZEWE, // resizes in direction west or east
|
||||
ECI_UP, // up-arrow
|
||||
|
||||
// Implementer note: Should we add system specific cursors, which use guaranteed the system icons,
|
||||
// then I would recommend using a naming scheme like ECI_W32_CROSS, ECI_X11_CROSSHAIR and adding those
|
||||
|
|
|
@ -247,7 +247,7 @@ namespace irr
|
|||
//! The text in an editbox was changed. This does not include automatic changes in text-breaking.
|
||||
EGET_EDITBOX_CHANGED,
|
||||
|
||||
//! The marked area in an editbox was changed.
|
||||
//! The marked area in an editbox was changed.
|
||||
EGET_EDITBOX_MARKING_CHANGED,
|
||||
|
||||
//! The tab was changed in an tab control
|
||||
|
@ -467,7 +467,7 @@ struct SEvent
|
|||
{
|
||||
NUMBER_OF_BUTTONS = 32,
|
||||
|
||||
AXIS_X = 0, // e.g. analog stick 1 left to right
|
||||
AXIS_X = 0, // e.g. analog stick 1 left to right
|
||||
AXIS_Y, // e.g. analog stick 1 top to bottom
|
||||
AXIS_Z, // e.g. throttle, or analog 2 stick 2 left to right
|
||||
AXIS_R, // e.g. rudder, or analog 2 stick 2 top to bottom
|
||||
|
@ -579,18 +579,18 @@ struct SJoystickInfo
|
|||
/** This is an internal Irrlicht index; it does not map directly
|
||||
* to any particular hardware joystick. It corresponds to the
|
||||
* irr::SJoystickEvent Joystick ID. */
|
||||
u8 Joystick;
|
||||
u8 Joystick;
|
||||
|
||||
//! The name that the joystick uses to identify itself.
|
||||
core::stringc Name;
|
||||
core::stringc Name;
|
||||
|
||||
//! The number of buttons that the joystick has.
|
||||
u32 Buttons;
|
||||
u32 Buttons;
|
||||
|
||||
//! The number of axes that the joystick has, i.e. X, Y, Z, R, U, V.
|
||||
/** Note: with a Linux device, the POV hat (if any) will use two axes. These
|
||||
* will be included in this count. */
|
||||
u32 Axes;
|
||||
u32 Axes;
|
||||
|
||||
//! An indication of whether the joystick has a POV hat.
|
||||
/** A Windows device will identify the presence or absence or the POV hat. A
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace gui
|
|||
//! call setVisible(false)
|
||||
ECMC_HIDE = 2
|
||||
|
||||
// note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags.
|
||||
// note to implementors - this is planned as bitset, so continue with 4 if you need to add further flags.
|
||||
};
|
||||
|
||||
//! GUI Context menu interface.
|
||||
|
@ -64,10 +64,10 @@ namespace gui
|
|||
virtual u32 addItem(const wchar_t* text, s32 commandId=-1, bool enabled=true,
|
||||
bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
|
||||
|
||||
//! Insert a menu item at specified position.
|
||||
/** \param idx: Position to insert the new element,
|
||||
should be smaller than itemcount otherwise the item is added to the end.
|
||||
\param text: Text of menu item. Set this to 0 to create
|
||||
//! Insert a menu item at specified position.
|
||||
/** \param idx: Position to insert the new element,
|
||||
should be smaller than itemcount otherwise the item is added to the end.
|
||||
\param text: Text of menu item. Set this to 0 to create
|
||||
an separator instead of a real item, which is the same like
|
||||
calling addSeparator();
|
||||
\param commandId: Command id of menu item, a simple id you may
|
||||
|
@ -81,11 +81,11 @@ namespace gui
|
|||
virtual u32 insertItem(u32 idx, const wchar_t* text, s32 commandId=-1, bool enabled=true,
|
||||
bool hasSubMenu=false, bool checked=false, bool autoChecking=false) = 0;
|
||||
|
||||
//! Find an item by it's CommandID
|
||||
//! Find an item by its CommandID
|
||||
/**
|
||||
\param commandId: We are looking for the first item which has this commandID
|
||||
\param idxStartSearch: Start searching from this index.
|
||||
\return Returns the index of the item when found or otherwise -1. */
|
||||
\return Returns the index of the item when found or otherwise -1. */
|
||||
virtual s32 findItemWithCommandId(s32 commandId, u32 idxStartSearch=0) const = 0;
|
||||
|
||||
//! Adds a separator item to the menu
|
||||
|
|
|
@ -147,7 +147,6 @@ namespace gui
|
|||
|
||||
//! Get the cursor blinktime
|
||||
virtual irr::u32 getCursorBlinkTime() const = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -564,7 +564,7 @@ public:
|
|||
virtual bool sendToBack(IGUIElement* child)
|
||||
{
|
||||
core::list<IGUIElement*>::Iterator it = Children.begin();
|
||||
if (child == (*it)) // already there
|
||||
if (child == (*it)) // already there
|
||||
return true;
|
||||
for (; it != Children.end(); ++it)
|
||||
{
|
||||
|
|
|
@ -585,7 +585,7 @@ public:
|
|||
//! Loads the gui. Note that the current gui is not cleared before.
|
||||
/** When a parent is set the elements will be added below the parent, the parent itself does not deserialize.
|
||||
When the file contains skin-settings from the gui-environment those are always serialized into the
|
||||
guienvironment independent of the parent setting.
|
||||
guienvironment independent of the parent setting.
|
||||
\param filename Name of the file.
|
||||
\param parent Parent for the loaded GUI, root if 0.
|
||||
\return True if loading succeeded, else false. */
|
||||
|
@ -594,7 +594,7 @@ public:
|
|||
//! Loads the gui. Note that the current gui is not cleared before.
|
||||
/** When a parent is set the elements will be added below the parent, the parent itself does not deserialize.
|
||||
When the file contains skin-settings from the gui-environment those are always serialized into the
|
||||
guienvironment independent of the parent setting.
|
||||
guienvironment independent of the parent setting.
|
||||
\param file The file to load from.
|
||||
\param parent Parent for the loaded GUI, root if 0.
|
||||
\return True if loading succeeded, else false. */
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace gui
|
|||
So to get absolute positions you have to add the resulting rectangle to getAbsolutePosition().UpperLeftCorner.<br>
|
||||
To get it relative to the parent element you have to add the resulting rectangle to getRelativePosition().UpperLeftCorner.
|
||||
Beware that adding a menu will not change the clientRect as menus are own gui elements, so in that case you might want to subtract
|
||||
the menu area additionally. */
|
||||
the menu area additionally. */
|
||||
virtual core::rect<s32> getClientRect() const = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ namespace scene
|
|||
}
|
||||
|
||||
//! Renames a loaded mesh.
|
||||
/** \deprecated Use renameMesh() instead. This method may be removed by
|
||||
/** \deprecated Use renameMesh() instead. This method may be removed by
|
||||
Irrlicht 1.9 */
|
||||
_IRR_DEPRECATED_ bool setMeshFilename(u32 index, const io::path& filename)
|
||||
{
|
||||
|
@ -125,12 +125,12 @@ namespace scene
|
|||
|
||||
//! Get the name of a loaded mesh, based on its index.
|
||||
/** \param index: Index of the mesh, number between 0 and getMeshCount()-1.
|
||||
\return The name if mesh was found and has a name, else the path is empty. */
|
||||
\return The name if mesh was found and has a name, else the path is empty. */
|
||||
virtual const io::SNamedPath& getMeshName(u32 index) const = 0;
|
||||
|
||||
//! Get the name of the loaded mesh if there is any.
|
||||
/** \param mesh Pointer to mesh to query.
|
||||
\return The name if mesh was found and has a name, else the path is empty. */
|
||||
\return The name if mesh was found and has a name, else the path is empty. */
|
||||
virtual const io::SNamedPath& getMeshName(const IMesh* const mesh) const = 0;
|
||||
|
||||
//! Renames a loaded mesh.
|
||||
|
|
|
@ -81,7 +81,7 @@ public:
|
|||
//! Set the maximum particle life-time in milliseconds
|
||||
virtual void setMaxLifeTime( u32 lifeTimeMax ) = 0;
|
||||
|
||||
//! Set maximal random derivation from the direction
|
||||
//! Set maximal random derivation from the direction
|
||||
virtual void setMaxAngleDegrees( s32 maxAngleDegrees ) = 0;
|
||||
|
||||
//! Get direction the emitter emits particles
|
||||
|
@ -111,10 +111,9 @@ public:
|
|||
//! Get the maximum particle life-time in milliseconds
|
||||
virtual u32 getMaxLifeTime() const = 0;
|
||||
|
||||
//! Get maximal random derivation from the direction
|
||||
//! Get maximal random derivation from the direction
|
||||
virtual s32 getMaxAngleDegrees() const = 0;
|
||||
|
||||
|
||||
//! Get emitter type
|
||||
virtual E_PARTICLE_EMITTER_TYPE getType() const { return EPET_POINT; }
|
||||
};
|
||||
|
|
|
@ -68,8 +68,9 @@ public:
|
|||
virtual void clearParticles() = 0;
|
||||
|
||||
//! Do manually update the particles.
|
||||
//! This should only be called when you want to render the node outside the scenegraph,
|
||||
//! as the node will care about this otherwise automatically.
|
||||
/** This should only be called when you want to render the node outside
|
||||
the scenegraph, as the node will care about this otherwise
|
||||
automatically. */
|
||||
virtual void doParticleSystem(u32 time) = 0;
|
||||
|
||||
//! Gets the particle emitter, which creates the particles.
|
||||
|
|
|
@ -371,50 +371,48 @@ namespace quake3
|
|||
|
||||
enum eQ3ModifierFunction
|
||||
{
|
||||
TCMOD = 0,
|
||||
TCMOD = 0,
|
||||
DEFORMVERTEXES = 1,
|
||||
RGBGEN = 2,
|
||||
TCGEN = 3,
|
||||
MAP = 4,
|
||||
ALPHAGEN = 5,
|
||||
RGBGEN = 2,
|
||||
TCGEN = 3,
|
||||
MAP = 4,
|
||||
ALPHAGEN = 5,
|
||||
|
||||
FUNCTION2 = 0x10,
|
||||
SCROLL = FUNCTION2 + 1,
|
||||
SCALE = FUNCTION2 + 2,
|
||||
ROTATE = FUNCTION2 + 3,
|
||||
STRETCH = FUNCTION2 + 4,
|
||||
TURBULENCE = FUNCTION2 + 5,
|
||||
WAVE = FUNCTION2 + 6,
|
||||
FUNCTION2 = 0x10,
|
||||
SCROLL = FUNCTION2 + 1,
|
||||
SCALE = FUNCTION2 + 2,
|
||||
ROTATE = FUNCTION2 + 3,
|
||||
STRETCH = FUNCTION2 + 4,
|
||||
TURBULENCE = FUNCTION2 + 5,
|
||||
WAVE = FUNCTION2 + 6,
|
||||
|
||||
IDENTITY = FUNCTION2 + 7,
|
||||
VERTEX = FUNCTION2 + 8,
|
||||
TEXTURE = FUNCTION2 + 9,
|
||||
LIGHTMAP = FUNCTION2 + 10,
|
||||
ENVIRONMENT = FUNCTION2 + 11,
|
||||
IDENTITY = FUNCTION2 + 7,
|
||||
VERTEX = FUNCTION2 + 8,
|
||||
TEXTURE = FUNCTION2 + 9,
|
||||
LIGHTMAP = FUNCTION2 + 10,
|
||||
ENVIRONMENT = FUNCTION2 + 11,
|
||||
DOLLAR_LIGHTMAP = FUNCTION2 + 12,
|
||||
BULGE = FUNCTION2 + 13,
|
||||
AUTOSPRITE = FUNCTION2 + 14,
|
||||
AUTOSPRITE2 = FUNCTION2 + 15,
|
||||
TRANSFORM = FUNCTION2 + 16,
|
||||
EXACTVERTEX = FUNCTION2 + 17,
|
||||
CONSTANT = FUNCTION2 + 18,
|
||||
BULGE = FUNCTION2 + 13,
|
||||
AUTOSPRITE = FUNCTION2 + 14,
|
||||
AUTOSPRITE2 = FUNCTION2 + 15,
|
||||
TRANSFORM = FUNCTION2 + 16,
|
||||
EXACTVERTEX = FUNCTION2 + 17,
|
||||
CONSTANT = FUNCTION2 + 18,
|
||||
LIGHTINGSPECULAR = FUNCTION2 + 19,
|
||||
MOVE = FUNCTION2 + 20,
|
||||
NORMAL = FUNCTION2 + 21,
|
||||
MOVE = FUNCTION2 + 20,
|
||||
NORMAL = FUNCTION2 + 21,
|
||||
IDENTITYLIGHTING = FUNCTION2 + 22,
|
||||
|
||||
WAVE_MODIFIER_FUNCTION = 0x30,
|
||||
SINUS = WAVE_MODIFIER_FUNCTION + 1,
|
||||
COSINUS = WAVE_MODIFIER_FUNCTION + 2,
|
||||
SQUARE = WAVE_MODIFIER_FUNCTION + 3,
|
||||
TRIANGLE = WAVE_MODIFIER_FUNCTION + 4,
|
||||
SAWTOOTH = WAVE_MODIFIER_FUNCTION + 5,
|
||||
SINUS = WAVE_MODIFIER_FUNCTION + 1,
|
||||
COSINUS = WAVE_MODIFIER_FUNCTION + 2,
|
||||
SQUARE = WAVE_MODIFIER_FUNCTION + 3,
|
||||
TRIANGLE = WAVE_MODIFIER_FUNCTION + 4,
|
||||
SAWTOOTH = WAVE_MODIFIER_FUNCTION + 5,
|
||||
SAWTOOTH_INVERSE = WAVE_MODIFIER_FUNCTION + 6,
|
||||
NOISE = WAVE_MODIFIER_FUNCTION + 7,
|
||||
|
||||
|
||||
UNKNOWN = -2
|
||||
NOISE = WAVE_MODIFIER_FUNCTION + 7,
|
||||
|
||||
UNKNOWN = -2
|
||||
};
|
||||
|
||||
struct SModifierFunction
|
||||
|
|
|
@ -702,17 +702,17 @@ namespace scene
|
|||
{
|
||||
if (!out)
|
||||
return;
|
||||
out->addString ("Name", Name.c_str());
|
||||
out->addInt ("Id", ID );
|
||||
out->addString("Name", Name.c_str());
|
||||
out->addInt("Id", ID );
|
||||
|
||||
out->addVector3d("Position", getPosition() );
|
||||
out->addVector3d("Rotation", getRotation() );
|
||||
out->addVector3d("Scale", getScale() );
|
||||
|
||||
out->addBool ("Visible", IsVisible );
|
||||
out->addInt ("AutomaticCulling", AutomaticCullingState);
|
||||
out->addInt ("DebugDataVisible", DebugDataVisible );
|
||||
out->addBool ("IsDebugObject", IsDebugObject );
|
||||
out->addBool("Visible", IsVisible );
|
||||
out->addInt("AutomaticCulling", AutomaticCullingState);
|
||||
out->addInt("DebugDataVisible", DebugDataVisible );
|
||||
out->addBool("IsDebugObject", IsDebugObject );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace scene
|
|||
virtual void setKeyMap(SKeyMap *map, u32 count) = 0;
|
||||
|
||||
//! Sets the keyboard mapping for this animator
|
||||
//! \param keymap The new keymap array
|
||||
//! \param keymap The new keymap array
|
||||
virtual void setKeyMap(const core::array<SKeyMap>& keymap) = 0;
|
||||
|
||||
//! Gets the keyboard mapping for this animator
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
|
||||
//! Irrlicht SDK Version
|
||||
#define IRRLICHT_VERSION_MAJOR 1
|
||||
#define IRRLICHT_VERSION_MINOR 8
|
||||
#define IRRLICHT_VERSION_MINOR 9
|
||||
#define IRRLICHT_VERSION_REVISION 0
|
||||
// This flag will be defined only in SVN, the official release code will have
|
||||
// it undefined
|
||||
//#define IRRLICHT_VERSION_SVN -alpha
|
||||
#define IRRLICHT_SDK_VERSION "1.8.0"
|
||||
#define IRRLICHT_VERSION_SVN alpha
|
||||
#define IRRLICHT_SDK_VERSION "1.9.0"
|
||||
|
||||
#include <stdio.h> // TODO: Although included elsewhere this is required at least for mingw
|
||||
|
||||
|
@ -463,7 +463,7 @@ B3D, MS3D or X meshes */
|
|||
#ifdef NO_IRR_COMPILE_WITH_OGRE_LOADER_
|
||||
#undef _IRR_COMPILE_WITH_OGRE_LOADER_
|
||||
#endif
|
||||
#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
|
||||
#endif // _IRR_COMPILE_WITH_SKINNED_MESH_SUPPORT_
|
||||
|
||||
//! Define _IRR_COMPILE_WITH_IRR_MESH_LOADER_ if you want to load Irrlicht Engine .irrmesh files
|
||||
#define _IRR_COMPILE_WITH_IRR_MESH_LOADER_
|
||||
|
@ -917,7 +917,6 @@ precision will be lower but speed higher. currently X86 only
|
|||
#define _tfindnext __tfindnext
|
||||
typedef long intptr_t;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__
|
||||
|
|
|
@ -22,15 +22,15 @@ namespace video
|
|||
//! Flag for EMT_ONETEXTURE_BLEND, ( BlendFactor ) BlendFunc = source * sourceFactor + dest * destFactor
|
||||
enum E_BLEND_FACTOR
|
||||
{
|
||||
EBF_ZERO = 0, //!< src & dest (0, 0, 0, 0)
|
||||
EBF_ONE, //!< src & dest (1, 1, 1, 1)
|
||||
EBF_DST_COLOR, //!< src (destR, destG, destB, destA)
|
||||
EBF_ZERO = 0, //!< src & dest (0, 0, 0, 0)
|
||||
EBF_ONE, //!< src & dest (1, 1, 1, 1)
|
||||
EBF_DST_COLOR, //!< src (destR, destG, destB, destA)
|
||||
EBF_ONE_MINUS_DST_COLOR, //!< src (1-destR, 1-destG, 1-destB, 1-destA)
|
||||
EBF_SRC_COLOR, //!< dest (srcR, srcG, srcB, srcA)
|
||||
EBF_ONE_MINUS_SRC_COLOR, //!< dest (1-srcR, 1-srcG, 1-srcB, 1-srcA)
|
||||
EBF_SRC_ALPHA, //!< src & dest (srcA, srcA, srcA, srcA)
|
||||
EBF_SRC_COLOR, //!< dest (srcR, srcG, srcB, srcA)
|
||||
EBF_ONE_MINUS_SRC_COLOR, //!< dest (1-srcR, 1-srcG, 1-srcB, 1-srcA)
|
||||
EBF_SRC_ALPHA, //!< src & dest (srcA, srcA, srcA, srcA)
|
||||
EBF_ONE_MINUS_SRC_ALPHA, //!< src & dest (1-srcA, 1-srcA, 1-srcA, 1-srcA)
|
||||
EBF_DST_ALPHA, //!< src & dest (destA, destA, destA, destA)
|
||||
EBF_DST_ALPHA, //!< src & dest (destA, destA, destA, destA)
|
||||
EBF_ONE_MINUS_DST_ALPHA, //!< src & dest (1-destA, 1-destA, 1-destA, 1-destA)
|
||||
EBF_SRC_ALPHA_SATURATE //!< src (min(srcA, 1-destA), idem, ...)
|
||||
};
|
||||
|
@ -39,11 +39,11 @@ namespace video
|
|||
enum E_BLEND_OPERATION
|
||||
{
|
||||
EBO_NONE = 0, //!< No blending happens
|
||||
EBO_ADD, //!< Default blending adds the color values
|
||||
EBO_ADD, //!< Default blending adds the color values
|
||||
EBO_SUBTRACT, //!< This mode subtracts the color values
|
||||
EBO_REVSUBTRACT,//!< This modes subtracts destination from source
|
||||
EBO_MIN, //!< Choose minimum value of each color channel
|
||||
EBO_MAX, //!< Choose maximum value of each color channel
|
||||
EBO_MIN, //!< Choose minimum value of each color channel
|
||||
EBO_MAX, //!< Choose maximum value of each color channel
|
||||
EBO_MIN_FACTOR, //!< Choose minimum value of each color channel after applying blend factors, not widely supported
|
||||
EBO_MAX_FACTOR, //!< Choose maximum value of each color channel after applying blend factors, not widely supported
|
||||
EBO_MIN_ALPHA, //!< Choose minimum value of each color channel based on alpha value, not widely supported
|
||||
|
@ -128,7 +128,7 @@ namespace video
|
|||
{
|
||||
const u32 state = IR(param);
|
||||
alphaSource = (state & 0x0000F000) >> 12;
|
||||
modulo = E_MODULATE_FUNC( ( state & 0x00000F00 ) >> 8 );
|
||||
modulo = E_MODULATE_FUNC( ( state & 0x00000F00 ) >> 8 );
|
||||
srcFact = E_BLEND_FACTOR ( ( state & 0x000000F0 ) >> 4 );
|
||||
dstFact = E_BLEND_FACTOR ( ( state & 0x0000000F ) );
|
||||
}
|
||||
|
|
|
@ -20,27 +20,26 @@ namespace core
|
|||
// ----------- some basic quite often used string functions -----------------
|
||||
|
||||
//! search if a filename has a proper extension
|
||||
inline s32 isFileExtension ( const io::path& filename,
|
||||
const io::path& ext0,
|
||||
const io::path& ext1,
|
||||
const io::path& ext2)
|
||||
inline s32 isFileExtension (const io::path& filename, const io::path& ext0,
|
||||
const io::path& ext1, const io::path& ext2)
|
||||
{
|
||||
s32 extPos = filename.findLast ( '.' );
|
||||
if ( extPos < 0 )
|
||||
return 0;
|
||||
|
||||
extPos += 1;
|
||||
if ( filename.equals_substring_ignore_case ( ext0, extPos ) ) return 1;
|
||||
if ( filename.equals_substring_ignore_case ( ext1, extPos ) ) return 2;
|
||||
if ( filename.equals_substring_ignore_case ( ext2, extPos ) ) return 3;
|
||||
if ( filename.equals_substring_ignore_case ( ext0, extPos ) )
|
||||
return 1;
|
||||
if ( filename.equals_substring_ignore_case ( ext1, extPos ) )
|
||||
return 2;
|
||||
if ( filename.equals_substring_ignore_case ( ext2, extPos ) )
|
||||
return 3;
|
||||
return 0;
|
||||
}
|
||||
|
||||
//! search if a filename has a proper extension
|
||||
inline bool hasFileExtension ( const io::path& filename,
|
||||
const io::path& ext0,
|
||||
const io::path& ext1 = "",
|
||||
const io::path& ext2 = "")
|
||||
inline bool hasFileExtension(const io::path& filename, const io::path& ext0,
|
||||
const io::path& ext1 = "", const io::path& ext2 = "")
|
||||
{
|
||||
return isFileExtension ( filename, ext0, ext1, ext2 ) > 0;
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ namespace irr
|
|||
namespace core
|
||||
{
|
||||
//! Selection of characters which count as decimal point in fast_atof
|
||||
// TODO: This should probably also be used in irr::core::string, but the float-to-string code
|
||||
// used there has to be rewritten first.
|
||||
// TODO: This should probably also be used in irr::core::string, but
|
||||
// the float-to-string code used there has to be rewritten first.
|
||||
IRRLICHT_API extern irr::core::stringc LOCALE_DECIMAL_POINTS;
|
||||
|
||||
// we write [17] here instead of [] to work around a swig bug
|
||||
|
|
|
@ -25,8 +25,7 @@ class array
|
|||
public:
|
||||
|
||||
//! Default constructor for empty array.
|
||||
array()
|
||||
: data(0), allocated(0), used(0),
|
||||
array() : data(0), allocated(0), used(0),
|
||||
strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true)
|
||||
{
|
||||
}
|
||||
|
@ -34,9 +33,9 @@ public:
|
|||
|
||||
//! Constructs an array and allocates an initial chunk of memory.
|
||||
/** \param start_count Amount of elements to pre-allocate. */
|
||||
array(u32 start_count)
|
||||
: data(0), allocated(0), used(0),
|
||||
strategy(ALLOC_STRATEGY_DOUBLE), free_when_destroyed(true), is_sorted(true)
|
||||
array(u32 start_count) : data(0), allocated(0), used(0),
|
||||
strategy(ALLOC_STRATEGY_DOUBLE),
|
||||
free_when_destroyed(true), is_sorted(true)
|
||||
{
|
||||
reallocate(start_count);
|
||||
}
|
||||
|
@ -468,8 +467,8 @@ public:
|
|||
//! it is used for searching a multiset
|
||||
/** The array will be sorted before the binary search if it is not
|
||||
already sorted.
|
||||
\param element Element to search for.
|
||||
\param &last return lastIndex of equal elements
|
||||
\param element Element to search for.
|
||||
\param &last return lastIndex of equal elements
|
||||
\return Position of the first searched element if it was found,
|
||||
otherwise -1 is returned. */
|
||||
s32 binary_search_multi(const T& element, s32 &last)
|
||||
|
@ -567,12 +566,12 @@ public:
|
|||
|
||||
for (i=index+count; i<used; ++i)
|
||||
{
|
||||
if (i-count >= index+count) // not already destructed before loop
|
||||
if (i-count >= index+count) // not already destructed before loop
|
||||
allocator.destruct(&data[i-count]);
|
||||
|
||||
allocator.construct(&data[i-count], data[i]); // data[i-count] = data[i];
|
||||
|
||||
if (i >= used-count) // those which are not overwritten
|
||||
if (i >= used-count) // those which are not overwritten
|
||||
allocator.destruct(&data[i]);
|
||||
}
|
||||
|
||||
|
@ -590,14 +589,14 @@ public:
|
|||
//! Swap the content of this array container with the content of another array
|
||||
/** Afterwards this object will contain the content of the other object and the other
|
||||
object will contain the content of this object.
|
||||
\param other Swap content with this object */
|
||||
\param other Swap content with this object */
|
||||
void swap(array<T, TAlloc>& other)
|
||||
{
|
||||
core::swap(data, other.data);
|
||||
core::swap(allocated, other.allocated);
|
||||
core::swap(used, other.used);
|
||||
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
|
||||
eAllocStrategy helper_strategy(strategy); // can't use core::swap with bitfields
|
||||
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
|
||||
eAllocStrategy helper_strategy(strategy); // can't use core::swap with bitfields
|
||||
strategy = other.strategy;
|
||||
other.strategy = helper_strategy;
|
||||
bool helper_free_when_destroyed(free_when_destroyed);
|
||||
|
|
|
@ -389,13 +389,13 @@ public:
|
|||
/** Afterwards this object will contain the content of the other object and the other
|
||||
object will contain the content of this object. Iterators will afterwards be valid for
|
||||
the swapped object.
|
||||
\param other Swap content with this object */
|
||||
\param other Swap content with this object */
|
||||
void swap(list<T>& other)
|
||||
{
|
||||
core::swap(First, other.First);
|
||||
core::swap(Last, other.Last);
|
||||
core::swap(Size, other.Size);
|
||||
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
|
||||
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,16 +41,16 @@ class map
|
|||
p->setParent(this);
|
||||
}
|
||||
|
||||
void setParent(RBTree* p) { Parent=p; }
|
||||
void setParent(RBTree* p) { Parent=p; }
|
||||
|
||||
void setValue(const ValueTypeRB& v) { Value = v; }
|
||||
void setValue(const ValueTypeRB& v) { Value = v; }
|
||||
|
||||
void setRed() { IsRed = true; }
|
||||
void setBlack() { IsRed = false; }
|
||||
void setRed() { IsRed = true; }
|
||||
void setBlack() { IsRed = false; }
|
||||
|
||||
RBTree* getLeftChild() const { return LeftChild; }
|
||||
RBTree* getRightChild() const { return RightChild; }
|
||||
RBTree* getParent() const { return Parent; }
|
||||
RBTree* getLeftChild() const { return LeftChild; }
|
||||
RBTree* getRightChild() const { return RightChild; }
|
||||
RBTree* getParent() const { return Parent; }
|
||||
|
||||
const ValueTypeRB& getValue() const
|
||||
{
|
||||
|
@ -118,13 +118,13 @@ class map
|
|||
private:
|
||||
RBTree();
|
||||
|
||||
RBTree* LeftChild;
|
||||
RBTree* RightChild;
|
||||
RBTree* LeftChild;
|
||||
RBTree* RightChild;
|
||||
|
||||
RBTree* Parent;
|
||||
RBTree* Parent;
|
||||
|
||||
KeyTypeRB Key;
|
||||
ValueTypeRB Value;
|
||||
KeyTypeRB Key;
|
||||
ValueTypeRB Value;
|
||||
|
||||
bool IsRed;
|
||||
}; // RBTree
|
||||
|
@ -442,7 +442,7 @@ class map
|
|||
{
|
||||
public:
|
||||
|
||||
ParentFirstIterator() : Root(0), Cur(0) {}
|
||||
ParentFirstIterator() : Root(0), Cur(0) {}
|
||||
|
||||
explicit ParentFirstIterator(Node* root) : Root(root), Cur(0)
|
||||
{
|
||||
|
@ -938,7 +938,7 @@ class map
|
|||
/** Afterwards this object will contain the content of the other object and the other
|
||||
object will contain the content of this object. Iterators will afterwards be valid for
|
||||
the swapped object.
|
||||
\param other Swap content with this object */
|
||||
\param other Swap content with this object */
|
||||
void swap(map<KeyType, ValueType>& other)
|
||||
{
|
||||
core::swap(Root, other.Root);
|
||||
|
|
|
@ -53,19 +53,19 @@ namespace core
|
|||
#undef PI
|
||||
#endif
|
||||
//! Constant for PI.
|
||||
const f32 PI = 3.14159265359f;
|
||||
const f32 PI = 3.14159265359f;
|
||||
|
||||
//! Constant for reciprocal of PI.
|
||||
const f32 RECIPROCAL_PI = 1.0f/PI;
|
||||
const f32 RECIPROCAL_PI = 1.0f/PI;
|
||||
|
||||
//! Constant for half of PI.
|
||||
const f32 HALF_PI = PI/2.0f;
|
||||
const f32 HALF_PI = PI/2.0f;
|
||||
|
||||
#ifdef PI64 // make sure we don't collide with a define
|
||||
#undef PI64
|
||||
#endif
|
||||
//! Constant for 64bit PI.
|
||||
const f64 PI64 = 3.1415926535897932384626433832795028841971693993751;
|
||||
const f64 PI64 = 3.1415926535897932384626433832795028841971693993751;
|
||||
|
||||
//! Constant for 64bit reciprocal of PI.
|
||||
const f64 RECIPROCAL_PI64 = 1.0/PI64;
|
||||
|
@ -84,7 +84,7 @@ namespace core
|
|||
|
||||
//! Utility function to convert a radian value to degrees
|
||||
/** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X
|
||||
\param radians The radians value to convert to degrees.
|
||||
\param radians The radians value to convert to degrees.
|
||||
*/
|
||||
inline f32 radToDeg(f32 radians)
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ namespace core
|
|||
|
||||
//! Utility function to convert a radian value to degrees
|
||||
/** Provided as it can be clearer to write radToDeg(X) than RADTODEG * X
|
||||
\param radians The radians value to convert to degrees.
|
||||
\param radians The radians value to convert to degrees.
|
||||
*/
|
||||
inline f64 radToDeg(f64 radians)
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ namespace core
|
|||
|
||||
//! Utility function to convert a degrees value to radians
|
||||
/** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X
|
||||
\param degrees The degrees value to convert to radians.
|
||||
\param degrees The degrees value to convert to radians.
|
||||
*/
|
||||
inline f32 degToRad(f32 degrees)
|
||||
{
|
||||
|
@ -111,7 +111,7 @@ namespace core
|
|||
|
||||
//! Utility function to convert a degrees value to radians
|
||||
/** Provided as it can be clearer to write degToRad(X) than DEGTORAD * X
|
||||
\param degrees The degrees value to convert to radians.
|
||||
\param degrees The degrees value to convert to radians.
|
||||
*/
|
||||
inline f64 degToRad(f64 degrees)
|
||||
{
|
||||
|
@ -348,26 +348,26 @@ namespace core
|
|||
//! code is taken from IceFPU
|
||||
//! Integer representation of a floating-point value.
|
||||
#ifdef IRRLICHT_FAST_MATH
|
||||
#define IR(x) ((u32&)(x))
|
||||
#define IR(x) ((u32&)(x))
|
||||
#else
|
||||
inline u32 IR(f32 x) {inttofloat tmp; tmp.f=x; return tmp.u;}
|
||||
#endif
|
||||
|
||||
//! Absolute integer representation of a floating-point value
|
||||
#define AIR(x) (IR(x)&0x7fffffff)
|
||||
#define AIR(x) (IR(x)&0x7fffffff)
|
||||
|
||||
//! Floating-point representation of an integer value.
|
||||
#ifdef IRRLICHT_FAST_MATH
|
||||
#define FR(x) ((f32&)(x))
|
||||
#define FR(x) ((f32&)(x))
|
||||
#else
|
||||
inline f32 FR(u32 x) {inttofloat tmp; tmp.u=x; return tmp.f;}
|
||||
inline f32 FR(s32 x) {inttofloat tmp; tmp.s=x; return tmp.f;}
|
||||
#endif
|
||||
|
||||
//! integer representation of 1.0
|
||||
#define IEEE_1_0 0x3f800000
|
||||
#define IEEE_1_0 0x3f800000
|
||||
//! integer representation of 255.0
|
||||
#define IEEE_255_0 0x437f0000
|
||||
#define IEEE_255_0 0x437f0000
|
||||
|
||||
#ifdef IRRLICHT_FAST_MATH
|
||||
#define F32_LOWER_0(f) (F32_AS_U32(f) > F32_SIGN_BIT)
|
||||
|
|
|
@ -74,7 +74,7 @@ typedef signed int s32;
|
|||
typedef unsigned __int64 u64;
|
||||
#elif __GNUC__
|
||||
#if __WORDSIZE == 64
|
||||
typedef unsigned long int u64;
|
||||
typedef unsigned long int u64;
|
||||
#else
|
||||
__extension__ typedef unsigned long long u64;
|
||||
#endif
|
||||
|
@ -88,7 +88,7 @@ typedef unsigned long long u64;
|
|||
typedef __int64 s64;
|
||||
#elif __GNUC__
|
||||
#if __WORDSIZE == 64
|
||||
typedef long int s64;
|
||||
typedef long int s64;
|
||||
#else
|
||||
__extension__ typedef long long s64;
|
||||
#endif
|
||||
|
@ -164,18 +164,18 @@ strings
|
|||
//! define a break macro for debugging.
|
||||
#if defined(_DEBUG)
|
||||
#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE)
|
||||
#if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration
|
||||
#include <crtdbg.h>
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
|
||||
#else
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
|
||||
#endif
|
||||
#if defined(WIN64) || defined(_WIN64) // using portable common solution for x64 configuration
|
||||
#include <crtdbg.h>
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_CrtDbgBreak();}
|
||||
#else
|
||||
#include "assert.h"
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) if (_CONDITION_) {_asm int 3}
|
||||
#endif
|
||||
#else
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
|
||||
#include "assert.h"
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ ) assert( !(_CONDITION_) );
|
||||
#endif
|
||||
#else
|
||||
#define _IRR_DEBUG_BREAK_IF( _CONDITION_ )
|
||||
#endif
|
||||
|
||||
//! Defines a deprecated macro which generates a warning at compile time
|
||||
|
|
|
@ -187,7 +187,7 @@
|
|||
#include "vector2d.h"
|
||||
#include "vector3d.h"
|
||||
|
||||
/*! \mainpage Irrlicht Engine 1.8 API documentation
|
||||
/*! \mainpage Irrlicht Engine 1.9 API documentation
|
||||
*
|
||||
* <div align="center"><img src="logobig.png" ></div>
|
||||
*
|
||||
|
|
|
@ -78,14 +78,14 @@ class line2d
|
|||
{
|
||||
// Uses the method given at:
|
||||
// http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/
|
||||
const f32 commonDenominator = (f32)(l.end.Y - l.start.Y)*(end.X - start.X) -
|
||||
(l.end.X - l.start.X)*(end.Y - start.Y);
|
||||
const f32 commonDenominator = (f32)((l.end.Y - l.start.Y)*(end.X - start.X) -
|
||||
(l.end.X - l.start.X)*(end.Y - start.Y));
|
||||
|
||||
const f32 numeratorA = (f32)(l.end.X - l.start.X)*(start.Y - l.start.Y) -
|
||||
(l.end.Y - l.start.Y)*(start.X -l.start.X);
|
||||
const f32 numeratorA = (f32)((l.end.X - l.start.X)*(start.Y - l.start.Y) -
|
||||
(l.end.Y - l.start.Y)*(start.X -l.start.X));
|
||||
|
||||
const f32 numeratorB = (f32)(end.X - start.X)*(start.Y - l.start.Y) -
|
||||
(end.Y - start.Y)*(start.X -l.start.X);
|
||||
const f32 numeratorB = (f32)((end.X - start.X)*(start.Y - l.start.Y) -
|
||||
(end.Y - start.Y)*(start.X -l.start.X));
|
||||
|
||||
if(equals(commonDenominator, 0.f))
|
||||
{
|
||||
|
@ -218,7 +218,7 @@ class line2d
|
|||
vector2d<f64> c((f64)(point.X-start.X), (f64)(point.Y- start.Y));
|
||||
vector2d<f64> v((f64)(end.X-start.X), (f64)(end.Y-start.Y));
|
||||
f64 d = v.getLength();
|
||||
if ( d == 0 ) // can't tell much when the line is just a single point
|
||||
if ( d == 0 ) // can't tell much when the line is just a single point
|
||||
return start;
|
||||
v /= d;
|
||||
f64 t = v.dotProduct(c);
|
||||
|
@ -246,7 +246,7 @@ class line2d
|
|||
vector2df c = point - start;
|
||||
vector2df v = end - start;
|
||||
f32 d = (f32)v.getLength();
|
||||
if ( d == 0 ) // can't tell much when the line is just a single point
|
||||
if ( d == 0 ) // can't tell much when the line is just a single point
|
||||
return start;
|
||||
v /= d;
|
||||
f32 t = v.dotProduct(c);
|
||||
|
|
|
@ -947,7 +947,7 @@ namespace core
|
|||
template <class T>
|
||||
inline CMatrix4<T>& CMatrix4<T>::setRotationAxisRadians( const T& angle, const vector3d<T>& axis )
|
||||
{
|
||||
const f64 c = cos(angle);
|
||||
const f64 c = cos(angle);
|
||||
const f64 s = sin(angle);
|
||||
const f64 t = 1.0 - c;
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ namespace core
|
|||
vector3d<f64> cf64((f64)pointC.X, (f64)pointC.Y, (f64)pointC.Z);
|
||||
vector3d<f64> pf64((f64)p.X, (f64)p.Y, (f64)p.Z);
|
||||
return (isOnSameSide(pf64, af64, bf64, cf64) &&
|
||||
isOnSameSide(pf64, bf64, af64, cf64) &&
|
||||
isOnSameSide(pf64, cf64, af64, bf64));
|
||||
isOnSameSide(pf64, bf64, af64, cf64) &&
|
||||
isOnSameSide(pf64, cf64, af64, bf64));
|
||||
}
|
||||
|
||||
//! Check if a point is inside the triangle (border-points count also as inside)
|
||||
|
@ -254,9 +254,9 @@ namespace core
|
|||
// This catches some floating point troubles.
|
||||
// Unfortunately slightly expensive and we don't really know the best epsilon for iszero.
|
||||
vector3d<f64> cp1 = bminusa.normalize().crossProduct((p1 - a).normalize());
|
||||
if ( core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32)
|
||||
&& core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32)
|
||||
&& core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) )
|
||||
if (core::iszero(cp1.X, (f64)ROUNDING_ERROR_f32)
|
||||
&& core::iszero(cp1.Y, (f64)ROUNDING_ERROR_f32)
|
||||
&& core::iszero(cp1.Z, (f64)ROUNDING_ERROR_f32) )
|
||||
{
|
||||
res = 0.f;
|
||||
}
|
||||
|
|
|
@ -67,28 +67,28 @@ public:
|
|||
//! sort in order X, Y. Equality with rounding tolerance.
|
||||
bool operator<=(const vector2d<T>&other) const
|
||||
{
|
||||
return (X<other.X || core::equals(X, other.X)) ||
|
||||
return (X<other.X || core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y)));
|
||||
}
|
||||
|
||||
//! sort in order X, Y. Equality with rounding tolerance.
|
||||
bool operator>=(const vector2d<T>&other) const
|
||||
{
|
||||
return (X>other.X || core::equals(X, other.X)) ||
|
||||
return (X>other.X || core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y)));
|
||||
}
|
||||
|
||||
//! sort in order X, Y. Difference must be above rounding tolerance.
|
||||
bool operator<(const vector2d<T>&other) const
|
||||
{
|
||||
return (X<other.X && !core::equals(X, other.X)) ||
|
||||
return (X<other.X && !core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y));
|
||||
}
|
||||
|
||||
//! sort in order X, Y. Difference must be above rounding tolerance.
|
||||
bool operator>(const vector2d<T>&other) const
|
||||
{
|
||||
return (X>other.X && !core::equals(X, other.X)) ||
|
||||
return (X>other.X && !core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y));
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace core
|
|||
//! sort in order X, Y, Z. Equality with rounding tolerance.
|
||||
bool operator<=(const vector3d<T>&other) const
|
||||
{
|
||||
return (X<other.X || core::equals(X, other.X)) ||
|
||||
return (X<other.X || core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && (Y<other.Y || core::equals(Y, other.Y))) ||
|
||||
(core::equals(X, other.X) && core::equals(Y, other.Y) && (Z<other.Z || core::equals(Z, other.Z)));
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ namespace core
|
|||
//! sort in order X, Y, Z. Equality with rounding tolerance.
|
||||
bool operator>=(const vector3d<T>&other) const
|
||||
{
|
||||
return (X>other.X || core::equals(X, other.X)) ||
|
||||
return (X>other.X || core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && (Y>other.Y || core::equals(Y, other.Y))) ||
|
||||
(core::equals(X, other.X) && core::equals(Y, other.Y) && (Z>other.Z || core::equals(Z, other.Z)));
|
||||
}
|
||||
|
@ -76,7 +76,7 @@ namespace core
|
|||
//! sort in order X, Y, Z. Difference must be above rounding tolerance.
|
||||
bool operator<(const vector3d<T>&other) const
|
||||
{
|
||||
return (X<other.X && !core::equals(X, other.X)) ||
|
||||
return (X<other.X && !core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && Y<other.Y && !core::equals(Y, other.Y)) ||
|
||||
(core::equals(X, other.X) && core::equals(Y, other.Y) && Z<other.Z && !core::equals(Z, other.Z));
|
||||
}
|
||||
|
@ -84,7 +84,7 @@ namespace core
|
|||
//! sort in order X, Y, Z. Difference must be above rounding tolerance.
|
||||
bool operator>(const vector3d<T>&other) const
|
||||
{
|
||||
return (X>other.X && !core::equals(X, other.X)) ||
|
||||
return (X>other.X && !core::equals(X, other.X)) ||
|
||||
(core::equals(X, other.X) && Y>other.Y && !core::equals(Y, other.Y)) ||
|
||||
(core::equals(X, other.X) && core::equals(Y, other.Y) && Z>other.Z && !core::equals(Z, other.Z));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
==========================================================================
|
||||
The Irrlicht Engine SDK version 1.8
|
||||
The Irrlicht Engine SDK version 1.9
|
||||
==========================================================================
|
||||
|
||||
Welcome the Irrlicht Engine SDK.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
# norootforbuild
|
||||
|
||||
Name: libIrrlicht1
|
||||
Version: 1.8.0
|
||||
Version: 1.9.0
|
||||
Release: 0.pm.1
|
||||
Summary: The Irrlicht Engine SDK
|
||||
License: see readme.txt
|
||||
|
|
|
@ -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,8 +40,8 @@ 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);
|
||||
|
|
|
@ -795,7 +795,6 @@ REALINLINE void CBurningShader_Raster_Reference::scanline ()
|
|||
pShader.i += 1;
|
||||
if ( pShader.i > pShader.dx )
|
||||
return;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -848,7 +847,6 @@ REALINLINE void CBurningShader_Raster_Reference::scanline ()
|
|||
}
|
||||
|
||||
|
||||
|
||||
void CBurningShader_Raster_Reference::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c )
|
||||
{
|
||||
sScanConvertData scan;
|
||||
|
|
|
@ -106,8 +106,8 @@ namespace video
|
|||
IDirect3DIndexBuffer9* indexBuffer;
|
||||
|
||||
u32 vertexBufferSize;
|
||||
u32 indexBufferSize;
|
||||
};
|
||||
u32 indexBufferSize;
|
||||
};
|
||||
|
||||
bool updateVertexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer);
|
||||
bool updateIndexHardwareBuffer(SHWBufferLink_d3d9 *HWBuffer);
|
||||
|
|
|
@ -227,7 +227,6 @@ namespace video
|
|||
: CD3D9ShaderMaterialRenderer(d3ddev, driver, 0, baseMaterial),
|
||||
CurrentScale(0.0f)
|
||||
{
|
||||
|
||||
#ifdef _DEBUG
|
||||
setDebugName("CD3D9ParallaxMapRenderer");
|
||||
#endif
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace scene
|
|||
class ISceneNodeAnimator;
|
||||
class ISceneManager;
|
||||
|
||||
//! Interface making it possible to dynamicly create scene nodes animators
|
||||
//! Interface making it possible to dynamicly create scene nodes animators
|
||||
class CDefaultSceneNodeAnimatorFactory : public ISceneNodeAnimatorFactory
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace scene
|
|||
class ISceneNode;
|
||||
class ISceneManager;
|
||||
|
||||
//! Interface making it possible to dynamicly create scene nodes and animators
|
||||
//! Interface making it possible to dynamicly create scene nodes and animators
|
||||
class CDefaultSceneNodeFactory : public ISceneNodeFactory
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -28,10 +28,9 @@ public:
|
|||
//! \param useAlphaChannel: true if the alpha channel from the texture should be used
|
||||
//! \return
|
||||
//! true if the image list was created
|
||||
bool createImageList(
|
||||
video::ITexture* texture,
|
||||
core::dimension2d<s32> imageSize,
|
||||
bool useAlphaChannel );
|
||||
bool createImageList(video::ITexture* texture,
|
||||
core::dimension2d<s32> imageSize,
|
||||
bool useAlphaChannel);
|
||||
|
||||
//! Draws an image and clips it to the specified rectangle if wanted
|
||||
//! \param index: Index of the image
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -677,9 +677,11 @@ bool CIrrDeviceLinux::createWindow()
|
|||
int y = 0;
|
||||
|
||||
if (!CreationParams.Fullscreen)
|
||||
{
|
||||
if (CreationParams.WindowPosition.X > 0) x = CreationParams.WindowPosition.X;
|
||||
if (CreationParams.WindowPosition.Y > 0) y = CreationParams.WindowPosition.Y;
|
||||
{
|
||||
if (CreationParams.WindowPosition.X > 0)
|
||||
x = CreationParams.WindowPosition.X;
|
||||
if (CreationParams.WindowPosition.Y > 0)
|
||||
y = CreationParams.WindowPosition.Y;
|
||||
}
|
||||
|
||||
// create new Window
|
||||
|
|
|
@ -77,8 +77,8 @@ 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,17 +140,31 @@ namespace irr
|
|||
BOOL gotCursorInfo = GetCursorInfo(&info);
|
||||
while ( gotCursorInfo )
|
||||
{
|
||||
if ( (visible && info.flags == CURSOR_SHOWING) // visible
|
||||
|| (!visible && info.flags == 0 ) ) // hidden
|
||||
#ifdef CURSOR_SUPPRESSED
|
||||
// new flag for Windows 8, where cursor
|
||||
// might be suppressed for touch interface
|
||||
if (info.flags == CURSOR_SUPPRESSED)
|
||||
{
|
||||
visible=false;
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
if ( (visible && info.flags == CURSOR_SHOWING) || // visible
|
||||
(!visible && info.flags == 0 ) ) // hidden
|
||||
{
|
||||
break;
|
||||
}
|
||||
int showResult = ShowCursor(visible); // this only increases an internal display counter in windows, so it might have to be called some more
|
||||
if ( showResult < 0 )
|
||||
{
|
||||
// this only increases an internal
|
||||
// display counter in windows, so it
|
||||
// might have to be called some more
|
||||
const int showResult = ShowCursor(visible);
|
||||
// if result has correct sign we can
|
||||
// stop here as well
|
||||
if (( !visible && showResult < 0 ) ||
|
||||
(visible && showResult >= 0))
|
||||
break;
|
||||
}
|
||||
info.cbSize = sizeof(CURSORINFO); // yes, it really must be set each time
|
||||
// yes, it really must be set each time
|
||||
info.cbSize = sizeof(CURSORINFO);
|
||||
gotCursorInfo = GetCursorInfo(&info);
|
||||
}
|
||||
IsVisible = visible;
|
||||
|
@ -190,7 +204,7 @@ namespace irr
|
|||
if (UseReferenceRect)
|
||||
{
|
||||
SetCursorPos(ReferenceRect.UpperLeftCorner.X + x,
|
||||
ReferenceRect.UpperLeftCorner.Y + y);
|
||||
ReferenceRect.UpperLeftCorner.Y + y);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -263,23 +277,23 @@ namespace irr
|
|||
/** Used to notify the cursor that the window resizable settings changed. */
|
||||
void updateBorderSize(bool fullscreen, bool resizable)
|
||||
{
|
||||
if (!fullscreen)
|
||||
{
|
||||
if (resizable)
|
||||
{
|
||||
BorderX = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYSIZEFRAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
BorderX = GetSystemMetrics(SM_CXDLGFRAME);
|
||||
BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BorderX = BorderY = 0;
|
||||
}
|
||||
if (!fullscreen)
|
||||
{
|
||||
if (resizable)
|
||||
{
|
||||
BorderX = GetSystemMetrics(SM_CXSIZEFRAME);
|
||||
BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYSIZEFRAME);
|
||||
}
|
||||
else
|
||||
{
|
||||
BorderX = GetSystemMetrics(SM_CXDLGFRAME);
|
||||
BorderY = GetSystemMetrics(SM_CYCAPTION) + GetSystemMetrics(SM_CYDLGFRAME);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BorderX = BorderY = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -298,10 +312,10 @@ namespace irr
|
|||
//! replace the given cursor icon.
|
||||
virtual void changeIcon(gui::ECURSOR_ICON iconId, const gui::SCursorSprite& icon);
|
||||
|
||||
//! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work.
|
||||
//! Return a system-specific size which is supported for cursors. Larger icons will fail, smaller icons might work.
|
||||
virtual core::dimension2di getSupportedIconSize() const;
|
||||
|
||||
void update();
|
||||
void update();
|
||||
|
||||
private:
|
||||
|
||||
|
@ -339,7 +353,7 @@ namespace irr
|
|||
}
|
||||
}
|
||||
|
||||
CIrrDeviceWin32* Device;
|
||||
CIrrDeviceWin32* Device;
|
||||
core::position2d<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
|
||||
{
|
||||
|
|
|
@ -60,7 +60,6 @@ public:
|
|||
//! Creates a clone of this scene node and its children.
|
||||
virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
|
||||
|
||||
|
||||
//! Sets the light's radius of influence.
|
||||
/** Outside this radius the light won't lighten geometry and cast no
|
||||
shadows. Setting the radius will also influence the attenuation, setting
|
||||
|
|
|
@ -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
|
||||
|
||||
};
|
||||
|
|
|
@ -828,7 +828,7 @@ void COgreMeshFileLoader::composeObject(void)
|
|||
rotkey->frame=frame.Time*25;
|
||||
|
||||
// IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from keyjoint->LocalMatrix to keyjoint->LocalMatrix.getTransposed() for downward compatibility.
|
||||
// Not tested so far if this was correct or wrong before quaternion fix!
|
||||
// Not tested so far if this was correct or wrong before quaternion fix!
|
||||
rotkey->rotation=core::quaternion(keyjoint->LocalMatrix.getTransposed())*frame.Orientation;
|
||||
|
||||
ISkinnedMesh::SScaleKey* scalekey = m->addScaleKey(keyjoint);
|
||||
|
|
|
@ -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);
|
||||
|
@ -418,11 +418,11 @@ namespace video
|
|||
//! Get ZBuffer bits.
|
||||
GLenum getZBufferBits() const;
|
||||
|
||||
//! Get current material.
|
||||
const SMaterial& getCurrentMaterial() const;
|
||||
//! Get current material.
|
||||
const SMaterial& getCurrentMaterial() const;
|
||||
|
||||
//! Get bridge calls.
|
||||
COpenGLCallBridge* getBridgeCalls() 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
|
||||
|
@ -630,13 +630,13 @@ namespace video
|
|||
E_DEVICE_TYPE DeviceType;
|
||||
};
|
||||
|
||||
//! This bridge between Irlicht pseudo OpenGL calls
|
||||
//! and true OpenGL calls.
|
||||
//! This bridge between Irlicht pseudo OpenGL calls
|
||||
//! and true OpenGL calls.
|
||||
|
||||
class COpenGLCallBridge
|
||||
{
|
||||
public:
|
||||
COpenGLCallBridge(COpenGLDriver* driver);
|
||||
class COpenGLCallBridge
|
||||
{
|
||||
public:
|
||||
COpenGLCallBridge(COpenGLDriver* driver);
|
||||
|
||||
// Alpha calls.
|
||||
|
||||
|
@ -660,28 +660,28 @@ namespace video
|
|||
|
||||
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.
|
||||
// Matrix calls.
|
||||
|
||||
void setMatrixMode(GLenum mode);
|
||||
void setMatrixMode(GLenum mode);
|
||||
|
||||
// Texture calls.
|
||||
// Texture calls.
|
||||
|
||||
void setActiveTexture(GLenum texture);
|
||||
void setActiveTexture(GLenum texture);
|
||||
|
||||
void setClientActiveTexture(GLenum texture);
|
||||
|
||||
void setTexture(u32 stage, bool fixedPipeline);
|
||||
void setTexture(u32 stage, bool fixedPipeline);
|
||||
|
||||
private:
|
||||
COpenGLDriver* Driver;
|
||||
private:
|
||||
COpenGLDriver* Driver;
|
||||
|
||||
GLenum AlphaMode;
|
||||
GLclampf AlphaRef;
|
||||
|
@ -700,17 +700,17 @@ namespace video
|
|||
bool CullFace;
|
||||
|
||||
GLenum DepthFunc;
|
||||
bool DepthMask;
|
||||
bool DepthTest;
|
||||
bool DepthMask;
|
||||
bool DepthTest;
|
||||
|
||||
GLenum MatrixMode;
|
||||
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
|
||||
|
|
|
@ -36,12 +36,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -445,30 +445,15 @@ void COpenGLTexture::uploadTexture(bool newTexture, void* mipmapData, u32 level)
|
|||
|
||||
if (!level && newTexture)
|
||||
{
|
||||
if (!IsCompressed && HasMipMaps && !mipmapData && Driver->queryFeature(EVDF_MIP_MAP_AUTO_UPDATE))
|
||||
if (IsCompressed && !mipmapData)
|
||||
{
|
||||
if (!MipmapLegacyMode && AutomaticMipmapUpdate)
|
||||
{
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
Driver->extGlGenerateMipmap(GL_TEXTURE_2D);
|
||||
}
|
||||
if (image->hasMipMaps())
|
||||
mipmapData = static_cast<u8*>(image->lock())+compressedDataSize;
|
||||
else
|
||||
HasMipMaps = false;
|
||||
}
|
||||
else if(HasMipMaps)
|
||||
{
|
||||
// Either generate manually due to missing capability
|
||||
// or use predefined mipmap data eg. for compressed textures
|
||||
AutomaticMipmapUpdate=false;
|
||||
|
||||
if (IsCompressed && !mipmapData)
|
||||
{
|
||||
if (image->hasMipMaps())
|
||||
mipmapData = static_cast<u8*>(image->lock())+compressedDataSize;
|
||||
else
|
||||
HasMipMaps = false;
|
||||
}
|
||||
|
||||
regenerateMipMapLevels(mipmapData);
|
||||
}
|
||||
regenerateMipMapLevels(mipmapData);
|
||||
|
||||
if (HasMipMaps) // might have changed in regenerateMipMapLevels
|
||||
{
|
||||
|
@ -686,12 +671,34 @@ bool COpenGLTexture::hasMipMaps() const
|
|||
//! modifying the texture
|
||||
void COpenGLTexture::regenerateMipMapLevels(void* mipmapData)
|
||||
{
|
||||
if (AutomaticMipmapUpdate || !HasMipMaps || !Image)
|
||||
// texture require mipmaps?
|
||||
if (!HasMipMaps)
|
||||
return;
|
||||
if (IsCompressed && !mipmapData)
|
||||
return;
|
||||
if ((Image->getDimension().Width==1) && (Image->getDimension().Height==1))
|
||||
|
||||
// we don't use custom data for mipmaps.
|
||||
if (!mipmapData)
|
||||
{
|
||||
// compressed textures require custom data for prepare mipmaps.
|
||||
if (IsCompressed)
|
||||
return;
|
||||
|
||||
// texture use legacy method for generate mipmaps?
|
||||
if (AutomaticMipmapUpdate && MipmapLegacyMode)
|
||||
return;
|
||||
|
||||
// hardware doesn't support generate mipmaps for certain texture but image data doesn't exist or is wrong.
|
||||
if (!AutomaticMipmapUpdate && (!Image || (Image && ((Image->getDimension().Width==1) && (Image->getDimension().Height==1)))))
|
||||
return;
|
||||
}
|
||||
|
||||
// hardware moethods for generate mipmaps.
|
||||
if (!mipmapData && AutomaticMipmapUpdate && !MipmapLegacyMode)
|
||||
{
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
Driver->extGlGenerateMipmap(GL_TEXTURE_2D);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Manually create mipmaps or use prepared version
|
||||
u32 compressedDataSize = 0;
|
||||
|
|
|
@ -142,9 +142,9 @@ bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla
|
|||
for (u32 j=0; j < mb->getIndexCount(); j+=3)
|
||||
{
|
||||
// y and z are flipped so triangles are reversed
|
||||
u32 a=StartOffset,
|
||||
b=StartOffset,
|
||||
c=StartOffset;
|
||||
u32 a=StartOffset;
|
||||
u32 b=StartOffset;
|
||||
u32 c=StartOffset;
|
||||
|
||||
switch(mb->getIndexType())
|
||||
{
|
||||
|
@ -171,8 +171,6 @@ bool CPLYMeshWriter::writeMesh(io::IWriteFile* file, scene::IMesh* mesh, s32 fla
|
|||
}
|
||||
|
||||
// all done!
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace scene
|
|||
|
||||
//! constructor
|
||||
CShadowVolumeSceneNode(const IMesh* shadowMesh, ISceneNode* parent, ISceneManager* mgr,
|
||||
s32 id, bool zfailmethod=true, f32 infinity=10000.0f);
|
||||
s32 id, bool zfailmethod=true, f32 infinity=10000.0f);
|
||||
|
||||
//! destructor
|
||||
virtual ~CShadowVolumeSceneNode();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -144,7 +144,6 @@ REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
@ -164,7 +163,6 @@ REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
@ -246,7 +244,6 @@ REALINLINE void CTRTextureLightMap2_M1::scanline_bilinear2 ()
|
|||
}
|
||||
|
||||
|
||||
|
||||
void CTRTextureLightMap2_M1::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c )
|
||||
{
|
||||
sScanConvertData scan;
|
||||
|
|
|
@ -144,7 +144,6 @@ REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
@ -164,7 +163,6 @@ REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
@ -246,7 +244,6 @@ REALINLINE void CTRTextureLightMap2_M2::scanline_bilinear2 ()
|
|||
}
|
||||
|
||||
|
||||
|
||||
void CTRTextureLightMap2_M2::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const s4DVertex *c )
|
||||
{
|
||||
sScanConvertData scan;
|
||||
|
|
|
@ -149,7 +149,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
@ -169,7 +168,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
@ -249,8 +247,7 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_mag ()
|
|||
|
||||
}
|
||||
|
||||
/*!
|
||||
*/
|
||||
|
||||
REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min ()
|
||||
{
|
||||
tVideoSample *dst;
|
||||
|
@ -292,7 +289,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
@ -312,7 +308,6 @@ REALINLINE void CTRTextureLightMap2_M4::scanline_bilinear2_min ()
|
|||
i += 1;
|
||||
if ( i > dx )
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
// lazy setup rest of scanline
|
||||
|
|
|
@ -114,7 +114,6 @@ static inline void swap_xor ( s32 &a, s32 &b )
|
|||
*/
|
||||
void CTRTextureWire2::renderLine ( const s4DVertex *a,const s4DVertex *b ) const
|
||||
{
|
||||
|
||||
int pitch0 = RenderTarget->getDimension().Width << VIDEO_SAMPLE_GRANULARITY;
|
||||
int pitch1 = RenderTarget->getDimension().Width << 2;
|
||||
|
||||
|
|
|
@ -259,9 +259,7 @@ namespace scene
|
|||
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
|
||||
|
|
|
@ -48,7 +48,7 @@ namespace io
|
|||
|
||||
struct SWADFileHeader
|
||||
{
|
||||
c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife
|
||||
c8 tag[4]; // type of WAD format WAD2 = quake2, WAD3 = halflife
|
||||
u32 numlumps;
|
||||
u32 infotableofs;
|
||||
} PACK_STRUCT;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1879,7 +1879,7 @@ bool CXMeshFileLoader::parseDataObjectAnimationKey(ISkinnedMesh::SJoint *joint)
|
|||
keyR->frame=time;
|
||||
|
||||
// IRR_TEST_BROKEN_QUATERNION_USE: TODO - switched from mat to mat.getTransposed() for downward compatibility.
|
||||
// Not tested so far if this was correct or wrong before quaternion fix!
|
||||
// Not tested so far if this was correct or wrong before quaternion fix!
|
||||
keyR->rotation= core::quaternion(mat.getTransposed());
|
||||
|
||||
ISkinnedMesh::SPositionKey *keyP=AnimatedMesh->addPositionKey(joint);
|
||||
|
|
Binary file not shown.
|
@ -343,7 +343,7 @@
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
@ -420,7 +420,7 @@
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -504,7 +504,7 @@
|
|||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">
|
||||
|
@ -791,7 +791,7 @@
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">
|
||||
|
|
|
@ -349,7 +349,7 @@
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||
|
@ -426,7 +426,7 @@
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||
|
@ -510,7 +510,7 @@
|
|||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<SubSystem>Windows</SubSystem>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release - Fast FPU|x64'">
|
||||
|
@ -797,7 +797,7 @@
|
|||
<DataExecutionPrevention>
|
||||
</DataExecutionPrevention>
|
||||
<ImportLibrary>..\..\lib\Win32-visualstudio\Irrlicht.lib</ImportLibrary>
|
||||
<Version>1.8</Version>
|
||||
<Version>1.9</Version>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='SDL-Debug|x64'">
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
VERSION_MAJOR = 1
|
||||
VERSION_MINOR = 8
|
||||
VERSION_MINOR = 9
|
||||
VERSION_RELEASE = 0
|
||||
# Irrlicht Engine 1.8.0
|
||||
# Irrlicht Engine 1.9.0
|
||||
# Makefile for Linux
|
||||
#
|
||||
# To use, just run:
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue