Emu vs Real!

This commit is contained in:
2026-02-05 08:43:49 -06:00
parent 5cf299a1c7
commit dd697d5650
5 changed files with 101 additions and 61 deletions

View File

@@ -8,37 +8,53 @@ module('time')
module('map')
module('glm')
screenSetBackground(colorBlack())
mapLoad('map/testmap/testmap.dmf')
camera = cameraCreate(CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC)
screenSetBackground(colorLime())
mapCamera = cameraCreate()
text = "Hello World"
text = "Hello, Dusk!"
function sceneDispose()
end
function sceneUpdate()
end
function sceneRender()
-- Map Test
mapCamera.position = vec3(4, 4, 4)
cameraPushMatrix(mapCamera)
mapCamera.position = vec3(300, 300, 300)
mapRender()
spriteBatchPush(nil, -1, -1, 1, 1, colorBlue())
spriteBatchFlush()
cameraPopMatrix()
end
-- 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())
-- screenSetBackground(colorBlack())
-- mapLoad('map/testmap/testmap.dmf')
-- camera = cameraCreate(CAMERA_PROJECTION_TYPE_ORTHOGRAPHIC)
-- mapCamera = cameraCreate()
cameraPopMatrix()
end
-- text = "Hello World"
-- function sceneDispose()
-- end
-- function sceneUpdate()
-- end
-- function sceneRender()
-- -- Map Test
-- mapCamera.position = vec3(300, 300, 300)
-- 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