- [NEW] Convertit a mini v1.0 RC2

This commit is contained in:
2025-05-31 14:29:29 +02:00
parent 28f9851f00
commit c2f7b470bf
14 changed files with 241 additions and 244 deletions

View File

@@ -45,7 +45,7 @@ actors={
actors.search(name).o = o
end,
draw=function()
display=function()
actors.under_cursor=""
for i,v in ipairs(actors.list) do
if v.o=='' then goto continue end
@@ -53,25 +53,25 @@ 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 mousex,mousey=mouse()
local mousex,mousey=mouse.pos()
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)
pal.subpal(1,16,8)
end
if v.o=='u' then
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)
draw.surf(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
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)
draw.surf(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
blit(v.gfx.x+frame,v.gfx.y+32,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16)
draw.surf(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
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)
draw.surf(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
if not key.down(key.LSHIFT) then pal.subpal() end
::continue::
end
end,