OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
ESM::Land Struct Reference

#include <loadland.hpp>

Inheritance diagram for ESM::Land:
Collaboration diagram for ESM::Land:

Classes

struct  LandData
 
struct  VHGT
 

Public Types

enum  {
  DATA_VNML = 1, DATA_VHGT = 2, DATA_WNAM = 4, DATA_VCLR = 8,
  DATA_VTEX = 16
}
 
typedef signed char VNML
 

Public Member Functions

 Land ()
 
 ~Land ()
 
void load (ESMReader &esm, bool &isDeleted)
 
void save (ESMWriter &esm, bool isDeleted=false) const
 
void blank ()
 
void loadData (int flags) const
 
void unloadData ()
 
bool isDataLoaded (int flags) const
 
 Land (const Land &land)
 
Landoperator= (Land land)
 
void swap (Land &land)
 
const LandDatagetLandData (int flags) const
 
const LandDatagetLandData () const
 Return land data without loading first anything. Can return a 0-pointer. More...
 
LandDatagetLandData ()
 Return land data without loading first anything. Can return a 0-pointer. More...
 
void add (int flags)
 
void remove (int flags)
 

Static Public Member Functions

static std::string getRecordType ()
 Return a string descriptor for this record type. Currently used for debugging / error logs only. More...
 

Public Attributes

int mFlags
 
int mX
 
int mY
 
int mPlugin
 
ESM_Context mContext
 
int mDataTypes
 

Static Public Attributes

static unsigned int sRecordId = REC_LAND
 
static const int DEFAULT_HEIGHT = -2048
 
static const int LAND_SIZE = 65
 
static const int REAL_SIZE = 8192
 
static const int LAND_NUM_VERTS = LAND_SIZE * LAND_SIZE
 
static const int HEIGHT_SCALE = 8
 
static const int LAND_TEXTURE_SIZE = 16
 
static const int LAND_NUM_TEXTURES = LAND_TEXTURE_SIZE * LAND_TEXTURE_SIZE
 

Private Member Functions

bool condLoad (ESM::ESMReader &reader, int flags, int dataFlag, void *ptr, unsigned int size) const
 

Private Attributes

OpenThreads::Mutex mMutex
 
int mDataLoaded
 
LandDatamLandData
 

Member Typedef Documentation

typedef signed char ESM::Land::VNML

Member Enumeration Documentation

anonymous enum
Enumerator
DATA_VNML 
DATA_VHGT 
DATA_WNAM 
DATA_VCLR 
DATA_VTEX 

Constructor & Destructor Documentation

ESM::Land::Land ( )
ESM::Land::~Land ( )
ESM::Land::Land ( const Land land)

Member Function Documentation

void ESM::Land::add ( int  flags)
Attention
Must not be called on objects that aren't fully loaded.
Note
Added data fields will be uninitialised
void ESM::Land::blank ( )
inline
bool ESM::Land::condLoad ( ESM::ESMReader reader,
int  flags,
int  dataFlag,
void *  ptr,
unsigned int  size 
) const
private

Loads data and marks it as loaded

Returns
true if data is actually loaded from file, false otherwise including the case when data is already loaded

Here is the call graph for this function:

Here is the caller graph for this function:

const Land::LandData * ESM::Land::getLandData ( int  flags) const

Return land data with at least the data types specified in flags loaded (if they are available). Will return a 0-pointer if there is no data for any of the specified types.

Here is the call graph for this function:

Here is the caller graph for this function:

const Land::LandData * ESM::Land::getLandData ( ) const

Return land data without loading first anything. Can return a 0-pointer.

Land::LandData * ESM::Land::getLandData ( )

Return land data without loading first anything. Can return a 0-pointer.

static std::string ESM::Land::getRecordType ( )
inlinestatic

Return a string descriptor for this record type. Currently used for debugging / error logs only.

bool ESM::Land::isDataLoaded ( int  flags) const

Check if given data type is loaded

Note
We only check data types that can be loaded (present in mDataTypes)

Here is the caller graph for this function:

void ESM::Land::load ( ESMReader esm,
bool isDeleted 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::Land::loadData ( int  flags) const

Actually loads data

Here is the call graph for this function:

Here is the caller graph for this function:

Land & ESM::Land::operator= ( Land  land)

Here is the call graph for this function:

void ESM::Land::remove ( int  flags)
Attention
Must not be called on objects that aren't fully loaded.
void ESM::Land::save ( ESMWriter esm,
bool  isDeleted = false 
) const

Here is the call graph for this function:

Here is the caller graph for this function:

void ESM::Land::swap ( Land land)

Here is the caller graph for this function:

void ESM::Land::unloadData ( )

Frees memory allocated for land data

Here is the caller graph for this function:

Member Data Documentation

const int ESM::Land::DEFAULT_HEIGHT = -2048
static
const int ESM::Land::HEIGHT_SCALE = 8
static
const int ESM::Land::LAND_NUM_TEXTURES = LAND_TEXTURE_SIZE * LAND_TEXTURE_SIZE
static
const int ESM::Land::LAND_NUM_VERTS = LAND_SIZE * LAND_SIZE
static
const int ESM::Land::LAND_SIZE = 65
static
const int ESM::Land::LAND_TEXTURE_SIZE = 16
static
ESM_Context ESM::Land::mContext
int ESM::Land::mDataLoaded
mutableprivate
int ESM::Land::mDataTypes
int ESM::Land::mFlags
LandData* ESM::Land::mLandData
mutableprivate
OpenThreads::Mutex ESM::Land::mMutex
mutableprivate
int ESM::Land::mPlugin
int ESM::Land::mX
int ESM::Land::mY
const int ESM::Land::REAL_SIZE = 8192
static
unsigned int ESM::Land::sRecordId = REC_LAND
static

The documentation for this struct was generated from the following files: