Need a break from Dolphin
All checks were successful
Build Dusk / run-tests (push) Successful in 1m36s
Build Dusk / build-linux (push) Successful in 1m14s
Build Dusk / build-psp (push) Successful in 2m2s
Build Dusk / build-dolphin (push) Successful in 2m49s

This commit is contained in:
2026-02-09 22:18:44 -06:00
parent 073ee8dca9
commit e1f08b07aa
11 changed files with 92 additions and 82 deletions

View File

@@ -24,10 +24,11 @@ textureGrid = textureLoad("minesweeper/grid_bg.dpi")
tilesetCell = tilesetGetByName("cell")
textureCell = textureLoad(tilesetCell.texture)
cellSliceHover = tilesetPositionGetUV(tilesetCell, 3, 4)
cellSliceDefault = tilesetPositionGetUV(tilesetCell, 3, 5)
cellSliceDown = tilesetPositionGetUV(tilesetCell, 3, 6)
cellSliceDisabled = tilesetPositionGetUV(tilesetCell, 3, 7)
-- cellSliceDefault = tilesetPositionGetUV(tilesetCell, 3, 5)
cellSliceDefault = tilesetPositionGetUV(tilesetCell, 0, 4)
-- cellSliceHover = tilesetPositionGetUV(tilesetCell, 3, 4)
-- cellSliceDown = tilesetPositionGetUV(tilesetCell, 3, 6)
-- cellSliceDisabled = tilesetPositionGetUV(tilesetCell, 3, 7)
width = 10
height = 14
@@ -42,15 +43,7 @@ for y = 1, height do
end
function cellDraw(x, y, type)
if type == CELL_STATE_HOVER then
slice = cellSliceHover
elseif type == CELL_STATE_DOWN then
slice = cellSliceDown
elseif type == CELL_STATE_DISABLED then
slice = cellSliceDisabled
else
slice = cellSliceDefault
end
slice = cellSliceDefault
spriteBatchPush(textureCell,
x, y,
@@ -90,21 +83,22 @@ function sceneRender()
cameraPushMatrix(camera)
camera.bottom = screenGetHeight()
camera.right = screenGetWidth()
cellDraw(0, 0, 0)
backgroundDraw()
-- backgroundDraw()
offsetX = 32
offsetY = 32
for y = 0, height - 1 do
for x = 0, width - 1 do
cellDraw(
x * tilesetCell.tileWidth + offsetX,
y * tilesetCell.tileHeight + offsetY,
cells[i]
)
break
end
end
-- offsetX = 32
-- offsetY = 32
-- for y = 0, height - 1 do
-- for x = 0, width - 1 do
-- cellDraw(
-- x * tilesetCell.tileWidth + offsetX,
-- y * tilesetCell.tileHeight + offsetY,
-- cells[i]
-- )
-- end
-- end
spriteBatchFlush()
cameraPopMatrix()