Minesweeper prog
This commit is contained in:
@@ -18,6 +18,7 @@ void uiFrameDraw(
|
||||
const tileset_t *tileset,
|
||||
const uint16_t column,
|
||||
const uint16_t row,
|
||||
const bool_t drawInner,
|
||||
texture_t *texture
|
||||
) {
|
||||
assertNotNull(tileset, "Tileset cannot be NULL");
|
||||
@@ -89,19 +90,21 @@ void uiFrameDraw(
|
||||
);
|
||||
|
||||
// Middle-Center
|
||||
tilesetPositionGetUV(
|
||||
tileset,
|
||||
column + 1,
|
||||
row + 1,
|
||||
uv
|
||||
);
|
||||
spriteBatchPush(
|
||||
texture,
|
||||
x + tileset->tileWidth, y + tileset->tileHeight,
|
||||
x + width - tileset->tileWidth, y + height - tileset->tileHeight,
|
||||
COLOR_WHITE,
|
||||
uv[0], uv[1], uv[2], uv[3]
|
||||
);
|
||||
if(drawInner) {
|
||||
tilesetPositionGetUV(
|
||||
tileset,
|
||||
column + 1,
|
||||
row + 1,
|
||||
uv
|
||||
);
|
||||
spriteBatchPush(
|
||||
texture,
|
||||
x + tileset->tileWidth, y + tileset->tileHeight,
|
||||
x + width - tileset->tileWidth, y + height - tileset->tileHeight,
|
||||
COLOR_WHITE,
|
||||
uv[0], uv[1], uv[2], uv[3]
|
||||
);
|
||||
}
|
||||
|
||||
// Middle-Right
|
||||
tilesetPositionGetUV(
|
||||
@@ -172,6 +175,7 @@ void uiFrameDrawTiled(
|
||||
const tileset_t *tileset,
|
||||
const uint16_t column,
|
||||
const uint16_t row,
|
||||
const bool_t drawInner,
|
||||
texture_t *texture
|
||||
) {
|
||||
assertNotNull(tileset, "Tileset cannot be NULL");
|
||||
@@ -337,6 +341,8 @@ void uiFrameDrawTiled(
|
||||
}
|
||||
|
||||
// Center (Tiled)
|
||||
if(!drawInner) return;
|
||||
|
||||
tilesetPositionGetUV(tileset, column + 1, row + 1, uv); // Center tile
|
||||
float_t centerY = y + tileset->tileHeight;
|
||||
for(uint32_t j = 0; j < segmentsY; ++j, centerY += tileset->tileHeight) {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
* @param tileset The tileset to use for rendering the frame.
|
||||
* @param column The column in the tileset to use for the frame.
|
||||
* @param row The row in the tileset to use for the frame.
|
||||
* @param drawInner Whether to draw the inner area.
|
||||
* @param texture The texture associated with the tileset.
|
||||
*/
|
||||
void uiFrameDraw(
|
||||
@@ -29,6 +30,7 @@ void uiFrameDraw(
|
||||
const tileset_t *tileset,
|
||||
const uint16_t column,
|
||||
const uint16_t row,
|
||||
const bool_t drawInner,
|
||||
texture_t *texture
|
||||
);
|
||||
|
||||
@@ -43,6 +45,7 @@ void uiFrameDraw(
|
||||
* @param tileset The tileset to use for rendering the frame.
|
||||
* @param column The column in the tileset to use for the frame.
|
||||
* @param row The row in the tileset to use for the frame.
|
||||
* @param drawInner Whether to draw the inner tiled area.
|
||||
* @param texture The texture associated with the tileset.
|
||||
*/
|
||||
void uiFrameDrawTiled(
|
||||
@@ -53,5 +56,6 @@ void uiFrameDrawTiled(
|
||||
const tileset_t *tileset,
|
||||
const uint16_t column,
|
||||
const uint16_t row,
|
||||
const bool_t drawInner,
|
||||
texture_t *texture
|
||||
);
|
||||
Reference in New Issue
Block a user