This commit is contained in:
Matt Raykowski 2010-06-08 10:07:33 -05:00
parent d5a6763b61
commit f84813911b
220 changed files with 17702 additions and 4148 deletions

View file

@ -11,7 +11,7 @@ ENDIF(XF86VidMode_LIBRARY AND XF86VidMode_INCLUDE_DIR)
FIND_PATH(XF86VidMode_INCLUDE_DIR FIND_PATH(XF86VidMode_INCLUDE_DIR
xf86vm.h xf86vmode.h
PATHS PATHS
$ENV{XF86VidMode_DIR}/include $ENV{XF86VidMode_DIR}/include
/usr/include/X11/ /usr/include/X11/

View file

@ -54,7 +54,7 @@ private:
public: public:
/// Constructor /// Constructor
CAnimationSetUser(CDriverUser *owner) CAnimationSetUser(CDriverUser *owner, bool headerOptim = true)
{ {
nlassert(owner); nlassert(owner);
_Owner= owner; _Owner= owner;
@ -62,7 +62,7 @@ public:
nlassert((uint)UAnimationSet::NotFound == (uint)CAnimationSet::NotFound ); nlassert((uint)UAnimationSet::NotFound == (uint)CAnimationSet::NotFound );
// create a smartptred animation set. Allow header compression // create a smartptred animation set. Allow header compression
_AnimationSet= new CAnimationSet(true); _AnimationSet= new CAnimationSet(headerOptim);
} }
/// Constructor /// Constructor

View file

@ -229,7 +229,7 @@ public:
/// \name AnimationSet gestion. /// \name AnimationSet gestion.
// @{ // @{
/// Create an empty AnimationSet. /// Create an empty AnimationSet.
virtual UAnimationSet *createAnimationSet(); virtual UAnimationSet *createAnimationSet(bool headerOptim = true);
/// Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found. /// Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.
virtual UAnimationSet *createAnimationSet(const std::string &animationSetFile); virtual UAnimationSet *createAnimationSet(const std::string &animationSetFile);
/// Delete a AnimationSet. /// Delete a AnimationSet.

View file

@ -61,6 +61,7 @@ public:
class CBuildSlot class CBuildSlot
{ {
public: public:
CBuildSlot() : MeshGeom(NULL) { }
/** /**
* Flags for the build of a slot * Flags for the build of a slot
* *

View file

@ -294,7 +294,7 @@ public:
/// \name AnimationSet gestion. /// \name AnimationSet gestion.
// @{ // @{
/// Create an empty AnimationSet. /// Create an empty AnimationSet.
virtual UAnimationSet *createAnimationSet() =0; virtual UAnimationSet *createAnimationSet(bool headerOptim = true) =0;
/// Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found. /// Create a new AnimationSet, load it from a file. Use CPath to search the animation set. exception EPathNotFound if not found.
virtual UAnimationSet *createAnimationSet(const std::string &animationSetFile) =0; virtual UAnimationSet *createAnimationSet(const std::string &animationSetFile) =0;
/// Delete a AnimationSet. NB: actually, this animation set is internally deleted only when no more UPlayList use it. /// Delete a AnimationSet. NB: actually, this animation set is internally deleted only when no more UPlayList use it.

View file

@ -1,6 +1,6 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008 # Visual C++ Express 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "misc", "..\..\..\src\misc.vcproj", "{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "misc", "..\..\..\src\misc.vcproj", "{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "3d", "..\..\..\src\3d.vcproj", "{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "3d", "..\..\..\src\3d.vcproj", "{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}"
@ -55,20 +55,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "driver_opengl", "..\..\..\s
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A} = {2B48BE83-108B-4E8E-8A55-6627CF09AC5A} {2B48BE83-108B-4E8E-8A55-6627CF09AC5A} = {2B48BE83-108B-4E8E-8A55-6627CF09AC5A}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nel", "nel", "{7CFF6C36-8DE1-49F9-8921-7BAA0D57FEDA}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3d_driver", "3d_driver", "{C691380A-F9FB-4E3F-B640-952637A14364}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "sound_driver", "sound_driver", "{A5F89936-1FC0-4BB6-8797-81772E5F3289}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "client", "client", "{FF586E33-A74E-4DD1-B6AA-82C840BE6232}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "library", "library", "{BA027DE9-5253-43FD-8E5F-36F23CA5A7FB}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{2E0BF6A2-C1AF-49EF-A010-C5B77C67471B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "config", "config", "{9254FD6A-988B-406D-B483-BC34C63D59AC}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cegui", "..\..\..\src\cegui.vcproj", "{CEF983A5-610E-49C9-A122-05557EEC4E34}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cegui", "..\..\..\src\cegui.vcproj", "{CEF983A5-610E-49C9-A122-05557EEC4E34}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0} = {263C0F2E-112D-437F-A6AB-DEA151A7A1F0} {263C0F2E-112D-437F-A6AB-DEA151A7A1F0} = {263C0F2E-112D-437F-A6AB-DEA151A7A1F0}
@ -77,8 +63,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cegui", "..\..\..\src\cegui
{1D9576F6-3321-4036-8C86-B5361CCCD4FB} = {1D9576F6-3321-4036-8C86-B5361CCCD4FB} {1D9576F6-3321-4036-8C86-B5361CCCD4FB} = {1D9576F6-3321-4036-8C86-B5361CCCD4FB}
EndProjectSection EndProjectSection
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "3d", "3d", "{AC16724F-3D8A-46D3-AD72-25577462BB56}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cegui_demo", "cegui_demo.vcproj", "{F055BA8A-C3CF-4990-B3F8-39660350B9F6}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cegui_demo", "cegui_demo.vcproj", "{F055BA8A-C3CF-4990-B3F8-39660350B9F6}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516} = {44B21233-EFCC-4825-B5E5-3A3BD6CC5516} {44B21233-EFCC-4825-B5E5-3A3BD6CC5516} = {44B21233-EFCC-4825-B5E5-3A3BD6CC5516}
@ -89,77 +73,147 @@ EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32 Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32 Release|Win32 = Release|Win32
Release|x64 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution GlobalSection(ProjectConfigurationPlatforms) = postSolution
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Debug|Win32.ActiveCfg = Debug|Win32 {44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Debug|Win32.ActiveCfg = Debug|Win32
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Debug|Win32.Build.0 = Debug|Win32 {44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Debug|Win32.Build.0 = Debug|Win32
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Debug|x64.ActiveCfg = Debug|x64
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Debug|x64.Build.0 = Debug|x64
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Release|Win32.ActiveCfg = Release|Win32 {44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Release|Win32.ActiveCfg = Release|Win32
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Release|Win32.Build.0 = Release|Win32 {44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Release|Win32.Build.0 = Release|Win32
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Release|x64.ActiveCfg = Release|x64
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516}.Release|x64.Build.0 = Release|x64
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Debug|Win32.ActiveCfg = Debug|Win32 {2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Debug|Win32.ActiveCfg = Debug|Win32
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Debug|Win32.Build.0 = Debug|Win32 {2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Debug|Win32.Build.0 = Debug|Win32
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Debug|x64.ActiveCfg = Debug|x64
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Debug|x64.Build.0 = Debug|x64
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Release|Win32.ActiveCfg = Release|Win32 {2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Release|Win32.ActiveCfg = Release|Win32
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Release|Win32.Build.0 = Release|Win32 {2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Release|Win32.Build.0 = Release|Win32
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Release|x64.ActiveCfg = Release|x64
{2B48BE83-108B-4E8E-8A55-6627CF09AC5A}.Release|x64.Build.0 = Release|x64
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Debug|Win32.ActiveCfg = Debug|Win32 {9D284C6B-BE12-4549-87E5-2337D64F31BE}.Debug|Win32.ActiveCfg = Debug|Win32
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Debug|Win32.Build.0 = Debug|Win32 {9D284C6B-BE12-4549-87E5-2337D64F31BE}.Debug|Win32.Build.0 = Debug|Win32
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Debug|x64.ActiveCfg = Debug|x64
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Debug|x64.Build.0 = Debug|x64
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Release|Win32.ActiveCfg = Release|Win32 {9D284C6B-BE12-4549-87E5-2337D64F31BE}.Release|Win32.ActiveCfg = Release|Win32
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Release|Win32.Build.0 = Release|Win32 {9D284C6B-BE12-4549-87E5-2337D64F31BE}.Release|Win32.Build.0 = Release|Win32
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Release|x64.ActiveCfg = Release|x64
{9D284C6B-BE12-4549-87E5-2337D64F31BE}.Release|x64.Build.0 = Release|x64
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Debug|Win32.ActiveCfg = Debug|Win32 {1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Debug|Win32.ActiveCfg = Debug|Win32
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Debug|Win32.Build.0 = Debug|Win32 {1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Debug|Win32.Build.0 = Debug|Win32
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Debug|x64.ActiveCfg = Debug|x64
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Debug|x64.Build.0 = Debug|x64
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Release|Win32.ActiveCfg = Release|Win32 {1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Release|Win32.ActiveCfg = Release|Win32
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Release|Win32.Build.0 = Release|Win32 {1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Release|Win32.Build.0 = Release|Win32
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Release|x64.ActiveCfg = Release|x64
{1DDC11C7-AF79-40F3-A6D4-F84BA8644B5C}.Release|x64.Build.0 = Release|x64
{0E723473-FDBB-48D7-8141-1273B917D681}.Debug|Win32.ActiveCfg = Debug|Win32 {0E723473-FDBB-48D7-8141-1273B917D681}.Debug|Win32.ActiveCfg = Debug|Win32
{0E723473-FDBB-48D7-8141-1273B917D681}.Debug|Win32.Build.0 = Debug|Win32 {0E723473-FDBB-48D7-8141-1273B917D681}.Debug|Win32.Build.0 = Debug|Win32
{0E723473-FDBB-48D7-8141-1273B917D681}.Debug|x64.ActiveCfg = Debug|x64
{0E723473-FDBB-48D7-8141-1273B917D681}.Debug|x64.Build.0 = Debug|x64
{0E723473-FDBB-48D7-8141-1273B917D681}.Release|Win32.ActiveCfg = Release|Win32 {0E723473-FDBB-48D7-8141-1273B917D681}.Release|Win32.ActiveCfg = Release|Win32
{0E723473-FDBB-48D7-8141-1273B917D681}.Release|Win32.Build.0 = Release|Win32 {0E723473-FDBB-48D7-8141-1273B917D681}.Release|Win32.Build.0 = Release|Win32
{0E723473-FDBB-48D7-8141-1273B917D681}.Release|x64.ActiveCfg = Release|x64
{0E723473-FDBB-48D7-8141-1273B917D681}.Release|x64.Build.0 = Release|x64
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Debug|Win32.ActiveCfg = Debug|Win32 {4AF7ADB2-DAF8-4F04-9793-F92010001470}.Debug|Win32.ActiveCfg = Debug|Win32
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Debug|Win32.Build.0 = Debug|Win32 {4AF7ADB2-DAF8-4F04-9793-F92010001470}.Debug|Win32.Build.0 = Debug|Win32
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Debug|x64.ActiveCfg = Debug|x64
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Debug|x64.Build.0 = Debug|x64
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Release|Win32.ActiveCfg = Release|Win32 {4AF7ADB2-DAF8-4F04-9793-F92010001470}.Release|Win32.ActiveCfg = Release|Win32
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Release|Win32.Build.0 = Release|Win32 {4AF7ADB2-DAF8-4F04-9793-F92010001470}.Release|Win32.Build.0 = Release|Win32
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Release|x64.ActiveCfg = Release|x64
{4AF7ADB2-DAF8-4F04-9793-F92010001470}.Release|x64.Build.0 = Release|x64
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Debug|Win32.ActiveCfg = Debug|Win32 {67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Debug|Win32.ActiveCfg = Debug|Win32
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Debug|Win32.Build.0 = Debug|Win32 {67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Debug|Win32.Build.0 = Debug|Win32
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Debug|x64.ActiveCfg = Debug|x64
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Debug|x64.Build.0 = Debug|x64
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Release|Win32.ActiveCfg = Release|Win32 {67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Release|Win32.ActiveCfg = Release|Win32
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Release|Win32.Build.0 = Release|Win32 {67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Release|Win32.Build.0 = Release|Win32
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Release|x64.ActiveCfg = Release|x64
{67AF56A4-A228-4BFB-BDA8-026CBEDE8BF9}.Release|x64.Build.0 = Release|x64
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Debug|Win32.ActiveCfg = Debug|Win32 {C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Debug|Win32.ActiveCfg = Debug|Win32
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Debug|Win32.Build.0 = Debug|Win32 {C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Debug|Win32.Build.0 = Debug|Win32
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Debug|x64.ActiveCfg = Debug|x64
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Debug|x64.Build.0 = Debug|x64
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Release|Win32.ActiveCfg = Release|Win32 {C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Release|Win32.ActiveCfg = Release|Win32
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Release|Win32.Build.0 = Release|Win32 {C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Release|Win32.Build.0 = Release|Win32
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Release|x64.ActiveCfg = Release|x64
{C5253970-8728-4A6F-8BF2-E1D9CF0F3861}.Release|x64.Build.0 = Release|x64
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Debug|Win32.ActiveCfg = Debug|Win32 {89064E9B-14E9-4FB2-8536-A9151DF55C68}.Debug|Win32.ActiveCfg = Debug|Win32
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Debug|Win32.Build.0 = Debug|Win32 {89064E9B-14E9-4FB2-8536-A9151DF55C68}.Debug|Win32.Build.0 = Debug|Win32
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Debug|x64.ActiveCfg = Debug|x64
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Debug|x64.Build.0 = Debug|x64
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Release|Win32.ActiveCfg = Release|Win32 {89064E9B-14E9-4FB2-8536-A9151DF55C68}.Release|Win32.ActiveCfg = Release|Win32
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Release|Win32.Build.0 = Release|Win32 {89064E9B-14E9-4FB2-8536-A9151DF55C68}.Release|Win32.Build.0 = Release|Win32
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Release|x64.ActiveCfg = Release|x64
{89064E9B-14E9-4FB2-8536-A9151DF55C68}.Release|x64.Build.0 = Release|x64
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Debug|Win32.ActiveCfg = Debug|Win32 {23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Debug|Win32.ActiveCfg = Debug|Win32
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Debug|Win32.Build.0 = Debug|Win32 {23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Debug|Win32.Build.0 = Debug|Win32
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Debug|x64.ActiveCfg = Debug|x64
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Debug|x64.Build.0 = Debug|x64
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Release|Win32.ActiveCfg = Release|Win32 {23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Release|Win32.ActiveCfg = Release|Win32
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Release|Win32.Build.0 = Release|Win32 {23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Release|Win32.Build.0 = Release|Win32
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Release|x64.ActiveCfg = Release|x64
{23DCF574-1CEB-4DF4-9C59-D614580AC0C0}.Release|x64.Build.0 = Release|x64
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Debug|Win32.ActiveCfg = Debug|Win32 {46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Debug|Win32.ActiveCfg = Debug|Win32
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Debug|Win32.Build.0 = Debug|Win32 {46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Debug|Win32.Build.0 = Debug|Win32
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Debug|x64.ActiveCfg = Debug|x64
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Debug|x64.Build.0 = Debug|x64
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Release|Win32.ActiveCfg = Release|Win32 {46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Release|Win32.ActiveCfg = Release|Win32
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Release|Win32.Build.0 = Release|Win32 {46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Release|Win32.Build.0 = Release|Win32
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Release|x64.ActiveCfg = Release|x64
{46CD3ED8-A9E1-49ED-BA1B-586CF147143A}.Release|x64.Build.0 = Release|x64
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Debug|Win32.ActiveCfg = Debug|Win32 {9440443B-97BA-43C2-A762-31EEC8958BEE}.Debug|Win32.ActiveCfg = Debug|Win32
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Debug|Win32.Build.0 = Debug|Win32 {9440443B-97BA-43C2-A762-31EEC8958BEE}.Debug|Win32.Build.0 = Debug|Win32
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Debug|x64.ActiveCfg = Debug|x64
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Debug|x64.Build.0 = Debug|x64
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Release|Win32.ActiveCfg = Release|Win32 {9440443B-97BA-43C2-A762-31EEC8958BEE}.Release|Win32.ActiveCfg = Release|Win32
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Release|Win32.Build.0 = Release|Win32 {9440443B-97BA-43C2-A762-31EEC8958BEE}.Release|Win32.Build.0 = Release|Win32
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Release|x64.ActiveCfg = Release|x64
{9440443B-97BA-43C2-A762-31EEC8958BEE}.Release|x64.Build.0 = Release|x64
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Debug|Win32.ActiveCfg = Debug|Win32 {309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Debug|Win32.ActiveCfg = Debug|Win32
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Debug|Win32.Build.0 = Debug|Win32 {309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Debug|Win32.Build.0 = Debug|Win32
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Debug|x64.ActiveCfg = Debug|x64
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Debug|x64.Build.0 = Debug|x64
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Release|Win32.ActiveCfg = Release|Win32 {309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Release|Win32.ActiveCfg = Release|Win32
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Release|Win32.Build.0 = Release|Win32 {309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Release|Win32.Build.0 = Release|Win32
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Release|x64.ActiveCfg = Release|x64
{309F8A55-BFBA-433B-8C3E-CB2223F799C3}.Release|x64.Build.0 = Release|x64
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Debug|Win32.ActiveCfg = Debug|Win32 {263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Debug|Win32.ActiveCfg = Debug|Win32
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Debug|Win32.Build.0 = Debug|Win32 {263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Debug|Win32.Build.0 = Debug|Win32
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Debug|x64.ActiveCfg = Debug|x64
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Debug|x64.Build.0 = Debug|x64
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Release|Win32.ActiveCfg = Release|Win32 {263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Release|Win32.ActiveCfg = Release|Win32
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Release|Win32.Build.0 = Release|Win32 {263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Release|Win32.Build.0 = Release|Win32
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Release|x64.ActiveCfg = Release|x64
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0}.Release|x64.Build.0 = Release|x64
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Debug|Win32.ActiveCfg = Debug|Win32 {1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Debug|Win32.ActiveCfg = Debug|Win32
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Debug|Win32.Build.0 = Debug|Win32 {1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Debug|Win32.Build.0 = Debug|Win32
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Debug|x64.ActiveCfg = Debug|x64
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Debug|x64.Build.0 = Debug|x64
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Release|Win32.ActiveCfg = Release|Win32 {1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Release|Win32.ActiveCfg = Release|Win32
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Release|Win32.Build.0 = Release|Win32 {1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Release|Win32.Build.0 = Release|Win32
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Release|x64.ActiveCfg = Release|x64
{1D9576F6-3321-4036-8C86-B5361CCCD4FB}.Release|x64.Build.0 = Release|x64
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Debug|Win32.ActiveCfg = Debug|Win32 {CEF983A5-610E-49C9-A122-05557EEC4E34}.Debug|Win32.ActiveCfg = Debug|Win32
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Debug|Win32.Build.0 = Debug|Win32 {CEF983A5-610E-49C9-A122-05557EEC4E34}.Debug|Win32.Build.0 = Debug|Win32
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Debug|x64.ActiveCfg = Debug|x64
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Debug|x64.Build.0 = Debug|x64
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Release|Win32.ActiveCfg = Release|Win32 {CEF983A5-610E-49C9-A122-05557EEC4E34}.Release|Win32.ActiveCfg = Release|Win32
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Release|Win32.Build.0 = Release|Win32 {CEF983A5-610E-49C9-A122-05557EEC4E34}.Release|Win32.Build.0 = Release|Win32
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Release|x64.ActiveCfg = Release|x64
{CEF983A5-610E-49C9-A122-05557EEC4E34}.Release|x64.Build.0 = Release|x64
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Debug|Win32.ActiveCfg = Debug|Win32 {F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Debug|Win32.ActiveCfg = Debug|Win32
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Debug|Win32.Build.0 = Debug|Win32 {F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Debug|Win32.Build.0 = Debug|Win32
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Debug|x64.ActiveCfg = Debug|x64
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Debug|x64.Build.0 = Debug|x64
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Release|Win32.ActiveCfg = Release|Win32 {F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Release|Win32.ActiveCfg = Release|Win32
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Release|Win32.Build.0 = Release|Win32 {F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Release|Win32.Build.0 = Release|Win32
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Release|x64.ActiveCfg = Release|x64
{F055BA8A-C3CF-4990-B3F8-39660350B9F6}.Release|x64.Build.0 = Release|x64
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9,00" Version="9.00"
Name="cegui_demo" Name="cegui_demo"
ProjectGUID="{F055BA8A-C3CF-4990-B3F8-39660350B9F6}" ProjectGUID="{F055BA8A-C3CF-4990-B3F8-39660350B9F6}"
RootNamespace="cegui_demo_nel" RootNamespace="cegui_demo_nel"
@ -11,6 +11,9 @@
<Platform <Platform
Name="Win32" Name="Win32"
/> />
<Platform
Name="x64"
/>
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
@ -180,6 +183,173 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\..\include\"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;_DEBUG;_WINDOWS"
StringPooling="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="3"
BufferSecurityCheck="true"
EnableFunctionLevelLinking="true"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib odbc32.lib odbccp32.lib ws2_32.lib libxml2.lib zlib.lib freetype.lib CEGUIBase_d.lib CEGUIFalagardWRBase_d.lib CEGUITGAImageCodec_d.lib CEGUITinyXMLParser_d.lib"
OutputFile="$(RootNamespace)_d.exe"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrt"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
SubSystem="2"
ImportLibrary="$(RootNamespace)_d.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="..\..\..\include\"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;;_WINDOWS"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="winmm.lib odbc32.lib odbccp32.lib ws2_32.lib libxml2.lib zlib.lib freetype.lib CEGUIBase.lib CEGUIFalagardWRBase.lib CEGUITGAImageCodec.lib CEGUITinyXMLParser.lib"
OutputFile="$(RootNamespace)_r.exe"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations> </Configurations>
<References> <References>
</References> </References>

View file

@ -57,7 +57,7 @@ void CAsyncTextureManager::CTextureEntry::createCoarseBitmap()
CoarseBitmap= *Texture; CoarseBitmap= *Texture;
// remove all mipmaps, and convert to DXTC1 (if possible, ie if was DXTC5 or DXTC3 as example) // remove all mipmaps, and convert to DXTC1 (if possible, ie if was DXTC5 or DXTC3 as example)
CoarseBitmap.releaseMipMaps(); CoarseBitmap.releaseMipMaps();
// TODODO: consersion to DXTC1 // TODODO: conversion to DXTC1
CoarseBitmap.convertToType(CBitmap::DXTC1); CoarseBitmap.convertToType(CBitmap::DXTC1);
} }

View file

@ -17,12 +17,11 @@
#include "std3d.h" #include "std3d.h"
#include "nel/3d/bezier_patch.h" #include "nel/3d/bezier_patch.h"
using namespace NLMISC; using namespace NLMISC;
namespace NL3D { namespace NL3D {
// *************************************************************************** // ***************************************************************************
void CBezierPatch::make(CVector vertices[4], CVector normals[4]) void CBezierPatch::make(CVector vertices[4], CVector normals[4])
{ {
@ -48,6 +47,7 @@ void CBezierPatch::make(CVector vertices[4], CVector normals[4])
makeInteriors(); makeInteriors();
} }
// *************************************************************************** // ***************************************************************************
void CBezierPatch::makeInteriors() void CBezierPatch::makeInteriors()
{ {
@ -60,6 +60,7 @@ void CBezierPatch::makeInteriors()
Interiors[2] = Tangents[3] + Tangents[4] - c; Interiors[2] = Tangents[3] + Tangents[4] - c;
Interiors[3] = Tangents[5] + Tangents[6] - d; Interiors[3] = Tangents[5] + Tangents[6] - d;
} }
// *************************************************************************** // ***************************************************************************
void CBezierPatch::applyMatrix(const CMatrix &m) void CBezierPatch::applyMatrix(const CMatrix &m)
{ {
@ -73,7 +74,6 @@ void CBezierPatch::applyMatrix(const CMatrix &m)
Interiors[i]= m*Interiors[i]; Interiors[i]= m*Interiors[i];
} }
// *************************************************************************** // ***************************************************************************
static inline void mulAdd(CVector &tgt, const CVector &src, float f) static inline void mulAdd(CVector &tgt, const CVector &src, float f)
{ {
@ -82,7 +82,6 @@ static inline void mulAdd(CVector &tgt, const CVector &src, float f)
tgt.z+= src.z*f; tgt.z+= src.z*f;
} }
// *************************************************************************** // ***************************************************************************
static inline void mulAddD(CVectorD &tgt, const CVector &src, double f) static inline void mulAddD(CVectorD &tgt, const CVector &src, double f)
{ {
@ -91,7 +90,6 @@ static inline void mulAddD(CVectorD &tgt, const CVector &src, double f)
tgt.z+= src.z*f; tgt.z+= src.z*f;
} }
// *************************************************************************** // ***************************************************************************
CVector CBezierPatch::eval(float ps, float pt) const CVector CBezierPatch::eval(float ps, float pt) const
{ {
@ -132,6 +130,7 @@ CVector CBezierPatch::eval(float ps, float pt) const
return p; return p;
} }
// *************************************************************************** // ***************************************************************************
CVectorD CBezierPatch::evalDouble(double ps, double pt) const CVectorD CBezierPatch::evalDouble(double ps, double pt) const
{ {
@ -173,7 +172,6 @@ CVectorD CBezierPatch::evalDouble(double ps, double pt) const
return p; return p;
} }
// *************************************************************************** // ***************************************************************************
CVector CBezierPatch::evalNormal(float ps, float pt) const CVector CBezierPatch::evalNormal(float ps, float pt) const
{ {
@ -250,14 +248,12 @@ CVector CBezierPatch::evalNormal(float ps, float pt) const
mulAdd(tgtT, Tangents[3] , s2 * t3); mulAdd(tgtT, Tangents[3] , s2 * t3);
mulAdd(tgtT, Vertices[2] , s3 * t3); mulAdd(tgtT, Vertices[2] , s3 * t3);
// Return the normal. // Return the normal.
CVector norm= tgtT^tgtS; CVector norm= tgtT^tgtS;
norm.normalize(); norm.normalize();
return norm; return norm;
} }
// *************************************************************************** // ***************************************************************************
CVector CBezierPatch::evalTangentS(float ps, float pt) const CVector CBezierPatch::evalTangentS(float ps, float pt) const
{ {
@ -307,7 +303,6 @@ CVector CBezierPatch::evalTangentS(float ps, float pt) const
return tgtS.normed(); return tgtS.normed();
} }
// *************************************************************************** // ***************************************************************************
CVector CBezierPatch::evalTangentT(float ps, float pt) const CVector CBezierPatch::evalTangentT(float ps, float pt) const
{ {
@ -357,7 +352,6 @@ CVector CBezierPatch::evalTangentT(float ps, float pt) const
return tgtT.normed(); return tgtT.normed();
} }
// *************************************************************************** // ***************************************************************************
void CBezierPatch::CBezierCurve::subdivide(CBezierCurve &left, CBezierCurve &right, float t) void CBezierPatch::CBezierCurve::subdivide(CBezierCurve &left, CBezierCurve &right, float t)
{ {
@ -377,7 +371,6 @@ void CBezierPatch::CBezierCurve::subdivide(CBezierCurve &left, CBezierCurve &ri
left.P3= right.P0= t1*left.P2 + t*right.P1; left.P3= right.P0= t1*left.P2 + t*right.P1;
} }
// *************************************************************************** // ***************************************************************************
void CBezierPatch::subdivideS(CBezierPatch &left, CBezierPatch &right, float s) const void CBezierPatch::subdivideS(CBezierPatch &left, CBezierPatch &right, float s) const
{ {
@ -408,7 +401,6 @@ void CBezierPatch::subdivideS(CBezierPatch &left, CBezierPatch &right, float s)
curveTRight[3].get(right.Vertices[1], right.Tangents[2] , right.Tangents[3] , right.Vertices[2]); curveTRight[3].get(right.Vertices[1], right.Tangents[2] , right.Tangents[3] , right.Vertices[2]);
} }
// *************************************************************************** // ***************************************************************************
void CBezierPatch::subdivideT(CBezierPatch &top, CBezierPatch &bottom, float t) const void CBezierPatch::subdivideT(CBezierPatch &top, CBezierPatch &bottom, float t) const
{ {
@ -439,6 +431,4 @@ void CBezierPatch::subdivideT(CBezierPatch &top, CBezierPatch &bottom, float t)
curveSBottom[3].get(bottom.Vertices[3], bottom.Tangents[5] , bottom.Tangents[4] , bottom.Vertices[2]); curveSBottom[3].get(bottom.Vertices[3], bottom.Tangents[5] , bottom.Tangents[4] , bottom.Vertices[2]);
} }
} // NL3D } // NL3D

View file

@ -264,7 +264,6 @@ static Bool WndProc(Display *d, XEvent *e, char *arg)
*/ */
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] = GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] =
{ {
GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB, GL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB,
@ -279,9 +278,9 @@ GLenum CDriverGL::NLCubeFaceToGLCubeFace[6] =
CDriverGL::CDriverGL() CDriverGL::CDriverGL()
{ {
H_AUTO_OGL(CDriverGL_CDriverGL) H_AUTO_OGL(CDriverGL_CDriverGL)
_OffScreen = false;
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
_PBuffer = NULL; _PBuffer = NULL;
_hWnd = NULL; _hWnd = NULL;
_hRC = NULL; _hRC = NULL;
@ -290,10 +289,13 @@ CDriverGL::CDriverGL()
_Interval = 1; _Interval = 1;
#elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE) #elif defined(NL_OS_MAC) && defined(NL_MAC_NATIVE)
NL3D::MAC::ctor(); NL3D::MAC::ctor();
#elif defined (NL_OS_UNIX) #elif defined (NL_OS_UNIX)
cursor = None; cursor = None;
win = 0;
dpy = 0;
# ifdef XF86VIDMODE # ifdef XF86VIDMODE
// zero the old screen mode // zero the old screen mode
@ -302,7 +304,8 @@ CDriverGL::CDriverGL()
# endif //XF86VIDMODE # endif //XF86VIDMODE
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
_FullScreen= false; _OffScreen = false;
_FullScreen = false;
_CurrentMaterial=NULL; _CurrentMaterial=NULL;
_Initialized = false; _Initialized = false;
@ -347,7 +350,6 @@ CDriverGL::CDriverGL()
_NVTextureShaderEnabled = false; _NVTextureShaderEnabled = false;
// Compute the Flag which say if one texture has been changed in CMaterial. // Compute the Flag which say if one texture has been changed in CMaterial.
_MaterialAllTextureTouchedFlag= 0; _MaterialAllTextureTouchedFlag= 0;
for(i=0; i < IDRV_MAT_MAXTEXTURES; i++) for(i=0; i < IDRV_MAT_MAXTEXTURES; i++)
@ -356,7 +358,6 @@ CDriverGL::CDriverGL()
_CurrentTexAddrMode[i] = GL_NONE; _CurrentTexAddrMode[i] = GL_NONE;
} }
_UserTexMatEnabled = 0; _UserTexMatEnabled = 0;
// Ligtmap preca. // Ligtmap preca.
@ -415,7 +416,6 @@ CDriverGL::CDriverGL()
_TextureTargetUpload = false; _TextureTargetUpload = false;
} }
// *************************************************************************** // ***************************************************************************
CDriverGL::~CDriverGL() CDriverGL::~CDriverGL()
{ {
@ -502,21 +502,18 @@ bool CDriverGL::stretchRect(ITexture * /* srcText */, NLMISC::CRect &/* srcRect
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::supportBloomEffect() const bool CDriverGL::supportBloomEffect() const
{ {
return (isVertexProgramSupported() && supportFrameBufferObject() && supportPackedDepthStencil() && supportTextureRectangle()); return (isVertexProgramSupported() && supportFrameBufferObject() && supportPackedDepthStencil() && supportTextureRectangle());
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::supportNonPowerOfTwoTextures() const bool CDriverGL::supportNonPowerOfTwoTextures() const
{ {
return _Extensions.ARBTextureNonPowerOfTwo; return _Extensions.ARBTextureNonPowerOfTwo;
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::isTextureRectangle(ITexture * tex) const bool CDriverGL::isTextureRectangle(ITexture * tex) const
{ {
return (supportTextureRectangle() && tex->isBloomTexture() && tex->mipMapOff() return (supportTextureRectangle() && tex->isBloomTexture() && tex->mipMapOff()
@ -524,7 +521,6 @@ bool CDriverGL::isTextureRectangle(ITexture * tex) const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::activeFrameBufferObject(ITexture * tex) bool CDriverGL::activeFrameBufferObject(ITexture * tex)
{ {
if(supportFrameBufferObject()/* && supportPackedDepthStencil()*/) if(supportFrameBufferObject()/* && supportPackedDepthStencil()*/)
@ -545,7 +541,6 @@ bool CDriverGL::activeFrameBufferObject(ITexture * tex)
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::disableHardwareVertexProgram() void CDriverGL::disableHardwareVertexProgram()
{ {
H_AUTO_OGL(CDriverGL_disableHardwareVertexProgram) H_AUTO_OGL(CDriverGL_disableHardwareVertexProgram)
@ -565,7 +560,6 @@ void CDriverGL::disableHardwareTextureShader()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable) throw(EBadDisplay) bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool resizeable) throw(EBadDisplay)
{ {
H_AUTO_OGL(CDriverGL_setDisplay) H_AUTO_OGL(CDriverGL_setDisplay)
@ -677,8 +671,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
return false; return false;
} }
// Make the context current // Make the context current
if (!wglMakeCurrent(tempHDC,tempGLRC)) if (!wglMakeCurrent(tempHDC,tempGLRC))
{ {
@ -1051,11 +1043,12 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
{ {
GLX_RGBA, GLX_RGBA,
GLX_DOUBLEBUFFER, GLX_DOUBLEBUFFER,
//GLX_BUFFER_SIZE, 16,
GLX_DEPTH_SIZE, 16, GLX_DEPTH_SIZE, 16,
GLX_RED_SIZE, 4, GLX_RED_SIZE, 4,
GLX_GREEN_SIZE, 4, GLX_GREEN_SIZE, 4,
GLX_BLUE_SIZE, 4, GLX_BLUE_SIZE, 4,
GLX_ALPHA_SIZE, 4,
GLX_STENCIL_SIZE, 8,
None None
}; };
@ -1063,31 +1056,17 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
{ {
GLX_RGBA, GLX_RGBA,
GLX_DOUBLEBUFFER, GLX_DOUBLEBUFFER,
//GLX_BUFFER_SIZE, 16,
GLX_DEPTH_SIZE, 24, GLX_DEPTH_SIZE, 24,
GLX_RED_SIZE, 8, GLX_RED_SIZE, 8,
GLX_GREEN_SIZE, 8, GLX_GREEN_SIZE, 8,
GLX_BLUE_SIZE, 8, GLX_BLUE_SIZE, 8,
None
};
static int sAttribList32bpp[] =
{
GLX_RGBA,
GLX_DOUBLEBUFFER,
//GLX_BUFFER_SIZE, 32,
GLX_DEPTH_SIZE, 32,
GLX_RED_SIZE, 8,
GLX_GREEN_SIZE, 8,
GLX_BLUE_SIZE, 8,
GLX_ALPHA_SIZE, 8, GLX_ALPHA_SIZE, 8,
GLX_STENCIL_SIZE, 8,
None None
}; };
// first try 32bpp and if that fails 24bpp or 16bpp // first try 24bpp and if that fails 16bpp
XVisualInfo *visual_info = glXChooseVisual (dpy, DefaultScreen(dpy), sAttribList32bpp); XVisualInfo *visual_info = glXChooseVisual (dpy, DefaultScreen(dpy), sAttribList24bpp);
if (visual_info == NULL)
visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList24bpp);
if (visual_info == NULL) if (visual_info == NULL)
visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList16bpp); visual_info = glXChooseVisual(dpy, DefaultScreen(dpy), sAttribList16bpp);
if(visual_info == NULL) if(visual_info == NULL)
@ -1203,7 +1182,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
nlwarning("Missing Important GL extension: GL_EXT_texture_env_combine => All envcombine are setup to GL_MODULATE!!!"); nlwarning("Missing Important GL extension: GL_EXT_texture_env_combine => All envcombine are setup to GL_MODULATE!!!");
} }
// Get num of light for this driver // Get num of light for this driver
int numLight; int numLight;
glGetIntegerv (GL_MAX_LIGHTS, &numLight); glGetIntegerv (GL_MAX_LIGHTS, &numLight);
@ -1219,7 +1197,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
// init _DriverGLStates // init _DriverGLStates
_DriverGLStates.init(_Extensions.ARBTextureCubeMap, (_Extensions.NVTextureRectangle || _Extensions.EXTTextureRectangle || _Extensions.ARBTextureRectangle), _MaxDriverLight); _DriverGLStates.init(_Extensions.ARBTextureCubeMap, (_Extensions.NVTextureRectangle || _Extensions.EXTTextureRectangle || _Extensions.ARBTextureRectangle), _MaxDriverLight);
// Init OpenGL/Driver defaults. // Init OpenGL/Driver defaults.
//============================= //=============================
glViewport(0,0,width,height); glViewport(0,0,width,height);
@ -1261,7 +1238,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
_VertexProgramEnabled= false; _VertexProgramEnabled= false;
_LastSetupGLArrayVertexProgram= false; _LastSetupGLArrayVertexProgram= false;
// Init VertexArrayRange according to supported extenstion. // Init VertexArrayRange according to supported extenstion.
_SupportVBHard= false; _SupportVBHard= false;
_SlowUnlockVBHard= false; _SlowUnlockVBHard= false;
@ -1310,7 +1286,8 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
_CurrentVertexBufferHard= NULL; _CurrentVertexBufferHard= NULL;
_NVCurrentVARPtr= NULL; _NVCurrentVARPtr= NULL;
_NVCurrentVARSize= 0; _NVCurrentVARSize= 0;
if(_SupportVBHard)
if (_SupportVBHard)
{ {
// try to allocate 16Mo by default of AGP Ram. // try to allocate 16Mo by default of AGP Ram.
initVertexBufferHard(NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, 0); initVertexBufferHard(NL3D_DRV_VERTEXARRAY_AGP_INIT_SIZE, 0);
@ -1342,8 +1319,6 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
//=========================================================== //===========================================================
initFragmentShaders(); initFragmentShaders();
// Activate the default texture environnments for all stages. // Activate the default texture environnments for all stages.
//=========================================================== //===========================================================
for(uint stage=0;stage<inlGetNumTextStages(); stage++) for(uint stage=0;stage<inlGetNumTextStages(); stage++)
@ -1378,8 +1353,8 @@ bool CDriverGL::setDisplay(nlWindow wnd, const GfxMode &mode, bool show, bool re
glTexGenfv(GL_Q, GL_OBJECT_PLANE, params); glTexGenfv(GL_Q, GL_OBJECT_PLANE, params);
glTexGenfv(GL_Q, GL_EYE_PLANE, params); glTexGenfv(GL_Q, GL_EYE_PLANE, params);
} }
resetTextureShaders();
resetTextureShaders();
_PPLExponent = 1.f; _PPLExponent = 1.f;
_PPLightDiffuseColor = NLMISC::CRGBA::White; _PPLightDiffuseColor = NLMISC::CRGBA::White;
@ -1852,30 +1827,26 @@ void CDriverGL::resetTextureShaders()
{ {
glEnable(GL_TEXTURE_SHADER_NV); glEnable(GL_TEXTURE_SHADER_NV);
for (uint stage = 0; stage < inlGetNumTextStages(); ++stage) for (uint stage = 0; stage < inlGetNumTextStages(); ++stage)
{ {
_DriverGLStates.activeTextureARB(stage); _DriverGLStates.activeTextureARB(stage);
if (stage != 0) if (stage != 0)
{ {
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + stage - 1); glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + stage - 1);
} }
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
_CurrentTexAddrMode[stage] = GL_NONE; _CurrentTexAddrMode[stage] = GL_NONE;
} }
glDisable(GL_TEXTURE_SHADER_NV);
glDisable(GL_TEXTURE_SHADER_NV);
_NVTextureShaderEnabled = false; _NVTextureShaderEnabled = false;
} }
} }
// -------------------------------------------------- // --------------------------------------------------
emptyProc CDriverGL::getWindowProc() emptyProc CDriverGL::getWindowProc()
{ {
H_AUTO_OGL(CDriverGL_getWindowProc) H_AUTO_OGL(CDriverGL_getWindowProc)
@ -1887,7 +1858,6 @@ emptyProc CDriverGL::getWindowProc()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::activate() bool CDriverGL::activate()
{ {
H_AUTO_OGL(CDriverGL_activate) H_AUTO_OGL(CDriverGL_activate)
@ -1916,7 +1886,6 @@ bool CDriverGL::activate()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::isTextureExist(const ITexture&tex) bool CDriverGL::isTextureExist(const ITexture&tex)
{ {
H_AUTO_OGL(CDriverGL_isTextureExist) H_AUTO_OGL(CDriverGL_isTextureExist)
@ -1935,7 +1904,6 @@ bool CDriverGL::isTextureExist(const ITexture&tex)
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::clear2D(CRGBA rgba) bool CDriverGL::clear2D(CRGBA rgba)
{ {
H_AUTO_OGL(CDriverGL_clear2D) H_AUTO_OGL(CDriverGL_clear2D)
@ -1947,7 +1915,6 @@ bool CDriverGL::clear2D(CRGBA rgba)
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::clearZBuffer(float zval) bool CDriverGL::clearZBuffer(float zval)
{ {
H_AUTO_OGL(CDriverGL_clearZBuffer) H_AUTO_OGL(CDriverGL_clearZBuffer)
@ -1960,7 +1927,6 @@ bool CDriverGL::clearZBuffer(float zval)
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::clearStencilBuffer(float stencilval) bool CDriverGL::clearStencilBuffer(float stencilval)
{ {
H_AUTO_OGL(CDriverGL_clearStencilBuffer) H_AUTO_OGL(CDriverGL_clearStencilBuffer)
@ -1972,7 +1938,6 @@ bool CDriverGL::clearStencilBuffer(float stencilval)
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha) void CDriverGL::setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha)
{ {
H_AUTO_OGL(CDriverGL_setColorMask ) H_AUTO_OGL(CDriverGL_setColorMask )
@ -1983,6 +1948,7 @@ void CDriverGL::setColorMask (bool bRed, bool bGreen, bool bBlue, bool bAlpha)
bool CDriverGL::swapBuffers() bool CDriverGL::swapBuffers()
{ {
H_AUTO_OGL(CDriverGL_swapBuffers) H_AUTO_OGL(CDriverGL_swapBuffers)
++ _SwapBufferCounter; ++ _SwapBufferCounter;
// Reset texture shaders // Reset texture shaders
//resetTextureShaders(); //resetTextureShaders();
@ -2128,7 +2094,6 @@ bool CDriverGL::swapBuffers()
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::release() bool CDriverGL::release()
{ {
H_AUTO_OGL(CDriverGL_release) H_AUTO_OGL(CDriverGL_release)
@ -2249,8 +2214,7 @@ bool CDriverGL::release()
} }
// -------------------------------------------------- // --------------------------------------------------
IDriver::TMessageBoxId CDriverGL::systemMessageBox (const char* message, const char* title, IDriver::TMessageBoxType type, TMessageBoxIcon icon)
IDriver::TMessageBoxId CDriverGL::systemMessageBox (const char* message, const char* title, IDriver::TMessageBoxType type, TMessageBoxIcon icon)
{ {
H_AUTO_OGL(CDriverGL_systemMessageBox) H_AUTO_OGL(CDriverGL_systemMessageBox)
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -2293,7 +2257,6 @@ IDriver::TMessageBoxId CDriverGL::systemMessageBox (const char* message, const c
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setupViewport (const class CViewport& viewport) void CDriverGL::setupViewport (const class CViewport& viewport)
{ {
H_AUTO_OGL(CDriverGL_setupViewport ) H_AUTO_OGL(CDriverGL_setupViewport )
@ -2356,9 +2319,6 @@ void CDriverGL::setupViewport (const class CViewport& viewport)
int iheight=(int)((float)clientHeight*height+0.5f); int iheight=(int)((float)clientHeight*height+0.5f);
clamp (iheight, 0, clientHeight-iy); clamp (iheight, 0, clientHeight-iy);
glViewport (ix, iy, iwidth, iheight); glViewport (ix, iy, iwidth, iheight);
} }
// -------------------------------------------------- // --------------------------------------------------
@ -2368,10 +2328,8 @@ void CDriverGL::getViewport(CViewport &viewport)
viewport = _CurrViewport; viewport = _CurrViewport;
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setupScissor (const class CScissor& scissor) void CDriverGL::setupScissor (const class CScissor& scissor)
{ {
H_AUTO_OGL(CDriverGL_setupScissor ) H_AUTO_OGL(CDriverGL_setupScissor )
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -2456,10 +2414,7 @@ void CDriverGL::setupScissor (const class CScissor& scissor)
} }
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::showCursor(bool b) void CDriverGL::showCursor(bool b)
{ {
H_AUTO_OGL(CDriverGL_showCursor) H_AUTO_OGL(CDriverGL_showCursor)
@ -2508,7 +2463,6 @@ void CDriverGL::showCursor(bool b)
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setMousePos(float x, float y) void CDriverGL::setMousePos(float x, float y)
{ {
H_AUTO_OGL(CDriverGL_setMousePos) H_AUTO_OGL(CDriverGL_setMousePos)
@ -2598,10 +2552,7 @@ void CDriverGL::getWindowPos(uint32 &x, uint32 &y)
#endif // NL_OS_UNIX #endif // NL_OS_UNIX
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::isActive() bool CDriverGL::isActive()
{ {
H_AUTO_OGL(CDriverGL_isActive) H_AUTO_OGL(CDriverGL_isActive)
@ -2634,13 +2585,10 @@ const char *CDriverGL::getVideocardInformation ()
const char *renderer = (const char *) glGetString (GL_RENDERER); const char *renderer = (const char *) glGetString (GL_RENDERER);
const char *version = (const char *) glGetString (GL_VERSION); const char *version = (const char *) glGetString (GL_VERSION);
smprintf(name, 1024, "OpenGL / %s / %s / %s", vendor, renderer, version); smprintf(name, 1024, "OpenGL / %s / %s / %s", vendor, renderer, version);
return name; return name;
} }
void CDriverGL::setCapture (bool b) void CDriverGL::setCapture (bool b)
{ {
H_AUTO_OGL(CDriverGL_setCapture ) H_AUTO_OGL(CDriverGL_setCapture )
@ -2716,8 +2664,6 @@ bool CDriverGL::clipRect(NLMISC::CRect &rect)
return rect.Width>0 && rect.Height>0; return rect.Width>0 && rect.Height>0;
} }
void CDriverGL::getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect) void CDriverGL::getBufferPart (CBitmap &bitmap, NLMISC::CRect &rect)
{ {
H_AUTO_OGL(CDriverGL_getBufferPart ) H_AUTO_OGL(CDriverGL_getBufferPart )
@ -2776,9 +2722,6 @@ bool CDriverGL::fillBuffer (CBitmap &bitmap)
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::copyFrameBufferToTexture(ITexture *tex, void CDriverGL::copyFrameBufferToTexture(ITexture *tex,
uint32 level, uint32 level,
uint32 offsetx, uint32 offsetx,
@ -2824,7 +2767,7 @@ void CDriverGL::copyFrameBufferToTexture(ITexture *tex,
// gltext->activeFrameBufferObject(tex); // gltext->activeFrameBufferObject(tex);
} }
// ***************************************************************************
void CDriverGL::setPolygonMode (TPolygonMode mode) void CDriverGL::setPolygonMode (TPolygonMode mode)
{ {
H_AUTO_OGL(CDriverGL_setPolygonMode ) H_AUTO_OGL(CDriverGL_setPolygonMode )
@ -2845,21 +2788,23 @@ void CDriverGL::setPolygonMode (TPolygonMode mode)
} }
} }
// ***************************************************************************
bool CDriverGL::fogEnabled() bool CDriverGL::fogEnabled()
{ {
H_AUTO_OGL(CDriverGL_fogEnabled) H_AUTO_OGL(CDriverGL_fogEnabled)
return _FogEnabled; return _FogEnabled;
} }
void CDriverGL::enableFog(bool enable) // ***************************************************************************
void CDriverGL::enableFog(bool enable)
{ {
H_AUTO_OGL(CDriverGL_enableFog) H_AUTO_OGL(CDriverGL_enableFog)
_DriverGLStates.enableFog(enable); _DriverGLStates.enableFog(enable);
_FogEnabled= enable; _FogEnabled= enable;
} }
void CDriverGL::setupFog(float start, float end, CRGBA color) // ***************************************************************************
void CDriverGL::setupFog(float start, float end, CRGBA color)
{ {
H_AUTO_OGL(CDriverGL_setupFog) H_AUTO_OGL(CDriverGL_setupFog)
glFogf(GL_FOG_MODE, GL_LINEAR); glFogf(GL_FOG_MODE, GL_LINEAR);
@ -2894,23 +2839,22 @@ void CDriverGL::setupFog(float start, float end, CRGBA color)
_FogEnd = end; _FogEnd = end;
} }
// *************************************************************************** // ***************************************************************************
float CDriverGL::getFogStart() const float CDriverGL::getFogStart() const
{ {
H_AUTO_OGL(CDriverGL_getFogStart) H_AUTO_OGL(CDriverGL_getFogStart)
return _FogStart; return _FogStart;
} }
// *************************************************************************** // ***************************************************************************
float CDriverGL::getFogEnd() const float CDriverGL::getFogEnd() const
{ {
H_AUTO_OGL(CDriverGL_getFogEnd) H_AUTO_OGL(CDriverGL_getFogEnd)
return _FogEnd; return _FogEnd;
} }
// *************************************************************************** // ***************************************************************************
CRGBA CDriverGL::getFogColor() const CRGBA CDriverGL::getFogColor() const
{ {
H_AUTO_OGL(CDriverGL_getFogColor) H_AUTO_OGL(CDriverGL_getFogColor)
CRGBA ret; CRGBA ret;
@ -3094,7 +3038,7 @@ bool CDriverGL::supportPerPixelLighting(bool specular) const
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::setPerPixelLightingLight(CRGBA diffuse, CRGBA specular, float shininess) void CDriverGL::setPerPixelLightingLight(CRGBA diffuse, CRGBA specular, float shininess)
{ {
H_AUTO_OGL(CDriverGL_setPerPixelLightingLight) H_AUTO_OGL(CDriverGL_setPerPixelLightingLight)
@ -3104,7 +3048,7 @@ void CDriverGL::setPerPixelLightingLight(CRGBA diffuse, CRGBA specular, float sh
} }
// *************************************************************************** // ***************************************************************************
NLMISC::IMouseDevice *CDriverGL::enableLowLevelMouse(bool enable, bool exclusive) NLMISC::IMouseDevice* CDriverGL::enableLowLevelMouse(bool enable, bool exclusive)
{ {
H_AUTO_OGL(CDriverGL_enableLowLevelMouse) H_AUTO_OGL(CDriverGL_enableLowLevelMouse)
@ -3139,7 +3083,7 @@ NLMISC::IMouseDevice *CDriverGL::enableLowLevelMouse(bool enable, bool exclusive
} }
// *************************************************************************** // ***************************************************************************
NLMISC::IKeyboardDevice *CDriverGL::enableLowLevelKeyboard(bool enable) NLMISC::IKeyboardDevice* CDriverGL::enableLowLevelKeyboard(bool enable)
{ {
H_AUTO_OGL(CDriverGL_enableLowLevelKeyboard) H_AUTO_OGL(CDriverGL_enableLowLevelKeyboard)
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -3173,7 +3117,7 @@ NLMISC::IKeyboardDevice *CDriverGL::enableLowLevelKeyboard(bool enable)
} }
// *************************************************************************** // ***************************************************************************
NLMISC::IInputDeviceManager *CDriverGL::getLowLevelInputDeviceManager() NLMISC::IInputDeviceManager* CDriverGL::getLowLevelInputDeviceManager()
{ {
H_AUTO_OGL(CDriverGL_getLowLevelInputDeviceManager) H_AUTO_OGL(CDriverGL_getLowLevelInputDeviceManager)
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
@ -3229,14 +3173,14 @@ uint CDriverGL::getDoubleClickDelay(bool hardwareMouse)
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::supportBlendConstantColor() const bool CDriverGL::supportBlendConstantColor() const
{ {
H_AUTO_OGL(CDriverGL_supportBlendConstantColor) H_AUTO_OGL(CDriverGL_supportBlendConstantColor)
return _Extensions.EXTBlendColor; return _Extensions.EXTBlendColor;
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::setBlendConstantColor(NLMISC::CRGBA col) void CDriverGL::setBlendConstantColor(NLMISC::CRGBA col)
{ {
H_AUTO_OGL(CDriverGL_setBlendConstantColor) H_AUTO_OGL(CDriverGL_setBlendConstantColor)
@ -3251,7 +3195,7 @@ void CDriverGL::setBlendConstantColor(NLMISC::CRGBA col)
} }
// *************************************************************************** // ***************************************************************************
NLMISC::CRGBA CDriverGL::getBlendConstantColor() const NLMISC::CRGBA CDriverGL::getBlendConstantColor() const
{ {
H_AUTO_OGL(CDriverGL_CDriverGL) H_AUTO_OGL(CDriverGL_CDriverGL)
@ -3265,7 +3209,6 @@ uint CDriverGL::getNbTextureStages() const
return inlGetNumTextStages(); return inlGetNumTextStages();
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::refreshProjMatrixFromGL() void CDriverGL::refreshProjMatrixFromGL()
{ {
@ -3279,7 +3222,7 @@ void CDriverGL::refreshProjMatrixFromGL()
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::setMonitorColorProperties (const CMonitorColorProperties &properties) bool CDriverGL::setMonitorColorProperties (const CMonitorColorProperties &properties)
{ {
H_AUTO_OGL(CDriverGL_setMonitorColorProperties ) H_AUTO_OGL(CDriverGL_setMonitorColorProperties )
@ -3432,9 +3375,6 @@ void CDriverGL::initEMBM()
} }
} }
// *************************************************************************** // ***************************************************************************
/** Water fragment program with extension ARB_fragment_program /** Water fragment program with extension ARB_fragment_program
*/ */
@ -3496,8 +3436,6 @@ MAD_SAT tmpFog, fogValue.x, fogFactor.x, fogFactor.y; \n\
LRP oCol, tmpFog.x, envMap, fogColor; \n\ LRP oCol, tmpFog.x, envMap, fogColor; \n\
END "; END ";
// ************************************************************************************** // **************************************************************************************
/** Water fragment program with extension ARB_fragment_program and a diffuse map applied /** Water fragment program with extension ARB_fragment_program and a diffuse map applied
*/ */
@ -3569,7 +3507,6 @@ MUL diffuse, diffuse, envMap; \n\
LRP oCol, tmpFog.x, diffuse, fogColor; \n\ LRP oCol, tmpFog.x, diffuse, fogColor; \n\
END "; END ";
// *************************************************************************** // ***************************************************************************
/** Load a ARB_fragment_program_code, and ensure it is loaded natively /** Load a ARB_fragment_program_code, and ensure it is loaded natively
*/ */
@ -3608,7 +3545,6 @@ uint loadARBFragmentProgramStringNative(const char *prog, bool forceNativeProgra
return 0; return 0;
} }
// *************************************************************************** // ***************************************************************************
/** R200 Fragment Shader : /** R200 Fragment Shader :
* Send fragment shader to fetch a perturbed envmap from the addition of 2 bumpmap * Send fragment shader to fetch a perturbed envmap from the addition of 2 bumpmap
@ -3640,6 +3576,7 @@ void CDriverGL::forceNativeFragmentPrograms(bool nativeOnly)
_ForceNativeFragmentPrograms = nativeOnly; _ForceNativeFragmentPrograms = nativeOnly;
} }
// ***************************************************************************
void CDriverGL::initFragmentShaders() void CDriverGL::initFragmentShaders()
{ {
H_AUTO_OGL(CDriverGL_initFragmentShaders) H_AUTO_OGL(CDriverGL_initFragmentShaders)
@ -3794,7 +3731,6 @@ void CDriverGL::deleteFragmentShaders()
} }
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::finish() void CDriverGL::finish()
{ {
@ -4108,7 +4044,6 @@ void CDriverGL::retrieveATIDriverVersion()
#endif #endif
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::supportMADOperator() const bool CDriverGL::supportMADOperator() const
{ {
@ -4117,7 +4052,6 @@ bool CDriverGL::supportMADOperator() const
return _Extensions.NVTextureEnvCombine4 || _Extensions.ATITextureEnvCombine3; return _Extensions.NVTextureEnvCombine4 || _Extensions.ATITextureEnvCombine3;
} }
// *************************************************************************** // ***************************************************************************
uint CDriverGL::getNumAdapter() const uint CDriverGL::getNumAdapter() const
{ {
@ -4127,7 +4061,6 @@ uint CDriverGL::getNumAdapter() const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::getAdapter(uint adapter, CAdapter &desc) const bool CDriverGL::getAdapter(uint adapter, CAdapter &desc) const
{ {
H_AUTO_OGL(CDriverGL_getAdapter) H_AUTO_OGL(CDriverGL_getAdapter)
@ -4150,7 +4083,6 @@ bool CDriverGL::getAdapter(uint adapter, CAdapter &desc) const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::setAdapter(uint adapter) bool CDriverGL::setAdapter(uint adapter)
{ {
H_AUTO_OGL(CDriverGL_setAdapter) H_AUTO_OGL(CDriverGL_setAdapter)
@ -4159,7 +4091,6 @@ bool CDriverGL::setAdapter(uint adapter)
} }
// *************************************************************************** // ***************************************************************************
CVertexBuffer::TVertexColorType CDriverGL::getVertexColorFormat() const CVertexBuffer::TVertexColorType CDriverGL::getVertexColorFormat() const
{ {
H_AUTO_OGL(CDriverGL_CDriverGL) H_AUTO_OGL(CDriverGL_CDriverGL)
@ -4168,7 +4099,6 @@ CVertexBuffer::TVertexColorType CDriverGL::getVertexColorFormat() const
} }
// *************************************************************************** // ***************************************************************************
bool CDriverGL::activeShader(CShader * /* shd */) bool CDriverGL::activeShader(CShader * /* shd */)
{ {
H_AUTO_OGL(CDriverGL_activeShader) H_AUTO_OGL(CDriverGL_activeShader)
@ -4177,21 +4107,18 @@ bool CDriverGL::activeShader(CShader * /* shd */)
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::startBench (bool wantStandardDeviation, bool quick, bool reset) void CDriverGL::startBench (bool wantStandardDeviation, bool quick, bool reset)
{ {
CHTimer::startBench (wantStandardDeviation, quick, reset); CHTimer::startBench (wantStandardDeviation, quick, reset);
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::endBench () void CDriverGL::endBench ()
{ {
CHTimer::endBench (); CHTimer::endBench ();
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::displayBench (class NLMISC::CLog *log) void CDriverGL::displayBench (class NLMISC::CLog *log)
{ {
// diplay // diplay
@ -4373,7 +4300,6 @@ uint COcclusionQueryGL::getVisibleCount()
return VisibleCount; return VisibleCount;
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::setDepthRange(float znear, float zfar) void CDriverGL::setDepthRange(float znear, float zfar)
{ {
@ -4479,12 +4405,10 @@ void CDriverGL::stencilOp(TStencilOp fail, TStencilOp zfail, TStencilOp zpass)
default: nlstop; default: nlstop;
} }
_DriverGLStates.stencilOp(glFail, glZFail, glZPass); _DriverGLStates.stencilOp(glFail, glZFail, glZPass);
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::stencilMask(uint mask) void CDriverGL::stencilMask(uint mask)
{ {
H_AUTO_OGL(CDriverGL_CDriverGL) H_AUTO_OGL(CDriverGL_CDriverGL)
@ -4511,6 +4435,7 @@ void CDriverGL::endDialogMode()
} // NL3D } // NL3D
// ***************************************************************************
void displayGLError(GLenum error) void displayGLError(GLenum error)
{ {
switch(error) switch(error)

View file

@ -427,6 +427,10 @@
RelativePath="driver_opengl_light.cpp" RelativePath="driver_opengl_light.cpp"
> >
</File> </File>
<File
RelativePath=".\driver_opengl_mac.cpp"
>
</File>
<File <File
RelativePath="driver_opengl_material.cpp" RelativePath="driver_opengl_material.cpp"
> >

View file

@ -21,8 +21,6 @@
#include "nel/3d/texture_bump.h" #include "nel/3d/texture_bump.h"
#include "nel/3d/material.h" #include "nel/3d/material.h"
namespace NL3D { namespace NL3D {
static void convBlend(CMaterial::TBlend blend, GLenum& glenum) static void convBlend(CMaterial::TBlend blend, GLenum& glenum)
@ -86,7 +84,6 @@ static inline void convTexAddr(ITexture *tex, CMaterial::TTexAddressingMode mode
GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, GL_DOT_PRODUCT_DEPTH_REPLACE_NV GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV, GL_DOT_PRODUCT_DEPTH_REPLACE_NV
}; };
static const GLenum glTexCubeAddrModesNV[] = static const GLenum glTexCubeAddrModesNV[] =
{ {
GL_NONE, GL_TEXTURE_CUBE_MAP_ARB, GL_PASS_THROUGH_NV, GL_CULL_FRAGMENT_NV, GL_NONE, GL_TEXTURE_CUBE_MAP_ARB, GL_PASS_THROUGH_NV, GL_CULL_FRAGMENT_NV,
@ -107,8 +104,6 @@ static inline void convTexAddr(ITexture *tex, CMaterial::TTexAddressingMode mode
} }
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setTextureEnvFunction(uint stage, CMaterial& mat) void CDriverGL::setTextureEnvFunction(uint stage, CMaterial& mat)
{ {
@ -152,7 +147,6 @@ void CDriverGL::setTextureEnvFunction(uint stage, CMaterial& mat)
} }
} }
//-------------------------------- //--------------------------------
void CDriverGL::setupUserTextureMatrix(uint numStages, CMaterial& mat) void CDriverGL::setupUserTextureMatrix(uint numStages, CMaterial& mat)
{ {
@ -219,7 +213,6 @@ void CDriverGL::disableUserTextureMatrix()
} }
} }
// -------------------------------------------------- // --------------------------------------------------
CMaterial::TShader CDriverGL::getSupportedShader(CMaterial::TShader shader) CMaterial::TShader CDriverGL::getSupportedShader(CMaterial::TShader shader)
{ {
@ -235,9 +228,6 @@ CMaterial::TShader CDriverGL::getSupportedShader(CMaterial::TShader shader)
} }
} }
// -------------------------------------------------- // --------------------------------------------------
void CDriverGL::setTextureShaders(const uint8 *addressingModes, const CSmartPtr<ITexture> *textures) void CDriverGL::setTextureShaders(const uint8 *addressingModes, const CSmartPtr<ITexture> *textures)
{ {
@ -256,10 +246,7 @@ void CDriverGL::setTextureShaders(const uint8 *addressingModes, const CSmartPtr<
} }
} }
// -------------------------------------------------- // --------------------------------------------------
bool CDriverGL::setupMaterial(CMaterial& mat) bool CDriverGL::setupMaterial(CMaterial& mat)
{ {
H_AUTO_OGL(CDriverGL_setupMaterial) H_AUTO_OGL(CDriverGL_setupMaterial)
@ -268,7 +255,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
uint32 touched=mat.getTouched(); uint32 touched=mat.getTouched();
uint stage; uint stage;
// profile. // profile.
_NbSetupMaterialCall++; _NbSetupMaterialCall++;
@ -287,7 +273,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
} }
pShader=static_cast<CShaderGL*>((IMaterialDrvInfos*)(mat._MatDrvInfo)); pShader=static_cast<CShaderGL*>((IMaterialDrvInfos*)(mat._MatDrvInfo));
// 1. Setup modified fields of material. // 1. Setup modified fields of material.
//===================================== //=====================================
if( touched ) if( touched )
@ -329,7 +314,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
pShader->SupportedShader= getSupportedShader(mat.getShader()); pShader->SupportedShader= getSupportedShader(mat.getShader());
} }
// Since modified, must rebind all openGL states. And do this also for the delete/new problem. // Since modified, must rebind all openGL states. And do this also for the delete/new problem.
/* If an old material is deleted, _CurrentMaterial is invalid. But this is grave only if a new /* If an old material is deleted, _CurrentMaterial is invalid. But this is grave only if a new
material is created, with the same pointer (bad luck). Since an newly allocated material always material is created, with the same pointer (bad luck). Since an newly allocated material always
@ -342,7 +326,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
mat.clearTouched(0xFFFFFFFF); mat.clearTouched(0xFFFFFFFF);
} }
// Now we can get the supported shader from the cache. // Now we can get the supported shader from the cache.
CMaterial::TShader matShader = pShader->SupportedShader; CMaterial::TShader matShader = pShader->SupportedShader;
@ -417,7 +400,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
} }
} }
// 3. Bind OpenGL States. // 3. Bind OpenGL States.
//======================= //=======================
if (_CurrentMaterial!=&mat) if (_CurrentMaterial!=&mat)
@ -446,7 +428,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
_DriverGLStates.alphaFunc(mat.getAlphaTestThreshold()); _DriverGLStates.alphaFunc(mat.getAlphaTestThreshold());
} }
// Bind ZBuffer Part. // Bind ZBuffer Part.
//=================== //===================
_DriverGLStates.enableZWrite(mat.getFlags()&IDRV_MAT_ZWRITE); _DriverGLStates.enableZWrite(mat.getFlags()&IDRV_MAT_ZWRITE);
@ -526,7 +507,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
_CurrentMaterial=&mat; _CurrentMaterial=&mat;
} }
// 4. Misc // 4. Misc
//===================================== //=====================================
@ -547,7 +527,6 @@ bool CDriverGL::setupMaterial(CMaterial& mat)
return true; return true;
} }
// *************************************************************************** // ***************************************************************************
sint CDriverGL::beginMultiPass() sint CDriverGL::beginMultiPass()
{ {
@ -574,6 +553,7 @@ sint CDriverGL::beginMultiPass()
default: return 1; default: return 1;
} }
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::setupPass(uint pass) void CDriverGL::setupPass(uint pass)
{ {
@ -607,7 +587,6 @@ void CDriverGL::setupPass(uint pass)
} }
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::endMultiPass() void CDriverGL::endMultiPass()
{ {
@ -640,7 +619,6 @@ void CDriverGL::endMultiPass()
} }
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::computeLightMapInfos (const CMaterial &mat) void CDriverGL::computeLightMapInfos (const CMaterial &mat)
{ {
@ -682,7 +660,6 @@ void CDriverGL::computeLightMapInfos (const CMaterial &mat)
// NB: _NLightMaps==0 means there is no lightmaps at all. // NB: _NLightMaps==0 means there is no lightmaps at all.
} }
// *************************************************************************** // ***************************************************************************
sint CDriverGL::beginLightMapMultiPass () sint CDriverGL::beginLightMapMultiPass ()
{ {
@ -714,13 +691,13 @@ sint CDriverGL::beginLightMapMultiPass ()
// Manage too if no lightmaps. // Manage too if no lightmaps.
return std::max (_NLightMapPass, (uint)1); return std::max (_NLightMapPass, (uint)1);
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::setupLightMapPass(uint pass) void CDriverGL::setupLightMapPass(uint pass)
{ {
H_AUTO_OGL(CDriverGL_setupLightMapPass) H_AUTO_OGL(CDriverGL_setupLightMapPass)
const CMaterial &mat= *_CurrentMaterial; const CMaterial &mat= *_CurrentMaterial;
// common colors // common colors
static uint32 packedColorBlack= CRGBA(0,0,0,255).getPacked(); static uint32 packedColorBlack= CRGBA(0,0,0,255).getPacked();
static GLfloat glcolBlack[4]= {0.f,0.f,0.f,1.f}; static GLfloat glcolBlack[4]= {0.f,0.f,0.f,1.f};
@ -759,7 +736,6 @@ void CDriverGL::setupLightMapPass(uint pass)
nlassert(pass<_NLightMapPass); nlassert(pass<_NLightMapPass);
// setup Texture Pass. // setup Texture Pass.
//========================= //=========================
uint lmapId; uint lmapId;
@ -953,7 +929,6 @@ void CDriverGL::setupLightMapPass(uint pass)
} }
} }
// setup blend / lighting. // setup blend / lighting.
//========================= //=========================
@ -1012,7 +987,6 @@ void CDriverGL::setupLightMapPass(uint pass)
} }
} }
// Dynamic lighting: The influence of the dynamic light must be added only in the first pass (only one time) // Dynamic lighting: The influence of the dynamic light must be added only in the first pass (only one time)
if(pass==0) if(pass==0)
{ {
@ -1026,6 +1000,7 @@ void CDriverGL::setupLightMapPass(uint pass)
else if(pass==1) else if(pass==1)
_DriverGLStates.setDiffuse(packedColorBlack, glcolBlack); _DriverGLStates.setDiffuse(packedColorBlack, glcolBlack);
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::endLightMapMultiPass() void CDriverGL::endLightMapMultiPass()
{ {
@ -1057,7 +1032,6 @@ void CDriverGL::endLightMapMultiPass()
} }
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::resetLightMapVertexSetup() void CDriverGL::resetLightMapVertexSetup()
{ {
@ -1079,7 +1053,6 @@ void CDriverGL::resetLightMapVertexSetup()
_LastVertexSetupIsLightMap= false; _LastVertexSetupIsLightMap= false;
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::startSpecularBatch() void CDriverGL::startSpecularBatch()
{ {
@ -1185,6 +1158,7 @@ sint CDriverGL::beginSpecularMultiPass()
else else
return 2; return 2;
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::setupSpecularPass(uint pass) void CDriverGL::setupSpecularPass(uint pass)
{ {
@ -1308,10 +1282,9 @@ void CDriverGL::setupSpecularPass(uint pass)
} }
} }
else else
{ // We have to do it in 2 passes {
// We have to do it in 2 passes
// For Both Pass, setup correct Env. // For Both Pass, setup correct Env.
if( pass == 0 ) if( pass == 0 )
{ // Just display the texture { // Just display the texture
_DriverGLStates.enableBlend(false); _DriverGLStates.enableBlend(false);
@ -1333,7 +1306,6 @@ void CDriverGL::setupSpecularPass(uint pass)
activateTexEnvMode(0, env); activateTexEnvMode(0, env);
// Set stage 1 // Set stage 1
if( mat.getTexture(0) == NULL ) if( mat.getTexture(0) == NULL )
{ {
@ -1355,6 +1327,7 @@ void CDriverGL::setupSpecularPass(uint pass)
} }
} }
} }
// *************************************************************************** // ***************************************************************************
void CDriverGL::endSpecularMultiPass() void CDriverGL::endSpecularMultiPass()
{ {
@ -1364,7 +1337,6 @@ void CDriverGL::endSpecularMultiPass()
setupSpecularEnd(); setupSpecularEnd();
} }
// a functor that can is used to generate a cube map used for specular / diffuse lighting // a functor that can is used to generate a cube map used for specular / diffuse lighting
struct CSpecCubeMapFunctor : ICubeMapFunctor struct CSpecCubeMapFunctor : ICubeMapFunctor
{ {
@ -1380,13 +1352,11 @@ struct CSpecCubeMapFunctor : ICubeMapFunctor
float Exp; float Exp;
}; };
/* /// parameters for specular cube map generation /* /// parameters for specular cube map generation
const uint MaxSpecularExp = 64; const uint MaxSpecularExp = 64;
const uint SpecularExpStep = 8; const uint SpecularExpStep = 8;
const uint SpecularMapSize = 32; */ const uint SpecularMapSize = 32; */
// *************************************************************************** // ***************************************************************************
CTextureCube *CDriverGL::getSpecularCubeMap(uint exp) CTextureCube *CDriverGL::getSpecularCubeMap(uint exp)
{ {
@ -1434,7 +1404,6 @@ CTextureCube *CDriverGL::getSpecularCubeMap(uint exp)
NLMISC::clamp(exp, 1u, (MaxExponent - 1)); NLMISC::clamp(exp, 1u, (MaxExponent - 1));
uint cubeMapIndex = expToCubeMap[exp]; uint cubeMapIndex = expToCubeMap[exp];
nlassert(cubeMapIndex < numCubeMap); nlassert(cubeMapIndex < numCubeMap);
@ -1542,7 +1511,6 @@ void CDriverGL::setupPPLPass(uint pass)
// setup the tex envs // setup the tex envs
// Stage 0 is rgb = DiffuseCubeMap * LightColor + DiffuseGouraud * 1 // Stage 0 is rgb = DiffuseCubeMap * LightColor + DiffuseGouraud * 1
if(_CurrentTexEnvSpecial[0] != TexEnvSpecialPPLStage0) if(_CurrentTexEnvSpecial[0] != TexEnvSpecialPPLStage0)
{ {
@ -1591,8 +1559,6 @@ void CDriverGL::setupPPLPass(uint pass)
env.Env.SrcArg1Alpha = CMaterial::Diffuse; env.Env.SrcArg1Alpha = CMaterial::Diffuse;
activateTexEnvMode(1, env); activateTexEnvMode(1, env);
// Stage 2 is rgb = SpecularCubeMap * SpecularLightColor + Prec * 1 // Stage 2 is rgb = SpecularCubeMap * SpecularLightColor + Prec * 1
// alpha = prec alpha // alpha = prec alpha
@ -1674,7 +1640,6 @@ void CDriverGL::endPPLMultiPass()
// nothing to do there ... // nothing to do there ...
} }
// ******PER PIXEL LIGHTING, NO SPECULAR************************************** // ******PER PIXEL LIGHTING, NO SPECULAR**************************************
sint CDriverGL::beginPPLNoSpecMultiPass() sint CDriverGL::beginPPLNoSpecMultiPass()
{ {
@ -1704,7 +1669,6 @@ void CDriverGL::setupPPLNoSpecPass(uint pass)
activateTexture(0, tex0); activateTexture(0, tex0);
activateTexture(1, mat.getTexture(0)); activateTexture(1, mat.getTexture(0));
for (uint k = 2; k < inlGetNumTextStages(); ++k) for (uint k = 2; k < inlGetNumTextStages(); ++k)
{ {
activateTexture(k, NULL); activateTexture(k, NULL);
@ -1712,7 +1676,6 @@ void CDriverGL::setupPPLNoSpecPass(uint pass)
// setup the tex envs // setup the tex envs
// Stage 0 is rgb = DiffuseCubeMap * LightColor + DiffuseGouraud * 1 (TODO : EnvCombine3) // Stage 0 is rgb = DiffuseCubeMap * LightColor + DiffuseGouraud * 1 (TODO : EnvCombine3)
if(_CurrentTexEnvSpecial[0] != TexEnvSpecialPPLStage0) if(_CurrentTexEnvSpecial[0] != TexEnvSpecialPPLStage0)
{ {
@ -1784,7 +1747,6 @@ void CDriverGL::endPPLNoSpecMultiPass()
} }
}*/ }*/
// *************************************************************************** // ***************************************************************************
/*inline void CDriverGL::setupCausticsFirstTex(const CMaterial &mat) /*inline void CDriverGL::setupCausticsFirstTex(const CMaterial &mat)
{ {
@ -1999,7 +1961,6 @@ void CDriverGL::endCloudMultiPass()
} }
} }
// *************************************************************************** // ***************************************************************************
sint CDriverGL::beginWaterMultiPass() sint CDriverGL::beginWaterMultiPass()
{ {
@ -2088,7 +2049,6 @@ void CDriverGL::setupWaterPassR200(const CMaterial &mat)
} }
} }
// *************************************************************************** // ***************************************************************************
/** water setup for ARB_fragment_program /** water setup for ARB_fragment_program
*/ */
@ -2175,7 +2135,6 @@ void CDriverGL::setupWaterPassARB(const CMaterial &mat)
} }
} }
// *************************************************************************** // ***************************************************************************
/** Presetupped texture shader for water shader on NV20 /** Presetupped texture shader for water shader on NV20
*/ */
@ -2187,7 +2146,6 @@ static const uint8 WaterNoDiffuseTexAddrMode[IDRV_MAT_MAXTEXTURES] =
CMaterial::TextureOff CMaterial::TextureOff
}; };
static const uint8 WaterTexAddrMode[IDRV_MAT_MAXTEXTURES] = static const uint8 WaterTexAddrMode[IDRV_MAT_MAXTEXTURES] =
{ {
CMaterial::FetchTexture, CMaterial::FetchTexture,
@ -2198,7 +2156,6 @@ static const uint8 WaterTexAddrMode[IDRV_MAT_MAXTEXTURES] =
static const float IdentityTexMat[4] = { 1.f, 0.f, 0.f, 1.f }; static const float IdentityTexMat[4] = { 1.f, 0.f, 0.f, 1.f };
// *************************************************************************** // ***************************************************************************
void CDriverGL::setupWaterPassNV20(const CMaterial &mat) void CDriverGL::setupWaterPassNV20(const CMaterial &mat)
{ {

View file

@ -319,7 +319,7 @@ bool isTextKeyEvent(NSEvent* event)
/* /*
TODO check why iswprint(character) does not solve it. TODO check why iswprint(character) does not solve it.
it always returns false, even for π é ... it always returns false, even for π, é, ...
*/ */
// > 127 but not printable // > 127 but not printable
if( nelKey == NLMISC::KeyF1 || nelKey == NLMISC::KeyF2 || if( nelKey == NLMISC::KeyF1 || nelKey == NLMISC::KeyF2 ||
@ -408,13 +408,6 @@ void submitEvents(NLMISC::CEventServer& server,
case NSMouseEntered:break; case NSMouseEntered:break;
case NSMouseExited:break; case NSMouseExited:break;
case NSKeyDown: case NSKeyDown:
/*
TODO dead keys
http://developer.apple.com/mac/library/documentation/Carbon/Reference/
Unicode_Utilities_Ref/Reference/reference.html#//apple_ref/c/func/
UCKeyTranslate
*/
// push the key press event to the new event server // push the key press event to the new event server
server.postEvent(new NLMISC::CEventKeyDown( server.postEvent(new NLMISC::CEventKeyDown(
virtualKeycodeToNelKey([event keyCode]), virtualKeycodeToNelKey([event keyCode]),

View file

@ -21,12 +21,36 @@
/** /**
* derived to configure the NSOpenGLView * derived to configure the NSOpenGLView
*/ */
@interface CocoaOpenGLView : NSOpenGLView @interface CocoaOpenGLView : NSOpenGLView<NSTextInputClient>
{ {
NSMutableAttributedString* backingStore;
NSRange markedRange;
} }
-(id)initWithFrame:(NSRect)frame;
-(void)dealloc;
-(BOOL)acceptsFirstResponder; -(BOOL)acceptsFirstResponder;
-(BOOL)needsPanelToBecomeKey; -(BOOL)needsPanelToBecomeKey;
-(void)keyDown:(NSEvent*)event; -(void)keyDown:(NSEvent*)event;
/******************************************************************************/
/* NSTextInputClient Protocol */
-(BOOL)hasMarkedText;
-(NSRange)markedRange;
-(NSRange)selectedRange;
-(void)setMarkedText:(id)aString
selectedRange:(NSRange)newSelection
replacementRange:(NSRange)replacementRange;
-(void)unmarkText;
-(NSArray*)validAttributesForMarkedText;
-(NSAttributedString*)attributedSubstringForProposedRange:(NSRange)aRange
actualRange:(NSRangePointer)actualRange;
-(void)insertText:(id)aString replacementRange:(NSRange)replacementRange;
-(NSUInteger)characterIndexForPoint:(NSPoint)aPoint;
-(NSRect)firstRectForCharacterRange:(NSRange)aRange
actualRange:(NSRangePointer)actualRange;
-(void)doCommandBySelector:(SEL)aSelector;
@end @end

View file

@ -20,6 +20,21 @@
@implementation CocoaOpenGLView @implementation CocoaOpenGLView
- (id)initWithFrame:(NSRect)frame
{
if(self = [super initWithFrame:frame])
{
backingStore = [[NSMutableAttributedString alloc] initWithString:@""];
return self;
}
return nil;
}
- (void)dealloc
{
[backingStore release];
[super dealloc];
}
-(BOOL)acceptsFirstResponder -(BOOL)acceptsFirstResponder
{ {
return YES; return YES;
@ -32,11 +47,87 @@
-(void)keyDown:(NSEvent*)event -(void)keyDown:(NSEvent*)event
{ {
// we handle the key here, so os x does not make a sound :) [[self inputContext] handleEvent:event];
/* }
TODO do it in the event emitter? eg do not forward key down?
does command+q / command+m still work then? /******************************************************************************/
*/ /* NSTextInputClient Protocol */
-(BOOL)hasMarkedText
{
return (markedRange.location == NSNotFound ? NO : YES);
}
-(NSRange)markedRange
{
return markedRange;
}
-(NSRange)selectedRange
{
return NSMakeRange(NSNotFound, 0);
}
-(void)setMarkedText:(id)aString
selectedRange:(NSRange)newSelection
replacementRange:(NSRange)replacementRange
{
if(replacementRange.location == NSNotFound)
replacementRange = markedRange;
if([aString length] == 0)
{
[backingStore deleteCharactersInRange:replacementRange];
[self unmarkText];
}
else
{
markedRange = NSMakeRange(replacementRange.location, [aString length]);
[backingStore replaceCharactersInRange:replacementRange withString:aString];
}
}
-(void)unmarkText
{
markedRange = NSMakeRange(NSNotFound, 0);
[[self inputContext] discardMarkedText];
}
-(NSArray*)validAttributesForMarkedText
{
return [NSArray arrayWithObjects:
NSMarkedClauseSegmentAttributeName, NSGlyphInfoAttributeName, nil];
}
-(NSAttributedString*)attributedSubstringForProposedRange:(NSRange)aRange
actualRange:(NSRangePointer)actualRange
{
return [backingStore attributedSubstringFromRange:aRange];
}
-(void)insertText:(id)aString
replacementRange:(NSRange)replacementRange
{
if(replacementRange.location == NSNotFound)
replacementRange = markedRange;
[backingStore replaceCharactersInRange:replacementRange withString:aString];
}
-(NSUInteger)characterIndexForPoint:(NSPoint)aPoint
{
return 0;
}
-(NSRect)firstRectForCharacterRange:(NSRange)aRange
actualRange:(NSRangePointer)actualRange
{
return NSMakeRect(0, 0, 0, 0);
}
-(void)doCommandBySelector:(SEL)aSelector
{
[super doCommandBySelector:aSelector];
} }
@end @end

View file

@ -32,7 +32,7 @@ namespace NLMISC {
/** /**
* TODO Class description * CEventEmitter UNIX implementation
* \author Vianney Lecroart * \author Vianney Lecroart
* \author Nevrax France * \author Nevrax France
* \date 2000 * \date 2000

View file

@ -135,17 +135,16 @@ UMaterial CDriverUser::createMaterial()
// *************************************************************************** // ***************************************************************************
void CDriverUser::deleteMaterial(UMaterial &umat) void CDriverUser::deleteMaterial(UMaterial &umat)
{ {
delete umat.getObjectPtr(); delete umat.getObjectPtr();
umat.detach(); umat.detach();
} }
// *************************************************************************** // ***************************************************************************
UAnimationSet *CDriverUser::createAnimationSet() UAnimationSet *CDriverUser::createAnimationSet(bool headerOptim)
{ {
return _AnimationSets.insert(new CAnimationSetUser(this, headerOptim));
return _AnimationSets.insert(new CAnimationSetUser(this));
} }
// *************************************************************************** // ***************************************************************************
UAnimationSet *CDriverUser::createAnimationSet(const std::string &animationSetFile) UAnimationSet *CDriverUser::createAnimationSet(const std::string &animationSetFile)
{ {
@ -157,10 +156,10 @@ UAnimationSet *CDriverUser::createAnimationSet(const std::string &animationSet
f.open(path); f.open(path);
return _AnimationSets.insert(new CAnimationSetUser(this, f)); return _AnimationSets.insert(new CAnimationSetUser(this, f));
} }
// *************************************************************************** // ***************************************************************************
void CDriverUser::deleteAnimationSet(UAnimationSet *animationSet) void CDriverUser::deleteAnimationSet(UAnimationSet *animationSet)
{ {
_AnimationSets.erase((CAnimationSetUser*)animationSet, "deleteAnimationSet(): Bad AnimationSet ptr"); _AnimationSets.erase((CAnimationSetUser*)animationSet, "deleteAnimationSet(): Bad AnimationSet ptr");
} }

View file

@ -257,7 +257,7 @@ void CShadowMapManager::renderGenerate(CScene *scene)
if(driverForShadowGeneration) if(driverForShadowGeneration)
driverForShadowGeneration->getWindowSize(wndW, wndH); driverForShadowGeneration->getWindowSize(wndW, wndH);
uint baseTextureSize= scene->getShadowMapTextureSize(); uint baseTextureSize= scene->getShadowMapTextureSize();
// Minimize the Dest Texture size, so the blurTexture don't get to heavy in VRAM. // Minimize the Dest Texture size, so the blurTexture don't get too heavy in VRAM.
uint32 textDestW= min(wndW, (uint32)NL3D_SMM_MAX_TEXTDEST_SIZE); uint32 textDestW= min(wndW, (uint32)NL3D_SMM_MAX_TEXTDEST_SIZE);
uint32 textDestH= min(wndH, (uint32)NL3D_SMM_MAX_TEXTDEST_SIZE); uint32 textDestH= min(wndH, (uint32)NL3D_SMM_MAX_TEXTDEST_SIZE);

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9,00" Version="9.00"
Name="cegui" Name="cegui"
ProjectGUID="{CEF983A5-610E-49C9-A122-05557EEC4E34}" ProjectGUID="{CEF983A5-610E-49C9-A122-05557EEC4E34}"
RootNamespace="sledge_cegui" RootNamespace="sledge_cegui"
@ -11,6 +11,9 @@
<Platform <Platform
Name="Win32" Name="Win32"
/> />
<Platform
Name="x64"
/>
</Platforms> </Platforms>
<ToolFiles> <ToolFiles>
</ToolFiles> </ToolFiles>
@ -22,6 +25,21 @@
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="4" Optimization="4"
@ -39,12 +57,36 @@
SuppressStartupBanner="true" SuppressStartupBanner="true"
DebugInformationFormat="3" DebugInformationFormat="3"
/> />
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="..\lib\$(RootNamespace)_d.lib" OutputFile="..\lib\$(RootNamespace)_d.lib"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrt" IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrt"
/> />
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration> </Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
@ -53,6 +95,21 @@
ConfigurationType="4" ConfigurationType="4"
CharacterSet="2" CharacterSet="2"
> >
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
Optimization="4" Optimization="4"
@ -70,12 +127,178 @@
WarningLevel="3" WarningLevel="3"
SuppressStartupBanner="true" SuppressStartupBanner="true"
/> />
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool <Tool
Name="VCLibrarianTool" Name="VCLibrarianTool"
OutputFile="..\lib\$(RootNamespace)_r.lib" OutputFile="..\lib\$(RootNamespace)_r.lib"
SuppressStartupBanner="true" SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd" IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
/> />
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;_DEBUG;_LIB"
StringPooling="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="3"
BufferSecurityCheck="true"
EnableFunctionLevelLinking="true"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib\$(RootNamespace)_d.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrt"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
AdditionalIncludeDirectories="..\include"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_LIB"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="..\lib\$(RootNamespace)_r.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration> </Configuration>
</Configurations> </Configurations>
<References> <References>

View file

@ -465,44 +465,44 @@ private:
public: public:
static double _LastSwapTime; static double _LastSwapTime;
static double _TotalSwapTime; static double _TotalSwapTime;
static double _MaxSwapTime; static double _MaxSwapTime;
static double _MinSwapTime; static double _MinSwapTime;
static uint32 _SwapCount; static uint32 _SwapCount;
static double _TotalUpdateTime; static double _TotalUpdateTime;
static double _MaxUpdateTime; static double _MaxUpdateTime;
static double _MinUpdateTime; static double _MinUpdateTime;
static uint32 _UpdateCount; static uint32 _UpdateCount;
static uint32 _TotalUpdateSize; static uint32 _TotalUpdateSize;
static double _PosTime; static double _PosTime;
static double _LockTime; static double _LockTime;
static double _CopyTime; static double _CopyTime;
static double _UnlockTime; static double _UnlockTime;
static uint32 _CopyCount; static uint32 _CopyCount;
public: public:
static double getTestLast() { return 1000.0f * _LastSwapTime; }; static double getTestLast() { return 1000.0f * _LastSwapTime; };
static double getTestMax() { return 1000.0f * _MaxSwapTime; }; static double getTestMax() { return 1000.0f * _MaxSwapTime; };
static double getTestMin() { return 1000.0f * _MinSwapTime; }; static double getTestMin() { return 1000.0f * _MinSwapTime; };
static double getTestAverage() { return (_SwapCount > 0) ? 1000.0f * _TotalSwapTime / _SwapCount : 0.0; }; static double getTestAverage() { return (_SwapCount > 0) ? 1000.0f * _TotalSwapTime / _SwapCount : 0.0; };
static double getAveragePosTime() { return (_CopyCount > 0) ? 1000.0f * _PosTime / _CopyCount : 0.0; }; static double getAveragePosTime() { return (_CopyCount > 0) ? 1000.0f * _PosTime / _CopyCount : 0.0; };
static double getAverageLockTime() { return (_CopyCount > 0) ? 1000.0f * _LockTime / _CopyCount : 0.0; }; static double getAverageLockTime() { return (_CopyCount > 0) ? 1000.0f * _LockTime / _CopyCount : 0.0; };
static double getAverageCopyTime() { return (_CopyCount > 0) ? 1000.0f * _CopyTime / _CopyCount : 0.0; }; static double getAverageCopyTime() { return (_CopyCount > 0) ? 1000.0f * _CopyTime / _CopyCount : 0.0; };
static double getAverageUnlockTime() { return (_CopyCount > 0) ? 1000.0f * _UnlockTime / _CopyCount : 0.0; }; static double getAverageUnlockTime() { return (_CopyCount > 0) ? 1000.0f * _UnlockTime / _CopyCount : 0.0; };
static double getAverageCumulTime() { return (_CopyCount > 0) ? 1000.0f * (_PosTime + _LockTime + _CopyTime + _UnlockTime) / _CopyCount : 0.0; }; static double getAverageCumulTime() { return (_CopyCount > 0) ? 1000.0f * (_PosTime + _LockTime + _CopyTime + _UnlockTime) / _CopyCount : 0.0; };
static uint getAverageUpdateSize() { return (_CopyCount > 0) ? (uint) (_TotalUpdateSize / _CopyCount) : 0; }; static uint getAverageUpdateSize() { return (_CopyCount > 0) ? (uint) (_TotalUpdateSize / _CopyCount) : 0; };
static double getMaxUpdateTime() { return 1000.0f * _MaxUpdateTime; }; static double getMaxUpdateTime() { return 1000.0f * _MaxUpdateTime; };
static double getMinUpdateTime() { return 1000.0f * _MinUpdateTime; }; static double getMinUpdateTime() { return 1000.0f * _MinUpdateTime; };
static double getAverageUpdateTime() { return (_UpdateCount > 0) ? 1000.0f * _TotalUpdateTime / _UpdateCount : 0.0; }; static double getAverageUpdateTime() { return (_UpdateCount > 0) ? 1000.0f * _TotalUpdateTime / _UpdateCount : 0.0; };
static double getTotalUpdateTime() { return 1000.0f * _TotalUpdateTime; }; static double getTotalUpdateTime() { return 1000.0f * _TotalUpdateTime; };
static double getUpdateBytesPerMsec() { return (_UpdateCount > 0) ? _TotalUpdateSize / _TotalUpdateTime / 1000.0 : 0.0; } static double getUpdateBytesPerMsec() { return (_UpdateCount > 0) ? _TotalUpdateSize / _TotalUpdateTime / 1000.0 : 0.0; }
#endif #endif

View file

@ -17,6 +17,8 @@
#include "nel/sound/driver/source.h" #include "nel/sound/driver/source.h"
#include "nel/misc/common.h" #include "nel/misc/common.h"
#include <limits>
using namespace NLMISC; using namespace NLMISC;
namespace NLSOUND namespace NLSOUND
@ -25,12 +27,15 @@ namespace NLSOUND
// common method used only with OptionManualRolloff. return the volume in 1/100th DB ( = mB) modified // common method used only with OptionManualRolloff. return the volume in 1/100th DB ( = mB) modified
sint32 ISource::computeManualRollOff(sint32 volumeMB, sint32 mbMin, sint32 mbMax, double alpha, float sqrdist, float distMin, float distMax) sint32 ISource::computeManualRollOff(sint32 volumeMB, sint32 mbMin, sint32 mbMax, double alpha, float sqrdist, float distMin, float distMax)
{ {
// root square of max float value
static float maxSqrt = sqrt(std::numeric_limits<float>::max());
if (sqrdist < distMin * distMin) if (sqrdist < distMin * distMin)
{ {
// no attenuation // no attenuation
return volumeMB; return volumeMB;
} }
else if (sqrdist > distMax * distMax) else if ((distMax < maxSqrt) && (sqrdist > distMax * distMax))
{ {
// full attenuation // full attenuation
return mbMin; return mbMin;

View file

@ -50,7 +50,7 @@ int main(int argc, char* argv[])
if (argc!=2) if (argc!=2)
{ {
// Doc.. // Doc..
printf("build_coarse_mesh [config_file.cfg]\n"); nlinfo("build_coarse_mesh [config_file.cfg]\n");
} }
else else
{ {
@ -104,7 +104,7 @@ int main(int argc, char* argv[])
std::string outputPath=list_mesh.asString (i*2+1); std::string outputPath=list_mesh.asString (i*2+1);
// Output // Output
printf ("Loading %s...\n", intputPath.c_str()); nlinfo ("Loading %s...\n", intputPath.c_str());
// File // File
CIFile inputFile; CIFile inputFile;
@ -185,7 +185,7 @@ int main(int argc, char* argv[])
if (coarseMeshes.size()>0) if (coarseMeshes.size()>0)
{ {
// Output text // Output text
printf ("Compute the coarse meshes...\n"); nlinfo ("Compute the coarse meshes...\n");
// A bitmap // A bitmap
vector<CBitmap> coarseBitmap; vector<CBitmap> coarseBitmap;
@ -200,7 +200,7 @@ int main(int argc, char* argv[])
for (i=0; i<shapes.size(); i++) for (i=0; i<shapes.size(); i++)
{ {
// Output text // Output text
printf ("Write %s...\n", shapes[i].FileName.c_str()); nlinfo ("Write %s...\n", shapes[i].FileName.c_str());
// File output // File output
COFile outputFile; COFile outputFile;
@ -222,7 +222,7 @@ int main(int argc, char* argv[])
// Write the bitmaps // Write the bitmaps
for (i=0; i<texture_output_path.size (); i++) for (i=0; i<texture_output_path.size (); i++)
{ {
printf ("Write textures %s...\n", texture_output_path[i].c_str()); nlinfo ("Write textures %s...\n", texture_output_path[i].c_str());
// File for the texture // File for the texture
COFile outputFile; COFile outputFile;
@ -241,7 +241,7 @@ int main(int argc, char* argv[])
} }
// Show stats // Show stats
printf ("\nCoarse meshes computed: %d\nTexture size: %dx%d\nArea of the texture used: %f%%\nCompute time (s): %f\n", nlinfo ("\nCoarse meshes computed: %d\nTexture size: %dx%d\nArea of the texture used: %f%%\nCompute time (s): %f\n",
shapes.size(), coarseBitmap[0].getWidth(), coarseBitmap[0].getHeight(), stats.TextureUsed*100.f, shapes.size(), coarseBitmap[0].getWidth(), coarseBitmap[0].getHeight(), stats.TextureUsed*100.f,
((float)(uint32)CTime::getLocalTime ()-startTime)/1000.f); ((float)(uint32)CTime::getLocalTime ()-startTime)/1000.f);
} }

View file

@ -87,6 +87,76 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="1"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;_DEBUG;_LIB"
StringPooling="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="3"
BufferSecurityCheck="true"
EnableFunctionLevelLinking="true"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(RootNamespace)_d.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrt"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|Win32" Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)" OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
@ -157,76 +227,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="1"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;_DEBUG;_LIB"
StringPooling="true"
ExceptionHandling="2"
BasicRuntimeChecks="3"
SmallerTypeCheck="true"
RuntimeLibrary="3"
BufferSecurityCheck="true"
EnableFunctionLevelLinking="true"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(RootNamespace)_d.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrt"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"

View file

@ -12,6 +12,8 @@
**********************************************************************/ **********************************************************************/
#include "ligoscape_utility.h" #include "ligoscape_utility.h"
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include <nel/misc/debug.h>
#include "../../plugin_max/nel_3dsmax_shared/nel_3dsmax_shared.h"
extern ClassDesc2* GetLigoscapeDesc(); extern ClassDesc2* GetLigoscapeDesc();
@ -26,6 +28,13 @@ int controlsInit = FALSE;
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{ {
// initialize nel context
if (!NLMISC::INelContext::isContextInitialised())
{
new NLMISC::CLibraryContext(GetSharedNelContext());
nldebug("NeL Ligoscape Utility: DllMain");
}
hInstance = hinstDLL; // Hang on to this DLL's instance handle. hInstance = hinstDLL; // Hang on to this DLL's instance handle.
if (!controlsInit) if (!controlsInit)

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="ligoscape_utility" Name="ligoscape_utility"
ProjectGUID="{796E7156-7DE8-4F86-BF33-D7ACF4014204}" ProjectGUID="{796E7156-7DE8-4F86-BF33-D7ACF4014204}"
RootNamespace="nelligoscapeutility" RootNamespace="nelligoscapeutility"
@ -99,88 +99,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib libxml2.lib freetype.lib ws2_32.lib"
OutputFile="plugins\$(RootNamespace)_r.dlx"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="plugins\$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -263,6 +181,89 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib libxml2.lib freetype.lib ws2_32.lib"
OutputFile="plugins\$(RootNamespace)_r.dlx"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="plugins\$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"

View file

@ -27,7 +27,10 @@ BOOL APIENTRY DllMain( HANDLE hModule,
{ {
// initialize nel context // initialize nel context
if (!NLMISC::INelContext::isContextInitialised()) if (!NLMISC::INelContext::isContextInitialised())
new NLMISC::CApplicationContext(); {
GetSharedNelContext();
nldebug("NeL 3ds Max Shared: DllMain");
}
switch (ul_reason_for_call) switch (ul_reason_for_call)
{ {
@ -51,10 +54,20 @@ void init ()
// The static allocator // The static allocator
static CPatchAllocator Allocator; static CPatchAllocator Allocator;
NEL_3DSMAX_SHARED_API CPatchAllocator& GetAllocator () NEL_3DSMAX_SHARED_API CPatchAllocator &GetAllocator ()
{ {
// Init fonction // Init fonction
init (); init ();
return Allocator; return Allocator;
} }
NEL_3DSMAX_SHARED_API NLMISC::INelContext &GetSharedNelContext()
{
if (!NLMISC::INelContext::isContextInitialised())
{
new NLMISC::CApplicationContext();
NLMISC::createDebug();
}
return NLMISC::INelContext::getInstance();
}

View file

@ -14,11 +14,14 @@
// You should have received a copy of the GNU Affero General Public License // You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
class CPatchAllocator;
#ifdef NEL_3DSMAX_SHARED_EXPORTS #ifdef NEL_3DSMAX_SHARED_EXPORTS
#define NEL_3DSMAX_SHARED_API __declspec(dllexport) #define NEL_3DSMAX_SHARED_API __declspec(dllexport)
#else #else
#define NEL_3DSMAX_SHARED_API __declspec(dllimport) #define NEL_3DSMAX_SHARED_API __declspec(dllimport)
#endif #endif
extern NEL_3DSMAX_SHARED_API CPatchAllocator& GetAllocator (); extern NEL_3DSMAX_SHARED_API CPatchAllocator& GetAllocator();
extern NEL_3DSMAX_SHARED_API NLMISC::INelContext &GetSharedNelContext();

View file

@ -18,6 +18,7 @@
#include "nel_export.h" #include "nel_export.h"
#include "nel/3d/register_3d.h" #include "nel/3d/register_3d.h"
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
extern ClassDesc2* GetCNelExportDesc(); extern ClassDesc2* GetCNelExportDesc();
@ -30,7 +31,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{ {
// initialize nel context // initialize nel context
if (!NLMISC::INelContext::isContextInitialised()) if (!NLMISC::INelContext::isContextInitialised())
new NLMISC::CApplicationContext(); {
new NLMISC::CLibraryContext(GetSharedNelContext());
nldebug("NeL Export: DllMain");
}
hInstance = hinstDLL; // Hang on to this DLL's instance handle. hInstance = hinstDLL; // Hang on to this DLL's instance handle.

View file

@ -317,9 +317,15 @@ static BOOL CALLBACK CNelExportDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARA
// Get the node // Get the node
INode* pNode=theCNelExport._Ip->GetSelNode (nNode); INode* pNode=theCNelExport._Ip->GetSelNode (nNode);
if (pNode == NULL)
nlwarning("pNode == NULL");
if (pNode->GetName() == NULL)
nlwarning("pNode->GetName()");
// Name of the node // Name of the node
char sNodeMsg[256]; char sNodeMsg[256];
sprintf (sNodeMsg, "Save %s model...", pNode->GetName()); nlwarning (sNodeMsg, "Save %s model...", pNode->GetName());
// It is a zone ? // It is a zone ?
if (RPO::isZone (*pNode, time)) if (RPO::isZone (*pNode, time))

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="nel_export" Name="nel_export"
ProjectGUID="{F12B8538-1EAB-4BCB-8506-9DB5605F14E5}" ProjectGUID="{F12B8538-1EAB-4BCB-8506-9DB5605F14E5}"
RootNamespace="nelexport" RootNamespace="nelexport"
@ -101,90 +101,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="std_afx.h"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="version.lib libxml2.lib freetype.lib comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib winmm.lib ws2_32.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlu"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -269,6 +185,92 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="std_afx.h"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="version.lib libxml2.lib freetype.lib comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib winmm.lib ws2_32.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlu"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -446,7 +448,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -454,7 +456,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"

View file

@ -103,11 +103,23 @@ bool CNelExport::exportMesh (const char *sPath, INode& node, TimeValue time)
} }
catch (...) catch (...)
{ {
nlwarning("Shape serialization failed!");
file.close();
remove(sPath);
} }
} }
// Delete the pointer // Delete the pointer
delete pShape; nldebug ("Delete the pointer");
try
{
// memory leak, fixme
// delete pShape;
}
catch (...)
{
nlwarning("Failed to delete pShape pointer! Something might be wrong.");
}
} }
} }
return bRet; return bRet;

View file

@ -88,18 +88,31 @@ Value* export_shape_cf (Value** arg_list, int count)
// Ok ? // Ok ?
Boolean *ret=&false_value; Boolean *ret=&false_value;
// Is the flag dont export set ? try
if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_DONTEXPORT, 0)) {
return ret;
// Object is flagged as a collision?
int bCol= CExportNel::getScriptAppData(node, NEL3D_APPDATA_COLLISION, BST_UNCHECKED);
if(bCol == BST_CHECKED)
return ret;
// Export // Is the flag dont export set ?
theCNelExport._ExportNel->deleteLM( *node); if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_DONTEXPORT, 0))
if (theCNelExport.exportMesh (sPath, *node, ip->GetTime())) return ret;
ret = &true_value; // Object is flagged as a collision?
int bCol= CExportNel::getScriptAppData(node, NEL3D_APPDATA_COLLISION, BST_UNCHECKED);
if(bCol == BST_CHECKED)
return ret;
// Export
theCNelExport._ExportNel->deleteLM( *node);
if (theCNelExport.exportMesh (sPath, *node, ip->GetTime()))
ret = &true_value;
}
catch (Exception &e)
{
nlwarning ("ERROR (NelExportShape) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportShape) catch (...)");
}
nlinfo("ret");
return ret; return ret;
} }
@ -129,7 +142,8 @@ Value* export_shape_ex_cf (Value** arg_list, int count)
// Get a INode pointer from the argument passed to us // Get a INode pointer from the argument passed to us
INode *node = arg_list[0]->to_node(); INode *node = arg_list[0]->to_node();
nlassert (node); nlassert(node);
nlassert(node->GetName());
// Export path // Export path
std::string sPath=arg_list[1]->to_string(); std::string sPath=arg_list[1]->to_string();
@ -167,9 +181,13 @@ Value* export_shape_ex_cf (Value** arg_list, int count)
} }
catch (Exception &e) catch (Exception &e)
{ {
nlwarning ("ERROR %s", e.what()); nlwarning ("ERROR (NelExportShapeEx) %s", e.what());
} }
catch (...)
{
nlwarning ("ERROR (NelExportShapeEx) catch (...)");
}
nlinfo("ret");
return ret; return ret;
} }
@ -207,7 +225,11 @@ Value* export_skeleton_cf (Value** arg_list, int count)
} }
catch (Exception &e) catch (Exception &e)
{ {
nlwarning ("ERROR %s", e.what()); nlwarning ("ERROR (NelExportSkeleton) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportSkeleton) catch (...)");
} }
return ret; return ret;
@ -274,7 +296,11 @@ Value* export_animation_cf (Value** arg_list, int count)
} }
catch (Exception &e) catch (Exception &e)
{ {
nlwarning ("ERROR %s", e.what()); nlwarning ("ERROR (NelExportAnimation) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportAnimation) catch (...)");
} }
return ret; return ret;
} }
@ -328,7 +354,11 @@ Value* export_ig_cf (Value** arg_list, int count)
} }
catch (Exception &e) catch (Exception &e)
{ {
nlwarning ("ERROR %s", e.what()); nlwarning ("ERROR (NelExportInstanceGroup) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportInstanceGroup) catch (...)");
} }
return ret; return ret;
@ -383,7 +413,11 @@ Value* export_skeleton_weight_cf (Value** arg_list, int count)
} }
catch (Exception &e) catch (Exception &e)
{ {
nlwarning ("ERROR %s", e.what()); nlwarning ("ERROR (NelExportSkeletonWeight) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportSkeletonWeight) catch (...)");
} }
return ret; return ret;
@ -397,9 +431,20 @@ Value* view_shape_cf (Value** arg_list, int count)
// Get a good interface pointer // Get a good interface pointer
Interface *ip = MAXScript_interface; Interface *ip = MAXScript_interface;
theCNelExport.init (true, true, ip, true); try
{
theCNelExport.init (true, true, ip, true);
theCNelExport.viewMesh (ip->GetTime()); theCNelExport.viewMesh (ip->GetTime());
}
catch (Exception &e)
{
nlwarning ("ERROR %s", e.what());
}
catch (...)
{
nlwarning ("ERROR catch (...)");
}
return &true_value; return &true_value;
} }
@ -496,9 +541,20 @@ Value* export_vegetable_cf (Value** arg_list, int count)
// Ok ? // Ok ?
Boolean *ret=&false_value; Boolean *ret=&false_value;
// Export try
if (theCNelExport.exportVegetable (sPath, *node, ip->GetTime())) {
ret = &true_value; // Export
if (theCNelExport.exportVegetable (sPath, *node, ip->GetTime()))
ret = &true_value;
}
catch (Exception &e)
{
nlwarning ("ERROR (NelExportVegetable) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportVegetable) catch (...)");
}
return ret; return ret;
} }
@ -586,7 +642,11 @@ Value* export_collision_cf (Value** arg_list, int count)
} }
catch (Exception &e) catch (Exception &e)
{ {
nlwarning ("ERROR %s", e.what()); nlwarning ("ERROR (NelExportCollision) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportCollision) catch (...)");
} }
return ret; return ret;
} }
@ -639,7 +699,11 @@ Value* export_pacs_primitives_cf (Value** arg_list, int count)
} }
catch (Exception &e) catch (Exception &e)
{ {
nlwarning ("ERROR %s", e.what()); nlwarning ("ERROR (NelExportPACSPrimitives) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportPACSPrimitives) catch (...)");
} }
return ret; return ret;
} }
@ -674,9 +738,20 @@ Value* export_lod_character_cf (Value** arg_list, int count)
// Ok ? // Ok ?
Boolean *ret=&false_value; Boolean *ret=&false_value;
// Export try
if (theCNelExport.exportLodCharacter (sPath, *node, ip->GetTime())) {
ret = &true_value; // Export
if (theCNelExport.exportLodCharacter (sPath, *node, ip->GetTime()))
ret = &true_value;
}
catch (Exception &e)
{
nlwarning ("ERROR (NelExportLodCharacter) %s", e.what());
}
catch (...)
{
nlwarning ("ERROR (NelExportLodCharacter) catch (...)");
}
return ret; return ret;
} }

View file

@ -98,7 +98,7 @@ bool SLightBuild::canConvertFromMaxLight (INode *node, TimeValue tvTime)
return false; return false;
if( deleteIt ) if( deleteIt )
delete maxLight; maxLight->DeleteMe();
return true; return true;
} }
@ -295,7 +295,7 @@ void SLightBuild::convertFromMaxLight (INode *node,TimeValue tvTime)
this->rSoftShadowConeLength = (float)atof(sTmp.c_str()); this->rSoftShadowConeLength = (float)atof(sTmp.c_str());
if( deleteIt ) if( deleteIt )
delete maxLight; maxLight->DeleteMe();
} }
// *********************************************************************************************** // ***********************************************************************************************

View file

@ -135,7 +135,7 @@ CCollisionMeshBuild* CExportNel::createCollisionMeshBuild(std::vector<INode *> &
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
} }
} }
} }

View file

@ -237,7 +237,7 @@ void CExportNel::getLights (std::vector<CLight>& vectLight, TimeValue time, INod
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete maxLight; maxLight->DeleteMe();
} }
} }

View file

@ -177,7 +177,7 @@ bool CExportNel::buildLodCharacter (NL3D::CLodCharacterShapeBuild& lodBuild, IN
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
} }
} }

