Commit 823bc87b authored by hybrid's avatar hybrid

Merge from 1.7 branch, revisions 4090-4187. Device fixes, serialization bug...

Merge from 1.7 branch, revisions 4090-4187. Device fixes, serialization bug fix, some compilation warnings. Bug in color conversion fixed, and some demo fixes.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4188 dfc29bdd-3216-0410-991c-e03cc46cb475
parent a5d5488c
...@@ -329,6 +329,10 @@ The following names can be queried for the given types: ...@@ -329,6 +329,10 @@ The following names can be queried for the given types:
----------------------------- -----------------------------
Changes in 1.7.3 (20.02.2012) Changes in 1.7.3 (20.02.2012)
- SceneNodeAnimatorFlyCircle fixes serialization of RadiusEllipsoid (was writing Radius). Thx @ wing64 for reporting.
- Yield on Linux now uses nanosleep with 1ns as 0 isn't guaranteed to yield (thx @ hendu for finding + fix)
- GUIEditor attributes have now scrollbar to be editable - GUIEditor attributes have now scrollbar to be editable
- Remove warning when compiling line2d::intersectWith with other types than f32. - Remove warning when compiling line2d::intersectWith with other types than f32.
......
...@@ -272,9 +272,9 @@ public: ...@@ -272,9 +272,9 @@ public:
{ {
const u16 n = (y-y0) * Width + x; const u16 n = (y-y0) * Width + x;
buf->Indices[i]=n; buf->Indices[i]=n;
buf->Indices[++i]=n + Height; buf->Indices[++i]=n + Width;
buf->Indices[++i]=n + Height + 1; buf->Indices[++i]=n + Width + 1;
buf->Indices[++i]=n + Height + 1; buf->Indices[++i]=n + Width + 1;
buf->Indices[++i]=n + 1; buf->Indices[++i]=n + 1;
buf->Indices[++i]=n; buf->Indices[++i]=n;
++i; ++i;
......
...@@ -431,7 +431,7 @@ void CDemo::loadSceneData() ...@@ -431,7 +431,7 @@ void CDemo::loadSceneData()
model2->setMD2Animation(scene::EMAT_RUN); model2->setMD2Animation(scene::EMAT_RUN);
model2->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/sydney.bmp")); model2->setMaterialTexture(0, device->getVideoDriver()->getTexture("../../media/sydney.bmp"));
model2->setMaterialFlag(video::EMF_LIGHTING, true); model2->setMaterialFlag(video::EMF_LIGHTING, true);
model1->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true); model2->setMaterialFlag(video::EMF_NORMALIZE_NORMALS, true);
model2->addShadowVolumeSceneNode(); model2->addShadowVolumeSceneNode();
} }
} }
......
...@@ -564,11 +564,11 @@ void CColorConverter::convert_R5G6B5toR8G8B8(const void* sP, s32 sN, void* dP) ...@@ -564,11 +564,11 @@ void CColorConverter::convert_R5G6B5toR8G8B8(const void* sP, s32 sN, void* dP)
for (s32 x = 0; x < sN; ++x) for (s32 x = 0; x < sN; ++x)
{ {
dB[0] = (*sB & 0xf800) << 8; dB[0] = (*sB & 0xf800) >> 8;
dB[1] = (*sB & 0x07e0) << 2; dB[1] = (*sB & 0x07e0) >> 3;
dB[2] = (*sB & 0x001f) << 3; dB[2] = (*sB & 0x001f) << 3;
sB += 4; sB += 1;
dB += 3; dB += 3;
} }
} }
...@@ -580,11 +580,11 @@ void CColorConverter::convert_R5G6B5toB8G8R8(const void* sP, s32 sN, void* dP) ...@@ -580,11 +580,11 @@ void CColorConverter::convert_R5G6B5toB8G8R8(const void* sP, s32 sN, void* dP)
for (s32 x = 0; x < sN; ++x) for (s32 x = 0; x < sN; ++x)
{ {
dB[2] = (*sB & 0xf800) << 8; dB[2] = (*sB & 0xf800) >> 8;
dB[1] = (*sB & 0x07e0) << 2; dB[1] = (*sB & 0x07e0) >> 3;
dB[0] = (*sB & 0x001f) << 3; dB[0] = (*sB & 0x001f) << 3;
sB += 4; sB += 1;
dB += 3; dB += 3;
} }
} }
......
...@@ -1144,7 +1144,7 @@ bool CIrrDeviceLinux::run() ...@@ -1144,7 +1144,7 @@ bool CIrrDeviceLinux::run()
//! Pause the current process for the minimum time allowed only to allow other processes to execute //! Pause the current process for the minimum time allowed only to allow other processes to execute
void CIrrDeviceLinux::yield() void CIrrDeviceLinux::yield()
{ {
struct timespec ts = {0,0}; struct timespec ts = {0,1};
nanosleep(&ts, NULL); nanosleep(&ts, NULL);
} }
......
...@@ -1025,7 +1025,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params) ...@@ -1025,7 +1025,7 @@ CIrrDeviceWin32::CIrrDeviceWin32(const SIrrlichtCreationParameters& params)
EnvMap.push_back(em); EnvMap.push_back(em);
// set this as active window // set this as active window
if ( HWnd ) if (!ExternalWindow)
{ {
SetActiveWindow(HWnd); SetActiveWindow(HWnd);
SetForegroundWindow(HWnd); SetForegroundWindow(HWnd);
......
...@@ -150,8 +150,8 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device) ...@@ -150,8 +150,8 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device)
0, // Shift Bit Ignored 0, // Shift Bit Ignored
0, // No Accumulation Buffer 0, // No Accumulation Buffer
0, 0, 0, 0, // Accumulation Bits Ignored 0, 0, 0, 0, // Accumulation Bits Ignored
Params.ZBufferBits, // Z-Buffer (Depth Buffer) params.ZBufferBits, // Z-Buffer (Depth Buffer)
Params.Stencilbuffer ? 1 : 0, // Stencil Buffer Depth BYTE(params.Stencilbuffer ? 1 : 0), // Stencil Buffer Depth
0, // No Auxiliary Buffer 0, // No Auxiliary Buffer
PFD_MAIN_PLANE, // Main Drawing Layer PFD_MAIN_PLANE, // Main Drawing Layer
0, // Reserved 0, // Reserved
......
...@@ -63,7 +63,7 @@ void CSceneNodeAnimatorFlyCircle::serializeAttributes(io::IAttributes* out, io:: ...@@ -63,7 +63,7 @@ void CSceneNodeAnimatorFlyCircle::serializeAttributes(io::IAttributes* out, io::
out->addFloat("Radius", Radius); out->addFloat("Radius", Radius);
out->addFloat("Speed", Speed); out->addFloat("Speed", Speed);
out->addVector3d("Direction", Direction); out->addVector3d("Direction", Direction);
out->addFloat("RadiusEllipsoid", Radius); out->addFloat("RadiusEllipsoid", RadiusEllipsoid);
} }
......
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