Merged revisions 2441:2694 from trunk. This is a huge update which brings the ogl-es branch to the latest 1.6 state. No updates for the ogl-es driver have been incorporated, this branch might not even compile properly right now. I'm just very happy that the merge finally went through...

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@2695 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2009-09-16 12:48:19 +00:00
parent 735dca5817
commit 72e83023ec
482 changed files with 14995 additions and 9451 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1584,3 +1584,61 @@ Changed parameter type (interpolation factor must not be int)
vector2d<T> getInterpolated_quadratic(const vector2d<T>& v2, const vector2d<T>& v3, f64 d) const
vector2d<T>& interpolate(const vector2d<T>& a, const vector2d<T>& b, f64 d)
Changes for Version 1.5.1
-------------------------
This release is a pure bugfixes release, with almost no visible API changes. All changes should be backward compatible (as it's just a minor release), but you have to recompile the app due to changes in the virtual method tables.
dimension2d.h
Fixed a bug in the operator+=, added operator-= and changed comparison to equal() method.
dimension2d<T>& operator-=(const dimension2d<T>& other)
IrrCompileConfig.h
Added defines to check for the Irrlicht version in the code.
IRRLICHT_VERSION_MAJOR
IRRLICHT_VERSION_MINOR
IRRLICHT_VERSION_REVISION
IRRLICHT_VERSION_SVN // only defined if you're using a version from SVN, i.e. not officially released one
IrrlichtDevice.h
Added static method isDriverSupported which checks the driver support of the library
static bool isDriverSupported(video::E_DRIVER_TYPE driver)
irrMath.h
Added iszero specialization for f64
bool iszero(const f64 a, const f64 tolerance = ROUNDING_ERROR_64)
irrXML.h
Added deleteCallback flag for cleanup of the ReadCallback.
IrrXMLReader* createIrrXMLReader(IFileReadCallBack* callback, bool deleteCallback = false);
IrrXMLReaderUTF16* createIrrXMLReaderUTF16(IFileReadCallBack* callback, bool deleteCallback = false);
IrrXMLReaderUTF32* createIrrXMLReaderUTF32(IFileReadCallBack* callback, bool deleteCallback = false);
ISceneNode.h
Added getSceneManager to get the currently used scene manager of the node.
ISceneManager* getSceneManager(void) const
IVideoDriver.h
Added default values for vType, pType, and iType
virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount, const void* indexList, u32 primCount,
E_VERTEX_TYPE vType=EVT_STANDARD, scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES, E_INDEX_TYPE iType=EIT_16BIT)
Added method to draw 2d rectangle outline
void draw2DRectangleOutline(const core::recti& pos, SColor color=SColor(255,255,255,255))
matrix4.h
Added method to get transposedInverse
CMatrix4<T> transposedInverse(*this, EM4CONST_INVERSE_TRANSPOSED)
rect.h
Added typedefs
typedef rect<f32> rectf;
typedef rect<s32> recti;
SSharedMeshBuffer.h
Split hardware mapping hint into vertex and index part
E_HARDWARE_MAPPING getHardwareMappingHint_Vertex() const
E_HARDWARE_MAPPING getHardwareMappingHint_Index() const
void setHardwareMappingHint( E_HARDWARE_MAPPING NewMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX )
vector2d.h
Fix angle calculation for integer vectors

View File

@ -7,38 +7,47 @@
<Option compiler="gcc" />
<Build>
<Target title="Linux">
<Option output="HelloWorld" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/HelloWorld" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
<Target title="default">
<Option output="..\..\bin\gcc\HelloWorld" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/HelloWorld" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="../../lib/Win32-gcc" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc/" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="../../lib/gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -20,13 +20,15 @@ OGLESLIBS := -L$(HOME)/irrlicht/SDKPackage-ogles1/Builds/OGLES/LinuxPC/Lib -lGLE
# target specific settings
all_linux: LDFLAGS = -L/usr/X11R6/lib$(LIBSELECT) -L../../lib/Linux -lIrrlicht $(OGLESLIBS) -lXxf86vm -lXext -lX11
all_linux clean_linux: SYSTEM=Linux
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht -lopengl32 -lm
all_win32 clean_win32: SYSTEM=Win32-gcc
all_win32 clean_win32: SUF=.exe
all_win32: LDFLAGS = -L../../lib/Win32-gcc -lIrrlicht
static_win32: LDFLAGS += -lgdi32 -lopengl32 -ld3dx9d -lwinmm -lm
static_win32: CPPFLAGS += -D_IRR_STATIC_LIB_
static_win32 all_win32 clean_win32: SYSTEM=Win32-gcc
static_win32 all_win32 clean_win32: SUF=.exe
# name of the binary - only valid for targets which set SYSTEM
DESTPATH = ../../bin/$(SYSTEM)/$(Target)$(SUF)
all_linux all_win32:
all_linux all_win32 static_win32:
$(warning Building...)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) $(Sources) -o $(DESTPATH) $(LDFLAGS)
@ -36,4 +38,4 @@ clean: clean_linux clean_win32
clean_linux clean_win32:
@$(RM) $(DESTPATH)
.PHONY: all all_win32 clean clean_linux clean_win32
.PHONY: all all_win32 clean clean_linux clean_win32 static_win32

View File

@ -7,18 +7,24 @@
<Option compiler="gcc" />
<Build>
<Target title="Linux">
<Option output="Quake3Map" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/QuakeMap" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
<Target title="default">
<Option output="..\..\bin\gcc\Quake3Map" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/Quake3Map" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
@ -26,19 +32,21 @@
<Add option="-Wall" />
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,29 +6,42 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="../../bin/gcc/CustomSceneNode" prefix_auto="0" extension_auto="1" />
<Target title="Linux">
<Option platforms="Unix;" />
<Option output="../../bin/Linux/CustomSceneNode" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
</Target>
<Target title="Linux">
<Option output="CustomSceneNode" prefix_auto="1" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux/" />
</Linker>
</Target>
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/CustomSceneNode" prefix_auto="1" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc/" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Linux;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="../../include" />
</Compiler>

View File

@ -6,35 +6,46 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\Movement" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option output="../../bin/gcc/Movement" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="Movement" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/Movement" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\UserInterface" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/gcc/UserInterface" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="UserInterface" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/UserInterface" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\2DGraphics" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/2DGraphics" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="2DGraphics" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/2DGraphics" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\Collision" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/Collision" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="Collision" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/Collision" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\SpecialFX" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/SpecialFX" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="SpecialFX" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/SpeciaFX" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,46 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\MeshViewer" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/MeshViewer" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="MeshViewer" prefix_auto="1" extension_auto="1" />
<Option output="../../bin/Linux/MeshViewer" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -35,6 +35,7 @@ core::stringw Caption;
scene::ISceneNode* Model = 0;
scene::ISceneNode* SkyBox = 0;
bool Octree=false;
bool useLight=false;
scene::ICameraSceneNode* Camera[2] = {0, 0};
@ -186,7 +187,8 @@ void loadModel(const c8* fn)
animModel->setAnimationSpeed(30);
Model = animModel;
}
Model->setMaterialFlag(video::EMF_LIGHTING, false);
Model->setMaterialFlag(video::EMF_LIGHTING, useLight);
Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, useLight);
// Model->setMaterialFlag(video::EMF_BACK_FACE_CULLING, false);
Model->setDebugDataVisible(scene::EDS_OFF);
@ -196,9 +198,13 @@ void loadModel(const c8* fn)
if (menu)
for(int item = 1; item < 6; ++item)
menu->setItemChecked(item, false);
Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_X_SCALE, true)->setText(L"1.0");
Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_Y_SCALE, true)->setText(L"1.0");
Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_Z_SCALE, true)->setText(L"1.0");
IGUIElement* toolboxWnd = Device->getGUIEnvironment()->getRootGUIElement()->getElementFromId(GUI_ID_DIALOG_ROOT_WINDOW, true);
if ( toolboxWnd )
{
toolboxWnd->getElementFromId(GUI_ID_X_SCALE, true)->setText(L"1.0");
toolboxWnd->getElementFromId(GUI_ID_Y_SCALE, true)->setText(L"1.0");
toolboxWnd->getElementFromId(GUI_ID_Z_SCALE, true)->setText(L"1.0");
}
}
@ -302,6 +308,15 @@ public:
if (Device)
Device->minimizeWindow();
}
else if (event.KeyInput.Key == irr::KEY_KEY_L)
{
useLight=!useLight;
if (Model)
{
Model->setMaterialFlag(video::EMF_LIGHTING, useLight);
Model->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, useLight);
}
}
}
if (event.EventType == EET_GUI_EVENT)
@ -593,8 +608,8 @@ int main(int argc, char* argv[])
driver->setTextureCreationFlag(video::ETCF_ALWAYS_32_BIT, true);
smgr->addLightSceneNode();
smgr->addLightSceneNode(0, core::vector3df(50,-50,GUI_ID_OPEN_MODEL),
video::SColorf(1.0f,1.0f,1.0f),2000)->setPosition(core::vector3df(200,200,200));
smgr->addLightSceneNode(0, core::vector3df(200,200,200),
video::SColorf(1.0f,1.0f,1.0f),2000);
// add our media directory as "search path"
Device->getFileSystem()->addFolderFileArchive("../../media/");

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\Shaders" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/Shaders" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="Shaders" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/Shaders" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -66,14 +66,14 @@ public:
// set clip matrix
core::matrix4 worldViewProj;
worldViewProj = driver->getTransform(video::ETS_PROJECTION);
worldViewProj = driver->getTransform(video::ETS_PROJECTION);
worldViewProj *= driver->getTransform(video::ETS_VIEW);
worldViewProj *= driver->getTransform(video::ETS_WORLD);
if (UseHighLevelShaders)
services->setVertexShaderConstant("mWorldViewProj", worldViewProj.pointer(), 16);
else
services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4);
services->setVertexShaderConstant(worldViewProj.pointer(), 4, 4);
// set camera position
@ -96,7 +96,7 @@ public:
services->setVertexShaderConstant(reinterpret_cast<f32*>(&col), 9, 1);
// set transposed world matrix
core::matrix4 world = driver->getTransform(video::ETS_WORLD);
world = world.getTransposed();
@ -135,7 +135,7 @@ int main()
case 'e': driverType = video::EDT_BURNINGSVIDEO;break;
case 'f': driverType = video::EDT_NULL; break;
default: return 1;
}
}
// ask the user if we should use high level shaders for this example
if (driverType == video::EDT_DIRECT3D9 ||
@ -170,9 +170,9 @@ int main()
the shaders directly as strings into the cpp source file, and use later
addShaderMaterial() instead of addShaderMaterialFromFiles().
*/
core::string<c16> vsFileName; // filename for the vertex shader
core::string<c16> psFileName; // filename for the pixel shader
io::path vsFileName; // filename for the vertex shader
io::path psFileName; // filename for the pixel shader
switch(driverType)
{
@ -227,7 +227,7 @@ int main()
"because of missing driver/hardware support.");
psFileName = "";
}
if (!driver->queryFeature(video::EVDF_VERTEX_SHADER_1_1) &&
!driver->queryFeature(video::EVDF_ARB_VERTEX_PROGRAM_1))
{
@ -413,7 +413,7 @@ int main()
}
device->drop();
return 0;
}

View File

