Changed: #1469 Getting last version from default branch

--HG--
branch : gsoc2012-fabien
This commit is contained in:
Fabien_HENON 2012-05-26 21:38:30 +02:00
commit dd6f2f2611
7 changed files with 19 additions and 12 deletions

View file

@ -470,12 +470,12 @@ public:
/// return a string in form "(a:b:c:d)" where a,b,c,d are components of entity id. /// return a string in form "(a:b:c:d)" where a,b,c,d are components of entity id.
std::string toString() const std::string toString() const
{ {
std::string id; std::string ident;
id.reserve(25); ident.reserve(25);
id+='('; ident+='(';
getDebugString (id); getDebugString (ident);
id+=')'; ident+=')';
return id; return ident;
} }
/// Read from a debug string, use the same format as toString() (id:type:creator:dynamic) in hexadecimal /// Read from a debug string, use the same format as toString() (id:type:creator:dynamic) in hexadecimal

View file

@ -22,6 +22,8 @@ using NL3D::NLDRIVERGLES::CDriverGL;
#else #else
using NL3D::NLDRIVERGL::CDriverGL; using NL3D::NLDRIVERGL::CDriverGL;
#endif #endif
#else
using NL3D::CDriverGL;
#endif #endif
@interface CocoaApplicationDelegate : NSObject @interface CocoaApplicationDelegate : NSObject

View file

@ -41,6 +41,8 @@ using NL3D::NLDRIVERGLES::CDriverGL;
#else #else
using NL3D::NLDRIVERGL::CDriverGL; using NL3D::NLDRIVERGL::CDriverGL;
#endif #endif
#else
using NL3D::CDriverGL;
#endif #endif
@interface CocoaOpenGLView : NSOpenGLView<NSTextInputClient> @interface CocoaOpenGLView : NSOpenGLView<NSTextInputClient>

View file

@ -23,6 +23,8 @@ using NL3D::NLDRIVERGLES::CDriverGL;
#else #else
using NL3D::NLDRIVERGL::CDriverGL; using NL3D::NLDRIVERGL::CDriverGL;
#endif #endif
#else
using NL3D::CDriverGL;
#endif #endif
@interface CocoaWindowDelegate : NSObject @interface CocoaWindowDelegate : NSObject

View file

@ -147,8 +147,9 @@ void readFormId( string& outputFileName )
// get the file type from form name // get the file type from form name
TFormId fid = (*itIF).first; TFormId fid = (*itIF).first;
string fileType; string fileType;
bool fileTypeGet = getFileType((*itIF).second, fileType);
if((*itIF).second.empty() || (*itIF).second=="." || (*itIF).second==".." || (*itIF).second[0]=='_' || (*itIF).second.find(".#")==0) if((*itIF).second.empty() || (*itIF).second=="." || (*itIF).second==".." || ((*itIF).second[0]=='_' && fileType != "sound") || (*itIF).second.find(".#")==0)
{ {
map<TFormId,string>::iterator itErase = itIF; map<TFormId,string>::iterator itErase = itIF;
++itIF; ++itIF;
@ -156,7 +157,7 @@ void readFormId( string& outputFileName )
} }
else else
{ {
if( getFileType( (*itIF).second, fileType ) ) if(fileTypeGet)
{ {
// insert the association (file type/file type id) // insert the association (file type/file type id)
map<string,uint8>::iterator itFT = FileTypeToId.find(fileType); map<string,uint8>::iterator itFT = FileTypeToId.find(fileType);
@ -290,7 +291,8 @@ void makeId( list<string>& dirs )
//----------------------------------------------- //-----------------------------------------------
void addId( string fileName ) void addId( string fileName )
{ {
if(fileName.empty() || fileName=="." || fileName==".." || fileName[0]=='_' || fileName.find(".#")==0) string extStr = CFile::getExtension( fileName );
if(fileName.empty() || fileName=="." || fileName==".." || (fileName[0]=='_' && extStr != "sound") || fileName.find(".#")==0)
{ {
//nlinfo("Discarding file '%s'", fileName.c_str()); //nlinfo("Discarding file '%s'", fileName.c_str());
NbFilesDiscarded++; NbFilesDiscarded++;
@ -300,7 +302,6 @@ void addId( string fileName )
{ {
if( !ExtensionsAllowed.empty() ) if( !ExtensionsAllowed.empty() )
{ {
string extStr = CFile::getExtension( fileName );
if( ExtensionsAllowed.find(extStr) == ExtensionsAllowed.end() ) if( ExtensionsAllowed.find(extStr) == ExtensionsAllowed.end() )
{ {
NbFilesDiscarded++; NbFilesDiscarded++;

View file

@ -31,9 +31,9 @@
# define NOMINMAX # define NOMINMAX
# include <WinSock2.h> # include <WinSock2.h>
# include <Windows.h> # include <Windows.h>
typedef unsigned long ulong;
#endif // NL_OS_WINDOWS #endif // NL_OS_WINDOWS
#include <my_global.h>
#include <mysql.h> #include <mysql.h>
using namespace NLMISC; using namespace NLMISC;

View file

@ -28,9 +28,9 @@
#ifdef NL_OS_WINDOWS #ifdef NL_OS_WINDOWS
# include <WinSock2.h> # include <WinSock2.h>
# include <Windows.h> # include <Windows.h>
typedef unsigned long ulong;
#endif #endif
#include <my_global.h>
#include <mysql.h> #include <mysql.h>
#include <time.h> #include <time.h>