diff --git a/data/abad.lua b/data/abad.lua index a90d81e..20df7cf 100644 --- a/data/abad.lua +++ b/data/abad.lua @@ -133,7 +133,7 @@ end function abad_hurt(howmuch) - howmuch = 0 + -- howmuch = 0 if abad.hurting == 0 and abad.respawning==0 then sound.play(audio_abad_hit) abad.energia=abad.energia-howmuch @@ -324,9 +324,10 @@ function abad_state_normal() end if abad.falling>0 then - if abad.falling>(abad.max_jump_height<<1) then - -- numero de pisos caiguts * 2 - local damage = math.floor(abad.falling/(mapa_room_rows*arcade_config.tiles_height))*2 + local altura_piso = (mapa_room_rows*arcade_config.tiles_height) + local pisos_caiguts = math.floor(abad.falling/altura_piso) + local damage = pisos_caiguts*2 + if damage>0 then if damage>abad.energia then damage=abad.energia end abad_hurt(damage) end diff --git a/data/game.lua b/data/game.lua index 69bdec4..7d719ff 100644 --- a/data/game.lua +++ b/data/game.lua @@ -461,6 +461,7 @@ function special_keys() end function debug_info() + fps_print() -- if true then return end font.current(font_default) -- viewp:print() diff --git a/data/main.lua b/data/main.lua index bee12ce..f08cdd6 100644 --- a/data/main.lua +++ b/data/main.lua @@ -18,7 +18,7 @@ require "opcions" require "opcions_input" require "point" ---require "fps" +require "fps" --require "menu" @@ -88,7 +88,7 @@ function mini.init() logo_config(font_sf) surf.target(0) surf.cls(16) - flow:executar("logo") + flow:executar("game") end function mini.update() @@ -103,7 +103,11 @@ function mini.update() end 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 + draw.text(sys.fps(),0,15,2) end function mini.close() diff --git a/data/stage1.lua b/data/stage1.lua index d39c282..42434ec 100644 --- a/data/stage1.lua +++ b/data/stage1.lua @@ -141,7 +141,7 @@ function stages.stage1_init() zombie2, abad, 150, "Aaaaaargh... per ell!", 250) local abad_x, abad_y = coords.room_to_world ( 10, 4, 3 ) - -- local abad_x, abad_y = coords.room_to_world ( 19, 1, 3 ) + -- local abad_x, abad_y = coords.room_to_world ( 54, 8, 3 ) abad:move(abad_x, abad_y) abad_make_safe( true ) diff --git a/data/trigger.lua b/data/trigger.lua index 215aed9..0cebe30 100644 --- a/data/trigger.lua +++ b/data/trigger.lua @@ -58,7 +58,7 @@ function trigger:draw() end -- debug rect - draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3) + -- draw.rect(scr_x,scr_y,self.bb.w,self.bb.h,3) end --function trigger:do_touched() diff --git a/data/zombie.lua b/data/zombie.lua index 0d3e9db..a0aec53 100644 --- a/data/zombie.lua +++ b/data/zombie.lua @@ -21,7 +21,7 @@ function zombie.new(_hab,_x,_y,_flip) draw=zombie.draw, jumpfwd=false, anim={16,17,16,18}, - bb={x=4,y=0,w=26,h=32}, + bb={x=4,y=1,w=26,h=30}, can_warp=true, warping=false, shrink=1,