Jailgames logo

This commit is contained in:
2026-03-28 02:40:08 +01:00
parent 40f22f78da
commit 639d2e98ad
5 changed files with 327 additions and 33 deletions

130
data/X2_font.fnt Normal file
View File

@@ -0,0 +1,130 @@
bitmap=X2_font.gif
32: 0 0 6 10 0 0 #
33: 8 0 6 10 0 0 # !
34: 16 0 6 10 0 0 # "
35: 24 0 6 10 0 0 # #
36: 32 0 6 10 0 0 # $
37: 40 0 6 10 0 0 # %
38: 48 0 6 10 0 0 # &
39: 56 0 6 10 0 0 # '
40: 64 0 6 10 0 0 # (
41: 72 0 6 10 0 0 # )
42: 80 0 6 10 0 0 # *
43: 88 0 6 10 0 0 # +
44: 96 0 6 10 0 0 # ,
45: 104 0 6 10 0 0 # -
46: 112 0 6 10 0 0 # .
47: 120 0 6 10 0 0 # /
48: 0 12 6 10 0 0 # 0
49: 8 12 6 10 0 0 # 1
50: 16 12 6 10 0 0 # 2
51: 24 12 6 10 0 0 # 3
52: 32 12 6 10 0 0 # 4
53: 40 12 6 10 0 0 # 5
54: 48 12 6 10 0 0 # 6
55: 56 12 6 10 0 0 # 7
56: 64 12 6 10 0 0 # 8
57: 72 12 6 10 0 0 # 9
58: 80 12 6 10 0 0 # :
59: 88 12 6 10 0 0 # ;
60: 96 12 6 10 0 0 # <
61: 104 12 6 10 0 0 # =
62: 112 12 6 10 0 0 # >
63: 120 12 6 10 0 0 # ?
64: 0 24 6 10 0 0 # @
65: 8 24 6 10 0 0 # A
66: 16 24 6 10 0 0 # B
67: 24 24 6 10 0 0 # C
68: 32 24 6 10 0 0 # D
69: 40 24 6 10 0 0 # E
70: 48 24 6 10 0 0 # F
71: 56 24 6 10 0 0 # G
72: 64 24 6 10 0 0 # H
73: 72 24 6 10 0 0 # I
74: 80 24 6 10 0 0 # J
75: 88 24 6 10 0 0 # K
76: 96 24 6 10 0 0 # L
77: 103 24 7 10 0 0 # M
78: 112 24 6 10 0 0 # N
79: 120 24 6 10 0 0 # O
80: 0 36 6 10 0 0 # P
81: 8 36 6 10 0 0 # Q
82: 16 36 6 10 0 0 # R
83: 24 36 6 10 0 0 # S
84: 32 36 6 10 0 0 # T
85: 40 36 6 10 0 0 # U
86: 48 36 6 10 0 0 # V
87: 55 36 8 10 0 0 # W
88: 64 36 6 10 0 0 # X
89: 72 36 6 10 0 0 # Y
90: 80 36 6 10 0 0 # Z
91: 88 36 6 10 0 0 # [
92: 96 36 6 10 0 0 # \
93: 104 36 6 10 0 0 # ]
94: 112 36 6 10 0 0 # ^
95: 120 36 6 10 0 0 # _
96: 0 48 6 10 0 0 # `
97: 8 48 6 10 0 0 # a
98: 16 48 6 10 0 0 # b
99: 24 48 6 10 0 0 # c
100: 32 48 6 10 0 0 # d
101: 40 48 6 10 0 0 # e
102: 48 48 6 10 0 0 # f
103: 56 48 6 10 0 0 # g
104: 64 48 6 10 0 0 # h
105: 72 48 6 10 0 0 # i
106: 80 48 6 10 0 0 # j
107: 88 48 6 10 0 0 # k
108: 96 48 6 10 0 0 # l
109: 103 48 7 10 0 0 # m
110: 112 48 6 10 0 0 # n
111: 120 48 6 10 0 0 # o
112: 0 60 6 10 0 0 # p
113: 8 60 6 10 0 0 # q
114: 16 60 6 10 0 0 # r
115: 24 60 6 10 0 0 # s
116: 32 60 6 10 0 0 # t
117: 40 60 6 10 0 0 # u
118: 48 60 6 10 0 0 # v
119: 55 60 8 10 0 0 # w
120: 64 60 6 10 0 0 # x
121: 72 60 6 10 0 0 # y
122: 80 60 6 10 0 0 # z
123: 88 60 6 10 0 0 # {
124: 96 60 6 10 0 0 # |
125: 104 60 6 10 0 0 # }
126: 112 60 6 10 0 0 # ~
127: 120 60 6 10 0 0 # ⌂
# Extended characters
161: 0 72 6 10 0 # ¡
191: 8 72 6 10 0 # ¿
192: 16 72 6 16 6 # À
193: 24 72 6 16 6 # Á
200: 32 72 6 16 6 # È
201: 40 72 6 16 6 # É
204: 48 72 6 16 6 # Ì
205: 56 72 6 16 6 # Í
210: 64 72 6 16 6 # Ò
211: 72 72 6 16 6 # Ó
217: 80 72 6 16 6 # Ù
218: 88 72 6 16 6 # Ú
209: 96 72 6 14 4 # Ñ
241: 104 72 6 12 2 # ñ
199: 112 72 6 10 0 # Ç
231: 120 72 6 10 0 # ç
224: 0 90 6 14 4 # à
225: 8 90 6 14 4 # á
232: 16 90 6 14 4 # è
233: 24 90 6 14 4 # é
236: 32 90 6 14 4 # ì
237: 40 90 6 14 4 # í
242: 48 90 6 14 4 # ò
243: 56 90 6 14 4 # ó
249: 64 90 6 14 4 # ù
250: 72 90 6 14 4 # ú

BIN
data/X2_font.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -1,11 +1,3 @@
require "fps"
require "fade"
require "game"
-- require "mapa"
-- require "scenes"
local arcade_config = require("arcade_config")
o2aX = arcade_config.org2arc_escala
intro_wait=40
@@ -16,35 +8,35 @@ function intro_init()
intro_wait=400
surf.cls(16)
surf.target(logo)
local font_default = font.current()
font.current(font_sf)
surf.target(back)
surf.cls(16)
draw.text("INTRO_INIT",0,0,15)
draw.text("INTRO INIT",0,0,15)
font.current(font_default)
surf.target(0)
surf.source(logo)
draw.surf(0,0,36,5,56,70,arcade_config.logo_sf.width,arcade_config.logo_sf.height)
surf.source(back)
draw.surf(0,0,63,10,100,100,126,20)
-- surf.source(tiles)
fade.fadein()
print("INTRO INIT")
end
function intro_intro()
intro_wait=intro_wait-1
if intro_wait==0 or key.press(key.ESCAPE) or key.press(keyShoot) or pad.press(btnShoot) or pad.press(btnPause) then
intro_wait=1
game_update = intro_update
fade.fadeoutin()
end
end
function intro_update()
fps_print()
if key.press(key.ESCAPE) or pad.press(btnPause) then
game_init(true)
fade.fadeoutin()
elseif key.press(key.SPACE) then
intro_wait=1
end
game_init(true)
fade.fadeoutin()
end

131
data/logo.lua Normal file
View File

