- Canvis per a adaptar el codi a mini v0.9.95

This commit is contained in:
2024-02-15 13:54:34 +01:00
parent 00423dfd73
commit d5a886987d
7 changed files with 29 additions and 29 deletions

View File

@@ -53,22 +53,22 @@ actors={
local x,y = v.x, v.y
if v.ox then x = x + v.ox end
if v.oy then y = y + v.oy end
local mx = math.floor((mousex()+game.cam.x)/8)
local my = math.floor((mousey()+game.cam.y)/8)
local mousex,mousey=mouse()
local mx = math.floor((mousex+game.cam.x)/8)
local my = math.floor((mousey+game.cam.y)/8)
if (mx==x or mx==x+1) and (my==y or my==y-1) then
actors.under_cursor=v.name
subpal(1,16,8)
end
if v.o=='u' then
sspr(v.gfx.x+frame,v.gfx.y+16,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,v.dy>1)
blit(v.gfx.x+frame,v.gfx.y+16,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,v.dy>1)
elseif v.o=='d' then
sspr(v.gfx.x+frame,v.gfx.y,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,-v.dy>2)
blit(v.gfx.x+frame,v.gfx.y,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,-v.dy>2)
elseif v.o=='l' then
sspr(v.gfx.x+frame,v.gfx.y+32,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16)
blit(v.gfx.x+frame,v.gfx.y+32,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16)
elseif v.o=='r' then
sspr(v.gfx.x+frame,v.gfx.y+32,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,true)
blit(v.gfx.x+frame,v.gfx.y+32,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,true)
end
if not btn(KEY_LSHIFT) then subpal() end