Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Resources and Tools => Topic started by: iindigo on August 22, 2014, 03:02:10 am

Title: [RELEASE] BLPCore C++ Library
Post by: iindigo on August 22, 2014, 03:02:10 am

BLPCore


BLPCore is a C++ library for decoding and encoding BLPs. The idea behind it is to make working with BLPs in your program really, really simple: feed BLP data into one end and raw pixels+metadata come out on the other end. The other goal is to start a trend of unification in the WoW modding community, putting the grunt work of handling the various WoW data types into a handful of libraries that everyone contributes to instead of reinventing the wheel 50,000 times and inseparably tangling half-baked implementations into individual programs.


Status


Decoding of both metadata and image data for most BLP types works well (certain palletized types notably absent). Current encoding code is total junk and should be rewritten.


Platforms


BLPCore has been written to be platform agnostic and should compile anywhere without trouble. It was developed on OS X 10.9 and llvm/clang, but there's no reason for it to not work with Linux/gcc or Windows/MSVC++.


Dependencies


libsquish (https://code.google.com/p/libsquish/) - Multi-platform DXT compression/decompression


Download


BLPCore Repository (https://github.com/norgannon/BLPCore)
Latest Release (ZIP) (https://github.com/norgannon/BLPCore/archive/master.zip)
Title: Re: [RELEASE] BLPCore C++ Library
Post by: schlumpf on August 22, 2014, 08:40:30 pm
There are some parts where this might be wrong, like every BLP library. See http://pxr.dk/wowdev/wiki/index.php?title=Talk:BLP (http://pxr.dk/wowdev/wiki/index.php?title=Talk:BLP" onclick="window.open(this.href);return false;). Also, the API is not really encapsulating stuff, as everything is visible, and choosing the correct decompression is up to the user. It might be better to just let the user specify what pixel_format to decompress to, not from.
Title: Re: [RELEASE] BLPCore C++ Library
Post by: iindigo on August 23, 2014, 02:20:48 am
Well I'll be the first to admit that I don't really know what I'm doing. :)  This is both my first real C++ project and first developer-facing library.

Your suggestions make a lot of sense, I'll try to get them in. If you see anything else that can easily be improved, feel free to jump in and make the necessary changes… having a veteran on board would be incredibly helpful.