View file

@ -107,7 +107,7 @@ CMesh::CMeshBuild* CExportNel::createMeshBuild(INode& node, TimeValue tvTime, CM
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
} }
} }
@ -441,7 +441,7 @@ IShape* CExportNel::buildShape (INode& node, TimeValue time, const TInodePtrInt
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
} }
} }
@ -1388,7 +1388,7 @@ IMeshGeom *CExportNel::buildMeshGeom (INode& node, TimeValue time, const TInodeP
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
} }
} }
@ -2033,7 +2033,7 @@ NL3D::IShape *CExportNel::buildWaterShape(INode& node, TimeValue time)
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
nlinfo("WaterShape : build succesful"); nlinfo("WaterShape : build succesful");
return ws; return ws;
} }
@ -2074,7 +2074,7 @@ bool CExportNel::buildMeshAABBox(INode &node, NLMISC::CAABBox &dest, TimeValue t
if (deleteIt) if (deleteIt)
{ {
#ifndef NL_DEBUG #ifndef NL_DEBUG
delete tri; tri->DeleteMe();
#endif // NL_DEBUG #endif // NL_DEBUG
} }
return true; return true;

View file

@ -178,7 +178,7 @@ bool CMeshInterface::buildFromMaxMesh(INode &node, TimeValue tvTime)
// //
if (deleteIt) if (deleteIt)
{ {
delete tri; tri->DeleteMe();
} }
return true; return true;
} }
@ -358,7 +358,7 @@ static void AddNodeToQuadGrid(const NLMISC::CAABBox &delimiter, TNodeFaceQG &des
// //
if (deleteIt) if (deleteIt)
{ {
delete tri; tri->DeleteMe();
} }
} }
} }
@ -487,7 +487,7 @@ static bool SelectVerticesInMeshFromInterfaces(const std::vector<CMeshInterface>
if (obj != tri) if (obj != tri)
{ {
// not a mesh object, so do nothing // not a mesh object, so do nothing
delete tri; tri->DeleteMe();
return false; return false;
} }

View file

@ -1257,7 +1257,7 @@ void CExportNel::buildCamera(NL3D::CCameraInfo &cameraInfo, INode& node, TimeVal
cameraInfo.Fov = genCamera->GetFOV(time); cameraInfo.Fov = genCamera->GetFOV(time);
if (deleteIt) if (deleteIt)
delete genCamera; genCamera->DeleteMe();
} }
} }
} }

