TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
adtfile.h File Reference
#include "mpqfile.h"
#include "wmo.h"
#include "model.h"
+ Include dependency graph for adtfile.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  svec
 
struct  vec
 
struct  triangle
 
struct  Cell
 
struct  chunk
 
struct  mcell
 
struct  MapChunkHeader
 
class  ADTFile
 

Macros

#define TILESIZE   (533.33333f)
 
#define CHUNKSIZE   ((TILESIZE) / 16.0f)
 
#define UNITSIZE   (CHUNKSIZE / 8.0f)
 

Functions

char constGetPlainName (char const *FileName)
 
char * GetPlainName (char *FileName)
 
char * GetExtension (char *FileName)
 
void FixNameCase (char *name, size_t len)
 
void FixNameSpaces (char *name, size_t len)
 

Macro Definition Documentation

#define CHUNKSIZE   ((TILESIZE) / 16.0f)
#define TILESIZE   (533.33333f)
#define UNITSIZE   (CHUNKSIZE / 8.0f)

Function Documentation

void FixNameCase ( char *  name,
size_t  len 
)
48 {
49  char* ptr = name + len - 1;
50 
51  //extension in lowercase
52  for (; *ptr != '.'; --ptr)
53  *ptr |= 0x20;
54 
55  for (; ptr >= name; --ptr)
56  {
57  if (ptr > name && *ptr >= 'A' && *ptr <= 'Z' && isalpha(*(ptr - 1)))
58  *ptr |= 0x20;
59  else if ((ptr == name || !isalpha(*(ptr - 1))) && *ptr >= 'a' && *ptr <= 'z')
60  *ptr &= ~0x20;
61  }
62 }

+ Here is the caller graph for this function:

void FixNameSpaces ( char *  name,
size_t  len 
)
65 {
66  for (size_t i=0; i<len-3; i++)
67  {
68  if(name[i] == ' ')
69  name[i] = '_';
70  }
71 }

+ Here is the caller graph for this function:

char* GetExtension ( char *  FileName)
74 {
75  if (char* szTemp = strrchr(FileName, '.'))
76  return szTemp;
77  return NULL;
78 }
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the caller graph for this function:

char const* GetPlainName ( char const FileName)
30 {
31  const char * szTemp;
32 
33  if((szTemp = strrchr(FileName, '\\')) != NULL)
34  FileName = szTemp + 1;
35  return FileName;
36 }
arena_t NULL
Definition: jemalloc_internal.h:624

+ Here is the caller graph for this function:

char* GetPlainName ( char *  FileName)
39 {
40  char * szTemp;
41 
42  if((szTemp = strrchr(FileName, '\\')) != NULL)
43  FileName = szTemp + 1;
44  return FileName;
45 }
arena_t NULL
Definition: jemalloc_internal.h:624