TrinityCore
Loading...
Searching...
No Matches
adtfile.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 ADT_H
19#define ADT_H
20
21#include "cascfile.h"
22#include "vec3d.h"
23#include <vector>
24
25#pragma pack(push, 1)
51#pragma pack(pop)
52
54{
56 std::vector<uint8> Data;
57};
58
60{
61private:
64 std::vector<ADTOutputCache>* dirfileCache;
65public:
66 ADTFile(std::string const& filename, bool cache);
67 ADTFile(uint32 fileDataId, std::string const& description, bool cache);
68 ~ADTFile();
69 std::vector<std::string> WmoInstanceNames;
70 std::vector<std::string> ModelInstanceNames;
71 bool init(uint32 map_num, uint32 originalMapId);
72 bool initFromCache(uint32 map_num, uint32 originalMapId);
73};
74
75std::string_view GetPlainName(std::string_view fileName);
76void NormalizeFileName(std::string& fileName);
77
78#endif
uint8_t uint8
Definition Define.h:156
uint16_t uint16
Definition Define.h:155
uint32_t uint32
Definition Define.h:154
void NormalizeFileName(std::string &fileName)
Definition adtfile.cpp:39
std::string_view GetPlainName(std::string_view fileName)
Definition adtfile.cpp:29
bool cacheable
Definition adtfile.h:63
std::vector< std::string > ModelInstanceNames
Definition adtfile.h:70
CASCFile _file
Definition adtfile.h:62
std::vector< ADTOutputCache > * dirfileCache
Definition adtfile.h:64
std::vector< std::string > WmoInstanceNames
Definition adtfile.h:69
bool init(uint32 map_num, uint32 originalMapId)
Definition adtfile.cpp:76
bool initFromCache(uint32 map_num, uint32 originalMapId)
Definition adtfile.cpp:199
Definition vec3d.h:22
Definition adtfile.h:27
std::vector< uint8 > Data
Definition adtfile.h:56
uint8 Flags
Definition adtfile.h:55
uint32 UniqueId
Definition adtfile.h:31
uint16 Flags
Definition adtfile.h:35
uint32 Id
Definition adtfile.h:30
Vec3D Position
Definition adtfile.h:32
Vec3D Rotation
Definition adtfile.h:33
uint16 Scale
Definition adtfile.h:34
uint16 Flags
Definition adtfile.h:45
uint16 Scale
Definition adtfile.h:48
AaBox3D Bounds
Definition adtfile.h:44
Vec3D Rotation
Definition adtfile.h:43
uint16 NameSet
Definition adtfile.h:47
uint32 UniqueId
Definition adtfile.h:41
Vec3D Position
Definition adtfile.h:42
uint32 Id
Definition adtfile.h:40
uint16 DoodadSet
Definition adtfile.h:46