16{
18 {
19 return false;
20 }
21
22
23
24
25 unsigned int cellWidth;
26 unsigned int cellHeight;
28
29
30 unsigned int numberOfColumns;
31 unsigned int numberOfRows;
33
34
35 ImageData textureAtlasPalette(static_cast<unsigned int>(cellWidth * numberOfColumns), static_cast<unsigned int>(cellHeight * numberOfRows));
37
39
40 for( int y = 0; y < numberOfRows; y++ )
41 {
42 for( int x = 0; x < numberOfColumns; x++ )
43 {
45 {
47
48 texAtlasData.emplace(imageIterator->first, std::make_pair<unsigned int, unsigned int>(x * cellWidth, y * cellHeight));
49
50 imageIterator++;
51 }
52 }
53 }
54 texAtlasImage = textureAtlasPalette;
55
56 return true;
57}
static void DrawImageOnImageAtPos(unsigned int const x, unsigned int const y, ImageData &toImage, ImageData &fromImage)
Overlays one image on top of another at a given position.
static const Color sDefaultPaletteBackgroundColor
void CalculateGridDimensions(unsigned int &outputNumberOfColumns, unsigned int &outputNumberOfRows)