2007-05-20 11:03:49 -07:00
|
|
|
|
2009-01-14 04:37:51 -08:00
|
|
|
// Copyright (C) 2002-2009 Nikolaus Gebhardt
|
2007-05-20 11:03:49 -07:00
|
|
|
// This file is part of the "Irrlicht Engine".
|
|
|
|
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
|
|
|
|
|
|
|
#include "CGUIEnvironment.h"
|
2007-07-25 22:30:19 -07:00
|
|
|
|
|
|
|
#ifdef _IRR_COMPILE_WITH_GUI_
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
#include "IVideoDriver.h"
|
|
|
|
|
|
|
|
#include "CGUISkin.h"
|
|
|
|
#include "CGUIButton.h"
|
|
|
|
#include "CGUIWindow.h"
|
|
|
|
#include "CGUIScrollBar.h"
|
|
|
|
#include "CGUIFont.h"
|
|
|
|
#include "CGUISpriteBank.h"
|
|
|
|
#include "CGUIImage.h"
|
|
|
|
#include "CGUIMeshViewer.h"
|
|
|
|
#include "CGUICheckBox.h"
|
|
|
|
#include "CGUIListBox.h"
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
#include "CGUITreeView.h"
|
|
|
|
#include "CGUIImageList.h"
|
2007-05-20 11:03:49 -07:00
|
|
|
#include "CGUIFileOpenDialog.h"
|
|
|
|
#include "CGUIColorSelectDialog.h"
|
|
|
|
#include "CGUIStaticText.h"
|
|
|
|
#include "CGUIEditBox.h"
|
2007-06-30 16:30:40 -07:00
|
|
|
#include "CGUISpinBox.h"
|
2007-05-20 11:03:49 -07:00
|
|
|
#include "CGUIInOutFader.h"
|
|
|
|
#include "CGUIMessageBox.h"
|
|
|
|
#include "CGUIModalScreen.h"
|
|
|
|
#include "CGUITabControl.h"
|
|
|
|
#include "CGUIContextMenu.h"
|
|
|
|
#include "CGUIComboBox.h"
|
|
|
|
#include "CGUIMenu.h"
|
|
|
|
#include "CGUIToolBar.h"
|
2007-12-21 23:49:29 -08:00
|
|
|
#include "CGUITable.h"
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
#include "CDefaultGUIElementFactory.h"
|
|
|
|
#include "IWriteFile.h"
|
|
|
|
#include "IXMLWriter.h"
|
|
|
|
|
|
|
|
#include "BuiltInFont.h"
|
|
|
|
#include "os.h"
|
|
|
|
|
|
|
|
namespace irr
|
|
|
|
{
|
|
|
|
namespace gui
|
|
|
|
{
|
|
|
|
|
|
|
|
const wchar_t* IRR_XML_FORMAT_GUI_ENV = L"irr_gui";
|
|
|
|
const wchar_t* IRR_XML_FORMAT_GUI_ELEMENT = L"element";
|
|
|
|
const wchar_t* IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE = L"type";
|
|
|
|
|
|
|
|
//! constructor
|
|
|
|
CGUIEnvironment::CGUIEnvironment(io::IFileSystem* fs, video::IVideoDriver* driver, IOSOperator* op)
|
2009-01-19 05:48:22 -08:00
|
|
|
: IGUIElement(EGUIET_ELEMENT, 0, 0, 0, core::rect<s32>(core::position2d<s32>(0,0), driver ? core::dimension2d<s32>(driver->getScreenSize()) : core::dimension2d<s32>(0,0))),
|
2007-06-08 18:07:21 -07:00
|
|
|
Driver(driver), Hovered(0), Focus(0), LastHoveredMousePos(0,0), CurrentSkin(0),
|
2007-05-20 11:03:49 -07:00
|
|
|
FileSystem(fs), UserReceiver(0), Operator(op)
|
|
|
|
{
|
|
|
|
if (Driver)
|
|
|
|
Driver->grab();
|
|
|
|
|
|
|
|
if (FileSystem)
|
|
|
|
FileSystem->grab();
|
|
|
|
|
|
|
|
if (Operator)
|
|
|
|
Operator->grab();
|
|
|
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
IGUIEnvironment::setDebugName("CGUIEnvironment");
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// gui factory
|
|
|
|
IGUIElementFactory* factory = new CDefaultGUIElementFactory(this);
|
|
|
|
registerGUIElementFactory(factory);
|
|
|
|
factory->drop();
|
|
|
|
|
|
|
|
loadBuiltInFont();
|
|
|
|
|
|
|
|
IGUISkin* skin = createSkin( gui::EGST_WINDOWS_METALLIC );
|
|
|
|
setSkin(skin);
|
|
|
|
skin->drop();
|
|
|
|
|
|
|
|
//set tooltip default
|
|
|
|
ToolTip.LastTime = 0;
|
|
|
|
ToolTip.LaunchTime = 1000;
|
|
|
|
ToolTip.Element = 0;
|
2007-07-07 00:03:54 -07:00
|
|
|
|
|
|
|
// environment is root tab group
|
|
|
|
Environment = this;
|
|
|
|
setTabGroup(true);
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! destructor
|
|
|
|
CGUIEnvironment::~CGUIEnvironment()
|
|
|
|
{
|
|
|
|
if (Hovered && Hovered != this)
|
|
|
|
{
|
|
|
|
Hovered->drop();
|
|
|
|
Hovered = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Driver)
|
|
|
|
{
|
|
|
|
Driver->drop();
|
|
|
|
Driver = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Focus)
|
|
|
|
{
|
|
|
|
Focus->drop();
|
|
|
|
Focus = 0;
|
|
|
|
}
|
|
|
|
|
2007-06-08 18:07:21 -07:00
|
|
|
if (ToolTip.Element)
|
|
|
|
{
|
|
|
|
ToolTip.Element->drop();
|
|
|
|
ToolTip.Element = 0;
|
|
|
|
}
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
if (FileSystem)
|
|
|
|
{
|
|
|
|
FileSystem->drop();
|
|
|
|
FileSystem = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Operator)
|
|
|
|
{
|
|
|
|
Operator->drop();
|
|
|
|
Operator = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// drop skin
|
|
|
|
if (CurrentSkin)
|
|
|
|
{
|
|
|
|
CurrentSkin->drop();
|
|
|
|
CurrentSkin = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
u32 i;
|
|
|
|
|
2008-04-29 04:34:54 -07:00
|
|
|
// delete all sprite banks
|
|
|
|
for (i=0; i<Banks.size(); ++i)
|
|
|
|
if (Banks[i].Bank)
|
|
|
|
Banks[i].Bank->drop();
|
|
|
|
|
|
|
|
// delete all fonts
|
2007-05-20 11:03:49 -07:00
|
|
|
for (i=0; i<Fonts.size(); ++i)
|
|
|
|
Fonts[i].Font->drop();
|
|
|
|
|
|
|
|
// remove all factories
|
|
|
|
for (i=0; i<GUIElementFactoryList.size(); ++i)
|
|
|
|
GUIElementFactoryList[i]->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void CGUIEnvironment::loadBuiltInFont()
|
|
|
|
{
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
core::string<c16> filename = "#DefaultFont";
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
io::IReadFile* file = io::createMemoryReadFile(BuiltInFontData, BuiltInFontDataSize, filename, false);
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
CGUIFont* font = new CGUIFont(this, filename );
|
2007-05-20 11:03:49 -07:00
|
|
|
if (!font->load(file))
|
|
|
|
{
|
2008-02-11 11:34:12 -08:00
|
|
|
os::Printer::log("Error: Could not load built-in Font. Did you compile without the BMP loader?", ELL_ERROR);
|
2007-05-20 11:03:49 -07:00
|
|
|
font->drop();
|
|
|
|
file->drop();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
SFont f;
|
|
|
|
f.Filename = filename;
|
|
|
|
f.Font = font;
|
|
|
|
Fonts.push_back(f);
|
|
|
|
|
|
|
|
file->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! draws all gui elements
|
|
|
|
void CGUIEnvironment::drawAll()
|
|
|
|
{
|
|
|
|
if (Driver)
|
|
|
|
{
|
2009-01-19 05:48:22 -08:00
|
|
|
core::dimension2d<s32> dim(Driver->getScreenSize());
|
2007-05-20 11:03:49 -07:00
|
|
|
if (AbsoluteRect.LowerRightCorner.X != dim.Width ||
|
|
|
|
AbsoluteRect.LowerRightCorner.Y != dim.Height)
|
|
|
|
{
|
|
|
|
// resize gui environment
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
DesiredRect.LowerRightCorner = dim;
|
2007-05-25 13:23:12 -07:00
|
|
|
AbsoluteClippingRect = DesiredRect;
|
|
|
|
AbsoluteRect = DesiredRect;
|
2007-05-20 11:03:49 -07:00
|
|
|
updateAbsolutePosition();
|
2009-01-19 05:48:22 -08:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
// make sure tooltip is always on top
|
|
|
|
if (ToolTip.Element)
|
|
|
|
bringToFront(ToolTip.Element);
|
|
|
|
|
|
|
|
draw();
|
|
|
|
OnPostRender ( os::Timer::getTime () );
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! sets the focus to an element
|
2007-07-07 00:03:54 -07:00
|
|
|
bool CGUIEnvironment::setFocus(IGUIElement* element)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
if (Focus == element)
|
2007-07-07 00:03:54 -07:00
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
|
|
|
return false;
|
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
// GUI Environment should not get the focus
|
|
|
|
if (element == this)
|
|
|
|
element = 0;
|
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
// stop element from being deleted
|
|
|
|
if (element)
|
|
|
|
element->grab();
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
// focus may change or be removed in this call
|
|
|
|
IGUIElement *currentFocus = 0;
|
2007-05-20 11:03:49 -07:00
|
|
|
if (Focus)
|
|
|
|
{
|
2007-07-07 00:03:54 -07:00
|
|
|
currentFocus = Focus;
|
|
|
|
currentFocus->grab();
|
|
|
|
SEvent e;
|
|
|
|
e.EventType = EET_GUI_EVENT;
|
|
|
|
e.GUIEvent.Caller = Focus;
|
|
|
|
e.GUIEvent.Element = element;
|
|
|
|
e.GUIEvent.EventType = EGET_ELEMENT_FOCUS_LOST;
|
|
|
|
if (Focus->OnEvent(e))
|
|
|
|
{
|
|
|
|
if (element)
|
|
|
|
element->drop();
|
|
|
|
currentFocus->drop();
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
currentFocus->drop();
|
|
|
|
currentFocus = 0;
|
|
|
|
}
|
2009-01-19 05:48:22 -08:00
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
if (element)
|
|
|
|
{
|
|
|
|
currentFocus = Focus;
|
|
|
|
if (currentFocus)
|
|
|
|
currentFocus->grab();
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
// send focused event
|
|
|
|
SEvent e;
|
|
|
|
e.EventType = EET_GUI_EVENT;
|
2007-07-07 00:03:54 -07:00
|
|
|
e.GUIEvent.Caller = element;
|
|
|
|
e.GUIEvent.Element = Focus;
|
2007-05-20 11:03:49 -07:00
|
|
|
e.GUIEvent.EventType = EGET_ELEMENT_FOCUSED;
|
2007-07-07 00:03:54 -07:00
|
|
|
if (element->OnEvent(e))
|
|
|
|
{
|
|
|
|
if (element)
|
|
|
|
element->drop();
|
|
|
|
if (currentFocus)
|
|
|
|
currentFocus->drop();
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
|
|
|
return false;
|
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
2007-07-07 00:03:54 -07:00
|
|
|
|
|
|
|
if (currentFocus)
|
|
|
|
currentFocus->drop();
|
|
|
|
|
|
|
|
if (Focus)
|
|
|
|
Focus->drop();
|
|
|
|
|
|
|
|
// element is the new focus so it doesn't have to be dropped
|
|
|
|
Focus = element;
|
2009-01-19 05:48:22 -08:00
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
return true;
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! returns the element with the focus
|
2007-09-15 17:18:13 -07:00
|
|
|
IGUIElement* CGUIEnvironment::getFocus() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return Focus;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! removes the focus from an element
|
2007-07-07 00:03:54 -07:00
|
|
|
bool CGUIEnvironment::removeFocus(IGUIElement* element)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
if (Focus && Focus==element)
|
|
|
|
{
|
|
|
|
SEvent e;
|
|
|
|
e.EventType = EET_GUI_EVENT;
|
|
|
|
e.GUIEvent.Caller = Focus;
|
2007-07-07 00:03:54 -07:00
|
|
|
e.GUIEvent.Element = 0;
|
2007-05-20 11:03:49 -07:00
|
|
|
e.GUIEvent.EventType = EGET_ELEMENT_FOCUS_LOST;
|
2007-07-07 00:03:54 -07:00
|
|
|
if (Focus->OnEvent(e))
|
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Focus)
|
|
|
|
{
|
|
|
|
Focus->drop();
|
2007-05-20 11:03:49 -07:00
|
|
|
Focus = 0;
|
|
|
|
}
|
2009-01-19 05:48:22 -08:00
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
return true;
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Returns if the element has focus
|
2007-09-15 17:18:13 -07:00
|
|
|
bool CGUIEnvironment::hasFocus(IGUIElement* element) const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2009-01-19 05:48:22 -08:00
|
|
|
return (element == Focus);
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! returns the current video driver
|
2007-09-15 17:18:13 -07:00
|
|
|
video::IVideoDriver* CGUIEnvironment::getVideoDriver() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return Driver;
|
|
|
|
}
|
|
|
|
|
2009-01-22 04:40:06 -08:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! returns the current file system
|
2007-09-15 17:18:13 -07:00
|
|
|
io::IFileSystem* CGUIEnvironment::getFileSystem() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return FileSystem;
|
|
|
|
}
|
|
|
|
|
2009-01-22 04:40:06 -08:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! returns the current file system
|
2007-09-15 17:18:13 -07:00
|
|
|
IOSOperator* CGUIEnvironment::getOSOperator() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return Operator;
|
|
|
|
}
|
|
|
|
|
2009-01-22 04:40:06 -08:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! clear all GUI elements
|
|
|
|
void CGUIEnvironment::clear()
|
|
|
|
{
|
2007-06-17 21:15:12 -07:00
|
|
|
// Remove the focus
|
|
|
|
if (Focus)
|
|
|
|
{
|
|
|
|
Focus->drop();
|
|
|
|
Focus = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Hovered && Hovered != this)
|
|
|
|
{
|
|
|
|
Hovered->drop();
|
|
|
|
Hovered = 0;
|
|
|
|
}
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
// get the root's children in case the root changes in future
|
|
|
|
const core::list<IGUIElement*>& children = getRootGUIElement()->getChildren();
|
|
|
|
|
|
|
|
while (!children.empty())
|
|
|
|
(*children.getLast())->remove();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! called by ui if an event happened.
|
2007-09-16 16:41:55 -07:00
|
|
|
bool CGUIEnvironment::OnEvent(const SEvent& event)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
2008-08-14 01:55:40 -07:00
|
|
|
bool ret = false;
|
2008-09-09 15:50:14 -07:00
|
|
|
if (UserReceiver
|
|
|
|
&& (event.EventType != EET_MOUSE_INPUT_EVENT)
|
|
|
|
&& (event.EventType != EET_KEY_INPUT_EVENT)
|
2009-01-19 05:48:22 -08:00
|
|
|
&& (event.EventType != EET_GUI_EVENT || event.GUIEvent.Caller != this))
|
2007-11-09 13:55:42 -08:00
|
|
|
{
|
2008-08-14 01:55:40 -07:00
|
|
|
ret = UserReceiver->OnEvent(event);
|
2007-11-09 13:55:42 -08:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2008-08-14 01:55:40 -07:00
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
|
|
|
return ret;
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
|
|
|
//
|
2007-05-20 11:03:49 -07:00
|
|
|
void CGUIEnvironment::OnPostRender( u32 time )
|
|
|
|
{
|
|
|
|
// check tooltip
|
|
|
|
|
|
|
|
// launch tooltip
|
|
|
|
if ( time - ToolTip.LastTime >= ToolTip.LaunchTime &&
|
|
|
|
Hovered && Hovered != this &&
|
|
|
|
ToolTip.Element == 0 &&
|
|
|
|
Hovered != ToolTip.Element &&
|
2007-06-08 18:07:21 -07:00
|
|
|
Hovered->getToolTipText().size() &&
|
2009-01-19 05:48:22 -08:00
|
|
|
getSkin() &&
|
2007-06-08 18:07:21 -07:00
|
|
|
getSkin()->getFont(EGDF_TOOLTIP)
|
2007-05-20 11:03:49 -07:00
|
|
|
)
|
|
|
|
{
|
|
|
|
core::rect<s32> pos;
|
2007-06-08 18:07:21 -07:00
|
|
|
|
|
|
|
pos.UpperLeftCorner = LastHoveredMousePos;
|
2009-01-19 05:48:22 -08:00
|
|
|
core::dimension2du dim = getSkin()->getFont(EGDF_TOOLTIP)->getDimension(Hovered->getToolTipText().c_str());
|
2007-06-08 18:07:21 -07:00
|
|
|
dim.Width += getSkin()->getSize(EGDS_TEXT_DISTANCE_X)*2;
|
|
|
|
dim.Height += getSkin()->getSize(EGDS_TEXT_DISTANCE_Y)*2;
|
|
|
|
|
2007-07-05 04:20:03 -07:00
|
|
|
pos.UpperLeftCorner.Y -= dim.Height+1;
|
2007-06-08 18:07:21 -07:00
|
|
|
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + dim.Height-1;
|
|
|
|
pos.LowerRightCorner.X = pos.UpperLeftCorner.X + dim.Width;
|
|
|
|
|
|
|
|
pos.constrainTo(getAbsolutePosition());
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
ToolTip.Element = addStaticText(Hovered->getToolTipText().c_str(), pos, true, true, this, -1, true);
|
|
|
|
ToolTip.Element->setOverrideColor(getSkin()->getColor(EGDC_TOOLTIP));
|
2007-06-08 18:07:21 -07:00
|
|
|
ToolTip.Element->setBackgroundColor(getSkin()->getColor(EGDC_TOOLTIP_BACKGROUND));
|
|
|
|
ToolTip.Element->setOverrideFont(getSkin()->getFont(EGDF_TOOLTIP));
|
2007-05-20 11:03:49 -07:00
|
|
|
ToolTip.Element->setSubElement(true);
|
|
|
|
ToolTip.Element->grab();
|
|
|
|
|
|
|
|
s32 textHeight = ToolTip.Element->getTextHeight();
|
|
|
|
pos = ToolTip.Element->getRelativePosition();
|
|
|
|
pos.LowerRightCorner.Y = pos.UpperLeftCorner.Y + textHeight;
|
|
|
|
ToolTip.Element->setRelativePosition(pos);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
IGUIElement::OnPostRender ( time );
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
|
|
|
//
|
2007-05-20 11:03:49 -07:00
|
|
|
void CGUIEnvironment::updateHoveredElement(core::position2d<s32> mousePos)
|
|
|
|
{
|
|
|
|
IGUIElement* lastHovered = Hovered;
|
2007-06-08 18:07:21 -07:00
|
|
|
LastHoveredMousePos = mousePos;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
Hovered = getElementFromPoint(mousePos);
|
|
|
|
|
|
|
|
if (Hovered)
|
|
|
|
{
|
|
|
|
u32 now = os::Timer::getTime ();
|
|
|
|
|
|
|
|
if (Hovered != this)
|
|
|
|
Hovered->grab();
|
|
|
|
|
|
|
|
if (Hovered != lastHovered)
|
|
|
|
{
|
2009-01-19 05:48:22 -08:00
|
|
|
SEvent event;
|
2007-05-20 11:03:49 -07:00
|
|
|
event.EventType = EET_GUI_EVENT;
|
|
|
|
|
|
|
|
if (lastHovered)
|
|
|
|
{
|
|
|
|
event.GUIEvent.Caller = lastHovered;
|
|
|
|
event.GUIEvent.EventType = EGET_ELEMENT_LEFT;
|
|
|
|
lastHovered->OnEvent(event);
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( ToolTip.Element )
|
|
|
|
{
|
|
|
|
ToolTip.Element->remove();
|
|
|
|
ToolTip.Element->drop();
|
|
|
|
ToolTip.Element = 0;
|
2007-06-08 18:07:21 -07:00
|
|
|
ToolTip.LastTime += 500;
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// boost tooltip generation for relaunch
|
|
|
|
if ( now - ToolTip.LastTime < ToolTip.LastTime )
|
|
|
|
{
|
2007-06-08 18:07:21 -07:00
|
|
|
ToolTip.LastTime += 500;
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
ToolTip.LastTime = now;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
event.GUIEvent.Caller = Hovered;
|
|
|
|
event.GUIEvent.EventType = EGET_ELEMENT_HOVERED;
|
|
|
|
Hovered->OnEvent(event);
|
|
|
|
}
|
2009-01-19 05:48:22 -08:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
if (lastHovered && lastHovered != this)
|
|
|
|
lastHovered->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! This sets a new event receiver for gui events. Usually you do not have to
|
|
|
|
//! use this method, it is used by the internal engine.
|
|
|
|
void CGUIEnvironment::setUserEventReceiver(IEventReceiver* evr)
|
|
|
|
{
|
|
|
|
UserReceiver = evr;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! posts an input event to the environment
|
2007-09-16 16:41:55 -07:00
|
|
|
bool CGUIEnvironment::postEventFromUser(const SEvent& event)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
switch(event.EventType)
|
|
|
|
{
|
|
|
|
case EET_GUI_EVENT:
|
|
|
|
// hey, why is the user sending gui events..?
|
|
|
|
break;
|
|
|
|
case EET_MOUSE_INPUT_EVENT:
|
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
updateHoveredElement(core::position2d<s32>(event.MouseInput.X, event.MouseInput.Y));
|
|
|
|
|
|
|
|
if (event.MouseInput.Event == EMIE_LMOUSE_PRESSED_DOWN)
|
|
|
|
if ( (Hovered && Hovered != Focus) || !Focus )
|
|
|
|
{
|
|
|
|
setFocus(Hovered);
|
|
|
|
}
|
|
|
|
|
|
|
|
// sending input to focus
|
2007-05-20 11:03:49 -07:00
|
|
|
if (Focus && Focus->OnEvent(event))
|
|
|
|
return true;
|
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
// focus could have died in last call
|
|
|
|
if (!Focus && Hovered)
|
2008-08-14 01:55:40 -07:00
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-07-07 00:03:54 -07:00
|
|
|
return Hovered->OnEvent(event);
|
2008-08-14 01:55:40 -07:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
break;
|
|
|
|
case EET_KEY_INPUT_EVENT:
|
2007-07-07 00:03:54 -07:00
|
|
|
{
|
|
|
|
// send focus changing event
|
2009-01-19 05:48:22 -08:00
|
|
|
if (event.EventType == EET_KEY_INPUT_EVENT &&
|
|
|
|
event.KeyInput.PressedDown &&
|
2007-07-07 00:03:54 -07:00
|
|
|
event.KeyInput.Key == KEY_TAB)
|
|
|
|
{
|
|
|
|
IGUIElement *next = getNextElement(event.KeyInput.Shift, event.KeyInput.Control);
|
|
|
|
if (next && next != Focus)
|
|
|
|
{
|
|
|
|
if (setFocus(next))
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Focus)
|
2008-08-14 01:55:40 -07:00
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-07-07 00:03:54 -07:00
|
|
|
return Focus->OnEvent(event);
|
2008-08-14 01:55:40 -07:00
|
|
|
}
|
2007-07-07 00:03:54 -07:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
break;
|
2007-09-14 17:55:30 -07:00
|
|
|
default:
|
|
|
|
break;
|
2007-05-20 11:03:49 -07:00
|
|
|
} // end switch
|
|
|
|
|
2008-08-14 01:55:40 -07:00
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! returns the current gui skin
|
2007-09-14 15:25:59 -07:00
|
|
|
IGUISkin* CGUIEnvironment::getSkin() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return CurrentSkin;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Sets a new GUI Skin
|
|
|
|
void CGUIEnvironment::setSkin(IGUISkin* skin)
|
|
|
|
{
|
2008-02-09 06:12:28 -08:00
|
|
|
if (CurrentSkin==skin)
|
|
|
|
return;
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
if (CurrentSkin)
|
|
|
|
CurrentSkin->drop();
|
|
|
|
|
|
|
|
CurrentSkin = skin;
|
|
|
|
|
|
|
|
if (CurrentSkin)
|
|
|
|
CurrentSkin->grab();
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Creates a new GUI Skin based on a template.
|
|
|
|
/** \return Returns a pointer to the created skin.
|
|
|
|
If you no longer need the skin, you should call IGUISkin::drop().
|
2007-09-06 23:11:47 -07:00
|
|
|
See IReferenceCounted::drop() for more information. */
|
2007-05-20 11:03:49 -07:00
|
|
|
IGUISkin* CGUIEnvironment::createSkin(EGUI_SKIN_TYPE type)
|
|
|
|
{
|
|
|
|
IGUISkin* skin = new CGUISkin(type, Driver);
|
|
|
|
|
|
|
|
IGUIFont* builtinfont = getBuiltInFont();
|
|
|
|
IGUIFontBitmap* bitfont = 0;
|
|
|
|
if (builtinfont && builtinfont->getType() == EGFT_BITMAP)
|
|
|
|
bitfont = (IGUIFontBitmap*)builtinfont;
|
|
|
|
|
|
|
|
IGUISpriteBank* bank = 0;
|
|
|
|
skin->setFont(builtinfont);
|
|
|
|
|
|
|
|
if (bitfont)
|
|
|
|
bank = bitfont->getSpriteBank();
|
|
|
|
|
|
|
|
skin->setSpriteBank(bank);
|
|
|
|
|
|
|
|
return skin;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Returns the default element factory which can create all built in elements
|
2007-09-15 17:18:13 -07:00
|
|
|
IGUIElementFactory* CGUIEnvironment::getDefaultGUIElementFactory() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return getGUIElementFactory(0);
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Adds an element factory to the gui environment.
|
|
|
|
/** Use this to extend the gui environment with new element types which it should be
|
|
|
|
able to create automaticly, for example when loading data from xml files. */
|
|
|
|
void CGUIEnvironment::registerGUIElementFactory(IGUIElementFactory* factoryToAdd)
|
|
|
|
{
|
|
|
|
if (factoryToAdd)
|
|
|
|
{
|
|
|
|
factoryToAdd->grab();
|
|
|
|
GUIElementFactoryList.push_back(factoryToAdd);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Returns amount of registered scene node factories.
|
2007-09-15 17:18:13 -07:00
|
|
|
u32 CGUIEnvironment::getRegisteredGUIElementFactoryCount() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return GUIElementFactoryList.size();
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Returns a scene node factory by index
|
2007-09-15 17:18:13 -07:00
|
|
|
IGUIElementFactory* CGUIEnvironment::getGUIElementFactory(u32 index) const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
2007-09-15 17:18:13 -07:00
|
|
|
if (index < GUIElementFactoryList.size())
|
2007-05-20 11:03:49 -07:00
|
|
|
return GUIElementFactoryList[index];
|
2007-09-15 17:18:13 -07:00
|
|
|
else
|
|
|
|
return 0;
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! adds a GUI Element using its name
|
|
|
|
IGUIElement* CGUIEnvironment::addGUIElement(const c8* elementName, IGUIElement* parent)
|
|
|
|
{
|
|
|
|
IGUIElement* node=0;
|
|
|
|
|
|
|
|
if (!parent)
|
|
|
|
parent = this;
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
for (u32 i=0; i<GUIElementFactoryList.size() && !node; ++i)
|
2007-05-20 11:03:49 -07:00
|
|
|
node = GUIElementFactoryList[i]->addGUIElement(elementName, parent);
|
|
|
|
|
|
|
|
return node;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Saves the current gui into a file.
|
|
|
|
//! \param filename: Name of the file .
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
bool CGUIEnvironment::saveGUI(const core::string<c16>& filename, IGUIElement* start)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
io::IWriteFile* file = FileSystem->createAndWriteFile(filename);
|
|
|
|
if (!file)
|
2008-08-14 01:55:40 -07:00
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return false;
|
2008-08-14 01:55:40 -07:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
bool ret = saveGUI(file, start);
|
|
|
|
file->drop();
|
2008-08-14 01:55:40 -07:00
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Saves the current gui into a file.
|
|
|
|
bool CGUIEnvironment::saveGUI(io::IWriteFile* file, IGUIElement* start)
|
|
|
|
{
|
|
|
|
if (!file)
|
2008-08-14 01:55:40 -07:00
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return false;
|
2008-08-14 01:55:40 -07:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
io::IXMLWriter* writer = FileSystem->createXMLWriter(file);
|
|
|
|
if (!writer)
|
2008-08-14 01:55:40 -07:00
|
|
|
{
|
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return false;
|
2008-08-14 01:55:40 -07:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
writer->writeXMLHeader();
|
|
|
|
writeGUIElement(writer, start ? start : this);
|
|
|
|
writer->drop();
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Loads the gui. Note that the current gui is not cleared before.
|
|
|
|
//! \param filename: Name of the file.
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
bool CGUIEnvironment::loadGUI(const c16* filename, IGUIElement* parent)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
io::IReadFile* read = FileSystem->createAndOpenFile(filename);
|
|
|
|
if (!read)
|
|
|
|
{
|
|
|
|
os::Printer::log("Unable to open gui file", filename, ELL_ERROR);
|
2008-08-14 01:55:40 -07:00
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool ret = loadGUI(read, parent);
|
|
|
|
read->drop();
|
|
|
|
|
2008-08-14 01:55:40 -07:00
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Loads the gui. Note that the current gui is not cleared before.
|
|
|
|
bool CGUIEnvironment::loadGUI(io::IReadFile* file, IGUIElement* parent)
|
|
|
|
{
|
|
|
|
if (!file)
|
|
|
|
{
|
2007-08-20 03:11:55 -07:00
|
|
|
os::Printer::log("Unable to open GUI file", ELL_ERROR);
|
2008-08-14 01:55:40 -07:00
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
io::IXMLReader* reader = FileSystem->createXMLReader(file);
|
|
|
|
if (!reader)
|
|
|
|
{
|
|
|
|
os::Printer::log("GUI is not a valid XML file", file->getFileName(), ELL_ERROR);
|
2008-08-14 01:55:40 -07:00
|
|
|
_IRR_IMPLEMENT_MANAGED_MARSHALLING_BUGFIX;
|
2007-05-20 11:03:49 -07:00
|
|
|
return false;
|
|
|
|
}
|
2009-01-19 05:48:22 -08:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
// read file
|
|
|
|
while(reader->read())
|
|
|
|
{
|
|
|
|
readGUIElement(reader, parent);
|
|
|
|
}
|
|
|
|
|
|
|
|
// finish up
|
|
|
|
|
2009-01-19 05:48:22 -08:00
|
|
|
reader->drop();
|
|
|
|
return true;
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! reads an element
|
2009-01-19 01:19:42 -08:00
|
|
|
void CGUIEnvironment::readGUIElement(io::IXMLReader* reader, IGUIElement* node)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
if (!reader)
|
|
|
|
return;
|
|
|
|
|
2007-08-20 03:11:55 -07:00
|
|
|
io::EXML_NODE nodeType = reader->getNodeType();
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2007-08-20 03:11:55 -07:00
|
|
|
if (nodeType == io::EXN_NONE || nodeType == io::EXN_UNKNOWN || nodeType == io::EXN_ELEMENT_END)
|
|
|
|
return;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2009-01-19 01:19:42 -08:00
|
|
|
if (!wcscmp(IRR_XML_FORMAT_GUI_ENV, reader->getNodeName()))
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
2009-01-19 01:19:42 -08:00
|
|
|
if (!node)
|
|
|
|
node = this; // root
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
else if (!wcscmp(IRR_XML_FORMAT_GUI_ELEMENT, reader->getNodeName()))
|
|
|
|
{
|
|
|
|
// find node type and create it
|
2009-01-19 01:19:42 -08:00
|
|
|
const core::stringc attrName = reader->getAttributeValue(IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE);
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2009-01-19 01:19:42 -08:00
|
|
|
node = addGUIElement(attrName.c_str(), node);
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
if (!node)
|
|
|
|
os::Printer::log("Could not create GUI element of unknown type", attrName.c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
// read attributes
|
|
|
|
|
|
|
|
while(reader->read())
|
|
|
|
{
|
|
|
|
bool endreached = false;
|
|
|
|
|
|
|
|
switch (reader->getNodeType())
|
|
|
|
{
|
|
|
|
case io::EXN_ELEMENT_END:
|
|
|
|
if (!wcscmp(IRR_XML_FORMAT_GUI_ELEMENT, reader->getNodeName()) ||
|
|
|
|
!wcscmp(IRR_XML_FORMAT_GUI_ENV, reader->getNodeName()))
|
|
|
|
{
|
|
|
|
endreached = true;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case io::EXN_ELEMENT:
|
|
|
|
if (!wcscmp(L"attributes", reader->getNodeName()))
|
|
|
|
{
|
|
|
|
// read attributes
|
|
|
|
io::IAttributes* attr = FileSystem->createEmptyAttributes(Driver);
|
|
|
|
attr->read(reader, true);
|
|
|
|
|
|
|
|
if (node)
|
|
|
|
node->deserializeAttributes(attr);
|
|
|
|
|
|
|
|
attr->drop();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
if (!wcscmp(IRR_XML_FORMAT_GUI_ELEMENT, reader->getNodeName()) ||
|
|
|
|
!wcscmp(IRR_XML_FORMAT_GUI_ENV, reader->getNodeName()))
|
|
|
|
{
|
|
|
|
readGUIElement(reader, node);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
os::Printer::log("Found unknown element in irrlicht GUI file",
|
2009-01-22 04:40:06 -08:00
|
|
|
core::stringc(reader->getNodeName()).c_str());
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
2007-09-14 17:55:30 -07:00
|
|
|
break;
|
|
|
|
default:
|
2007-05-20 11:03:49 -07:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (endreached)
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! writes an element
|
|
|
|
void CGUIEnvironment::writeGUIElement(io::IXMLWriter* writer, IGUIElement* node)
|
|
|
|
{
|
|
|
|
if (!writer || !node )
|
|
|
|
return;
|
|
|
|
|
|
|
|
const wchar_t* name = 0;
|
|
|
|
|
|
|
|
// write properties
|
|
|
|
|
|
|
|
io::IAttributes* attr = FileSystem->createEmptyAttributes();
|
|
|
|
node->serializeAttributes(attr);
|
|
|
|
|
|
|
|
// all gui elements must have at least one attribute
|
|
|
|
// if they have nothing then we ignore them.
|
2007-09-14 15:25:59 -07:00
|
|
|
if (attr->getAttributeCount() != 0)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
if (node == this)
|
|
|
|
{
|
|
|
|
name = IRR_XML_FORMAT_GUI_ENV;
|
|
|
|
writer->writeElement(name, false);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
name = IRR_XML_FORMAT_GUI_ELEMENT;
|
|
|
|
writer->writeElement(name, false, IRR_XML_FORMAT_GUI_ELEMENT_ATTR_TYPE,
|
|
|
|
core::stringw(node->getTypeName()).c_str());
|
|
|
|
}
|
|
|
|
|
|
|
|
writer->writeLineBreak();
|
|
|
|
writer->writeLineBreak();
|
|
|
|
|
|
|
|
attr->write(writer);
|
|
|
|
writer->writeLineBreak();
|
|
|
|
}
|
|
|
|
|
|
|
|
// write children
|
|
|
|
|
2007-09-23 16:12:06 -07:00
|
|
|
core::list<IGUIElement*>::ConstIterator it = node->getChildren().begin();
|
2007-05-20 11:03:49 -07:00
|
|
|
for (; it != node->getChildren().end(); ++it)
|
|
|
|
{
|
|
|
|
if (!(*it)->isSubElement())
|
|
|
|
writeGUIElement(writer, (*it));
|
|
|
|
}
|
|
|
|
|
|
|
|
// write closing brace if required
|
2007-09-14 15:25:59 -07:00
|
|
|
if (attr->getAttributeCount() != 0)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
writer->writeClosingTag(name);
|
|
|
|
writer->writeLineBreak();
|
|
|
|
writer->writeLineBreak();
|
|
|
|
}
|
|
|
|
|
|
|
|
attr->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Writes attributes of the environment
|
2007-09-14 15:25:59 -07:00
|
|
|
void CGUIEnvironment::serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options) const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
IGUISkin* skin = getSkin();
|
|
|
|
|
|
|
|
if (skin)
|
|
|
|
{
|
|
|
|
out->addEnum("Skin", getSkin()->getType(), GUISkinTypeNames);
|
|
|
|
skin->serializeAttributes(out, options);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Reads attributes of the environment
|
|
|
|
void CGUIEnvironment::deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options)
|
|
|
|
{
|
|
|
|
if (in->existsAttribute("Skin"))
|
|
|
|
{
|
|
|
|
IGUISkin *skin = getSkin();
|
|
|
|
|
|
|
|
EGUI_SKIN_TYPE t = (EGUI_SKIN_TYPE) in->getAttributeAsEnumeration("Skin",GUISkinTypeNames);
|
|
|
|
if ( !skin || t != skin->getType())
|
|
|
|
{
|
|
|
|
skin = createSkin(t);
|
|
|
|
setSkin(skin);
|
|
|
|
skin->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
skin = getSkin();
|
|
|
|
|
|
|
|
if (skin)
|
|
|
|
{
|
|
|
|
skin->deserializeAttributes(in, options);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-01-19 05:48:22 -08:00
|
|
|
RelativeRect = AbsoluteRect =
|
|
|
|
core::rect<s32>(core::position2d<s32>(0,0),
|
2009-01-22 05:00:52 -08:00
|
|
|
Driver ? core::dimension2di(Driver->getScreenSize()) : core::dimension2d<s32>(0,0));
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
//! adds a button. The returned pointer must not be dropped.
|
2007-05-20 11:03:49 -07:00
|
|
|
IGUIButton* CGUIEnvironment::addButton(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text, const wchar_t *tooltiptext)
|
|
|
|
{
|
|
|
|
IGUIButton* button = new CGUIButton(this, parent ? parent : this, id, rectangle);
|
|
|
|
if (text)
|
|
|
|
button->setText(text);
|
|
|
|
|
|
|
|
if ( tooltiptext )
|
|
|
|
button->setToolTipText ( tooltiptext );
|
|
|
|
|
|
|
|
button->drop();
|
|
|
|
return button;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds a window. The returned pointer must not be dropped.
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIWindow* CGUIEnvironment::addWindow(const core::rect<s32>& rectangle, bool modal,
|
2007-05-20 11:03:49 -07:00
|
|
|
const wchar_t* text, IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
parent = parent ? parent : this;
|
|
|
|
|
|
|
|
if (modal)
|
|
|
|
{
|
|
|
|
parent = new CGUIModalScreen(this, parent, -1);
|
|
|
|
parent->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
IGUIWindow* win = new CGUIWindow(this, parent, id, rectangle);
|
|
|
|
if (text)
|
|
|
|
win->setText(text);
|
|
|
|
win->drop();
|
|
|
|
|
|
|
|
return win;
|
|
|
|
}
|
2007-09-15 17:18:13 -07:00
|
|
|
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! adds a modal screen. The returned pointer must not be dropped.
|
|
|
|
IGUIElement* CGUIEnvironment::addModalScreen(IGUIElement* parent)
|
|
|
|
{
|
|
|
|
parent = parent ? parent : this;
|
|
|
|
|
|
|
|
IGUIElement *win = new CGUIModalScreen(this, parent, -1);
|
|
|
|
win->drop();
|
|
|
|
|
|
|
|
return win;
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Adds a message box.
|
|
|
|
IGUIWindow* CGUIEnvironment::addMessageBox(const wchar_t* caption, const wchar_t* text,
|
|
|
|
bool modal, s32 flag, IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
if (!CurrentSkin)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
parent = parent ? parent : this;
|
|
|
|
|
|
|
|
core::rect<s32> rect;
|
2009-01-19 05:48:22 -08:00
|
|
|
core::dimension2d<u32> screenDim, msgBoxDim;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
screenDim.Width = parent->getAbsolutePosition().getWidth();
|
|
|
|
screenDim.Height = parent->getAbsolutePosition().getHeight();
|
|
|
|
msgBoxDim.Width = CurrentSkin->getSize(gui::EGDS_MESSAGE_BOX_WIDTH);
|
|
|
|
msgBoxDim.Height = CurrentSkin->getSize(gui::EGDS_MESSAGE_BOX_HEIGHT);
|
|
|
|
|
|
|
|
rect.UpperLeftCorner.X = (screenDim.Width - msgBoxDim.Width) / 2;
|
|
|
|
rect.UpperLeftCorner.Y = (screenDim.Height - msgBoxDim.Height) / 2;
|
|
|
|
rect.LowerRightCorner.X = rect.UpperLeftCorner.X + msgBoxDim.Width;
|
|
|
|
rect.LowerRightCorner.Y = rect.UpperLeftCorner.Y + msgBoxDim.Height;
|
|
|
|
|
|
|
|
if (modal)
|
|
|
|
{
|
|
|
|
parent = new CGUIModalScreen(this, parent, -1);
|
|
|
|
parent->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
IGUIWindow* win = new CGUIMessageBox(this, caption, text, flag,
|
|
|
|
parent, id, rect);
|
|
|
|
|
|
|
|
win->drop();
|
|
|
|
return win;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds a scrollbar. The returned pointer must not be dropped.
|
|
|
|
IGUIScrollBar* CGUIEnvironment::addScrollBar(bool horizontal, const core::rect<s32>& rectangle, IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
IGUIScrollBar* bar = new CGUIScrollBar(horizontal, this, parent ? parent : this, id, rectangle);
|
|
|
|
bar->drop();
|
|
|
|
return bar;
|
|
|
|
}
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
//! Adds a table to the environment
|
2007-12-21 23:49:29 -08:00
|
|
|
IGUITable* CGUIEnvironment::addTable(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, bool drawBackground)
|
|
|
|
{
|
|
|
|
CGUITable* b = new CGUITable(this, parent ? parent : this, id, rectangle, true, drawBackground, false);
|
|
|
|
b->drop();
|
|
|
|
return b;
|
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2009-01-22 04:40:06 -08:00
|
|
|
|
2009-01-19 05:48:22 -08:00
|
|
|
//! Adds an image element.
|
2007-05-20 11:03:49 -07:00
|
|
|
IGUIImage* CGUIEnvironment::addImage(video::ITexture* image, core::position2d<s32> pos,
|
|
|
|
bool useAlphaChannel, IGUIElement* parent, s32 id, const wchar_t* text)
|
|
|
|
{
|
|
|
|
core::dimension2d<s32> sz(0,0);
|
|
|
|
if (image)
|
2009-01-19 05:48:22 -08:00
|
|
|
sz = core::dimension2d<s32>(image->getOriginalSize());
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
IGUIImage* img = new CGUIImage(this, parent ? parent : this,
|
|
|
|
id, core::rect<s32>(pos, sz));
|
|
|
|
|
|
|
|
if (text)
|
|
|
|
img->setText(text);
|
|
|
|
|
|
|
|
if (useAlphaChannel)
|
|
|
|
img->setUseAlphaChannel(true);
|
|
|
|
|
|
|
|
if (image)
|
|
|
|
img->setImage(image);
|
|
|
|
|
|
|
|
img->drop();
|
|
|
|
return img;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds an image. The returned pointer must not be dropped.
|
|
|
|
IGUIImage* CGUIEnvironment::addImage(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text)
|
|
|
|
{
|
|
|
|
IGUIImage* img = new CGUIImage(this, parent ? parent : this,
|
|
|
|
id, rectangle);
|
|
|
|
|
|
|
|
if (text)
|
|
|
|
img->setText(text);
|
|
|
|
|
|
|
|
img->drop();
|
|
|
|
return img;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds an mesh viewer. The returned pointer must not be dropped.
|
|
|
|
IGUIMeshViewer* CGUIEnvironment::addMeshViewer(const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text)
|
|
|
|
{
|
|
|
|
IGUIMeshViewer* v = new CGUIMeshViewer(this, parent ? parent : this,
|
|
|
|
id, rectangle);
|
|
|
|
|
|
|
|
if (text)
|
|
|
|
v->setText(text);
|
|
|
|
|
|
|
|
v->drop();
|
|
|
|
return v;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds a checkbox
|
|
|
|
IGUICheckBox* CGUIEnvironment::addCheckBox(bool checked, const core::rect<s32>& rectangle, IGUIElement* parent, s32 id, const wchar_t* text)
|
|
|
|
{
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUICheckBox* b = new CGUICheckBox(checked, this,
|
2007-05-20 11:03:49 -07:00
|
|
|
parent ? parent : this , id , rectangle);
|
|
|
|
|
|
|
|
if (text)
|
|
|
|
b->setText(text);
|
|
|
|
|
|
|
|
b->drop();
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds a list box
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIListBox* CGUIEnvironment::addListBox(const core::rect<s32>& rectangle,
|
2009-01-22 04:40:06 -08:00
|
|
|
IGUIElement* parent, s32 id, bool drawBackground)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
IGUIListBox* b = new CGUIListBox(this, parent ? parent : this, id, rectangle,
|
|
|
|
true, drawBackground, false);
|
|
|
|
|
2007-07-03 16:25:01 -07:00
|
|
|
if (CurrentSkin && CurrentSkin->getSpriteBank())
|
|
|
|
{
|
|
|
|
b->setSpriteBank(CurrentSkin->getSpriteBank());
|
|
|
|
}
|
|
|
|
else if (getBuiltInFont() && getBuiltInFont()->getType() == EGFT_BITMAP)
|
|
|
|
{
|
2007-05-20 11:03:49 -07:00
|
|
|
b->setSpriteBank( ((IGUIFontBitmap*)getBuiltInFont())->getSpriteBank());
|
2007-07-03 16:25:01 -07:00
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
b->drop();
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
//! adds a tree view
|
|
|
|
IGUITreeView* CGUIEnvironment::addTreeView(const core::rect<s32>& rectangle,
|
|
|
|
IGUIElement* parent, s32 id,
|
|
|
|
bool drawBackground,
|
|
|
|
bool scrollBarVertical, bool scrollBarHorizontal)
|
|
|
|
{
|
|
|
|
IGUITreeView* b = new CGUITreeView(this, parent ? parent : this, id, rectangle,
|
|
|
|
true, drawBackground, scrollBarVertical, scrollBarHorizontal);
|
|
|
|
|
|
|
|
b->setIconFont ( getBuiltInFont () );
|
|
|
|
b->drop();
|
|
|
|
return b;
|
|
|
|
}
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
//! adds a file open dialog. The returned pointer must not be dropped.
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIFileOpenDialog* CGUIEnvironment::addFileOpenDialog(const wchar_t* title,
|
2009-01-22 04:40:06 -08:00
|
|
|
bool modal, IGUIElement* parent, s32 id)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
parent = parent ? parent : this;
|
|
|
|
|
|
|
|
if (modal)
|
|
|
|
{
|
|
|
|
parent = new CGUIModalScreen(this, parent, -1);
|
|
|
|
parent->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
IGUIFileOpenDialog* d = new CGUIFileOpenDialog(title, this, parent, id);
|
|
|
|
|
|
|
|
d->drop();
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds a color select dialog. The returned pointer must not be dropped.
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIColorSelectDialog* CGUIEnvironment::addColorSelectDialog(const wchar_t* title,
|
2009-01-22 04:40:06 -08:00
|
|
|
bool modal, IGUIElement* parent, s32 id)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
parent = parent ? parent : this;
|
|
|
|
|
|
|
|
if (modal)
|
|
|
|
{
|
|
|
|
parent = new CGUIModalScreen(this, parent, -1);
|
|
|
|
parent->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
IGUIColorSelectDialog* d = new CGUIColorSelectDialog( title,
|
|
|
|
this, parent, id);
|
|
|
|
|
|
|
|
d->drop();
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! adds a static text. The returned pointer must not be dropped.
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIStaticText* CGUIEnvironment::addStaticText(const wchar_t* text,
|
2009-01-22 04:40:06 -08:00
|
|
|
const core::rect<s32>& rectangle,
|
|
|
|
bool border, bool wordWrap,
|
|
|
|
IGUIElement* parent, s32 id, bool background)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
IGUIStaticText* d = new CGUIStaticText(text, border, this,
|
|
|
|
parent ? parent : this, id, rectangle, background);
|
|
|
|
|
|
|
|
d->setWordWrap(wordWrap);
|
|
|
|
d->drop();
|
|
|
|
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Adds an edit box. The returned pointer must not be dropped.
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIEditBox* CGUIEnvironment::addEditBox(const wchar_t* text,
|
2009-01-22 04:40:06 -08:00
|
|
|
const core::rect<s32>& rectangle, bool border,
|
|
|
|
IGUIElement* parent, s32 id)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
IGUIEditBox* d = new CGUIEditBox(text, border, this,
|
|
|
|
parent ? parent : this, id, rectangle);
|
|
|
|
|
|
|
|
d->drop();
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-06-30 16:30:40 -07:00
|
|
|
//! Adds a spin box to the environment
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUISpinBox* CGUIEnvironment::addSpinBox(const wchar_t* text,
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
const core::rect<s32> &rectangle,
|
|
|
|
bool border,IGUIElement* parent, s32 id)
|
2007-06-30 16:30:40 -07:00
|
|
|
{
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
IGUISpinBox* d = new CGUISpinBox(text, border,this,
|
|
|
|
parent ? parent : this, id, rectangle);
|
2007-06-30 16:30:40 -07:00
|
|
|
|
|
|
|
d->drop();
|
|
|
|
return d;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Adds a tab control to the environment.
|
|
|
|
IGUITabControl* CGUIEnvironment::addTabControl(const core::rect<s32>& rectangle,
|
|
|
|
IGUIElement* parent, bool fillbackground, bool border, s32 id)
|
|
|
|
{
|
|
|
|
IGUITabControl* t = new CGUITabControl(this, parent ? parent : this,
|
|
|
|
rectangle, fillbackground, border, id);
|
|
|
|
t->drop();
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2009-01-19 05:48:22 -08:00
|
|
|
//! Adds tab to the environment.
|
2007-05-20 11:03:49 -07:00
|
|
|
IGUITab* CGUIEnvironment::addTab(const core::rect<s32>& rectangle,
|
|
|
|
IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
IGUITab* t = new CGUITab(-1, this, parent ? parent : this,
|
|
|
|
rectangle, id);
|
|
|
|
t->drop();
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Adds a context menu to the environment.
|
|
|
|
IGUIContextMenu* CGUIEnvironment::addContextMenu(const core::rect<s32>& rectangle,
|
|
|
|
IGUIElement* parent, s32 id)
|
|
|
|
{
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIContextMenu* c = new CGUIContextMenu(this,
|
2007-05-20 11:03:49 -07:00
|
|
|
parent ? parent : this, id, rectangle, true);
|
|
|
|
c->drop();
|
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Adds a menu to the environment.
|
|
|
|
IGUIContextMenu* CGUIEnvironment::addMenu(IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
if (!parent)
|
|
|
|
parent = this;
|
|
|
|
|
2009-01-19 05:48:22 -08:00
|
|
|
IGUIContextMenu* c = new CGUIMenu(this,
|
2007-05-20 11:03:49 -07:00
|
|
|
parent, id, core::rect<s32>(0,0,
|
|
|
|
parent->getAbsolutePosition().getWidth(),
|
|
|
|
parent->getAbsolutePosition().getHeight()));
|
|
|
|
|
|
|
|
c->drop();
|
|
|
|
return c;
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! Adds a toolbar to the environment. It is like a menu is always placed on top
|
|
|
|
//! in its parent, and contains buttons.
|
|
|
|
IGUIToolBar* CGUIEnvironment::addToolBar(IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
if (!parent)
|
|
|
|
parent = this;
|
|
|
|
|
|
|
|
IGUIToolBar* b = new CGUIToolBar(this, parent, id, core::rect<s32>(0,0,10,10));
|
|
|
|
b->drop();
|
|
|
|
return b;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Adds an element for fading in or out.
|
|
|
|
IGUIInOutFader* CGUIEnvironment::addInOutFader(const core::rect<s32>* rectangle, IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
core::rect<s32> rect;
|
|
|
|
|
|
|
|
if (rectangle)
|
|
|
|
rect = *rectangle;
|
2009-01-22 04:40:06 -08:00
|
|
|
else if (Driver)
|
2009-01-22 05:00:52 -08:00
|
|
|
rect = core::rect<s32>(core::position2d<s32>(0,0), core::dimension2di(Driver->getScreenSize()));
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
if (!parent)
|
|
|
|
parent = this;
|
|
|
|
|
|
|
|
IGUIInOutFader* fader = new CGUIInOutFader(this, parent, id, rect);
|
|
|
|
fader->drop();
|
|
|
|
return fader;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//! Adds a combo box to the environment.
|
|
|
|
IGUIComboBox* CGUIEnvironment::addComboBox(const core::rect<s32>& rectangle,
|
|
|
|
IGUIElement* parent, s32 id)
|
|
|
|
{
|
|
|
|
IGUIComboBox* t = new CGUIComboBox(this, parent ? parent : this,
|
|
|
|
id, rectangle);
|
|
|
|
t->drop();
|
|
|
|
return t;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! returns the font
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
IGUIFont* CGUIEnvironment::getFont(const core::string<c16>& filename)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
// search existing font
|
|
|
|
|
|
|
|
SFont f;
|
|
|
|
IGUIFont* ifont=0;
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
f.Filename = filename;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
f.Filename.make_lower();
|
|
|
|
|
|
|
|
s32 index = Fonts.binary_search(f);
|
|
|
|
if (index != -1)
|
|
|
|
return Fonts[index].Font;
|
|
|
|
|
|
|
|
// font doesn't exist, attempt to load it
|
|
|
|
|
|
|
|
// does the file exist?
|
|
|
|
|
2007-06-17 21:58:12 -07:00
|
|
|
if (!FileSystem->existFile(filename))
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
os::Printer::log("Could not load font because the file does not exist", f.Filename, ELL_ERROR);
|
2007-05-20 11:03:49 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
io::IXMLReader *xml = FileSystem->createXMLReader(filename );
|
2007-05-20 11:03:49 -07:00
|
|
|
if (xml)
|
|
|
|
{
|
|
|
|
// this is an XML font, but we need to know what type
|
|
|
|
EGUI_FONT_TYPE t = EGFT_CUSTOM;
|
|
|
|
|
|
|
|
bool found=false;
|
|
|
|
while(xml->read() && !found)
|
|
|
|
{
|
|
|
|
if (xml->getNodeType() == io::EXN_ELEMENT)
|
|
|
|
{
|
|
|
|
if (core::stringw(L"font") == xml->getNodeName())
|
|
|
|
{
|
|
|
|
if (core::stringw(L"vector") == xml->getAttributeValue(L"type"))
|
|
|
|
{
|
|
|
|
t = EGFT_VECTOR;
|
|
|
|
found=true;
|
|
|
|
}
|
|
|
|
else if (core::stringw(L"bitmap") == xml->getAttributeValue(L"type"))
|
|
|
|
{
|
|
|
|
t = EGFT_BITMAP;
|
|
|
|
found=true;
|
|
|
|
}
|
|
|
|
else found=true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (t==EGFT_BITMAP)
|
|
|
|
{
|
2007-06-17 21:58:12 -07:00
|
|
|
CGUIFont* font = new CGUIFont(this, filename);
|
2007-05-20 11:03:49 -07:00
|
|
|
ifont = (IGUIFont*)font;
|
2007-05-26 15:19:21 -07:00
|
|
|
// change working directory, for loading textures
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
core::string<c16> workingDir = FileSystem->getWorkingDirectory();
|
|
|
|
FileSystem->changeWorkingDirectoryTo(FileSystem->getFileDir(f.Filename));
|
2007-05-26 15:19:21 -07:00
|
|
|
|
|
|
|
// load the font
|
2007-05-20 11:03:49 -07:00
|
|
|
if (!font->load(xml))
|
|
|
|
{
|
|
|
|
font->drop();
|
|
|
|
font = 0;
|
|
|
|
ifont = 0;
|
|
|
|
}
|
2007-05-26 15:19:21 -07:00
|
|
|
// change working dir back again
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
FileSystem->changeWorkingDirectoryTo( workingDir );
|
2007-05-20 11:03:49 -07:00
|
|
|
}
|
|
|
|
else if (t==EGFT_VECTOR)
|
|
|
|
{
|
|
|
|
// todo: vector fonts
|
|
|
|
os::Printer::log("Unable to load font, XML vector fonts are not supported yet", f.Filename.c_str(), ELL_ERROR);
|
|
|
|
|
|
|
|
//CGUIFontVector* font = new CGUIFontVector(Driver);
|
|
|
|
//ifont = (IGUIFont*)font;
|
|
|
|
//if (!font->load(xml))
|
|
|
|
}
|
|
|
|
xml->drop();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!ifont)
|
|
|
|
{
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
CGUIFont* font = new CGUIFont(this, f.Filename );
|
2007-05-20 11:03:49 -07:00
|
|
|
ifont = (IGUIFont*)font;
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
if (!font->load(f.Filename))
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
font->drop();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// add to fonts.
|
|
|
|
|
|
|
|
f.Font = ifont;
|
|
|
|
Fonts.push_back(f);
|
|
|
|
|
|
|
|
return ifont;
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
IGUISpriteBank* CGUIEnvironment::getSpriteBank(const core::string<c16>& filename)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
// search for the file name
|
|
|
|
|
|
|
|
SSpriteBank b;
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
b.Filename = filename;
|
2007-05-20 11:03:49 -07:00
|
|
|
b.Filename.make_lower();
|
|
|
|
|
|
|
|
s32 index = Banks.binary_search(b);
|
|
|
|
if (index != -1)
|
|
|
|
return Banks[index].Bank;
|
|
|
|
|
|
|
|
// we don't have this sprite bank, we should load it
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
if (!FileSystem->existFile(b.Filename))
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
os::Printer::log("Could not load sprite bank because the file does not exist", filename, ELL_ERROR);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// todo: load it!
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
IGUISpriteBank* CGUIEnvironment::addEmptySpriteBank(const core::string<c16>& name)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
// no duplicate names allowed
|
|
|
|
|
|
|
|
SSpriteBank b;
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
b.Filename = name;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
2008-04-29 04:34:54 -07:00
|
|
|
const s32 index = Banks.binary_search(b);
|
2007-05-20 11:03:49 -07:00
|
|
|
if (index != -1)
|
2009-01-19 05:48:22 -08:00
|
|
|
return 0;
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
// create a new sprite bank
|
|
|
|
|
|
|
|
b.Bank = new CGUISpriteBank(this);
|
|
|
|
Banks.push_back(b);
|
|
|
|
|
|
|
|
return b.Bank;
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
//! returns default font
|
2007-09-15 17:18:13 -07:00
|
|
|
IGUIFont* CGUIEnvironment::getBuiltInFont() const
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
if (Fonts.empty())
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
return Fonts[0].Font;
|
|
|
|
}
|
|
|
|
|
Changes in version 1.6, TA
- FileSystem 2.0 SUPER MASTER MAJOR API CHANGE !!!
The FileSystem is know build internally like for e.q the texture-, and the meshloaders.
There exists a known list of ArchiveLoader, which know how to produce a Archive.
The Loaders and the Archive can be attached/detached on runtime.
The FileNames are now stored as core::string<c16>. where c16 is toggled between char/wchar
with the #define flag _IRR_WCHAR_FILESYSTEM, to supported unicode backends (default:off)
I replaced all (const c8* filename) to string references.
Basically the FileSystem is divided into two regions. Native and Virtual.
Native means using the backend OS.
Virtual means only use currently attach IArchives.
Browsing
each FileSystem has it's own workdirectory and it's own methods to
- create a FileTree
- add/remove files & directory ( to be done )
Hint: store a savegame in a zip archive...
basic browsing for all archives is implemented.
Example 21. Quake3Explorer shows this
TODO:
- a file filter should be implemented.
- The IArchive should have a function to create a filetree
for now CFileList is used.
Class Hiarchy:
IArchiveLoader: is able to produce a IFileArchive
- ZipLoader
- PakLoader
- MountPointReader ( formaly known as CUnzipReader )
IFileArchive:
-ZipArchive
-PakArchive
-MountPoint (known as FolderFile)
IFileSystem
- addArchiveLoader
- changed implementation of isALoadableFileExtension in all loaders
to have consistent behavior
- added a parameter to IFileList * createFileList
setFileListSystem
allows to query files in any of the game archives
standard behavior listtype = SYSTEM ( default)
- CLimitReadFile
added multiple file random-access support.
solved problems with mixed compressed & uncompressed files in a zip
TODO:
- Big Big Testing!!
- Linux Version ( minor )
- remove all double loader interfaces where only the filename differs
(IReadFile/const char *filename). This blows up the the interface
- many loaders use their own private filesearching
we should rework this
- there are a lot of helper function ( getAbsolutePath, getFileDir )
which should be adapted to the virtual filesystem
- IrrlichtDevice
added:
virtual bool setGammaRamp( f32 red, f32 green, f32 blue, f32 brightness, f32 contrast ) = 0;
virtual bool getGammaRamp( f32 &red, f32 &green, f32 &blue ) = 0;
and calculating methods to DeviceStub.
implemented in Win32, TODO: other Devices
- irrlicht.h
changed exported irrlicht.dll routines createDevice, createDeviceEx, IdentityMatrix
to extern "C" name mangling.
for easier dynamically loading the irrlicht library and different versions
- ParticleSystem
removed the private (old?,wrong?) interface from the ParticleEffectors
to match the parent class irr::io::IAttributeExchangingObject::deserializeAttributes
TODO:
please test if the serialization works!
- Generic
- vector3d<T>& normalize()
#if 0
f32 length = (f32)(X*X + Y*Y + Z*Z);
if (core::equals(length, 0.f))
return *this;
length = core::reciprocal_squareroot ( (f32)length );
#else
const T length = core::reciprocal_squareroot ( (X*X + Y*Y + Z*Z) );
#endif
Weak checking on zero?!?! just to avoid a sqrt?. mhm, maybe not;-)
added reciprocal_squareroot for f64
- dimension2d
added operator dimension2d<T>& operator=(const dimension2d<U>& other)
to cast between different types
- vector2d
bugfix:
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Width; return *this; }
to
vector2d<T>& operator+=(const dimension2d<T>& other) { X += other.Width; Y += other.Height; return *this; }
- C3DMeshLoader renamed chunks const u16 to a enum
removing "variable declared but never used warning"
- added a global const identity Material
changed all references *((video::SMaterial*)0) to point to IdentityMaterial
removed warning: "a NULL reference is not allowed"
- modified IRRLICHT_MATH to not support reciprocal stuff
but to use faster float-to-int conversion.
gcc troubles may they are. i'm using intel-compiler..;-)
- core::matrix4
USE_MATRIX_TEST
i tried to optimize the identity-check ( in means of performance)
i didn't succeed so well, so i made a define for the matrix isIdentity -check
for now it's sometimes faster to always calculate versus identity-check
but if there are a lot of scenenodes/ particles one can profit from the
fast_inverse matrix, when no scaling is used. further approvement could
be done on inverse for just tranlastion! ( many static scenenodes are not rotated,
they are just placed somewhere in the world)
one thing to take in account is that sizeof(matrix) is 64 byte and
with the additional bool/u32 makes it 66 byte which is not really cache-friendly..
- added buildRotateFromTo
Builds a matrix that rotates from one vector to another
- irr::array. changed allocating routine in push_back
okt, 2008. it's only allowed to alloc one element, if
default constructor has to be called.
removes existing crashes. ( MD3 Mesh ) and possible others ones.
A new list template should be made.
one with constructor/destructor calls ( safe_array ) and
one without. like the array since the beginning of irrlicht.
currently the array/string is extremly slow..
also a hint for the user has to be done, so that a struct T of
array<T> must have a copy constructor of type T ( const T&other ).
i needed hours to track that down...
added a new method setAllocStrategy,
safe ( used + 1 ), double ( used * 2 + 1)
better default strategies will be implemented
- removed binary_search_const
i added it quite a long time ago, but it doesnt make real sense
a call to a sort method should happen always. i just wanted to safe
a few cycles..
- added binary_search_multi
searches for a multi-set ( more than 1 entry in the sorted array)
returns start and end-index
- changed some identity matrix settings to use core::IdentityMatrix
- added deletePathFromFilename to generic string functions in coreutil.h and
removed from CZipReader and CPakReader
- s32 deserializeAttributes used instead of virtual void deserializeAttributes in
ParticleSystem ( wrong virtual was used)
- strings & Locale
- started to add locale support
- added verify to string
- added some helper functions
- XBOX
i have access to a XBOX development machine now. I started to compile
for the XBOX. Question: Who did the previous implementation?. There
is no XBOX-Device inhere. maybe it's forbidden because of using the offical
Microsoft XDK. I will implement a native or sdl device based on opendk.
irrlicht compiles without errors on the xbox but can't be used.
TODO:
- native XBOX Device
- Windows Mobile
reworked a little. added the mobile example to the windows solution for
cross development.
added maximal 128x128 texture size for windows mobile ( memory issues )
- Collision Speed Up
The Collision Speed Up greatly improves with many small static child-nodes
- added COctTreeTriangleSelector::getTriangles for 3dline from user Piraaate
- modified createOctTreeTriangleSelector and createTriangleSelector
to allow node == 0, to be added to a meta selector
- CSceneNodeAnimatorCollisionResponse has the same problem as CSceneNodeAnimatorFPS
on first update:
Problem. you start setting the map. (setWorld). First update cames 4000 ms later.
The Animator applies the missing force... big problem...
changed to react on first update like camera.
- add Variable FirstUpdate. if set to true ( on all changes )
then position, lasttime, and falling are initialized
-added #define OCTTREE_USE_HARDWARE in Octree.h
if defined octtree uses internally a derived scene::MeshBuffer which has
the possibility to use the Hardware Vertex Buffer for static vertices and
dirty indices;-)
if defined OCTTREE_USE_HARDWARE octree uses internally a derived scene::CMeshBuffer
so it's not just a replacement inside the octree. It also in the OctTreeSceneNode.
#if defined (OCTTREE_USE_HARDWARE)
driver->drawMeshBuffer ( &LightMapMeshes[i] );
#else
driver->drawIndexedTriangleList( &LightMapMeshes[i].Vertices[0], LightMapMeshes[i].Vertices.size(),
d[i].Indices, d[i].CurrentSize / 3);
#endif
#define OCTTREE_PARENTTEST is also used. It's skip testing on fully outside and takes everything on fully inside
- virtual void ISceneNode::updateAbsolutePosition()
- changed
inline CMatrix4<T> CMatrix4<T>::operator*(const CMatrix4<T>& m2) const
all two matrices have to be checked by isIdentity()
to let the isIdentity work always
-changed inline bool CMatrix4<T>::isIdentity() const
on full identityCheck->
to look first on Translation, because this is the most challenging element
which will likely not to be identity..
- virtual core::matrix4 getRelativeTransformation() const
Hiarchy on Identity-Check
1) ->getRelativeTransform -> 9 floating point checks to be passed as Identity
2) ->isIdentity () -> 16 floating point checks to be passed as Identity
- inline void CMatrix4<T>::transformBoxEx(core::aabbox3d<f32>& box) const
added isIdentity() check
- changed CSceneNodeAnimatorCollisionResponse
- added CSceneNodeAnimatorCollisionResponse::setGravity
needed to set the differents Forces for the Animator. for eq. water..
- added CSceneNodeAnimatorCollisionResponse::setAnimateTarget
- added CSceneNodeAnimatorCollisionResponse::getAnimateTarget
- changed CSceneNodeAnimatorCollisionResponse::animateNode to react on FirstUpdate
- changad Gravity to
- TODO: set Gravity to Physically frame independent values..
current response uses an frame depdended acceleration vector.
~9.81 m/s^2 was achieved at around 50 fps with a setting of -0.03
may effect existing application..
- SceneNodes
- CSkyDomeSceneNode
moved radius ( default 1000 ) to constructor
added Normals
added DebugInfo
added Material.ZBuffer, added SceneMaanager
- CVolumeLightSceneNode:
changed default blending OneTextureBlendgl_src_color gl_src_alpha to
EMT_TRANSPARENT_ADD_COLOR ( gl_src_color gl_one )
which gives the same effect on non-transparent-materials.
Following the unspoken guide-line, lowest effect as default
- added LensFlareSceneNode (from forum user gammaray, modified to work )
showing in example special fx
- changed SceneNode Skydome f64 to f32,
- AnimatedMesh
-Debug Data:
mesh normals didn't rotate with the scenenode fixed ( matrix-multiplication order)
- Camera SceneNode setPosition
Camera now finally allow to change position and target and updates all
effected animators..
a call to OnAnimate ( ) lastime < time or OnAnimate ( 0 ) will reset the
camera and fr. the collision animator to a new position
- Device:
added the current mousebutton state to the Mouse Event
so i need to get the current mouse state from the OS
-a dded to CIrrDeviceWin32
TODO:
- Linux and SDL Device
- GUI
- CGUIFont:
- added virtual void setInvisibleCharacters( const wchar_t *s ) = 0;
define which characters should not be drawn ( send to driver) by the font.
for example " " would not draw any space which is usually blank in most fonts
and saves rendering of ususally full blank alpha-sprites.
This saves a lot of rendering...
default:
setInvisibleCharacters ( L" " );
- added MultiLine rendering
should avoid to us CStaticText breaking text in future
- CGUIListBox
- changed Scrollbar LargeStepSize to ItemHeight
which easy enables to scroll line by line
- CGUIScrollBar
bug:
Create a Window and inside a listbox with a scrollbar or
a windowed irrlicht application
Click & hold Scrollbar Slider. move outside it's region.
Release Mouse. Go Back to Scrollbar.. it's moving always...
it's generally missing the event PRESSED_MOVED, which
leads to problem when an element is dragging, has a focus, or position loose
and gets focus back again. ( think of a drunken mouse sliding left&right during tracking )
so added the mouse Input Buttonstates on every mouse event
IrrDeviceWin32:
added event.MouseInput.ButtonStates = wParam & ( MK_LBUTTON | MK_RBUTTON | MK_MBUTTON );
TODO:
Linux & SDL
so now i can do this
case irr::EMIE_MOUSE_MOVED:
if ( !event.MouseInput.isLeftPressed () )
{
Dragging = false;
}
- bug:
Scrollbar notifyListBox notify when the scrollbar is clicked.
- changed timed event in draw to OnPostRender
Why the hell is a gui element firing a timed event
in a draw routine!!!!!. This should be corrected for all gui-elements.
- added GUI Image List from Reinhard Ostermeier, modified to work
added GUI Tree View from Reinhard Ostermeier, modified to work
shown in the Quake3MapShader Example
TODO: Spritebanks
- FileOpenDialog
changed the static text for the filename to an edit box.
- changed the interface for addEditBox to match with addStaticText
- changed the interface for addSpinBox to match with addEditBox
- added MouseWheel to Spinbox
- changed CGUITable CLICK_AREA from 3 to 12 to enable clicking on the visible marker
- CGUISpritebank
removed some crashes with empty Sprite banks
- IGUIScrollBar
added SetMin before min was always 0
changed ScrollWheel Direction on horizontal to move right on wheel up, left on wheel down
- IComboBox
-added ItemData
- removed IsVisbile check in IGUIElement::draw
- Image Loaders
- added TGA file type 2 ( grayscale uncompressed )
- added TGA file type (1) 8 Bit indexed color uncompressed
ColorConverter:
- added convert_B8G8R8toA8R8G8B8
- added convert_B8G8R8A8toA8R8G8B8
- Media Files
- added missing shaders and textures to map-20kdm2.
Taken from free implementation
- ball.wav. adjusted DC-Offset, amplified to -4dB, trim cross-zero
- impact.wav clip-restoration, trim cross-zero
- added gun.md2, gun.pcx to media-files
copyright issues!. i don't know from where this file came from...
i hope this is not from original quake2..
- added new irrlicht logo irrlicht3.png
i've taken the new layout. i should ask niko to use it.
- added Skydome picture to media files (skydome2.jpg) half/sphere
- OctTree
-added
#define OCTTREE_PARENTTEST ( default: disabled )
used to leave-out children test if the parent passed a complete frustum.
plus: leaves out children test
minus: all edges have to be checked
- added MesBuffer Hardware Hint Vertex to octtree
- CQuake3ShaderSceneNode:
- removed function releaseMesh
Shader doesn't copy the original mesh anymore ( saving memory )
so therefore this (for others often misleading ) function was removed
- changed constructor to take a (shared) destination meshbuffer for rendering
reducing vertex-memory to a half
- don't copy the original vertices anymore
- added deformvertexes autosprite
- added deformvertexes move
- added support for RTCW and Raven BSPs ( qmap2 )
- added polygonoffset (TODO: not perfect)
- added added nomipmaps
- added rgbgen const
- added alphagen
- added MesBuffer Hardware Hint Vertex/Index to Quake3: static geometry, dynamic indices
- added Quake3Explorer examples
- added wave noise
- added tcmod transform
- added whiteimage
- added collision to Quake3Explorer
- renamed SMD3QuaterionTag* to SMD3QuaternionTag* ( typo )
- updated quake3:blendfunc
- added crouch to Quake3Explorer
(modifying the ellipsiodRadius of the camera animator )
added crouch to CSceneNodeAnimatorCameraFPS
still problems with stand up and collision
- Quake3MapLoader
modified memory allocation for faster loading
- Quake3LoadParam
added Parameter to the Mesh-Loader
- added
The still existing missing caulking of curved surfaces.
using round in the coordinates doesn't solve the problem.
but for the demo bsp mesh it solves the problem... (luck)
so for now it's switchable.
TJUNCTION_SOLVER_ROUND
default:off
- BurningVideo
- pushed BurningsVideo to 0.40
- added blendfunc gl_one_minus_dst_alpha gl_one
- added blendfunc gl_dst_color gl_zero
- added blendfunc gl_dst_color src_alpha
- modified AlphaChannel_Ref renderer to support alpha test lessequal
- addded 32 Bit Index Buffer
- added sourceRect/destRect check to 2D-Blitter ( slower, but resolves crash )
- added setTextureCreationFlag video::ETCF_ALLOW_NON_POWER_2
Burning checks this flag and when set, it bypasses the power2 size check,
which is necessary on 3D but can be avoided on 2D.
used on fonts automatically.
- added Support for Destination Alpha
- OpenGL
- Fixed a bug in COpenGLExtensenionHandler where a glint was downcasted to u8!!!!!!
MaxTextureSize=static_cast<u32>(num);
- TODO: COpenGLMaterialRenderer_ONETEXTURE_BLEND to work as expected
- Direct3D8
- compile and links again
- added 32 Bit Index Buffer
- D3DSAMP_MIPMAPLODBIAS doesnt compile!. it is d3d9 i think.
- compile for XBOX
- Direc3D9
- fixed crash on RTT Textures DepthBuffer freed twice.
added deleteAllTextures to destuctor
- NullDriver
- removeallTextures. added setMaterial ( SMaterial() ) to clean pointers for freed textures
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2147 dfc29bdd-3216-0410-991c-e03cc46cb475
2009-01-27 07:53:53 -08:00
|
|
|
//! Creates the image list from the given texture.
|
|
|
|
IGUIImageList* CGUIEnvironment::createImageList( video::ITexture* texture,
|
|
|
|
core::dimension2d<s32> imageSize, bool useAlphaChannel )
|
|
|
|
{
|
|
|
|
CGUIImageList* imageList = new CGUIImageList( Driver );
|
|
|
|
if( !imageList->createImageList( texture, imageSize, useAlphaChannel ) )
|
|
|
|
{
|
|
|
|
imageList->drop();
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
return imageList;
|
|
|
|
}
|
|
|
|
|
|
|
|
//! Returns the root gui element.
|
2007-05-20 11:03:49 -07:00
|
|
|
IGUIElement* CGUIEnvironment::getRootGUIElement()
|
|
|
|
{
|
|
|
|
return this;
|
|
|
|
}
|
|
|
|
|
2007-09-15 17:18:13 -07:00
|
|
|
|
2007-07-07 00:03:54 -07:00
|
|
|
//! Returns the next element in the tab group starting at the focused element
|
|
|
|
IGUIElement* CGUIEnvironment::getNextElement(bool reverse, bool group)
|
|
|
|
{
|
|
|
|
// start the search at the root of the current tab group
|
|
|
|
IGUIElement *startPos = Focus ? Focus->getTabGroup() : 0;
|
|
|
|
s32 startOrder = -1;
|
|
|
|
|
|
|
|
// if we're searching for a group
|
|
|
|
if (group && startPos)
|
|
|
|
{
|
|
|
|
startOrder = startPos->getTabOrder();
|
|
|
|
}
|
2009-01-19 05:48:22 -08:00
|
|
|
else
|
2007-07-07 00:03:54 -07:00
|
|
|
if (!group && Focus && !Focus->isTabGroup())
|
|
|
|
{
|
|
|
|
startOrder = Focus->getTabOrder();
|
|
|
|
if (startOrder == -1)
|
|
|
|
{
|
2009-01-19 05:48:22 -08:00
|
|
|
// this element is not part of the tab cycle,
|
2007-07-07 00:03:54 -07:00
|
|
|
// but its parent might be...
|
|
|
|
IGUIElement *el = Focus;
|
|
|
|
while (el && el->getParent() && startOrder == -1)
|
|
|
|
{
|
|
|
|
el = el->getParent();
|
|
|
|
startOrder = el->getTabOrder();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (group || !startPos)
|
|
|
|
startPos = this; // start at the root
|
|
|
|
|
|
|
|
// find the element
|
|
|
|
IGUIElement *closest = 0;
|
|
|
|
IGUIElement *first = 0;
|
|
|
|
startPos->getNextElement(startOrder, reverse, group, first, closest);
|
|
|
|
|
|
|
|
if (closest)
|
2007-09-15 17:18:13 -07:00
|
|
|
return closest; // we found an element
|
2007-07-07 00:03:54 -07:00
|
|
|
else if (first)
|
2007-09-15 17:18:13 -07:00
|
|
|
return first; // go to the end or the start
|
2007-07-07 00:03:54 -07:00
|
|
|
else if (group)
|
2007-09-15 17:18:13 -07:00
|
|
|
return this; // no group found? root group
|
|
|
|
else
|
|
|
|
return 0;
|
2007-07-07 00:03:54 -07:00
|
|
|
}
|
|
|
|
|
2007-05-20 11:03:49 -07:00
|
|
|
|
|
|
|
//! creates an GUI Environment
|
2007-09-15 17:18:13 -07:00
|
|
|
IGUIEnvironment* createGUIEnvironment(io::IFileSystem* fs,
|
|
|
|
video::IVideoDriver* Driver,
|
|
|
|
IOSOperator* op)
|
2007-05-20 11:03:49 -07:00
|
|
|
{
|
|
|
|
return new CGUIEnvironment(fs, Driver, op);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
} // end namespace gui
|
|
|
|
} // end namespace irr
|
|
|
|
|
2007-07-25 22:30:19 -07:00
|
|
|
#endif // _IRR_COMPILE_WITH_GUI_
|
2007-09-15 17:18:13 -07:00
|
|
|
|