Moving some assets around

This commit is contained in:
2023-06-20 10:54:15 -07:00
parent 0b3bae6e6c
commit e2e4732938
14 changed files with 76 additions and 63 deletions

View File

@ -43,7 +43,4 @@ target_compile_definitions(${DAWN_TARGET_NAME}
PUBLIC
${DAWN_SHARED_DEFINITIONS}
DAWN_DEBUG_BUILD=${DAWN_DEBUG_BUILD}
)
# Common Prefabs
tool_prefab("prefabs/ui/debug/FPSLabel.xml")
)

View File

@ -18,6 +18,33 @@ TilesetGrid::TilesetGrid() {
}
TilesetGrid::TilesetGrid(
Texture *texture,
int32_t columns,
int32_t rows
) : TilesetGrid(
columns, rows,
texture->getWidth(), texture->getHeight(),
0, 0,
0, 0
) {
}
TilesetGrid::TilesetGrid(
Texture &texture,
int32_t columns,
int32_t rows
) : TilesetGrid(
columns, rows,
texture.getWidth(), texture.getHeight(),
0, 0,
0, 0
) {
}
TilesetGrid::TilesetGrid(
int32_t columns,
int32_t rows,

View File

@ -6,6 +6,7 @@
#pragma once
#include "dawnlibs.hpp"
#include "assert/assert.hpp"
#include "display/Texture.hpp"
namespace Dawn {
struct Tile {
@ -53,6 +54,24 @@ namespace Dawn {
* Constructs a new Tileset Grid.
*/
TilesetGrid();
/**
* Constructs a new Tileset Grid from a texture.
*
* @param texture Texture to use.
* @param columns Columns in the grid.
* @param rows Rows in the grid.
*/
TilesetGrid(Texture *texture, int32_t columns, int32_t rows);
/**
* Constructs a new Tileset Grid from a texture.
*
* @param texture Texture to use.
* @param columns Columns in the grid.
* @param rows Rows in the grid.
*/
TilesetGrid(Texture &texture, int32_t columns, int32_t rows);
/**
* Constructs a new Tileset Grid.