Eliminats dibuixats dobles en gorro i peu. El splash de la bambolla ja es veu com toca. Afegida funció per a escalar el text i modificades algunes crides a draw.text. Sprite del Abad nou i altres personatges i tiles upgradats també

This commit is contained in:
2026-03-16 21:15:12 +01:00
parent 319862df30
commit 845989280b
10 changed files with 59 additions and 28 deletions

View File

@@ -46,7 +46,8 @@ end
function abad_hurt(howmuch)
if abad.hurting == 0 and abad.respawning==0 then
sound.play(audio_abad_hit)
abad.energia=abad.energia-howmuch
-- abad.energia=abad.energia-howmuch
abad.energia=abad.energia
if abad.energia<=0 then
abad.vides=abad.vides-1
if abad.vides==0 then

View File

@@ -1,4 +1,5 @@
local arcade_config = {
org_resolucion = { width = 128, height = 96 },
resolucion = { width = 256, height = 192 },
surface = { width = 256, height = 192 },
logo_sf = { width = 144, height = 20 },

View File

@@ -119,14 +119,14 @@ bambolla.update=bambolla.update_normal
bambolla.draw=bambolla.draw_normal
function bambolla.draw_splash()
draw.circf(bambolla.cx+bambolla.dx,bambolla.y,2,16)
draw.circf(bambolla.cx+bambolla.dx,bambolla.y,1,6)
draw.circf(bambolla.cx-bambolla.dx,bambolla.y,2,16)
draw.circf(bambolla.cx-bambolla.dx,bambolla.y,1,6)
draw.circf(bambolla.cx-(bambolla.dx/2),bambolla.y-4,2,16)
draw.circf(bambolla.cx-(bambolla.dx/2),bambolla.y-4,1,6)
draw.circf(bambolla.cx+(bambolla.dx/2),bambolla.y-4,2,16)
draw.circf(bambolla.cx+(bambolla.dx/2),bambolla.y-4,1,6)
draw.circf( (bambolla.cx-bambolla.dx)*o2aX, bambolla.y*o2aX, 1, 6)
draw.circf( (bambolla.cx+bambolla.dx)*o2aX, bambolla.y*o2aX, 2, 16)
draw.circf( (bambolla.cx+bambolla.dx)*o2aX, bambolla.y*o2aX, 1, 6)
draw.circf( (bambolla.cx-bambolla.dx)*o2aX, bambolla.y*o2aX, 2, 16)
draw.circf( (bambolla.cx-(bambolla.dx/2))*o2aX, (bambolla.y-4)*o2aX, 2, 16)
draw.circf( (bambolla.cx-(bambolla.dx/2))*o2aX, (bambolla.y-4)*o2aX, 1, 6)
draw.circf( (bambolla.cx+(bambolla.dx/2))*o2aX, (bambolla.y-4)*o2aX, 2, 16)
draw.circf( (bambolla.cx+(bambolla.dx/2))*o2aX, (bambolla.y-4)*o2aX, 1, 6)
end
function bambolla.update_splash()

View File

@@ -255,14 +255,17 @@ function update_game()
score.draw()
surf.source(tiles)
draw.text("x"..abad.vides,114*o2aX,13*o2aX,2)
-- draw.text("x"..abad.vides,114*o2aX,13*o2aX,2)
arc_text("x"..abad.vides,114*o2aX,13*o2aX,2)
draw.rectf((102+(abad.energia>>1))*o2aX,30*o2aX,(21-(abad.energia>>1))*o2aX,8*o2aX,16)
else
draw.surf(0,0,16*o2aX,9*o2aX,50*o2aX,40*o2aX,16*o2aX,9*o2aX,true)
if abad.hurting > 40 then
draw.text("x"..abad.vides+1,63*o2aX,43*o2aX,3)
-- draw.text("x"..abad.vides+1,63*o2aX,43*o2aX,3)
arc_text("x"..abad.vides+1,63*o2aX,43*o2aX,3)
elseif abad.hurting < 20 then
draw.text("x"..abad.vides,63*o2aX,43*o2aX,2)
-- draw.text("x"..abad.vides,63*o2aX,43*o2aX,2)
arc_text("x"..abad.vides,63*o2aX,43*o2aX,2)
end
end
@@ -355,11 +358,17 @@ function update_options_menu()
draw.rect(28*o2aX,(28+(10*menu_sel))*o2aX,73*o2aX,9*o2aX,14)
if (not parpadeig) then draw.rect(28*o2aX,(28+(10*menu_sel))*o2aX,73*o2aX,9*o2aX,13) end
draw.text("MÚSICA", 30*o2aX, 30*o2aX, 14); draw.text(music.enabled() and "SI" or "NO",91*o2aX,30*o2aX,15)
draw.text("", 30*o2aX, 40*o2aX, 14); draw.text(sound.enabled() and "SI" or "NO",91*o2aX,40*o2aX,15)
draw.text("REDEFINIR TECLAT", 30*o2aX, 50*o2aX, 14)
draw.text("REDEFINIR GAMEPAD", 30*o2aX, 60*o2aX, 14)
draw.text("TORNAR", 30*o2aX, 70*o2aX, 14)
-- draw.text("MÚSICA", 30*o2aX, 30*o2aX, 14); draw.text(music.enabled() and "SI" or "NO",91*o2aX,30*o2aX,15)
-- draw.text("SÓ", 30*o2aX, 40*o2aX, 14); draw.text(sound.enabled() and "SI" or "NO",91*o2aX,40*o2aX,15)
-- draw.text("REDEFINIR TECLAT", 30*o2aX, 50*o2aX, 14)
-- draw.text("REDEFINIR GAMEPAD", 30*o2aX, 60*o2aX, 14)
-- draw.text("TORNAR", 30*o2aX, 70*o2aX, 14)
arc_text("MÚSICA", 30*o2aX, 30*o2aX, 14); arc_text(music.enabled() and "SI" or "NO",91*o2aX,30*o2aX,15)
arc_text("", 30*o2aX, 40*o2aX, 14); arc_text(sound.enabled() and "SI" or "NO",91*o2aX,40*o2aX,15)
arc_text("REDEFINIR TECLAT", 30*o2aX, 50*o2aX, 14)
arc_text("REDEFINIR GAMEPAD", 30*o2aX, 60*o2aX, 14)
arc_text("TORNAR", 30*o2aX, 70*o2aX, 14)
if key.press(keyShoot) or key.press(key.SPACE) or pad.press(pad.A) or pad.press(btnShoot) then
if menu_sel==0 then
@@ -400,8 +409,10 @@ function update_main_menu()
end
draw.rect(28*o2aX,(18+(10*menu_sel))*o2aX,73*o2aX,9*o2aX,14)
if (not parpadeig) then draw.rect(28*o2aX,(18+(10*menu_sel))*o2aX,73*o2aX,9*o2aX,13) end
text("JUGAR", 54*o2aX, 20*o2aX, 14)
text("OPCIONS", 50*o2aX, 30*o2aX, 14)
-- text("JUGAR", 54*o2aX, 20*o2aX, 14)
arc_text("JUGAR", 54*o2aX, 20*o2aX, 14)
-- text("OPCIONS", 50*o2aX, 30*o2aX, 14)
arc_text("OPCIONS", 50*o2aX, 30*o2aX, 14)
--if (not parpadeig or menu_sel~=2) then text("REDEFINIR GAMEPAD", 30, 32, 13) end
redraw_menu_hab()

View File

@@ -20,7 +20,7 @@ function gorro.init()
end
function gorro.draw()
draw.surf(96,32,16,16,gorro.x,gorro.y,16,16)
-- draw.surf(96,32,16,16,gorro.x,gorro.y,16,16)
local x = gorro_gif_col*cw
local y = gorro_gif_row*ch
draw.surf(x,y,cw,ch,gorro.x*o2aX,gorro.y*o2aX,cw,ch)

View File

@@ -73,7 +73,6 @@ function intro_update()
intro_wait=intro_wait-1
if intro_wait==0 then
if intro_step==0 then
print("STEP 0")
surf.cls(16)
-- draw.rect(15*o2aX,3*o2aX,99*o2aX,51*o2aX,2)
draw_item_intro("marc",false)
@@ -90,11 +89,9 @@ function intro_update()
view.origin(0,0)
intro_step=intro_step+1
elseif intro_step==1 then
print("STEP 1")
start_scene(scenes.intro_01,58)
intro_step=intro_step+1
elseif intro_step==2 then
print("STEP 2")
surf.cls(16)
-- draw.rect(15,3,99,51,2)
draw_item_intro("marc",false)

View File

@@ -45,6 +45,8 @@ function mini.init()
back=surf.new(arcade_config.surface.width,arcade_config.surface.height)
fade.init()
textsf=surf.new(arcade_config.org_resolucion.width,arcade_config.org_resolucion.height)
-- Càrrega dels audios
audio_text_abad = sound.load(audio_text_abad)
audio_text_premiere = sound.load(audio_text_premiere)
@@ -111,3 +113,19 @@ function text(str,x,y,col)
draw.text(str,x,y,col)
end
function arc_text(str, x, y, col)
curr_surf_tgt = surf.target()
curr_surf_src = surf.source()
local sw = arcade_config.org_resolucion.width
local sh = arcade_config.org_resolucion.height
local dw = arcade_config.resolucion.width
local dh = arcade_config.resolucion.height
surf.target(textsf)
surf.cls(0)
draw.text(str,0,0,col)
surf.source(textsf)
surf.target(curr_surf_tgt)
draw.surf(0,0,sw,sh,x,y,dw,dh)
surf.source(curr_surf_src)
end

View File

@@ -20,7 +20,7 @@ function peu.init()
end
function peu.draw()
draw.surf(112,32,16,16,peu.x,peu.y,16,16)
-- draw.surf(112,32,16,16,peu.x,peu.y,16,16)
local x = peu_gif_col*cw
local y = peu_gif_row*ch
draw.surf(x,y,cw,ch,peu.x*o2aX,peu.y*o2aX,cw,ch)

View File

@@ -15,9 +15,12 @@ function score.create()
draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,64*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,64*o2aX) --draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,72*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,72*o2aX)
draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,72*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,72*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,72*o2aX) draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,72*o2aX)
draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,80*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,80*o2aX) draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,88*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,88*o2aX)
draw.text("jail",6*o2aX,77*o2aX,2)
draw.text("games",8*o2aX, 82*o2aX,2)
draw.text("2023",9*o2aX,89*o2aX,1)
-- draw.text("jail",6*o2aX,77*o2aX,2)
-- draw.text("games",8*o2aX, 82*o2aX,2)
-- draw.text("2023",9*o2aX,89*o2aX,1)
arc_text("jail",6*o2aX,77*o2aX,2)
arc_text("games",8*o2aX, 82*o2aX,2)
arc_text("2023",9*o2aX,89*o2aX,1)
draw.rectf(06*o2aX,30*o2aX,2*o2aX,8*o2aX,03)
draw.rectf(09*o2aX,30*o2aX,2*o2aX,8*o2aX,08)
draw.rectf(12*o2aX,30*o2aX,2*o2aX,8*o2aX,08)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB