|
@@ -6,8 +6,8 @@
|
|
|
t=0
|
|
|
|
|
|
p = {
|
|
|
- x = 10,
|
|
|
- y = 10,
|
|
|
+ x = -140,
|
|
|
+ y = -20,
|
|
|
spr = 0,
|
|
|
}
|
|
|
|
|
@@ -19,9 +19,9 @@ skeleton = {
|
|
|
map = {
|
|
|
{ 2, 0, 0, 0, 0, 0, 0, 0 },
|
|
|
{ 0, 0, 0, 0, 0, 0, 0, 0 },
|
|
|
- { 0, 0, 0, 0, 0, 0, 0, 0 },
|
|
|
- { 0, 0, 0, 0, 0, 0, 0, 0 },
|
|
|
- { 0, 0, 0, 0, 0, 0, 0, 0 },
|
|
|
+ { 0, 0, 0, 2, 0, 0, 0, 0 },
|
|
|
+ { 0, 0, 0, 0, 2, 0, 0, 0 },
|
|
|
+ { 0, 0, 0, 0, 0, 2, 0, 0 },
|
|
|
{ 0, 0, 0, 0, 0, 0, 0, 0 },
|
|
|
{ 0, 0, 0, 0, 0, 0, 0, 0 },
|
|
|
{ 0, 0, 0, 0, 0, 0, 0, 0 },
|
|
@@ -29,7 +29,7 @@ map = {
|
|
|
|
|
|
|
|
|
function handle_mouse()
|
|
|
- mx, my, pl, pm, pr = mouse()
|
|
|
+ local mx, my, pl, pm, pr = mouse()
|
|
|
|
|
|
end
|
|
|
|
|
@@ -37,7 +37,7 @@ function map2screen(mapx, mapy)
|
|
|
return (mapx-mapy-1) * 8 - p.x, (mapx+mapy-1) * 4 - p.y
|
|
|
end
|
|
|
|
|
|
-function update()
|
|
|
+function drawTiles()
|
|
|
for ky,yt in pairs(map) do
|
|
|
for kx,xt in pairs(yt) do
|
|
|
xtile, ytile = map2screen(kx, ky)
|
|
@@ -58,7 +58,7 @@ function TIC()
|
|
|
local xtile = 0
|
|
|
local ytile = 0
|
|
|
|
|
|
- update()
|
|
|
+ drawTiles()
|
|
|
t=t+1
|
|
|
end
|
|
|
|