diff --git a/CM3D2.TexTool/AssemblyInfo.cpp b/CM3D2.TexTool/AssemblyInfo.cpp index c2bfeee..8a44979 100644 --- a/CM3D2.TexTool/AssemblyInfo.cpp +++ b/CM3D2.TexTool/AssemblyInfo.cpp @@ -12,11 +12,11 @@ using namespace System::Security::Permissions; // associated with an assembly. // [assembly:AssemblyTitleAttribute(L"CM3D2TexTool")]; -[assembly:AssemblyDescriptionAttribute(L"")]; +[assembly:AssemblyDescriptionAttribute(L"A TEX2PNG converter for CM3D2/COM3D2.")]; [assembly:AssemblyConfigurationAttribute(L"")]; [assembly:AssemblyCompanyAttribute(L"")]; [assembly:AssemblyProductAttribute(L"CM3D2TexTool")]; -[assembly:AssemblyCopyrightAttribute(L"Copyright (c) 2018")]; +[assembly:AssemblyCopyrightAttribute(L"Copyright Geoffrey Horsingtin 2018")]; [assembly:AssemblyTrademarkAttribute(L"")]; [assembly:AssemblyCultureAttribute(L"")]; @@ -31,7 +31,7 @@ using namespace System::Security::Permissions; // You can specify all the value or you can default the Revision and Build Numbers // by using the '*' as shown below: -[assembly:AssemblyVersionAttribute("1.0.*")]; +[assembly:AssemblyVersionAttribute("2.0.0.0")]; [assembly:ComVisible(false)]; diff --git a/CM3D2.TexTool/CM3D2.TexTool.vcxproj b/CM3D2.TexTool/CM3D2.TexTool.vcxproj index e55376a..2cd9cef 100644 --- a/CM3D2.TexTool/CM3D2.TexTool.vcxproj +++ b/CM3D2.TexTool/CM3D2.TexTool.vcxproj @@ -166,9 +166,6 @@ {6a8518c3-d81a-4428-bd7f-c37933088ac1} - - - diff --git a/CM3D2.TexTool/CM3D2.TexTool.vcxproj.filters b/CM3D2.TexTool/CM3D2.TexTool.vcxproj.filters index 47bef53..e84e78d 100644 --- a/CM3D2.TexTool/CM3D2.TexTool.vcxproj.filters +++ b/CM3D2.TexTool/CM3D2.TexTool.vcxproj.filters @@ -52,7 +52,4 @@ Resource Files - - - \ No newline at end of file diff --git a/CM3D2.TexTool/Program.cpp b/CM3D2.TexTool/Program.cpp index 41b3a1c..6e6ce4f 100644 --- a/CM3D2.TexTool/Program.cpp +++ b/CM3D2.TexTool/Program.cpp @@ -11,92 +11,94 @@ using namespace System::Windows::Forms; namespace TexTool { - public ref class Program - { - public: - static String^ VersionNumber = Assembly::GetExecutingAssembly()->GetName()->Version->ToString(); - static String^ ProcessName = System::Diagnostics::Process::GetCurrentProcess()->ProcessName; - - void PrintHelp() - { - MessageBox::Show(String::Format(HELP, VersionNumber, ProcessName), "Info", MessageBoxButtons::OK, MessageBoxIcon::Information); - } - - void Process(array^ paths) - { - for each(String^% path in paths) - { - if (File::Exists(path)) - ProcessFile(path); - else if (Directory::Exists(path)) - ProcessDirectory(path); - else - Console::WriteLine(String::Format("[WARN] {0} is not a valid file nor directory (does it exist? can it be accessed?)", path)); - } - } - - void ProcessFile(String^ file) - { - Texture^ tex; - auto fileName = Path::GetFileNameWithoutExtension(file); - auto ext = Path::GetExtension(file)->ToLowerInvariant(); - - try - { - tex = Texture::Open(file); - } - catch (OutOfMemoryException^) - { - Console::WriteLine(String::Format("Skipping {0}{1}: Not an image (or format not supported)", fileName, ext)); - return; - } - catch (Exception^ ex) - { - Console::WriteLine(String::Format("[FAIL] Cannot parse {0}{1}: {2}", fileName, ext, ex->Message)); - return; - } - - auto newExt = gcnew String(ext == Texture::TEX_EXTENSION ? ".png" : ".tex"); - auto newName = fileName; - int i = 0; - while (File::Exists(String::Format("{0}{1}", newName, newExt))) - { - i++; - newName = fileName + (i > 0 ? i.ToString() : ""); - } - - try - { - tex->Save(String::Format("{0}{1}", newName, newExt)); - } - catch (Exception^ e) - { - Console::WriteLine(String::Format("[FAIL] Failed to save {0}{1}: {2}", newName, newExt, e->Message)); - } - delete tex; - } - - void ProcessDirectory(String^ path) - { - for each(String^% file in Directory::EnumerateFiles(path, "*", SearchOption::AllDirectories)) - ProcessFile(file); - } - }; + public ref class Program + { + public: + static String^ VersionNumber = Assembly::GetExecutingAssembly()->GetName()->Version->ToString(); + static String^ ProcessName = System::Diagnostics::Process::GetCurrentProcess()->ProcessName; + + void PrintHelp() + { + MessageBox::Show(String::Format(HELP, VersionNumber, ProcessName), "Info", MessageBoxButtons::OK, MessageBoxIcon::Information); + } + + void Process(array^ paths) + { + for each(String^% path in paths) + { + if (File::Exists(path)) + ProcessFile(path); + else if (Directory::Exists(path)) + ProcessDirectory(path); + else + Console::WriteLine(String::Format("[WARN] {0} is not a valid file nor directory (does it exist? can it be accessed?)", path)); + } + } + + void ProcessFile(String^ file) + { + Texture^ tex; + auto fileName = Path::GetFileNameWithoutExtension(file); + auto ext = Path::GetExtension(file)->ToLowerInvariant(); + + try + { + tex = Texture::Open(file); + } + catch (OutOfMemoryException^) + { + Console::WriteLine(String::Format("Skipping {0}{1}: Not an image (or format not supported)", fileName, ext)); + return; + } + catch (Exception^ ex) + { + Console::WriteLine(String::Format("[FAIL] Cannot parse {0}{1}: {2}", fileName, ext, ex->Message)); + return; + } + + auto newExt = gcnew String(ext == Texture::TEX_EXTENSION ? ".png" : ".tex"); + auto newName = fileName; + int i = 0; + + while (File::Exists(String::Format("{0}{1}", newName, newExt))) + { + i++; + newName = fileName + (i > 0 ? i.ToString() : ""); + } + + try + { + tex->Save(String::Format("{0}{1}", newName, newExt)); + } + catch (Exception^ e) + { + Console::WriteLine(String::Format("[FAIL] Failed to save {0}{1}: {2}", newName, newExt, e->Message)); + } + + delete tex; + } + + void ProcessDirectory(String^ path) + { + for each(String^% file in Directory::EnumerateFiles(path, "*", SearchOption::AllDirectories)) + ProcessFile(file); + } + }; } int main(array ^args) { - Program^ prog = gcnew Program(); + Program^ prog = gcnew Program(); - if (args->Length == 0) - { - prog->PrintHelp(); - return 0; - } + if (args->Length == 0) + { + prog->PrintHelp(); + return 0; + } - prog->Process(args); - return 0; + prog->Process(args); + return 0; } diff --git a/CM3D2.TexTool/Texture.cpp b/CM3D2.TexTool/Texture.cpp index 6d8fb6b..7f5c477 100644 --- a/CM3D2.TexTool/Texture.cpp +++ b/CM3D2.TexTool/Texture.cpp @@ -9,187 +9,192 @@ using namespace System::IO; using namespace System::Collections::Generic; using namespace System; - namespace TexTool { - static Texture::Texture() - { - TextureLoaders = gcnew Dictionary(); - - TextureLoaders->Add(TextureFormat::ARGB32, gcnew TextureLoader(LoadFromMemoryGdi)); - TextureLoaders->Add(TextureFormat::RGB24, gcnew TextureLoader(LoadFromMemoryGdi)); - TextureLoaders->Add(TextureFormat::DXT1, gcnew TextureLoader(LoadFromMemoryDxt)); - TextureLoaders->Add(TextureFormat::DXT5, gcnew TextureLoader(LoadFromMemoryDxt)); - } - - Texture::Texture(Image^ image) - { - this->_internalPath = String::Empty; - this->image = image; - } - - Texture::Texture(squish::u8* bgra, int width, int height) - { - this->_internalPath = String::Empty; - this->bgra = bgra; - image = gcnew Bitmap(width, height, width * 4, PixelFormat::Format32bppArgb, IntPtr(bgra)); - InternalPath = String::Empty; - } - - Texture::!Texture() - { - this->~Texture(); - } - - Texture::~Texture() - { - if (bgra != 0) - { - delete bgra; - bgra = 0; - } - if (image != nullptr) - delete image; - } - - Texture^ Texture::Open(String^ filename) - { - if (!File::Exists(filename)) - throw gcnew FileNotFoundException(String::Format("The path {0} is not a valid file!", filename)); - - String^ ext = Path::GetExtension(filename); - return ext == TEX_EXTENSION ? OpenTex(filename) : OpenImage(filename); - } - - Texture^ Texture::OpenImage(String^ filename) - { - return gcnew Texture(Image::FromFile(filename)); - } - - Texture^ Texture::OpenTex(String^ filename) - { - auto sw = File::OpenRead(filename); - auto br = gcnew BinaryReader(sw); - - auto tag = br->ReadString(); - if (tag != TEX_TAG) - throw gcnew FileLoadException(String::Format("File {0} is not a valid CM3D2_TEX texture", filename)); - - auto version = br->ReadInt32(); - auto originalPath = br->ReadString(); - auto width = 0; - auto height = 0; - auto texFormat = TextureFormat::ARGB32; - - if (version >= 1010) - { - width = br->ReadInt32(); - height = br->ReadInt32(); - texFormat = (TextureFormat)br->ReadInt32(); - } - - if (!Enum::IsDefined(TextureFormat::typeid, texFormat)) - throw gcnew FileLoadException(String::Format("TexTool does not support texture format {0}", (int)texFormat)); - - auto size = br->ReadInt32(); - auto data = gcnew array(size); - br->Read(data, 0, size); - - if (version == 1000) - { - width = (data[16] << 24) | (data[17] << 16) | (data[18] << 8) | data[19]; - height = (data[20] << 24) | (data[21] << 16) | (data[22] << 8) | data[23]; - } - - Texture^ tex = nullptr; - TextureLoader^ loader = nullptr; - if (TextureLoaders->TryGetValue(texFormat, loader)) - { - tex = loader(data, width, height, texFormat); - tex->InternalPath = originalPath; - } - else - { - throw gcnew FileLoadException(String::Format("Loader for format {0} is not yet implemented.", texFormat)); - } - - return tex; - } - - Texture^ Texture::LoadFromMemoryDxt(array^ data, int width, int height, TextureFormat format) - { - int squishFlags = 0; - switch (format) - { - case TextureFormat::DXT1: - squishFlags |= squish::kDxt1; - break; - case TextureFormat::DXT5: - squishFlags |= squish::kDxt5; - default: throw gcnew FormatException("The texture format is not a DXT format."); - } - - auto rgba = new squish::u8[squish::GetStorageRequirements(width, height, squishFlags)]; - pin_ptr dPtr = &data[0]; - squish::DecompressImage(0, width, height, (void*)dPtr, squishFlags); - - for (int i = 0; i < width * height; i++) - { - auto r = rgba[i * 4]; - rgba[i * 4] = rgba[i * 4 + 2]; - rgba[i * 4 + 2] = r; - } - - Texture^ tex = gcnew Texture(rgba, width, height); - tex->image->RotateFlip(RotateFlipType::RotateNoneFlipY); - return tex; - } - - Texture^ Texture::LoadFromMemoryGdi(array^ data, int width, int height, TextureFormat format) - { - auto ms = gcnew MemoryStream(data); - auto img = Image::FromStream(ms); - delete ms; - - return gcnew Texture(img); - } - - - void Texture::Save(String^ file) - { - if (image == nullptr) - throw gcnew InvalidOperationException("There is no image bound to the object!"); - - String^ ext = Path::GetExtension(file); - if (ext == TEX_EXTENSION) - SaveTex(file); - else - SaveImage(file); - } - - void Texture::SaveImage(String^ file) - { - image->Save(file); - } - - void Texture::SaveTex(String^ file) - { - MemoryStream^ ms = gcnew MemoryStream(); - image->Save(ms, ImageFormat::Png); - array^ data = ms->ToArray(); - - BinaryWriter^ bw = gcnew BinaryWriter(File::Create(file)); - - bw->Write(TEX_TAG); - bw->Write(OUTPUT_TEX_VERSION); - bw->Write(InternalPath); - bw->Write(image->Width); - bw->Write(image->Height); - bw->Write((int)TextureFormat::ARGB32); - bw->Write(data->Length); - bw->Write(data); - - delete bw; - delete ms; - } + static Texture::Texture() + { + TextureLoaders = gcnew Dictionary(); + + TextureLoaders->Add(TextureFormat::ARGB32, gcnew TextureLoader(LoadFromMemoryGdi)); + TextureLoaders->Add(TextureFormat::RGB24, gcnew TextureLoader(LoadFromMemoryGdi)); + TextureLoaders->Add(TextureFormat::DXT1, gcnew TextureLoader(LoadFromMemoryDxt)); + TextureLoaders->Add(TextureFormat::DXT5, gcnew TextureLoader(LoadFromMemoryDxt)); + } + + Texture::Texture(Image^ image) + { + this->_internalPath = String::Empty; + this->image = image; + } + + Texture::Texture(squish::u8* bgra, int width, int height) + { + this->_internalPath = String::Empty; + this->bgra = bgra; + image = gcnew Bitmap(width, height, width * 4, PixelFormat::Format32bppArgb, IntPtr(bgra)); + InternalPath = String::Empty; + } + + Texture::!Texture() + { + this->~Texture(); + } + + Texture::~Texture() + { + if (bgra != 0) + { + delete bgra; + bgra = 0; + } + + if (image != nullptr) + delete image; + } + + Texture^ Texture::Open(String^ filename) + { + if (!File::Exists(filename)) + throw gcnew FileNotFoundException(String::Format("The path {0} is not a valid file!", filename)); + + String^ ext = Path::GetExtension(filename); + return ext == TEX_EXTENSION ? OpenTex(filename) : OpenImage(filename); + } + + Texture^ Texture::OpenImage(String^ filename) + { + return gcnew Texture(Image::FromFile(filename)); + } + + Texture^ Texture::OpenTex(String^ filename) + { + auto sw = File::OpenRead(filename); + auto br = gcnew BinaryReader(sw); + + auto tag = br->ReadString(); + + if (tag != TEX_TAG) + throw gcnew FileLoadException(String::Format("File {0} is not a valid CM3D2_TEX texture", filename)); + + auto version = br->ReadInt32(); + auto originalPath = br->ReadString(); + auto width = 0; + auto height = 0; + auto texFormat = TextureFormat::ARGB32; + + if (version >= 1010) + { + width = br->ReadInt32(); + height = br->ReadInt32(); + texFormat = (TextureFormat)br->ReadInt32(); + } + + if (!Enum::IsDefined(TextureFormat::typeid, texFormat)) + throw gcnew FileLoadException(String::Format("TexTool does not support texture format {0}", (int)texFormat)); + + auto size = br->ReadInt32(); + auto data = gcnew array(size); + br->Read(data, 0, size); + + if (version == 1000) + { + width = (data[16] << 24) | (data[17] << 16) | (data[18] << 8) | data[19]; + height = (data[20] << 24) | (data[21] << 16) | (data[22] << 8) | data[23]; + } + + Texture^ tex = nullptr; + TextureLoader^ loader = nullptr; + + if (TextureLoaders->TryGetValue(texFormat, loader)) + { + tex = loader(data, width, height, texFormat); + tex->InternalPath = originalPath; + } + else + throw gcnew FileLoadException(String::Format("Loader for format {0} is not yet implemented.", texFormat)); + + return tex; + } + + Texture^ Texture::LoadFromMemoryDxt(array^ data, int width, int height, TextureFormat format) + { + int squishFlags = 0; + + switch (format) + { + case TextureFormat::DXT1: + squishFlags |= squish::kDxt1; + break; + + case TextureFormat::DXT5: + squishFlags |= squish::kDxt5; + + default: + throw gcnew FormatException("The texture format is not a DXT format."); + } + + auto rgba = new squish::u8[squish::GetStorageRequirements(width, height, squishFlags)]; + pin_ptr dPtr = &data[0]; + squish::DecompressImage(0, width, height, (void*)dPtr, squishFlags); + + for (int i = 0; i < width * height; i++) + { + auto r = rgba[i * 4]; + rgba[i * 4] = rgba[i * 4 + 2]; + rgba[i * 4 + 2] = r; + } + + Texture^ tex = gcnew Texture(rgba, width, height); + tex->image->RotateFlip(RotateFlipType::RotateNoneFlipY); + return tex; + } + + Texture^ Texture::LoadFromMemoryGdi(array^ data, int width, int height, TextureFormat format) + { + auto ms = gcnew MemoryStream(data); + auto img = Image::FromStream(ms); + delete ms; + + return gcnew Texture(img); + } + + + void Texture::Save(String^ file) + { + if (image == nullptr) + throw gcnew InvalidOperationException("There is no image bound to the object!"); + + String^ ext = Path::GetExtension(file); + + if (ext == TEX_EXTENSION) + SaveTex(file); + else + SaveImage(file); + } + + void Texture::SaveImage(String^ file) + { + image->Save(file); + } + + void Texture::SaveTex(String^ file) + { + MemoryStream^ ms = gcnew MemoryStream(); + image->Save(ms, ImageFormat::Png); + array^ data = ms->ToArray(); + + BinaryWriter^ bw = gcnew BinaryWriter(File::Create(file)); + + bw->Write(TEX_TAG); + bw->Write(OUTPUT_TEX_VERSION); + bw->Write(InternalPath); + bw->Write(image->Width); + bw->Write(image->Height); + bw->Write((int)TextureFormat::ARGB32); + bw->Write(data->Length); + bw->Write(data); + + delete bw; + delete ms; + } } \ No newline at end of file diff --git a/CM3D2.TexTool/Texture.h b/CM3D2.TexTool/Texture.h index 2576779..e40e2b0 100644 --- a/CM3D2.TexTool/Texture.h +++ b/CM3D2.TexTool/Texture.h @@ -10,60 +10,60 @@ using namespace System; namespace TexTool { - public enum class TextureFormat - { - ARGB32 = 5, - RGB24 = 3, - DXT1 = 10, - DXT5 = 12 - }; + public enum class TextureFormat + { + ARGB32 = 5, + RGB24 = 3, + DXT1 = 10, + DXT5 = 12 + }; - public ref class Texture - { - public: - literal String^ TEX_EXTENSION = ".tex"; - delegate Texture^ TextureLoader(array^ data, int width, int height, TextureFormat format); + public ref class Texture + { + public: + literal String^ TEX_EXTENSION = ".tex"; + delegate Texture^ TextureLoader(array^ data, int width, int height, TextureFormat format); - static Texture(); + static Texture(); - ~Texture(); - !Texture(); + ~Texture(); + !Texture(); - void Save(String^ file); - void SaveImage(String^ file); - void SaveTex(String^ file); + void Save(String^ file); + void SaveImage(String^ file); + void SaveTex(String^ file); - static Texture^ Open(String^ filename); + static Texture^ Open(String^ filename); - property String^ InternalPath - { - String^ get() - { - return _internalPath; - } + property String^ InternalPath + { + String^ get() + { + return _internalPath; + } - void set(String^ val) - { - _internalPath = val; - } - } + void set(String^ val) + { + _internalPath = val; + } + } - private: - literal String^ TEX_TAG = "CM3D2_TEX"; - literal int OUTPUT_TEX_VERSION = 1010; - static initonly Dictionary^ TextureLoaders; - String^ _internalPath; - Image ^ image; - squish::u8* bgra; + private: + literal String^ TEX_TAG = "CM3D2_TEX"; + literal int OUTPUT_TEX_VERSION = 1010; + static initonly Dictionary^ TextureLoaders; + String^ _internalPath; + Image ^ image; + squish::u8* bgra; - Texture(Image^ image); - Texture(squish::u8* bgra, int width, int height); + Texture(Image^ image); + Texture(squish::u8* bgra, int width, int height); - static Texture^ OpenTex(String^ filename); - static Texture^ OpenImage(String^ filename); + static Texture^ OpenTex(String^ filename); + static Texture^ OpenImage(String^ filename); - static Texture^ LoadFromMemoryDxt(array^ data, int width, int height, TextureFormat format); - static Texture^ LoadFromMemoryGdi(array^ data, int width, int height, TextureFormat format); + static Texture^ LoadFromMemoryDxt(array^ data, int width, int height, TextureFormat format); + static Texture^ LoadFromMemoryGdi(array^ data, int width, int height, TextureFormat format); - }; + }; } diff --git a/LICENSE b/LICENSE index 997ee29..5854429 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Geoffrey Horsington +Copyright (c) 2018 Geoffrey Horsington Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Libs/LICENSE.txt b/Libs/LICENSE.txt deleted file mode 100644 index fbb7e42..0000000 --- a/Libs/LICENSE.txt +++ /dev/null @@ -1,8 +0,0 @@ -Copyright (c) 2011 Rodrigo 'r2d2rigo' Díaz -libsquish (C) 2006 Simon Brown - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/Libs/ManagedSquish.XML b/Libs/ManagedSquish.XML deleted file mode 100644 index be54c14..0000000 --- a/Libs/ManagedSquish.XML +++ /dev/null @@ -1,164 +0,0 @@ - - - - ManagedSquish - - - - - Flags used when compressing/decompressing DXT data. These are the same values as defined in squish.h. - - - - - Use DXT1 compression. - - - - - Use DXT3 compression. - - - - - Use DXT5 compression. - - - - - Use a very slow but very high quality colour compressor. - - - - - Use a slow but high quality colour compressor (the default). - - - - - Use a fast but low quality colour compressor. - - - - - Use a perceptual metric for colour error (the default). - - - - - Use a uniform metric for colour error. - - - - - Weight the colour by alpha during cluster fit (disabled by default). - - - - - Wrapper for libsquish DXT compression/decompression library. - - - - - Returns the final size in bytes of DXT data compressed with the parameters specified in . - - Source image width. - Source image height. - Compression parameters. - Size in bytes of the DXT data. - - - - Compress a 4x4 pixel block using the parameters specified in . - - Source RGBA block. - Output DXT compressed block. - Compression flags. - - - - Compress a 4x4 pixel block using the parameters specified in . - - Source RGBA block. - Compression flags. - Output DXT compressed block. - - - - Compress a 4x4 pixel block using the parameters specified in . The parameter is a used as - a bit mask to specifify what pixels are valid for compression, corresponding the lowest bit to the first pixel. - - Source RGBA block. - Pixel bit mask. - Output DXT compressed block. - Compression flags. - - - - Compress a 4x4 pixel block using the parameters specified in . The parameter is a used as - a bit mask to specifify what pixels are valid for compression, corresponding the lowest bit to the first pixel. - - Source RGBA block. - Pixel bit mask. - Compression flags. - Output DXT compressed block. - - - - Decompresses a 4x4 pixel block using the parameters specified in . - - Output RGBA decompressed block. - Source DXT block. - Decompression flags. - - - - Decompresses a 4x4 pixel block using the parameters specified in . - - Source DXT block. - Decompression flags. - Output RGBA decompressed block. - - - - Compresses an image using the parameters specified in . - - Source RGBA image. - Width of the image. - Height of the image. - Output DXT compressed image. - Compression flags. - - - - Compresses an image using the parameters specified in . - - Source RGBA image. - Width of the image. - Height of the image. - Compression flags. - Output DXT compressed image. - - - - Decompresses an image using the parameters specified in . - - Output RGBA decompressed image. - Width of the image. - Height of the image. - Source DXT compressed image. - Decompression flags. - - - - Decompresses an image using the parameters specified in . - - Source DXT compressed image. - Width of the image. - Height of the image. - Decompression flags. - Output RGBA decompressed image. - - - diff --git a/Libs/ManagedSquish.dll b/Libs/ManagedSquish.dll deleted file mode 100644 index eb2369f..0000000 Binary files a/Libs/ManagedSquish.dll and /dev/null differ diff --git a/Libs/NativeSquish_x64.dll b/Libs/NativeSquish_x64.dll deleted file mode 100644 index 518aa7a..0000000 Binary files a/Libs/NativeSquish_x64.dll and /dev/null differ diff --git a/Libs/NativeSquish_x86.dll b/Libs/NativeSquish_x86.dll deleted file mode 100644 index a8e4a18..0000000 Binary files a/Libs/NativeSquish_x86.dll and /dev/null differ diff --git a/README.md b/README.md index be6d96d..95f01c2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ ### Tool -This tool can be used to convert between CM3D2's TEX image format and PNG. +This tool can be used to convert between CM3D2's and COM3D2's TEX image format and PNG. The tool supports CM3D2 TEX version 1000 to 1010 format. The following pixel formats are supported: @@ -14,7 +14,7 @@ The following pixel formats are supported: * DXT1 * DXT5 -These are the all formats used by current version of CM3D2 (1.53) and COM3D2 (Trial). +These are the all formats used by current version of CM3D2 and COM3D2. More formats are to be added as need be. ### Library @@ -41,4 +41,6 @@ All output is added to `output` folder. Of course, replace `` with paths to files or folders separated by a space. Use double quotes if a path contains spaces. -As of right now, all output is added to `output` folder. Expect configuration flags in the future versions. +The output is put in the same folder as the input file. + +Currently the tool does not contain any special flags, but that might change in future.