- [NEW] Adaptat a l'última versió de mini (1.5.dev)

This commit is contained in:
2026-04-12 11:47:22 +02:00
parent 1a4041a231
commit 8a80bffe42
9 changed files with 20 additions and 20 deletions

View File

@@ -43,7 +43,7 @@ editor = {
-- Pintar el mapa i sprites
rooms.draw()
--view.origin(0,0)
local mx, my = mouse.pos()
local tx, ty = (mx>>3), (my>>3)
mx, my = tx<<3, ty<<3
@@ -283,7 +283,7 @@ editor = {
surf.source(0)
surf.target(editor.tilepicker.surf_back)
view.origin(0,0)
view.clip()
surf.clip()
draw.surf(0,0,160,104,0,0)
app.push(editor.tilepicker.update_tiles)
tweening.add(104,24,0.25,easing.easeOutCubic,function(value,n,finished)editor.tilepicker.pos_y=value end)
@@ -297,7 +297,7 @@ editor = {
surf.source(editor.tilepicker.surf_back)
surf.target(0)
view.origin(0,0)
view.clip()
surf.clip()
draw.surf(0,0,160,104,0,0)
view.origin(8,editor.tilepicker.pos_y)
@@ -353,7 +353,7 @@ editor = {
surf.source(0)
surf.target(editor.itempicker.surf_back)
view.origin(0,0)
view.clip()
surf.clip()
draw.surf(0,0,160,104,0,0)
app.push(editor.itempicker.update_items)
tweening.add(104,24,0.25,easing.easeOutCubic,function(value,n,finished)editor.itempicker.pos_y=value end)
@@ -367,7 +367,7 @@ editor = {
surf.source(editor.itempicker.surf_back)
surf.target(0)
view.origin(0,0)
view.clip()
surf.clip()
draw.surf(0,0,160,104,0,0)
view.origin(8,editor.itempicker.pos_y)
@@ -376,7 +376,7 @@ editor = {
draw.text("CHOOSE ITEM:",8,2,17)
view.origin(16,editor.itempicker.pos_y+8-editor.itempicker.scroll)
view.clip(16,editor.itempicker.pos_y+8,128,64)
surf.clip(16,editor.itempicker.pos_y+8,128,64)
surf.source(surf_sprites)
local mx, my = mouse.pos()
@@ -404,7 +404,7 @@ editor = {
local lift_y = math.floor(((64-lift_h)*editor.itempicker.scroll)/(y-64))
view.origin(16,editor.itempicker.pos_y+8)
view.clip()
surf.clip()
draw.rrectf(124,0,5,64,1,17)
draw.rrectf(124,lift_y,5,lift_h,1,2)

View File

@@ -60,7 +60,7 @@ game = {
view.origin(0,0)
surf.target(0)
view.clip()
surf.clip()
surf.target(game.back_buf)
@@ -104,7 +104,7 @@ game = {
--if not sys.beat() then return end
view.origin(0,0)
surf.target(0)
view.clip()
surf.clip()
surf.target(game.back_buf)
--view.clip()
@@ -148,8 +148,8 @@ game = {
for x=0,159 do
local water_level = math.sin(game.water_counter)*2
for y=88+water_level,104 do
local pixel = surf.pixel(x,y)
surf.pixel(x,y,game.water_pal[pixel+1])
local pixel = draw.pixel(x,y)
draw.pixel(x,y,game.water_pal[pixel+1])
end
end
end
@@ -165,15 +165,15 @@ game = {
for y=0,103 do
for x=0,159 do
surf.source(game.back_buf)
local pixel = surf.pixel(x,y)
local pixel = draw.pixel(x,y)
surf.source(game.circ_buf)
local light = surf.pixel(x,y)
local light = draw.pixel(x,y)
if light==0 then
surf.pixel(x,y,1)
draw.pixel(x,y,1)
elseif (light&2)==2 then
surf.pixel(x,y,pixel)
draw.pixel(x,y,pixel)
else
surf.pixel(x,y,game.fade_pal[pixel+1])
draw.pixel(x,y,game.fade_pal[pixel+1])
end
end
end