Merged from branch 1.7, revisions 3607-3725. Fix some compilation errors, fix soname in Linux Makefile, calculation fix in vector2d class, CGUIScrollBar event handling fix.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@3726 dfc29bdd-3216-0410-991c-e03cc46cb475
master
hybrid 2011-05-18 21:32:00 +00:00
parent f80a8cd066
commit 13793ac522
10 changed files with 37 additions and 17 deletions

View File

@ -263,6 +263,8 @@ The following names can be queried for the given types:
-----------------------------
Changes in 1.7.3 (??.??.2011)
- CGUIScrollBar passes unused mousemove-events now to parent element. Fixes focus-bug in ComboBox reported by REDDemon here: http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=43474&highlight=
- Fix clipping in CGUITabControl
- Fix clipping in CGUITable, reported by ceyron

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Version="7.10"
Name="22.MaterialViewer"
ProjectGUID="{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
TargetFrameworkVersion="131072"

View File

@ -111,10 +111,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "23.SMeshHandling", "23.SMes
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GUI Editor", "..\tools\GUIEditor\GUI Editor_v7.vcproj", "{853A396E-C031-4C26-A716-5B4E176BE11D}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
@ -123,6 +119,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Font Tool", "..\tools\IrrFo
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "22.MaterialViewer", "22.MaterialViewer\MaterialViewer.vcproj", "{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
@ -219,18 +219,18 @@ Global
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Debug.Build.0 = Debug|Win32
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.ActiveCfg = Release|Win32
{6AEC2AA2-C9FF-4B7D-B07A-94A9D34B41D7}.Release.Build.0 = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.ActiveCfg = Debug|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Debug.Build.0 = Debug|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.ActiveCfg = Release|Win32
{4E6C2F8D-BA92-4C5B-96FD-72D4FE8BD7FA}.Release.Build.0 = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.ActiveCfg = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Debug.Build.0 = Debug|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.ActiveCfg = Release|Win32
{853A396E-C031-4C26-A716-5B4E176BE11D}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection

View File

@ -214,6 +214,8 @@ public:
// don't use getLength here to avoid precision loss with s32 vectors
f64 tmp = Y / sqrt((f64)(X*X + Y*Y));
if ( tmp > 1.0 ) // avoid floating-point trouble as sqrt(y*y) is occasionally larger y
tmp = 1.0;
tmp = atan( core::squareroot(1 - tmp*tmp) / tmp) * RADTODEG64;
if (X>0 && Y>0)
@ -244,6 +246,8 @@ public:
tmp = tmp / core::squareroot((f64)((X*X + Y*Y) * (b.X*b.X + b.Y*b.Y)));
if (tmp < 0.0)
tmp = -tmp;
if ( tmp > 1.0 ) // avoid floating-point trouble
tmp = 1.0;
return atan(sqrt(1 - tmp*tmp) / tmp) * RADTODEG64;
}

View File

@ -12,7 +12,6 @@
#if defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
#include "irrMath.h" // needed by borland for sqrtf define
#endif
#include <d3d9.h>
#include <d3dx9shader.h>
#include "IMaterialRenderer.h"

View File

@ -178,7 +178,11 @@ bool CGUIScrollBar::OnEvent(const SEvent& event)
Dragging = false;
if ( !Dragging )
{
if ( event.MouseInput.Event == EMIE_MOUSE_MOVED )
break;
return isInside;
}
if ( event.MouseInput.Event == EMIE_LMOUSE_LEFT_UP )
Dragging = false;

View File

@ -77,7 +77,8 @@ CIrrDeviceConsole::CIrrDeviceConsole(const SIrrlichtCreationParameters& params)
if (CreationParams.Fullscreen)
{
#if (_WIN32_WINNT >= 0x0501)
// Some mingw versions lack this define, so avoid it in case it does not exist
#if (_WIN32_WINNT >= 0x0501) && defined(CONSOLE_FULLSCREEN_MODE)
if (SetConsoleDisplayMode(WindowsSTDOut, CONSOLE_FULLSCREEN_MODE, Dimensions))
{
CreationParams.WindowSize.Width = Dimensions->X;

View File

@ -1448,6 +1448,9 @@ video::IVideoModeList* CIrrDeviceWin32::getVideoModeList()
typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
// Needed for old windows apis
// depending on the SDK version and compilers some defines might be available
// or not
#ifndef PRODUCT_ULTIMATE
#define PRODUCT_ULTIMATE 0x00000001
#define PRODUCT_HOME_BASIC 0x00000002
#define PRODUCT_HOME_PREMIUM 0x00000003
@ -1455,19 +1458,26 @@ typedef BOOL (WINAPI *PGPI)(DWORD, DWORD, DWORD, DWORD, PDWORD);
#define PRODUCT_HOME_BASIC_N 0x00000005
#define PRODUCT_BUSINESS 0x00000006
#define PRODUCT_STARTER 0x0000000B
#endif
#ifndef PRODUCT_ULTIMATE_N
#define PRODUCT_BUSINESS_N 0x00000010
#define PRODUCT_HOME_PREMIUM_N 0x0000001A
#define PRODUCT_ENTERPRISE_N 0x0000001B
#define PRODUCT_ULTIMATE_N 0x0000001C
#define PRODUCT_STARTER_N 0x0000002F
#endif
#ifndef PRODUCT_PROFESSIONAL
#define PRODUCT_PROFESSIONAL 0x00000030
#define PRODUCT_PROFESSIONAL_N 0x00000031
#endif
#ifndef PRODUCT_ULTIMATE_E
#define PRODUCT_STARTER_E 0x00000042
#define PRODUCT_HOME_BASIC_E 0x00000043
#define PRODUCT_HOME_PREMIUM_E 0x00000044
#define PRODUCT_PROFESSIONAL_E 0x00000045
#define PRODUCT_ENTERPRISE_E 0x00000046
#define PRODUCT_ULTIMATE_E 0x00000047
#endif
void CIrrDeviceWin32::getWindowsVersion(core::stringc& out)
{

View File

@ -109,7 +109,7 @@ all linux: staticlib
# Builds Irrlicht as shared lib (libIrrlicht.so.versionNumber) and copies it into lib/Linux
sharedlib: $(LINKOBJ)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).$(VERSION_MAJOR).$(VERSION_MINOR) -o $(SHARED_LIB).$(VERSION) $^ $(LDFLAGS)
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -shared -Wl,-soname,$(SHARED_LIB).$(VERSION_MAJOR).$(VERSION_MINOR).$(VERSION_RELEASE) -o $(SHARED_LIB).$(VERSION) $^ $(LDFLAGS)
mkdir -p $(LIB_PATH)
cp $(SHARED_LIB).$(VERSION) $(LIB_PATH)

View File

@ -105,7 +105,7 @@ namespace os
#if !defined(_WIN32_WCE) && !defined (_IRR_XBOX_PLATFORM_)
// Avoid potential timing inaccuracies across multiple cores by
// temporarily setting the affinity of this process to one core.
DWORD_PTR affinityMask;
DWORD_PTR affinityMask=0;
if(MultiCore)
affinityMask = SetThreadAffinityMask(GetCurrentThread(), 1);
#endif