View file

@ -597,6 +597,7 @@ CInstanceGroup* CExportNel::buildInstanceGroup(const vector<INode*>& vectNode, v
else else
{ {
// What??? // What???
nlerror("sLightBuild.Type == %i", (uint32)(sLightBuild.Type));
nlstop; nlstop;
} }

View file

@ -1423,7 +1423,7 @@ bool CExportNel::mirrorPhysiqueSelection(INode &node, TimeValue tvTime, const st
// Delete the triObject if we should... // Delete the triObject if we should...
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
// ok! // ok!
ok= true; ok= true;

View file

@ -151,7 +151,7 @@ bool CExportNel::buildVegetableShape (NL3D::CVegetableShape& skeletonShape, INo
} }
if (deleteIt) if (deleteIt)
delete tri; tri->DeleteMe();
} }
} }

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="nel_mesh_lib" Name="nel_mesh_lib"
ProjectGUID="{76F225A9-306F-4B99-9606-6B98B680F5FB}" ProjectGUID="{76F225A9-306F-4B99-9606-6B98B680F5FB}"
RootNamespace="nel_mesh_lib" RootNamespace="nel_mesh_lib"
@ -87,75 +87,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_LIB"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(RootNamespace)_r.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -226,6 +157,76 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_LIB"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(RootNamespace)_r.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -416,7 +417,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -424,7 +425,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"

