Escenes funcionant.

Altres correccions menors.
This commit is contained in:
2026-04-01 21:58:41 +02:00
parent 205a98bf17
commit 56807c2285
8 changed files with 515 additions and 116 deletions

View File

@@ -12,7 +12,8 @@ require "intro"
require "game"
require "switches"
require "warp"
-- require "scenes"
require "trigger"
require "scenes"
coords.set_config({
tiles_width = arcade_config.tiles_width,
@@ -116,9 +117,9 @@ function mini.init()
btnCycle2 = tonumber(config.key("btncycle2")) or pad.LEFTSHOULDER
btnPause = tonumber(config.key("btnpause")) or pad.START
-- logo_init()
logo_init()
-- intro_init()
game_init()
-- game_init()
-- final_init()
end
@@ -138,50 +139,25 @@ function mini.update()
end
function arc_text(str, x, y, col)
local curr_surf_tgt = surf.target()
local 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)
-- print("arc_ "..str)
surf.source(textsf)
surf.target(curr_surf_tgt)
draw.surf(0,0,sw,sh,x,y,dw,dh)
surf.source(curr_surf_src)
font.current(font_sf)
draw.text(str,x,y,col)
end
function arc_textB(str, x, y, col, colB)
local ox, oy = view.origin()
local curr_surf_tgt = surf.target()
local 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
colB = colB or 16
surf.target(textsf)
view.origin(0,0)
surf.cls(0)
draw.text(str,0,0,colB)
draw.text(str,1,0,colB)
draw.text(str,2,0,colB)
draw.text(str,0,1,colB)
draw.text(str,2,1,colB)
draw.text(str,0,2,colB)
draw.text(str,1,2,colB)
draw.text(str,2,2,colB)
draw.text(str,1,1,col)
-- print("arc_B "..str)
surf.source(textsf)
surf.target(curr_surf_tgt)
view.origin(ox,oy)
draw.surf(0,0,sw,sh,x,y,dw,dh)
surf.source(curr_surf_src)
function arc_textB(str, x, y, col)
font.current(font_sf)
-- Crear el borde negre
draw.text(str, x-1, y-1, 16)
draw.text(str, x , y-1, 16)
draw.text(str, x+1, y-1, 16)
draw.text(str, x-1, y, 16)
draw.text(str, x+1, y, 16)
draw.text(str, x-1, y+1, 16)
draw.text(str, x , y+1, 16)
draw.text(str, x+1, y+1, 16)
-- Escriure la cadena
draw.text(str,x,y,col)
end
-- DEBUG