TrinityCore
Loading...
Searching...
No Matches
loadlib.h
Go to the documentation of this file.
1
/*
2
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information
3
*
4
* This program is free software; you can redistribute it and/or modify it
5
* under the terms of the GNU General Public License as published by the
6
* Free Software Foundation; either version 2 of the License, or (at your
7
* option) any later version.
8
*
9
* This program is distributed in the hope that it will be useful, but WITHOUT
10
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12
* more details.
13
*
14
* You should have received a copy of the GNU General Public License along
15
* with this program. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef LOAD_LIB_H
19
#define LOAD_LIB_H
20
21
#include "
Define.h
"
22
23
#include <string>
24
25
#define FILE_FORMAT_VERSION 18
26
27
#pragma pack(push, 1)
28
29
union
u_map_fcc
30
{
31
char
fcc_txt
[4];
32
uint32
fcc
;
33
};
34
35
//
36
// File version chunk
37
//
38
struct
file_MVER
39
{
40
union
{
41
uint32
fcc
;
42
char
fcc_txt
[4];
43
};
44
uint32
size
;
45
uint32
ver
;
46
};
47
48
class
FileLoader
{
49
uint8
*
data
;
50
uint32
data_size
;
51
public
:
52
virtual
bool
prepareLoadedData
();
53
uint8
*
GetData
() {
return
data
;}
54
uint32
GetDataSize
() {
return
data_size
;}
55
56
file_MVER
*
version
;
57
FileLoader
();
58
~FileLoader
();
59
bool
loadFile
(std::string
const
& fileName,
bool
log =
true
);
60
virtual
void
free
();
61
};
62
63
#pragma pack(pop)
64
65
#endif
Define.h
uint8
uint8_t uint8
Definition
Define.h:135
uint32
uint32_t uint32
Definition
Define.h:133
FileLoader
Definition
loadlib.h:48
FileLoader::~FileLoader
~FileLoader()
Definition
loadlib.cpp:35
FileLoader::loadFile
bool loadFile(std::string const &fileName, bool log=true)
Definition
loadlib.cpp:40
FileLoader::GetDataSize
uint32 GetDataSize()
Definition
loadlib.h:54
FileLoader::data_size
uint32 data_size
Definition
loadlib.h:50
FileLoader::version
file_MVER * version
Definition
loadlib.h:56
FileLoader::FileLoader
FileLoader()
Definition
loadlib.cpp:28
FileLoader::free
virtual void free()
Definition
loadlib.cpp:76
FileLoader::prepareLoadedData
virtual bool prepareLoadedData()
Definition
loadlib.cpp:65
FileLoader::GetData
uint8 * GetData()
Definition
loadlib.h:53
FileLoader::data
uint8 * data
Definition
loadlib.h:49
file_MVER
Definition
loadlib.h:39
file_MVER::size
uint32 size
Definition
loadlib.h:44
file_MVER::fcc_txt
char fcc_txt[4]
Definition
loadlib.h:42
file_MVER::ver
uint32 ver
Definition
loadlib.h:45
file_MVER::fcc
uint32 fcc
Definition
loadlib.h:41
u_map_fcc
Definition
loadlib.h:30
u_map_fcc::fcc
uint32 fcc
Definition
loadlib.h:32
u_map_fcc::fcc_txt
char fcc_txt[4]
Definition
loadlib.h:31
tools
map_extractor
loadlib
loadlib.h
Generated on Sun May 10 2026 02:30:26 for TrinityCore by
1.9.8