View file

@ -19,6 +19,7 @@
#include "PO2RPO.h" #include "PO2RPO.h"
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
extern ClassDesc2* GetPO2RPODesc(); extern ClassDesc2* GetPO2RPODesc();
extern ClassDesc* GetRPODesc(); extern ClassDesc* GetRPODesc();
@ -38,6 +39,12 @@ int controlsInit = FALSE;
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{ {
if (!NLMISC::INelContext::isContextInitialised())
{
new NLMISC::CLibraryContext(GetSharedNelContext());
nldebug("NeL Export: DllMain");
}
if(fdwReason == DLL_PROCESS_ATTACH) if(fdwReason == DLL_PROCESS_ATTACH)
{ {
// Hang on to this DLL's instance handle. // Hang on to this DLL's instance handle.

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="nel_patch_converter" Name="nel_patch_converter"
ProjectGUID="{96D44787-9D7B-4998-A24F-79FDBF548F21}" ProjectGUID="{96D44787-9D7B-4998-A24F-79FDBF548F21}"
RootNamespace="nelconvertpatch" RootNamespace="nelconvertpatch"
@ -99,88 +99,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib odbc32.lib odbccp32.lib comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib paramblk2.lib maxutil.lib version.lib freetype.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -263,6 +181,89 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib odbc32.lib odbccp32.lib comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib paramblk2.lib maxutil.lib version.lib freetype.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="nel_patch_edit" Name="nel_patch_edit"
ProjectGUID="{53B9D9A1-AE6B-4E39-82B2-E8EE01075EEC}" ProjectGUID="{53B9D9A1-AE6B-4E39-82B2-E8EE01075EEC}"
RootNamespace="neleditpatch" RootNamespace="neleditpatch"
@ -99,88 +99,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib helpsys.lib winmm.lib libxml2.lib comctl32.lib delayimp.lib bmm.lib core.lib edmodel.lib geom.lib gfx.lib mesh.lib mnmath.lib paramblk2.lib maxutil.lib acap.lib version.lib freetype.lib ws2_32.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -263,6 +181,90 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib helpsys.lib winmm.lib libxml2.lib comctl32.lib delayimp.lib bmm.lib core.lib edmodel.lib geom.lib gfx.lib mesh.lib mnmath.lib paramblk2.lib maxutil.lib acap.lib version.lib freetype.lib ws2_32.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"

View file

@ -15,6 +15,7 @@
#include "editpat.h" #include "editpat.h"
#include <nel/misc/debug.h> #include <nel/misc/debug.h>
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
HINSTANCE hInstance; HINSTANCE hInstance;
int controlsInit = FALSE; int controlsInit = FALSE;
@ -24,6 +25,13 @@ using namespace NLMISC;
/** public functions **/ /** public functions **/
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{ {
// initialize nel context
if (!NLMISC::INelContext::isContextInitialised())
{
new NLMISC::CLibraryContext(GetSharedNelContext());
nldebug("NeL Patch Edit: DllMain");
}
if (fdwReason == DLL_PROCESS_ATTACH) if (fdwReason == DLL_PROCESS_ATTACH)
{ {
hInstance = hinstDLL; hInstance = hinstDLL;

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="nel_patch_lib" Name="nel_patch_lib"
ProjectGUID="{6184F873-7BED-4096-A592-C7AA577B4480}" ProjectGUID="{6184F873-7BED-4096-A592-C7AA577B4480}"
RootNamespace="nel_patch_lib" RootNamespace="nel_patch_lib"
@ -87,75 +87,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_LIB"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(RootNamespace)_r.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -226,6 +157,76 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="4"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_LIB"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(RootNamespace)_r.lib"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -340,7 +341,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -348,7 +349,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"

View file

@ -2,6 +2,7 @@
#include "nel_patch_paint.h" #include "nel_patch_paint.h"
#include "nel/misc/debug.h" #include "nel/misc/debug.h"
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
HINSTANCE hInstance; HINSTANCE hInstance;
int controlsInit = FALSE; int controlsInit = FALSE;
@ -13,7 +14,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{ {
// initialize nel context // initialize nel context
if (!NLMISC::INelContext::isContextInitialised()) if (!NLMISC::INelContext::isContextInitialised())
new NLMISC::CApplicationContext(); {
new NLMISC::CLibraryContext(GetSharedNelContext());
nldebug("NeL Patch Paint: DllMain");
}
hInstance = hinstDLL; hInstance = hinstDLL;

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="nel_patch_paint" Name="nel_patch_paint"
ProjectGUID="{118E27D8-E402-486D-B7B6-B9E8827FE716}" ProjectGUID="{118E27D8-E402-486D-B7B6-B9E8827FE716}"
RootNamespace="nelpaintpatch" RootNamespace="nelpaintpatch"
@ -99,88 +99,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib helpsys.lib winmm.lib libxml2.lib comctl32.lib delayimp.lib bmm.lib core.lib edmodel.lib geom.lib gfx.lib mesh.lib mnmath.lib paramblk2.lib maxutil.lib acap.lib version.lib freetype.lib ws2_32.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -263,6 +181,90 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib helpsys.lib winmm.lib libxml2.lib comctl32.lib delayimp.lib bmm.lib core.lib edmodel.lib geom.lib gfx.lib mesh.lib mnmath.lib paramblk2.lib maxutil.lib acap.lib version.lib freetype.lib ws2_32.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -395,7 +397,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -403,7 +405,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -435,7 +437,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -443,7 +445,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -475,7 +477,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -483,7 +485,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -515,7 +517,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -523,7 +525,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -555,7 +557,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -563,7 +565,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -595,7 +597,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -603,7 +605,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -635,7 +637,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -643,7 +645,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -675,7 +677,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -683,7 +685,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -715,7 +717,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -723,7 +725,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -755,7 +757,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -763,7 +765,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -795,7 +797,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -803,7 +805,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -835,7 +837,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -843,7 +845,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -875,7 +877,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -883,7 +885,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -915,7 +917,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -923,7 +925,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -955,7 +957,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -963,7 +965,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -995,7 +997,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1003,7 +1005,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1035,7 +1037,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1043,7 +1045,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1075,7 +1077,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1083,7 +1085,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1115,7 +1117,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1123,7 +1125,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1155,7 +1157,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1163,7 +1165,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1195,7 +1197,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1203,7 +1205,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1235,7 +1237,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1243,7 +1245,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1275,7 +1277,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1283,7 +1285,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1315,7 +1317,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1323,7 +1325,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1472,7 +1474,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Release|Win32" Name="Debug|x64"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"
@ -1480,7 +1482,7 @@
/> />
</FileConfiguration> </FileConfiguration>
<FileConfiguration <FileConfiguration
Name="Debug|x64" Name="Release|Win32"
> >
<Tool <Tool
Name="VCCLCompilerTool" Name="VCCLCompilerTool"

View file

@ -1,11 +1,19 @@
#include "vertex_tree_paint.h" #include "vertex_tree_paint.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
HINSTANCE hInstance; HINSTANCE hInstance;
BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved) BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{
// initialize nel context
if (!NLMISC::INelContext::isContextInitialised())
{ {
new NLMISC::CLibraryContext(GetSharedNelContext());
nldebug("NeL Vertex Tree Paint: DllMain");
}
hInstance = hinstDLL; // Hang on to this DLL's instance handle. hInstance = hinstDLL; // Hang on to this DLL's instance handle.
switch (fdwReason) { switch (fdwReason) {
@ -16,31 +24,31 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
} }
return (TRUE); return (TRUE);
} }
__declspec( dllexport ) const TCHAR* LibDescription() __declspec( dllexport ) const TCHAR* LibDescription()
{ {
return GetString(IDS_LIBDESCRIPTION); return GetString(IDS_LIBDESCRIPTION);
} }
__declspec( dllexport ) int LibNumberClasses() __declspec( dllexport ) int LibNumberClasses()
{ {
return 1; return 1;
} }
__declspec( dllexport ) ClassDesc* LibClassDesc(int i) __declspec( dllexport ) ClassDesc* LibClassDesc(int i)
{ {
switch(i) { switch(i) {
case 0: return GetVertexPaintDesc(); case 0: return GetVertexPaintDesc();
default: return 0; default: return 0;
} }
} }
__declspec( dllexport ) ULONG LibVersion() __declspec( dllexport ) ULONG LibVersion()
{ {
return VERSION_3DSMAX; return VERSION_3DSMAX;
} }
// Let the plug-in register itself for deferred loading // Let the plug-in register itself for deferred loading
__declspec( dllexport ) ULONG CanAutoDefer() __declspec( dllexport ) ULONG CanAutoDefer()
@ -49,11 +57,11 @@ __declspec( dllexport ) ULONG CanAutoDefer()
} }
TCHAR *GetString(int id) TCHAR *GetString(int id)
{ {
static TCHAR buf[256]; static TCHAR buf[256];
if (hInstance) if (hInstance)
return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL; return LoadString(hInstance, id, buf, sizeof(buf)) ? buf : NULL;
return NULL; return NULL;
} }

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="nel_vertex_tree_paint" Name="nel_vertex_tree_paint"
ProjectGUID="{680F9C48-975D-425A-89DF-D7AC3C093968}" ProjectGUID="{680F9C48-975D-425A-89DF-D7AC3C093968}"
RootNamespace="vertex_tree_paint" RootNamespace="vertex_tree_paint"
@ -99,91 +99,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
EnableEnhancedInstructionSet="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib helpsys.lib winmm.lib libxml2.lib comctl32.lib delayimp.lib bmm.lib core.lib edmodel.lib geom.lib gfx.lib mesh.lib mnmath.lib paramblk2.lib maxutil.lib acap.lib version.lib freetype.lib ws2_32.lib"
OutputFile="..\plugins\$(ProjectName)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(RootNamespace).def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(ProjectName)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -266,6 +181,90 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="maxscrpt.lib helpsys.lib winmm.lib libxml2.lib comctl32.lib delayimp.lib bmm.lib core.lib edmodel.lib geom.lib gfx.lib mesh.lib mnmath.lib paramblk2.lib maxutil.lib acap.lib version.lib freetype.lib ws2_32.lib"
OutputFile="..\plugins\$(ProjectName)_r.dlm"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(RootNamespace).def"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(ProjectName)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"

View file

@ -1170,6 +1170,11 @@ LocalModData* VertexPaintData::Clone()
void VertexPaintData::SynchVerts(Mesh &m) void VertexPaintData::SynchVerts(Mesh &m)
{ {
if (mesh == NULL)
{
nlwarning("mesh == NULL");
return;
}
if(nverts) if(nverts)
delete [] nverts; delete [] nverts;

View file

@ -19,6 +19,15 @@
#include "istdplug.h" #include "istdplug.h"
#include "modstack.h" #include "modstack.h"
#ifdef min
#undef min
#endif
#ifdef max
#undef max
#endif
#define NL_MAP_ASSERT
#include <nel/misc/debug.h>
#define VERTEX_TREE_PAINT_CLASS_ID Class_ID(0x40c7005e, 0x2a95082c) #define VERTEX_TREE_PAINT_CLASS_ID Class_ID(0x40c7005e, 0x2a95082c)
#define CID_PAINT (CID_USER+0x439c) #define CID_PAINT (CID_USER+0x439c)

View file

@ -1,6 +1,6 @@
 
Microsoft Visual Studio Solution File, Format Version 10.00 Microsoft Visual Studio Solution File, Format Version 10.00
# Visual C++ Express 2008 # Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nel_3dsmax_shared", "nel_3dsmax_shared\nel_3dsmax_shared.vcproj", "{CDFC60B0-9D01-4822-ACAD-B66F7130FCAD}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nel_3dsmax_shared", "nel_3dsmax_shared\nel_3dsmax_shared.vcproj", "{CDFC60B0-9D01-4822-ACAD-B66F7130FCAD}"
ProjectSection(ProjectDependencies) = postProject ProjectSection(ProjectDependencies) = postProject
{263C0F2E-112D-437F-A6AB-DEA151A7A1F0} = {263C0F2E-112D-437F-A6AB-DEA151A7A1F0} {263C0F2E-112D-437F-A6AB-DEA151A7A1F0} = {263C0F2E-112D-437F-A6AB-DEA151A7A1F0}
@ -155,6 +155,10 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nel_patch_edit", "nel_patch
EndProjectSection EndProjectSection
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nel_vertex_tree_paint", "nel_vertex_tree_paint\nel_vertex_tree_paint.vcproj", "{680F9C48-975D-425A-89DF-D7AC3C093968}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "nel_vertex_tree_paint", "nel_vertex_tree_paint\nel_vertex_tree_paint.vcproj", "{680F9C48-975D-425A-89DF-D7AC3C093968}"
ProjectSection(ProjectDependencies) = postProject
{44B21233-EFCC-4825-B5E5-3A3BD6CC5516} = {44B21233-EFCC-4825-B5E5-3A3BD6CC5516}
{CDFC60B0-9D01-4822-ACAD-B66F7130FCAD} = {CDFC60B0-9D01-4822-ACAD-B66F7130FCAD}
EndProjectSection
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution

View file

@ -0,0 +1,183 @@
include "nel_utility.ms"
fn getAbsoluteSource t =
(
return (mapPaths.getFullFilePath ((getFilenameFile (filenameFromPath t)) + ".png"))
)
fn getAbsoluteDestination t =
(
if ((findString t "\\\\Amiga") != undefined) then
(
return ("W:\\" + (substring (getFilenamePath t) 11 -1) + "\\" + (getFilenameFile (filenameFromPath t)) + ".png")
)
else if ((findString t "\\\\amiga") != undefined) then
(
return ("W:\\" + (substring (getFilenamePath t) 11 -1) + "\\" + (getFilenameFile (filenameFromPath t)) + ".png")
)
else if ((findString t "W:\\") != undefined) then
(
return ((getFilenamePath t) + "\\" + (getFilenameFile (filenameFromPath t)) + ".png")
)
else if ((findString t "\\tronc.") != undefined) then
(
return "W:\\database\\database_proto\\stuff\\fyros\\objects\\tronc.png"
)
else if ((findString t "\\trame.") != undefined) then
(
return "W:\\database\\stuff\\lod_actors\\texture_lod\\trame.png"
)
else if ((findString t "\\PR_MO_phytopsy_tete01_Boss.") != undefined) then
(
return "W:\\database\\Stuff\\Tryker\\Agents\\_textures\\monster\\PR_MO_phytopsy_tete01_Boss.png"
)
else
(
return t
)
)
fn getFixedTexturePath t =
(
if (doesFileExist (getAbsoluteSource t)) then
(
if not (doesFileExist (getAbsoluteDestination t)) then
(
makeDir (getFilenamePath (getAbsoluteDestination t)) all:true
renameFile (getAbsoluteSource t) (getAbsoluteDestination t)
)
if (doesFileExist (getAbsoluteDestination t)) then
(
if (getAbsoluteDestination t) != (getAbsoluteSource t) then
(
deleteFile (getAbsoluteSource t)
)
)
)
return (getAbsoluteDestination t)
)
fn renameTexture t =
(
try
(
if (t != undefined) then
(
if (classof t == NelBitmapTexture) then
(
if (t.bitmap1FileName != "") then (t.bitmap1FileName = getFixedTexturePath t.bitmap1FileName)
if (t.bitmap2FileName != "") then (t.bitmap2FileName = getFixedTexturePath t.bitmap2FileName)
if (t.bitmap3FileName != "") then (t.bitmap3FileName = getFixedTexturePath t.bitmap3FileName)
if (t.bitmap4FileName != "") then (t.bitmap4FileName = getFixedTexturePath t.bitmap4FileName)
if (t.bitmap5FileName != "") then (t.bitmap5FileName = getFixedTexturePath t.bitmap5FileName)
if (t.bitmap6FileName != "") then (t.bitmap6FileName = getFixedTexturePath t.bitmap6FileName)
if (t.bitmap7FileName != "") then (t.bitmap7FileName = getFixedTexturePath t.bitmap7FileName)
if (t.bitmap8FileName != "") then (t.bitmap8FileName = getFixedTexturePath t.bitmap8FileName)
renameTexture t.bitmap
if (t.bitmap.fileName == undefined) then
(
if (doesFileExist (mapPaths.getFullFilePath t.bitmap1FileName)) then (t.bitmap.fileName = t.bitmap1FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap2FileName)) then (t.bitmap.fileName = t.bitmap2FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap3FileName)) then (t.bitmap.fileName = t.bitmap3FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap4FileName)) then (t.bitmap.fileName = t.bitmap4FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap5FileName)) then (t.bitmap.fileName = t.bitmap5FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap6FileName)) then (t.bitmap.fileName = t.bitmap6FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap7FileName)) then (t.bitmap.fileName = t.bitmap7FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap8FileName)) then (t.bitmap.fileName = t.bitmap8FileName)
)
else if not (doesFileExist (mapPaths.getFullFilePath t.bitmap.fileName)) then
(
if (doesFileExist (mapPaths.getFullFilePath t.bitmap1FileName)) then (t.bitmap.fileName = t.bitmap1FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap2FileName)) then (t.bitmap.fileName = t.bitmap2FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap3FileName)) then (t.bitmap.fileName = t.bitmap3FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap4FileName)) then (t.bitmap.fileName = t.bitmap4FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap5FileName)) then (t.bitmap.fileName = t.bitmap5FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap6FileName)) then (t.bitmap.fileName = t.bitmap6FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap7FileName)) then (t.bitmap.fileName = t.bitmap7FileName)
else if (doesFileExist (mapPaths.getFullFilePath t.bitmap8FileName)) then (t.bitmap.fileName = t.bitmap8FileName)
)
t.delegate.RGBOutput = 0
t.delegate.monoOutput = 1
t.delegate.alphasource = 2
)
else if (classof t == Reflect_Refract) then
(
if (t.bitmapName[1] != undefined) then (t.bitmapName[1] = getFixedTexturePath t.bitmapName[1])
if (t.bitmapName[2] != undefined) then (t.bitmapName[2] = getFixedTexturePath t.bitmapName[2])
if (t.bitmapName[3] != undefined) then (t.bitmapName[3] = getFixedTexturePath t.bitmapName[3])
if (t.bitmapName[4] != undefined) then (t.bitmapName[4] = getFixedTexturePath t.bitmapName[4])
if (t.bitmapName[5] != undefined) then (t.bitmapName[5] = getFixedTexturePath t.bitmapName[5])
if (t.bitmapName[6] != undefined) then (t.bitmapName[6] = getFixedTexturePath t.bitmapName[6])
if (t.outputname != undefined) then (t.outputname = getFixedTexturePath t.outputname)
)
else
(
if (t.fileName != undefined) then (t.fileName = getFixedTexturePath t.fileName)
if (classof t == BitmapTexture) then
(
t.RGBOutput = 0
t.monoOutput = 1
t.alphasource = 2
)
)
)
)
catch
(
)
)
rollout assets_png_rollout "Properties"
(
fn do_it =
(
for m in getClassInstances BitmapTexture do
(
renameTexture m
)
for m in getClassInstances NelBitmapTexture do
(
renameTexture m
)
for m in getClassInstances NelMaterial do
(
renameTexture m.tTexture_1
renameTexture m.tTexture_2
renameTexture m.tTexture_3
renameTexture m.tTexture_4
renameTexture m.tTexture_5
renameTexture m.tTexture_6
renameTexture m.tTexture_7
renameTexture m.tTexture_8
m.delegate.DiffuseMapEnable = m.bEnableSlot_1
m.delegate.DiffuseMap = m.tTexture_1
m.delegate.AmbientMapEnable = m.bEnableSlot_1
m.delegate.AmbientMap = m.tTexture_1
m.delegate.SpecularMapEnable = m.bEnableSlot_2
m.delegate.SpecularMap = m.tTexture_2
m.delegate.SelfIllumMap = undefined
m.delegate.OpacityMap = undefined
m.delegate.FilterMap = undefined
m.delegate.BumpMap = undefined
m.delegate.DisplacementMap = undefined
m.delegate.ReflectionMap = undefined
m.delegate.RefractionMap = undefined
)
actionMan.executeAction 0 "63508" -- Views: Standard Display with Maps
actionMan.executeAction 0 "40021" -- Selection: Select All
actionMan.executeAction 0 "311" -- Tools: Zoom Extents All Selected
return 1
)
include "nel_batched_mergesave.ms"
)
assets_png_floater = newRolloutFloater "NeL Assets PNG Database" 550 874
addrollout assets_png_rollout assets_png_floater rolledUp:false

