DDraceNetwork Docs
tileart.cpp File Reference
#include "editor.h"
#include "editor_actions.h"
#include <game/editor/mapitems/image.h>
#include <array>
Include dependency graph for tileart.cpp:

Functions

bool operator< (const ColorRGBA &Left, const ColorRGBA &Right)
 
static std::vector< ColorRGBAGetUniqueColors (const CImageInfo &Image)
 
static int GetColorIndex (const std::array< ColorRGBA, NumTiles > &ColorGroup, ColorRGBA Color)
 
static std::vector< std::array< ColorRGBA, NumTiles > > GroupColors (const std::vector< ColorRGBA > &vColors)
 
static void SetColorTile (CImageInfo &Image, int x, int y, ColorRGBA Color)
 
static CImageInfo ColorGroupToImage (const std::array< ColorRGBA, NumTiles > &aColorGroup)
 
static std::vector< CImageInfoColorGroupsToImages (const std::vector< std::array< ColorRGBA, NumTiles > > &vaColorGroups)
 
static std::shared_ptr< CEditorImageImageInfoToEditorImage (CEditor *pEditor, const CImageInfo &Image, const char *pName)
 
static std::shared_ptr< CLayerTilesAddLayerWithImage (CEditor *pEditor, const std::shared_ptr< CLayerGroup > &pGroup, int Width, int Height, const CImageInfo &Image, const char *pName)
 
static void SetTilelayerIndices (const std::shared_ptr< CLayerTiles > &pLayer, const std::array< ColorRGBA, NumTiles > &aColorGroup, const CImageInfo &Image)
 

Variables

constexpr int NumTilesRow = 16
 
constexpr int NumTilesColumn = 16
 
constexpr int NumTiles = NumTilesRow * NumTilesColumn
 
constexpr int TileSize = 64
 

Function Documentation

◆ AddLayerWithImage()

static std::shared_ptr< CLayerTiles > AddLayerWithImage ( CEditor pEditor,
const std::shared_ptr< CLayerGroup > &  pGroup,
int  Width,
int  Height,
const CImageInfo Image,
const char *  pName 
)
static

◆ ColorGroupsToImages()

static std::vector< CImageInfo > ColorGroupsToImages ( const std::vector< std::array< ColorRGBA, NumTiles > > &  vaColorGroups)
static

◆ ColorGroupToImage()

static CImageInfo ColorGroupToImage ( const std::array< ColorRGBA, NumTiles > &  aColorGroup)
static

◆ GetColorIndex()

static int GetColorIndex ( const std::array< ColorRGBA, NumTiles > &  ColorGroup,
ColorRGBA  Color 
)
static

◆ GetUniqueColors()

static std::vector< ColorRGBA > GetUniqueColors ( const CImageInfo Image)
static

◆ GroupColors()

static std::vector< std::array< ColorRGBA, NumTiles > > GroupColors ( const std::vector< ColorRGBA > &  vColors)
static

◆ ImageInfoToEditorImage()

static std::shared_ptr< CEditorImage > ImageInfoToEditorImage ( CEditor pEditor,
const CImageInfo Image,
const char *  pName 
)
static

◆ operator<()

bool operator< ( const ColorRGBA Left,
const ColorRGBA Right 
)

◆ SetColorTile()

static void SetColorTile ( CImageInfo Image,
int  x,
int  y,
ColorRGBA  Color 
)
static

◆ SetTilelayerIndices()

static void SetTilelayerIndices ( const std::shared_ptr< CLayerTiles > &  pLayer,
const std::array< ColorRGBA, NumTiles > &  aColorGroup,
const CImageInfo Image 
)
static

Variable Documentation

◆ NumTiles

constexpr int NumTiles = NumTilesRow * NumTilesColumn
constexpr

◆ NumTilesColumn

constexpr int NumTilesColumn = 16
constexpr

◆ NumTilesRow

constexpr int NumTilesRow = 16
constexpr

◆ TileSize

constexpr int TileSize = 64
constexpr