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