Commit 8de33dd4 authored by hybrid's avatar hybrid

Merged from 1.7 branch, revisions 3270:3288. Several bug fixes in string...

Merged from 1.7 branch, revisions 3270:3288. Several bug fixes in string class, GUI, mesh loaders. Docs and project file updates.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3289 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 19dd5282
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<Option compiler="gcc" /> <Option compiler="gcc" />
<Build> <Build>
<Target title="Windows"> <Target title="Windows">
<Option output="../../bin/gcc/Movement" prefix_auto="0" extension_auto="1" /> <Option output="..\..\bin\Win32-gcc\Movement" prefix_auto="0" extension_auto="1" />
<Option type="1" /> <Option type="1" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" /> <Option projectResourceIncludeDirsRelation="1" />
...@@ -17,12 +17,12 @@ ...@@ -17,12 +17,12 @@
<Add option="-D_IRR_STATIC_LIB_" /> <Add option="-D_IRR_STATIC_LIB_" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add directory="../../lib/Win32-gcc" /> <Add directory="..\..\lib\Win32-gcc" />
</Linker> </Linker>
</Target> </Target>
<Target title="Linux"> <Target title="Linux">
<Option platforms="Unix;" /> <Option platforms="Unix;" />
<Option output="../../bin/Linux/Movement" prefix_auto="0" extension_auto="0" /> <Option output="..\..\bin\Linux\Movement" prefix_auto="0" extension_auto="0" />
<Option type="1" /> <Option type="1" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Compiler> <Compiler>
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<Linker> <Linker>
<Add library="Xxf86vm" /> <Add library="Xxf86vm" />
<Add library="GL" /> <Add library="GL" />
<Add directory="../../lib/Linux" /> <Add directory="..\..\lib\Linux" />
</Linker> </Linker>
</Target> </Target>
</Build> </Build>
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
<Compiler> <Compiler>
<Add option="-W" /> <Add option="-W" />
<Add option="-g" /> <Add option="-g" />
<Add directory="../../include" /> <Add directory="..\..\include" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add library="Irrlicht" /> <Add library="Irrlicht" />
...@@ -51,6 +51,7 @@ ...@@ -51,6 +51,7 @@
<Extensions> <Extensions>
<code_completion /> <code_completion />
<debugger /> <debugger />
<envvars />
</Extensions> </Extensions>
</Project> </Project>
</CodeBlocks_project_file> </CodeBlocks_project_file>
...@@ -8,29 +8,30 @@ ...@@ -8,29 +8,30 @@
<Build> <Build>
<Target title="Windows"> <Target title="Windows">
<Option platforms="Windows;" /> <Option platforms="Windows;" />
<Option output="../../bin/gcc/PerPixelLighting" prefix_auto="0" extension_auto="1" /> <Option output="..\..\bin\Win32-gcc\PerPixelLighting" prefix_auto="0" extension_auto="1" />
<Option type="1" /> <Option type="1" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" /> <Option projectResourceIncludeDirsRelation="1" />
<Compiler> <Compiler>
<Add option="-W" />
<Add option="-g" /> <Add option="-g" />
<Add option="-W" />
</Compiler> </Compiler>
<Linker>
<Add directory="..\..\lib\Win32-gcc" />
</Linker>
</Target> </Target>
<Target title="Linux"> <Target title="Linux">
<Option platforms="Unix;" /> <Option platforms="Unix;" />
<Option output="../../bin/Linux/PerPixelLighting" prefix_auto="0" extension_auto="0" /> <Option output="..\..\bin\Linux\PerPixelLighting" prefix_auto="0" extension_auto="0" />
<Option type="1" /> <Option type="1" />
<Option compiler="gcc" /> <Option compiler="gcc" />
<Option projectResourceIncludeDirsRelation="1" />
<Compiler> <Compiler>
<Add option="-W" />
<Add option="-g" /> <Add option="-g" />
<Add option="-D_IRR_STATIC_LIB_" /> <Add option="-W" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add library="Xxf86vm" /> <Add directory="..\..\lib\Linux" />
<Add library="GL" />
<Add directory="../../lib/Linux" />
</Linker> </Linker>
</Target> </Target>
</Build> </Build>
...@@ -38,18 +39,18 @@ ...@@ -38,18 +39,18 @@
<Add alias="All" targets="Windows;" /> <Add alias="All" targets="Windows;" />
</VirtualTargets> </VirtualTargets>
<Compiler> <Compiler>
<Add option="-W" />
<Add option="-g" /> <Add option="-g" />
<Add directory="../../include" /> <Add option="-W" />
<Add directory="..\..\include" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add library="Irrlicht" /> <Add library="Irrlicht" />
<Add directory="../../lib/gcc" />
</Linker> </Linker>
<Unit filename="main.cpp" /> <Unit filename="main.cpp" />
<Extensions> <Extensions>
<code_completion /> <code_completion />
<debugger /> <debugger />
<envvars />
</Extensions> </Extensions>
</Project> </Project>
</CodeBlocks_project_file> </CodeBlocks_project_file>
...@@ -26,9 +26,9 @@ namespace gui ...@@ -26,9 +26,9 @@ namespace gui
//! gets the maximum value of the scrollbar. //! gets the maximum value of the scrollbar.
virtual s32 getMax() const = 0; virtual s32 getMax() const = 0;
//! sets the maximum value of the scrollbar. //! sets the minimum value of the scrollbar.
virtual void setMin(s32 max) = 0; virtual void setMin(s32 min) = 0;
//! gets the maximum value of the scrollbar. //! gets the minimum value of the scrollbar.
virtual s32 getMin() const = 0; virtual s32 getMin() const = 0;
//! gets the small step value //! gets the small step value
......
...@@ -1133,7 +1133,7 @@ public: ...@@ -1133,7 +1133,7 @@ public:
array[pos++] = array[i]; array[pos++] = array[i];
} }
used -= found; used -= found;
array[used] = 0; array[used-1] = 0;
return *this; return *this;
} }
...@@ -1166,7 +1166,7 @@ public: ...@@ -1166,7 +1166,7 @@ public:
array[pos++] = array[i]; array[pos++] = array[i];
} }
used -= found; used -= found;
array[used] = 0; array[used-1] = 0;
return *this; return *this;
} }
...@@ -1200,7 +1200,7 @@ public: ...@@ -1200,7 +1200,7 @@ public:
array[pos++] = array[i]; array[pos++] = array[i];
} }
used -= found; used -= found;
array[used] = 0; array[used-1] = 0;
return *this; return *this;
} }
...@@ -1253,8 +1253,8 @@ public: ...@@ -1253,8 +1253,8 @@ public:
// terminate // terminate
if ( allocated > 0 ) if ( allocated > 0 )
{ {
used = allocated - 1; used = allocated;
array[used] = 0; array[used-1] = 0;
} }
else else
{ {
......
...@@ -450,6 +450,8 @@ void CGUIListBox::selectNew(s32 ypos, bool onlyHover) ...@@ -450,6 +450,8 @@ void CGUIListBox::selectNew(s32 ypos, bool onlyHover)
recalculateScrollPos(); recalculateScrollPos();
gui::EGUI_EVENT_TYPE eventType = (Selected == oldSelected && now < selectTime + 500) ? EGET_LISTBOX_SELECTED_AGAIN : EGET_LISTBOX_CHANGED;
selectTime = now;
// post the news // post the news
if (Parent && !onlyHover) if (Parent && !onlyHover)
{ {
...@@ -457,10 +459,9 @@ void CGUIListBox::selectNew(s32 ypos, bool onlyHover) ...@@ -457,10 +459,9 @@ void CGUIListBox::selectNew(s32 ypos, bool onlyHover)
event.EventType = EET_GUI_EVENT; event.EventType = EET_GUI_EVENT;
event.GUIEvent.Caller = this; event.GUIEvent.Caller = this;
event.GUIEvent.Element = 0; event.GUIEvent.Element = 0;
event.GUIEvent.EventType = (Selected == oldSelected && now < selectTime + 500) ? EGET_LISTBOX_SELECTED_AGAIN : EGET_LISTBOX_CHANGED; event.GUIEvent.EventType = eventType;
Parent->OnEvent(event); Parent->OnEvent(event);
} }
selectTime = now;
} }
......
...@@ -141,11 +141,11 @@ bool CGUIScrollBar::OnEvent(const SEvent& event) ...@@ -141,11 +141,11 @@ bool CGUIScrollBar::OnEvent(const SEvent& event)
{ {
case EMIE_MOUSE_WHEEL: case EMIE_MOUSE_WHEEL:
if (Environment->hasFocus(this)) if (Environment->hasFocus(this))
{ {
// thanks to a bug report by REAPER // thanks to a bug report by REAPER
// thanks to tommi by tommi for another bugfix // thanks to tommi by tommi for another bugfix
// everybody needs a little thanking. hallo niko!;-) // everybody needs a little thanking. hallo niko!;-)
setPos( getPos() + setPos( getPos() +
( (s32)event.MouseInput.Wheel * SmallStep * (Horizontal ? 1 : -1 ) ) ( (s32)event.MouseInput.Wheel * SmallStep * (Horizontal ? 1 : -1 ) )
); );
...@@ -205,7 +205,7 @@ bool CGUIScrollBar::OnEvent(const SEvent& event) ...@@ -205,7 +205,7 @@ bool CGUIScrollBar::OnEvent(const SEvent& event)
return isInside; return isInside;
} }
} }
if (DraggedBySlider) if (DraggedBySlider)
{ {
setPos(newPos); setPos(newPos);
...@@ -407,7 +407,7 @@ void CGUIScrollBar::setMax(s32 max) ...@@ -407,7 +407,7 @@ void CGUIScrollBar::setMax(s32 max)
setPos(Pos); setPos(Pos);
} }
//! gets the maximum value of the scrollbar. //! gets the minimum value of the scrollbar.
s32 CGUIScrollBar::getMin() const s32 CGUIScrollBar::getMin() const
{ {
return Min; return Min;
......
...@@ -47,7 +47,7 @@ namespace gui ...@@ -47,7 +47,7 @@ namespace gui
virtual s32 getMin() const; virtual s32 getMin() const;
//! sets the minimum value of the scrollbar. //! sets the minimum value of the scrollbar.
virtual void setMin(s32 max); virtual void setMin(s32 min);
//! gets the small step value //! gets the small step value
virtual s32 getSmallStep() const; virtual s32 getSmallStep() const;
......
...@@ -329,11 +329,13 @@ IMesh* CGeometryCreator::createArrowMesh(const u32 tesselationCylinder, ...@@ -329,11 +329,13 @@ IMesh* CGeometryCreator::createArrowMesh(const u32 tesselationCylinder,
for (u32 j=0; j<buffer->getVertexCount(); ++j) for (u32 j=0; j<buffer->getVertexCount(); ++j)
buffer->getPosition(j).Y += cylinderHeight; buffer->getPosition(j).Y += cylinderHeight;
buffer->setDirty(EBT_VERTEX); buffer->setDirty(EBT_VERTEX);
buffer->recalculateBoundingBox();
mesh->addMeshBuffer(buffer); mesh->addMeshBuffer(buffer);
} }
mesh2->drop(); mesh2->drop();
mesh->setHardwareMappingHint(EHM_STATIC); mesh->setHardwareMappingHint(EHM_STATIC);
mesh->recalculateBoundingBox();
return mesh; return mesh;
} }
......
...@@ -778,11 +778,14 @@ void COgreMeshFileLoader::composeObject(void) ...@@ -778,11 +778,14 @@ void COgreMeshFileLoader::composeObject(void)
{ {
for (u32 k=0; k<Meshes[i].SubMeshes[j].BoneAssignments.size(); ++k) for (u32 k=0; k<Meshes[i].SubMeshes[j].BoneAssignments.size(); ++k)
{ {
OgreBoneAssignment& ba = Meshes[i].SubMeshes[j].BoneAssignments[k]; const OgreBoneAssignment& ba = Meshes[i].SubMeshes[j].BoneAssignments[k];
ISkinnedMesh::SWeight* w = m->addWeight(m->getAllJoints()[ba.BoneID]); if (ba.BoneID<m->getJointCount())
w->strength=ba.Weight; {
w->vertex_id=ba.VertexID; ISkinnedMesh::SWeight* w = m->addWeight(m->getAllJoints()[ba.BoneID]);
w->buffer_id=bufCount; w->strength=ba.Weight;
w->vertex_id=ba.VertexID;
w->buffer_id=bufCount;
}
} }
++bufCount; ++bufCount;
} }
......
...@@ -3696,6 +3696,10 @@ ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<u32>& si ...@@ -3696,6 +3696,10 @@ ITexture* COpenGLDriver::addRenderTargetTexture(const core::dimension2d<u32>& si
if (tex) if (tex)
{ {
success = static_cast<video::COpenGLFBODepthTexture*>(tex)->attach(rtt); success = static_cast<video::COpenGLFBODepthTexture*>(tex)->attach(rtt);
if ( !success )
{
removeDepthTexture(tex);
}
tex->drop(); tex->drop();
} }
rtt->drop(); rtt->drop();
......
...@@ -449,7 +449,6 @@ bool CXMeshFileLoader::readFileIntoMemory(io::IReadFile* file) ...@@ -449,7 +449,6 @@ bool CXMeshFileLoader::readFileIntoMemory(io::IReadFile* file)
readUntilEndOfLine(); readUntilEndOfLine();
FilePath = FileSystem->getFileDir(file->getFileName()) + "/"; FilePath = FileSystem->getFileDir(file->getFileName()) + "/";
FilePath += '/';
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment