2 * Copyright (C) 2005-2013 MaNGOS <http://getmangos.com/>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 typedef __int64 int64
;
31 typedef __int32 int32
;
32 typedef __int16 int16
;
34 typedef unsigned __int64 uint64
;
35 typedef unsigned __int32 uint32
;
36 typedef unsigned __int16 uint16
;
37 typedef unsigned __int8 uint8
;
42 #include <linux/types.h>
45 typedef int64_t int64
;
46 typedef int32_t int32
;
47 typedef int16_t int16
;
49 typedef uint64_t uint64
;
50 typedef uint32_t uint32
;
51 typedef uint16_t uint16
;
52 typedef uint8_t uint8
;
55 typedef std::deque
<HANDLE
> ArchiveSet
;
56 typedef std::pair
<ArchiveSet::const_iterator
, ArchiveSet::const_iterator
> ArchiveSetBounds
;
58 bool OpenArchive(char const* mpqFileName
, HANDLE
* mpqHandlePtr
= NULL
);
59 bool OpenNewestFile(char const* filename
, HANDLE
* fileHandlerPtr
);
60 ArchiveSetBounds
GetArchivesBounds();
61 bool ExtractFile(char const* mpq_name
, std::string
const& filename
);
64 #define FILE_FORMAT_VERSION 18
85 virtual bool prepareLoadedData();
86 uint8
* GetData() {return data
;}
87 uint32
GetDataSize() {return data_size
;}
92 bool loadFile(char* filename
, bool log
= true);