From f071c4b35966327ca2238b4b192c0032bd2bc056 Mon Sep 17 00:00:00 2001 From: JailGamer Date: Fri, 1 May 2026 21:49:04 +0200 Subject: [PATCH] [FIX] Requreix mini 1.5.2 --- data/abad.lua | 13 +++++++++++-- data/elalien.lua | 4 ++-- data/game.lua | 2 +- data/gota.lua | 2 +- data/main.lua | 4 ++-- data/mapa.lua | 2 +- data/trigger.lua | 2 +- 7 files changed, 19 insertions(+), 10 deletions(-) diff --git a/data/abad.lua b/data/abad.lua index 7259f1e..2b4dcb2 100644 --- a/data/abad.lua +++ b/data/abad.lua @@ -201,7 +201,7 @@ function abad_jump() local tile1_hit_type= arc_check_tile(x1_check, y_check ) local tile2_hit_type= arc_check_tile(x2_check, y_check) local not_block_tile = tile1_hit_type ~= tiletype.block and tile2_hit_type ~= tiletype.block - -- local switch_tile = tile1_hit_type == tiletype.switch or tile2_hit_type == tiletype.switch + local switch_tile = tile1_hit_type == tiletype.switch or tile2_hit_type == tiletype.switch -- print("JUMP > "..x1_check..", "..x2_check..", "..y_check) -- print("T1= "..tile1_hit_type.." / T2= "..tile2_hit_type.." / SW= "..tiletype.switch) -- local msg = "BLOCK TILE HITTED" @@ -220,7 +220,16 @@ function abad_jump() --else -- abad.y=abad.y-vspace --end - abad.y=abad.y-vspace + if switch_tile then + -- Si la posició actual no es dins del tile, avançar per a colisionar + if (arc_check_tile(x1_check, abad.y)~= tiletype.switch and + arc_check_tile(x2_check, abad.y)~= tiletype.switch) + then + abad.y=abad.y-vspace + end + else + abad.y=abad.y-vspace + end else local tile1_hit = arc_get_tile(x1_check, y_check ) local tile2_hit = arc_get_tile(x2_check, y_check) diff --git a/data/elalien.lua b/data/elalien.lua index f071383..400f388 100644 --- a/data/elalien.lua +++ b/data/elalien.lua @@ -70,8 +70,8 @@ function elalien.draw() end if elalien.step==0 then draw.line(scr_x+xoff0, scr_y+6, scr_x+xoff0, scr_y+11, 11) - surf.pixel(scr_x+xoff1, scr_y+11, 11) - surf.pixel(scr_x+xoff1, scr_y+7, 11) + draw.pixel(scr_x+xoff1, scr_y+11, 11) + draw.pixel(scr_x+xoff1, scr_y+7, 11) elseif elalien.step<3 then draw.line(scr_x+xoff0, scr_y+6, scr_x+xoff0, scr_y+11, 11) draw.line(scr_x+xoff1, scr_y+7, scr_x+xoff1, scr_y+11, 11) diff --git a/data/game.lua b/data/game.lua index 7d719ff..9e96f6f 100644 --- a/data/game.lua +++ b/data/game.lua @@ -461,7 +461,7 @@ function special_keys() end function debug_info() - fps_print() + -- fps_print() -- if true then return end font.current(font_default) -- viewp:print() diff --git a/data/gota.lua b/data/gota.lua index c7ce6d1..0ec2677 100644 --- a/data/gota.lua +++ b/data/gota.lua @@ -112,7 +112,7 @@ function gota:draw_falling() local gota_x, gota_y = viewp:screen_coords( self.x, self.y ) draw.circf( gota_x+4, gota_y+12, 4, 16) draw.circf( gota_x+5, gota_y+13, 3, 11) - surf.pixel( gota_x+3, gota_y+13, 2) + draw.pixel( gota_x+3, gota_y+13, 2) end function gota:draw_drop( x, y ) diff --git a/data/main.lua b/data/main.lua index f08cdd6..cb9719d 100644 --- a/data/main.lua +++ b/data/main.lua @@ -105,8 +105,8 @@ function mini.update() if (game_update) then game_update() end -- Pausa per a que vaja be en mini 1.5.1 - local t0 = os.clock() - while os.clock()-t0<0.01 do end + -- local t0 = os.clock() + -- while os.clock()-t0<0.01 do end draw.text(sys.fps(),0,15,2) end diff --git a/data/mapa.lua b/data/mapa.lua index 4e8205e..8e6ebaa 100644 --- a/data/mapa.lua +++ b/data/mapa.lua @@ -178,7 +178,7 @@ function mapa_create_minimap() print(x..","..y.."="..tile) end if tile<64 then - surf.pixel(x+(h%10)*12,y+math.floor(h/10)*6,pix[1+tile]) + draw.pixel(x+(h%10)*12,y+math.floor(h/10)*6,pix[1+tile]) end end end diff --git a/data/trigger.lua b/data/trigger.lua index 215aed9..3079f11 100644 --- a/data/trigger.lua +++ b/data/trigger.lua @@ -50,7 +50,7 @@ function trigger:draw() if self.enabled then draw.surf(240,128,16,16,scr_x,scr_y,16,16) else - -- flipar i desactivar en gris + -- "flipar" i desactivar en gris pal.subpal(2,1) draw.surf(240,128,16,16,scr_x,scr_y,16,16,true) pal.subpal(2)