DDraceNetwork Docs
map_create_pixelart.cpp File Reference
#include <base/logger.h>
#include <base/system.h>
#include <engine/gfx/image_loader.h>
#include <engine/shared/datafile.h>
#include <engine/storage.h>
#include <game/mapitems.h>
Include dependency graph for map_create_pixelart.cpp:

Functions

bool CreatePixelArt (const char[3][IO_MAX_PATH_LENGTH], const int[2], const int[2], int[2], const bool[2])
 
void InsertCurrentQuads (CDataFileReader &, CMapItemLayerQuads *, CQuad *)
 
int InsertPixelArtQuads (CQuad *, int &, const CImageInfo &, const int[2], const int[2], const bool[2])
 
bool OpenMaps (const char[2][IO_MAX_PATH_LENGTH], CDataFileReader &, CDataFileWriter &)
 
void SaveOutputMap (CDataFileReader &, CDataFileWriter &, CMapItemLayerQuads *, int, CQuad *, int)
 
CMapItemLayerQuadsGetQuadLayer (CDataFileReader &, const int[2], int *)
 
CQuad CreateNewQuad (float, float, int, int, const uint8_t[4], const int[2])
 
bool GetPixelClamped (const CImageInfo &, size_t, size_t, uint8_t[4])
 
bool ComparePixel (const uint8_t[4], const uint8_t[4])
 
bool IsPixelOptimizable (const CImageInfo &, size_t, size_t, const uint8_t[4], const bool[])
 
void SetVisitedPixels (const CImageInfo &, size_t, size_t, size_t, size_t, bool[])
 
size_t GetImagePixelSize (const CImageInfo &)
 
size_t FindSuperPixelSize (const CImageInfo &, const uint8_t[4], size_t, size_t, size_t, bool[])
 
void GetOptimizedQuadSize (const CImageInfo &, size_t, const uint8_t[4], size_t, size_t, size_t &, size_t &, bool[])
 
int main (int argc, const char **argv)
 

Function Documentation

◆ ComparePixel()

bool ComparePixel ( const uint8_t  aPixel1[4],
const uint8_t  aPixel2[4] 
)

◆ CreateNewQuad()

CQuad CreateNewQuad ( float  PosX,
float  PosY,
int  Width,
int  Height,
const uint8_t  aColor[4],
const int  aForcedPivot[2] = 0x0 
)

◆ CreatePixelArt()

bool CreatePixelArt ( const char  aFilenames[3][IO_MAX_PATH_LENGTH],
const int  aLayerId[2],
const int  aStartingPos[2],
int  aPixelSizes[2],
const bool  aArtOptions[2] 
)

◆ FindSuperPixelSize()

size_t FindSuperPixelSize ( const CImageInfo Img,
const uint8_t  aPixel[4],
size_t  PosX,
size_t  PosY,
size_t  CurrentSize,
bool  aVisitedPixels[] 
)

◆ GetImagePixelSize()

size_t GetImagePixelSize ( const CImageInfo Img)

◆ GetOptimizedQuadSize()

void GetOptimizedQuadSize ( const CImageInfo Img,
size_t  ImgPixelSize,
const uint8_t  aPixel[4],
size_t  PosX,
size_t  PosY,
size_t &  Width,
size_t &  Height,
bool  aVisitedPixels[] 
)

◆ GetPixelClamped()

bool GetPixelClamped ( const CImageInfo Img,
size_t  x,
size_t  y,
uint8_t  aPixel[4] 
)

◆ GetQuadLayer()

CMapItemLayerQuads * GetQuadLayer ( CDataFileReader InputMap,
const int  aLayerId[2],
int *  pItemNumber 
)

◆ InsertCurrentQuads()

void InsertCurrentQuads ( CDataFileReader InputMap,
CMapItemLayerQuads pQuadLayer,
CQuad pNewQuads 
)

◆ InsertPixelArtQuads()

int InsertPixelArtQuads ( CQuad pQuads,
int &  NumQuads,
const CImageInfo Img,
const int  aStartingPos[2],
const int  aPixelSizes[2],
const bool  aArtOptions[2] 
)

◆ IsPixelOptimizable()

bool IsPixelOptimizable ( const CImageInfo Img,
size_t  PosX,
size_t  PosY,
const uint8_t  aPixel[4],
const bool  aVisitedPixels[] 
)

◆ main()

int main ( int  argc,
const char **  argv 
)

◆ OpenMaps()

bool OpenMaps ( const char  pMapNames[2][IO_MAX_PATH_LENGTH],
CDataFileReader InputMap,
CDataFileWriter OutputMap 
)

◆ SaveOutputMap()

void SaveOutputMap ( CDataFileReader InputMap,
CDataFileWriter OutputMap,
CMapItemLayerQuads pNewItem,
int  NewItemNumber,
CQuad pNewData,
int  NewDataSize 
)

◆ SetVisitedPixels()

void SetVisitedPixels ( const CImageInfo Img,
size_t  PosX,
size_t  PosY,
size_t  Width,
size_t  Height,
bool  aVisitedPixels[] 
)