AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
adt_MHDR Class Reference

#include "adt.h"

Public Member Functions

bool prepareLoadedData ()
 
adt_MCINgetMCIN ()
 
adt_MH2OgetMH2O ()
 
adt_MFBOgetMFBO ()
 

Public Attributes

uint32 size
 
uint32 flags
 
uint32 offsMCIN
 
uint32 offsTex
 
uint32 offsModels
 
uint32 offsModelsIds
 
uint32 offsMapObejcts
 
uint32 offsMapObejctsIds
 
uint32 offsDoodsDef
 
uint32 offsObjectsDef
 
uint32 offsMFBO
 
uint32 offsMH2O
 
uint32 data1
 
uint32 data2
 
uint32 data3
 
uint32 data4
 
uint32 data5
 
uint32 fcc
 
char fcc_txt [4]
 

Private Attributes

union {
   uint32   fcc
 
   char   fcc_txt [4]
 
}; 
 

Detailed Description

Member Function Documentation

◆ getMCIN()

adt_MCIN * adt_MHDR::getMCIN ( )
inline
378 {
379 return reinterpret_cast<adt_MCIN*>(reinterpret_cast<uint8*>(&flags) + offsMCIN);
380 }
std::uint8_t uint8
Definition: Define.h:109
Definition: adt.h:154
uint32 flags
Definition: adt.h:359
uint32 offsMCIN
Definition: adt.h:360

References flags, and offsMCIN.

Referenced by ConvertADT(), and prepareLoadedData().

◆ getMFBO()

adt_MFBO * adt_MHDR::getMFBO ( )
inline
388 {
389 if (flags & 1 && offsMFBO)
390 return reinterpret_cast<adt_MFBO*>(reinterpret_cast<uint8*>(&flags) + offsMFBO);
391 return nullptr;
392 }
Definition: adt.h:328
uint32 offsMFBO
Definition: adt.h:368

References flags, and offsMFBO.

Referenced by ConvertADT(), and prepareLoadedData().

◆ getMH2O()

adt_MH2O * adt_MHDR::getMH2O ( )
inline
382 {
383 if (offsMH2O)
384 return reinterpret_cast<adt_MH2O*>(reinterpret_cast<uint8*>(&flags) + offsMH2O);
385 return nullptr;
386 }
Definition: adt.h:216
uint32 offsMH2O
Definition: adt.h:369

References flags, and offsMH2O.

Referenced by ConvertADT(), and prepareLoadedData().

◆ prepareLoadedData()

bool adt_MHDR::prepareLoadedData ( )
80{
81 if (fcc != MHDRMagic.fcc)
82 return false;
83
84 if (size != sizeof(adt_MHDR) - 8)
85 return false;
86
87 // Check and prepare MCIN
89 return false;
90
91 // Check and prepare MH2O
93 return false;
94
95 if (offsMFBO && flags & 1 && !getMFBO()->prepareLoadedData())
96 return false;
97
98 return true;
99}
u_map_fcc MHDRMagic
Definition: adt.cpp:26
Definition: adt.h:350
uint32 size
Definition: adt.h:357
adt_MFBO * getMFBO()
Definition: adt.h:387
adt_MCIN * getMCIN()
Definition: adt.h:377
uint32 fcc
Definition: adt.h:353
adt_MH2O * getMH2O()
Definition: adt.h:381
bool prepareLoadedData()
Definition: adt.cpp:79
uint32 fcc
Definition: loadlib.h:29

References fcc, u_map_fcc::fcc, flags, getMCIN(), getMFBO(), getMH2O(), MHDRMagic, offsMCIN, offsMFBO, offsMH2O, prepareLoadedData(), and size.

Referenced by prepareLoadedData(), and ADT_file::prepareLoadedData().

Member Data Documentation

◆ 

union { ... } adt_MHDR::@386

◆ data1

uint32 adt_MHDR::data1

◆ data2

uint32 adt_MHDR::data2

◆ data3

uint32 adt_MHDR::data3

◆ data4

uint32 adt_MHDR::data4

◆ data5

uint32 adt_MHDR::data5

◆ fcc

uint32 adt_MHDR::fcc

Referenced by prepareLoadedData().

◆ fcc_txt

char adt_MHDR::fcc_txt[4]

◆ flags

uint32 adt_MHDR::flags

◆ offsDoodsDef

uint32 adt_MHDR::offsDoodsDef

◆ offsMapObejcts

uint32 adt_MHDR::offsMapObejcts

◆ offsMapObejctsIds

uint32 adt_MHDR::offsMapObejctsIds

◆ offsMCIN

uint32 adt_MHDR::offsMCIN

Referenced by getMCIN(), and prepareLoadedData().

◆ offsMFBO

uint32 adt_MHDR::offsMFBO

Referenced by getMFBO(), and prepareLoadedData().

◆ offsMH2O

uint32 adt_MHDR::offsMH2O

Referenced by getMH2O(), and prepareLoadedData().

◆ offsModels

uint32 adt_MHDR::offsModels

◆ offsModelsIds

uint32 adt_MHDR::offsModelsIds

◆ offsObjectsDef

uint32 adt_MHDR::offsObjectsDef

◆ offsTex

uint32 adt_MHDR::offsTex

◆ size

uint32 adt_MHDR::size

Referenced by prepareLoadedData().