@ -6,35 +6,45 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\PerPixelLighting" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/gcc/PerPixelLighting" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
</Target>
<Target title="Linux">
<Option output="PerPixelLighting" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/PerPixelLighting" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
<Add directory="../../lib/gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -222,7 +222,7 @@ int main()
Please note that you will have to set the material flag EMF_FOG_ENABLE
to 'true' in every scene node which should be affected by this fog.
*/
driver->setFog(video::SColor(0,138,125,81), true, 250, 1000, 0, true);
driver->setFog(video::SColor(0,138,125,81), video::EFT_FOG_LINEAR, 250, 1000, .003f, true, false);
/*
To be able to display something interesting, we load a mesh from a .3ds

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\TerrainRendering" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/TerrainRendering" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="TerrainRendering" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/TerrainRendering" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-w" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\RenderToTexture" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/RenderToTexture" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="RenderToTexture" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/RenderToTexture" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -7,24 +7,31 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\Win32Window" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/Win32Window" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,40 +6,48 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="../../bin/gcc/LoadIrrFile" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/LoadIrrFile" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="LoadIrrFile" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/LoadIrrFile" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option use_console_runner="0" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="../../lib/gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,46 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\Q3MapShader" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/Q3MapShader" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add directory="../../lib/Win32-gcc" />
</Compiler>
</Target>
<Target title="Linux">
<Option output="Q3MapShader" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/Q3MapShader" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
<Add directory="../../lib/Linux" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,35 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\SplitScreen" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/SplitScreen" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="SplitScreen" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/SplitScreen" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,39 +6,47 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\MouseAndJoystick" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/gcc/MouseAndJoystick" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option output="default" prefix_auto="1" extension_auto="1" />
<Option platforms="Unix;" />
<Option output="../../bin/Linux/MouseAndJoystick" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="Irrlicht" />
<Add library="GL" />
<Add directory="../../lib/gcc" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -6,28 +6,48 @@
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="default">
<Option output="..\..\bin\gcc\ManagedLights" prefix_auto="0" extension_auto="1" />
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/ManagedLights" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc" />
</Linker>
</Target>
<Target title="Linux">
<Option platforms="Unix;" />
<Option output="../../bin/Linux/ManagedLights" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="GL" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="default;" />
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-Wall" />
<Add option="-W" />
<Add option="-g" />
<Add directory="..\..\include" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
<Add directory="..\..\lib\gcc" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="Irrlicht Example 21 Quake 3 Explorer" />
<Option pch_mode="0" />
<Option compiler="gcc" />
<Build>
<Target title="Linux">
<Option platforms="Unix;" />
<Option output="../../bin/Linux/Quake3Explorer" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" />
</Compiler>
<Linker>
<Add library="Xxf86vm" />
<Add library="GL" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/Quake3Explorer" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add directory="../../lib/Win32-gcc" />
</Compiler>
<Linker>
<Add directory="../../lib/Win32-gcc/" />
</Linker>
</Target>
</Build>
<VirtualTargets>
<Add alias="All" targets="Windows;" />
</VirtualTargets>
<Compiler>
<Add option="-W" />
<Add option="-g" />
<Add directory="../../include" />
</Compiler>
<Linker>
<Add library="Irrlicht" />
</Linker>
<Unit filename="main.cpp" />
<Unit filename="q3factory.cpp" />
<Unit filename="q3factory.h" />
<Unit filename="sound.cpp" />
<Unit filename="sound.h" />
<Extensions>
<code_completion />
<debugger />
<envvars />
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@ -13,7 +13,7 @@ Features:
- Play music
You can download the Quake III Arena demo ( copyright id software )
at the following location:
at the following location:
ftp://ftp.idsoftware.com/idstuff/quake3/win32/q3ademo.exe
Copyright 2006-2009 Burningwater, Thomas Alten
@ -28,10 +28,10 @@ Copyright 2006-2009 Burningwater, Thomas Alten
*/
struct GameData
{
GameData ( const string<c16> &startupDir);
GameData ( const path &startupDir);
void setDefault ();
s32 save ( const string<c16> &filename );
s32 load ( const string<c16> &filename );
s32 save ( const path &filename );
s32 load ( const path &filename );
s32 debugState;
s32 gravityState;
@ -43,9 +43,9 @@ struct GameData
s32 retVal;
s32 sound;
string<c16> StartupDir;
path StartupDir;
stringw CurrentMapName;
array < string<c16> > CurrentArchiveList;
array<path> CurrentArchiveList;
vector3df PlayerPosition;
vector3df PlayerRotation;
@ -60,7 +60,7 @@ struct GameData
/*!
*/
GameData::GameData ( const string<c16> &startupDir)
GameData::GameData ( const path &startupDir)
{
retVal = 0;
createExDevice = 0;
@ -127,14 +127,14 @@ void GameData::setDefault ()
/*!
Load the current game State from a typical quake3 cfg file
*/
s32 GameData::load ( const string<c16> &filename )
s32 GameData::load ( const path &filename )
{
if ( 0 == Device )
if (!Device)
return 0;
//! the quake3 mesh loader can also handle *.shader and *.cfg file
IQ3LevelMesh* mesh = (IQ3LevelMesh*) Device->getSceneManager()->getMesh ( filename );
if ( 0 == mesh )
if (!mesh)
return 0;
tQ3EntityList &entityList = mesh->getEntityList ();
@ -174,10 +174,10 @@ s32 GameData::load ( const string<c16> &filename )
/*!
Store the current game State in a quake3 configuration file
*/
s32 GameData::save ( const string<c16> &filename )
s32 GameData::save ( const path &filename )
{
return 0;
if ( 0 == Device )
if (!Device)
return 0;
c8 buf[128];
@ -188,7 +188,7 @@ s32 GameData::save ( const string<c16> &filename )
IFileSystem *fs = Device->getFileSystem();
for ( i = 0; i != fs->getFileArchiveCount(); ++i )
{
CurrentArchiveList.push_back ( fs->getFileArchive ( i )->getArchiveName() );
CurrentArchiveList.push_back ( fs->getFileArchive(i)->getFileList()->getPath() );
}
// Store Player Position and Rotation
@ -198,9 +198,9 @@ s32 GameData::save ( const string<c16> &filename )
PlayerPosition = camera->getPosition ();
PlayerRotation = camera->getRotation ();
}
IWriteFile *file = fs->createAndWriteFile ( filename );
if ( 0 == file )
if (!file)
return 0;
snprintf ( buf, 128, "playerposition %.f %.f %.f\nplayerrotation %.f %.f %.f\n",
@ -209,7 +209,7 @@ s32 GameData::save ( const string<c16> &filename )
file->write ( buf, (s32) strlen ( buf ) );
for ( i = 0; i != fs->getFileArchiveCount(); ++i )
{
snprintf ( buf, 128, "archive %s\n",stringc ( fs->getFileArchive ( i )->getArchiveName() ).c_str () );
snprintf ( buf, 128, "archive %s\n",stringc ( fs->getFileArchive(i)->getFileList()->getPath() ).c_str () );
file->write ( buf, (s32) strlen ( buf ) );
}
@ -231,7 +231,7 @@ struct Q3Player : public IAnimationEndCallBack
virtual void OnAnimationEnd(IAnimatedMeshSceneNode* node);
void create ( IrrlichtDevice *device,
void create ( IrrlichtDevice *device,
IQ3LevelMesh* mesh,
ISceneNode *mapNode,
IMetaTriangleSelector *meta
@ -338,19 +338,19 @@ void Q3Player::create ( IrrlichtDevice *device, IQ3LevelMesh* mesh, ISceneNode *
}
WeaponNode = smgr->addAnimatedMeshSceneNode(
weaponMesh,
weaponMesh,
smgr->getActiveCamera(),
10,
vector3df( 0, 0, 0),
vector3df(-90,-90,90)
);
);
WeaponNode->setMaterialFlag(EMF_LIGHTING, false);
WeaponNode->setMaterialTexture(0, driver->getTexture( "gun.jpg"));
WeaponNode->setLoopMode ( false );
WeaponNode->setName ( "tommi the gun man" );
//create a collision auto response animator
ISceneNodeAnimator* anim =
ISceneNodeAnimator* anim =
smgr->createCollisionResponseAnimator( meta, camera,
vector3df(30,45,30),
getGravity ( "earth" ),
@ -500,7 +500,7 @@ public:
void Animate();
void Render();
void AddArchive ( const core::string<c16>& archiveName );
void AddArchive ( const path& archiveName );
void LoadMap ( const stringw& mapName, s32 collision );
void CreatePlayers();
void AddSky( u32 dome, const c8 *texture );
@ -613,7 +613,7 @@ void CQuake3EventHandler::createTextures ()
texture = driver->addTexture( buf, image );
image->drop ();
}
// fog
for ( i = 0; i != 1; ++i )
{
@ -648,7 +648,9 @@ void CQuake3EventHandler::CreateGUI()
gui.drop();
// set skin font
env->getSkin()->setFont(env->getFont("fontlucida.png"));
IGUIFont* font = env->getFont("fontlucida.png");
if (font)
env->getSkin()->setFont(font);
env->getSkin()->setColor ( EGDC_BUTTON_TEXT, video::SColor(240,0xAA,0xAA,0xAA) );
env->getSkin()->setColor ( EGDC_3D_HIGH_LIGHT, video::SColor(240,0x22,0x22,0x22) );
env->getSkin()->setColor ( EGDC_3D_FACE, video::SColor(240,0x44,0x44,0x44) );
@ -713,7 +715,7 @@ void CQuake3EventHandler::CreateGUI()
else if ( core::equals ( aspect, 1.7777777f ) ) a = "16:9 widescreen";
else if ( core::equals ( aspect, 1.6f ) ) a = "16:10 widescreen";
else if ( core::equals ( aspect, 2.133333f ) ) a = "20:9 widescreen";
snprintf ( buf, sizeof ( buf ), "%d x %d, %s",w, h, a );
gui.VideoMode->addItem ( stringw ( buf ).c_str(), val );
}
@ -802,7 +804,7 @@ void CQuake3EventHandler::CreateGUI()
// create a visible Scene Tree
env->addStaticText ( L"Scenegraph:", rect<s32>( dim.Width - 400, dim.Height - 400, dim.Width - 5,dim.Height - 380 ),false, false, gui.Window, -1, false );
gui.SceneTree = env->addTreeView( rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),
gui.SceneTree = env->addTreeView( rect<s32>( dim.Width - 400, dim.Height - 380, dim.Width - 5, dim.Height - 40 ),
gui.Window, -1, true, true, false );
gui.SceneTree->setToolTipText ( L"Show the current Scenegraph" );
gui.SceneTree->getRoot()->clearChilds();
@ -831,7 +833,7 @@ void CQuake3EventHandler::CreateGUI()
/*!
Add an Archive to the FileSystems und updates the GUI
*/
void CQuake3EventHandler::AddArchive ( const core::string<c16>& archiveName )
void CQuake3EventHandler::AddArchive ( const path& archiveName )
{
IFileSystem *fs = Game->Device->getFileSystem();
u32 i;
@ -841,16 +843,16 @@ void CQuake3EventHandler::AddArchive ( const core::string<c16>& archiveName )
bool exists = false;
for ( i = 0; i != fs->getFileArchiveCount(); ++i )
{
if ( fs->getFileArchive ( i )->getArchiveName() == archiveName )
if ( fs->getFileArchive(i)->getFileList()->getPath() == archiveName )
{
exists = true;
break;
}
}
if ( !exists )
if (!exists)
{
fs->registerFileArchive ( archiveName, true, false );
fs->addFileArchive(archiveName, true, false);
}
}
@ -866,8 +868,30 @@ void CQuake3EventHandler::AddArchive ( const core::string<c16>& archiveName )
u32 index = gui.ArchiveList->addRow(i);
gui.ArchiveList->setCellText ( index, 0, archive->getArchiveType () );
gui.ArchiveList->setCellText ( index, 1, archive->getArchiveName () );
core::stringw typeName;
switch(archive->getType())
{
case io::EFAT_ZIP:
typeName = "ZIP";
break;
case io::EFAT_GZIP:
typeName = "gzip";
break;
case io::EFAT_FOLDER:
typeName = "Mount";
break;
case io::EFAT_PAK:
typeName = "PAK";
break;
case io::EFAT_TAR:
typeName = "TAR";
break;
default:
typeName = "archive";
}
gui.ArchiveList->setCellText ( index, 0, typeName );
gui.ArchiveList->setCellText ( index, 1, archive->getFileList()->getPath() );
}
}
@ -875,7 +899,7 @@ void CQuake3EventHandler::AddArchive ( const core::string<c16>& archiveName )
// browse the archives for maps
if ( gui.MapList )
{
gui.MapList->clear ();
gui.MapList->clear();
IGUISpriteBank *bank = Game->Device->getGUIEnvironment()->getSpriteBank("sprite_q3map");
if ( 0 == bank )
@ -904,16 +928,16 @@ void CQuake3EventHandler::AddArchive ( const core::string<c16>& archiveName )
if ( s.find ( ".bsp" ) >= 0 )
{
// get level screenshot. reformat texture to 128x128
string<c16> c ( s );
path c ( s );
deletePathFromFilename ( c );
cutFilenameExtension ( c, c );
c = string<c16> ( "levelshots/" ) + c;
c = path ( "levelshots/" ) + c;
dimension2du dim ( 128, 128 );
IVideoDriver * driver = Game->Device->getVideoDriver();
IImage* image = 0;
ITexture *tex = 0;
string<c16> filename;
path filename;
filename = c + ".jpg";
if ( fs->existFile ( filename ) )
@ -965,7 +989,7 @@ void CQuake3EventHandler::AddArchive ( const core::string<c16>& archiveName )
IGUIScrollBar * bar = (IGUIScrollBar*)gui.MapList->getElementFromId( 0 );
if ( bar )
bar->setPos ( 0 );
}
}
@ -1033,7 +1057,7 @@ void CQuake3EventHandler::LoadMap ( const stringw &mapName, s32 collision )
add the geometry mesh to the Scene ( polygon & patches )
The Geometry mesh is optimised for faster drawing
*/
IMesh *geometry = Mesh->getMesh(E_Q3_MESH_GEOMETRY);
if ( 0 == geometry || geometry->getMeshBufferCount() == 0)
return;
@ -1045,7 +1069,7 @@ void CQuake3EventHandler::LoadMap ( const stringw &mapName, s32 collision )
ITriangleSelector * selector = 0;
if (collision)
Meta = smgr->createMetaTriangleSelector();
Meta = smgr->createMetaTriangleSelector();
//IMeshBuffer *b0 = geometry->getMeshBuffer(0);
//s32 minimalNodes = b0 ? core::s32_max ( 2048, b0->getVertexCount() / 32 ) : 2048;
@ -1058,7 +1082,7 @@ void CQuake3EventHandler::LoadMap ( const stringw &mapName, s32 collision )
{
selector = smgr->createOctTreeTriangleSelector( geometry,MapParent, minimalNodes);
//selector = smgr->createTriangleSelector ( geometry, MapParent );
Meta->addTriangleSelector( selector);
Meta->addTriangleSelector( selector);
selector->drop ();
}
@ -1261,7 +1285,7 @@ void CQuake3EventHandler::SetGUIActive( s32 command)
case 0: Game->guiActive = 0; inputState = !Game->guiActive; break;
case 1: Game->guiActive = 1; inputState = !Game->guiActive;;break;
case 2: Game->guiActive ^= 1; inputState = !Game->guiActive;break;
case 3:
case 3:
if ( camera )
inputState = !camera->isInputReceiverEnabled();
break;
@ -1327,7 +1351,7 @@ bool CQuake3EventHandler::OnEvent(const SEvent& eve)
else
if ( eve.GUIEvent.Caller == gui.ArchiveRemove && eve.GUIEvent.EventType == gui::EGET_BUTTON_CLICKED )
{
Game->Device->getFileSystem()->unregisterFileArchive ( gui.ArchiveList->getSelected () );
Game->Device->getFileSystem()->removeFileArchive( gui.ArchiveList->getSelected() );
Game->CurrentMapName = "";
AddArchive ( "" );
}
@ -1516,14 +1540,14 @@ bool CQuake3EventHandler::OnEvent(const SEvent& eve)
static const c8 *dName[] = { "null", "software", "burning",
"d3d8", "d3d9", "opengl" };
snprintf(buf, 256, "%s_%ls_%.0f_%.0f_%.0f_%.0f_%.0f_%.0f.jpg",
dName[Game->Device->getVideoDriver()->getDriverType()],
Game->CurrentMapName.c_str(),
pos.X, pos.Y, pos.Z,
rot.X, rot.Y, rot.Z
);
core::string<c16> filename ( buf );
path filename ( buf );
filename.replace ( '/', '_' );
printf ( "screenshot : %s\n", filename.c_str() );
Game->Device->getVideoDriver()->writeImageToFile(image, filename, 100 );
@ -1544,7 +1568,7 @@ bool CQuake3EventHandler::OnEvent(const SEvent& eve)
}
/*
// set debug map data on/off
debugState = debugState == EDS_OFF ?
debugState = debugState == EDS_OFF ?
EDS_NORMALS | EDS_MESH_WIRE_OVERLAY | EDS_BBOX_ALL:
EDS_OFF;
*/
@ -1849,7 +1873,7 @@ void CQuake3EventHandler::createParticleImpacts( u32 now )
{
pas = sm->addParticleSystemSceneNode(false, BulletParent, -1, Impacts[i].pos);
snprintf ( buf, 64, "bullet impact smoke at %.1f,%.1f,%1.f",
snprintf ( buf, 64, "bullet impact smoke at %.1f,%.1f,%1.f",
Impacts[i].pos.X,Impacts[i].pos.Y,Impacts[i].pos.Z);
pas->setName ( buf );
@ -1890,7 +1914,7 @@ void CQuake3EventHandler::createParticleImpacts( u32 now )
/*
if (irrKlang)
{
audio::ISound* sound =
audio::ISound* sound =
irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true);
if (sound)
@ -1944,7 +1968,7 @@ void CQuake3EventHandler::Animate()
IVideoDriver * driver = Game->Device->getVideoDriver();
IAttributes * attr = smgr->getParameters();
swprintf ( msg, 128,
swprintf ( msg, 128,
L"Q3 %s [%s], FPS:%03d Tri:%.03fm Cull %d/%d nodes (%d,%d,%d)",
Game->CurrentMapName.c_str(),
driver->getName(),
@ -1961,7 +1985,7 @@ void CQuake3EventHandler::Animate()
swprintf ( msg, 128,
L"%03d fps, F1 GUI on/off, F2 respawn, F3-F6 toggle Nodes, F7 Collision on/off"
L", F8 Gravity on/off, Right Mouse Toggle GUI",
Game->Device->getVideoDriver()->getFPS ()
Game->Device->getVideoDriver()->getFPS ()
);
if ( gui.StatusLine )
gui.StatusLine->setText ( msg );
@ -1971,7 +1995,7 @@ void CQuake3EventHandler::Animate()
// idle..
if ( player->Anim[1].flags & FIRED )
{
if ( strcmp ( player->animation, "idle" ) )
if ( strcmp ( player->animation, "idle" ) )
player->setAnim ( "idle" );
player->Anim[1].flags &= ~FIRED;
@ -1994,7 +2018,7 @@ void runGame ( GameData *game )
{
// could not create selected driver.
game->retVal = 0;
return;
return;
}
// create an event receiver based on current game data
@ -2058,7 +2082,7 @@ void runGame ( GameData *game )
*/
int IRRCALLCONV main(int argc, char* argv[])
{
core::string<c16> prgname(argv[0]);
path prgname(argv[0]);
GameData game ( deletePathFromPath ( prgname, 1 ) );
// dynamically load irrlicht
@ -2095,7 +2119,7 @@ int IRRCALLCONV main(int argc, char* argv[])
case 'd': game.deviceParam.DriverType = EDT_OGLES1; break;
case 'e': game.deviceParam.DriverType = EDT_BURNINGSVIDEO;break;
default: game.retVal = 3; break;
}
}
}
runGame ( &game );
} while ( game.retVal < 3 );

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.irrlicht.${EXECUTABLE_NAME}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>IRRL</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

View File

@ -1,26 +1,29 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_workspace_file>
<Workspace title="Build all examples">
<Project filename="01.HelloWorld\HelloWorld.cbp" />
<Project filename="02.Quake3Map\Quake3Map.cbp" />
<Project filename="03.CustomSceneNode\CustomSceneNode.cbp" />
<Project filename="04.Movement\Movement.cbp" />
<Project filename="05.UserInterface\UserInterface.cbp" />
<Project filename="06.2DGraphics\2DGraphics.cbp" />
<Project filename="07.Collision\Collision.cbp" />
<Project filename="08.SpecialFX\SpecialFX.cbp" />
<Project filename="09.Meshviewer\Meshviewer.cbp" />
<Project filename="10.Shaders\Shaders.cbp" />
<Project filename="11.PerPixelLighting\PerPixelLighting.cbp" />
<Project filename="12.TerrainRendering\TerrainRendering.cbp" />
<Project filename="13.RenderToTexture\RenderToTexture.cbp" />
<Project filename="14.Win32Window\Win32Window.cbp" />
<Project filename="15.LoadIrrFile\LoadIrrFile.cbp" />
<Project filename="16.Quake3MapShader\Quake3MapShader.cbp" />
<Project filename="18.SplitScreen\SplitScreen.cbp" />
<Project filename="19.MouseAndJoystick\MouseAndJoystick.cbp" />
<Project filename="20.ManagedLights\ManagedLights.cbp" active="1" />
<Project filename="Demo\demo.cbp" />
<Project filename="..\source\Irrlicht\Irrlicht-gcc.cbp" />
<Project filename="01.HelloWorld/HelloWorld.cbp" />
<Project filename="02.Quake3Map/Quake3Map.cbp" />
<Project filename="03.CustomSceneNode/CustomSceneNode.cbp" />
<Project filename="04.Movement/Movement.cbp" />
<Project filename="05.UserInterface/UserInterface.cbp" />
<Project filename="06.2DGraphics/2DGraphics.cbp" />
<Project filename="07.Collision/Collision.cbp" />
<Project filename="08.SpecialFX/SpecialFX.cbp" />
<Project filename="09.Meshviewer/Meshviewer.cbp" />
<Project filename="10.Shaders/Shaders.cbp" />
<Project filename="11.PerPixelLighting/PerPixelLighting.cbp" />
<Project filename="12.TerrainRendering/TerrainRendering.cbp" />
<Project filename="13.RenderToTexture/RenderToTexture.cbp" />
<Project filename="14.Win32Window/Win32Window.cbp" />
<Project filename="15.LoadIrrFile/LoadIrrFile.cbp" />
<Project filename="16.Quake3MapShader/Quake3MapShader.cbp" />
<Project filename="18.SplitScreen/SplitScreen.cbp" />
<Project filename="19.MouseAndJoystick/MouseAndJoystick.cbp" />
<Project filename="20.ManagedLights/ManagedLights.cbp" />
<Project filename="21.Quake3Explorer/Quake3Explorer.cbp" active="1" />
<Project filename="Demo/demo.cbp" />
<Project filename="../tools/GUIEditor/GUIEditor_gcc.cbp" />
<Project filename="../tools/MeshConverter/MeshConverter.cbp" />
<Project filename="../source/Irrlicht/Irrlicht-gcc.cbp" />
</Workspace>
</CodeBlocks_workspace_file>

View File

@ -113,7 +113,7 @@ void CDemo::run()
static s32 lastfps = 0;
s32 nowfps = driver->getFPS();
swprintf(tmp, 255, L"%ls fps:%3d triangles:%0.3f mio",
swprintf(tmp, 255, L"%ls fps:%3d triangles:%0.3f mio",
driver->getName(),
driver->getFPS(),
(f32) driver->getPrimitiveCountDrawn( 1 ) * ( 1.f / 1000000.f )
@ -369,7 +369,7 @@ void CDemo::loadSceneData()
sm->getMeshManipulator()->transformMesh ( quakeLevelMesh->getMesh(i), m );
}
quakeLevelNode = sm->addOctTreeSceneNode(
quakeLevelNode = sm->addOctTreeSceneNode(
quakeLevelMesh->getMesh( scene::quake3::E_Q3_MESH_GEOMETRY)
);
if (quakeLevelNode)
@ -741,7 +741,7 @@ void CDemo::createParticleImpacts()
#ifdef USE_IRRKLANG
if (irrKlang)
{
irrklang::ISound* sound =
irrklang::ISound* sound =
irrKlang->play3D(impactSound, Impacts[i].pos, false, false, true);
if (sound)

50
include/EDeviceTypes.h Normal file
View File

@ -0,0 +1,50 @@
#ifndef __E_DEVICE_TYPES_H_INCLUDED__
#define __E_DEVICE_TYPES_H_INCLUDED__
namespace irr
{
//! An enum for the different device types supported by the Irrlicht Engine.
enum E_DEVICE_TYPE
{
//! A device native to Microsoft Windows
/** This device uses the Win32 API and works in all versions of Windows. */
EIDT_WIN32,
//! A device native to Windows CE devices
/** This device works on Windows Mobile, Pocket PC and Microsoft SmartPhone devices */
EIDT_WINCE,
//! A device native to Unix style operating systems.
/** This device uses the X11 windowing system and works in Linux, Solaris, FreeBSD, OSX and
other operating systems which support X11. */
EIDT_X11,
//! A device native to Mac OSX
/** This device uses Apple's Cocoa API and works in Mac OSX 10.2 and above. */
EIDT_OSX,
//! A device which uses Simple DirectMedia Layer
/** The SDL device works under all platforms supported by SDL but first must be compiled
in by defining the IRR_USE_SDL_DEVICE macro in IrrCompileConfig.h */
EIDT_SDL,
//! A simple text only device supported by all platforms.
/** This device allows applications to run from the command line without opening a window.
It can render the output of the software drivers to the console as ASCII. It only supports
mouse and keyboard in Windows operating systems. */
EIDT_CONSOLE,
//! This selection allows Irrlicht to choose the best device from the ones available.
/** If this selection is chosen then Irrlicht will try to use the IrrlichtDevice native
to your operating system. If this is unavailable then the X11, SDL and then console device
will be tried. This ensures that Irrlicht will run even if your platform is unsupported,
although it may not be able to render anything. */
EIDT_BEST
};
} // end namespace irr
#endif // __E_DEVICE_TYPES_H_INCLUDED__

View File

@ -79,12 +79,12 @@ enum EGUI_ELEMENT_TYPE
//! A tool bar (IGUIToolBar)
EGUIET_TOOL_BAR,
//! A window
EGUIET_WINDOW,
//! A Tree View
EGUIET_TREE_VIEW,
//! A window
EGUIET_WINDOW,
//! Not an element, amount of elements in there
EGUIET_COUNT,
@ -120,6 +120,7 @@ const c8* const GUIElementTypeNames[] =
"tabControl",
"table",
"toolBar",
"treeview",
"window",
0
};

View File

@ -99,6 +99,14 @@ namespace irr
//! in what direction and how fast.
EMIE_MOUSE_WHEEL,
//! Mouse double click.
//! This event is generated after the second EMIE_LMOUSE_PRESSED_DOWN event.
EMIE_MOUSE_DOUBLE_CLICK,
//! Mouse triple click.
//! This event is generated after the third EMIE_LMOUSE_PRESSED_DOWN event.
EMIE_MOUSE_TRIPLE_CLICK,
//! No real event. Just for convenience to get number of events
EMIE_COUNT
};
@ -221,6 +229,8 @@ namespace irr
//! A tree view node was collapsed. See IGUITreeView::getLastEventNode().
EGET_TREEVIEW_NODE_COLLAPS,
//! No real event. Just for convenience to get number of events
EGET_COUNT
};
} // end namespace gui

