-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is from official repo (SVN rev. 300) Additionally includes free implementation of stdint.h and dirent.h for VC++, aswell as Visual Studio project files. Special thanks to faramir118 for Windows support.
- Loading branch information
Showing
88 changed files
with
8,820 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
|
||
bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Project Initiator: | ||
|
||
* Maik Broemme <mbroemme@plusserver.de> | ||
|
||
Developers: | ||
|
||
* Maik Broemme <mbroemme@plusserver.de> | ||
* Tilman Sauerbeck <tilman@code-monkey.de> | ||
* Forrest Voight <voights@gmail.com> | ||
* Georg Lukas <georg@op-co.de> |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
FAQ - Frequently Asked Questions | ||
================================ | ||
|
||
Q: What is libmpq? | ||
A: libmpq is a library for manipulating MoPaQ mpq archives mostly used | ||
used by Blizzard in their games. | ||
|
||
Q: What can i do with libmpq? | ||
A: With libmpq you can write applications which can extract, create | ||
and manipulate mpq archives. | ||
|
||
Q: Is it legal? | ||
A: Yes, i think so. I have no idea why it should not, all informations | ||
about the fileformat are available. | ||
|
||
Q: Is there a description of the functions? | ||
A: Since version 0.4.0 libmpq comes with a API documentation for | ||
developers. The documentation is written as manual pages. | ||
|
||
Q: Can i help? | ||
A: Yes, help is needed, not only with developing, also with testing. | ||
A good point to start is using a recent SVN version of libmpq and | ||
trying to use it with every mpq archive you could get :) | ||
|
||
Q: Can you give a small example to demonstrate the usage? | ||
A: Of course :) The example below takes first parameter as mpq archive | ||
and extracts the first file to a buffer. | ||
|
||
/* | ||
* Compile with: | ||
* | ||
* x86_32: | ||
* | ||
* gcc \ | ||
* -D_FILE_OFFSET_BITS=64 \ | ||
* -D_LARGE_FILES=1 \ | ||
* -D_LARGEFILE_SOURCE=1 \ | ||
* mpq-example.c -o mpq-example -lmpq -lz -lbz2 -I/usr/local/include/libmpq | ||
* | ||
* x86_64: | ||
* | ||
* gcc \ | ||
* -D_LARGE_FILES=1 \ | ||
* mpq-example.c -o mpq-example -lmpq -lz -lbz2 -I/usr/local/include/libmpq | ||
*/ | ||
|
||
#include <mpq.h> | ||
#include <stdlib.h> | ||
#include <limits.h> | ||
|
||
int main(int argc, char **argv) { | ||
mpq_archive_s *mpq_archive; | ||
off_t out_size; | ||
char *out_buf; | ||
|
||
/* open the mpq archive given as first parameter. */ | ||
libmpq__archive_open(&mpq_archive, argv[1], -1); | ||
|
||
/* get size of first file (0) and malloc output buffer. */ | ||
libmpq__file_unpacked_size(mpq_archive, 0, &out_size); | ||
out_buf = malloc(out_size); | ||
|
||
/* read, decrypt and unpack file to output buffer. */ | ||
libmpq__file_read(mpq_archive, 0, out_buf, out_size, NULL); | ||
|
||
/* close the mpq archive. */ | ||
libmpq__archive_close(mpq_archive); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# minimum required automake 1.6 | ||
AUTOMAKE_OPTIONS = 1.6 | ||
|
||
# any directories which should be built and installed. | ||
SUBDIRS = libmpq bindings doc | ||
|
||
# the directories which are part of the distribution. | ||
DIST_SUBDIRS = $(SUBDIRS) | ||
|
||
# libmpq runtime configuration script. | ||
bin_SCRIPTS = libmpq-config | ||
|
||
# pkg-config installation directory. | ||
pkgconfigdir = $(libdir)/pkgconfig | ||
pkgconfig_DATA = libmpq.pc | ||
|
||
# extra stuff. | ||
EXTRA_DIST = \ | ||
AUTHORS \ | ||
COPYING \ | ||
FAQ \ | ||
INSTALL \ | ||
NEWS \ | ||
README \ | ||
THANKS \ | ||
TODO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
Changes version 0.4.2 (2008-05-16) | ||
================================== | ||
|
||
* added full extraction support for protected maps used in | ||
warcraft 3. | ||
|
||
* added full extraction support for all blizzard titles until | ||
world of warcraft - the burning crusade. | ||
|
||
* added support for archives version 2 with extended header and | ||
extended block table. | ||
|
||
* added support for the bzip2 compression algorithm. | ||
|
||
* added support for archives and files inside archive > 2gb. | ||
|
||
* added generic read functions, which will do decryption, | ||
decompression or exploding. | ||
|
||
* the info functions are no longer exported by the library and | ||
were replaced by separate api functions. | ||
|
||
* the file number and block number are count from 0 instead | ||
of 1. | ||
|
||
* added python bindings. | ||
|
||
* linking against libmpq requires from now on the usual largefile | ||
macros -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES=1 -D_LARGEFILE_SOURCE=1 | ||
|
||
Changes version 0.4.1 (2008-04-02) | ||
================================== | ||
|
||
* memory, speed and stability improvements. | ||
|
||
* split sourcecode into library and utility package. | ||
|
||
Changes version 0.4.0 (2008-03-31) | ||
================================== | ||
|
||
* added robust error handling to make the library and extracting | ||
utility more stable. | ||
|
||
* added c++ bindings to public include and moved internal defines | ||
and functions to private include. | ||
|
||
* added support for 64-bit architectures and removed any stupid | ||
pointer to int arithmetics. | ||
|
||
* added much better member names to the structures to make | ||
developers able to understand the code on reading. | ||
|
||
* added full api documentation using manual pages. | ||
|
||
* added full extraction support for all blizzard titles until | ||
warcraft 3 - the frozen throne. | ||
|
||
* added support for single sector and stored files (neither | ||
compressed nor imploded). | ||
|
||
* added support for files which have compressed size greater than | ||
uncompressed size. | ||
|
||
* removed the external listfile database support from 0.3.0 it | ||
was a weird implementation. | ||
|
||
Changes version 0.3.0 (2004-02-12) | ||
================================== | ||
|
||
* added listfile database support from external files. | ||
|
||
Initial version 0.2.1 (2004-01-17) | ||
================================== | ||
|
||
* first version which was able to extract some of the older mopaq | ||
archives. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Introduction | ||
============ | ||
|
||
'libmpq' is a library which can be easily used in own applications | ||
to extract, create or manipulate MoPaQ mpq archives. | ||
|
||
MPQ, or MoPaQ, is a proprietary archive format created by | ||
Mike O'Brien, the man hailed as Blizzard's multiplayer engine | ||
genius, back in 1996 as a general purpose archive for use with | ||
Diablo, and named narcissistically for its creator | ||
"Mike O'brien PaCK". The copyrights to it, however, are held by | ||
Havas Interactive, Blizzard's parent company. The archive format | ||
is used by many Blizzard titles like Diablo, Diablo 2, Starcraft, | ||
Warcraft 2: BNE, a newer version in Warcraft 3 and World of | ||
Warcraft (WoW). | ||
|
||
Manual | ||
====== | ||
|
||
Since version 0.4.0 the 'libmpq' package comes with a manpage for | ||
every library function. If you use 'libmpq' first time it is a good | ||
idea to read the `FAQ' file. | ||
|
||
Reporting Bugs | ||
============== | ||
|
||
Bug reports for 'libmpq' can be send to me directly. | ||
|
||
* Maik Broemme <mbroemme@plusserver.de> | ||
|
||
Enjoy! | ||
|
||
Maik Broemme <mbroemme@plusserver.de> | ||
http://www.babelize.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
'libmpq' was originaly created by Maik Broemme <mbroemme@plusserver.de> | ||
and i want to thank some people which helped by supplying knowledge, code or | ||
something else. | ||
|
||
* Romy Trompke <rtnet@web.de> | ||
- my lovely girlfriend for her patience | ||
|
||
* Ladislav Zezula <ladik@zezula.net> | ||
- stormlib creator | ||
|
||
* Marko Friedemann <marko.friedemann@bmx-chemnitz.de> | ||
- initial port of stormlib to linux | ||
|
||
* Tom Amigo <tomamigo@apexmail.com> | ||
- first people who decrypts the MoPaQ archive format | ||
|
||
* ShadowFlare <BlakFlare@hiotmail.com> | ||
- creator of the ShadowFlare MPQ API | ||
|
||
* Justin Olbrantz (Quantam) <omega@dragonfire.net> | ||
- creator of the client using ShadowFlare MPQ API |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
Features and functionality which should be added in the future. | ||
|
||
* Porting for big endian systems. | ||
* Porting for Windows? :) | ||
* Creating mpq archives. | ||
* Brute all unknown filenames, Blizzard uses in their | ||
archives. | ||
|
||
Look at the AUTHORS file if you want help me with 'libmpq', or | ||
if you have other interesting features which should be added. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/sh | ||
# | ||
echo "Generating build information using aclocal, autoheader, automake and autoconf" | ||
echo "This may take a while ..." | ||
|
||
# Touch the timestamps on all the files since CVS messes them up | ||
directory=`dirname $0` | ||
touch $directory/configure.ac | ||
|
||
# Regenerate configuration files | ||
libtoolize --copy | ||
aclocal | ||
autoheader | ||
automake --foreign --add-missing --copy | ||
autoconf | ||
|
||
# Run configure for this platform | ||
#./configure $* | ||
echo "Now you are ready to run ./configure" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# any directories which should be built and installed. | ||
SUBDIRS = d | ||
|
||
if HAVE_PYTHON | ||
SUBDIRS += python | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# minimum required automake 1.6 | ||
AUTOMAKE_OPTIONS = 1.6 | ||
|
||
# install D binding to /usr/include/d by default | ||
libmpq_includedir = $(includedir)/d | ||
libmpq_include_HEADERS = mpq.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[mpq.d] | ||
type=sourcelibrary |
Oops, something went wrong.