Commit a5046f4b authored by hybrid's avatar hybrid

Merged from branch 1.7, revisions 3290-3299. Few bugfixes, typo in GUI event, unicode fixes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3300 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 0f7ed239
...@@ -168,9 +168,9 @@ void loadModel(const c8* fn) ...@@ -168,9 +168,9 @@ void loadModel(const c8* fn)
{ {
// modify the name if it a .pk3 file // modify the name if it a .pk3 file
core::stringc filename(fn); io::path filename(fn);
core::stringc extension; io::path extension;
core::getFileNameExtension(extension, filename); core::getFileNameExtension(extension, filename);
extension.make_lower(); extension.make_lower();
......
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
/> />
<Tool <Tool
Name="VCLinkerTool" Name="VCLinkerTool"
AdditionalDependencies="kernel32.lib user32.lib gdi32.lib" AdditionalDependencies="kernel32.lib user32.lib gdi32.lib opengl32.lib"
OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe" OutputFile="..\..\bin\Win32-VisualStudio\14.Win32Window.exe"
LinkIncremental="0" LinkIncremental="0"
SuppressStartupBanner="true" SuppressStartupBanner="true"
......
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="Irrlicht Example 23 SMeshHandling" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Windows">
<Option platforms="Windows;" />
<Option output="../../bin/Win32-gcc/SMeshHandling" prefix_auto="0" extension_auto="1" />
<Option type="1" />
<Option compiler="gcc" />
</Target>
<Target title="Linux">
<Option platforms="Unix;" />
<Option output="../../bin/Linux/SMeshHandling" prefix_auto="0" extension_auto="0" />
<Option type="1" />
<Option compiler="gcc" />
<Linker>
<Add library="Irrlicht" />
<Add directory="../../lib/Linux" />
</Linker>
</Target>
</Build>
<Compiler>
<Add directory="../../include" />
</Compiler>
<Linker>
<Add option="../../lib/Win32-gcc/libIrrlicht.a" />
</Linker>
<Unit filename="main.cpp" />
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>
...@@ -163,7 +163,9 @@ namespace gui ...@@ -163,7 +163,9 @@ namespace gui
//! minimal space to reserve for messagebox text-width //! minimal space to reserve for messagebox text-width
EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH, EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH,
//! maximal space to reserve for messagebox text-width //! maximal space to reserve for messagebox text-width
EGDS_MESSAGE_BOX_MAX_TEST_WIDTH, EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH,
//! deprecated - this was a typo. Should be removed for 1.8
EGDS_MESSAGE_BOX_MAX_TEST_WIDTH = EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH,
//! minimal space to reserve for messagebox text-height //! minimal space to reserve for messagebox text-height
EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT, EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT,
//! maximal space to reserve for messagebox text-height //! maximal space to reserve for messagebox text-height
......
...@@ -2863,7 +2863,7 @@ bool CD3D9Driver::reset() ...@@ -2863,7 +2863,7 @@ bool CD3D9Driver::reset()
pID3DDevice->GetDepthStencilSurface(&(DepthBuffers[0]->Surface)); pID3DDevice->GetDepthStencilSurface(&(DepthBuffers[0]->Surface));
D3DSURFACE_DESC desc; D3DSURFACE_DESC desc;
// restore other depth buffers // restore other depth buffers
// dpeth format is taken from main depth buffer // depth format is taken from main depth buffer
DepthBuffers[0]->Surface->GetDesc(&desc); DepthBuffers[0]->Surface->GetDesc(&desc);
// multisampling is taken from rendertarget // multisampling is taken from rendertarget
D3DSURFACE_DESC desc2; D3DSURFACE_DESC desc2;
......
...@@ -21,11 +21,11 @@ ...@@ -21,11 +21,11 @@
#include "CMemoryFile.h" #include "CMemoryFile.h"
#include "CLimitReadFile.h" #include "CLimitReadFile.h"
#if defined (_IRR_WINDOWS_API_) #if defined (_IRR_WINDOWS_API_)
#if !defined ( _WIN32_WCE ) #if !defined ( _WIN32_WCE )
#include <direct.h> // for _chdir #include <direct.h> // for _chdir
#include <io.h> // for _access #include <io.h> // for _access
#include <tchar.h>
#endif #endif
#else #else
#if (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_)) #if (defined(_IRR_POSIX_API_) || defined(_IRR_OSX_PLATFORM_))
...@@ -603,7 +603,6 @@ IFileList* CFileSystem::createFileList() ...@@ -603,7 +603,6 @@ IFileList* CFileSystem::createFileList()
//! Construct from native filesystem //! Construct from native filesystem
if (FileSystemType == FILESYSTEM_NATIVE) if (FileSystemType == FILESYSTEM_NATIVE)
{ {
io::path fullPath;
// -------------------------------------------- // --------------------------------------------
//! Windows version //! Windows version
#ifdef _IRR_WINDOWS_API_ #ifdef _IRR_WINDOWS_API_
...@@ -611,18 +610,16 @@ IFileList* CFileSystem::createFileList() ...@@ -611,18 +610,16 @@ IFileList* CFileSystem::createFileList()
r = new CFileList(Path, true, false); r = new CFileList(Path, true, false);
struct _finddata_t c_file; struct _tfinddata_t c_file;
long hFile; long hFile;
if( (hFile = _findfirst( "*", &c_file )) != -1L ) if( (hFile = _tfindfirst( _T("*"), &c_file )) != -1L )
{ {
do do
{ {
fullPath = Path + c_file.name; r->addItem(Path + c_file.name, c_file.size, (_A_SUBDIR & c_file.attrib) != 0, 0);
r->addItem(fullPath, c_file.size, (_A_SUBDIR & c_file.attrib) != 0, 0);
} }
while( _findnext( hFile, &c_file ) == 0 ); while( _tfindnext( hFile, &c_file ) == 0 );
_findclose( hFile ); _findclose( hFile );
} }
...@@ -652,7 +649,6 @@ IFileList* CFileSystem::createFileList() ...@@ -652,7 +649,6 @@ IFileList* CFileSystem::createFileList()
{ {
u32 size = 0; u32 size = 0;
bool isDirectory = false; bool isDirectory = false;
fullPath = Path + dirEntry->d_name;
if((strcmp(dirEntry->d_name, ".")==0) || if((strcmp(dirEntry->d_name, ".")==0) ||
(strcmp(dirEntry->d_name, "..")==0)) (strcmp(dirEntry->d_name, "..")==0))
...@@ -673,7 +669,7 @@ IFileList* CFileSystem::createFileList() ...@@ -673,7 +669,7 @@ IFileList* CFileSystem::createFileList()
} }
#endif #endif
r->addItem(fullPath, size, isDirectory, 0); r->addItem(Path + dirEntry->d_name, size, isDirectory, 0);
} }
closedir(dirHandle); closedir(dirHandle);
} }
...@@ -703,12 +699,10 @@ IFileList* CFileSystem::createFileList() ...@@ -703,12 +699,10 @@ IFileList* CFileSystem::createFileList()
{ {
if (core::isInSameDirectory(Path, merge->getFullFileName(j)) == 0) if (core::isInSameDirectory(Path, merge->getFullFileName(j)) == 0)
{ {
io::path fullPath = merge->getFullFileName(j); r->addItem(merge->getFullFileName(j), merge->getFileSize(j), merge->isDirectory(j), 0);
r->addItem(fullPath, merge->getFileSize(j), merge->isDirectory(j), 0);
} }
} }
} }
} }
if (r) if (r)
......
...@@ -122,7 +122,7 @@ void CGUIMessageBox::refreshControls() ...@@ -122,7 +122,7 @@ void CGUIMessageBox::refreshControls()
core::rect<s32> staticRect; core::rect<s32> staticRect;
staticRect.UpperLeftCorner.X = borderWidth; staticRect.UpperLeftCorner.X = borderWidth;
staticRect.UpperLeftCorner.Y = titleHeight + borderWidth; staticRect.UpperLeftCorner.Y = titleHeight + borderWidth;
staticRect.LowerRightCorner.X = staticRect.UpperLeftCorner.X + skin->getSize(EGDS_MESSAGE_BOX_MAX_TEST_WIDTH); staticRect.LowerRightCorner.X = staticRect.UpperLeftCorner.X + skin->getSize(EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH);
staticRect.LowerRightCorner.Y = staticRect.UpperLeftCorner.Y + skin->getSize(EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT); staticRect.LowerRightCorner.Y = staticRect.UpperLeftCorner.Y + skin->getSize(EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT);
if (!StaticText) if (!StaticText)
{ {
......
...@@ -105,7 +105,7 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver) ...@@ -105,7 +105,7 @@ CGUISkin::CGUISkin(EGUI_SKIN_TYPE type, video::IVideoDriver* driver)
Sizes[EGDS_MESSAGE_BOX_GAP_SPACE] = 15; Sizes[EGDS_MESSAGE_BOX_GAP_SPACE] = 15;
Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH] = 0; Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_WIDTH] = 0;
Sizes[EGDS_MESSAGE_BOX_MAX_TEST_WIDTH] = 500; Sizes[EGDS_MESSAGE_BOX_MAX_TEXT_WIDTH] = 500;
Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT] = 0; Sizes[EGDS_MESSAGE_BOX_MIN_TEXT_HEIGHT] = 0;
Sizes[EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT] = 99999; Sizes[EGDS_MESSAGE_BOX_MAX_TEXT_HEIGHT] = 99999;
......
...@@ -183,7 +183,7 @@ void CIrrMeshWriter::writeMeshBuffer(const scene::IMeshBuffer* buffer) ...@@ -183,7 +183,7 @@ void CIrrMeshWriter::writeMeshBuffer(const scene::IMeshBuffer* buffer)
str += getVectorAsStringLine(vtx[j].Normal); str += getVectorAsStringLine(vtx[j].Normal);
char tmp[12]; char tmp[12];
sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getBlue(), vtx[j].Color.getGreen()); sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getGreen(), vtx[j].Color.getBlue());
str += tmp; str += tmp;
str += getVectorAsStringLine(vtx[j].TCoords); str += getVectorAsStringLine(vtx[j].TCoords);
...@@ -203,7 +203,7 @@ void CIrrMeshWriter::writeMeshBuffer(const scene::IMeshBuffer* buffer) ...@@ -203,7 +203,7 @@ void CIrrMeshWriter::writeMeshBuffer(const scene::IMeshBuffer* buffer)
str += getVectorAsStringLine(vtx[j].Normal); str += getVectorAsStringLine(vtx[j].Normal);
char tmp[12]; char tmp[12];
sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getBlue(), vtx[j].Color.getGreen()); sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getGreen(), vtx[j].Color.getBlue());
str += tmp; str += tmp;
str += getVectorAsStringLine(vtx[j].TCoords); str += getVectorAsStringLine(vtx[j].TCoords);
...@@ -225,7 +225,7 @@ void CIrrMeshWriter::writeMeshBuffer(const scene::IMeshBuffer* buffer) ...@@ -225,7 +225,7 @@ void CIrrMeshWriter::writeMeshBuffer(const scene::IMeshBuffer* buffer)
str += getVectorAsStringLine(vtx[j].Normal); str += getVectorAsStringLine(vtx[j].Normal);
char tmp[12]; char tmp[12];
sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getBlue(), vtx[j].Color.getGreen()); sprintf(tmp, " %02x%02x%02x%02x ", vtx[j].Color.getAlpha(), vtx[j].Color.getRed(), vtx[j].Color.getGreen(), vtx[j].Color.getBlue());
str += tmp; str += tmp;
str += getVectorAsStringLine(vtx[j].TCoords); str += getVectorAsStringLine(vtx[j].TCoords);
......
...@@ -39,7 +39,7 @@ COpenGLDriver::COpenGLDriver(const irr::SIrrlichtCreationParameters& params, ...@@ -39,7 +39,7 @@ COpenGLDriver::COpenGLDriver(const irr::SIrrlichtCreationParameters& params,
CurrentRendertargetSize(0,0), ColorFormat(ECF_R8G8B8), CurrentRendertargetSize(0,0), ColorFormat(ECF_R8G8B8),
CurrentTarget(ERT_FRAME_BUFFER), CurrentTarget(ERT_FRAME_BUFFER),
Doublebuffer(params.Doublebuffer), Stereo(params.Stereobuffer), Doublebuffer(params.Doublebuffer), Stereo(params.Stereobuffer),
HDc(0), Device(device), Window(static_cast<HWND>(params.WindowId)), HDc(0), Window(static_cast<HWND>(params.WindowId)), Device(device),
DeviceType(EIDT_WIN32) DeviceType(EIDT_WIN32)
{ {
#ifdef _DEBUG #ifdef _DEBUG
...@@ -224,7 +224,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi ...@@ -224,7 +224,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi
data.OpenGLWin32.HRc = hrc; data.OpenGLWin32.HRc = hrc;
data.OpenGLWin32.HWnd = temporary_wnd; data.OpenGLWin32.HWnd = temporary_wnd;
if (!changeRenderContext(data, device)) if (!changeRenderContext(data, device))
{ {
os::Printer::log("Cannot activate a temporary GL rendering context.", ELL_ERROR); os::Printer::log("Cannot activate a temporary GL rendering context.", ELL_ERROR);
...@@ -410,7 +410,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi ...@@ -410,7 +410,7 @@ bool COpenGLDriver::initDriver(irr::SIrrlichtCreationParameters params, CIrrDevi
ExposedData.OpenGLWin32.HWnd = Window; ExposedData.OpenGLWin32.HWnd = Window;
// activate rendering context // activate rendering context
if (!changeRenderContext(ExposedData, device)) if (!changeRenderContext(ExposedData, device))
{ {
os::Printer::log("Cannot activate GL rendering context", ELL_ERROR); os::Printer::log("Cannot activate GL rendering context", ELL_ERROR);
...@@ -3916,7 +3916,7 @@ bool COpenGLDriver::setRenderTarget(const core::array<video::IRenderTarget>& tar ...@@ -3916,7 +3916,7 @@ bool COpenGLDriver::setRenderTarget(const core::array<video::IRenderTarget>& tar
{ {
if (FeatureAvailable[IRR_EXT_draw_buffers2]) if (FeatureAvailable[IRR_EXT_draw_buffers2])
{ {
extGlColorMaskIndexed(i, extGlColorMaskIndexed(i,
(targets[i].ColorMask & ECP_RED)?GL_TRUE:GL_FALSE, (targets[i].ColorMask & ECP_RED)?GL_TRUE:GL_FALSE,
(targets[i].ColorMask & ECP_GREEN)?GL_TRUE:GL_FALSE, (targets[i].ColorMask & ECP_GREEN)?GL_TRUE:GL_FALSE,
(targets[i].ColorMask & ECP_BLUE)?GL_TRUE:GL_FALSE, (targets[i].ColorMask & ECP_BLUE)?GL_TRUE:GL_FALSE,
......
...@@ -243,8 +243,8 @@ private: ...@@ -243,8 +243,8 @@ private:
} }
} }
memcpy( (*indices)[i].Indices.pointer(), keepIndices.pointer(), keepIndices.size()*sizeof(u16));
(*indices)[i].Indices.set_used(keepIndices.size()); (*indices)[i].Indices.set_used(keepIndices.size());
memcpy( (*indices)[i].Indices.pointer(), keepIndices.pointer(), keepIndices.size()*sizeof(u16));
keepIndices.set_used(0); keepIndices.set_used(0);
} }
......
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