View File

@ -6,6 +6,7 @@
#define __I_FILE_ARCHIVE_H_INCLUDED__
#include "IReadFile.h"
#include "IFileList.h"
namespace irr
{
@ -20,54 +21,53 @@ enum EFileSystemType
FILESYSTEM_VIRTUAL, // Virtual FileSystem
};
//! Base Info which all File archives must support on browsing
struct IFileArchiveEntry
//! Contains the different types of archives
enum E_FILE_ARCHIVE_TYPE
{
IFileArchiveEntry() {}
//! A PKZIP archive
EFAT_ZIP = MAKE_IRR_ID('Z','I','P', 0),
core::string<c16> simpleFileName;
core::string<c16> path;
//! A gzip archive
EFAT_GZIP = MAKE_IRR_ID('g','z','i','p'),
bool operator < (const IFileArchiveEntry& other) const
{
return simpleFileName < other.simpleFileName;
}
//! A virtual directory
EFAT_FOLDER = MAKE_IRR_ID('f','l','d','r'),
bool operator == (const IFileArchiveEntry& other) const
{
return simpleFileName == other.simpleFileName;
}
//! An ID Software PAK archive
EFAT_PAK = MAKE_IRR_ID('P','A','K', 0),
//! A Tape ARchive
EFAT_TAR = MAKE_IRR_ID('T','A','R', 0),
//! The type of this archive is unknown
EFAT_UNKNOWN = MAKE_IRR_ID('u','n','k','n')
};
//! The FileArchive manages files and archives and provides access to them.
/** It manages where files are, so that modules which use the the IO do not
need to know where every file is located. A file could be in a .zip-Archive or
as file on disk, using the IFileSystem makes no difference to this. */
struct IFileArchive : public virtual IReferenceCounted
//! The FileArchive manages archives and provides access to files inside them.
class IFileArchive : public virtual IReferenceCounted
{
//! return the id of the file Archive
virtual const core::string<c16>& getArchiveName() =0;
public:
//! get the class Type
virtual const core::string<c16>& getArchiveType() =0;
//! Opens a file based on its name
/** Creates and returns a new IReadFile for a file in the archive.
\param filename The file to open
\return Returns A pointer to the created file on success,
or 0 on failure. */
virtual IReadFile* createAndOpenFile(const path& filename) =0;
//! opens a file by file name
virtual IReadFile* openFile(const core::string<c16>& filename) =0;
//! Opens a file based on its position.
/** Creates and returns
\param index The zero based index of the file.
\return Returns a pointer to the created file on success, or 0 on failure. */
virtual IReadFile* createAndOpenFile(u32 index) =0;
//! opens a file by position
virtual IReadFile* openFile(s32 index) =0;
//! Returns the complete file tree
/** \return Returns the complete directory tree for the archive,
including all files and folders */
virtual const IFileList* getFileList() const =0;
//! returns fileindex
virtual s32 findFile(const core::string<c16>& filename) =0;
//! Returns the amount of files in the filelist.
/** \return Amount of files and directories in the file list. */
virtual u32 getFileCount() const =0;
//! returns data of known file
virtual const IFileArchiveEntry* getFileInfo(u32 index) =0;
//! get the archive type
virtual E_FILE_ARCHIVE_TYPE getType() const { return EFAT_UNKNOWN; }
};
//! Class which is able to create an archive from a file.
@ -75,24 +75,31 @@ struct IFileArchive : public virtual IReferenceCounted
currently unsupported file formats (e.g .wad), then implement
this and add your new Archive loader with
IFileSystem::addArchiveLoader() to the engine. */
struct IArchiveLoader : public virtual IReferenceCounted
class IArchiveLoader : public virtual IReferenceCounted
{
public:
//! Check if the file might be loaded by this class
/** Check is based on the file extension (e.g. ".zip")
/** Check based on the file extension (e.g. ".zip")
\param fileName Name of file to check.
\return True if file seems to be loadable. */
virtual bool isALoadableFileFormat(const core::string<c16>& filename) const =0;
virtual bool isALoadableFileFormat(const path& filename) const =0;
//! Check if the file might be loaded by this class
/** This check may look into the file.
\param file File handle to check.
\return True if file seems to be loadable. */
virtual bool isALoadableFileFormat(io::IReadFile* file) const =0;
//! Check to see if the loader can create archives of this type.
/** Check based on the archive type.
\param fileType The archive type to check.
\return True if the archile loader supports this type, false if not */
virtual bool isALoadableFileFormat(E_FILE_ARCHIVE_TYPE fileType) const =0;
//! Creates an archive from the filename
/** \param file File handle to check.
\return Pointer to newly created archive, or 0 upon error. */
virtual IFileArchive* createArchive(const core::string<c16>& filename, bool ignoreCase, bool ignorePaths) const =0;
//! Check if the file might be loaded by this class
/** Check might look into the file.
\param file File handle to check.
\return True if file seems to be loadable. */
virtual bool isALoadableFileFormat(io::IReadFile* file) const =0;
virtual IFileArchive* createArchive(const path& filename, bool ignoreCase, bool ignorePaths) const =0;
//! Creates an archive from the file
/** \param file File handle to check.

View File

@ -6,14 +6,16 @@
#define __I_FILE_LIST_H_INCLUDED__
#include "IReferenceCounted.h"
#include "irrString.h"
#include "path.h"
namespace irr
{
namespace io
{
//! The Filelist lists all files in a directory.
//! Provides a list of files and folders.
/** File lists usually contain a list of all files in a given folder,
but can also contain a complete directory structure. */
class IFileList : public virtual IReferenceCounted
{
public:
@ -24,21 +26,38 @@ public:
//! Gets the name of a file in the list, based on an index.
/** The path is not included in this name. Use getFullFileName for this.
\param index is the zero based index of the file which name should
be returned. The index has to be smaller than the amount getFileCount() returns.
be returned. The index must be less than the amount getFileCount() returns.
\return File name of the file. Returns 0, if an error occured. */
virtual const core::string<c16>& getFileName(u32 index) const = 0;
virtual const io::path& getFileName(u32 index) const = 0;
//! Gets the full name of a file in the list, path included, based on an index.
//! Gets the full name of a file in the list including the path, based on an index.
/** \param index is the zero based index of the file which name should
be returned. The index has to be smaller than the amount getFileCount() returns.
be returned. The index must be less than the amount getFileCount() returns.
\return File name of the file. Returns 0, if an error occured. */
virtual const core::string<c16>& getFullFileName(u32 index) = 0;
virtual const io::path& getFullFileName(u32 index) const = 0;
//! Returns the size of a file in the file list, based on an index.
/** \param index is the zero based index of the file which should be returned.
The index must be less than the amount getFileCount() returns.
\return The size of the file in bytes. */
virtual u32 getFileSize(u32 index) const = 0;
//! Check if the file is a directory
/** \param index The zero based index of the file whose name shall
be returned. The index has to be smaller than the amount getFileCount() returns.
/** \param index The zero based index which will be checked. The index
must be less than the amount getFileCount() returns.
\return True if the file is a directory, else false. */
virtual bool isDirectory(u32 index) const = 0;
//! Searches for a file or folder in the list
/** Searches for a file by name
\param filename The name of the file to search for.
\param isFolder True if you are searching for a file, false if you want a dir.
\return Returns the index of the file in the file list, or -1 if
no matching name name was found. */
virtual s32 findFile(const io::path& filename, bool isFolder=false) const = 0;
//! Returns the base path of the file list
virtual const io::path& getPath() const = 0;
};
} // end namespace irr

View File

@ -38,7 +38,7 @@ public:
\return Returns a pointer to the created file interface.
The returned pointer should be dropped when no longer needed.
See IReferenceCounted::drop() for more information. */
virtual IReadFile* createAndOpenFile(const core::string<c16>& filename) =0;
virtual IReadFile* createAndOpenFile(const path& filename) =0;
//! Creates an IReadFile interface for accessing memory like a file.
/** This allows you to use a pointer to memory where an IReadFile is requested.
@ -51,7 +51,7 @@ public:
The returned pointer should be dropped when no longer needed.
See IReferenceCounted::drop() for more information.
*/
virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const core::string<c16>& fileName, bool deleteMemoryWhenDropped=false) =0;
virtual IReadFile* createMemoryReadFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0;
//! Creates an IReadFile interface for accessing files inside files.
/** This is useful e.g. for archives.
@ -63,7 +63,7 @@ public:
The returned pointer should be dropped when no longer needed.
See IReferenceCounted::drop() for more information.
*/
virtual IReadFile* createLimitReadFile(const core::string<c16>& fileName,
virtual IReadFile* createLimitReadFile(const path& fileName,
IReadFile* alreadyOpenedFile, long pos, long areaSize) =0;
//! Creates an IWriteFile interface for accessing memory like a file.
@ -78,7 +78,7 @@ public:
The returned pointer should be dropped when no longer needed.
See IReferenceCounted::drop() for more information.
*/
virtual IWriteFile* createMemoryWriteFile(void* memory, s32 len, const core::string<c16>& fileName, bool deleteMemoryWhenDropped=false) =0;
virtual IWriteFile* createMemoryWriteFile(void* memory, s32 len, const path& fileName, bool deleteMemoryWhenDropped=false) =0;
//! Opens a file for write access.
@ -89,55 +89,78 @@ public:
file could not created or opened for writing.
The returned pointer should be dropped when no longer needed.
See IReferenceCounted::drop() for more information. */
virtual IWriteFile* createAndWriteFile(const core::string<c16>& filename, bool append=false) =0;
virtual IWriteFile* createAndWriteFile(const path& filename, bool append=false) =0;
//! Adds an archive to the file system.
/** After calling this, the Irrlicht Engine will search and open files directly from this archive too.
/** After calling this, the Irrlicht Engine will also search and open files directly from this archive.
This is useful for hiding data from the end user, speeding up file access and making it possible to
access for example Quake3 .pk3 files, which are nothing different than .zip files.
\param filename: Filename of the zip archive to add to the file system.
access for example Quake3 .pk3 files, which are no different than .zip files.
By default Irrlicht supports ZIP, PAK, TAR and directories as archives. You can provide your own archive
types by implementing IArchiveLoader and passing an instance to addArchiveLoader.
\param filename: Filename of the archive to add to the file system.
\param ignoreCase: If set to true, files in the archive can be accessed without
writing all letters in the right case.
\param ignorePaths: If set to true, files in the added archive can be accessed
without its complete path.
\return Returns true if the archive was added successful, false if not. */
virtual bool registerFileArchive(const core::string<c16>& filename, bool ignoreCase=true, bool ignorePaths=true) =0;
\param archiveType: If no specific E_FILE_ARCHIVE_TYPE is selected then the type of archive will depend on
the extension of the file name. If you use a different extension then you can use this parameter to force
a specific type of archive.
\return Returns true if the archive was added successfully, false if not. */
virtual bool addFileArchive(const path& filename, bool ignoreCase=true, bool ignorePaths=true,
E_FILE_ARCHIVE_TYPE archiveType=EFAT_UNKNOWN) =0;
//! Adds an external archive loader to the engine.
/** Use this function to add support for new archive types to the engine, for example propiatrary or
encyrpted file storage. */
virtual void addArchiveLoader(IArchiveLoader* loader) =0;
//! return the amount of currently attached Archives
//! Returns the number of archives currently attached to the file system
virtual u32 getFileArchiveCount() const =0;
//! removes an archive from the file system.
virtual bool unregisterFileArchive(u32 index) =0;
//! Removes an archive from the file system.
/** This will close the archive and free any file handles, but will not close resources which have already
been loaded and are now cached, for example textures and meshes.
\param index: The index of the archive to remove
\return Returns true on success, false on failure */
virtual bool removeFileArchive(u32 index) =0;
//! removes an archive from the file system.
virtual bool unregisterFileArchive(const core::string<c16>& filename) =0;
//! Removes an archive from the file system.
/** This will close the archive and free any file handles, but will not close resources which have already
been loaded and are now cached, for example textures and meshes.
\param index: The index of the archive to remove
\return Returns true on success, false on failure */
virtual bool removeFileArchive(const path& filename) =0;
//! move the hirarchy of the filesystem. moves sourceIndex relative up or down
//! Changes the search order of attached archives.
/**
\param sourceIndex: The index of the archive to change
\param relative: The relative change in position, archives with a lower index are searched first */
virtual bool moveFileArchive(u32 sourceIndex, s32 relative) =0;
//! get the Archive number index
//! Returns the archive at a given index.
virtual IFileArchive* getFileArchive(u32 index) =0;
//! Adds an zip archive to the file system.
/** After calling this, the Irrlicht Engine will search and open files directly from this archive too.
//! Adds a zip archive to the file system. Deprecated! This function is provided for compatibility
/** with older versions of Irrlicht and may be removed in future versions, you should use
addFileArchive instead.
After calling this, the Irrlicht Engine will search and open files directly from this archive too.
This is useful for hiding data from the end user, speeding up file access and making it possible to
access for example Quake3 .pk3 files, which are nothing different than .zip files.
access for example Quake3 .pk3 files, which are no different than .zip files.
\param filename: Filename of the zip archive to add to the file system.
\param ignoreCase: If set to true, files in the archive can be accessed without
writing all letters in the right case.
\param ignorePaths: If set to true, files in the added archive can be accessed
without its complete path.
\return Returns true if the archive was added successful, false if not. */
\return Returns true if the archive was added successfully, false if not. */
virtual bool addZipFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
{
return registerFileArchive(filename, ignoreCase, ignorePaths);
return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_ZIP);
}
//! Adds an unzipped archive (or basedirectory with subdirectories..) to the file system.
/** Useful for handling data which will be in a zip file
/** Deprecated! This function is provided for compatibility with older versions of Irrlicht
and may be removed in future versions, you should use addFileArchive instead.
Useful for handling data which will be in a zip file
\param filename: Filename of the unzipped zip archive base directory to add to the file system.
\param ignoreCase: If set to true, files in the archive can be accessed without
writing all letters in the right case.
@ -146,11 +169,13 @@ public:
\return Returns true if the archive was added successful, false if not. */
virtual bool addFolderFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
{
return registerFileArchive(filename, ignoreCase, ignorePaths);
return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_FOLDER);
}
//! Adds an pak archive to the file system.
/** After calling this, the Irrlicht Engine will search and open files directly from this archive too.
//! Adds a pak archive to the file system.
/** Deprecated! This function is provided for compatibility with older versions of Irrlicht
and may be removed in future versions, you should use addFileArchive instead.
After calling this, the Irrlicht Engine will search and open files directly from this archive too.
This is useful for hiding data from the end user, speeding up file access and making it possible to
access for example Quake2/KingPin/Hexen2 .pak files
\param filename: Filename of the pak archive to add to the file system.
@ -161,39 +186,39 @@ public:
\return Returns true if the archive was added successful, false if not. */
virtual bool addPakFileArchive(const c8* filename, bool ignoreCase=true, bool ignorePaths=true)
{
return registerFileArchive(filename, ignoreCase, ignorePaths);
return addFileArchive(filename, ignoreCase, ignorePaths, EFAT_PAK);
}
//! Get the current working directory.
/** \return Current working directory as a string. */
virtual const core::string<c16>& getWorkingDirectory() =0;
virtual const path& getWorkingDirectory() =0;
//! Changes the current working directory.
/** \param newDirectory: A string specifying the new working directory.
The string is operating system dependent. Under Windows it has
the form "<drive>:\<directory>\<sudirectory>\<..>". An example would be: "C:\Windows\"
\return True if successful, otherwise false. */
virtual bool changeWorkingDirectoryTo(const core::string<c16>& newDirectory) =0;
virtual bool changeWorkingDirectoryTo(const path& newDirectory) =0;
//! Converts a relative path to an absolute (unique) path, resolving symbolic links if required
/** \param filename Possibly relative filename begin queried.
/** \param filename Possibly relative file or directory name to query.
\result Absolute filename which points to the same file. */
virtual core::string<c16> getAbsolutePath(const core::string<c16>& filename) const =0;
virtual path getAbsolutePath(const path& filename) const =0;
//! Returns the directory a file is located in.
/** \param filename: The file to get the directory from.
\return String containing the directory of the file. */
virtual core::string<c16> getFileDir(const core::string<c16>& filename) const =0;
virtual path getFileDir(const path& filename) const =0;
//! Returns the base part of a filename, i.e. the name without the directory part.
/** If no directory is prefixed, the full name is returned.
\param filename: The file to get the basename from
\param keepExtension True if filename with extension is returned otherwise everything
after the final '.' is removed as well. */
virtual core::string<c16> getFileBasename(const core::string<c16>& filename, bool keepExtension=true) const =0;
virtual path getFileBasename(const path& filename, bool keepExtension=true) const =0;
//! flatten a path and file name for example: "/you/me/../." becomes "/you"
virtual core::string<c16>& flattenFilename(core::string<c16>& directory, const core::string<c16>& root="/") const =0;
virtual path& flattenFilename(path& directory, const path& root="/") const =0;
//! Creates a list of files and directories in the current working directory and returns it.
/** \return a Pointer to the created IFileList is returned. After the list has been used
@ -207,7 +232,7 @@ public:
//! Determines if a file exists and could be opened.
/** \param filename is the string identifying the file which should be tested for existence.
\return Returns true if file exists, and false if it does not exist or an error occured. */
virtual bool existFile(const core::string<c16>& filename) const =0;
virtual bool existFile(const path& filename) const =0;
//! Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).
/** Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for
@ -216,7 +241,7 @@ public:
IXMLReader is returned. After use, the reader
has to be deleted using its IXMLReader::drop() method.
See IReferenceCounted::drop() for more information. */
virtual IXMLReader* createXMLReader(const core::string<c16>& filename) =0;
virtual IXMLReader* createXMLReader(const path& filename) =0;
//! Creates a XML Reader from a file which returns all parsed strings as wide characters (wchar_t*).
/** Use createXMLReaderUTF8() if you prefer char* instead of wchar_t*. See IIrrXMLReader for
@ -234,7 +259,7 @@ public:
IXMLReader is returned. After use, the reader
has to be deleted using its IXMLReaderUTF8::drop() method.
See IReferenceCounted::drop() for more information. */
virtual IXMLReaderUTF8* createXMLReaderUTF8(const core::string<c16>& filename) =0;
virtual IXMLReaderUTF8* createXMLReaderUTF8(const path& filename) =0;
//! Creates a XML Reader from a file which returns all parsed strings as ASCII/UTF-8 characters (char*).
/** Use createXMLReader() if you prefer wchar_t* instead of char*. See IIrrXMLReader for
@ -250,7 +275,7 @@ public:
IXMLWriter is returned. After use, the reader
has to be deleted using its IXMLWriter::drop() method.
See IReferenceCounted::drop() for more information. */
virtual IXMLWriter* createXMLWriter(const core::string<c16>& filename) =0;
virtual IXMLWriter* createXMLWriter(const path& filename) =0;
//! Creates a XML Writer from a file.
/** \return 0, if file could not be opened, otherwise a pointer to the created

View File

@ -7,6 +7,7 @@
#include "IReferenceCounted.h"
#include "SMaterial.h"
#include "path.h"
namespace irr
{
@ -156,10 +157,10 @@ public:
then printed to the error log and can be catched with a custom event
receiver. */
virtual s32 addHighLevelShaderMaterialFromFiles(
const core::string<c16>& vertexShaderProgramFileName,
const io::path& vertexShaderProgramFileName,
const c8* vertexShaderEntryPointName = "main",
E_VERTEX_SHADER_TYPE vsCompileTarget = EVST_VS_1_1,
const core::string<c16>& pixelShaderProgramFileName = "",
const io::path& pixelShaderProgramFileName = "",
const c8* pixelShaderEntryPointName = "main",
E_PIXEL_SHADER_TYPE psCompileTarget = EPST_PS_1_1,
IShaderConstantSetCallBack* callback = 0,
@ -293,8 +294,8 @@ public:
error occured. -1 is returned for example if a vertex or pixel shader
program could not be compiled, the error strings are then printed out
into the error log, and can be catched with a custom event receiver. */
virtual s32 addShaderMaterialFromFiles(const core::string<c16>& vertexShaderProgramFileName,
const core::string<c16>& pixelShaderProgramFileName,
virtual s32 addShaderMaterialFromFiles(const io::path& vertexShaderProgramFileName,
const io::path& pixelShaderProgramFileName,
IShaderConstantSetCallBack* callback = 0,
E_MATERIAL_TYPE baseMaterial = video::EMT_SOLID,
s32 userData = 0) = 0;

View File

@ -67,7 +67,7 @@ namespace gui
//! Sets an image which should be displayed on the button when it is in normal state.
/** \param image: Image to be displayed */
virtual void setImage(video::ITexture* image) = 0;
virtual void setImage(video::ITexture* image=0) = 0;
//! Sets a background image for the button when it is in normal state.
/** \param image: Texture containing the image to be displayed
@ -78,7 +78,7 @@ namespace gui
/** If no images is specified for the pressed state via
setPressedImage(), this image is also drawn in pressed state.
\param image: Image to be displayed */
virtual void setPressedImage(video::ITexture* image) = 0;
virtual void setPressedImage(video::ITexture* image=0) = 0;
//! Sets an image which should be displayed on the button when it is in pressed state.
/** \param image: Texture containing the image to be displayed
@ -86,7 +86,7 @@ namespace gui
virtual void setPressedImage(video::ITexture* image, const core::rect<s32>& pos) = 0;
//! Sets the sprite bank used by the button
virtual void setSpriteBank(IGUISpriteBank* bank) = 0;
virtual void setSpriteBank(IGUISpriteBank* bank=0) = 0;
//! Sets the animated sprite for a specific button state
/** \param index: Number of the sprite within the sprite bank, use -1 for no sprite
@ -101,16 +101,16 @@ namespace gui
//! Sets if the button should behave like a push button.
/** Which means it can be in two states: Normal or Pressed. With a click on the button,
the user can change the state of the button. */
virtual void setIsPushButton(bool isPushButton) = 0;
virtual void setIsPushButton(bool isPushButton=true) = 0;
//! Sets the pressed state of the button if this is a pushbutton
virtual void setPressed(bool pressed) = 0;
virtual void setPressed(bool pressed=true) = 0;
//! Returns if the button is currently pressed
virtual bool isPressed() const = 0;
//! Sets if the alpha channel should be used for drawing background images on the button (default is false)
virtual void setUseAlphaChannel(bool useAlphaChannel) = 0;
virtual void setUseAlphaChannel(bool useAlphaChannel=true) = 0;
//! Returns if the alpha channel should be used for drawing background images on the button
virtual bool isAlphaChannelUsed() const = 0;
@ -119,10 +119,16 @@ namespace gui
virtual bool isPushButton() const = 0;
//! Sets if the button should use the skin to draw its border and button face (default is true)
virtual void setDrawBorder(bool border) = 0;
virtual void setDrawBorder(bool border=true) = 0;
//! Returns if the border and button face are being drawn using the skin
virtual bool isDrawingBorder() const = 0;
//! Sets if the button should scale the button images to fit
virtual void setScaleImage(bool scaleImage=true) = 0;
//! Checks whether the button scales the used images
virtual bool isScalingImage() const = 0;
};

View File

@ -11,6 +11,7 @@
#include "EMessageBoxFlags.h"
#include "IEventReceiver.h"
#include "IXMLReader.h"
#include "path.h"
namespace irr
{
@ -162,7 +163,7 @@ public:
\return Pointer to the font. Returns 0 if the font could not be loaded.
This pointer should not be dropped. See IReferenceCounted::drop() for
more information. */
virtual IGUIFont* getFont(const core::string<c16>& filename) = 0;
virtual IGUIFont* getFont(const io::path& filename) = 0;
//! Returns the default built-in font.
/** \return Pointer to the default built-in font.
@ -175,18 +176,18 @@ public:
\param filename Filename of the sprite bank's origin.
\return Pointer to the sprite bank. Returns 0 if it could not be loaded.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IGUISpriteBank* getSpriteBank(const core::string<c16>& filename) = 0;
virtual IGUISpriteBank* getSpriteBank(const io::path& filename) = 0;
//! Adds an empty sprite bank to the manager
/** \param name Name of the new sprite bank.
\return Pointer to the sprite bank.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IGUISpriteBank* addEmptySpriteBank(const core::string<c16>& name) = 0;
virtual IGUISpriteBank* addEmptySpriteBank(const io::path& name) = 0;
//! Returns the root gui element.
/** This is the first gui element, the (direct or indirect) parent of all
other gui elements. It is a valid IGUIElement, with dimensions the same
size as the screen. You should not need to use this method directly, unless
/** This is the first gui element, the (direct or indirect) parent of all
other gui elements. It is a valid IGUIElement, with dimensions the same
size as the screen. You should not need to use this method directly, unless
you wish to reparent GUI elements to the top level.
\return Pointer to the root element of the GUI. The returned pointer
should not be dropped. See IReferenceCounted::drop() for more
@ -535,7 +536,7 @@ public:
/** \param filename Name of the file.
\param start The GUIElement to start with. Root if 0.
\return True if saving succeeded, else false. */
virtual bool saveGUI(const core::string<c16>& filename, IGUIElement* start=0) = 0;
virtual bool saveGUI(const io::path& filename, IGUIElement* start=0) = 0;
//! Saves the current gui into a file.
/** \param file The file to write to.
@ -547,7 +548,7 @@ public:
/** \param filename Name of the file.
\param parent Parent for the loaded GUI, root if 0.
\return True if loading succeeded, else false. */
virtual bool loadGUI(const c16* filename, IGUIElement* parent=0) = 0;
virtual bool loadGUI(const io::path& filename, IGUIElement* parent=0) = 0;
//! Loads the gui. Note that the current gui is not cleared before.
/** \param file The file to load from.

View File

@ -6,6 +6,7 @@
#define __I_GUI_FILE_OPEN_DIALOG_H_INCLUDED__
#include "IGUIElement.h"
#include "path.h"
namespace irr
{
@ -25,8 +26,7 @@ namespace gui
virtual const wchar_t* getFileName() const = 0;
//! Returns the directory of the selected file. Returns NULL, if no directory was selected.
virtual const core::string<c16>& getDirectoryName() = 0;
virtual const io::path& getDirectoryName() = 0;
};

View File

@ -8,6 +8,7 @@
#include "IReferenceCounted.h"
#include "SColor.h"
#include "rect.h"
#include "irrString.h"
namespace irr
{
@ -47,7 +48,7 @@ public:
\param vcenter: Specifies if the text should be centered vertically into the rectangle.
\param clip: Optional pointer to a rectangle against which the text will be clipped.
If the pointer is null, no clipping will be done. */
virtual void draw(const wchar_t* text, const core::rect<s32>& position,
virtual void draw(const core::stringw& text, const core::rect<s32>& position,
video::SColor color, bool hcenter=false, bool vcenter=false,
const core::rect<s32>* clip=0) = 0;

View File

@ -151,6 +151,10 @@ namespace gui
EGDS_TEXT_DISTANCE_X,
//! distance for text from background
EGDS_TEXT_DISTANCE_Y,
//! distance for text in the title bar, from the left of the window rect
EGDS_TITLEBARTEXT_DISTANCE_X,
//! distance for text in the title bar, from the top of the window rect
EGDS_TITLEBARTEXT_DISTANCE_Y,
//! this value is not used, it only specifies the amount of default sizes
//! available.
EGDS_COUNT

View File

@ -67,6 +67,13 @@ public:
const video::SColor& color= video::SColor(255,255,255,255),
u32 starttime=0, u32 currenttime=0,
bool loop=true, bool center=false) = 0;
//! Draws a sprite batch in 2d using an array of positions and a color
virtual void draw2DSpriteBatch(const core::array<u32>& indices, const core::array<core::position2di>& pos,
const core::rect<s32>* clip=0,
const video::SColor& color= video::SColor(255,255,255,255),
u32 starttime=0, u32 currenttime=0,
bool loop=true, bool center=false) = 0;
};

View File

@ -86,6 +86,12 @@ namespace gui
/** return Returns the height of the tabs */
virtual s32 getTabHeight() const = 0;
//! set the maximal width of a tab. Per default width is 0 which means "no width restriction".
virtual void setTabMaxWidth(s32 width ) = 0;
//! get the maximal width of a tab
virtual s32 getTabMaxWidth() const = 0;
//! Set the alignment of the tabs
/** Use EGUIA_UPPERLEFT or EGUIA_LOWERRIGHT */
virtual void setTabVerticalAlignment( gui::EGUI_ALIGNMENT alignment ) = 0;

View File

@ -142,6 +142,54 @@ public:
//! fills the surface with black or white
virtual void fill(const SColor &color) =0;
//! get the amount of Bits per Pixel of the given color format
static u32 getBitsPerPixelFromFormat(const ECOLOR_FORMAT format)
{
switch(format)
{
case ECF_A1R5G5B5:
return 16;
case ECF_R5G6B5:
return 16;
case ECF_R8G8B8:
return 24;
case ECF_A8R8G8B8:
return 32;
case ECF_R16F:
return 16;
case ECF_G16R16F:
return 32;
case ECF_A16B16G16R16F:
return 64;
case ECF_R32F:
return 32;
case ECF_G32R32F:
return 64;
case ECF_A32B32G32R32F:
return 128;
default:
return 0;
}
}
//! test if the color format is only viable for RenderTarget textures
/** Since we don't have support for e.g. floating point iimage formats
one should test if the color format can be used for arbitrary usage, or
if it is restricted to RTTs. */
static bool isRenderTargetOnlyFormat(const ECOLOR_FORMAT format)
{
switch(format)
{
case ECF_A1R5G5B5:
case ECF_R5G6B5:
case ECF_R8G8B8:
case ECF_A8R8G8B8:
return false;
default:
return true;
}
}
};
} // end namespace video

