mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-12-21 08:28:44 +00:00
Fix Windows compilation of lightmap_optimizer
This commit is contained in:
parent
9188718dd4
commit
1bd6e0993a
1 changed files with 9 additions and 7 deletions
|
@ -33,12 +33,13 @@
|
||||||
#include "nel/3d/register_3d.h"
|
#include "nel/3d/register_3d.h"
|
||||||
|
|
||||||
#ifdef NL_OS_WINDOWS
|
#ifdef NL_OS_WINDOWS
|
||||||
#include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <dirent.h> /* for directories functions */
|
# define strnicmp NLMISC::strnicmp
|
||||||
#include <sys/types.h>
|
# include <dirent.h> /* for directories functions */
|
||||||
#include <sys/stat.h>
|
# include <sys/types.h>
|
||||||
#include <unistd.h> /* getcwd, chdir -- replacement for getCurDiretory & setCurDirectory on windows */
|
# include <sys/stat.h>
|
||||||
|
# include <unistd.h> /* getcwd, chdir -- replacement for getCurDiretory & setCurDirectory on windows */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -72,7 +73,8 @@ void dir (const std::string &sFilter, std::vector<std::string> &sAllFiles, bool
|
||||||
char sCurDir[MAX_PATH];
|
char sCurDir[MAX_PATH];
|
||||||
sAllFiles.clear ();
|
sAllFiles.clear ();
|
||||||
GetCurrentDirectory (MAX_PATH, sCurDir);
|
GetCurrentDirectory (MAX_PATH, sCurDir);
|
||||||
hFind = FindFirstFile ("*"+sFilter.c_str(), &findData);
|
std::string sFilterAsx = std::string("*") + sFilter;
|
||||||
|
hFind = FindFirstFile (sFilterAsx.c_str(), &findData);
|
||||||
while (hFind != INVALID_HANDLE_VALUE)
|
while (hFind != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
DWORD res = GetFileAttributes(findData.cFileName);
|
DWORD res = GetFileAttributes(findData.cFileName);
|
||||||
|
@ -626,7 +628,7 @@ int main(int nNbArg, char **ppArgs)
|
||||||
outString(string("ERROR: lightmaps ")+sTmp2+"*.tga not all the same size\n");
|
outString(string("ERROR: lightmaps ")+sTmp2+"*.tga not all the same size\n");
|
||||||
for (k = 0; k < (sint32)AllLightmapNames.size(); ++k)
|
for (k = 0; k < (sint32)AllLightmapNames.size(); ++k)
|
||||||
{
|
{
|
||||||
if (NLMISC::strnicmp(AllLightmapNames[k].c_str(), sTmp2.c_str(), sTmp2.size()) == 0)
|
if (strnicmp(AllLightmapNames[k].c_str(), sTmp2.c_str(), sTmp2.size()) == 0)
|
||||||
{
|
{
|
||||||
for (j = k+1; j < (sint32)AllLightmapNames.size(); ++j)
|
for (j = k+1; j < (sint32)AllLightmapNames.size(); ++j)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue