DDraceNetwork Docs
CLayerTiles Class Reference

#include <layer_tiles.h>

Inheritance diagram for CLayerTiles:
[legend]
Collaboration diagram for CLayerTiles:
[legend]

Classes

struct  SCommonPropState
 

Public Member Functions

 CLayerTiles (CEditor *pEditor, int w, int h)
 
 CLayerTiles (const CLayerTiles &Other)
 
 ~CLayerTiles ()
 
virtual CTile GetTile (int x, int y)
 
virtual void SetTile (int x, int y, CTile Tile)
 
void SetTileIgnoreHistory (int x, int y, CTile Tile) const
 
virtual void Resize (int NewW, int NewH)
 
virtual void Shift (int Direction)
 
void MakePalette () const
 
void Render (bool Tileset=false) override
 
int ConvertX (float x) const
 
int ConvertY (float y) const
 
void Convert (CUIRect Rect, RECTi *pOut) const
 
void Snap (CUIRect *pRect) const
 
void Clamp (RECTi *pRect) const
 
virtual bool IsEntitiesLayer () const override
 
virtual bool IsEmpty (const std::shared_ptr< CLayerTiles > &pLayer)
 
void BrushSelecting (CUIRect Rect) override
 
int BrushGrab (std::shared_ptr< CLayerGroup > pBrush, CUIRect Rect) override
 
void FillSelection (bool Empty, std::shared_ptr< CLayer > pBrush, CUIRect Rect) override
 
void FillGameTiles (EGameTileOp Fill)
 
bool CanFillGameTiles () const
 
void BrushDraw (std::shared_ptr< CLayer > pBrush, vec2 WorldPos) override
 
void BrushFlipX () override
 
void BrushFlipY () override
 
void BrushRotate (float Amount) override
 
std::shared_ptr< CLayerDuplicate () const override
 
const char * TypeName () const override
 
virtual void ShowInfo ()
 
CUi::EPopupMenuFunctionResult RenderProperties (CUIRect *pToolbox) override
 
void ModifyImageIndex (FIndexModifyFunction pfnFunc) override
 
void ModifyEnvelopeIndex (FIndexModifyFunction pfnFunc) override
 
void PrepareForSave ()
 
void ExtractTiles (int TilemapItemVersion, const CTile *pSavedTiles, size_t SavedTilesSize) const
 
void GetSize (float *pWidth, float *pHeight) override
 
void FlagModified (int x, int y, int w, int h)
 
virtual void ClearHistory ()
 
- Public Member Functions inherited from CLayer
class IGraphicsGraphics ()
 
class ITextRenderTextRender ()
 
 CLayer (CEditor *pEditor)
 
 CLayer (const CLayer &Other)
 
virtual ~CLayer ()
 
virtual void BrushSelecting (CUIRect Rect)
 
virtual int BrushGrab (std::shared_ptr< CLayerGroup > pBrush, CUIRect Rect)
 
virtual void FillSelection (bool Empty, std::shared_ptr< CLayer > pBrush, CUIRect Rect)
 
virtual void BrushDraw (std::shared_ptr< CLayer > pBrush, vec2 WorldPos)
 
virtual void BrushPlace (std::shared_ptr< CLayer > pBrush, vec2 WorldPos)
 
virtual void BrushFlipX ()
 
virtual void BrushFlipY ()
 
virtual void BrushRotate (float Amount)
 
virtual bool IsEntitiesLayer () const
 
virtual void Render (bool Tileset=false)
 
virtual CUi::EPopupMenuFunctionResult RenderProperties (CUIRect *pToolbox)
 
virtual void ModifyImageIndex (FIndexModifyFunction pfnFunc)
 
virtual void ModifyEnvelopeIndex (FIndexModifyFunction pfnFunc)
 
virtual void ModifySoundIndex (FIndexModifyFunction pfnFunc)
 
virtual std::shared_ptr< CLayerDuplicate () const =0
 
virtual const char * TypeName () const =0
 
virtual void GetSize (float *pWidth, float *pHeight)
 

Static Public Member Functions

static CUi::EPopupMenuFunctionResult RenderCommonProperties (SCommonPropState &State, CEditor *pEditor, CUIRect *pToolbox, std::vector< std::shared_ptr< CLayerTiles > > &vpLayers, std::vector< int > &vLayerIndices)
 
static bool HasAutomapEffect (ETilesProp Prop)
 

Public Attributes

int m_Game
 
int m_Image
 
int m_Width
 
int m_Height
 
CColor m_Color
 
int m_ColorEnv
 
int m_ColorEnvOffset
 
CTilem_pTiles
 
int m_AutoMapperConfig
 
int m_Seed
 
bool m_AutoAutoMap
 
int m_Tele
 
int m_Speedup
 
int m_Front
 
int m_Switch
 
int m_Tune
 
char m_aFileName [IO_MAX_PATH_LENGTH]
 
EditorTileStateChangeHistory< STileStateChangem_TilesHistory
 
- Public Attributes inherited from CLayer
class CEditorm_pEditor
 
char m_aName [12]
 
int m_Type
 
int m_Flags
 
bool m_Readonly
 
bool m_Visible
 

Protected Member Functions

template<typename T >
void ShiftImpl (T *pTiles, int Direction, int ShiftBy)
 
template<typename T >
void BrushFlipXImpl (T *pTiles)
 
template<typename T >
void BrushFlipYImpl (T *pTiles)
 
void RecordStateChange (int x, int y, CTile Previous, CTile Tile)
 
void ShowPreventUnusedTilesWarning ()
 

Friends

class CAutoMapper
 

Constructor & Destructor Documentation

◆ CLayerTiles() [1/2]

CLayerTiles::CLayerTiles ( CEditor pEditor,
int  w,
int  h 
)

◆ CLayerTiles() [2/2]

CLayerTiles::CLayerTiles ( const CLayerTiles Other)

◆ ~CLayerTiles()

CLayerTiles::~CLayerTiles ( )

Member Function Documentation

◆ BrushDraw()

void CLayerTiles::BrushDraw ( std::shared_ptr< CLayer pBrush,
vec2  WorldPos 
)
overridevirtual

Reimplemented from CLayer.

Reimplemented in CLayerTune.

◆ BrushFlipX()

void CLayerTiles::BrushFlipX ( )
overridevirtual

Reimplemented from CLayer.

Reimplemented in CLayerTune.

◆ BrushFlipXImpl()

template<typename T >
void CLayerTiles::BrushFlipXImpl ( T *  pTiles)
inlineprotected

◆ BrushFlipY()

void CLayerTiles::BrushFlipY ( )
overridevirtual

Reimplemented from CLayer.

Reimplemented in CLayerTune.

◆ BrushFlipYImpl()

template<typename T >
void CLayerTiles::BrushFlipYImpl ( T *  pTiles)
inlineprotected

◆ BrushGrab()

int CLayerTiles::BrushGrab ( std::shared_ptr< CLayerGroup pBrush,
CUIRect  Rect 
)
overridevirtual

Reimplemented from CLayer.

◆ BrushRotate()

void CLayerTiles::BrushRotate ( float  Amount)
overridevirtual

Reimplemented from CLayer.

Reimplemented in CLayerTune.

◆ BrushSelecting()

void CLayerTiles::BrushSelecting ( CUIRect  Rect)
overridevirtual

Reimplemented from CLayer.

◆ CanFillGameTiles()

bool CLayerTiles::CanFillGameTiles ( ) const

◆ Clamp()

void CLayerTiles::Clamp ( RECTi pRect) const

◆ ClearHistory()

virtual void CLayerTiles::ClearHistory ( )
inlinevirtual

Reimplemented in CLayerSpeedup, CLayerSwitch, CLayerTele, and CLayerTune.

◆ Convert()

void CLayerTiles::Convert ( CUIRect  Rect,
RECTi pOut 
) const

◆ ConvertX()

int CLayerTiles::ConvertX ( float  x) const

◆ ConvertY()

int CLayerTiles::ConvertY ( float  y) const

◆ Duplicate()

std::shared_ptr< CLayer > CLayerTiles::Duplicate ( ) const
overridevirtual

Implements CLayer.

Reimplemented in CLayerTune.

◆ ExtractTiles()

void CLayerTiles::ExtractTiles ( int  TilemapItemVersion,
const CTile pSavedTiles,
size_t  SavedTilesSize 
) const

◆ FillGameTiles()

void CLayerTiles::FillGameTiles ( EGameTileOp  Fill)

◆ FillSelection()

void CLayerTiles::FillSelection ( bool  Empty,
std::shared_ptr< CLayer pBrush,
CUIRect  Rect 
)
overridevirtual

Reimplemented from CLayer.

Reimplemented in CLayerTune.

◆ FlagModified()

void CLayerTiles::FlagModified ( int  x,
int  y,
int  w,
int  h 
)

◆ GetSize()

void CLayerTiles::GetSize ( float *  pWidth,
float *  pHeight 
)
inlineoverridevirtual

Reimplemented from CLayer.

◆ GetTile()

CTile CLayerTiles::GetTile ( int  x,
int  y 
)
virtual