View File

@ -7,7 +7,7 @@
#include "IReferenceCounted.h"
#include "IImage.h"
#include "irrString.h"
#include "path.h"
namespace irr
{
@ -31,7 +31,7 @@ public:
/** Check is based on the file extension (e.g. ".tga")
\param fileName Name of file to check.
\return True if file seems to be loadable. */
virtual bool isALoadableFileExtension(const core::string<c16>& filename) const = 0;
virtual bool isALoadableFileExtension(const io::path& filename) const = 0;
//! Check if the file might be loaded by this class
/** Check might look into the file.

View File

@ -28,7 +28,7 @@ public:
//! Check if this writer can write a file with the given extension
/** \param fileName Name of the file to check.
\return True if file extension specifies a writable type. */
virtual bool isAWriteableFileExtension(const core::string<c16>& filename) const = 0;
virtual bool isAWriteableFileExtension(const io::path& filename) const = 0;
//! Write image to file
/** \param file File handle to write to.

View File

@ -6,7 +6,7 @@
#define __I_MESH_CACHE_H_INCLUDED__
#include "IReferenceCounted.h"
#include "irrString.h"
#include "path.h"
namespace irr
{
@ -47,7 +47,7 @@ namespace scene
set by this method.
\param mesh Pointer to a mesh which will now be referenced by
this name. */
virtual void addMesh(const core::string<c16>& filename, IAnimatedMesh* mesh) = 0;
virtual void addMesh(const io::path& filename, IAnimatedMesh* mesh) = 0;
//! Removes a mesh from the cache.
/** After loading a mesh with getMesh(), the mesh can be
@ -93,25 +93,25 @@ namespace scene
//! Returns a mesh based on its filename.
/** \param filename Name of the mesh.
\return Pointer to the mesh or 0 if there is none with this number. */
virtual IAnimatedMesh* getMeshByFilename(const core::string<c16>& filename) = 0;
virtual IAnimatedMesh* getMeshByFilename(const io::path& filename) = 0;
//! Get the filename of a loaded mesh, based on its index.
/** \param index: Index of the mesh, number between 0 and getMeshCount()-1.
\return String with name if mesh was found and has a name, else
0. */
virtual const c16* getMeshFilename(u32 index) const = 0;
virtual const io::path& getMeshFilename(u32 index) const = 0;
//! Get the filename of a loaded mesh, if there is any.
/** \param mesh Pointer to mesh to query.
\return String with name if mesh was found and has a name, else
0. */
virtual const c16* getMeshFilename(const IAnimatedMesh* const mesh) const = 0;
virtual const io::path& getMeshFilename(const IAnimatedMesh* const mesh) const = 0;
//! Get the filename of a loaded mesh, if there is any.
/** \param mesh Pointer to mesh to query.
\return String with name if mesh was found and has a name, else
0. */
virtual const c16* getMeshFilename(const IMesh* const mesh) const = 0;
virtual const io::path& getMeshFilename(const IMesh* const mesh) const = 0;
//! Renames a loaded mesh.
/** Note that renaming meshes might change the ordering of the
@ -120,7 +120,7 @@ namespace scene
\param index The index of the mesh in the cache.
\param filename New name for the mesh.
\return True if mesh was renamed. */
virtual bool setMeshFilename(u32 index, const c16* filename) = 0;
virtual bool setMeshFilename(u32 index, const io::path& filename) = 0;
//! Renames a loaded mesh.
/** Note that renaming meshes might change the ordering of the
@ -129,7 +129,7 @@ namespace scene
\param mesh Mesh to be renamed.
\param filename New name for the mesh.
\return True if mesh was renamed. */
virtual bool setMeshFilename(const IAnimatedMesh* const mesh, const c16* filename) = 0;
virtual bool setMeshFilename(const IAnimatedMesh* const mesh, const io::path& filename) = 0;
//! Renames a loaded mesh.
/** Note that renaming meshes might change the ordering of the
@ -138,12 +138,12 @@ namespace scene
\param mesh Mesh to be renamed.
\param filename New name for the mesh.
\return True if mesh was renamed. */
virtual bool setMeshFilename(const IMesh* const mesh, const c16* filename) = 0;
virtual bool setMeshFilename(const IMesh* const mesh, const io::path& filename) = 0;
//! Check if a mesh was already loaded.
/** \param filename Name of the mesh.
\return True if the mesh has been loaded, else false. */
virtual bool isMeshLoaded(const core::string<c16>& filename) = 0;
virtual bool isMeshLoaded(const io::path& filename) = 0;
//! Clears the whole mesh cache, removing all meshes.
/** All meshes will be reloaded completely when using ISceneManager::getMesh()

View File

@ -6,7 +6,7 @@
#define __I_MESH_LOADER_H_INCLUDED__
#include "IReferenceCounted.h"
#include "irrString.h"
#include "path.h"
namespace irr
{
@ -35,7 +35,7 @@ public:
only.
\param fileName Name of the file to test.
\return True if the file might be loaded by this class. */
virtual bool isALoadableFileExtension(const core::string<c16>& filename) const = 0;
virtual bool isALoadableFileExtension(const io::path& filename) const = 0;
//! Creates/loads an animated mesh from the file.
/** \param file File handler to load the file from.

View File

@ -659,7 +659,7 @@ namespace quake3
//return name < other.name;
}
const u32 getGroupSize () const
u32 getGroupSize () const
{
if ( 0 == VarGroup )
return 0;

View File

@ -20,7 +20,7 @@ namespace io
//! Reads an amount of bytes from the file.
/** \param buffer Pointer to buffer where read bytes are written to.
\param sizeToRead Amount of bytes to read from the file.
\return How much bytes were read. */
\return How many bytes were read. */
virtual s32 read(void* buffer, u32 sizeToRead) = 0;
//! Changes position in file
@ -41,15 +41,15 @@ namespace io
//! Get name of file.
/** \return File name as zero terminated character string. */
virtual const core::string<c16>& getFileName() const = 0;
virtual const io::path& getFileName() const = 0;
};
//! Internal function, please do not use.
IReadFile* createReadFile(const core::string<c16>& fileName);
IReadFile* createReadFile(const io::path& fileName);
//! Internal function, please do not use.
IReadFile* createLimitReadFile(const core::string<c16>& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize);
IReadFile* createLimitReadFile(const io::path& fileName, IReadFile* alreadyOpenedFile, long pos, long areaSize);
//! Internal function, please do not use.
IReadFile* createMemoryReadFile(void* memory, long size, const core::string<c16>& fileName, bool deleteMemoryWhenDropped);
IReadFile* createMemoryReadFile(void* memory, long size, const io::path& fileName, bool deleteMemoryWhenDropped);
} // end namespace io
} // end namespace irr

View File

