TrinityCore
Loading...
Searching...
No Matches
wdt.cpp
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
#define _CRT_SECURE_NO_DEPRECATE
19
20
#include "
wdt.h
"
21
22
u_map_fcc
MPHDMagic
= { {
'D'
,
'H'
,
'P'
,
'M'
} };
23
u_map_fcc
MAINMagic
= { {
'N'
,
'I'
,
'A'
,
'M'
} };
24
25
bool
wdt_MPHD::prepareLoadedData
()
26
{
27
if
(
fcc
!=
MPHDMagic
.
fcc
)
28
return
false
;
29
return
true
;
30
}
31
32
bool
wdt_MAIN::prepareLoadedData
()
33
{
34
if
(
fcc
!=
MAINMagic
.
fcc
)
35
return
false
;
36
return
true
;
37
}
38
39
WDT_file::WDT_file
()
40
{
41
mphd
= 0;
42
main
= 0;
43
}
44
45
WDT_file::~WDT_file
()
46
{
47
free
();
48
}
49
50
void
WDT_file::free
()
51
{
52
mphd
= 0;
53
main
= 0;
54
FileLoader::free
();
55
}
56
57
bool
WDT_file::prepareLoadedData
()
58
{
59
// Check parent
60
if
(!
FileLoader::prepareLoadedData
())
61
return
false
;
62
63
mphd
= (
wdt_MPHD
*)((
uint8
*)
version
+
version
->
size
+8);
64
if
(!
mphd
->
prepareLoadedData
())
65
return
false
;
66
main
= (
wdt_MAIN
*)((
uint8
*)
mphd
+
mphd
->
size
+8);
67
if
(!
main
->
prepareLoadedData
())
68
return
false
;
69
return
true
;
70
}
uint8
uint8_t uint8
Definition
Define.h:135
FileLoader::version
file_MVER * version
Definition
loadlib.h:56
FileLoader::free
virtual void free()
Definition
loadlib.cpp:76
FileLoader::prepareLoadedData
virtual bool prepareLoadedData()
Definition
loadlib.cpp:65
WDT_file::prepareLoadedData
bool prepareLoadedData()
Definition
wdt.cpp:57
WDT_file::mphd
wdt_MPHD * mphd
Definition
wdt.h:72
WDT_file::~WDT_file
~WDT_file()
Definition
wdt.cpp:45
WDT_file::free
void free()
Definition
wdt.cpp:50
WDT_file::main
wdt_MAIN * main
Definition
wdt.h:73
WDT_file::WDT_file
WDT_file()
Definition
wdt.cpp:39
wdt_MAIN
Definition
wdt.h:48
wdt_MAIN::prepareLoadedData
bool prepareLoadedData()
Definition
wdt.cpp:32
wdt_MAIN::fcc
uint32 fcc
Definition
wdt.h:50
wdt_MPHD
Definition
wdt.h:29
wdt_MPHD::size
uint32 size
Definition
wdt.h:35
wdt_MPHD::fcc
uint32 fcc
Definition
wdt.h:31
wdt_MPHD::prepareLoadedData
bool prepareLoadedData()
Definition
wdt.cpp:25
file_MVER::size
uint32 size
Definition
loadlib.h:44
u_map_fcc
Definition
loadlib.h:30
u_map_fcc::fcc
uint32 fcc
Definition
loadlib.h:32
MAINMagic
u_map_fcc MAINMagic
Definition
wdt.cpp:23
MPHDMagic
u_map_fcc MPHDMagic
Definition
wdt.cpp:22
wdt.h
tools
map_extractor
wdt.cpp
Generated on Sun May 10 2026 02:30:26 for TrinityCore by
1.9.8