Cuberite
A lightweight, fast and extensible game server for Minecraft
Typedefs | Functions
BlockArea.cpp File Reference
#include "Globals.h"
#include "BlockArea.h"
#include "OSSupport/GZipFile.h"
#include "Blocks/BlockHandler.h"
#include "ChunkData.h"
#include "BlockEntities/BlockEntity.h"
#include "Item.h"
Include dependency graph for BlockArea.cpp:

Go to the source code of this file.

Typedefs

typedef void( CombinatorFunc) (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 

Functions

template<bool MetasValid, CombinatorFunc Combinator>
void InternalMergeBlocks (BLOCKTYPE *a_DstTypes, const BLOCKTYPE *a_SrcTypes, NIBBLETYPE *a_DstMetas, const NIBBLETYPE *a_SrcMetas, int a_SizeX, int a_SizeY, int a_SizeZ, int a_SrcOffX, int a_SrcOffY, int a_SrcOffZ, int a_DstOffX, int a_DstOffY, int a_DstOffZ, int a_SrcSizeX, int a_SrcSizeY, int a_SrcSizeZ, int a_DstSizeX, int a_DstSizeY, int a_DstSizeZ)
 Merges two blocktypes and blockmetas of the specified sizes and offsets using the specified combinator function This wild construct allows us to pass a function argument and still have it inlined by the compiler. More...
 
template<bool MetaValid>
void MergeCombinatorDifference (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msDifference merging. More...
 
template<bool MetaValid>
void MergeCombinatorFillAir (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msFillAir merging. More...
 
template<bool MetaValid>
void MergeCombinatorImprint (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msImprint merging. More...
 
template<bool MetaValid>
void MergeCombinatorLake (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msLake merging. More...
 
template<bool MetaValid>
void MergeCombinatorMask (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msMask merging. More...
 
template<bool MetaValid>
void MergeCombinatorOverwrite (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msOverwrite merging. More...
 
template<bool MetaValid>
void MergeCombinatorSimpleCompare (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msSimpleCompare merging. More...
 
template<bool MetaValid>
void MergeCombinatorSpongePrint (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)
 Combinator used for cBlockArea::msSpongePrint merging. More...
 

Typedef Documentation

typedef void( CombinatorFunc) (BLOCKTYPE &a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE &a_DstMeta, NIBBLETYPE a_SrcMeta)

Definition at line 32 of file BlockArea.cpp.

Function Documentation

template<bool MetasValid, CombinatorFunc Combinator>
void InternalMergeBlocks ( BLOCKTYPE a_DstTypes,
const BLOCKTYPE a_SrcTypes,
NIBBLETYPE a_DstMetas,
const NIBBLETYPE a_SrcMetas,
int  a_SizeX,
int  a_SizeY,
int  a_SizeZ,
int  a_SrcOffX,
int  a_SrcOffY,
int  a_SrcOffZ,
int  a_DstOffX,
int  a_DstOffY,
int  a_DstOffZ,
int  a_SrcSizeX,
int  a_SrcSizeY,
int  a_SrcSizeZ,
int  a_DstSizeX,
int  a_DstSizeY,
int  a_DstSizeZ 
)

Merges two blocktypes and blockmetas of the specified sizes and offsets using the specified combinator function This wild construct allows us to pass a function argument and still have it inlined by the compiler.

Definition at line 37 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorDifference ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msDifference merging.

Definition at line 229 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorFillAir ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msFillAir merging.

Definition at line 98 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorImprint ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msImprint merging.

Definition at line 117 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorLake ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msLake merging.

Definition at line 136 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorMask ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msMask merging.

Definition at line 275 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorOverwrite ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msOverwrite merging.

Definition at line 83 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorSimpleCompare ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msSimpleCompare merging.

Definition at line 255 of file BlockArea.cpp.

template<bool MetaValid>
void MergeCombinatorSpongePrint ( BLOCKTYPE a_DstType,
BLOCKTYPE  a_SrcType,
NIBBLETYPE a_DstMeta,
NIBBLETYPE  a_SrcMeta 
)

Combinator used for cBlockArea::msSpongePrint merging.

Definition at line 210 of file BlockArea.cpp.