@ -8,6 +8,7 @@
#include "IReferenceCounted.h"
#include "irrArray.h"
#include "irrString.h"
#include "path.h"
#include "vector3d.h"
#include "dimension2d.h"
#include "SColor.h"
@ -17,6 +18,7 @@
#include "EMeshWriterEnums.h"
#include "SceneParameters.h"
#include "IGeometryCreator.h"
#include "ISkinnedMesh.h"
namespace irr
{
@ -342,7 +344,7 @@ namespace scene
* \return Null if failed, otherwise pointer to the mesh.
* This pointer should not be dropped. See IReferenceCounted::drop() for more information.
**/
virtual IAnimatedMesh* getMesh(const core::string<c16>& filename) = 0;
virtual IAnimatedMesh* getMesh(const io::path& filename) = 0;
//! Get pointer to an animateable mesh. Loads the file if not loaded already.
/** Works just as getMesh(const char* filename). If you want to
@ -777,7 +779,7 @@ namespace scene
not be dropped. See IReferenceCounted::drop() for more
information. */
virtual ITerrainSceneNode* addTerrainSceneNode(
const core::string<c16>& heightMapFileName,
const io::path& heightMapFileName,
ISceneNode* parent=0, s32 id=-1,
const core::vector3df& position = core::vector3df(0.0f,0.0f,0.0f),
const core::vector3df& rotation = core::vector3df(0.0f,0.0f,0.0f),
@ -901,7 +903,7 @@ namespace scene
specified some invalid parameters or that a mesh with that name already
exists. If successful, a pointer to the mesh is returned.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IAnimatedMesh* addHillPlaneMesh(const core::string<c16>& name,
virtual IAnimatedMesh* addHillPlaneMesh(const io::path& name,
const core::dimension2d<f32>& tileSize, const core::dimension2d<u32>& tileCount,
video::SMaterial* material = 0, f32 hillHeight = 0.0f,
const core::dimension2d<f32>& countHills = core::dimension2d<f32>(0.0f, 0.0f),
@ -930,7 +932,7 @@ namespace scene
specified some invalid parameters, that a mesh with that name already
exists, or that a texture could not be found. If successful, a pointer to the mesh is returned.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IAnimatedMesh* addTerrainMesh(const core::string<c16>& meshname,
virtual IAnimatedMesh* addTerrainMesh(const io::path& meshname,
video::IImage* texture, video::IImage* heightmap,
const core::dimension2d<f32>& stretchSize = core::dimension2d<f32>(10.0f,10.0f),
f32 maxHeight=200.0f,
@ -948,7 +950,7 @@ namespace scene
\param width1 Diameter of the cone's base, should be not smaller than the cylinder's diameter
\return Pointer to the arrow mesh if successful, otherwise 0.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IAnimatedMesh* addArrowMesh(const core::string<c16>& name,
virtual IAnimatedMesh* addArrowMesh(const io::path& name,
video::SColor vtxColor0=0xFFFFFFFF,
video::SColor vtxColor1=0xFFFFFFFF,
u32 tesselationCylinder=4, u32 tesselationCone=8,
@ -962,7 +964,7 @@ namespace scene
\param polyCountY Number of quads used for the vertical tiling
\return Pointer to the sphere mesh if successful, otherwise 0.
This pointer should not be dropped. See IReferenceCounted::drop() for more information. */
virtual IAnimatedMesh* addSphereMesh(const core::string<c16>& name,
virtual IAnimatedMesh* addSphereMesh(const io::path& name,
f32 radius=5.f, u32 polyCountX = 16,
u32 polyCountY = 16) = 0;
@ -971,7 +973,7 @@ namespace scene
\return Pointer to the volume light mesh if successful, otherwise 0.
This pointer should not be dropped. See IReferenceCounted::drop() for more information.
*/
virtual IAnimatedMesh* addVolumeLightMesh(const core::string<c16>& name,
virtual IAnimatedMesh* addVolumeLightMesh(const io::path& name,
const u32 SubdivideU = 32, const u32 SubdivideV = 32,
const video::SColor FootColor = video::SColor(51, 0, 230, 180),
const video::SColor TailColor = video::SColor(0, 0, 0, 0)) = 0;
@ -1394,7 +1396,7 @@ namespace scene
file, implement the ISceneUserDataSerializer interface and provide it as parameter here.
Otherwise, simply specify 0 as this parameter.
\return True if successful. */
virtual bool saveScene(const core::string<c16>& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0;
virtual bool saveScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0;
//! Saves the current scene into a file.
/** Scene nodes with the option isDebugObject set to true are not being saved.
@ -1419,7 +1421,7 @@ namespace scene
as parameter here. Otherwise, simply specify 0 as this
parameter.
\return True if successful. */
virtual bool loadScene(const core::string<c16>& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0;
virtual bool loadScene(const io::path& filename, ISceneUserDataSerializer* userDataSerializer=0) = 0;
//! Loads a scene. Note that the current scene is not cleared before.
/** The scene is usually load from an .irr file, an xml based format. .irr files can
@ -1439,6 +1441,11 @@ namespace scene
for details. */
virtual IMeshWriter* createMeshWriter(EMESH_WRITER_TYPE type) = 0;
//! Get a skinned mesh, which is not available as header-only code
/** Note: You need to drop() the pointer after use again, see IReferenceCounted::drop()
for details. */
virtual ISkinnedMesh* createSkinnedMesh() = 0;
//! Sets ambient color of the scene
virtual void setAmbientLight(const video::SColorf &ambientColor) = 0;

View File

@ -42,9 +42,9 @@ namespace scene
const core::vector3df& rotation = core::vector3df(0,0,0),
const core::vector3df& scale = core::vector3df(1.0f, 1.0f, 1.0f))
: RelativeTranslation(position), RelativeRotation(rotation), RelativeScale(scale),
Parent(0), ID(id), SceneManager(mgr), TriangleSelector(0),
AutomaticCullingState(EAC_BOX), IsVisible(true),
DebugDataVisible(EDS_OFF), IsDebugObject(false)
Parent(0), SceneManager(mgr), TriangleSelector(0), ID(id),
AutomaticCullingState(EAC_BOX), DebugDataVisible(EDS_OFF),
IsVisible(true), IsDebugObject(false)
{
if (parent)
parent->addChild(this);
@ -620,6 +620,8 @@ namespace scene
//! Updates the absolute position based on the relative and the parents position
/** Note: This does not recursively update the parents absolute positions, so if you have a deeper
hierarchy you might want to update the parents first.*/
virtual void updateAbsolutePosition()
{
if (Parent)
@ -795,24 +797,24 @@ namespace scene
//! List of all animator nodes
core::list<ISceneNodeAnimator*> Animators;
//! ID of the node.
s32 ID;
//! Pointer to the scene manager
ISceneManager* SceneManager;
//! Pointer to the triangle selector
ITriangleSelector* TriangleSelector;
//! ID of the node.
s32 ID;
//! Automatic culling state
E_CULLING_TYPE AutomaticCullingState;
//! Is the node visible?
bool IsVisible;
//! Flag if debug data should be drawn, such as Bounding Boxes.
s32 DebugDataVisible;
//! Is the node visible?
bool IsVisible;
//! Is debug object?
bool IsDebugObject;
};

View File

@ -34,33 +34,35 @@ namespace scene
public:
//! Gets joint count.
//! \return Returns amount of joints in the skeletal animated mesh.
/** \return Amount of joints in the skeletal animated mesh. */
virtual u32 getJointCount() const = 0;
//! Gets the name of a joint.
//! \param number: Zero based index of joint. The last joint
//! has the number getJointCount()-1;
//! \return Returns name of joint and null if an error happened.
/** \param number: Zero based index of joint. The last joint
has the number getJointCount()-1;
\return Name of joint and null if an error happened. */
virtual const c8* getJointName(u32 number) const = 0;
//! Gets a joint number from its name
//! \param name: Name of the joint.
//! \return Returns the number of the joint or -1 if not found.
/** \param name: Name of the joint.
\return Number of the joint or -1 if not found. */
virtual s32 getJointNumber(const c8* name) const = 0;
//! uses animation from another mesh
//! the animation is linked (not copied) based on joint names (so make sure they are unique)
//! \return Returns true if all joints in this mesh were
//! matched up (empty names will not be matched, and it's case
//! sensitive). Unmatched joints will not be animated.
//! Use animation from another mesh
/** The animation is linked (not copied) based on joint names
so make sure they are unique.
\return True if all joints in this mesh were
matched up (empty names will not be matched, and it's case
sensitive). Unmatched joints will not be animated. */
virtual bool useAnimationFrom(const ISkinnedMesh *mesh) = 0;
//!Update Normals when Animating
//!False= Don't animate, faster
//!True= Update normals
//! Update Normals when Animating
/** \param on If false don't animate, which is faster.
Else update normals, which allows for proper lighting of
animated meshes. */
virtual void updateNormalsWhenAnimating(bool on) = 0;
//!Sets Interpolation Mode
//! Sets Interpolation Mode
virtual void setInterpolationMode(E_INTERPOLATION_MODE mode) = 0;
//! Animates this mesh's joints based on frame input
@ -69,10 +71,12 @@ namespace scene
//! Preforms a software skin on this mesh based of joint positions
virtual void skinMesh() = 0;
//! converts the vertex type of all meshbuffers to tangents. eg for bumpmapping
//! converts the vertex type of all meshbuffers to tangents.
/** E.g. used for bump mapping. */
virtual void convertMeshToTangents() = 0;
//! (This feature is not implementated in irrlicht yet)
//! Allows to enable hardware skinning.
/* This feature is not implementated in Irrlicht yet */
virtual bool setHardwareSkinning(bool on) = 0;
//! A vertex weight
@ -179,26 +183,34 @@ namespace scene
//these functions will use the needed arrays, set values, etc to help the loaders
//! exposed for loaders: to add mesh buffers
virtual core::array<SSkinMeshBuffer*> &getMeshBuffers() = 0;
virtual core::array<SSkinMeshBuffer*>& getMeshBuffers() = 0;
//! exposed for loaders: joints list
virtual core::array<SJoint*> &getAllJoints() = 0;
virtual core::array<SJoint*>& getAllJoints() = 0;
//! exposed for loaders: joints list
virtual const core::array<SJoint*> &getAllJoints() const = 0;
virtual const core::array<SJoint*>& getAllJoints() const = 0;
//! loaders should call this after populating the mesh
virtual void finalize() = 0;
virtual SSkinMeshBuffer *createBuffer() = 0;
//! Adds a new meshbuffer to the mesh, access it as last one
virtual SSkinMeshBuffer* addMeshBuffer() = 0;
virtual SJoint *createJoint(SJoint *parent=0) = 0;
virtual SWeight *createWeight(SJoint *joint) = 0;
//! Adds a new joint to the mesh, access it as last one
virtual SJoint* addJoint(SJoint *parent=0) = 0;
virtual SPositionKey *createPositionKey(SJoint *joint) = 0;
virtual SScaleKey *createScaleKey(SJoint *joint) = 0;
virtual SRotationKey *createRotationKey(SJoint *joint) = 0;
//! Adds a new weight to the mesh, access it as last one
virtual SWeight* addWeight(SJoint *joint) = 0;
//! Adds a new position key to the mesh, access it as last one
virtual SPositionKey* addPositionKey(SJoint *joint) = 0;
//! Adds a new scale key to the mesh, access it as last one
virtual SScaleKey* addScaleKey(SJoint *joint) = 0;
//! Adds a new rotation key to the mesh, access it as last one
virtual SRotationKey* addRotationKey(SJoint *joint) = 0;
//! Check if the mesh is non-animated
virtual bool isStatic()=0;
};

View File

@ -9,7 +9,7 @@
#include "IImage.h"
#include "dimension2d.h"
#include "EDriverTypes.h"
#include "irrString.h"
#include "path.h"
#include "matrix4.h"
namespace irr
@ -102,7 +102,7 @@ class ITexture : public virtual IReferenceCounted
public:
//! constructor
ITexture(const core::string<c16>& name) : Name(name)
ITexture(const io::path& name) : Name(name)
{
Name.make_lower();
}
@ -161,7 +161,7 @@ public:
virtual bool hasMipMaps() const { return false; }
//! Returns if the texture has an alpha channel
virtual bool hasAlpha() const {
virtual bool hasAlpha() const {
return getColorFormat () == video::ECF_A8R8G8B8 || getColorFormat () == video::ECF_A1R5G5B5;
}
@ -174,11 +174,11 @@ public:
virtual bool isRenderTarget() const { return false; }
//! Get name of texture (in most cases this is the filename)
const core::string<c16>& getName() const { return Name; }
const io::path& getName() const { return Name; }
protected:
core::string<c16> Name;
io::path Name;
};

View File

@ -62,10 +62,30 @@ namespace video
ETS_TEXTURE_2,
//! Texture transformation
ETS_TEXTURE_3,
#if _IRR_MATERIAL_MAX_TEXTURES_>4
//! Texture transformation
ETS_TEXTURE_4,
#if _IRR_MATERIAL_MAX_TEXTURES_>5
//! Texture transformation
ETS_TEXTURE_5,
#if _IRR_MATERIAL_MAX_TEXTURES_>6
//! Texture transformation
ETS_TEXTURE_6,
#if _IRR_MATERIAL_MAX_TEXTURES_>7
//! Texture transformation
ETS_TEXTURE_7,
#endif
#endif
#endif
#endif
//! Not used
ETS_COUNT
};
//! enumeration for signalling ressources which were lost after the last render cycle
/** These values can be signalled by the driver, telling the app that some ressources
were lost and need to be recreated. Irrlicht will sometimes recreate the actual objects,
but the content needs to be recreated by the application. */
enum E_LOST_RESSOURCE
{
//! The whole device/driver is lost
@ -78,6 +98,8 @@ namespace video
ELR_HW_BUFFERS = 8
};
//! Special render targets, which usually map to dedicated hardware
/** These render targets (besides 0 and 1) need not be supported by gfx cards */
enum E_RENDER_TARGET
{
//! Render target is the main color frame buffer
@ -102,6 +124,14 @@ namespace video
ERT_AUX_BUFFER4
};
//! Enum for the types of fog distributions to choose from
enum E_FOG_TYPE
{
EFT_FOG_EXP=0,
EFT_FOG_LINEAR,
EFT_FOG_EXP2
};
struct SOverrideMaterial
{
//! The Material values
@ -262,7 +292,7 @@ namespace video
\return Pointer to the texture, or 0 if the texture
could not be loaded. This pointer should not be dropped. See
IReferenceCounted::drop() for more information. */
virtual ITexture* getTexture(const core::string<c16>& filename) = 0;
virtual ITexture* getTexture(const io::path& filename) = 0;
//! Get access to a named texture.
/** Loads the texture from disk if it is not
@ -292,7 +322,7 @@ namespace video
//! Renames a texture
/** \param texture Pointer to the texture to rename.
\param newName New name for the texture. This should be a unique name. */
virtual void renameTexture(ITexture* texture, const core::string<c16>& newName) = 0;
virtual void renameTexture(ITexture* texture, const io::path& newName) = 0;
//! Creates an empty texture of specified size.
/** \param size: Size of the texture.
@ -305,7 +335,7 @@ namespace video
should not be dropped. See IReferenceCounted::drop() for more
information. */
virtual ITexture* addTexture(const core::dimension2d<u32>& size,
const core::string<c16>& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
const io::path& name, ECOLOR_FORMAT format = ECF_A8R8G8B8) = 0;
//! Creates a texture from an IImage.
/** \param name A name for the texture. Later calls of
@ -314,7 +344,7 @@ namespace video
\return Pointer to the newly created texture. This pointer
should not be dropped. See IReferenceCounted::drop() for more
information. */
virtual ITexture* addTexture(const core::string<c16>& name, IImage* image) = 0;
virtual ITexture* addTexture(const io::path& name, IImage* image) = 0;
//! Adds a new render target texture to the texture cache.
/** \param size Size of the texture, in pixels. Width and
@ -327,7 +357,7 @@ namespace video
could not be created. This pointer should not be dropped. See
IReferenceCounted::drop() for more information. */
virtual ITexture* addRenderTargetTexture(const core::dimension2d<u32>& size,
const core::string<c16>& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
const io::path& name = "rt", const ECOLOR_FORMAT format = ECF_UNKNOWN) =0;
//! Removes a texture from the texture cache and deletes it.
/** This method can free a lot of memory!
@ -465,20 +495,50 @@ namespace video
//! Draws a vertex primitive list
/** Note that, depending on the index type, some vertices might be not
accessible through the index list. The limit is at 65535 vertices for 16bit
indices.
indices. Please note that currently not all primitives are available for
all drivers, and some might be emulated via triangle renders.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices.
\param indexList Pointer to array of indices. These define the vertices used
for each primitive. Depending on the pType, indices are interpreted as single
objects (for point like primitives), pairs (for lines), triplets (for
triangles), or quads.
\param primCount Amount of Primitives
\param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex.
\param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan.
\param iType Index type, e.g. video::EIT_16BIT for a triangle fan. */
\param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */
virtual void drawVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primCount,
E_VERTEX_TYPE vType=EVT_STANDARD,
scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
E_INDEX_TYPE iType=EIT_16BIT) =0;
//! Draws a vertex primitive list in 2d
/** Compared to the general (3d) version of this method, this
one sets up a 2d render mode, and uses only x and y of vectors.
Note that, depending on the index type, some vertices might be
not accessible through the index list. The limit is at 65535
vertices for 16bit indices. Please note that currently not all
primitives are available for all drivers, and some might be
emulated via triangle renders. This function is not available
for the sw drivers.
\param vertices Pointer to array of vertices.
\param vertexCount Amount of vertices in the array.
\param indexList Pointer to array of indices. These define the
vertices used for each primitive. Depending on the pType,
indices are interpreted as single objects (for point like
primitives), pairs (for lines), triplets (for triangles), or
quads.
\param primCount Amount of Primitives
\param vType Vertex type, e.g. video::EVT_STANDARD for S3DVertex.
\param pType Primitive type, e.g. scene::EPT_TRIANGLE_FAN for a triangle fan.
\param iType Index type, e.g. video::EIT_16BIT for 16bit indices. */
virtual void draw2DVertexPrimitiveList(const void* vertices, u32 vertexCount,
const void* indexList, u32 primCount,
E_VERTEX_TYPE vType=EVT_STANDARD,
scene::E_PRIMITIVE_TYPE pType=scene::EPT_TRIANGLES,
E_INDEX_TYPE iType=EIT_16BIT) =0;
//! Draws an indexed triangle list.
/** Note that there may be at maximum 65536 vertices, because
the index list is an array of 16 bit values each with a maximum
@ -636,7 +696,7 @@ namespace video
255, the image will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of
the texture is used to draw the image. */
virtual void draw2DImage(const video::ITexture* texture,
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::position2d<s32>& pos,
const core::array<core::rect<s32> >& sourceRects,
const core::array<s32>& indices,
@ -645,6 +705,29 @@ namespace video
SColor color=SColor(255,255,255,255),
bool useAlphaChannelOfTexture=false) =0;
//! Draws a set of 2d images, using a color and the alpha channel of the texture.
/** All drawings are clipped against clipRect (if != 0).
The subtextures are defined by the array of sourceRects and are
positioned using the array of positions.
\param texture Texture to be drawn.
\param pos Array of upper left 2d destinations where the images
will be drawn.
\param sourceRects Source rectangles of the image.
\param clipRect Pointer to rectangle on the screen where the
images are clipped to.
If this pointer is 0 then the image is not clipped.
\param color Color with which the image is drawn.
Note that the alpha component is used. If alpha is other than
255, the image will be transparent.
\param useAlphaChannelOfTexture: If true, the alpha channel of
the texture is used to draw the image. */
virtual void draw2DImageBatch(const video::ITexture* texture,
const core::array<core::position2d<s32> >& positions,
const core::array<core::rect<s32> >& sourceRects,
const core::rect<s32>* clipRect=0,
SColor color=SColor(255,255,255,255),
bool useAlphaChannelOfTexture=false) =0;
//! Draws a part of the texture into the rectangle. Note that colors must be an array of 4 colors if used.
/** Suggested and first implemented by zola.
\param texture The texture to draw from
@ -793,11 +876,11 @@ namespace video
you want per-pixel fog.
\param rangeFog Set this to true to enable range-based vertex
fog. The distance from the viewer is used to compute the fog,
not the z-coordinate. This is better, but slower. This is only
available with D3D and vertex fog. */
not the z-coordinate. This is better, but slower. This might not
be available with all drivers and fog settings. */
virtual void setFog(SColor color=SColor(0,255,255,255),
bool linearFog=true, f32 start=50.0f, f32 end=100.0f,
f32 density=0.01f,
E_FOG_TYPE fogType=EFT_FOG_LINEAR,
f32 start=50.0f, f32 end=100.0f, f32 density=0.01f,
bool pixelFog=false, bool rangeFog=false) =0;
//! Get the current color format of the color buffer
@ -896,7 +979,7 @@ namespace video
\param flag Texture creation flag.
\param enabled Specifies if the given flag should be enabled or
disabled. */
virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled) =0;
virtual void setTextureCreationFlag(E_TEXTURE_CREATION_FLAG flag, bool enabled=true) =0;
//! Returns if a texture creation flag is enabled or disabled.
/** You can change this value using setTextureCreationMode().
@ -913,7 +996,7 @@ namespace video
\return The created image.
If you no longer need the image, you should call IImage::drop().
See IReferenceCounted::drop() for more information. */
virtual IImage* createImageFromFile(const core::string<c16>& filename) = 0;
virtual IImage* createImageFromFile(const io::path& filename) = 0;
//! Creates a software image from a file.
/** No hardware texture will be created for this image. This
@ -933,7 +1016,7 @@ namespace video
\param param Control parameter for the backend (e.g. compression
level).
\return True on successful write. */
virtual bool writeImageToFile(IImage* image, const core::string<c16>& filename, u32 param = 0) = 0;
virtual bool writeImageToFile(IImage* image, const io::path& filename, u32 param = 0) = 0;
//! Writes the provided image to a file.
/** Requires that there is a suitable image writer registered
@ -986,7 +1069,7 @@ namespace video
//! Creates a software image from a part of another image.
/**
\param imageToCopy Image to copy the the new image in part.
\param imageToCopy Image to copy to the new image in part.
\param pos Position of rectangle to copy.
\param size Extents of rectangle to copy.
\return The created image.
@ -996,6 +1079,18 @@ namespace video
const core::position2d<s32>& pos,
const core::dimension2d<u32>& size) =0;
//! Creates a software image from a part of a texture.
/**
\param texture Texture to copy to the new image in part.
\param pos Position of rectangle to copy.
\param size Extents of rectangle to copy.
\return The created image.
If you no longer need the image, you should call IImage::drop().
See IReferenceCounted::drop() for more information. */
virtual IImage* createImage(ITexture* texture,
const core::position2d<s32>& pos,
const core::dimension2d<u32>& size) =0;
//! Event handler for resize events. Only used by the engine internally.
/** Used to notify the driver that the window was resized.
Usually, there is no need to call this method. */
@ -1111,7 +1206,7 @@ namespace video
if it is not currently loaded.
\param filename Name of the texture.
\return Pointer to loaded texture, or 0 if not found. */
virtual video::ITexture* findTexture(const core::string<c16>& filename) = 0;
virtual video::ITexture* findTexture(const io::path& filename) = 0;
//! Set or unset a clipping plane.
/** There are at least 6 clipping planes available for the user

View File

@ -6,7 +6,7 @@
#define __I_WRITE_FILE_H_INCLUDED__
#include "IReferenceCounted.h"
#include "irrString.h"
#include "path.h"
namespace irr
{
@ -37,11 +37,11 @@ namespace io
//! Get name of file.
/** \return File name as zero terminated character string. */
virtual const core::string<c16>& getFileName() const = 0;
virtual const path& getFileName() const = 0;
};
//! Internal function, please do not use.
IWriteFile* createWriteFile(const core::string<c16>& fileName, bool append);
IWriteFile* createWriteFile(const io::path& fileName, bool append);
} // end namespace io
} // end namespace irr

View File

@ -19,52 +19,61 @@
//! The defines for different operating system are:
//! _IRR_XBOX_PLATFORM_ for XBox
//! _IRR_WINDOWS_ for all irrlicht supported Windows versions
//! _IRR_WINDOWS_CE_PLATFORM_ for Windows CE
//! _IRR_WINDOWS_API_ for Windows or XBox
//! _IRR_LINUX_PLATFORM_ for Linux (it is defined here if no other os is defined)
//! _IRR_SOLARIS_PLATFORM_ for Solaris
//! _IRR_OSX_PLATFORM_ for Apple systems running OSX
//! _IRR_IPHONE_PLATFORM_ for Apple iPhone OS
//! _IRR_POSIX_API_ for Posix compatible systems
//! _IRR_USE_SDL_DEVICE_ for platform independent SDL framework
//! _IRR_USE_CONSOLE_DEVICE_ for no windowing system, like for running as a service
//! _IRR_USE_WINDOWS_DEVICE_ for Windows API based device
//! _IRR_USE_WINDOWS_CE_DEVICE_ for Windows CE API based device
//! _IRR_USE_LINUX_DEVICE_ for X11 based device
//! _IRR_USE_OSX_DEVICE_ for Cocoa native windowing on OSX
//! _IRR_USE_IPHONE_DEVICE_ for UIKit windowing on iPhoneOS (aka embeded OSX)
//! Note: PLATFORM defines the OS specific layer, API can groups several platforms
//! Note: PLATFORM defines the OS specific layer, API can group several platforms
//! DEVICE is the windowing system used, several PLATFORMs support more than one DEVICE
//! Moreover, the DEVICE defined here is not directly related to the Irrlicht devices created in the app (but may depend on each other).
//! Irrlicht can be compiled with more than one device
//! _IRR_COMPILE_WITH_WINDOWS_DEVICE_ for Windows API based device
//! _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_ for Windows CE API based device
//! _IRR_COMPILE_WITH_OSX_DEVICE_ for Cocoa native windowing on OSX
//! _IRR_COMPILE_WITH_X11_DEVICE_ for Linux X11 based device
//! _IRR_COMPILE_WITH_SDL_DEVICE_ for platform independent SDL framework
//! _IRR_COMPILE_WITH_CONSOLE_DEVICE_ for no windowing system, used as a fallback
//! _IRR_COMPILE_WITH_IPHONE_DEVICE_ for UIKit windowing on iPhoneOS (aka embeded OSX)
//! Uncomment this line to compile with the SDL device instead of platform specific devices
//#define _IRR_USE_SDL_DEVICE_
//! Uncomment this line to compile as a console application with no windowing system. Hardware drivers will be disabled.
//#define _IRR_USE_CONSOLE_DEVICE_
//! Uncomment this line to compile with the SDL device
//#define _IRR_COMPILE_WITH_SDL_DEVICE_
//! Comment this line to compile without the fallback console device.
#define _IRR_COMPILE_WITH_CONSOLE_DEVICE_
//! WIN32 for Windows32
//! WIN64 for Windows64
// The windows platform and API support SDL and WINDOW device
#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64) || defined(_WIN32_WCE)
#if defined(_WIN32) || defined(_WIN64) || defined(WIN32) || defined(WIN64)
#define _IRR_WINDOWS_
#define _IRR_WINDOWS_API_
#if !defined(_IRR_USE_SDL_DEVICE_) && !defined(_IRR_USE_CONSOLE_DEVICE_)
#define _IRR_USE_WINDOWS_DEVICE_
#endif
#define _IRR_COMPILE_WITH_WINDOWS_DEVICE_
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1300)
# error "Only Microsoft Visual Studio 7.0 and later are supported."
#endif
//! WINCE is a very restricted environment for mobile devices
#if defined(_WIN32_WCE)
#define _IRR_WINDOWS_
#define _IRR_WINDOWS_API_
#define _IRR_WINDOWS_CE_PLATFORM_
#define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
#endif
#if defined(_MSC_VER) && (_MSC_VER < 1300)
# error "Only Microsoft Visual Studio 7.0 and later are supported."
#endif
// XBox only suppots the native Window stuff
#if defined(_XBOX)
#undef _IRR_WINDOWS_
#define _IRR_XBOX_PLATFORM_
#define _IRR_WINDOWS_API_
//#define _IRR_USE_WINDOWS_DEVICE_
#undef _IRR_USE_WINDOWS_DEVICE_
//#define _IRR_USE_SDL_DEVICE_
//#define _IRR_COMPILE_WITH_WINDOWS_DEVICE_
#undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
//#define _IRR_COMPILE_WITH_SDL_DEVICE_
#include <xtl.h>
#endif
@ -76,10 +85,9 @@
#define _IRR_OSX_PLATFORM_
#if defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)
#define _IRR_IPHONE_PLATFORM_
#define _IRR_USE_IPHONE_DEVICE_
#define _IRR_COMPILE_WITH_IPHONE_DEVICE_
#if !defined(_IRR_USE_LINUX_DEVICE_) && !defined(_IRR_USE_CONSOLE_DEVICE_) && !defined(_IRR_USE_SDL_DEVICE_)
#define _IRR_USE_OSX_DEVICE_
#endif
#define _IRR_COMPILE_WITH_OSX_DEVICE_
#endif
#endif
@ -91,15 +99,15 @@
#define _IRR_LINUX_PLATFORM_
#endif
#define _IRR_POSIX_API_
#if !defined(_IRR_USE_SDL_DEVICE_) && !defined(_IRR_USE_CONSOLE_DEVICE_)
#define _IRR_USE_LINUX_DEVICE_
#endif
#define _IRR_COMPILE_WITH_X11_DEVICE_
#endif
//! Define _IRR_COMPILE_WITH_JOYSTICK_SUPPORT_ if you want joystick events.
#define _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
//! Maximum number of texture an SMaterial can have, up to 8 are supported by Irrlicht.
#define _IRR_MATERIAL_MAX_TEXTURES_ 4
//! Define _IRR_COMPILE_WITH_DIRECT3D_8_ and _IRR_COMPILE_WITH_DIRECT3D_9_ to
//! compile the Irrlicht engine with Direct3D8 and/or DIRECT3D9.
/** If you only want to use the software device or opengl this can be useful.
@ -110,14 +118,14 @@ _IRR_COMPILE_WITH_DX9_DEV_PACK_. So you simply need to add something like this
to the compiler settings: -DIRR_COMPILE_WITH_DX9_DEV_PACK
and this to the linker settings: -ld3dx9 -ld3dx8
Microsoft have chosen to remove D3D8 headers from their recent DXSDKs, and
so D3D8 support is now disabled by default. If you really want to build
with D3D8 support, then you will have to source a DXSDK with the appropriate
Microsoft have chosen to remove D3D8 headers from their recent DXSDKs, and
so D3D8 support is now disabled by default. If you really want to build
with D3D8 support, then you will have to source a DXSDK with the appropriate
headers, e.g. Summer 2004. This is a Microsoft issue, not an Irrlicht one.
*/
#if defined(_IRR_WINDOWS_API_) && (!defined(__GNUC__) || defined(IRR_COMPILE_WITH_DX9_DEV_PACK))
//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004
//! Only define _IRR_COMPILE_WITH_DIRECT3D_8_ if you have an appropriate DXSDK, e.g. Summer 2004
//#define _IRR_COMPILE_WITH_DIRECT3D_8_
#define _IRR_COMPILE_WITH_DIRECT3D_9_
@ -187,8 +195,8 @@ you will not be able to use anything provided by the GUI Environment, including
//! Define _IRR_WCHAR_FILESYSTEM to enable unicode filesystem support for the engine.
/** This enables the engine to read/write from unicode filesystem. If you
disable this feature, the engine behave as before ( ansi)
ones. */
disable this feature, the engine behave as before (ansi). This is currently only supported
for Windows based systems. */
//#define _IRR_WCHAR_FILESYSTEM
//! Define _IRR_COMPILE_WITH_ZLIB_ to enable compiling the engine using zlib.
@ -237,6 +245,13 @@ watch registers, variables etc. This works with ASM, HLSL, and both with pixel a
Note that the engine will run in D3D REF for this, which is a lot slower than HAL. */
#define _IRR_D3D_NO_SHADER_DEBUGGING
//! Define _IRR_D3D_USE_LEGACY_HLSL_COMPILER to enable the old HLSL compiler in recent DX SDKs
/** This enables support for ps_1_x shaders for recent DX SDKs. Otherwise, support
for this shader model is not available anymore in SDKs after Oct2006. You need to
distribute the OCT2006_d3dx9_31_x86.cab or OCT2006_d3dx9_31_x64.cab though, in order
to provide the user with the proper DLL. That's why it's disabled by default. */
//#define _IRR_D3D_USE_LEGACY_HLSL_COMPILER
//! Define _IRR_USE_NVIDIA_PERFHUD_ to opt-in to using the nVidia PerHUD tool
/** Enable, by opting-in, to use the nVidia PerfHUD performance analysis driver
tool <http://developer.nvidia.com/object/nvperfhud_home.html>. */
@ -363,6 +378,15 @@ B3D, MS3D or X meshes */
//! Define _IRR_COMPILE_WITH_TGA_WRITER_ if you want to write .tga files
#define _IRR_COMPILE_WITH_TGA_WRITER_
//! Define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_ if you want to open ZIP and GZIP archives
#define __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
//! Define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_ if you want to mount folders as archives
#define __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
//! Define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_ if you want to open ID software PAK archives
#define __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
//! Define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_ if you want to open TAR archives
#define __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
//! Set FPU settings
/** Irrlicht should use approximate float and integer fpu techniques
precision will be lower but speed higher. currently X86 only
@ -394,9 +418,17 @@ precision will be lower but speed higher. currently X86 only
#define IRRCALLCONV __cdecl
#endif // STDCALL_SUPPORTED
#else // _IRR_WINDOWS_API_
// Force symbol export in shared libraries built with gcc.
#if (__GNUC__ >= 4) && !defined(_IRR_STATIC_LIB_) && defined(IRRLICHT_EXPORTS)
#define IRRLICHT_API __attribute__ ((visibility("default")))
#else
#define IRRLICHT_API
#endif
#define IRRCALLCONV
#endif // _IRR_WINDOWS_API_
// We need to disable DIRECT3D9 support for Visual Studio 6.0 because
@ -427,8 +459,8 @@ precision will be lower but speed higher. currently X86 only
#undef BURNINGVIDEO_RENDERER_ULTRA_FAST
#define BURNINGVIDEO_RENDERER_CE
#undef _IRR_USE_WINDOWS_DEVICE_
#define _IRR_USE_WINDOWS_CE_DEVICE_
#undef _IRR_COMPILE_WITH_WINDOWS_DEVICE_
#define _IRR_COMPILE_WITH_WINDOWS_CE_DEVICE_
//#define _IRR_WCHAR_FILESYSTEM
#undef _IRR_COMPILE_WITH_IRR_MESH_LOADER_
@ -473,17 +505,13 @@ precision will be lower but speed higher. currently X86 only
#undef _IRR_COMPILE_WITH_OPENGL_
#endif
#ifndef _IRR_WINDOWS_API_
#undef _IRR_WCHAR_FILESYSTEM
#endif
#if defined(_IRR_SOLARIS_PLATFORM_)
#undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
#endif
//! Remove joystick support and hardware drivers when compiling as a service
#if defined(_IRR_USE_CONSOLE_DEVICE_)
#undef _IRR_COMPILE_WITH_JOYSTICK_EVENTS_
#undef _IRR_COMPILE_WITH_OPENGL_
#undef _IRR_COMPILE_WITH_DIRECT3D_8_
#undef _IRR_COMPILE_WITH_DIRECT3D_9_
#endif
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__

View File

@ -9,6 +9,7 @@
#include "dimension2d.h"
#include "IVideoDriver.h"
#include "EDriverTypes.h"
#include "EDeviceTypes.h"
#include "IEventReceiver.h"
#include "ICursorControl.h"
#include "IVideoModeList.h"
@ -212,6 +213,12 @@ namespace irr
//! Minimizes the window if possible.
virtual void minimizeWindow() =0;
//! Maximizes the window if possible.
virtual void maximizeWindow() =0;
//! Restore the window to normal size if possible.
virtual void restoreWindow() =0;
//! Activate any joysticks, and generate events for them.
/** Irrlicht contains support for joysticks, but does not generate joystick events by default,
as this would consume joystick info that 3rd party libraries might rely on. Call this method to
@ -230,10 +237,14 @@ namespace irr
virtual bool getGammaRamp(f32 &red, f32 &green, f32 &blue,
f32 &brightness, f32 &contrast) =0;
//! Get the type of the device.
/** This allows the user to check which windowing system is currently being
used. */
virtual E_DEVICE_TYPE getType() const = 0;
//! Allows to check which drivers are supported by the engine.
/** Even if true is returned the driver needs not be available
for an actual configuration requested upon device creation. */
//! Check if a driver type is supported by the engine.
/** Even if true is returned the driver may not be available
for a configuration requested when creating the device. */
static bool isDriverSupported(video::E_DRIVER_TYPE driver)
{
switch (driver)

View File

@ -152,6 +152,7 @@ namespace video
This class is used by most parts of the Irrlicht Engine
to specify a color. Another way is using the class SColorf, which
stores the color values in 4 floats.
This class must consist of only one u32 and must not use virtual functions.
*/
class SColor
{

View File

@ -6,6 +6,7 @@
#define __I_IRRLICHT_CREATION_PARAMETERS_H_INCLUDED__
#include "EDriverTypes.h"
#include "EDeviceTypes.h"
#include "dimension2d.h"
namespace irr
@ -18,6 +19,7 @@ namespace irr
{
//! Constructs a SIrrlichtCreationParameters structure with default values.
SIrrlichtCreationParameters() :
DeviceType(EIDT_BEST),
DriverType(video::EDT_BURNINGSVIDEO),
WindowSize(core::dimension2d<u32>(800, 600)),
Bits(16),
@ -43,6 +45,7 @@ namespace irr
SIrrlichtCreationParameters& operator=(const SIrrlichtCreationParameters& other)
{
DeviceType = other.DeviceType;
DriverType = other.DriverType;
WindowSize = other.WindowSize;
Bits = other.Bits;
@ -62,6 +65,19 @@ namespace irr
}
//! Type of the device.
/** This setting decides the windowing system used by the device, most device types are native
to a specific operating system and so may not be available.
EIDT_WIN32 is only available on Windows desktops,
EIDT_WINCE is only available on Windows mobile devices,
EIDT_COCOA is only available on Mac OSX,
EIDT_X11 is available on Linux, Solaris, BSD and other operating systems which use X11,
EIDT_SDL is available on most systems if compiled in,
EIDT_CONSOLE is usually available but can only render to text,
EIDT_BEST will select the best available device for your operating system.
Default: EIDT_BEST. */
E_DEVICE_TYPE DeviceType;
//! Type of video driver used to render graphics.
/** This can currently be video::EDT_NULL, video::EDT_SOFTWARE,
video::EDT_BURNINGSVIDEO, video::EDT_DIRECT3D8,
video::EDT_DIRECT3D9, and video::EDT_OPENGL.
@ -83,7 +99,7 @@ namespace irr
//! Specifies if the stencil buffer should be enabled.
/** Set this to true, if you want the engine be able to draw
stencil buffer shadows. Note that not all devices are able to
stencil buffer shadows. Note that not all drivers are able to
use the stencil buffer, hence it can be ignored during device
creation. Without the stencil buffer no shadows will be drawn.
Default: false. */
@ -106,7 +122,7 @@ namespace irr
again by the user.
The value is the maximal antialiasing factor requested for
the device. The cretion method will automatically try smaller
values if no window can be created with the diven value.
values if no window can be created with the given value.
Value one is usually the same as 0 (disabled), but might be a
special value on some platforms. On D3D devices it maps to
NONMASKABLE.

View File

@ -8,6 +8,7 @@
#include "SColor.h"
#include "matrix4.h"
#include "irrArray.h"
#include "irrMath.h"
#include "EMaterialTypes.h"
#include "EMaterialFlags.h"
#include "SMaterialLayer.h"
@ -82,17 +83,34 @@ namespace video
ECP_ALL=15
};
//! EMT_ONETEXTURE_BLEND: pack srcFact & dstFact and Modulo to MaterialTypeParam
inline f32 pack_texureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate )
//! Source of the alpha value to take
/** This is currently only supported in EMT_ONETEXTURE_BLEND. You can use an
or'ed combination of values. Alpha values are modulated (multiplicated). */
enum E_ALPHA_SOURCE
{
return (f32)(modulate << 16 | srcFact << 8 | dstFact);
//! Use no alpha, somewhat redundant with other settings
EAS_NONE=0,
//! Use vertex color alpha
EAS_VERTEX_COLOR,
//! Use texture alpha channel
EAS_TEXTURE
};
//! EMT_ONETEXTURE_BLEND: pack srcFact, dstFact, Modulate and alpha source to MaterialTypeParam
/** alpha source can be an OR'ed combination of E_ALPHA_SOURCE values. */
inline f32 pack_texureBlendFunc ( const E_BLEND_FACTOR srcFact, const E_BLEND_FACTOR dstFact, const E_MODULATE_FUNC modulate=EMFN_MODULATE_1X, const u32 alphaSource=EAS_TEXTURE )
{
const u32 tmp = (alphaSource << 24) | (modulate << 16) | (srcFact << 8) | dstFact;
return FR(tmp);
}
//! EMT_ONETEXTURE_BLEND: unpack srcFact & dstFact and Modulo to MaterialTypeParam
/** The fields don't use the full byte range, so we could pack even more... */
inline void unpack_texureBlendFunc ( E_BLEND_FACTOR &srcFact, E_BLEND_FACTOR &dstFact,
E_MODULATE_FUNC &modulo, const f32 param )
E_MODULATE_FUNC &modulo, u32& alphaSource, const f32 param )
{
const u32 state = (u32)param;
const u32 state = IR(param);
alphaSource = (state & 0xFF000000) >> 24;
modulo = E_MODULATE_FUNC( ( state & 0x00FF0000 ) >> 16 );
srcFact = E_BLEND_FACTOR ( ( state & 0x0000FF00 ) >> 8 );
dstFact = E_BLEND_FACTOR ( ( state & 0x000000FF ) );
@ -165,7 +183,7 @@ namespace video
};
//! Maximum number of texture an SMaterial can have.
const u32 MATERIAL_MAX_TEXTURES = 4;
const u32 MATERIAL_MAX_TEXTURES = _IRR_MATERIAL_MAX_TEXTURES_;
//! Struct for holding parameters for a material renderer
class SMaterial

View File

@ -67,7 +67,9 @@ namespace scene
const c8* const COLLADA_CREATE_SCENE_INSTANCES = "COLLADA_CreateSceneInstances";
//! Name of the parameter for changing the texture path of the built-in DMF loader.
/** Use it like this:
/** This path is prefixed to the file names defined in the Deled file when loading
textures. This allows to alter the paths for a specific project setting.
Use it like this:
\code
SceneManager->getStringParameters()->setAttribute(scene::DMF_TEXTURE_PATH, "path/to/your/textures");
\endcode
@ -75,17 +77,20 @@ namespace scene
const c8* const DMF_TEXTURE_PATH = "DMF_TexturePath";
//! Name of the parameter for preserving DMF textures dir structure with built-in DMF loader.
/** Use it like this:
/** If this parameter is set to true, the texture directory defined in the Deled file
is ignored, and only the texture name is used to find the proper file. Otherwise, the
texture path is also used, which allows to use a nicer media layout.
Use it like this:
\code
//this way you won't use this setting
SceneManager->getParameters()->setAttribute(scene::DMF_USE_MATERIALS_DIRS, false);
//this way you won't use this setting (default)
SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, false);
\endcode
\code
//this way you'll use this setting
SceneManager->getParameters()->setAttribute(scene::DMF_USE_MATERIALS_DIRS, true);
SceneManager->getParameters()->setAttribute(scene::DMF_IGNORE_MATERIALS_DIRS, true);
\endcode
**/
const c8* const DMF_USE_MATERIALS_DIRS = "DMF_MaterialsDir";
const c8* const DMF_IGNORE_MATERIALS_DIRS = "DMF_IgnoreMaterialsDir";
//! Name of the parameter for setting reference value of alpha in transparent materials.
/** Use it like this:
@ -115,6 +120,15 @@ namespace scene
const c8* const OBJ_LOADER_IGNORE_GROUPS = "OBJ_IgnoreGroups";
//! Flag to avoid loading material .mtl file for .obj files
/** Use it like this:
\code
SceneManager->getParameters()->setAttribute(scene::OBJ_LOADER_IGNORE_MATERIAL_FILES, true);
\endcode
**/
const c8* const OBJ_LOADER_IGNORE_MATERIAL_FILES = "OBJ_IgnoreMaterialFiles";
//! Flag to ignore the b3d file's mipmapping flag
/** Instead Irrlicht's texture creation flag is used. Use it like this:
\code
@ -129,6 +143,23 @@ namespace scene
deleting scene nodes for example */
const c8* const IRR_SCENE_MANAGER_IS_EDITOR = "IRR_Editor";
//! Name of the parameter for setting the length of debug normals.
/** Use it like this:
\code
SceneManager->getParameters()->setAttribute(scene::DEBUG_NORMAL_LENGTH, 1.5f);
\endcode
**/
const c8* const DEBUG_NORMAL_LENGTH = "DEBUG_Normal_Length";
//! Name of the parameter for setting the color of debug normals.
/** Use it like this:
\code
SceneManager->getParameters()->setAttributeAsColor(scene::DEBUG_NORMAL_COLOR, video::SColor(255, 255, 255, 255));
\endcode
**/
const c8* const DEBUG_NORMAL_COLOR = "DEBUG_Normal_Color";
} // end namespace scene
} // end namespace irr

View File

@ -6,6 +6,7 @@
#define __IRR_CORE_UTIL_H_INCLUDED__
#include "irrString.h"
#include "path.h"
namespace irr
{
@ -19,11 +20,10 @@ namespace core
// ----------- some basic quite often used string functions -----------------
//! search if a filename has a proper extension
inline s32 isFileExtension ( const core::string<c16>& filename,
const core::string<c16>& ext0,
const core::string<c16>& ext1,
const core::string<c16>& ext2
)
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 )
@ -37,11 +37,10 @@ inline s32 isFileExtension ( const core::string<c16>& filename,
}
//! search if a filename has a proper extension
inline bool hasFileExtension ( const core::string<c16>& filename,
const core::string<c16>& ext0,
const core::string<c16>& ext1 = "",
const core::string<c16>& ext2 = ""
)
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;
}
@ -112,7 +111,7 @@ inline core::stringc& deletePathFromFilename(core::stringc& filename)
}
//! trim paths
inline core::string<c16>& deletePathFromPath(core::string<c16>& filename, s32 pathCount)
inline io::path& deletePathFromPath(io::path& filename, s32 pathCount)
{
// delete path from filename
s32 i = filename.size();
@ -136,15 +135,9 @@ inline core::string<c16>& deletePathFromPath(core::string<c16>& filename, s32 pa
return filename;
}
//! gets the last char of a string or null
inline c16 lastChar( const core::string<c16>& s)
{
return s.size() ? s [ s.size() - 1 ] : 0;
}
//! looks if file is in the same directory of path. returns offset of directory.
//! 0 means in same directory. 1 means file is direct child of path
inline s32 isInSameDirectory ( const core::string<c16>& path, const core::string<c16>& file )
inline s32 isInSameDirectory ( const io::path& path, const io::path& file )
{
s32 subA = 0;
s32 subB = 0;

View File

@ -5,18 +5,15 @@
#ifndef __FAST_A_TO_F_H_INCLUDED__
#define __FAST_A_TO_F_H_INCLUDED__
#include <stdlib.h>
#include "irrMath.h"
#include <float.h> // For FLT_MAX
#include <limits.h> // For INT_MAX / UINT_MAX
namespace irr
{
namespace core
{
// we write [16] here instead of [] to work around a swig bug
const float fast_atof_table[16] = {
// we write [17] here instead of [] to work around a swig bug
const float fast_atof_table[17] = {
0.f,
0.1f,
0.01f,
@ -32,7 +29,8 @@ const float fast_atof_table[16] = {
0.000000000001f,
0.0000000000001f,
0.00000000000001f,
0.000000000000001f
0.000000000000001f,
0.0000000000000001f
};
//! Convert a simple string of base 10 digits into a signed 32 bit integer.

View File

@ -7,6 +7,7 @@
#include "irrTypes.h"
#include <new>
// necessary for older compilers
#include <memory.h>
namespace irr

View File

@ -378,7 +378,8 @@ public:
//! Performs a binary search for an element, returns -1 if not found.
/** The array will be sorted before the binary search if it is not
already sorted.
already sorted. Caution is advised! Be careful not to call this on
unsorted const arrays, or the slower method will be used.
\param element Element to search for.
\return Position of the searched element if it was found,
otherwise -1 is returned. */
@ -389,6 +390,21 @@ public:
}
//! Performs a binary search for an element if possible, returns -1 if not found.
/** This method is for const arrays and so cannot call sort(), if the array is
not sorted then linear_search will be used instead. Potentially very slow!
\param element Element to search for.
\return Position of the searched element if it was found,
otherwise -1 is returned. */
s32 binary_search(const T& element) const
{
if (is_sorted)
return binary_search(element, 0, used-1);
else
return linear_search(element);
}
//! Performs a binary search for an element, returns -1 if not found.
/** \param element: Element to search for.
\param left First left index

View File

@ -186,8 +186,7 @@ class map
Node& operator* ()
{
if (atEnd())
throw "Iterator at end";
_IRR_DEBUG_BREAK_IF(atEnd()) // access violation
return *Cur;
}
@ -336,8 +335,8 @@ class map
Node& operator* ()
{
if (atEnd())
throw "ParentFirstIterator at end";
_IRR_DEBUG_BREAK_IF(atEnd()) // access violation
return *getNode();
}
@ -436,8 +435,8 @@ class map
Node& operator* ()
{
if (atEnd())
throw "ParentLastIterator at end";
_IRR_DEBUG_BREAK_IF(atEnd()) // access violation
return *getNode();
}
private:
@ -483,7 +482,7 @@ class map
// myTree["Foo"] = 32;
// If "Foo" already exists update its value else insert a new element.
// int i = myTree["Foo"]
// If "Foo" exists return its value, else throw an exception.
// If "Foo" exists return its value.
class AccessClass
{
// Let map be the only one who can instantiate this class.
@ -504,8 +503,7 @@ class map
Node* node = Tree.find(Key);
// Not found
if (node==0)
throw "Item not found";
_IRR_DEBUG_BREAK_IF(node==0) // access violation
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
return node->getValue();

View File

@ -8,7 +8,9 @@
#include "IrrCompileConfig.h"
#include "irrTypes.h"
#include <math.h>
#include <float.h>
#include <stdlib.h> // for abs() etc.
#include <limits.h> // For INT_MAX / UINT_MAX
#if defined(_IRR_SOLARIS_PLATFORM_) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__) || defined (_WIN32_WCE)
#define sqrtf(X) (f32)sqrt((f64)(X))
@ -25,6 +27,10 @@
#define logf(X) (f32)log((f64)(X))
#endif
#ifndef FLT_MAX
#define FLT_MAX 3.402823466E+38F
#endif
namespace irr
{
namespace core
@ -444,6 +450,7 @@ namespace core
// calculate: 1 / x
REALINLINE f32 reciprocal( const f32 f )
{
_IRR_DEBUG_BREAK_IF(f==0.f); //divide by zero
#if defined (IRRLICHT_FAST_MATH)
// SSE Newton-Raphson reciprocal estimate, accurate to 23 significant
@ -477,6 +484,7 @@ namespace core
// calculate: 1 / x
REALINLINE f64 reciprocal ( const f64 f )
{
_IRR_DEBUG_BREAK_IF(f==0.); //divide by zero
return 1.0 / f;
}
@ -484,6 +492,7 @@ namespace core
// calculate: 1 / x, low precision allowed
REALINLINE f32 reciprocal_approxim ( const f32 f )
{
_IRR_DEBUG_BREAK_IF(f==0.f); //divide by zero
#if defined( IRRLICHT_FAST_MATH)
// SSE Newton-Raphson reciprocal estimate, accurate to 23 significant
@ -633,5 +642,10 @@ namespace core
} // end namespace core
} // end namespace irr
#ifndef IRRLICHT_FAST_MATH
using irr::core::IR;
using irr::core::FR;
#endif
#endif

View File

@ -23,8 +23,8 @@ so you can assign Unicode to string<c8> and ASCII/Latin-1 to string<wchar_t>
(and the other way round) if you want to.
However, note that the conversation between both is not done using any encoding.
This means that c8 strings are treated as ASCII/Latin-1, not UTF-8, and
are simply expanded to the equivalent wchar_t, while Unicode/wchar_t
This means that c8 strings are treated as ASCII/Latin-1, not UTF-8, and
are simply expanded to the equivalent wchar_t, while Unicode/wchar_t
characters are truncated to 8-bit ASCII/Latin-1 characters, discarding all
other information in the wchar_t.
*/
@ -444,7 +444,7 @@ public:
{
if ( (u32) sourcePos > used )
return false;
u32 i;
for( i=0; array[sourcePos + i] && other[i]; ++i)
if (locale_lower( array[sourcePos + i]) != locale_lower(other[i]))
@ -473,7 +473,7 @@ public:
//! compares the first n characters of the strings
/** \param other Other string to compare.
\param n Number of characters to compare
\return True if the n first characters of this string are smaller. */
\return True if the n first characters of both strings are equal. */
bool equalsn(const string<T>& other, u32 n) const
{
u32 i;
@ -490,7 +490,7 @@ public:
//! compares the first n characters of the strings
/** \param str Other string to compare.
\param n Number of characters to compare
\return True if the n first characters of this string are smaller. */
\return True if the n first characters of both strings are equal. */
bool equalsn(const T* const str, u32 n) const
{
if (!str)
@ -887,7 +887,7 @@ public:
//! Trims the string.
/** Removes the specified characters (by default, Latin-1 whitespace)
/** Removes the specified characters (by default, Latin-1 whitespace)
from the begining and the end of the string. */
string<T>& trim(const string<T> & whitespace = " \t\n\r")
{
@ -941,6 +941,12 @@ public:
}
}
//! gets the last char of a string or null
inline T lastChar() const
{
return used > 1 ? array[used-2] : 0;
}
private:
//! Reallocate the array, make it bigger or smaller

View File

@ -119,15 +119,20 @@ typedef unsigned short wchar_t;
#endif // microsoft compiler
#endif // _IRR_WINDOWS_API_
namespace irr
{
//! Should the wide character version of the FileSystem be used
#if defined(_IRR_WCHAR_FILESYSTEM)
//! 16 bit character variable. Used for unicode Filesystem and unicode strings
typedef wchar_t c16;
typedef wchar_t fschar_t;
#else
//! 8 bit character variable. Used for ansi Filesystem and non-unicode strings
typedef char c16;
typedef char fschar_t;
#endif
} // end namespace irr
//! define a break macro for debugging.
#if defined(_DEBUG)
#if defined(_IRR_WINDOWS_API_) && defined(_MSC_VER) && !defined (_WIN32_WCE)

View File

@ -16,7 +16,7 @@
Welcome to the irrXML API documentation.
Here you'll find any information you'll need to develop applications with
irrXML. If you look for a tutorial on how to start, take a look at the \ref irrxmlexample,
at the homepage of irrXML at <A HREF="http://xml.irrlicht3d.org" >xml.irrlicht3d.org</A>
at the homepage of irrXML at <A HREF="http://www.ambiera.com/irrxml/">www.ambiera.com/irrxml/</A>
or into the SDK in the directory \example.
irrXML is intended to be a high speed and easy-to-use XML Parser for C++, and

View File

@ -69,6 +69,7 @@
#include "IEventReceiver.h"
#include "IFileList.h"
#include "IFileSystem.h"
#include "IGeometryCreator.h"
#include "IGPUProgrammingServices.h"
#include "IGUIButton.h"
#include "IGUICheckBox.h"
@ -125,6 +126,7 @@
#include "irrMath.h"
#include "irrString.h"
#include "irrTypes.h"
#include "path.h"
#include "irrXML.h"
#include "ISceneCollisionManager.h"
#include "ISceneManager.h"

View File

@ -13,7 +13,12 @@
#include "rect.h"
#include "irrString.h"
// enable this to keep track of changes to the matrix
// and make simpler identity check for seldomly changing matrices
// otherwise identity check will always compare the elements
//#define USE_MATRIX_TEST
// this is only for debugging purposes
//#define USE_MATRIX_TEST_DEBUG
#if defined( USE_MATRIX_TEST_DEBUG )
@ -1402,9 +1407,11 @@ namespace core
inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovRH(
f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar)
{
const f64 h = 1.0/tan(fieldOfViewRadians/2.0);
const f64 h = reciprocal(tan(fieldOfViewRadians*0.5));
_IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero
const T w = h / aspectRatio;
_IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
M[0] = w;
M[1] = 0;
M[2] = 0;
@ -1439,9 +1446,11 @@ namespace core
inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveFovLH(
f32 fieldOfViewRadians, f32 aspectRatio, f32 zNear, f32 zFar)
{
const f64 h = 1.0/tan(fieldOfViewRadians/2.0);
const f64 h = reciprocal(tan(fieldOfViewRadians*0.5));
_IRR_DEBUG_BREAK_IF(aspectRatio==0.f); //divide by zero
const T w = (T)(h / aspectRatio);
_IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
M[0] = w;
M[1] = 0;
M[2] = 0;
@ -1474,6 +1483,9 @@ namespace core
inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixOrthoLH(
f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
{
_IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
M[0] = (T)(2/widthOfViewVolume);
M[1] = 0;
M[2] = 0;
@ -1506,6 +1518,9 @@ namespace core
inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixOrthoRH(
f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
{
_IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
M[0] = (T)(2/widthOfViewVolume);
M[1] = 0;
M[2] = 0;
@ -1538,6 +1553,9 @@ namespace core
inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveRH(
f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
{
_IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
M[0] = (T)(2*zNear/widthOfViewVolume);
M[1] = 0;
M[2] = 0;
@ -1570,6 +1588,9 @@ namespace core
inline CMatrix4<T>& CMatrix4<T>::buildProjectionMatrixPerspectiveLH(
f32 widthOfViewVolume, f32 heightOfViewVolume, f32 zNear, f32 zFar)
{
_IRR_DEBUG_BREAK_IF(widthOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(heightOfViewVolume==0.f); //divide by zero
_IRR_DEBUG_BREAK_IF(zNear==zFar); //divide by zero
M[0] = (T)(2*zNear/widthOfViewVolume);
M[1] = 0;
M[2] = 0;
@ -1770,11 +1791,11 @@ namespace core
template <class T>
inline CMatrix4<T>& CMatrix4<T>::buildNDCToDCMatrix( const core::rect<s32>& viewport, f32 zScale)
{
const f32 scaleX = (viewport.getWidth() - 0.75f ) / 2.0f;
const f32 scaleY = -(viewport.getHeight() - 0.75f ) / 2.0f;
const f32 scaleX = (viewport.getWidth() - 0.75f ) * 0.5f;
const f32 scaleY = -(viewport.getHeight() - 0.75f ) * 0.5f;
const f32 dx = -0.5f + ( (viewport.UpperLeftCorner.X + viewport.LowerRightCorner.X ) / 2.0f );
const f32 dy = -0.5f + ( (viewport.UpperLeftCorner.Y + viewport.LowerRightCorner.Y ) / 2.0f );
const f32 dx = -0.5f + ( (viewport.UpperLeftCorner.X + viewport.LowerRightCorner.X ) * 0.5f );
const f32 dy = -0.5f + ( (viewport.UpperLeftCorner.Y + viewport.LowerRightCorner.Y ) * 0.5f );
makeIdentity();
M[12] = (T)dx;

20
include/path.h Normal file
View File

@ -0,0 +1,20 @@
// Copyright (C) 2002-2009 Nikolaus Gebhardt
// This file is part of the "Irrlicht Engine" and the "irrXML" project.
// For conditions of distribution and use, see copyright notice in irrlicht.h
#ifndef __IRR_PATH_H_INCLUDED__
#define __IRR_PATH_H_INCLUDED__
#include "irrString.h"
namespace irr
{
namespace io
{
typedef core::string<fschar_t> path;
} // io
} // irr
#endif // __IRR_PATH_H_INCLUDED__

View File

@ -157,16 +157,16 @@ public:
}
//! Calculates the angle of this vector in degrees in the trigonometric sense.
/** 0 is to the left (9 o'clock), values increase clockwise.
/** 0 is to the right (3 o'clock), values increase counter-clockwise.
This method has been suggested by Pr3t3nd3r.
\return Returns a value between 0 and 360. */
f64 getAngleTrig() const
{
if (X == 0)
return Y < 0 ? 270 : 90;
else
if (Y == 0)
return X < 0 ? 180 : 0;
else
if (X == 0)
return Y < 0 ? 270 : 90;
if ( Y > 0)
if (X > 0)
@ -181,7 +181,7 @@ public:
}
//! Calculates the angle of this vector in degrees in the counter trigonometric sense.
/** 0 is to the right (3 o'clock), values increase counter-clockwise.
/** 0 is to the right (3 o'clock), values increase clockwise.
\return Returns a value between 0 and 360. */
inline f64 getAngle() const
{
@ -190,7 +190,8 @@ public:
else if (X == 0)
return Y < 0 ? 90 : 270;
f64 tmp = Y / getLength();
// don't use getLength here to avoid precision loss with s32 vectors
f64 tmp = Y / sqrt((f64)(X*X + Y*Y));
tmp = atan( core::squareroot(1 - tmp*tmp) / tmp) * RADTODEG64;
if (X>0 && Y>0)

View File

@ -1,5 +1,5 @@
==========================================================================
The Irrlicht Engine SDK version 1.5
The Irrlicht Engine SDK version 1.6
==========================================================================
Welcome the Irrlicht Engine SDK.
@ -179,7 +179,9 @@ The Irrlicht Engine SDK version 1.5
Gareth Davidson (bitplane) Developer/ Forum admin
Thomas Alten (burningwater) Wrote the burningsvideo software rasterizer
Luke P. Hoschke (luke) Wrote the b3d loader, the new animation system, VBOs and other things
Colin MacDonald (rogerborg)
Colin MacDonald (rogerborg) All hands person
Michael Zeilfelder (cutealien) GUI and patch expert
Ahmed Hilali (blindside) The shader and advanced effects man
Dean Wadsworth (varmint) OSX port maintainer and game developer
Alvaro F. Celis (afecelis) Lots of work in the community, for example video tutorials about Irrlicht, forum admin
John Goewert (Saigumi) Wrote some tutorials for the Irrlicht Engine and doing admin stuff

View File

@ -11,7 +11,7 @@
# norootforbuild
Name: libIrrlicht1
Version: 1.4.2
Version: 1.6.0
Release: 0.pm.1
Summary: The Irrlicht Engine SDK
License: see readme.txt

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<pkgref spec="1.12" uuid="2386F932-20DF-4969-AC74-D8E599723083"><config><identifier>org.irrlichtengine.irrlichtEngineV151.irrlicht.pkg</identifier><version>1</version><description></description><post-install type="none"/><requireAuthorization/><installFrom includeRoot="true">/Library/Frameworks/Irrlicht.framework</installFrom><installTo>/Library/Frameworks</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>requireAuthorization</mod><mod>extraFiles</mod><mod>version</mod><mod>installTo</mod><mod>identifier</mod></config><contents><file-list>01irrlicht-contents.xml</file-list><component id="org.irrlichtengine.Irrlicht" path="/Library/Frameworks/Irrlicht.framework" version="1.6"><component id="org.irrlichtengine.Irrlicht" path="/Library/Frameworks/Irrlicht.framework/Versions/1.5" version="1.6"/></component><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents><extra-files/></pkgref>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<pkgref spec="1.12" uuid="39601D70-59FA-4C66-9AFF-A8523FAD4C7D"><config><identifier>com.irrlicht.irrlichtEngineV151.html.pkg</identifier><version>1</version><description></description><post-install type="none"/><installFrom relative="true">../../../doctemp/html</installFrom><installTo mod="true">/private/tmp/Irrlicht1.5.1-install/doc/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"></packageStore><mod>parent</mod><mod>scripts.postinstall.path</mod><mod>requireAuthorization</mod><mod>installTo.isAbsoluteType</mod><mod>scripts.postinstall.isRelativeType</mod><mod>installFrom.isRelativeType</mod><mod>installTo.path</mod><mod>version</mod><mod>installTo</mod></config><contents><file-list>02html-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<pkgref spec="1.12" uuid="C29A053C-0445-485A-8194-7261BB730C44"><config><identifier>com.irrlicht.irrlichtEngineV151.media.pkg</identifier><version>1</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/gazdavidson/svn/irr1.5/media</installFrom><installTo mod="true">/private/tmp/Irrlicht1.5.1-install/media/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>parent</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>03media-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<pkgref spec="1.12" uuid="90910AF1-E4E6-4A7B-BE2C-D5651EB803FD"><config><identifier>com.irrlicht.irrlichtEngineV151.tools.pkg</identifier><version>1</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/gazdavidson/svn/irr1.5/tools</installFrom><installTo mod="true">/private/tmp/Irrlicht1.5.1-install/tools/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>parent</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>05tools-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
<pkg-contents spec="1.12"><f n="changes.txt" o="gazdavidson" g="staff" p="33188" pt="/Users/gazdavidson/svn/irr1.5/changes.txt" m="false" t="file"/></pkg-contents>

View File

@ -0,0 +1 @@
<pkgref spec="1.12" uuid="6023EA57-F1C6-45DA-B563-D72F5E02D7EA"><config><identifier>com.irrlicht.irrlichtEngineV151.changes.pkg</identifier><version>1</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/gazdavidson/svn/irr1.5/changes.txt</installFrom><installTo mod="true">/private/tmp/Irrlicht1.5.1-install/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>parent</mod><mod>installTo.path</mod><mod>installTo</mod></config><contents><file-list>07changes-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>

View File

@ -0,0 +1 @@
<pkg-contents spec="1.12"><f n="readme.txt" o="gazdavidson" g="staff" p="33188" pt="/Users/gazdavidson/svn/irr1.5/readme.txt" m="false" t="file"/></pkg-contents>

View File

@ -0,0 +1 @@
<pkgref spec="1.12" uuid="C1B685D8-ECDF-4CE4-A672-82B0F1C0EC80"><config><identifier>com.irrlicht.irrlichtEngineV151.readme.pkg</identifier><version>1</version><description/><post-install type="none"/><requireAuthorization/><installFrom>/Users/gazdavidson/svn/irr1.5/readme.txt</installFrom><installTo mod="true">/private/tmp/Irrlicht1.5.1-install/</installTo><flags><followSymbolicLinks/></flags><packageStore type="internal"/><mod>parent</mod><mod>scripts.postinstall.path</mod><mod>scripts.postupgrade.isRelativeType</mod><mod>scripts.postupgrade.path</mod><mod>installTo.path</mod><mod>installTo</mod></config><scripts><postinstall relative="true" mod="true">moveAll.sh</postinstall><postupgrade relative="true" mod="true">moveAll.sh</postupgrade></scripts><contents><file-list>08readme-contents.xml</file-list><filter>/CVS$</filter><filter>/\.svn$</filter><filter>/\.cvsignore$</filter><filter>/\.cvspass$</filter><filter>/\.DS_Store$</filter></contents></pkgref>

View File

@ -0,0 +1,47 @@
<pkmkdoc spec="1.12"><properties><title>Irrlicht Engine v1.5.1</title><build>/Users/gazdavidson/Desktop/installer/Irrlicht v1.5.1.mpkg</build><organization>com.irrlicht</organization><userSees ui="easy"/><min-target os="2"/><domain system="true"/></properties><distribution><versions min-spec="1.000000"/><scripts></scripts></distribution><contents><choice title="Irrlicht.framework" id="installframework" description="This is required, unless you want to build from source." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="org.irrlichtengine.irrlichtEngineV151.irrlicht.pkg"/></choice><choice title="Documentation" id="installdocs" description="This will install the documentation" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.irrlicht.irrlichtEngineV151.html.pkg"/></choice><choice title="Example media" id="installmedia" description="The media for the examples, without this the examples will not run." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.irrlicht.irrlichtEngineV151.media.pkg"/></choice><choice title="Examples" id="installexamples" description="The examples, which you'll need if you want to get started." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.irrlicht.irrlichtEngineV151.examples.pkg"/></choice><choice title="Tools" id="installtools" description="Some useful tools; GUI editor, mesh converter and bitmap font generator" starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.irrlicht.irrlichtEngineV151.tools.pkg"/></choice><choice title="Source code" id="installsource" description="The complete source code to the Irrlicht Engine, this allows you to make changes to the core and make your own custom versions of Irrlicht." starts_selected="true" starts_enabled="true" starts_hidden="false"><pkgref id="com.irrlicht.irrlichtEngineV151.source.pkg"/></choice><choice title="changes" id="installchangelog" starts_selected="true" starts_enabled="true" starts_hidden="true"><pkgref id="com.irrlicht.irrlichtEngineV151.changes.pkg"/></choice><choice title="readme" id="installreadme" starts_selected="true" starts_enabled="true" starts_hidden="true"><pkgref id="com.irrlicht.irrlichtEngineV151.readme.pkg"/></choice></contents><resources bg-scale="none" bg-align="topleft"><locale lang="en"><resource mime-type="text/rtf" kind="embedded" type="license"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
{\fonttbl\f0\fnil\fcharset0 Verdana;}
{\colortbl;\red255\green255\blue255;}
{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc0\levelnfcn0\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{decimal\}.}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1}}
{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}}
\deftab720
\pard\pardeftab720\sl320\sa220\ql\qnatural
\f0\fs22 \cf0 The Irrlicht Engine License\
Copyright \'a9 2002-2009 Nikolaus Gebhardt\
This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.\
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:\
\pard\tx220\tx720\pardeftab720\li720\fi-720\sl320\ql\qnatural
\ls1\ilvl0\cf0 {\listtext 1. }The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.\
{\listtext 2. }Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.\
{\listtext 3. }This notice may not be removed or altered from any source distribution.}]]></resource><resource mime-type="text/rtf" kind="embedded" type="readme"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
\f0\fs26 \cf0 The Irrlicht Engine is a cross platform, high performance 3D scene graph API for C++ programmers.\
\
This package contains:\
\
* The library runtime. This installs to /Library/Frameworks/Irrlicht.framework and allows you to create and run Irrlicht 3D applications.\
\
* The examples and project files, which will allow you to get started developing Irrlicht applications.\
\
* The documentation, which is also available online at http://irrlicht.sourceforge.net/\
\
* The source to the engine, so that you can modify the engine itself.}]]></resource></locale><locale lang="fr"><resource mime-type="text/rtf" kind="embedded" type="readme"><![CDATA[{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf430
{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
{\colortbl;\red255\green255\blue255;}
\deftab720
\pard\pardeftab720\ql\qnatural
\f0\fs24 \cf0 Le moteur Irrlicht est une API de rendu 3D tr\'e8s performante pour les programmeurs C++.\
\
Ce paquet contient:\
\
* La biblioth\'e8que de runtime. Ceci s'installe vers /Library/Frameworks/Irrlicht.framework et vous permet de cr\'e9er et de lancer des applications Irrlicht, notamment en 3d.\
\
* Les exemples et les projets, qui vous permettront de commencer \'e0 d\'e9velopper des applications Irrlicht.\
\
* La documentation, qui est aussi disponible sur http://irrlicht.sourceforge.net/\
\
* Les sources du moteur, afin que vous puissiez modifier le moteur vous-m\'eame.}]]></resource></locale></resources><flags/><extra-files/><item type="file">01irrlicht.xml</item><item type="file">02html.xml</item><item type="file">03media.xml</item><item type="file">04examples.xml</item><item type="file">05tools.xml</item><item type="file">06source.xml</item><item type="file">07changes.xml</item><item type="file">08readme.xml</item><mod>properties.userDomain</mod><mod>properties.systemDomain</mod><mod>properties.anywhereDomain</mod><mod>properties.customizeOption</mod><mod>extraFiles</mod><mod>properties.title</mod></pkmkdoc>

View File

@ -0,0 +1,6 @@
#!/bin/sh
mkdir -p $HOME/Irrlicht1.6.0/
chmod a+rw $HOME/Irrlicht1.6.0
find /private/tmp/Irrlicht1.6.0-install -exec chmod a+rw {} \;
cp -rfp /private/tmp/Irrlicht1.6.0-install/ $HOME/Irrlicht1.6.0/
rm -Rf /private/tmp/Irrlicht1.6.0-install

View File

@ -0,0 +1,28 @@
This is the source package for the Irrlicht framework installer.
Build steps are as follows-
1) Remove the framework so you don't accidentally package more than one version, if you use the GUI to do this empty the trash so XCode doesn't build to the trash! It's best to run this command from the console:
rm -Rf /Library/Frameworks/Irrlicht.framework
2) Build the library and the binaries.
* Navigate to source/Irrlicht/MacOSX and open the XCode project
* Choose release mode and build Irrlicht.framework
** For the moment it's not worth installing the sample binaries, they can't be launched due to console input
3) Build the documentation
* Open the console and navigate to scripts/doc/irrlicht
* Make sure you have doxygen installed. If you have Aptitude for OSX then type:
sudo apt-get install doxygen
* Now run the makedocumentation bash script:
./makedocumentation.sh
4) Now double click the package file and build it.

View File

@ -23,9 +23,10 @@ namespace scene
{
namespace
{
enum e3DSChunk
{
// Primary chunk
C3DS_MAIN3DS = 0x4D4D,
@ -40,7 +41,7 @@ enum e3DSChunk
C3DS_EDIT_OBJECT = 0x4000,
// sub chunks of C3DS_EDIT_MATERIAL
C3DS_MATNAME = 0xA000,
C3DS_MATNAME = 0xA000,
C3DS_MATAMBIENT = 0xA010,
C3DS_MATDIFFUSE = 0xA020,
C3DS_MATSPECULAR = 0xA030,
@ -120,6 +121,7 @@ enum e3DSChunk
C3DS_CHUNK_MAX = 0xFFFF
};
}
//! Constructor
@ -153,7 +155,7 @@ C3DSMeshFileLoader::~C3DSMeshFileLoader()
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".bsp")
bool C3DSMeshFileLoader::isALoadableFileExtension(const core::string<c16>& filename) const
bool C3DSMeshFileLoader::isALoadableFileExtension(const io::path& filename) const
{
return core::hasFileExtension ( filename, "3ds" );
}
@ -302,7 +304,7 @@ bool C3DSMeshFileLoader::readColorChunk(io::IReadFile* file, ChunkData* chunk,
{
// read 8 bit data
file->read(c, sizeof(c));
out.set(255, c[0], c[1], c[2]);
out.set(255, c[0], c[1], c[2]);
data.read += sizeof(c);
}
break;
@ -316,7 +318,7 @@ bool C3DSMeshFileLoader::readColorChunk(io::IReadFile* file, ChunkData* chunk,
cf[1] = os::Byteswap::byteswap(cf[1]);
cf[2] = os::Byteswap::byteswap(cf[2]);
#endif
out.set(255, (s32)(cf[0]*255.0f), (s32)(cf[1]*255.0f), (s32)(cf[2]*255.0f));
out.set(255, (s32)(cf[0]*255.0f), (s32)(cf[1]*255.0f), (s32)(cf[2]*255.0f));
data.read += sizeof(cf);
}
break;
@ -914,7 +916,7 @@ bool C3DSMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData* parent)
readObjectChunk(file, &data);
break;
case C3DS_TRIVERT:
case C3DS_TRIVERT:
readVertices(file, data);
break;
@ -936,12 +938,12 @@ bool C3DSMeshFileLoader::readObjectChunk(io::IReadFile* file, ChunkData* parent)
}
break;
case C3DS_TRIFACE:
case C3DS_TRIFACE:
readIndices(file, data);
readObjectChunk(file, &data); // read smooth and material groups
break;
case C3DS_TRIFACEMAT:
case C3DS_TRIFACEMAT:
readMaterialGroup(file, data);
break;
@ -1066,7 +1068,7 @@ void C3DSMeshFileLoader::composeObject(io::IReadFile* file, const core::stringc&
{
u32 vtxCount = mb->Vertices.size();
if (vtxCount>maxPrimitives)
{
{
IMeshBuffer* tmp = mb;
mb = new SMeshBuffer();
Mesh->addMeshBuffer(mb);
@ -1146,7 +1148,7 @@ void C3DSMeshFileLoader::loadMaterials(io::IReadFile* file)
{
const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[0]);
if (FileSystem->existFile(fname))
texture = SceneManager->getVideoDriver()->getTexture(fname);
texture = SceneManager->getVideoDriver()->getTexture(fname);
}
if (!texture)
os::Printer::log("Could not load a texture for entry in 3ds file",
@ -1164,7 +1166,7 @@ void C3DSMeshFileLoader::loadMaterials(io::IReadFile* file)
{
const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[2]);
if (FileSystem->existFile(fname))
texture = SceneManager->getVideoDriver()->getTexture(fname);
texture = SceneManager->getVideoDriver()->getTexture(fname);
}
if (!texture)
{
@ -1187,7 +1189,7 @@ void C3DSMeshFileLoader::loadMaterials(io::IReadFile* file)
{
const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[3]);
if (FileSystem->existFile(fname))
texture = SceneManager->getVideoDriver()->getTexture(fname);
texture = SceneManager->getVideoDriver()->getTexture(fname);
}
if (!texture)
@ -1212,7 +1214,7 @@ void C3DSMeshFileLoader::loadMaterials(io::IReadFile* file)
{
const core::stringc fname = FileSystem->getFileDir(modelFilename) + "/" + FileSystem->getFileBasename(Materials[i].Filename[4]);
if (FileSystem->existFile(fname))
texture = SceneManager->getVideoDriver()->getTexture(fname);
texture = SceneManager->getVideoDriver()->getTexture(fname);
}
if (!texture)
os::Printer::log("Could not load a texture for entry in 3ds file",

View File

@ -30,7 +30,7 @@ public:
//! returns true if the file maybe is able to be loaded by this class
//! based on the file extension (e.g. ".cob")
virtual bool isALoadableFileExtension(const core::string<c16>& filename) const;
virtual bool isALoadableFileExtension(const io::path& filename) const;
//! creates/loads an animated mesh from the file.
//! \return Pointer to the created mesh. Returns 0 if loading failed.
@ -41,7 +41,7 @@ public:
private:
// byte-align structures
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack( push, packing )
# pragma pack( 1 )
# define PACK_STRUCT
@ -58,7 +58,7 @@ private:
} PACK_STRUCT;
// Default alignment
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
# pragma pack( pop, packing )
#endif
@ -105,13 +105,13 @@ private:
*this = o;
}
~SMaterialGroup()
{
~SMaterialGroup()
{
clear();
}
void clear()
{
void clear()
{
delete [] faces;
faces = 0;
faceCount = 0;

View File

@ -72,7 +72,6 @@ CAnimatedMeshMD3::CAnimatedMeshMD3()
Mesh = new SMD3Mesh();
setInterpolationShift ( 0, 0 );
}
@ -181,10 +180,10 @@ IMesh* CAnimatedMeshMD3::getMesh(s32 frame, s32 detailLevel, s32 startFrameLoop,
(SMeshBufferLightMap*) MeshIPol.getMeshBuffer(i)
);
}
MeshIPol.recalculateBoundingBox ();
MeshIPol.recalculateBoundingBox();
// build current tags
buildTagArray ( frameA, frameB, iPol );
buildTagArray( frameA, frameB, iPol );
Current = candidate;
return &MeshIPol;

Some files were not shown because too many files have changed in this diff Show More