View file

@ -0,0 +1,251 @@
-- This script is a base script to include to add multiple functionality to your script
-- To use this script
-- Include it in your script into the rollout at the begining.
-- Implement a do_it function to do the job in your rollout.
-- The function should retun -1 if an arror occured, else the count of modification done
-- It the function returns <1, the project will not be overwritten
Group "Running properties"
(
RadioButtons SourceFiles "Source projects" labels:#("Current project", "All Projects in a folder") align:#left
Label DirectoryLabel "Source directory" align:#left
EditText Directory "" width:500 align:#left enabled:false
Button BrowseDirectory "Browse..." align:#left enabled:false
CheckBox Recurse "Look in subfolders" checked:false enabled:false
CheckBox Test "Test only, do not save" checked:true enabled:false
CheckBox BackupFiles "Backup files" checked:true enabled:false
CheckBox StopOnError "Stop on error" checked:true enabled:false
Label ProgressText width:500 align:#left
ProgressBar Progress width:500 align:#left
Button GoButton "Go" width:500 align:#left
)
local countModifications
local countErrors
local fileModified
local fileParsed
fn UpdateData =
(
if SourceFiles.state == 2 then
isSourceDir = true
else
isSourceDir = false
if Test.checked == true then
isTest = true
else
isTest = false
Directory.enabled = isSourceDir
BrowseDirectory.enabled = isSourceDir
Recurse.enabled = isSourceDir
Test.enabled = isSourceDir
BackupFiles.enabled = isSourceDir and (isTest == false)
StopOnError.enabled = isSourceDir
)
on SourceFiles changed state do
(
UpdateData ()
)
on Test changed state do
(
UpdateData ()
)
fn call_do_it =
(
local result
-- One more project
fileParsed = fileParsed + 1
-- Call it
result = do_it ()
-- Error ?
if result < 0 then
countErrors = countErrors + 1
else
countModifications = countModifications + result
-- Return result
return result
)
fn BackupFile file =
(
local i
local newFilename
i = 0
while true do
(
-- New file name
newFilename = file + ".backup_" + (i as string)
-- File exist ?
if (fileExist newFilename) == false then
(
if (copyFile file newFilename) == false then
return false
else
return true
)
i = i + 1
)
)
fn RecurseFolder currentDirectory =
(
local result
local file
local files
-- Parse files
files = getFiles (currentDirectory+"/*.max")
-- For each files
for i = 1 to files.count do
(
-- File name
file = files[i]
-- Progress bar
ProgressText.text = "In directory "+currentDirectory+", compute file \"" + (getFilenameFile file) + "\""
Progress.value = i*100/files.count
resetMAXFile #noprompt
-- Open the max project
if mergeMaxFile file quiet:true == true then
(
result = call_do_it ()
-- Error ?
if result < 0 then
(
if StopOnError.checked == true then
Messagebox ("Error in file " + file)
)
else
(
-- Save the max project ?
if (Test.checked == false) and (result != 0) then
(
-- Backup the max project ?
local ok
ok = true
if BackupFiles.checked == true then
(
-- Backup the file
if (BackupFile file) == false then
(
-- Don't save the file because backup has failed
ok = false
if StopOnError.checked == true then
Messagebox ("Can't backup file " + file)
-- One more error
countErrors = countErrors + 1
)
)
-- Save the max project ?
if ok == true then
(
if (saveMaxFile file) == true then
(
fileModified = fileModified + 1
)
else
(
if StopOnError.checked == true then
Messagebox ("Can't write file " + file)
-- One more error
countErrors = countErrors + 1
)
)
)
)
)
else
(
if StopOnError.checked == true then
Messagebox ("Can't load file " + file)
-- One more error
countErrors = countErrors + 1
)
)
-- Parse sub directory ?
if (Recurse.checked == true) then
(
local directories
-- Get the directories
directories = getDirectories (currentDirectory+"/*")
-- For each directories
for dir in directories do
(
RecurseFolder dir
)
)
)
on BrowseDirectory pressed do
(
local dir
try
(
dir = getSavePath () -- caption:"Select the projects directory"
if dir != undefined then
Directory.text = dir
)
catch
(
)
)
on GoButton pressed do
(
-- Reset count
countModifications = 0
countErrors = 0
fileModified = 0
fileParsed = 0
-- Get files in the shape_source_directory
if SourceFiles.state == 2 then
(
-- Should warning user ?
if (SourceFiles.state == 2) and (Test.checked == false) then
(
-- Warning !
if ((queryBox "Warning, all the files in the specified folders will be overwrited.\nYou should backup your files before executing this script.\nDo you want to continue executing this script ?" beep:true) == true) then
RecurseFolder (adjustPathStringForScript Directory.text)
)
else
(
RecurseFolder (adjustPathStringForScript Directory.text)
)
)
else
(
-- Just compute the current project
call_do_it ()
)
-- Show errors
ProgressText.text = (fileParsed as string) + " project(s) opened, " + (countModifications as string) + " project modification(s), " + (fileModified as string) + " project(s) saved, " + (countErrors as string) + " error(s)."
Progress.value = 100
)

View file

@ -16,7 +16,9 @@
#include "tile_utility.h" #include "tile_utility.h"
#include <nel/misc/common.h> #include <nel/misc/common.h>
#include <nel/misc/debug.h>
#include "nel/misc/app_context.h" #include "nel/misc/app_context.h"
#include "../nel_3dsmax_shared/nel_3dsmax_shared.h"
#include <vector> #include <vector>
extern ClassDesc2* GetTile_utilityDesc(); extern ClassDesc2* GetTile_utilityDesc();
@ -35,7 +37,10 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,ULONG fdwReason,LPVOID lpvReserved)
{ {
// initialize nel context // initialize nel context
if (!NLMISC::INelContext::isContextInitialised()) if (!NLMISC::INelContext::isContextInitialised())
new NLMISC::CApplicationContext(); {
new NLMISC::CLibraryContext(GetSharedNelContext());
nldebug("NeL Tile Utility: DllMain");
}
hInstance = hinstDLL; // Hang on to this DLL's instance handle. hInstance = hinstDLL; // Hang on to this DLL's instance handle.

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?> <?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject <VisualStudioProject
ProjectType="Visual C++" ProjectType="Visual C++"
Version="9.00" Version="9,00"
Name="tile_utility" Name="tile_utility"
ProjectGUID="{7CD7BD0D-3CF0-4698-8F3A-B770B073713B}" ProjectGUID="{7CD7BD0D-3CF0-4698-8F3A-B770B073713B}"
RootNamespace="neltileutility" RootNamespace="neltileutility"
@ -99,88 +99,6 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="version.lib libxml2.lib freetype.lib comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib winmm.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlu"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Debug|x64" Name="Debug|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"
@ -263,6 +181,89 @@
Name="VCPostBuildEventTool" Name="VCPostBuildEventTool"
/> />
</Configuration> </Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="obj\$(ConfigurationName)\$(ProjectName)"
IntermediateDirectory="obj\$(ConfigurationName)\$(ProjectName)"
ConfigurationType="2"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="4"
InlineFunctionExpansion="2"
EnableIntrinsicFunctions="true"
FavorSizeOrSpeed="1"
OmitFramePointers="true"
EnableFiberSafeOptimizations="true"
PreprocessorDefinitions="LIBXML_STATIC;WIN32;NDEBUG;ASSERT_THROW_EXCEPTION;_USRDLL"
StringPooling="true"
ExceptionHandling="2"
RuntimeLibrary="2"
DisableLanguageExtensions="false"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="version.lib libxml2.lib freetype.lib comctl32.lib bmm.lib core.lib geom.lib gfx.lib mesh.lib maxutil.lib maxscrpt.lib gup.lib paramblk2.lib winmm.lib"
OutputFile="..\plugins\$(RootNamespace)_r.dlu"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames="libc;libcmt;libcmtd;msvcrtd"
ModuleDefinitionFile="$(ProjectName).def"
ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
OptimizeReferences="2"
EnableCOMDATFolding="2"
ImportLibrary="$(RootNamespace)_r.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration <Configuration
Name="Release|x64" Name="Release|x64"
OutputDirectory="$(PlatformName)\$(ConfigurationName)" OutputDirectory="$(PlatformName)\$(ConfigurationName)"

View file

@ -0,0 +1,169 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Run all setup processes
# \date 2009-02-18 15:28GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all setup processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup build site")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, "This script will set up the buildsite configuration, and create needed directories.")
printLog(log, "To use the defaults, simply hit ENTER, else type in the new value.")
printLog(log, "Use -- if you need to insert an empty value.")
printLog(log, "")
BuildQuality = int(askVar(log, "Build Quality", str(BuildQuality)))
ToolDirectories[0] = askVar(log, "Primary Tool Directory", ToolDirectories[0]).replace("\\", "/")
ToolDirectories[1] = askVar(log, "Secondary Tool Directory", ToolDirectories[1]).replace("\\", "/")
ToolSuffix = askVar(log, "Tool Suffix", ToolSuffix)
ScriptDirectory = askVar(log, "Script Directory", os.getcwd().replace("\\", "/")).replace("\\", "/")
WorkspaceDirectory = askVar(log, "Workspace Directory", WorkspaceDirectory).replace("\\", "/")
DatabaseDirectory = askVar(log, "Database Directory", DatabaseDirectory).replace("\\", "/")
ExportBuildDirectory = askVar(log, "Export Build Directory", ExportBuildDirectory).replace("\\", "/")
ClientDataDirectory = askVar(log, "Client Data Directory", ClientDataDirectory).replace("\\", "/")
LeveldesignDirectory = askVar(log, "Leveldesign Directory", LeveldesignDirectory).replace("\\", "/")
LeveldesignDfnDirectory = askVar(log, "Leveldesign DFN Directory", LeveldesignDfnDirectory).replace("\\", "/")
LeveldesignWorldDirectory = askVar(log, "Leveldesign World Directory", LeveldesignWorldDirectory).replace("\\", "/")
MaxAvailable = int(askVar(log, "3dsMax Available", str(MaxAvailable)))
if MaxAvailable:
MaxDirectory = askVar(log, "3dsMax Directory", MaxDirectory).replace("\\", "/")
MaxUserDirectory = askVar(log, "3dsMax User Directory", MaxUserDirectory).replace("\\", "/")
MaxExecutable = askVar(log, "3dsMax Executable", MaxExecutable)
if os.path.isfile("configuration/buildsite.py"):
os.remove("configuration/buildsite.py")
sf = open("configuration/buildsite.py", "w")
sf.write("#!/usr/bin/python\n")
sf.write("# \n")
sf.write("# \\file site.py\n")
sf.write("# \\brief Site configuration\n")
sf.write("# \\date " + time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "\n")
sf.write("# \\author Jan Boon (Kaetemi)\n")
sf.write("# Python port of game data build pipeline.\n")
sf.write("# Site configuration.\n")
sf.write("# \n")
sf.write("# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>\n")
sf.write("# Copyright (C) 2010 Winch Gate Property Limited\n")
sf.write("# \n")
sf.write("# This program is free software: you can redistribute it and/or modify\n")
sf.write("# it under the terms of the GNU Affero General Public License as\n")
sf.write("# published by the Free Software Foundation, either version 3 of the\n")
sf.write("# License, or (at your option) any later version.\n")
sf.write("# \n")
sf.write("# This program is distributed in the hope that it will be useful,\n")
sf.write("# but WITHOUT ANY WARRANTY; without even the implied warranty of\n")
sf.write("# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n")
sf.write("# GNU Affero General Public License for more details.\n")
sf.write("# \n")
sf.write("# You should have received a copy of the GNU Affero General Public License\n")
sf.write("# along with this program. If not, see <http://www.gnu.org/licenses/>.\n")
sf.write("# \n")
sf.write("\n")
sf.write("\n")
sf.write("# *** SITE INSTALLATION ***\n")
sf.write("\n")
sf.write("# Use '/' in path name, not '\'\n")
sf.write("# Don't put '/' at the end of a directory name\n")
sf.write("\n")
sf.write("\n")
sf.write("# Quality option for this site (1 for BEST, 0 for DRAFT)\n")
sf.write("BuildQuality = " + str(BuildQuality) + "\n")
sf.write("\n")
sf.write("ToolDirectories = " + str(ToolDirectories) + "\n")
sf.write("ToolSuffix = \"" + str(ToolSuffix) + "\"\n")
sf.write("\n")
sf.write("# Build script directory\n")
sf.write("ScriptDirectory = \"" + str(ScriptDirectory) + "\"\n")
sf.write("WorkspaceDirectory = \"" + str(WorkspaceDirectory) + "\"\n")
sf.write("\n")
sf.write("# Data build directories\n")
sf.write("DatabaseDirectory = \"" + str(DatabaseDirectory) + "\"\n")
sf.write("ExportBuildDirectory = \"" + str(ExportBuildDirectory) + "\"\n")
sf.write("\n")
sf.write("# Client data install directory (client/data)\n")
sf.write("ClientDataDirectory = \"" + str(ClientDataDirectory) + "\"\n")
sf.write("\n")
sf.write("# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)\n")
sf.write("\n")
sf.write("# Leveldesign directories\n")
sf.write("LeveldesignDirectory = \"" + str(LeveldesignDirectory) + "\"\n")
sf.write("LeveldesignDfnDirectory = \"" + str(LeveldesignDfnDirectory) + "\"\n")
sf.write("LeveldesignWorldDirectory = \"" + str(LeveldesignWorldDirectory) + "\"\n")
sf.write("\n")
sf.write("# 3dsMax directives\n")
sf.write("MaxAvailable = " + str(MaxAvailable) + "\n")
sf.write("MaxDirectory = \"" + str(MaxDirectory) + "\"\n")
sf.write("MaxUserDirectory = \"" + str(MaxUserDirectory) + "\"\n")
sf.write("MaxExecutable = \"" + str(MaxExecutable) + "\"\n")
sf.write("\n")
sf.write("\n")
sf.write("# end of file\n")
sf.close()
sys.path.append(WorkspaceDirectory)
from projects import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the setup projects")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
mkPath(log, "configuration/project")
removeFilesRecursive(log, "configuration/project")
# For each project
for projectName in ProjectsToProcess:
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
os.chdir("processes")
try:
subprocess.call([ "python", "0_setup.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
removeFilesRecursive(log, "configuration/project")
printLog(log, "")
log.close()
if os.path.isfile("0_setup.log"):
os.remove("0_setup.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_setup.log")
shutil.move("log.log", "0_setup.log")

View file

@ -0,0 +1,73 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Run all export processes
# \date 2009-02-18 09:22GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all export processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
sys.path.append(WorkspaceDirectory)
from projects import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the export processes")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
mkPath(log, "configuration/project")
removeFilesRecursive(log, "configuration/project")
# For each project
for projectName in ProjectsToProcess:
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
os.chdir("processes")
try:
subprocess.call([ "python", "1_export.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
removeFilesRecursive(log, "configuration/project")
printLog(log, "")
log.close()
if os.path.isfile("1_export.log"):
os.remove("1_export.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_export.log")
shutil.move("log.log", "1_export.log")

View file

@ -0,0 +1,73 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Run all build processes
# \date 2009-02-18 09:22GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all build processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
sys.path.append(WorkspaceDirectory)
from projects import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the build processes")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
mkPath(log, "configuration/project")
removeFilesRecursive(log, "configuration/project")
# For each project
for projectName in ProjectsToProcess:
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
os.chdir("processes")
try:
subprocess.call([ "python", "2_build.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
removeFilesRecursive(log, "configuration/project")
printLog(log, "")
log.close()
if os.path.isfile("2_build.log"):
os.remove("2_build.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_build.log")
shutil.move("log.log", "2_build.log")

View file

@ -0,0 +1,72 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Run all install processes
# \date 2009-02-18 16:19GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all install processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("configuration")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from tools import *
sys.path.append(WorkspaceDirectory)
from projects import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the install processes")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
mkPath(log, "configuration/project")
removeFilesRecursive(log, "configuration/project")
# For each project
for projectName in ProjectsToProcess:
copyFilesRecursive(log, WorkspaceDirectory + "/" + projectName, "configuration/project")
os.chdir("processes")
try:
subprocess.call([ "python", "3_install.py" ])
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
os.chdir("..")
try:
projectLog = open("processes/log.log", "r")
projectLogData = projectLog.read()
projectLog.close()
log.write(projectLogData)
except Exception, e:
printLog(log, "<" + projectName + "> " + str(e))
removeFilesRecursive(log, WorkspaceDirectory + "/" + projectName)
copyFilesRecursive(log, "configuration/project", WorkspaceDirectory + "/" + projectName)
removeFilesRecursive(log, "configuration/project")
printLog(log, "")
log.close()
if os.path.isfile("3_install.log"):
os.remove("3_install.log")
shutil.copy("log.log", time.strftime("%Y-%m-%d-%H-%M-GMT", time.gmtime(time.time())) + "_install.log")
shutil.move("log.log", "3_install.log")

View file

@ -0,0 +1,65 @@
#!/usr/bin/python
#
# \file site.py
# \brief Site configuration
# \date 2010-06-04-21-25-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Site configuration.
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# *** SITE INSTALLATION ***
# Use '/' in path name, not ''
# Don't put '/' at the end of a directory name
# Quality option for this site (1 for BEST, 0 for DRAFT)
BuildQuality = 1
ToolDirectories = ['R:/code/nel', 'R:/code/ryzom/tools']
ToolSuffix = "_r.exe"
# Build script directory
ScriptDirectory = "W:/build_gamedata"
WorkspaceDirectory = "R:/code/ryzom/tools/build_gamedata/workspace"
# Data build directories
DatabaseDirectory = "W:/database"
ExportBuildDirectory = "W:/export"
# Client data install directory (client/data)
ClientDataDirectory = "S:/ryzom_client_open/user"
# TODO: NETWORK RECONNECT NOT IMPLEMENTED :)
# Leveldesign directories
LeveldesignDirectory = "L:/leveldesign"
LeveldesignDfnDirectory = "L:/leveldesign/dfn"
LeveldesignWorldDirectory = "L:/leveldesign/world"
# 3dsMax directives
MaxAvailable = 1
MaxDirectory = "C:/Program Files (x86)/Autodesk/3ds Max 2010"
MaxUserDirectory = "C:/Users/Kaetemi/AppData/Local/Autodesk/3dsMax/2010 - 32bit/enu"
MaxExecutable = "3dsmax.exe"
# end of file

View file

@ -0,0 +1,232 @@
#!/usr/bin/python
#
# \file export.py
# \brief Useful scripts
# \date 2009-02-18 09:22GMT
# \author Jan Boon (Kaetemi)
# Useful scripts
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
def printLog(log, text):
log.write(text + "\n")
print text
def mkPath(log, path):
printLog(log, "DIR " + path)
distutils.dir_util.mkpath(path)
def needUpdate(log, source, dest):
if (os.path.isfile(source)):
if (os.path.isfile(dest)):
if (os.stat(source).st_mtime > os.stat(dest).st_mtime):
return 1
else:
return 0
return 1
printLog(log, "needUpdate: source doest not exist?! " + source)
return 0
def needUpdateRemoveDest(log, source, dest):
if (os.path.isfile(source)):
if (os.path.isfile(dest)):
if (os.stat(source).st_mtime > os.stat(dest).st_mtime):
os.remove(dest)
return 1
else:
return 0
return 1
printLog(log, "needUpdate: source doest not exist?! " + source)
return 0
def needUpdateLogRemoveDest(log, source, dest):
if (os.path.isfile(source)):
if (os.path.isfile(dest)):
if (os.stat(source).st_mtime > os.stat(dest).st_mtime):
os.remove(dest)
printLog(log, source + " -> " + dest)
return 1
else:
printLog(log, "SKIP " + dest)
return 0
printLog(log, source + " -> " + dest)
return 1
printLog(log, "needUpdate: source doest not exist?! " + source)
printLog(log, "SKIP " + dest)
return 0
def copyFileList(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn":
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
def copyFileListNoTree(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn":
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName))
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName))
def copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
srcFile = dir_source + "/" + fileName
destFile = dir_target + "/" + os.path.basename(fileName)
if needUpdateLogRemoveDest(log, srcFile, destFile):
shutil.copy(srcFile, destFile)
def removeFilesRecursive(log, dir_files):
files = os.listdir(dir_files)
for fileName in files:
if (fileName != ".svn"):
if os.path.isdir(dir_files + "/" + fileName):
removeFilesRecursive(log, dir_files + "/" + fileName)
else:
printLog(log, "RM " + dir_files + "/" + fileName)
os.remove(dir_files + "/" + fileName)
def copyFilesRecursive(log, dir_source, dir_target):
files = os.listdir(dir_source)
mkPath(log, dir_target)
for fileName in files:
if (fileName != ".svn"):
if os.path.isdir(dir_source + "/" + fileName):
copyFilesRecursive(log, dir_source + "/" + fileName, dir_target + "/" + fileName)
else:
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
def copyFiles(log, dir_source, dir_target):
copyFileList(log, dir_source, dir_target, os.listdir(dir_source))
def copyFilesExt(log, dir_source, dir_target, file_ext):
files = os.listdir(dir_source)
len_file_ext = len(file_ext)
for fileName in files:
if (fileName != ".svn") and (fileName[-len_file_ext:].lower() == file_ext.lower()):
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + fileName)
shutil.copy(dir_source + "/" + fileName, dir_target + "/" + fileName)
def copyFilesExtNoTree(log, dir_source, dir_target, file_ext):
files = findFiles(log, dir_source, "", file_ext)
copyFileListNoTree(log, dir_source, dir_target, files)
def copyFilesExtNoTreeIfNeeded(log, dir_source, dir_target, file_ext):
files = findFiles(log, dir_source, "", file_ext)
copyFileListNoTreeIfNeeded(log, dir_source, dir_target, files)
def copyFilesNoTreeIfNeeded(log, dir_source, dir_target):
copyFileListNoTreeIfNeeded(log, dir_source, dir_target, os.listdir(dir_source))
def copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext):
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
srcFile = dir_source + "/" + fileName
destFile = dir_target + "/" + os.path.basename(fileName)[0:-len(file_ext)] + target_ext
if needUpdateLogRemoveDest(log, srcFile, destFile):
shutil.copy(srcFile, destFile)
def copyFilesExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, file_ext, target_ext):
files = findFiles(log, dir_source, "", file_ext)
copyFileListExtReplaceNoTreeIfNeeded(log, dir_source, dir_target, files, file_ext, target_ext)
def copyFileIfNeeded(log, srcFile, destFile):
if needUpdateLogRemoveDest(log, srcFile, destFile):
shutil.copy(srcFile, destFile)
def moveFileListNoTree(log, dir_source, dir_target, files):
for fileName in files:
if fileName != ".svn":
printLog(log, dir_source + "/" + fileName + " -> " + dir_target + "/" + os.path.basename(fileName))
shutil.move(dir_source + "/" + fileName, dir_target + "/" + os.path.basename(fileName))
def moveFilesExtNoTree(log, dir_source, dir_target, file_ext):
files = findFiles(log, dir_source, "", file_ext)
moveFileListNoTree(log, dir_source, dir_target, files)
def findFiles(log, dir_where, dir_sub, file_ext):
result = [ ]
files = os.listdir(dir_where + "/" + dir_sub)
len_file_ext = len(file_ext)
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
filePath = dir_sub + fileName
fileFull = dir_where + "/" + dir_sub + fileName
if os.path.isfile(fileFull):
if fileName[-len_file_ext:].lower() == file_ext.lower():
result += [ filePath ]
elif os.path.isdir(fileFull):
result += findFiles(log, dir_where, filePath + "/", file_ext)
else:
printLog(log, "findFiles: file not dir or file?!" + filePath)
return result
def findFile(log, dir_where, file_name):
files = os.listdir(dir_where)
for fileName in files:
if fileName != ".svn" and fileName != "*.*":
filePath = dir_where + "/" + fileName
if os.path.isfile(filePath):
if fileName == file_name:
return filePath
elif os.path.isdir(filePath):
result = findFile(log, filePath, file_name)
if result != "":
return result
else:
printLog(log, "findFile: file not dir or file?! " + filePath)
return ""
def findTool(log, dirs_where, file_name, suffix):
try:
for dir in dirs_where:
tool = findFile(log, dir, file_name + suffix)
if tool != "":
printLog(log, "TOOL " + tool)
return tool
except Exception, e:
printLog(log, "EXCEPTION " + str(e))
printLog(log, "TOOL NOT FOUND " + file_name + suffix)
return ""
def findMax(log, dir, file):
tool = dir + "/" + file
if os.path.isfile(tool):
printLog(log, "3DSMAX " + tool)
return tool
printLog(log, "3DSMAX NOT FOUND " + file)
return ""
def toolLogFail(log, tool, suffix):
printLog(log, "FAIL " + tool + suffix + " is not found")
def askVar(log, name, default):
sys.stdout.write(name + " (" + default + "): ")
line = sys.stdin.readline()
linestrip = line.strip()
if linestrip == "--":
log.write(name + " (" + default + "): ''\n")
return ""
elif linestrip == "":
log.write(name + " (" + default + "): '" + default + "'\n")
return default
else:
log.write(name + " (" + default + "): '" + linestrip + "'\n")
return linestrip

View file

@ -0,0 +1,81 @@
#!/usr/bin/python
#
# \file process.py
# \brief Tools configuration
# \date 2009-03-10 11:33GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Tools configuration.
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
# *** PROCESS TIMEOUT ***
SkelExportTimeout = 600000
SwtExportTimeout = 600000
ShapeExportTimeout = 3600000
ZoneExportTimeout = 1800000
ZoneBuildDependTimeout = 1800000
ZoneBuildWeldTimeout = 60000
ZoneLightBuildTimeout = 600000
ZoneIgLightBuildTimeout = 600000
SmallbankBuildTimeout = 60000
FarbankBuildTimeout = 180000
AnimExportTimeout = 1800000
IgExportTimeout = 600000
MapsBuildTimeout = 10000
CmbExportTimeout = 60000
RbankBuildTesselTimeout = 6000000
RbankBuildSmoothTimeout = 6000000
RbankBuildProclocalTimeout = 6000000
RbankBuildProcglobalTimeout = 18000000
RbankBuildIndoorTimeout = 18000000
# WmapBuildTimeout = 60000
LigoExportTimeout = 3600000
LigoBuildTimeout = 1800000
PacsPrimExportTimeout = 600000
# *** TOOLS CONFIGURATION ***
TgaToDdsTool = "tga2dds"
BuildInterfaceTool = "build_interface"
ExecTimeoutTool = "exec_timeout"
BuildSmallbankTool = "build_smallbank"
BuildFarbankTool = "build_far_bank"
ZoneDependenciesTool = "zone_dependencies"
ZoneWelderTool = "zone_welder"
BuildRbankTool = "build_rbank"
BuildIndoorRbankTool = "build_indoor_rbank"
BuildIgBoxesTool = "build_ig_boxes"
AiBuildWmapTool = "ai_build_wmap"
GetNeighborsTool = "get_neighbors"
ZoneLighterTool = "zone_lighter"
ZoneIgLighterTool = "zone_ig_lighter"
IgLighterTool = "ig_lighter"
AnimBuilderTool = "anim_builder"
TileEditTool = "tile_edit"
BuildImagesetTool = "th_build_imageset"
MakeSheetIdTool = "make_sheet_id"
BuildSheetsTool = "th_build_sheets"
BuildSoundTool = "th_build_sound"
BuildCoarseMeshTool = "build_coarse_mesh"
LightmapOptimizerTool = "lightmap_optimizer"
BuildClodtexTool = "build_clodtex"
BuildShadowSkinTool = "build_shadow_skin"
PanoplyMakerTool = "panoply_maker"
HlsBankMakerTool = "hls_bank_maker"
LandExportTool = "land_export"

View file

@ -0,0 +1,80 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Run all setup processes
# \date 2009-02-18 15:28GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all setup processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../configuration")
sys.path.append("../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
#printLog(log, "")
#printLog(log, "-------")
#printLog(log, "--- Setup project")
#printLog(log, "-------")
#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
#printLog(log, "")
#printLog(log, "")
#printLog(log, "-------")
#printLog(log, "--- Setup client directories")
#printLog(log, "-------")
#printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
#printLog(log, "")
#for dir in ClientSetupDirectories:
# mkPath(log, ClientDataDirectory + "/" + dir)
#printLog(log, "")
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the setup processes")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
os.chdir(processName)
try:
subprocess.call([ "python", "0_setup.py" ])
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
os.chdir("..")
try:
processLog = open(processName + "/log.log", "r")
processLogData = processLog.read()
processLog.close()
log.write(processLogData)
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
printLog(log, "")
log.close()

View file

@ -0,0 +1,64 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Run all export processes
# \date 2009-02-18 09:22GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all export processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../configuration")
sys.path.append("../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the export processes")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
os.chdir(processName)
try:
subprocess.call([ "python", "1_export.py" ])
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
os.chdir("..")
try:
processLog = open(processName + "/log.log", "r")
processLogData = processLog.read()
processLog.close()
log.write(processLogData)
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
printLog(log, "")
log.close()

View file

@ -0,0 +1,64 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Run all build processes
# \date 2009-02-18 09:22GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all build processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../configuration")
sys.path.append("../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
# Log error
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the build processes")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
os.chdir(processName)
try:
subprocess.call([ "python", "2_build.py" ])
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
os.chdir("..")
try:
processLog = open(processName + "/log.log", "r")
processLogData = processLog.read()
processLog.close()
log.write(processLogData)
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
printLog(log, "")
log.close()

View file

@ -0,0 +1,63 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Run all install processes
# \date 2009-02-18 16:19GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Run all install processes
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../configuration")
sys.path.append("../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Run the install processes")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each process
for processName in ProcessToComplete:
os.chdir(processName)
try:
subprocess.call([ "python", "3_install.py" ])
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
os.chdir("..")
try:
processLog = open(processName + "/log.log", "r")
processLogData = processLog.read()
processLog.close()
log.write(processLogData)
except Exception, e:
printLog(log, "<" + processName + "> " + str(e))
# subprocess.call("idle.bat")
printLog(log, "")
log.close()

View file

@ -0,0 +1,66 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Setup anim
# \date 2009-03-10 14:56GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup anim
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup anim")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
for dir in AnimSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory)
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + AnimBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + AnimClientDirectory)
log.close()
# end of file

View file

@ -0,0 +1,63 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export anim
# \date 2009-03-10 13:13GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export anim
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export anim")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
Max = findMax(log, MaxDirectory, MaxExecutable)
printLog(log, "")
# For each anim directory
printLog(log, ">>> Export anim 3dsmax <<<")
printLog(log, "********************************")
printLog(log, "******** TODO ********")
printLog(log, "********************************")
mkPath(log, ExportBuildDirectory + "/" + AnimExportDirectory)
for dir in AnimSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,65 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build anim
# \date 2009-03-10 13:13GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build anim
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build anim")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
AnimBuilder = findTool(log, ToolDirectories, AnimBuilderTool, ToolSuffix)
printLog(log, "")
# For each anim directory
printLog(log, ">>> Build anim <<<")
if AnimBuilder == "":
toolLogFail(log, AnimBuilderTool, ToolSuffix)
else:
srcDir = ExportBuildDirectory + "/" + AnimExportDirectory
mkPath(log, srcDir)
destDir = ExportBuildDirectory + "/" + AnimBuildDirectory
mkPath(log, destDir)
subprocess.call([ AnimBuilder, srcDir, destDir, ScriptDirectory + "/configuration/zone_lighter_properties.cfg" ])
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,57 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install anim
# \date 2009-03-10 13:13GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install anim
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install anim")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install anim <<<")
srcDir = ExportBuildDirectory + "/" + AnimBuildDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + AnimClientDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,65 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Setup cegui
# \date 2009-03-14-17-46-GMT
# \author Jan Boon (Kaetemi)
# Setup cegui
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup cegui")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
for dir in CeguiImagesetSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetExportDirectory)
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + CeguiImagesetClientDirectory)
log.close()
# end of file