Reimplemented in CLayerGame.

◆ HasAutomapEffect()

bool CLayerTiles::HasAutomapEffect ( ETilesProp  Prop)
static

◆ IsEmpty()

bool CLayerTiles::IsEmpty ( const std::shared_ptr< CLayerTiles > &  pLayer)
virtual

Reimplemented in CLayerSpeedup, CLayerSwitch, CLayerTele, and CLayerTune.

◆ IsEntitiesLayer()

bool CLayerTiles::IsEntitiesLayer ( ) const
overridevirtual

Reimplemented from CLayer.

◆ MakePalette()

void CLayerTiles::MakePalette ( ) const

◆ ModifyEnvelopeIndex()

void CLayerTiles::ModifyEnvelopeIndex ( FIndexModifyFunction  pfnFunc)
overridevirtual

Reimplemented from CLayer.

◆ ModifyImageIndex()

void CLayerTiles::ModifyImageIndex ( FIndexModifyFunction  pfnFunc)
overridevirtual

Reimplemented from CLayer.

◆ PrepareForSave()

void CLayerTiles::PrepareForSave ( )

◆ RecordStateChange()

void CLayerTiles::RecordStateChange ( int  x,
int  y,
CTile  Previous,
CTile  Tile 
)
protected

◆ Render()

void CLayerTiles::Render ( bool  Tileset = false)
overridevirtual

Reimplemented from CLayer.

◆ RenderCommonProperties()

CUi::EPopupMenuFunctionResult CLayerTiles::RenderCommonProperties ( SCommonPropState State,
CEditor pEditor,
CUIRect pToolbox,
std::vector< std::shared_ptr< CLayerTiles > > &  vpLayers,
std::vector< int > &  vLayerIndices 
)
static

◆ RenderProperties()

CUi::EPopupMenuFunctionResult CLayerTiles::RenderProperties ( CUIRect pToolbox)
overridevirtual

Reimplemented from CLayer.

◆ Resize()

void CLayerTiles::Resize ( int  NewW,
int  NewH 
)
virtual

◆ SetTile()

void CLayerTiles::SetTile ( int  x,
int  y,
CTile  Tile 
)
virtual

Reimplemented in CLayerFront, and CLayerGame.

◆ SetTileIgnoreHistory()

void CLayerTiles::SetTileIgnoreHistory ( int  x,
int  y,
CTile  Tile 
) const

◆ Shift()

void CLayerTiles::Shift ( int  Direction)
virtual

Reimplemented in CLayerSpeedup, CLayerSwitch, CLayerTele, and CLayerTune.

◆ ShiftImpl()

template<typename T >
void CLayerTiles::ShiftImpl ( T *  pTiles,
int  Direction,
int  ShiftBy 
)
inlineprotected

◆ ShowInfo()

void CLayerTiles::ShowInfo ( )
virtual

◆ ShowPreventUnusedTilesWarning()

void CLayerTiles::ShowPreventUnusedTilesWarning ( )
protected

◆ Snap()

void CLayerTiles::Snap ( CUIRect pRect) const

◆ TypeName()

const char * CLayerTiles::TypeName ( ) const
overridevirtual

Implements CLayer.

Reimplemented in CLayerTune.

Friends And Related Function Documentation

◆ CAutoMapper

friend class CAutoMapper
friend

Member Data Documentation

◆ m_aFileName

char CLayerTiles::m_aFileName[IO_MAX_PATH_LENGTH]

◆ m_AutoAutoMap

bool CLayerTiles::m_AutoAutoMap

◆ m_AutoMapperConfig

int CLayerTiles::m_AutoMapperConfig

◆ m_Color

CColor CLayerTiles::m_Color

◆ m_ColorEnv

int CLayerTiles::m_ColorEnv

◆ m_ColorEnvOffset

int CLayerTiles::m_ColorEnvOffset

◆ m_Front

int CLayerTiles::m_Front

◆ m_Game

int CLayerTiles::m_Game

◆ m_Height

int CLayerTiles::m_Height

◆ m_Image

int CLayerTiles::m_Image

◆ m_pTiles

CTile* CLayerTiles::m_pTiles

◆ m_Seed

int CLayerTiles::m_Seed

◆ m_Speedup

int CLayerTiles::m_Speedup

◆ m_Switch

int CLayerTiles::m_Switch

◆ m_Tele

int CLayerTiles::m_Tele

◆ m_TilesHistory

EditorTileStateChangeHistory<STileStateChange> CLayerTiles::m_TilesHistory

◆ m_Tune

int CLayerTiles::m_Tune

◆ m_Width

int CLayerTiles::m_Width

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