From be1afc9e730a2fb7043d1dcf37722dfc404b729c Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 29 May 2010 13:42:57 +0200 Subject: [PATCH] Changed: Tga2dds tool no longer complains on every file that doesn't have _usercolor. --- code/nel/tools/3d/tga_2_dds/tga2dds.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp index 20a6b8922..c36906f75 100644 --- a/code/nel/tools/3d/tga_2_dds/tga2dds.cpp +++ b/code/nel/tools/3d/tga_2_dds/tga2dds.cpp @@ -19,7 +19,7 @@ #include "nel/misc/file.h" #include "nel/misc/bitmap.h" -#include "nel/misc/file.h" +#include "nel/misc/path.h" #include "nel/misc/debug.h" #include @@ -352,6 +352,8 @@ void dividSize (CBitmap &bitmap) // *************************************************************************** int main(int argc, char **argv) { + CApplicationContext applicationContext; + uint8 algo; // Parse Command Line. @@ -495,9 +497,9 @@ int main(int argc, char **argv) } - // Reading second Tga for user color + // Reading second Tga for user color, don't complain if _usercolor is missing NLMISC::CIFile input2; - if (input2.open(userColorFileName)) + if (CPath::exists(userColorFileName) && input2.open(userColorFileName)) { picTga2.load(input2); uint32 height2 = picTga2.getHeight();