/********************************************************************
**
* File: gfCJigsawStencil.h
*
* Purpose: Stencil class for cutting out jigsaw pieces
*
* Base tile cut out then tongues / grooves added
*
* (T)
* ***************
* * (G) *
* * *
* (T)*(G) (G)*(T)
* * *
* * (G) *
* ***************
* (T)
*
*********************************************************************/
#ifndef gfCJigsawStencilhdr
#define gfCJigsawStencilhdr
#include "../gfIStencil.h"
class gfCJigsawStencilTextures;
class gfCJigsawStencil : public gfIStencil
{
public:
enum eEDGE
{
eSTRAIGHT,
eTONGUE,
eGROOVE
};
static eEDGE complimentGet(eEDGE pEdge);
gfCJigsawStencil(gfCJigsawStencilTextures* pStencilTex, fsS32 pWidth, fsS32 pHeight,
eEDGE pTop, eEDGE pRight, eEDGE pBottom, eEDGE pLeft, fsS32 pRow, fsS32 pCol);
gfCJigsawStencil(gfCJigsawStencilTextures* pStencilTex, fsCEntity* pParent);
~gfCJigsawStencil();<--- Destructor in derived class
protected:
void generate() override;
void doSave(fsCEntity* pParent) override;
void doLoad(fsCEntity* pParent) override;
private:
void basicTileCut();
void modifyDimensionsAndPosBasedOnEdges();
eEDGE mTop;
eEDGE mRight;
eEDGE mBottom;
eEDGE mLeft;
gfCJigsawStencilTextures* mStencilTextures;
};
#endif