cirnofarm/src/cirno.lua

39 lines
544 B
Lua
Raw Normal View History

2024-04-14 16:19:38 +02:00
--[[pod_format="raw",created="2024-04-14 14:05:11",modified="2024-04-14 14:17:48",revision=5]]
2024-04-14 15:51:45 +02:00
function _init()
x = 128
y = 128
hflip = false
playerSpr = 64
end
function _draw()
cls(0)
2024-04-14 16:19:38 +02:00
camera(x - 240, y - 135)
2024-04-14 15:51:45 +02:00
2024-04-14 16:19:38 +02:00
drawMap()
2024-04-14 15:51:45 +02:00
spr(playerSpr,x,y, hflip)
2024-04-14 16:19:38 +02:00
spr(playerSpr,x+32,y, hflip)
end
2024-04-14 15:51:45 +02:00
2024-04-14 16:19:38 +02:00
function drawMap()
for i=2,1,-1 do
map(fetch"map/0.map"[i].bmp)
end
2024-04-14 15:51:45 +02:00
end
function _update()
if (btn(0)) x -= 2 hflip = true
if (btn(1)) x += 2 hflip = false
if (btn(2)) y -= 2
if (btn(3)) y += 2
2024-04-14 16:19:38 +02:00
end
function checkCollision(x,y)
2024-04-14 15:51:45 +02:00
end