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

#include "adt.h"

Classes

struct  adt_CELLS
 

Public Member Functions

bool prepareLoadedData ()
 
adt_MCNKgetMCNK (int x, int y)
 

Public Attributes

uint32 size
 
struct adt_MCIN::adt_CELLS cells [ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]
 
uint32 fcc
 
char fcc_txt [4]
 

Private Attributes

union {
   uint32   fcc
 
   char   fcc_txt [4]
 
}; 
 

Detailed Description

Member Function Documentation

◆ getMCNK()

adt_MCNK * adt_MCIN::getMCNK ( int  x,
int  y 
)
inline
173 {
174 if (cells[x][y].offsMCNK)
175 return (adt_MCNK*)((uint8*)this + cells[x][y].offsMCNK - 84);
176 return nullptr;
177 }
std::uint8_t uint8
Definition: Define.h:109
Definition: adt.h:94
struct adt_MCIN::adt_CELLS cells[ADT_CELLS_PER_GRID][ADT_CELLS_PER_GRID]

References cells.

Referenced by ConvertADT(), and prepareLoadedData().

◆ prepareLoadedData()

bool adt_MCIN::prepareLoadedData ( )
102{
103 if (fcc != MCINMagic.fcc)
104 return false;
105
106 // Check cells data
107 for (int i = 0; i < ADT_CELLS_PER_GRID; i++)
108 for (int j = 0; j < ADT_CELLS_PER_GRID; j++)
109 if (cells[i][j].offsMCNK && !getMCNK(i, j)->prepareLoadedData())
110 return false;
111
112 return true;
113}
#define ADT_CELLS_PER_GRID
Definition: adt.h:38
u_map_fcc MCINMagic
Definition: adt.cpp:27
adt_MCNK * getMCNK(int x, int y)
Definition: adt.h:172
bool prepareLoadedData()
Definition: adt.cpp:101
uint32 fcc
Definition: adt.h:157
uint32 fcc
Definition: loadlib.h:29

References ADT_CELLS_PER_GRID, cells, fcc, u_map_fcc::fcc, getMCNK(), MCINMagic, and prepareLoadedData().

Referenced by prepareLoadedData().

Member Data Documentation

◆ 

union { ... } adt_MCIN::@383

◆ cells

◆ fcc

uint32 adt_MCIN::fcc

Referenced by prepareLoadedData().

◆ fcc_txt

char adt_MCIN::fcc_txt[4]

◆ size

uint32 adt_MCIN::size