Merged branch 'msDifference'.
This commit is contained in:
commit
e7e65b5005
@ -249,6 +249,9 @@ g_APIDesc =
|
|||||||
<tr>
|
<tr>
|
||||||
<td> A </td><td> B </td><td> B </td><td> A </td><td> B </td>
|
<td> A </td><td> B </td><td> B </td><td> A </td><td> B </td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td> A </td><td> A </td><td> A </td><td> A </td><td> A </td>
|
||||||
|
</td>
|
||||||
</tbody></table>
|
</tbody></table>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -263,6 +266,19 @@ g_APIDesc =
|
|||||||
<h3>Special strategies</h3>
|
<h3>Special strategies</h3>
|
||||||
<p>For each strategy, evaluate the table rows from top downwards, the first match wins.</p>
|
<p>For each strategy, evaluate the table rows from top downwards, the first match wins.</p>
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<strong>msDifference</strong> - changes all the blocks which are the same to air. Otherwise the source block gets placed.
|
||||||
|
</p>
|
||||||
|
<table><tbody<tr>
|
||||||
|
<th colspan="2"> area block </th><th> </th><th> Notes </th>
|
||||||
|
</tr><tr>
|
||||||
|
<td> * </td><td> B </td><td> B </td><td> The blocks are different so we use block B </td>
|
||||||
|
</tr><tr>
|
||||||
|
<td> B </td><td> B </td><td> Air </td><td> The blocks are the same so we get air. </td>
|
||||||
|
</tr>
|
||||||
|
</tbody></table>
|
||||||
|
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
<strong>msLake</strong> - used for merging areas with lava and water lakes, in the appropriate generator.
|
<strong>msLake</strong> - used for merging areas with lava and water lakes, in the appropriate generator.
|
||||||
</p>
|
</p>
|
||||||
|
@ -173,6 +173,25 @@ static inline void MergeCombinatorSpongePrint(BLOCKTYPE & a_DstType, BLOCKTYPE a
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/** Combinator used for cBlockArea::msDifference merging */
|
||||||
|
static inline void MergeCombinatorDifference(BLOCKTYPE & a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE & a_DstMeta, NIBBLETYPE a_SrcMeta)
|
||||||
|
{
|
||||||
|
if ((a_DstType == a_SrcType) && (a_DstMeta == a_SrcMeta))
|
||||||
|
{
|
||||||
|
a_DstType = E_BLOCK_AIR;
|
||||||
|
a_DstMeta = 0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
a_DstType = a_SrcType;
|
||||||
|
a_DstMeta = a_SrcMeta;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/** Combinator used for cBlockArea::msMask merging */
|
/** Combinator used for cBlockArea::msMask merging */
|
||||||
static inline void MergeCombinatorMask(BLOCKTYPE & a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE & a_DstMeta, NIBBLETYPE a_SrcMeta)
|
static inline void MergeCombinatorMask(BLOCKTYPE & a_DstType, BLOCKTYPE a_SrcType, NIBBLETYPE & a_DstMeta, NIBBLETYPE a_SrcMeta)
|
||||||
{
|
{
|
||||||
@ -725,6 +744,21 @@ void cBlockArea::Merge(const cBlockArea & a_Src, int a_RelX, int a_RelY, int a_R
|
|||||||
break;
|
break;
|
||||||
} // case msSpongePrint
|
} // case msSpongePrint
|
||||||
|
|
||||||
|
case msDifference:
|
||||||
|
{
|
||||||
|
InternalMergeBlocks(
|
||||||
|
m_BlockTypes, a_Src.GetBlockTypes(),
|
||||||
|
DstMetas, SrcMetas,
|
||||||
|
SizeX, SizeY, SizeZ,
|
||||||
|
SrcOffX, SrcOffY, SrcOffZ,
|
||||||
|
DstOffX, DstOffY, DstOffZ,
|
||||||
|
a_Src.GetSizeX(), a_Src.GetSizeY(), a_Src.GetSizeZ(),
|
||||||
|
m_Size.x, m_Size.y, m_Size.z,
|
||||||
|
MergeCombinatorDifference
|
||||||
|
);
|
||||||
|
break;
|
||||||
|
} // case msDifference
|
||||||
|
|
||||||
case msMask:
|
case msMask:
|
||||||
{
|
{
|
||||||
InternalMergeBlocks(
|
InternalMergeBlocks(
|
||||||
|
@ -52,6 +52,7 @@ public:
|
|||||||
msImprint,
|
msImprint,
|
||||||
msLake,
|
msLake,
|
||||||
msSpongePrint,
|
msSpongePrint,
|
||||||
|
msDifference,
|
||||||
msMask,
|
msMask,
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user