View file

@ -0,0 +1,67 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export cegui
# \date 2009-03-14-17-46-GMT
# \author Jan Boon (Kaetemi)
# Export cegui
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export cegui")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# For each cegui imageset directory
printLog(log, ">>> Export cegui imagesets <<<")
destDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory
mkPath(log, destDir)
for dir in CeguiImagesetSourceDirectories:
srcDir = DatabaseDirectory + "/" + dir
mkPath(log, srcDir)
imagesets = findFiles(log, srcDir, "", ".imageset")
if (len(imagesets) != 1):
printLog(log, "FAIL Cannot find *.imageset, folder must contain at least one and only one imageset xml file")
else:
niouname = dir.replace("/", "_")
newpath = destDir + "/" + niouname
mkPath(log, newpath)
copyFileIfNeeded(log, srcDir + "/" + imagesets[0], newpath + ".imageset")
copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".tga")
copyFilesExtNoTreeIfNeeded(log, srcDir, newpath, ".png")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,67 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build cegui
# \date 2009-03-14-17-46-GMT
# \author Jan Boon (Kaetemi)
# Build cegui
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build cegui")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
BuildImageset = findTool(log, ToolDirectories, BuildImagesetTool, ToolSuffix)
printLog(log, "")
# For each cegui imageset directory
printLog(log, ">>> Build cegui imagesets <<<")
if BuildImageset == "":
toolLogFail(log, BuildImagesetTool, ToolSuffix)
else:
srcDir = ExportBuildDirectory + "/" + CeguiImagesetExportDirectory
mkPath(log, srcDir)
destDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory
mkPath(log, destDir)
for dir in os.listdir(srcDir):
if (os.path.isdir(srcDir + "/" + dir)) and dir != ".svn" and dir != "*.*":
mkPath(log, srcDir + "/" + dir)
subprocess.call([ BuildImageset, destDir + "/" + dir + ".tga", srcDir + "/" + dir ])
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,56 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install cegui
# \date 2009-03-14-17-46-GMT
# \author Jan Boon (Kaetemi)
# Install cegui
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install cegui")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install cegui imagesets <<<")
srcDir = ExportBuildDirectory + "/" + CeguiImagesetBuildDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + CeguiImagesetClientDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,269 @@
-- Some globals
NEL3D_APPDATA_DONOTEXPORT = 1423062565 -- do not export me : "undefined" = export me
-- "0" = export me
-- "1" = DONT export me
NEL3D_APPDATA_CHARACTER_LOD = 1423062618 -- "1": I am a character lod if "1". "0" or undefined: I am not.
-- Allocate 20 Me for the script
heapSize += 15000000
nlErrorFilename = "output_logfile"
nlErrorStream = openFile nlErrorFilename mode:"a"
if nlErrorStream == undefined then
nlErrorStream = createFile nlErrorFilename
-- Unhide category
fn unhidecategory =
(
if (geometry.count > 0) then
(
unhide geometry[1]
if (geometry[1].ishidden == true) then
max hide object toggle
)
if (shapes.count > 0) then
(
unhide shapes[1]
if (shapes[1].ishidden == true) then
max hide shape toggle
)
if (lights.count > 0) then
(
unhide lights[1]
if (lights[1].ishidden == true) then
max hide light toggle
)
if (cameras.count > 0) then
(
unhide cameras[1]
if (cameras[1].ishidden == true) then
max hide camera toggle
)
if (helpers.count > 0) then
(
unhide helpers[1]
if (helpers[1].ishidden == true) then
max hide helper toggle
)
)
-- Log a message
fn nlerror message =
(
if nlErrorStream != undefined then
(
format "%\n" message to:nlErrorStream
flush nlErrorStream
)
-- To the console
print message
)
-- Must export this node ?
fn isToBeExported node =
(
if ((classof node) == RklPatch) then
return false
if ((classof node) == nel_ps) then
return false
if ((classof node) == nel_pacs_cylinder) then
return false
if ((classof node) == nel_pacs_box) then
return false
doNotExport = getappdata node NEL3D_APPDATA_DONOTEXPORT
if (doNotExport != undefined) then
(
if (doNotExport == "1") then
return false
)
return true
)
-- is this node flagged as a LodCharacter ??
fn isLodCharacter node =
(
isCLod = getappdata node NEL3D_APPDATA_CHARACTER_LOD
if (isCLod == undefined) then
return false
if (isCLod == "1") then
return true
return false
)
fn goClodExport =
(
try
(
-- Get files in the shape_source_directory
files = getFiles "shape_source_directory/*.max"
-- Sort files
sort files
-- No file ?
if files.count != 0 then
(
-- For each files
for i = 1 to files.count do
(
try
(
-- Ok ?
ok = false
-- Free memory and file handles
gc ()
-- Reset 3dsmax
resetMAXFile #noprompt
-- Get the tag file name
tag = ("output_directory_tag/"+(getFilenameFile files[i])+(getFilenameType files[i])+".tag")
-- Compare date with the tag file
if (NeLTestFileDate tag files[i]) == true then
(
-- Open the max project
nlerror ("Scanning file "+files[i]+" ...")
if loadMaxFile files[i] quiet:true == true then
(
-- Unhide category
unhidecategory()
tagThisFile = true
-- Unhide
max unhide all
-- unselect
max select none
-- Exported object count
exported = 0
-- For each node
for node in geometry do
(
-- It is root ?
if (node.parent == undefined) then
(
-- Can be exported ?
if (isToBeExported node == true) then
(
-- Is a Lod character?
if ((isLodCharacter node) == true) then
(
-- Output directory
output = ("output_directory_clod/"+(node.name)+".clod")
-- Compare file date
if (NeLTestFileDate output files[i]) == true then
(
try
(
-- Export the shape
if (NelExportLodCharacter node output false) == true then
(
nlerror ("OK "+output)
exported = exported+1
)
else
(
-- Error
nlerror ("ERROR exporting .clod "+node.name+" in file "+files[i])
tagThisFile = false
)
)
catch
(
-- Error
nlerror ("ERROR fatal error exporting .clod "+node.name+" in file "+files[i])
tagThisFile = false
return 0
)
)
else
(
-- Error
nlerror ("SKIPPED "+output)
exported = exported+1
)
)
)
)
)
-- Something exported
if (exported == 0) then
(
-- Error
nlerror ("WARNING no .clod exported from the file "+files[i])
)
-- Write a tag file
if tagThisFile == true then
(
tagFile = createFile tag
if tagFile == undefined then
(
nlerror ("WARNING can't create tag file "+tag)
)
else
(
print "toto" to: tagFile
close tagFile
)
)
)
else
(
-- Error
nlerror ("ERROR exporting .clod: can't open the file "+files[i])
)
)
else
(
-- Error
nlerror ("SKIPPED BY TAG "+files[i])
)
gc ()
-- Reset 3dsmax
resetMAXFile #noprompt
)
catch
(
-- Error
nlerror ("ERROR fatal error exporting .clod in file " + files[i])
-- break
)
)
)
else
(
nlerror ("WARNING no max file in folder shape_source_directory")
)
)
catch
(
-- Error
nlerror ("ERROR fatal error exporting .clod in folder shape_source_directory")
return 0
)
)
goClodExport()
nlerror ("BYE")
quitMAX #noPrompt
quitMAX () #noPrompt