@@ -0,0 +1,131 @@
local logo_step=1
local logo_step_wait=0
local logo_anim={}
local step1_finished = false
local brillo_y = 10
local logo_wait = 400
function logo_anim_init ()
logo_anim={ [1] = {x0=-126, y=80, w=126, h=4, speed= 1, accel= 0.25, x1=65, delay=0},
[2] = {x0= 256, y=84, w=126, h=4, speed=-1, accel=-0.25, x1=65, delay=4},
[3] = {x0=-126, y=88, w=126, h=4, speed= 1, accel= 0.25, x1=65, delay=8},
[4] = {x0= 256, y=92, w=126, h=4, speed=-1, accel=-0.25, x1=65, delay=12},
[5] = {x0=-126, y=96, w=126, h=4, speed= 1, accel= 0.25, x1=65, delay=16}}
end
function logo_init()
game_update = logo_intro
surf.cls(16)
local font_default = font.current()
font.current(font_sf)
surf.target(back)
surf.cls(16)
draw.text("JAILGAMES",0,0,15)
draw.text("presenta",0,20,14)
draw.text("JAILGAMES",0,40,2)
font.current(font_default)
surf.target(0)
logo_anim_init()
end
function logo_intro()
logo_wait=logo_wait-1
if logo_wait==0 or key.press(key.ESCAPE) or key.press(keyShoot) or pad.press(btnShoot) or pad.press(btnPause) then
logo_wait=1
game_update = logo_update
fade.fadeoutin()
end
surf.source(back)
surf.target(0)
surf.cls(16)
-- Animació per a l'aparició del logo
if logo_step==1 then
draw.surf(0,0,63,2, logo_anim[1].x0,logo_anim[1].y,logo_anim[1].w,logo_anim[1].h)
draw.surf(0,2,63,2, logo_anim[2].x0,logo_anim[2].y,logo_anim[2].w,logo_anim[2].h)
draw.surf(0,4,63,2, logo_anim[3].x0,logo_anim[3].y,logo_anim[3].w,logo_anim[3].h)
draw.surf(0,6,63,2, logo_anim[4].x0,logo_anim[4].y,logo_anim[4].w,logo_anim[4].h)
draw.surf(0,8,63,2, logo_anim[5].x0,logo_anim[5].y,logo_anim[5].w,logo_anim[5].h)
step1_finished = true
logo_step_wait = logo_step_wait+1
if logo_step_wait>=1 then
logo_step_wait = 0
for i, data in ipairs(logo_anim) do
local check = false
if logo_anim[i].accel>=0 then
check = logo_anim[i].x0+logo_anim[i].speed<logo_anim[i].x1
else
check = logo_anim[i].x0+logo_anim[i].speed>logo_anim[i].x1
end
if check then
if logo_anim[i].delay==0 then
logo_anim[i].x0 = logo_anim[i].x0 + logo_anim[i].speed
logo_anim[i].speed = logo_anim[i].speed + logo_anim[i].accel
else
logo_anim[i].delay=logo_anim[i].delay-1
end
step1_finished = step1_finished and false
else
logo_anim[i].x0 = logo_anim[i].x1
step1_finished = step1_finished and true
end
end
end
if step1_finished then logo_step=2 end
end
-- presenta
if logo_step==2 then
-- draw.surf(0,0, 63,10, 65,80,126,20); -- JAILGAMES
draw.surf(0,0,63,10, logo_anim[1].x0,logo_anim[1].y,logo_anim[1].w,logo_anim[1].h*5); -- JAILGAMES
draw.surf(0,20,55,10, 100,102,55,10); -- presenta
logo_step = 3
end
-- pausa
if logo_step==3 then
draw.surf(0,0,63,10, logo_anim[1].x0,logo_anim[1].y,logo_anim[1].w,logo_anim[1].h*5); -- JAILGAMES
draw.surf(0,20,55,10, 100,102,55,10); -- presenta
logo_step_wait = logo_step_wait+1
if logo_step_wait>=20 then
logo_step_wait = 0
logo_step = 4
end
end
-- Brillo
if logo_step==4 then
draw.surf(0,0,63,10, logo_anim[1].x0,logo_anim[1].y,logo_anim[1].w,logo_anim[1].h*5); -- JAILGAMES
draw.surf(0,20,55,10, 100,102,55,10); -- presenta
logo_step_wait = logo_step_wait+1
if logo_step_wait>=1 then
logo_step_wait = 0
draw.surf(0,40+math.floor(brillo_y),63,1,
logo_anim[1].x0, logo_anim[1].y+math.floor(brillo_y*2), logo_anim[1].w, 1);
brillo_y = brillo_y-0.5
if brillo_y==0 then logo_step = 5 end
end
end
-- Final
if logo_step>=5 then
draw.surf(0,0,63,10, logo_anim[1].x0,logo_anim[1].y,logo_anim[1].w,logo_anim[1].h*5); -- JAILGAMES
draw.surf(0,20,55,10, 100,102,55,10); -- presenta
if logo_step==5 then logo_wait = 75 end
logo_step = 6
end
end
function logo_update()
fps_print()
intro_init()
end

View File

@@ -1,10 +1,15 @@
arcade_config = require("arcade_config")
require "fps"
require "fade"
require "audio"
require "intro"
require "switches"
require "mapa"
require "map"
local arcade_config = require("arcade_config")
require "logo"
require "intro"
require "game"
require "switches"
-- require "scenes"
function load_tilemap( sf_mapa )
local mapa_tw, mapa_th = surf.size(sf_mapa)
@@ -47,6 +52,8 @@ function mini.init()
load_tilemap( sf_mapa )
fade.init()
font_sf=font.load("X2_font.fnt")
textsf=surf.new(arcade_config.org_resolucion.width,arcade_config.org_resolucion.height)
-- Càrrega dels audios
@@ -84,8 +91,9 @@ function mini.init()
btnCycle2 = tonumber(config.key("btncycle2")) or pad.LEFTSHOULDER
btnPause = tonumber(config.key("btnpause")) or pad.START
game_init()
-- game_init()
-- intro_init()
logo_init()
-- final_init()
end
@@ -121,7 +129,7 @@ function arc_text(str, x, y, col)
surf.source(curr_surf_src)
end
function arc_textB(str, x, y, col)
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()
@@ -129,17 +137,18 @@ function arc_textB(str, x, y, col)
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,16)
draw.text(str,1,0,16)
draw.text(str,2,0,16)
draw.text(str,0,1,16)
draw.text(str,2,1,16)
draw.text(str,0,2,16)
draw.text(str,1,2,16)
draw.text(str,2,2,16)
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)
@@ -149,3 +158,35 @@ function arc_textB(str, x, y, col)
draw.surf(0,0,sw,sh,x,y,dw,dh)
surf.source(curr_surf_src)
end
function arc_textB2(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)
draw.surf(0,0)
surf.source(curr_surf_src)
end