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 "BlockInfo.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

◆ CombinatorFunc

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

Definition at line 34 of file BlockArea.cpp.

Function Documentation

◆ InternalMergeBlocks()

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 39 of file BlockArea.cpp.

◆ MergeCombinatorDifference()

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 231 of file BlockArea.cpp.

◆ MergeCombinatorFillAir()

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 100 of file BlockArea.cpp.

◆ MergeCombinatorImprint()

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 119 of file BlockArea.cpp.

◆ MergeCombinatorLake()

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 138 of file BlockArea.cpp.

◆ MergeCombinatorMask()

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 277 of file BlockArea.cpp.

◆ MergeCombinatorOverwrite()

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 85 of file BlockArea.cpp.

◆ MergeCombinatorSimpleCompare()

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 257 of file BlockArea.cpp.

◆ MergeCombinatorSpongePrint()

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 212 of file BlockArea.cpp.