View file

@ -0,0 +1,65 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Setup displace
# \date 2009-03-10-21-45-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup displace
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup displace")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
for dir in DisplaceSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory)
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + DisplaceClientDirectory)
log.close()
# end of file

View file

@ -0,0 +1,55 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export displace
# \date 2009-03-10-21-45-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export displace
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export displace")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory)
for dir in DisplaceSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".tga")
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + DisplaceExportDirectory, ".png")
log.close()
# end of file

View file

@ -0,0 +1,49 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build displace
# \date 2009-03-10-21-45-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build displace
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build displace")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,57 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install displace
# \date 2009-03-10-21-45-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install displace
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install displace")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install displace <<<")
clientPath = ClientDataDirectory + "/" + DisplaceClientDirectory
mkPath(log, clientPath)
mkPath(log, ExportBuildDirectory + "/" + DisplaceExportDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, clientPath, ".tga")
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + DisplaceExportDirectory, clientPath, ".png")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,66 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief setup farbank
# \date 2009-03-10-21-12-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup farbank
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup farbank")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
for postfix in MultipleTilesPostfix:
mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory)
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + BankClientDirectory)
log.close()
# end of file

View file

@ -0,0 +1,49 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export farbank
# \date 2009-03-10-21-12-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export farbank
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export farbank")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,74 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build farbank
# \date 2009-03-10-21-12-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build farbank
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build farbank")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
ExecTimeout = findTool(log, ToolDirectories, ExecTimeoutTool, ToolSuffix)
BuildFarbank = findTool(log, ToolDirectories, BuildFarbankTool, ToolSuffix)
printLog(log, "")
# For each bank export farbank
printLog(log, ">>> Build farbank <<<")
if ExecTimeout == "":
toolLogFail(log, ExecTimeoutTool, ToolSuffix)
elif BuildFarbank == "":
toolLogFail(log, BuildFarbankTool, ToolSuffix)
else:
mkPath(log, ExportBuildDirectory + "/" + SmallbankExportDirectory)
mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
files = findFiles(log, ExportBuildDirectory + "/" + SmallbankExportDirectory, "", ".smallbank")
for file in files:
sourceFile = ExportBuildDirectory + "/" + SmallbankExportDirectory + "/" + file
if os.path.isfile(sourceFile):
for postfix in MultipleTilesPostfix:
destFile = ExportBuildDirectory + "/" + FarbankBuildDirectory + "/" + file[0:-len(".smallbank")] + postfix + ".farbank"
if (needUpdateLogRemoveDest(log, sourceFile, destFile)):
mkPath(log, DatabaseDirectory + "/" + TileRootSourceDirectory + postfix)
subprocess.call([ ExecTimeout, str(FarbankBuildTimeout), BuildFarbank, sourceFile, destFile, "-d" + DatabaseDirectory + "/" + TileRootSourceDirectory + postfix + "/", "-p" + postfix ])
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,55 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install farbank
# \date 2009-03-10-21-12-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install farbank
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install farbank")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install farbank <<<")
mkPath(log, ExportBuildDirectory + "/" + FarbankBuildDirectory)
mkPath(log, ClientDataDirectory + "/" + BankClientDirectory)
copyFilesExtNoTreeIfNeeded(log, ExportBuildDirectory + "/" + FarbankBuildDirectory, ClientDataDirectory + "/" + BankClientDirectory, ".farbank")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,64 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief setup font
# \date 2009-03-10-19-43-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# setup font
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup font")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
for dir in FontSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + FontClientDirectory)
log.close()
# end of file

View file

@ -0,0 +1,51 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export font
# \date 2009-03-10-19-43-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export font
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export font")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,51 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build font
# \date 2009-03-10-19-43-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build font
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build font")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,61 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install font
# \date 2009-03-10-19-43-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install font
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install font")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
clientPath = ClientDataDirectory + "/" + FontClientDirectory
mkPath(log, clientPath)
printLog(log, ">>> Install font <<<")
for dir in FontSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".ttf")
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".afm")
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".pfb")
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, clientPath, ".pfm")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,67 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Setup ig_light
# \date 2009-03-11-15-16-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup ig_light
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup ig_light")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
#for dir in ig_lightSourceDirectories:
# mkPath(log, DatabaseDirectory + "/" + dir)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
#mkPath(log, ExportBuildDirectory + "/" + ig_lightExportDirectory)
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + IgVillageBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + IgLightVillageBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + IgClientDirectory)
log.close()
# end of file

View file

@ -0,0 +1,49 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export ig_light
# \date 2009-03-11-15-16-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export ig_light
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export ig_light")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,65 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build ig_light
# \date 2009-03-11-15-16-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build ig_light
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build ig_light")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
IgLighter = findTool(log, ToolDirectories, IgLighterTool, ToolSuffix)
printLog(log, "")
# For each ig_light directory
printLog(log, ">>> Build ig_light <<<")
if IgLighter == "":
toolLogFail(log, IgLighterTool, ToolSuffix)
else:
srcDir = ExportBuildDirectory + "/" + IgVillageBuildDirectory
mkPath(log, srcDir)
destDir = ExportBuildDirectory + "/" + IgLightVillageBuildDirectory
mkPath(log, destDir)
subprocess.call([ IgLighter, srcDir, destDir, ScriptDirectory + "/configuration/zone_lighter_properties.cfg" ])
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,57 @@
#!/usr/bin/python
#
# \file 3_install.py
# \brief Install ig_light
# \date 2009-03-11-15-16-GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Install ig_light
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Install ig_light")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
printLog(log, ">>> Install ig_light <<<")
srcDir = ExportBuildDirectory + "/" + IgLightVillageBuildDirectory
mkPath(log, srcDir)
destDir = ClientDataDirectory + "/" + IgClientDirectory
mkPath(log, destDir)
copyFilesNoTreeIfNeeded(log, srcDir, destDir)
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,76 @@
#!/usr/bin/python
#
# \file 0_setup.py
# \brief Setup interface
# \date 2009-03-10 14:56GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Setup interface
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Setup interface")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Setup source directories
printLog(log, ">>> Setup source directories <<<")
for dir in InterfaceSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
for dir in InterfaceDxtcSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
for dir in InterfaceFullscreenSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
for dir in Interface3DSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
# Setup export directories
printLog(log, ">>> Setup export directories <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory)
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory)
mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory)
mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory)
# Setup build directories
printLog(log, ">>> Setup build directories <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory)
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory)
# Setup client directories
printLog(log, ">>> Setup client directories <<<")
mkPath(log, ClientDataDirectory + "/" + InterfaceClientDirectory)
log.close()
# end of file

View file

@ -0,0 +1,96 @@
#!/usr/bin/python
#
# \file 1_export.py
# \brief Export interface
# \date 2009-03-10 13:13GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Export interface
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Export interface")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
TgaToDds = findTool(log, ToolDirectories, TgaToDdsTool, ToolSuffix)
printLog(log, "")
# For each interface directory
printLog(log, ">>> Export interface <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceExportDirectory)
for dir in InterfaceSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
niouname = dir.replace("/", "_")
newpath = ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + niouname
mkPath(log, newpath)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, newpath, ".tga")
printLog(log, "")
# For each interface directory to compress in one DXTC
printLog(log, ">>> Export interface dxtc <<<")
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory)
for dir in InterfaceDxtcSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory, ".tga")
printLog(log, "")
# For each interface fullscreen directory compress independently all in dds
printLog(log, ">>> Export interface fullscreen <<<")
if TgaToDds == "":
toolLogFail(log, TgaToDdsTool, ToolSuffix)
else:
mkPath(log, ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory)
for dir in InterfaceFullscreenSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
files = findFiles(log, DatabaseDirectory + "/" + dir, "", ".tga")
for file in files:
sourceFile = DatabaseDirectory + "/" + dir + "/" + file
destFile = ExportBuildDirectory + "/" + InterfaceFullscreenExportDirectory + "/" + os.path.basename(file)[0:-len(".tga")] + ".dds"
if needUpdateLogRemoveDest(log, sourceFile, destFile):
subprocess.call([ TgaToDds, sourceFile, "-o", destFile, "-a", "5" ])
printLog(log, "")
# For each interface 3d directory
printLog(log, ">>> Export interface 3d <<<")
mkPath(log, ExportBuildDirectory + "/" + Interface3DExportDirectory)
for dir in Interface3DSourceDirectories:
mkPath(log, DatabaseDirectory + "/" + dir)
copyFilesExtNoTreeIfNeeded(log, DatabaseDirectory + "/" + dir, ExportBuildDirectory + "/" + Interface3DExportDirectory, ".tga")
printLog(log, "")
log.close()
# end of file

View file

@ -0,0 +1,73 @@
#!/usr/bin/python
#
# \file 2_build.py
# \brief Build interface
# \date 2009-03-10 13:13GMT
# \author Jan Boon (Kaetemi)
# Python port of game data build pipeline.
# Build interface
#
# NeL - MMORPG Framework <http://dev.ryzom.com/projects/nel/>
# Copyright (C) 2010 Winch Gate Property Limited
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
import time, sys, os, shutil, subprocess, distutils.dir_util
sys.path.append("../../configuration")
sys.path.append("../../configuration/project")
if os.path.isfile("log.log"):
os.remove("log.log")
log = open("log.log", "w")
from scripts import *
from buildsite import *
from process import *
from tools import *
from directories import *
printLog(log, "")
printLog(log, "-------")
printLog(log, "--- Build interface")
printLog(log, "-------")
printLog(log, time.strftime("%Y-%m-%d %H:%MGMT", time.gmtime(time.time())))
printLog(log, "")
# Find tools
BuildInterface = findTool(log, ToolDirectories, BuildInterfaceTool, ToolSuffix)
printLog(log, "")
# For each interface directory
printLog(log, ">>> Build interface <<<")
if BuildInterface == "":
toolLogFail(log, BuildInterfaceTool, ToolSuffix)
else:
mkPath(log, ExportBuildDirectory + "/" + InterfaceBuildDirectory)
for dir in os.listdir(ExportBuildDirectory + "/" + InterfaceExportDirectory):
if (os.path.isdir(ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + dir)) and dir != ".svn" and dir != "*.*":
subprocess.call([ BuildInterface, ExportBuildDirectory + "/" + InterfaceBuildDirectory + "/texture_" + dir + ".tga", ExportBuildDirectory + "/" + InterfaceExportDirectory + "/" + dir ])
printLog(log, "")
# For each interface directory to compress in one DXTC
printLog(log, ">>> Build interface dxtc <<<")
if BuildInterface == "":
toolLogFail(log, BuildInterfaceTool, ToolSuffix)
else:
mkPath(log, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory)
subprocess.call([ BuildInterface, ExportBuildDirectory + "/" + InterfaceDxtcBuildDirectory + "/texture_interfaces_dxtc.tga", ExportBuildDirectory + "/" + InterfaceDxtcExportDirectory ])
printLog(log, "")
log.close()
# end of file

Some files were not shown because too many files have changed in this diff Show more