Files
dusk/assets/scene/initial.lua
Dominic Masters 13c4df0d85
All checks were successful
Build Dusk / run-tests (push) Successful in 1m39s
Build Dusk / build-linux (push) Successful in 1m34s
Build Dusk / build-psp (push) Successful in 2m7s
Build Dusk / build-dolphin (push) Successful in 1m48s
Compiles on dolphin, finally
2026-02-08 19:30:02 -06:00

42 lines
848 B
Lua

module('spritebatch')
module('camera')
module('color')
-- module('ui')
module('text')
module('screen')
module('time')
-- module('map')
module('glm')
screenSetBackground(colorBlack())
-- mapLoad('map/testmap/testmap.dmf')
camera = cameraCreate(CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC)
text = "Hello World"
function sceneDispose()
end
function sceneUpdate()
end
function sceneRender()
-- Map Test
-- cameraPushMatrix(mapCamera)
-- mapRender()
-- cameraPopMatrix()
-- UI Test
cameraPushMatrix(camera)
camera.bottom = screenGetHeight()
camera.right = screenGetWidth()
width, height = textMeasure(text)
x = (screenGetWidth() - width)
x = math.sin(TIME.time * 2) * (x / 2) + (x / 2)
y = (screenGetHeight() - height) / 2
y = math.cos(TIME.time * 3) * (y) + (y)
textDraw(x, y, text, colorMagenta())
cameraPopMatrix()
end