Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| a03ac00c76 | |||
| 650ca21167 | |||
| 42b97b1fd0 | |||
| 8144bcec05 | |||
| b0fa162d62 | |||
| ff7614a1d4 | |||
| e5f121ec4e | |||
| 25db5d7944 | |||
| 78cc72c614 | |||
| 5b9b9aed6d | |||
| 9e6c50cd87 | |||
| 1d2e72db47 | |||
| 336deaafa9 | |||
| 6304c6ff06 | |||
| 3a7fa45013 | |||
| 845989280b | |||
| 319862df30 | |||
| 5a2b418e5b | |||
| d890da0a47 | |||
| 5f8e13706c | |||
| ec3d0916e1 | |||
| 3aeaace63a | |||
| 6c6c5b62d6 | |||
| 3d9746b5f5 | |||
| ec6b2b3643 |
130
data/X2_font.fnt
Normal file
130
data/X2_font.fnt
Normal 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
BIN
data/X2_font.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -1,3 +1,9 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
require "dead"
|
||||
|
||||
@@ -19,7 +25,8 @@ function abad:draw()
|
||||
flip=(((abad.x>>1)+(abad.y>>1))%2)==0
|
||||
end
|
||||
if (abad.respawning==0) or (math.floor(abad.respawning/15)%2==0) then
|
||||
draw.surf(abad.frame*16,0,16,16,abad.x,abad.y,16,16,flip)
|
||||
-- draw.surf(abad.frame*16,0,16,16,abad.x,abad.y,16,16,flip)
|
||||
draw.surf(abad.frame*cw,0,cw,ch,abad.x*o2aX,abad.y*o2aX,cw,ch,flip)
|
||||
end
|
||||
|
||||
if abad.respawning > 0 then
|
||||
@@ -40,6 +47,7 @@ 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
|
||||
if abad.energia<=0 then
|
||||
abad.vides=abad.vides-1
|
||||
if abad.vides==0 then
|
||||
|
||||
32
data/arcade_config.lua
Normal file
32
data/arcade_config.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
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 },
|
||||
sprite_size = { w = 32, h = 32 },
|
||||
escala = 1.0,
|
||||
org2arc_escala = 2.0,
|
||||
tiles_offset = 128,
|
||||
tiles_per_row = 16,
|
||||
tiles_per_row_base2 = 4,
|
||||
tiles_width = 16,
|
||||
tiles_height = 16,
|
||||
character_per_row = 8,
|
||||
character_per_row_base2 = 3,
|
||||
character_width = 32,
|
||||
character_height = 32,
|
||||
fullscreen = false
|
||||
}
|
||||
|
||||
-- Proteger contra creación/modificación accidental de campos no declarados
|
||||
-- setmetatable(config, {
|
||||
-- __newindex = function(t, k, v)
|
||||
-- if rawget(t, k) == nil then
|
||||
-- error("Intento de crear campo nuevo en config: "..tostring(k), 2)
|
||||
-- else
|
||||
-- rawset(t, k, v)
|
||||
-- end
|
||||
-- end
|
||||
-- })
|
||||
|
||||
return arcade_config
|
||||
@@ -1,3 +1,12 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
bambolla_gif_col = 7
|
||||
bambolla_gif_row = 1
|
||||
|
||||
bambolla={hab=75,x=24,y=24,cx=0,dx=0,dy=0,flip=true,enabled=false,counter=800,wait=0,bb={x=4,y=4,w=8,h=8}}
|
||||
|
||||
function bambolla.reset()
|
||||
@@ -44,7 +53,8 @@ end
|
||||
|
||||
function bambolla.draw_normal()
|
||||
if bambolla.enabled then
|
||||
draw.surf(112,16,16,16,bambolla.x,bambolla.y,16,16)
|
||||
-- draw.surf(112,16,16,16,bambolla.x,bambolla.y,16,16)
|
||||
draw.surf(bambolla_gif_col*cw,bambolla_gif_row*ch,cw,ch,bambolla.x*o2aX,bambolla.y*o2aX,cw,ch)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -109,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()
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
batman={hab=5,x=24,y=24,flip=true,goup=true,frame=8,stairscooldown=0,stepscooldown=0,stepsremember=0,wait=0,step=0,anim={24,25,24,26},bb={x=4,y=0,w=8,h=16},scene_intro=false,scene_object=false}
|
||||
|
||||
function batman.init()
|
||||
@@ -15,7 +22,8 @@ function batman.draw()
|
||||
if batman.update==batman.update_stairs then
|
||||
flip=(((batman.x>>1)+(batman.y>>1))%2)==0
|
||||
end
|
||||
draw.surf((batman.frame&7)*16,(batman.frame>>3)*16,16,16,batman.x,batman.y,16,16,flip)
|
||||
-- draw.surf((batman.frame&7)*16,(batman.frame>>3)*16,16,16,batman.x,batman.y,16,16,flip)
|
||||
draw.surf((batman.frame&7)*cw,(batman.frame>>cxr2)*ch,cw,ch,batman.x*o2aX,batman.y*o2aX,cw,ch,flip)
|
||||
end
|
||||
|
||||
function batman.hit()
|
||||
|
||||
16
data/bol.lua
16
data/bol.lua
@@ -1,3 +1,14 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
txr = arcade_config.tiles_per_row-1
|
||||
txr2 = arcade_config.tiles_per_row_base2
|
||||
toff = arcade_config.tiles_offset
|
||||
tw = arcade_config.tiles_width
|
||||
th = arcade_config.tiles_height
|
||||
-- posició en el gif des de l'offset de tiles
|
||||
bol_gif_col = 14
|
||||
bol_gif_row = 3
|
||||
|
||||
bol={hab=39,x=28,y=25,bb={x=0,y=0,w=16,h=8}}
|
||||
|
||||
function bol.init()
|
||||
@@ -6,7 +17,10 @@ function bol.init()
|
||||
end
|
||||
|
||||
function bol.draw()
|
||||
draw.surf(112,88,16,8,bol.x,bol.y,16,8)
|
||||
-- draw.surf(112,88,16,8,bol.x,bol.y,16,8)
|
||||
local x = bol_gif_col*tw
|
||||
local y = toff+bol_gif_row*th
|
||||
draw.surf(x,y,tw*2,th,bol.x*o2aX,bol.y*o2aX,tw*2,th)
|
||||
end
|
||||
|
||||
function bol.update()
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
|
||||
cacau={hab=-1,x=0,y=0,wait=0,flip=false,bb={x=0,y=0,w=4,h=4}}
|
||||
|
||||
function cacau.init(_hab,_x,_y,_flip)
|
||||
@@ -9,8 +12,10 @@ function cacau.init(_hab,_x,_y,_flip)
|
||||
end
|
||||
|
||||
function cacau.draw()
|
||||
draw.circf(cacau.x,cacau.y,2,16)
|
||||
draw.circf(cacau.x,cacau.y,1,6)
|
||||
draw.circf(cacau.x*o2aX,cacau.y*o2aX,2*o2aX,16)
|
||||
draw.circf((cacau.x+2)*o2aX,cacau.y*o2aX,2*o2aX,16)
|
||||
draw.circf(cacau.x*o2aX,cacau.y*o2aX,1*o2aX,6)
|
||||
draw.circf((cacau.x+2)*o2aX,cacau.y*o2aX,1*o2aX,6)
|
||||
end
|
||||
|
||||
function cacau.update()
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
caco={}
|
||||
|
||||
function caco.new(_hab,_x,_y,_flip)
|
||||
@@ -5,7 +12,8 @@ function caco.new(_hab,_x,_y,_flip)
|
||||
end
|
||||
|
||||
function caco:draw()
|
||||
if self.frame>0 then draw.surf((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip) end
|
||||
-- if self.frame>0 then draw.surf((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip) end
|
||||
if self.frame>0 then draw.surf((self.frame&7)*cw,(self.frame>>cxr2)*ch,cw,ch,self.x*o2aX,self.y*o2aX,cw,ch,self.flip) end
|
||||
end
|
||||
|
||||
function caco:update_normal()
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
elalien={hab=66,x=24,y=24,flip=true,goup=true,frame=8,stairscooldown=0,wait=0,step=0,anim={8,9,8,10},bb={x=4,y=0,w=8,h=16},scene_intro=false,scene_object=false}
|
||||
|
||||
function elalien.init()
|
||||
@@ -19,7 +26,7 @@ function elalien.draw()
|
||||
if elalien.update==elalien.update_stairs then
|
||||
flip=(((elalien.x>>1)+(elalien.y>>1))%2)==0
|
||||
end
|
||||
draw.surf((elalien.frame&7)*16,(elalien.frame>>3)*16,16,16,elalien.x,elalien.y,16,16,flip)
|
||||
draw.surf((elalien.frame&7)*cw,(elalien.frame>>cxr2)*ch,cw,ch,elalien.x*o2aX,elalien.y*o2aX,cw,ch,flip)
|
||||
end
|
||||
|
||||
function elalien.hit()
|
||||
|
||||
@@ -1,3 +1,12 @@
|
||||
require "logo"
|
||||
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
final_rooms = {2,6,60,21,49,23,66,32,4,46,39,55,74}
|
||||
|
||||
function final_init()
|
||||
@@ -19,17 +28,20 @@ go_next_actor=false
|
||||
function update_final()
|
||||
surf.cls(16)
|
||||
|
||||
view.origin(16,41)
|
||||
view.origin(16*o2aX,41*o2aX)
|
||||
mapa_draw(final_room)
|
||||
draw_actor()
|
||||
view.origin(0,0)
|
||||
|
||||
draw.rectf(0,0,15,97,16)
|
||||
draw.rectf(114,0,78,97,16)
|
||||
draw.rect(15,40,99,50,2)
|
||||
draw.rectf(0,0,15*o2aX,97*o2aX,16)
|
||||
draw.rectf(114*o2aX,0,78*o2aX,97*o2aX,16)
|
||||
draw.rect(15*o2aX,40*o2aX,99*o2aX,50*o2aX,2)
|
||||
|
||||
text("C A C A U S", 42, 12, 17)
|
||||
text(actor.name, 64-(#actor.name*2), 28, 11)
|
||||
-- text("C A C A U S", 42, 12, 17)
|
||||
-- arc_textB("C A C A U S", 42*o2aX, 12*o2aX, 17)
|
||||
draw_logo(14*o2aX, 10*o2aX)
|
||||
-- text(actor.name, 64-(#actor.name*2), 28, 11)
|
||||
arc_textB(actor.name, (64-(#actor.name*2))*o2aX, 28*o2aX, 11)
|
||||
|
||||
mapa_update(abad.hab,final_room)
|
||||
|
||||
@@ -83,7 +95,8 @@ function draw_actor()
|
||||
end
|
||||
end
|
||||
local tpl=128/actor.w
|
||||
draw.surf((actor.frame%tpl)*actor.w,math.floor(actor.frame/tpl)*actor.h,actor.w,actor.h,actor.x,actor.y,actor.w,actor.h,actor.flip)
|
||||
-- draw.surf((actor.frame%tpl)*actor.w,math.floor(actor.frame/tpl)*actor.h,actor.w,actor.h,actor.x,actor.y,actor.w,actor.h,actor.flip)
|
||||
draw.surf((actor.frame%tpl)*actor.w*o2aX, math.floor(actor.frame/tpl)*actor.h*o2aX ,actor.w*o2aX, actor.h*o2aX, actor.x*o2aX ,actor.y*o2aX ,actor.w*o2aX ,actor.h*o2aX, actor.flip)
|
||||
end
|
||||
|
||||
function next_actor()
|
||||
@@ -129,8 +142,11 @@ end
|
||||
function update_final2()
|
||||
surf.cls(16)
|
||||
|
||||
text("C A C A U S", 42, 12, 17)
|
||||
text("GRACIES PER JUGAR", 30, 48, 10)
|
||||
-- text("C A C A U S", 42, 12, 17)
|
||||
-- arc_textB("C A C A U S", 42*o2aX, 12*o2aX, 17)
|
||||
draw_logo(14*o2aX, 10*o2aX)
|
||||
-- text("GRACIES PER JUGAR", 30, 48, 10)
|
||||
arc_text("GRACIES PER JUGAR", 30*o2aX, 48*o2aX, 10)
|
||||
|
||||
final_count=final_count+1
|
||||
if final_count==200 or (key.press(keyShoot) or pad.press(btnShoot)) or key.press(key.RETURN) then
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
|
||||
fireball={hab=-1,x=0,y=0,wait=0,flip=false,bb={x=0,y=0,w=4,h=4}}
|
||||
|
||||
function fireball.init(_hab,_x,_y,_flip)
|
||||
@@ -9,9 +12,9 @@ function fireball.init(_hab,_x,_y,_flip)
|
||||
end
|
||||
|
||||
function fireball.draw()
|
||||
draw.circf(fireball.x,fireball.y,3,16)
|
||||
draw.circf(fireball.x,fireball.y,2,3)
|
||||
draw.circf(fireball.x,fireball.y,1,8)
|
||||
draw.circf(fireball.x*o2aX,fireball.y*o2aX,3*o2aX,16)
|
||||
draw.circf(fireball.x*o2aX,fireball.y*o2aX,2*o2aX,3)
|
||||
draw.circf(fireball.x*o2aX,fireball.y*o2aX,1*o2aX,8)
|
||||
end
|
||||
|
||||
function fireball.update()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
title=Cacaus
|
||||
config=cacaus
|
||||
width=128
|
||||
height=96
|
||||
zoom=5
|
||||
title=X2 Cacaus
|
||||
config=x2cacaus
|
||||
width=256
|
||||
height=192
|
||||
zoom=3
|
||||
|
||||
175
data/game.lua
175
data/game.lua
@@ -17,6 +17,10 @@ require "bambolla"
|
||||
require "cacau"
|
||||
require "fireball"
|
||||
require "switches"
|
||||
require "logo"
|
||||
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
|
||||
modes={playing=0,editing=1}
|
||||
--mode=modes.editing
|
||||
@@ -152,7 +156,7 @@ function game_init(menu)
|
||||
end
|
||||
|
||||
function draw_hab(hab,x,y,editing)
|
||||
view.origin(x,y)
|
||||
view.origin(x*o2aX,y*o2aX)
|
||||
mapa_draw(hab)
|
||||
|
||||
if not editing then
|
||||
@@ -170,11 +174,11 @@ function draw_hab(hab,x,y,editing)
|
||||
end
|
||||
|
||||
function update_dialog()
|
||||
draw.rectf(16,16,97,35,12)
|
||||
draw.rect(15,15,99,37,16)
|
||||
text("Save the map?",20,20,2)
|
||||
text("This cannot be undone",20,27,2)
|
||||
text("(Y)es (N)o",25,40,2)
|
||||
draw.rectf(16*o2aX,16*o2aX,97*o2aX,35*o2aX,12)
|
||||
draw.rect(15*o2aX,15*o2aX,99*o2aX,37*o2aX,16)
|
||||
text("Save the map?",20*o2aX,20*o2aX,2)
|
||||
text("This cannot be undone",20*o2aX,27*o2aX,2)
|
||||
text("(Y)es (N)o",25*o2aX,40*o2aX,2)
|
||||
|
||||
if key.press(key.N) then
|
||||
game_update=update_game
|
||||
@@ -190,13 +194,13 @@ function update_game()
|
||||
|
||||
if mode==modes.editing then
|
||||
draw_hab(abad.hab,0,0,true)
|
||||
text(abad.hab,120,1,2)
|
||||
text(abad.hab,120*o2aX,1*o2aX,2)
|
||||
|
||||
draw.surf(0,64+scroll*8,128,48,0,48)
|
||||
draw.surf(0,(64+scroll*8)*o2aX,128*o2aX,48*o2aX,0,48*o2aX)
|
||||
local xx=(seltile&15)*8
|
||||
local yy=48+(seltile>>4)*8
|
||||
draw.rect(xx,yy,9,9, 3)
|
||||
text("EDIT",100,1,3)
|
||||
draw.rect(xx*o2aX,yy*o2aX,9*o2aX,9*o2aX, 3)
|
||||
text("EDIT",100*o2aX,1*o2aX,3)
|
||||
local hx = abad.hab%10
|
||||
local hy = math.floor(abad.hab/10)
|
||||
scroll=0
|
||||
@@ -224,9 +228,9 @@ function update_game()
|
||||
|
||||
local mx,my=mouse.pos()
|
||||
if mx>>3 < 12 and my>>3 < 6 then
|
||||
text(mx>>3,100,10,2)
|
||||
text(my>>3,111,10,2)
|
||||
text((mx>>3)+(my>>3)*12,118,10,2)
|
||||
text(mx>>3,100*o2aX,10*o2aX,2)
|
||||
text(my>>3,111*o2aX,10*o2aX,2)
|
||||
text(((mx>>3)+(my>>3)*12)*o2aX,118*o2aX,10*o2aX,2)
|
||||
end
|
||||
if mouse.down(mouse.LEFT) then
|
||||
if my>=48 then
|
||||
@@ -241,25 +245,29 @@ function update_game()
|
||||
end
|
||||
if mx>>3 < 12 and my>>3 < 6 then
|
||||
local tx,ty=(mx>>3)<<3,(my>>3)<<3
|
||||
draw.rect(tx,ty,9,9,3)
|
||||
draw.rect(tx*o2aX,ty*o2aX,9*o2aX,9*o2aX,3)
|
||||
end
|
||||
else
|
||||
if abad.hurting == 0 then
|
||||
draw_hab(abad.hab,0,0)
|
||||
--text(abad.hab,1,1,2)
|
||||
draw_hab(cameras[current_camera].hab,0,48)
|
||||
text(camera_names[current_camera],2,49,8)
|
||||
-- text(camera_names[current_camera],2*o2aX,49*o2aX,8)
|
||||
arc_textB(camera_names[current_camera],2*o2aX,49*o2aX,8)
|
||||
|
||||
score.draw()
|
||||
surf.source(tiles)
|
||||
draw.text("x"..abad.vides,114,13,2)
|
||||
draw.rectf(102+(abad.energia>>1),30,21-(abad.energia>>1),8,16)
|
||||
-- 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,9,50,40,16,9,true)
|
||||
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,43,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,43,2)
|
||||
-- draw.text("x"..abad.vides,63*o2aX,43*o2aX,2)
|
||||
arc_text("x"..abad.vides,63*o2aX,43*o2aX,2)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -314,9 +322,9 @@ end
|
||||
|
||||
function redraw_menu_hab()
|
||||
draw_hab(menu_room,16,41)
|
||||
draw.rectf(0,0,15,97,16)
|
||||
draw.rectf(114,0,78,97,16)
|
||||
draw.rect(15,40,99,50,2)
|
||||
draw.rectf(0,0,15*o2aX,97*o2aX,16)
|
||||
draw.rectf(114*o2aX,0,78*o2aX,97*o2aX,16)
|
||||
draw.rect(15*o2aX,40*o2aX,99*o2aX,50*o2aX,2)
|
||||
mapa_update(abad.hab,menu_room)
|
||||
|
||||
for key,actor in pairs(actors) do
|
||||
@@ -337,8 +345,9 @@ function update_menu()
|
||||
end
|
||||
|
||||
surf.cls(16)
|
||||
text("C A C A U S", 42, 8, 15)
|
||||
|
||||
-- text("C A C A U S", 42*o2aX, 8*o2aX, 15)
|
||||
-- arc_textB("C A C A U S", 42*o2aX, 8*o2aX, 15)
|
||||
draw_logo(14*o2aX, 0)
|
||||
menu_state()
|
||||
end
|
||||
|
||||
@@ -349,14 +358,20 @@ function update_options_menu()
|
||||
parpadeig=true
|
||||
if menu_count>40 then menu_count=0 end
|
||||
end
|
||||
draw.rect(28,28+(10*menu_sel),73,9,14)
|
||||
if (not parpadeig) then draw.rect(28,28+(10*menu_sel),73,9,13) end
|
||||
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, 30, 14); draw.text(music.enabled() and "SI" or "NO",91,30,15)
|
||||
draw.text("SÓ", 30, 40, 14); draw.text(sound.enabled() and "SI" or "NO",91,40,15)
|
||||
draw.text("REDEFINIR TECLAT", 30, 50, 14)
|
||||
draw.text("REDEFINIR GAMEPAD", 30, 60, 14)
|
||||
draw.text("TORNAR", 30, 70, 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("SÓ", 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
|
||||
@@ -395,10 +410,12 @@ function update_main_menu()
|
||||
parpadeig=true
|
||||
if menu_count>40 then menu_count=0 end
|
||||
end
|
||||
draw.rect(28,18+(10*menu_sel),73,9,14)
|
||||
if (not parpadeig) then draw.rect(28,18+(10*menu_sel),73,9,13) end
|
||||
text("JUGAR", 54, 20, 14)
|
||||
text("OPCIONS", 50, 30, 14)
|
||||
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)
|
||||
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()
|
||||
@@ -433,7 +450,8 @@ function update_redefine_keys_menu()
|
||||
menu_state = update_options_menu;
|
||||
end
|
||||
if menu_count==0 then
|
||||
text("PULSA TECLA PER A AMUNT", 20, 24, 13)
|
||||
-- text("PULSA TECLA PER A AMUNT", 20, 24, 13)
|
||||
arc_textB("PULSA TECLA PER A AMUNT", 20*o2aX, 24*o2aX, 13)
|
||||
local k = key.press();
|
||||
if k ~= 0 and k~=key.ESCAPE then
|
||||
menu_count = 1
|
||||
@@ -441,7 +459,8 @@ function update_redefine_keys_menu()
|
||||
config.key("keyup", keyUp)
|
||||
end
|
||||
elseif menu_count==1 then
|
||||
text("PULSA TECLA PER A AVALL", 20, 24, 13)
|
||||
-- text("PULSA TECLA PER A AVALL", 20, 24, 13)
|
||||
arc_textB("PULSA TECLA PER A AVALL", 20*o2aX, 24*o2aX, 13)
|
||||
local k = key.press();
|
||||
if k ~= 0 and k~=key.ESCAPE then
|
||||
menu_count = 2
|
||||
@@ -449,7 +468,8 @@ function update_redefine_keys_menu()
|
||||
config.key("keydown", keyDown)
|
||||
end
|
||||
elseif menu_count==2 then
|
||||
text("PULSA TECLA PER A ESQUERRA", 14, 24, 13)
|
||||
-- text("PULSA TECLA PER A ESQUERRA", 14, 24, 13)
|
||||
arc_textB("PULSA TECLA PER A ESQUERRA", 14*o2aX, 24*o2aX, 13)
|
||||
local k = key.press();
|
||||
if k ~= 0 and k~=key.ESCAPE then
|
||||
menu_count = 3
|
||||
@@ -457,7 +477,8 @@ function update_redefine_keys_menu()
|
||||
config.key("keleft", keyLeft)
|
||||
end
|
||||
elseif menu_count==3 then
|
||||
text("PULSA TECLA PER A DRETA", 20, 24, 13)
|
||||
-- text("PULSA TECLA PER A DRETA", 20, 24, 13)
|
||||
arc_textB("PULSA TECLA PER A DRETA", 20*o2aX, 24*o2aX, 13)
|
||||
local k = key.press();
|
||||
if k ~= 0 and k~=key.ESCAPE then
|
||||
menu_count = 4
|
||||
@@ -465,7 +486,8 @@ function update_redefine_keys_menu()
|
||||
config.key("keyright", keyRight)
|
||||
end
|
||||
elseif menu_count==4 then
|
||||
text("PULSA TECLA PER A BOTAR", 20, 24, 13)
|
||||
-- text("PULSA TECLA PER A BOTAR", 20, 24, 13)
|
||||
arc_textB("PULSA TECLA PER A BOTAR", 20*o2aX, 24*o2aX, 13)
|
||||
local k = key.press();
|
||||
if k ~= 0 and k~=key.ESCAPE then
|
||||
menu_count = 5
|
||||
@@ -473,7 +495,8 @@ function update_redefine_keys_menu()
|
||||
config.key("keyjump", keyJump)
|
||||
end
|
||||
elseif menu_count==5 then
|
||||
text("PULSA TECLA PER A DISPAR", 18, 24, 13)
|
||||
-- text("PULSA TECLA PER A DISPAR", 18, 24, 13)
|
||||
arc_textB("PULSA TECLA PER A DISPAR", 18*o2aX, 24*o2aX, 13)
|
||||
local k = key.press();
|
||||
if k ~= 0 and k~=key.ESCAPE then
|
||||
menu_count = 0
|
||||
@@ -490,7 +513,8 @@ function update_redefine_pad_menu()
|
||||
menu_state = update_options_menu;
|
||||
end
|
||||
if menu_count==0 then
|
||||
text("PULSA BOTÓ PER A AMUNT", 22, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A AMUNT", 22, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A AMUNT", 22*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 1
|
||||
@@ -498,7 +522,8 @@ function update_redefine_pad_menu()
|
||||
config.key("btnup", btnUp)
|
||||
end
|
||||
elseif menu_count==1 then
|
||||
text("PULSA BOTÓ PER A AVALL", 22, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A AVALL", 22, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A AVALL", 22*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 2
|
||||
@@ -506,7 +531,8 @@ function update_redefine_pad_menu()
|
||||
config.key("btndown", btnDown)
|
||||
end
|
||||
elseif menu_count==2 then
|
||||
text("PULSA BOTÓ PER A ESQUERRA", 16, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A ESQUERRA", 16, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A ESQUERRA", 16*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 3
|
||||
@@ -514,7 +540,8 @@ function update_redefine_pad_menu()
|
||||
config.key("keleft", btnLeft)
|
||||
end
|
||||
elseif menu_count==3 then
|
||||
text("PULSA BOTÓ PER A DRETA", 22, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A DRETA", 22, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A DRETA", 22*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 4
|
||||
@@ -522,7 +549,8 @@ function update_redefine_pad_menu()
|
||||
config.key("btnright", btnRight)
|
||||
end
|
||||
elseif menu_count==4 then
|
||||
text("PULSA BOTÓ PER A BOTAR", 22, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A BOTAR", 22, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A BOTAR", 22*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 5
|
||||
@@ -530,7 +558,8 @@ function update_redefine_pad_menu()
|
||||
config.key("btnjump", btnJump)
|
||||
end
|
||||
elseif menu_count==5 then
|
||||
text("PULSA BOTÓ PER A DISPAR", 20, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A DISPAR", 20, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A DISPAR", 20*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 6
|
||||
@@ -538,7 +567,8 @@ function update_redefine_pad_menu()
|
||||
config.key("btnshoot", btnShoot)
|
||||
end
|
||||
elseif menu_count==6 then
|
||||
text("PULSA BOTÓ PER A GPS ARRERE", 14, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A GPS ARRERE", 14, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A GPS ARRERE", 14*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 7
|
||||
@@ -546,7 +576,8 @@ function update_redefine_pad_menu()
|
||||
config.key("btncycle1", btnCycle1)
|
||||
end
|
||||
elseif menu_count==7 then
|
||||
text("PULSA BOTÓ PER A GPS AVANT", 14, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A GPS AVANT", 14, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A GPS AVANT", 14*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 8
|
||||
@@ -554,7 +585,8 @@ function update_redefine_pad_menu()
|
||||
config.key("btncycle2", btnCycle2)
|
||||
end
|
||||
elseif menu_count==8 then
|
||||
text("PULSA BOTÓ PER A PAUSA", 22, 24, 13)
|
||||
-- text("PULSA BOTÓ PER A PAUSA", 22, 24, 13)
|
||||
arc_textB("PULSA BOTÓ PER A PAUSA", 22*o2aX, 24*o2aX, 13)
|
||||
local btn = pad.press();
|
||||
if btn ~= -1 then
|
||||
menu_count = 0
|
||||
@@ -578,7 +610,7 @@ end
|
||||
function pause()
|
||||
surf.source(0)
|
||||
surf.target(back)
|
||||
draw.surf(0,0,128,96,0,0)
|
||||
draw.surf(0,0,128*o2aX,96*o2aX,0,0)
|
||||
surf.target(0)
|
||||
surf.source(tiles)
|
||||
pausa_option=1
|
||||
@@ -587,9 +619,10 @@ function pause()
|
||||
end
|
||||
|
||||
function update_pause()
|
||||
draw.rectf(16,16,97,65,16)
|
||||
draw.rect(16,16,97,65,15)
|
||||
draw.text("PAUSA",54,20,15)
|
||||
draw.rectf(16*o2aX,16*o2aX,97*o2aX,65*o2aX,16)
|
||||
draw.rect(16*o2aX,16*o2aX,97*o2aX,65*o2aX,15)
|
||||
-- draw.text("PAUSA",54*o2aX,20*o2aX,15)
|
||||
arc_text("PAUSA",54*o2aX,20*o2aX,15)
|
||||
|
||||
menu_count=menu_count+1
|
||||
local parpadeig=false
|
||||
@@ -597,29 +630,37 @@ function update_pause()
|
||||
parpadeig=true
|
||||
if menu_count>40 then menu_count=0 end
|
||||
end
|
||||
draw.rect(28,33+(10*(pausa_option-1)),73,9,14)
|
||||
if (not parpadeig) then draw.rect(28,33+(10*(pausa_option-1)),73,9,13) end
|
||||
draw.rect(28*o2aX,(33+(10*(pausa_option-1)))*o2aX,73*o2aX,9*o2aX,14)
|
||||
if (not parpadeig) then draw.rect(28*o2aX,(33+(10*(pausa_option-1)))*o2aX,73*o2aX,9*o2aX,13) end
|
||||
|
||||
--draw.rect(28,33+(10*(pausa_option-1)),73,9,13)
|
||||
|
||||
draw.text("CONTINUAR",30,35,14)
|
||||
draw.text("MUSICA:",30,45,14)
|
||||
-- draw.text("CONTINUAR",30*o2aX,35*o2aX,14)
|
||||
arc_text("CONTINUAR",30*o2aX,35*o2aX,14)
|
||||
-- draw.text("MUSICA:",30*o2aX,45*o2aX,14)
|
||||
arc_text("MUSICA:",30*o2aX,45*o2aX,14)
|
||||
if music.enabled() then
|
||||
draw.text("SI",91,45,15)
|
||||
-- draw.text("SI",91*o2aX,45*o2aX,15)
|
||||
arc_text("SI",91*o2aX,45*o2aX,15)
|
||||
else
|
||||
draw.text("NO",91,45,15)
|
||||
-- draw.text("NO",91*o2aX,45*o2aX,15)
|
||||
arc_text("NO",91*o2aX,45*o2aX,15)
|
||||
end
|
||||
draw.text("SÓ:",30,55,14)
|
||||
-- draw.text("SÓ:",30*o2aX,55*o2aX,14)
|
||||
arc_text("SÓ:",30*o2aX,55*o2aX,14)
|
||||
if sound.enabled() then
|
||||
draw.text("SI",91,55,15)
|
||||
-- draw.text("SI",91*o2aX,55*o2aX,15)
|
||||
arc_text("SI",91*o2aX,55*o2aX,15)
|
||||
else
|
||||
draw.text("NO",91,55,15)
|
||||
-- draw.text("NO",91*o2aX,55*o2aX,15)
|
||||
arc_text("NO",91*o2aX,55*o2aX,15)
|
||||
end
|
||||
draw.text("EIXIR",30,65,14)
|
||||
-- draw.text("EIXIR",30*o2aX,65*o2aX,14)
|
||||
arc_text("EIXIR",30*o2aX,65*o2aX,14)
|
||||
|
||||
if key.press(key.ESCAPE) then
|
||||
surf.source(back)
|
||||
draw.surf(0,0,128,96,0,0)
|
||||
draw.surf(0,0,128*o2aX,96*o2aX,0,0)
|
||||
surf.source(tiles)
|
||||
game_update = pause_old_update
|
||||
elseif key.press(keyDown) or pad.press(btnDown) then
|
||||
@@ -631,7 +672,7 @@ function update_pause()
|
||||
elseif key.press(keyShoot) or pad.press(btnShoot) then
|
||||
if pausa_option==1 then
|
||||
surf.source(back)
|
||||
draw.surf(0,0,128,96,0,0)
|
||||
draw.surf(0,0,128*o2aX,96*o2aX,0,0)
|
||||
surf.source(tiles)
|
||||
game_update = pause_old_update
|
||||
elseif pausa_option==2 then
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
-- posició en el gif
|
||||
gorro_gif_col = 6
|
||||
gorro_gif_row = 2
|
||||
|
||||
gorro={hab=5,x=48,y=24,bb={x=0,y=0,w=8,h=8}}
|
||||
|
||||
function gorro.init()
|
||||
@@ -10,7 +20,10 @@ 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)
|
||||
end
|
||||
|
||||
function gorro.update()
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
-- posició en el gif
|
||||
gota_gif_col = 7
|
||||
gota_gif_row = 0
|
||||
|
||||
gota={}
|
||||
|
||||
function gota.new(_hab,_x,_y,_freq)
|
||||
@@ -5,7 +15,12 @@ function gota.new(_hab,_x,_y,_freq)
|
||||
end
|
||||
|
||||
function gota:draw_normal()
|
||||
draw.surf(112,0,8,8,self.x,self.y)
|
||||
-- draw.surf(112,0,8,8,self.x,self.y)
|
||||
local x = gota_gif_col*cw
|
||||
local y = gota_gif_row*ch
|
||||
local cw= 8*o2aX
|
||||
local ch= 8*o2aX
|
||||
draw.surf(x,y,cw,ch,self.x*o2aX,self.y*o2aX)
|
||||
end
|
||||
|
||||
function gota:update_normal()
|
||||
@@ -46,14 +61,14 @@ function gota:hit()
|
||||
end
|
||||
|
||||
function gota:draw_splash()
|
||||
draw.circf(self.cx+self.dx,self.y,2,16)
|
||||
draw.circf(self.cx+self.dx,self.y,1,11)
|
||||
draw.circf(self.cx-self.dx,self.y,2,16)
|
||||
draw.circf(self.cx-self.dx,self.y,1,11)
|
||||
draw.circf(self.cx-(self.dx/2),self.y-4,2,16)
|
||||
draw.circf(self.cx-(self.dx/2),self.y-4,1,11)
|
||||
draw.circf(self.cx+(self.dx/2),self.y-4,2,16)
|
||||
draw.circf(self.cx+(self.dx/2),self.y-4,1,11)
|
||||
draw.circf( (self.cx+self.dx)*o2aX, self.y*o2aX, 2, 16)
|
||||
draw.circf( (self.cx+self.dx)*o2aX, self.y*o2aX, 1, 11)
|
||||
draw.circf( (self.cx-self.dx)*o2aX, self.y*o2aX, 2, 16)
|
||||
draw.circf( (self.cx-self.dx)*o2aX, self.y*o2aX, 1, 11)
|
||||
draw.circf( (self.cx-(self.dx/2))*o2aX, (self.y-4)*o2aX, 2, 16)
|
||||
draw.circf( (self.cx-(self.dx/2))*o2aX, (self.y-4)*o2aX, 1, 11)
|
||||
draw.circf( (self.cx+(self.dx/2))*o2aX, (self.y-4)*o2aX, 2, 16)
|
||||
draw.circf( (self.cx+(self.dx/2))*o2aX, (self.y-4)*o2aX, 1, 11)
|
||||
end
|
||||
|
||||
function gota:update_splash()
|
||||
|
||||
15
data/gps.lua
15
data/gps.lua
@@ -1,3 +1,13 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
-- posició en el gif
|
||||
gps_gif_col = 7
|
||||
gps_gif_row = 3
|
||||
|
||||
gps={hab=5,x=48,y=24,bb={x=0,y=0,w=8,h=8}}
|
||||
|
||||
function gps.init()
|
||||
@@ -10,7 +20,10 @@ function gps.init()
|
||||
end
|
||||
|
||||
function gps.draw()
|
||||
draw.surf(112,48,16,16,gps.x,gps.y,16,16)
|
||||
-- draw.surf(112,48,16,16,gps.x,gps.y,16,16)
|
||||
local x = gps_gif_col*cw
|
||||
local y = gps_gif_row*ch
|
||||
draw.surf(x,y,cw,ch,gps.x*o2aX,gps.y*o2aX,cw,ch)
|
||||
end
|
||||
|
||||
function gps.update()
|
||||
|
||||
10
data/imp.lua
10
data/imp.lua
@@ -1,3 +1,10 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
imp={hab=75,x=24,y=24,flip=true,enabled=false,counter=500,frame=28,wait=0,step=0,anim={28,29,28,30},bb={x=4,y=0,w=8,h=16},scene_intro=false,scene_object=false}
|
||||
|
||||
function imp.reset()
|
||||
@@ -44,7 +51,8 @@ end
|
||||
|
||||
function imp.draw()
|
||||
if imp.enabled then
|
||||
draw.surf((imp.frame&7)*16,(imp.frame>>3)*16,16,16,imp.x,imp.y,16,16,imp.flip)
|
||||
-- draw.surf((imp.frame&7)*16,(imp.frame>>3)*16,16,16,imp.x,imp.y,16,16,imp.flip)
|
||||
draw.surf((imp.frame&7)*cw,(imp.frame>>cxr2)*ch,cw,ch,imp.x*o2aX,imp.y*o2aX,cw,ch,imp.flip)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -3,32 +3,73 @@ require "game"
|
||||
require "mapa"
|
||||
require "scenes"
|
||||
|
||||
local arcade_config = require("arcade_config")
|
||||
|
||||
intro_wait=40
|
||||
intro_step=0
|
||||
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
|
||||
function intro_init()
|
||||
game_update = intro_intro
|
||||
intro_wait=400
|
||||
surf.cls(16)
|
||||
|
||||
surf.target(logo)
|
||||
surf.cls(16)
|
||||
draw.text("JAILGAMES",0,0,15)
|
||||
surf.target(0)
|
||||
surf.source(logo)
|
||||
draw.surf(0,0,36,5,28,35,72,10)
|
||||
draw.surf(0,0,36,5,56,70,arcade_config.logo_sf.width,arcade_config.logo_sf.height)
|
||||
|
||||
surf.target(logo)
|
||||
surf.cls(16)
|
||||
text("presenta",0,0,14)
|
||||
surf.target(0)
|
||||
surf.source(logo)
|
||||
draw.surf(0,0,36,5,96,100,36*o2aX, 5*o2aX)
|
||||
|
||||
-- draw.surf(0,0,36,5,28,35,72,10)
|
||||
-- draw.surf(0,0,36,5,56,70,arcade_config.logo_sf.width,arcade_config.logo_sf.height)
|
||||
surf.source(tiles)
|
||||
fade.fadein()
|
||||
end
|
||||
|
||||
function intro_intro()
|
||||
--text("JAILGAMES",40,30,15)
|
||||
text("presenta",48,50,14)
|
||||
-- text("presenta",48,50,14)
|
||||
|
||||
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 draw_item_intro( name, flip )
|
||||
local cw = arcade_config.character_width
|
||||
local ch = arcade_config.character_height
|
||||
if ( name == "abad" ) then
|
||||
draw.surf(0,0,cw,ch,44*o2aX,24*o2aX,cw,ch,flip)
|
||||
elseif (name == "batman" ) then
|
||||
draw.surf(0,48*o2aX,cw,ch,82*o2aX,24*o2aX,cw,ch,flip)
|
||||
elseif (name == "cacaus" ) then
|
||||
draw.surf(112*o2aX,88*o2aX,cw,ch/2,76*o2aX,32*o2aX,cw,ch/2,flip)
|
||||
elseif (name == "marc" ) then
|
||||
draw.rect(15*o2aX,3*o2aX,99*o2aX,51*o2aX,2)
|
||||
elseif (name == "pas porta" ) then
|
||||
draw.rectf(73*o2aX,24*o2aX,7*o2aX,16*o2aX,16)
|
||||
end
|
||||
end
|
||||
|
||||
function draw_escenari ()
|
||||
surf.cls(16)
|
||||
draw_item_intro("marc",false)
|
||||
view.origin(16*o2aX,4*o2aX)
|
||||
mapa_draw(10)
|
||||
-- Borrar la porta del mapa
|
||||
draw_item_intro("pas porta")
|
||||
end
|
||||
|
||||
function intro_update()
|
||||
@@ -38,59 +79,52 @@ function intro_update()
|
||||
elseif key.press(key.SPACE) then
|
||||
intro_wait=1
|
||||
end
|
||||
|
||||
|
||||
intro_wait=intro_wait-1
|
||||
if intro_wait==0 then
|
||||
-- STEP 0
|
||||
if intro_step==0 then
|
||||
surf.cls(16)
|
||||
draw.rect(15,3,99,51,2)
|
||||
view.origin(16,4)
|
||||
mapa_draw(10)
|
||||
draw.rectf(73,24,7,16,16)
|
||||
draw.surf(0,0,16,16,44,24,16,16,true)
|
||||
draw_escenari()
|
||||
draw_item_intro("abad", true)
|
||||
view.origin(0,0)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 1
|
||||
elseif intro_step==1 then
|
||||
start_scene(scenes.intro_01,58)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 2
|
||||
elseif intro_step==2 then
|
||||
surf.cls(16)
|
||||
draw.rect(15,3,99,51,2)
|
||||
view.origin(16,4)
|
||||
mapa_draw(10)
|
||||
draw.rectf(73,24,7,16,16)
|
||||
draw.surf(0,0,16,16,44,24,16,16,false)
|
||||
draw_escenari()
|
||||
draw_item_intro("abad", false)
|
||||
view.origin(0,0)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 3
|
||||
elseif intro_step==3 then
|
||||
start_scene(scenes.intro_02,58)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 4
|
||||
elseif intro_step==4 then
|
||||
surf.cls(16)
|
||||
draw.rect(15,3,99,51,2)
|
||||
view.origin(16,4)
|
||||
mapa_draw(10)
|
||||
draw.rectf(73,24,7,16,16)
|
||||
draw.surf(0,0,16,16,44,24,16,16,false)
|
||||
draw.surf(112,88,16,8,76,32,16,8,true)
|
||||
draw.surf(0,48,16,16,82,24,16,16,true)
|
||||
draw_escenari()
|
||||
draw_item_intro("abad", false)
|
||||
draw_item_intro("cacaus", true)
|
||||
draw_item_intro("batman", true)
|
||||
view.origin(0,0)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 5
|
||||
elseif intro_step==5 then
|
||||
start_scene(scenes.intro_03,58)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 6
|
||||
elseif intro_step==6 then
|
||||
surf.cls(16)
|
||||
draw.rect(15,3,99,51,2)
|
||||
view.origin(16,4)
|
||||
mapa_draw(10)
|
||||
draw.rectf(73,24,7,16,16)
|
||||
draw.surf(0,0,16,16,44,24,16,16,false)
|
||||
draw_escenari()
|
||||
draw_item_intro("abad", false)
|
||||
view.origin(0,0)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 7
|
||||
elseif intro_step==7 then
|
||||
start_scene(scenes.intro_04,58)
|
||||
intro_step=intro_step+1
|
||||
-- STEP 8
|
||||
elseif intro_step==8 then
|
||||
music.play(audio_main_song)
|
||||
game_init(true)
|
||||
|
||||
66
data/logo.lua
Normal file
66
data/logo.lua
Normal file
@@ -0,0 +1,66 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
toff = arcade_config.tiles_offset
|
||||
tw = arcade_config.tiles_width
|
||||
th = arcade_config.tiles_height
|
||||
-- posició en el gif
|
||||
C_gif_col = 10
|
||||
C_gif_row = 3
|
||||
A_gif_col = 11
|
||||
A_gif_row = 3
|
||||
U_gif_col = 12
|
||||
U_gif_row = 3
|
||||
S_gif_col = 15
|
||||
S_gif_row = 4
|
||||
X_gif_col = 11
|
||||
X_gif_row = 7
|
||||
DOS_gif_col = 12
|
||||
DOS_gif_row = 7
|
||||
|
||||
function draw_logo (x, y)
|
||||
|
||||
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
|
||||
surf.target(x2logo)
|
||||
view.origin(0,0)
|
||||
surf.cls(0)
|
||||
|
||||
local C_x = C_gif_col*tw
|
||||
local C_y = C_gif_row*th+toff
|
||||
local A_x = A_gif_col*tw
|
||||
local A_y = A_gif_row*th+toff
|
||||
local U_x = U_gif_col*tw
|
||||
local U_y = U_gif_row*th+toff
|
||||
local S_x = S_gif_col*tw
|
||||
local S_y = S_gif_row*th+toff
|
||||
local X_x = X_gif_col*tw
|
||||
local X_y = X_gif_row*th+toff
|
||||
local DOS_x = DOS_gif_col*tw
|
||||
local DOS_y = DOS_gif_row*th+toff
|
||||
|
||||
draw.surf(X_x,X_y,tw,th,0,0,tw,th)
|
||||
draw.surf(DOS_x,DOS_y,tw,th,10,0,tw,th)
|
||||
draw.surf(C_x,C_y,tw,th,24,0,tw,th)
|
||||
draw.surf(A_x,A_y,tw,th,24+tw*1-4,0,tw,th)
|
||||
draw.surf(C_x,C_y,tw,th,24+tw*2-7,0,tw,th)
|
||||
draw.surf(A_x,A_y,tw,th,24+tw*3-11,0,tw,th)
|
||||
draw.surf(U_x,U_y,tw,th,24+tw*4-14,0,tw,th)
|
||||
draw.surf(S_x,S_y,tw,th,24+tw*5-15,0,tw,th)
|
||||
|
||||
|
||||
surf.source(x2logo)
|
||||
surf.target(curr_surf_tgt)
|
||||
view.origin(ox,oy)
|
||||
draw.surf(0,0,sw,sh,x,y,dw,dh)
|
||||
surf.source(curr_surf_src)
|
||||
|
||||
end
|
||||
@@ -27,6 +27,8 @@ require "abad"
|
||||
require "intro"
|
||||
require "game"
|
||||
|
||||
local arcade_config = require("arcade_config")
|
||||
|
||||
--require "fade"
|
||||
--require "audio"
|
||||
--require "intro"
|
||||
@@ -37,10 +39,18 @@ function mini.init()
|
||||
local paleta=pal.load("tiles.gif")
|
||||
pal.set(paleta)
|
||||
|
||||
logo=surf.new(36,5)
|
||||
back=surf.new(128,96)
|
||||
-- logo=surf.new(72,10)
|
||||
logo=surf.new(arcade_config.logo_sf.width,arcade_config.logo_sf.height)
|
||||
-- back=surf.new(128,96)
|
||||
back=surf.new(arcade_config.surface.width,arcade_config.surface.height)
|
||||
fade.init()
|
||||
|
||||
font_sf=font.load("X2_font.fnt")
|
||||
|
||||
-- text_sf=surf.new(arcade_config.org_resolucion.width,arcade_config.org_resolucion.height)
|
||||
x2logo=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)
|
||||
audio_text_elalien = sound.load(audio_text_elalien)
|
||||
@@ -57,6 +67,7 @@ function mini.init()
|
||||
audio_hit = sound.load(audio_hit)
|
||||
audio_low = sound.load(audio_low)
|
||||
|
||||
-- Configuració dels input
|
||||
keyUp = tonumber(config.key("keyup")) or key.UP
|
||||
keyDown = tonumber(config.key("keydown")) or key.DOWN
|
||||
keyLeft = tonumber(config.key("keyleft")) or key.LEFT
|
||||
@@ -76,7 +87,7 @@ function mini.init()
|
||||
|
||||
--game_init()
|
||||
intro_init()
|
||||
--final_init()
|
||||
-- final_init()
|
||||
end
|
||||
|
||||
function mini.update()
|
||||
@@ -93,7 +104,7 @@ function mini.update()
|
||||
if (game_update) then game_update() end
|
||||
end
|
||||
|
||||
function text(str,x,y,col)
|
||||
function text(str,x,y,col)
|
||||
draw.text(str,x-1,y-1,16)
|
||||
draw.text(str,x,y-1,16)
|
||||
draw.text(str,x+1,y-1,16)
|
||||
@@ -102,6 +113,62 @@ function text(str,x,y,col)
|
||||
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,y,col)
|
||||
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)
|
||||
|
||||
font.current(font_sf)
|
||||
-- font.spacing(0)
|
||||
|
||||
draw.text(str,x,y,col)
|
||||
-- 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)
|
||||
end
|
||||
|
||||
function arc_textB(str, x, y, col)
|
||||
-- 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
|
||||
-- surf.target(textsf)
|
||||
-- view.origin(0,0)
|
||||
-- surf.cls(0)
|
||||
|
||||
font.current(font_sf)
|
||||
-- font.spacing(0)
|
||||
|
||||
draw.text(str,x+0,y+0,16)
|
||||
draw.text(str,x+1,y+0,16)
|
||||
draw.text(str,x+2,y+0,16)
|
||||
draw.text(str,x+0,y+1,16)
|
||||
draw.text(str,x+2,y+1,16)
|
||||
draw.text(str,x+0,y+2,16)
|
||||
draw.text(str,x+1,y+2,16)
|
||||
draw.text(str,x+2,y+2,16)
|
||||
|
||||
-- draw.text(str,1,1,col)
|
||||
draw.text(str,x,y,col)
|
||||
-- print("arc_B "..str)
|
||||
-- surf.source(textsf)
|
||||
-- surf.target(curr_surf_tgt)
|
||||
-- view.origin(ox,oy)
|
||||
-- draw.surf(0,0,dw,dw,x,y,dw,dh)
|
||||
-- surf.source(curr_surf_src)
|
||||
end
|
||||
@@ -1,5 +1,7 @@
|
||||
require "map"
|
||||
|
||||
local arcade_config = require("arcade_config")
|
||||
|
||||
tiletype={void=0,nonpc=1,stair=2,switch=3,half=4,block=5}
|
||||
mapa.wait=0
|
||||
mapa.step=0
|
||||
@@ -93,7 +95,13 @@ function mapa_draw(hab)
|
||||
for tx=0,11 do
|
||||
local tile=mapa[1+hab][1+tx+ty*12]
|
||||
if tile~=256 and (tile<126 or mapa.step>4) then
|
||||
draw.surf((tile&15)*8,64+(tile>>4)*8,8,8,tx*8,ty*8)
|
||||
-- draw.surf((tile&15)*8,64+(tile>>4)*8,8,8,tx*8,ty*8)
|
||||
local txr = arcade_config.tiles_per_row-1
|
||||
local txr2 = arcade_config.tiles_per_row_base2
|
||||
local toff= arcade_config.tiles_offset
|
||||
local tw = arcade_config.tiles_width
|
||||
local th = arcade_config.tiles_height
|
||||
draw.surf((tile&txr)*tw,toff+(tile>>txr2)*th,tw,th,tx*tw,ty*th)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -171,5 +179,5 @@ function mapa_draw_minimap()
|
||||
surf.source(minimap)
|
||||
surf.target(0)
|
||||
surf.cls(16)
|
||||
draw.surf(0,0,128,96,0,0)
|
||||
draw.surf(0,0,128*o2aX,96*o2Ax,0,0)
|
||||
end
|
||||
15
data/peu.lua
15
data/peu.lua
@@ -1,3 +1,13 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
-- posició en el gif
|
||||
peu_gif_col = 7
|
||||
peu_gif_row = 2
|
||||
|
||||
peu={hab=5,x=48,y=24,bb={x=0,y=0,w=8,h=8}}
|
||||
|
||||
function peu.init()
|
||||
@@ -10,7 +20,10 @@ 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)
|
||||
end
|
||||
|
||||
function peu.update()
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
premiere={hab=75,x=24,y=24,flip=true,frame=12,wait=0,step=0,anim={12,13,12,14},bb={x=4,y=0,w=8,h=16},scene_intro=false,scene_object=false}
|
||||
|
||||
function premiere.init()
|
||||
@@ -14,7 +21,8 @@ function premiere.init()
|
||||
end
|
||||
|
||||
function premiere.draw()
|
||||
draw.surf((premiere.frame&7)*16,(premiere.frame>>3)*16,16,16,premiere.x,premiere.y,16,16,premiere.flip)
|
||||
-- draw.surf((premiere.frame&7)*16,(premiere.frame>>3)*16,16,16,premiere.x,premiere.y,16,16,premiere.flip)
|
||||
draw.surf((premiere.frame&7)*cw,(premiere.frame>>cxr2)*ch,cw,ch,premiere.x*o2aX,premiere.y*o2aX,cw,ch,premiere.flip)
|
||||
end
|
||||
|
||||
function premiere.hit()
|
||||
|
||||
296
data/scenes.lua
296
data/scenes.lua
@@ -1,130 +1,144 @@
|
||||
require "final"
|
||||
require "audio"
|
||||
|
||||
local arcade_config = require("arcade_config")
|
||||
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
|
||||
avatar_abad_x = 3*o2aX
|
||||
avatar_abad2_x = 4*o2aX
|
||||
avatar_abad_y = 0
|
||||
avatar_batman_x = 4*o2aX
|
||||
avatar_batman_y = 48*o2aX
|
||||
avatar_premiere_x = 69*o2aX
|
||||
avatar_premiere_y = 20*o2aX
|
||||
avatar_elalien_x = 3*o2aX
|
||||
avatar_elalien_y = 16*o2aX
|
||||
|
||||
scenes={
|
||||
intro_01= {
|
||||
{x=3,y=0,flip=false,audio="abad",text={"Ah!, què bo!","Nit de Netflix amb","un bon bol de cacaus!"},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Ah!, què bo!","Nit de Netflix amb","un bon bol de cacaus!"},die=20},
|
||||
},
|
||||
intro_02= {
|
||||
{x=3,y=0,flip=false,audio="abad",text={"Eh! On està el","bol de cacaus???",""},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Eh! On està el","bol de cacaus???",""},die=20},
|
||||
},
|
||||
intro_03= {
|
||||
{x=4,y=48,flip=true,audio="batman",musica=audio_song_batman,text={"ME L'HE ENDUT JO!!!", "S'HAN ACABAT ELS","CACAUS PA TU!"},die=20},
|
||||
{x=3,y=0,flip=false,audio="abad",text={"Què??","Però perquè???",""},die=20},
|
||||
{x=4,y=48,flip=true,audio="batman",text={"Estàs com una vaca!","Has de deixar de menjar", "eixes gorrinades"},die=20},
|
||||
{x=4,y=48,flip=true,audio="batman",text={"Mira'm a mi. Estic","tot buenorro i faig", "esport"},die=20},
|
||||
{x=3,y=0,flip=false,audio="abad",text={"Esport?????","I una merda!!","He de cuidar la panxa!"},die=20},
|
||||
{x=4,y=48,flip=true,audio="batman",text={"Pos t'aguantes.","Ja pots despedir-te", "dels cacaus..."},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",musica=audio_song_batman,text={"ME L'HE ENDUT JO!!!", "S'HAN ACABAT ELS","CACAUS PA TU!"},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Què??","Però perquè???",""},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",text={"Estàs com una vaca!","Has de deixar de menjar", "eixes gorrinades"},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",text={"Mira'm a mi. Estic","tot buenorro i faig", "esport"},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Esport?????","I una merda!!","He de cuidar la panxa!"},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",text={"Pos t'aguantes.","Ja pots despedir-te", "dels cacaus..."},die=20},
|
||||
},
|
||||
intro_04= {
|
||||
{x=3,y=0,flip=false,audio="abad",text={"Serà mamó...","",""},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Serà mamó...","",""},die=20},
|
||||
},
|
||||
abad_inici={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Se va a enterar eixe","imbècil de Batman","quan el pille..."}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Gonna per el GPS","per a trobarlo.",""}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"I igual hi ha","algú més per ací","que em puga ajudar."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Se va a enterar eixe","imbècil de Batman","quan el pille..."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Gonna per el GPS","per a trobarlo.",""}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"I igual hi ha","algú més per ací","que em puga ajudar."}},
|
||||
},
|
||||
abad_corfes={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Osti, està ple de","monstruacos.",""}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Pos al que s'acoste","s'endurà una corfa","de cacau al cap!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"I si van altets","igual val la pena","ajupir-se..."}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Osti, està ple de","monstruacos.",""}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Pos al que s'acoste","s'endurà una corfa","de cacau al cap!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"I si van altets","igual val la pena","ajupir-se..."}}
|
||||
},
|
||||
abad_portes={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Qui ha tancat totes","les portes?",""}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"A saber on està","cada interruptor","per a obrir-les..."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Qui ha tancat totes","les portes?",""}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"A saber on està","cada interruptor","per a obrir-les..."}},
|
||||
},
|
||||
abad_porta_casa={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Vaja, la porta de","casa també està","tancada."}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Però he de eixir!","Batman viu en la","casa de davant!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Vaja, la porta de","casa també està","tancada."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Però he de eixir!","Batman viu en la","casa de davant!"}},
|
||||
},
|
||||
abad_porta_batman={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Be, era de esperar","que Batman tinguera","la porta tancada."}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Crec que hi havia","un passadis secret","del meu sotan al seu."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Be, era de esperar","que Batman tinguera","la porta tancada."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Crec que hi havia","un passadis secret","del meu sotan al seu."}},
|
||||
},
|
||||
gps_trobat={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Ale, ja tinc el GPS.","Ara puc trobar tot","el que necessite..."}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"polsant les tecles","de l'1 al 5",""}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Ale, ja tinc el GPS.","Ara puc trobar tot","el que necessite..."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"polsant les tecles","de l'1 al 5",""}},
|
||||
},
|
||||
premiere_intro={
|
||||
{x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Pipistrello??","Això ques??",""}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"Il batmano!!","Incontrame il gorro","per l'amore d'un porco!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Tinc faena. A mi m'ha","furtat els cacaus i","he de trobarlos."}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"Lei tenne in su quarto!","Io tengo micha clave!","Achudame i t'achudo!"}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Pipistrello??","Això ques??",""}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Il batmano!!","Incontrame il gorro","per l'amore d'un porco!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Tinc faena. A mi m'ha","furtat els cacaus i","he de trobarlos."}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Lei tenne in su quarto!","Io tengo micha clave!","Achudame i t'achudo!"}}
|
||||
},
|
||||
premiere_intro_gorro={
|
||||
{x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Pipistrello??","Això... be, te igual","Ací el tens, atontat."}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"Per fortuna!","Grazie mille!","Come podo achudarte?"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Pos Batman m'ha furtat","els cacaus. Supose que","els te amagats."}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"In lo suo quarto!","Io tengo micha clave!","Tenne, tenne!!"}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",musica=audio_song_premiere,text={"Premiere??","Qué fas per ma casa?",""}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Porca miseria!!","l'uomo pipistrello!!","m'ha llevatto il gorro!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Pipistrello??","Això... be, te igual","Ací el tens, atontat."}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Per fortuna!","Grazie mille!","Come podo achudarte?"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Pos Batman m'ha furtat","els cacaus. Supose que","els te amagats."}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"In lo suo quarto!","Io tengo micha clave!","Tenne, tenne!!"}}
|
||||
},
|
||||
premiere_gorro={
|
||||
{x=4,y=0,flip=false,audio="abad",musica=audio_song_premiere,text={"Tin, el ditxos gorro.","",""}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"Bravissimo!","Che giornatta","fantastica! Figo!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Tu si que eres un","figo. On està eixa","mitja clau?"}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"Giusto! Aquí tenne!","Buona fortuna per","la tua avventura!"}},
|
||||
{x=69,y=20,flip=true,audio="premiere",text={"E NON TOCARE il","Batmano! Sei molto","poderoso!"}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",musica=audio_song_premiere,text={"Tin, el ditxos gorro.","",""}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Bravissimo!","Che giornatta","fantastica! Figo!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Tu si que eres un","figo. On està eixa","mitja clau?"}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"Giusto! Aquí tenne!","Buona fortuna per","la tua avventura!"}},
|
||||
{x=avatar_premiere_x,y=avatar_premiere_y,flip=true,audio="premiere",text={"E NON TOCARE il","Batmano! Sei molto","poderoso!"}}
|
||||
},
|
||||
gorro_trobat_nointro={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Mira, el gorro","de Premiere.","Millor l'agafe."}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Mira, el gorro","de Premiere.","Millor l'agafe."}}
|
||||
},
|
||||
gorro_trobat={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Mira, el gorro","de Premiere.","A la saca."}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Mira, el gorro","de Premiere.","A la saca."}}
|
||||
},
|
||||
elalien_intro={
|
||||
{x=4,y=0,flip=false,audio="abad",musica=audio_song_elalien,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Es...taves podant","a un gos...?",""}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"EN JUPITER NO POTS","DEIXAR QUE LI CREIXEN","MES DE 12 PATES!!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Uh... clar...","A mi m'ha furtat","els cacaus."}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"ELS TÉ EN LA SEUA","HABITACIÓ SEGUR.","TROBA EL BERENAR..."}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"...I JO ET DONARÉ","LA MEITAT DE LA CLAU","PER A ENTRAR."}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",musica=audio_song_elalien,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Es...taves podant","a un gos...?",""}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"EN JUPITER NO POTS","DEIXAR QUE LI CREIXEN","MES DE 12 PATES!!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Uh... clar...","A mi m'ha furtat","els cacaus."}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"ELS TÉ EN LA SEUA","HABITACIÓ SEGUR.","TROBA EL BERENAR..."}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"...I JO ET DONARÉ","LA MEITAT DE LA CLAU","PER A ENTRAR."}}
|
||||
},
|
||||
elalien_intro_peu={
|
||||
{x=4,y=0,flip=false,audio="abad",musica=audio_song_elalien,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Podant...? be, te","igual. Açò deu ser","el teu berenar."}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"OSTI QUE BÓ!!!","GRACIES AUELO!","A TU QUE T'HA FET?"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"M'ha furtat els cacaus.","Segur que els té","al seu quarto."}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"SEGUR! PERO JO TINC","LA MEITAT DE LA CLAU.","TIN, I SORT!"}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",musica=audio_song_elalien,text={"Que passa alien?","A tu també t'ha","putejat el Batman?"}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"CAGUEN L'OU!!","ESTAVA JO TAN TRANQUIL","PODANT AL MEU GOS..."}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"...I QUAN NO MIRABA","M'HA FURTAT EL","MARANÀ!!!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Podant...? be, te","igual. Açò deu ser","el teu berenar."}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"OSTI QUE BÓ!!!","GRACIES AUELO!","A TU QUE T'HA FET?"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"M'ha furtat els cacaus.","Segur que els té","al seu quarto."}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"SEGUR! PERO JO TINC","LA MEITAT DE LA CLAU.","TIN, I SORT!"}}
|
||||
},
|
||||
elalien_peu={
|
||||
{x=4,y=0,flip=false,audio="abad",musica=audio_song_elalien,text={"Ací tens...","Uff, que peste fa...",""}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"GRACIES!!!","SÍ, EH? QUE","SUCOSET I BÓ."}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Clar...","Be, i eixa","mitja clau?"}},
|
||||
{x=3,y=16,flip=true,audio="elalien",text={"TIN! QUAN TINGUES","ELS CACAUS, PEGA-LI","CACAUÀ A BATMAN!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",musica=audio_song_elalien,text={"Ací tens...","Uff, que peste fa...",""}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"GRACIES!!!","SÍ, EH? QUE","SUCOSET I BÓ."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Clar...","Be, i eixa","mitja clau?"}},
|
||||
{x=avatar_elalien_x,y=avatar_elalien_y,flip=true,audio="elalien",text={"TIN! QUAN TINGUES","ELS CACAUS, PEGA-LI","CACAUÀ A BATMAN!"}},
|
||||
},
|
||||
peu_trobat_nointro={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Un peu podrit??","Qué asco!! Segur","que és d'el alien."}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Un peu podrit??","Qué asco!! Segur","que és d'el alien."}}
|
||||
},
|
||||
peu_trobat={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Joer, açò deu ser","el berenar d'el alien.","Ecs..."}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Joer, açò deu ser","el berenar d'el alien.","Ecs..."}}
|
||||
},
|
||||
habitacio_batman={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"L'habitació de Batman!","Segur que els cacaus","estàn ahí dins."}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Però necessite","una clau...",""}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"L'habitació de Batman!","Segur que els cacaus","estàn ahí dins."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Però necessite","una clau...",""}}
|
||||
},
|
||||
bol_trobat={
|
||||
{x=4,y=0,flip=false,audio="abad",text={"PER FI, JA TINC","ELS MEUS CACAUS!!!","OLE!! OLE!!"}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Se va a enterar","Batman ara quan","el pille..."}},
|
||||
{x=4,y=0,flip=false,audio="abad",text={"Ara si que li puc","pegar una bona","cacauà..."}}
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"PER FI, JA TINC","ELS MEUS CACAUS!!!","OLE!! OLE!!"}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Se va a enterar","Batman ara quan","el pille..."}},
|
||||
{x=avatar_abad2_x,y=avatar_abad_y,flip=false,audio="abad",text={"Ara si que li puc","pegar una bona","cacauà..."}}
|
||||
},
|
||||
final= {
|
||||
{x=4,y=48,flip=true,audio="batman",musica=audio_song_batman,text={"AI!", "M'has fet mal!!!",""},die=20},
|
||||
{x=3,y=0,flip=false,audio="abad",text={"Aixó per furtar-me","el bol de cacaus,","imbèsil"},die=20},
|
||||
{x=4,y=48,flip=true,audio="batman",text={"Cert, esta me la","mereixia... però", "mira que be estàs!"},die=20},
|
||||
{x=4,y=48,flip=true,audio="batman",text={"Amb el que t'ha","costat pillar-me", "t'has ficat en forma"},die=20},
|
||||
{x=3,y=0,flip=false,audio="abad",text={"No me vingues en","tonteries,","mamarratxo."},die=20},
|
||||
{x=3,y=0,flip=false,audio="abad",text={"Creus que no he","notat que falta mig","bol de cacaus?"},die=20},
|
||||
{x=4,y=48,flip=true,audio="batman",text={"Jejejeje, es que","estàn molt bons!", ""},die=20},
|
||||
{x=4,y=48,flip=true,audio="batman",text={"Però si vols te","done del meu bol", "de tramussos."},die=20},
|
||||
{x=3,y=0,flip=false,audio="abad",text={"TRAMUSSOS...","",""},die=10},
|
||||
{x=3,y=0,flip=false,audio="abad",text={"M'atreviré a","passar l'última","frontera...?"},die=40},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",musica=audio_song_batman,text={"AI!", "M'has fet mal!!!",""},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Aixó per furtar-me","el bol de cacaus,","imbèsil"},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",text={"Cert, esta me la","mereixia... però", "mira que be estàs!"},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",text={"Amb el que t'ha","costat pillar-me", "t'has ficat en forma"},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"No me vingues en","tonteries,","mamarratxo."},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"Creus que no he","notat que falta mig","bol de cacaus?"},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",text={"Jejejeje, es que","estàn molt bons!", ""},die=20},
|
||||
{x=avatar_batman_x,y=avatar_batman_y,flip=true,audio="batman",text={"Però si vols te","done del meu bol", "de tramussos."},die=20},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"TRAMUSSOS...","",""},die=10},
|
||||
{x=avatar_abad_x,y=avatar_abad_y,flip=false,audio="abad",text={"M'atreviré a","passar l'última","frontera...?"},die=40},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -163,40 +177,64 @@ function playtext(snd)
|
||||
end
|
||||
end
|
||||
|
||||
function draw_photo ( photo_x, photo_y, flip, step )
|
||||
local photo_w = 11*o2aX
|
||||
local photo_h = 10*o2aX
|
||||
|
||||
local bkg_x = 8*o2aX
|
||||
local bkg_y = 12*o2aX
|
||||
local bkg_w = photo_w*2+2
|
||||
local bkg_h = photo_h*2+2
|
||||
local bkg_color = 16
|
||||
|
||||
if flip then
|
||||
bkg_x = 96*o2aX+1
|
||||
end
|
||||
|
||||
if step==3 then
|
||||
bkg_y = 12*o2aX
|
||||
bkg_h = 12*o2aX
|
||||
elseif step==4 or step==8 then
|
||||
bkg_y = 7*o2aX
|
||||
bkg_h = photo_h*2+2
|
||||
end
|
||||
|
||||
local photo_dx = bkg_x+1
|
||||
local photo_dy = bkg_y+1
|
||||
local photo_dw = bkg_w-2
|
||||
local photo_dh = bkg_h-2
|
||||
|
||||
draw.rectf(bkg_x,bkg_y,bkg_w,bkg_h,bkg_color)
|
||||
draw.surf(photo_x,photo_y,photo_w,photo_h,photo_dx,photo_dy,photo_dw,photo_dh, flip)
|
||||
end
|
||||
|
||||
function draw_scene()
|
||||
local txt_x = not scenes.current_scene[scenes.dnum].flip and 38 or 8
|
||||
view.origin(0,scenes.offset)
|
||||
|
||||
view.origin(0,scenes.offset*o2aX)
|
||||
if scenes.step==0 then
|
||||
draw.rectf(0,16,129,2,12)
|
||||
draw.line(0,15,128,15,16)
|
||||
draw.line(0,18,128,18,16)
|
||||
draw.rectf(0,16*o2aX,129*o2aX,2*o2aX,12)
|
||||
draw.line(0,15*o2aX,128*o2aX,15*o2aX,16)
|
||||
draw.line(0,18*o2aX,128*o2aX,18*o2aX,16)
|
||||
elseif scenes.step==1 then
|
||||
draw.rectf(0,8,129,19,12)
|
||||
draw.line(0,7,128,7,16)
|
||||
draw.line(0,27,128,27,16)
|
||||
draw.rectf(0,8*o2aX,129*o2aX,19*o2aX,12)
|
||||
draw.line(0,7*o2aX,128*o2aX,7*o2aX,16)
|
||||
draw.line(0,27*o2aX,128*o2aX,27*o2aX,16)
|
||||
elseif scenes.step==2 then
|
||||
draw.rectf(0,0,129,35,12)
|
||||
draw.line(0,0,128,0,16)
|
||||
draw.line(0,34,128,34,16)
|
||||
draw.rectf(0,0,129*o2aX,35*o2aX,12)
|
||||
draw.line(0,0,128*o2aX,0,16)
|
||||
draw.line(0,34*o2aX+1,128*o2aX,34*o2aX+1,16)
|
||||
elseif scenes.step==3 then
|
||||
if not scenes.current_scene[scenes.dnum].flip then
|
||||
draw.rectf(8,12,24,12,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,13,20,10)
|
||||
else
|
||||
draw.rectf(97,12,24,12,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,13,20,10,true)
|
||||
end
|
||||
draw_photo ( scenes.current_scene[scenes.dnum].x, scenes.current_scene[scenes.dnum].y, scenes.current_scene[scenes.dnum].flip, scenes.step)
|
||||
elseif scenes.step==4 then
|
||||
if not scenes.current_scene[scenes.dnum].flip then
|
||||
draw.rectf(8,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,8,20,20)
|
||||
else
|
||||
draw.rectf(97,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,8,20,20,true)
|
||||
end
|
||||
draw_photo ( scenes.current_scene[scenes.dnum].x, scenes.current_scene[scenes.dnum].y, scenes.current_scene[scenes.dnum].flip, scenes.step)
|
||||
elseif scenes.step==5 then
|
||||
text(string.sub(scenes.current_scene[scenes.dnum].text[1],1,scenes.char),txt_x,7,2)
|
||||
if scenes.char<#scenes.current_scene[scenes.dnum].text[1] then
|
||||
-- text(string.sub(scenes.current_scene[scenes.dnum].text[1],1,scenes.char),txt_x*o2aX,7*o2aX,2)
|
||||
-- view.origin(0,scenes.offset-20) -- Ni idea de perquè 38, o es 19*o2aX?
|
||||
-- arc_textB(string.sub(scenes.current_scene[scenes.dnum].text[1],1,scenes.char),txt_x*o2aX,7*o2aX,2)
|
||||
arc_textB(utf8.sub(scenes.current_scene[scenes.dnum].text[1],1,scenes.char),txt_x*o2aX,7*o2aX,2)
|
||||
-- if scenes.char<#scenes.current_scene[scenes.dnum].text[1] then
|
||||
if scenes.char<utf8.len(scenes.current_scene[scenes.dnum].text[1]) then
|
||||
scenes.step=scenes.step-1
|
||||
scenes.char=scenes.char+1
|
||||
playtext(scenes.current_scene[scenes.dnum].audio)
|
||||
@@ -204,8 +242,12 @@ function draw_scene()
|
||||
scenes.char=1
|
||||
end
|
||||
elseif scenes.step==6 then
|
||||
text(string.sub(scenes.current_scene[scenes.dnum].text[2],1,scenes.char),txt_x,15,2)
|
||||
if scenes.char<#scenes.current_scene[scenes.dnum].text[2] then
|
||||
-- text(string.sub(scenes.current_scene[scenes.dnum].text[2],1,scenes.char),txt_x*o2aX,15*o2aX,2)
|
||||
-- view.origin(0,scenes.offset-20) -- Ni idea de perquè 38, o es 19*o2aX?
|
||||
-- arc_textB(string.sub(scenes.current_scene[scenes.dnum].text[2],1,scenes.char),txt_x*o2aX,15*o2aX,2)
|
||||
arc_textB(utf8.sub(scenes.current_scene[scenes.dnum].text[2],1,scenes.char),txt_x*o2aX,15*o2aX,2)
|
||||
-- if scenes.char<#scenes.current_scene[scenes.dnum].text[2] then
|
||||
if scenes.char<utf8.len(scenes.current_scene[scenes.dnum].text[2]) then
|
||||
scenes.step=scenes.step-1
|
||||
scenes.char=scenes.char+1
|
||||
playtext(scenes.current_scene[scenes.dnum].audio)
|
||||
@@ -213,8 +255,12 @@ function draw_scene()
|
||||
scenes.char=1
|
||||
end
|
||||
elseif scenes.step==7 then
|
||||
text(string.sub(scenes.current_scene[scenes.dnum].text[3],1,scenes.char),txt_x,23,2)
|
||||
if scenes.char<#scenes.current_scene[scenes.dnum].text[3] then
|
||||
-- text(string.sub(scenes.current_scene[scenes.dnum].text[3],1,scenes.char),txt_x*o2aX,23*o2aX,2)
|
||||
-- view.origin(0,scenes.offset-20) -- Ni idea de perquè 38, o es 19*o2aX?
|
||||
-- arc_textB(string.sub(scenes.current_scene[scenes.dnum].text[3],1,scenes.char),txt_x*o2aX,23*o2aX,2)
|
||||
arc_textB(utf8.sub(scenes.current_scene[scenes.dnum].text[3],1,scenes.char),txt_x*o2aX,23*o2aX,2)
|
||||
-- if scenes.char<#scenes.current_scene[scenes.dnum].text[3] then
|
||||
if scenes.char<utf8.len(scenes.current_scene[scenes.dnum].text[3]) then
|
||||
scenes.step=scenes.step-1
|
||||
scenes.char=scenes.char+1
|
||||
playtext(scenes.current_scene[scenes.dnum].audio)
|
||||
@@ -222,19 +268,23 @@ function draw_scene()
|
||||
scenes.char=1
|
||||
end
|
||||
elseif scenes.step==8 then
|
||||
draw.rectf(0,0,129,35,12)
|
||||
draw.line(0,0,128,0,16)
|
||||
draw.line(0,34,128,34,16)
|
||||
if not scenes.current_scene[scenes.dnum].flip then
|
||||
draw.rectf(8,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,8,20,20)
|
||||
else
|
||||
draw.rectf(97,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,8,20,20,true)
|
||||
end
|
||||
text(scenes.current_scene[scenes.dnum].text[1],txt_x,7,2)
|
||||
text(scenes.current_scene[scenes.dnum].text[2],txt_x,15,2)
|
||||
text(scenes.current_scene[scenes.dnum].text[3],txt_x,23,2)
|
||||
draw.rectf(0,0,129*o2aX,35*o2aX,12)
|
||||
draw.line(0,0,128*o2aX,0,16)
|
||||
draw.line(0,34*o2aX+1,128*o2aX,34*o2aX+1,16)
|
||||
draw_photo ( scenes.current_scene[scenes.dnum].x, scenes.current_scene[scenes.dnum].y, scenes.current_scene[scenes.dnum].flip, scenes.step)
|
||||
-- if not scenes.current_scene[scenes.dnum].flip then
|
||||
-- draw.rectf(8*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
||||
-- draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,9*o2aX,8*o2aX,20*o2aX,20*o2aX)
|
||||
-- else
|
||||
-- draw.rectf(97*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
||||
-- draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,98*o2aX,8*o2aX,20*o2aX,20*o2aX,true)
|
||||
-- end
|
||||
-- text(scenes.current_scene[scenes.dnum].text[1],txt_x*o2aX,7*o2aX,2)
|
||||
-- text(scenes.current_scene[scenes.dnum].text[2],txt_x*o2aX,15*o2aX,2)
|
||||
-- text(scenes.current_scene[scenes.dnum].text[3],txt_x*o2aX,23*o2aX,2)
|
||||
arc_textB(scenes.current_scene[scenes.dnum].text[1],txt_x*o2aX,7*o2aX,2)
|
||||
arc_textB(scenes.current_scene[scenes.dnum].text[2],txt_x*o2aX,15*o2aX,2)
|
||||
arc_textB(scenes.current_scene[scenes.dnum].text[3],txt_x*o2aX,23*o2aX,2)
|
||||
end
|
||||
if scenes.step<=8 then scenes.step=scenes.step+1 end
|
||||
view.origin(0,0)
|
||||
@@ -267,9 +317,9 @@ function update_scene()
|
||||
end
|
||||
else
|
||||
if math.floor(sys.time()*2)%2==0 then
|
||||
draw.surf(104,88,7,5,118,56)
|
||||
draw.surf(104*o2aX,88*o2aX,7*o2aX,5*o2aX,118*o2aX,56*o2aX)
|
||||
else
|
||||
draw.rectf(118,56,8,6,12)
|
||||
draw.rectf(118*o2aX,56*o2aX,8*o2aX,6*o2aX,12)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,43 +1,46 @@
|
||||
score={}
|
||||
|
||||
function score.create()
|
||||
score.surf=surf.new(32,96)
|
||||
score.surf=surf.new(32*o2aX,96*o2aX)
|
||||
surf.target(score.surf)
|
||||
surf.cls(16)
|
||||
draw.surf(0,0,16,9,5,9,16,9,true)
|
||||
draw.surf(32,64,8,8,0,0) draw.surf(48,72,8,8,8,0) draw.surf(48,72,8,8,16,0) draw.surf(40,64,8,8,24,0)
|
||||
draw.surf(48,64,8,8,0,8) draw.surf(56,64,8,8,24,8) draw.surf(48,64,8,8,0,16) draw.surf(56,64,8,8,24,16)
|
||||
draw.surf(32,64,8,8,0,24) draw.surf(48,72,8,8,8,24) draw.surf(48,72,8,8,16,24) draw.surf(40,64,8,8,24,24)
|
||||
draw.surf(48,64,8,8,0,32) draw.surf(56,64,8,8,24,32)
|
||||
draw.surf(32,64,8,8,0,40) draw.surf(48,72,8,8,8,40) draw.surf(48,72,8,8,16,40) draw.surf(40,64,8,8,24,40)
|
||||
draw.surf(0,0,16*o2aX,9*o2aX,5*o2aX,9*o2aX,16*o2aX,9*o2aX,true)
|
||||
draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,0) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,0) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,0) draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,0)
|
||||
draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,8*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,8*o2aX) draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,16*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,16*o2aX)
|
||||
draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,24*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,24*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,24*o2aX) draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,24*o2aX)
|
||||
draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,32*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,32*o2aX)
|
||||
draw.surf(32*o2aX,64*o2aX,8*o2aX,8*o2aX,0,40*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,8*o2aX,40*o2aX) draw.surf(48*o2aX,72*o2aX,8*o2aX,8*o2aX,16*o2aX,40*o2aX) draw.surf(40*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,40*o2aX)
|
||||
|
||||
draw.surf(48,64,8,8,0,48) draw.surf(56,64,8,8,24,48) draw.surf(48,64,8,8,0,56) draw.surf(56,64,8,8,24,56)
|
||||
draw.surf(48,64,8,8,0,64) draw.surf(56,64,8,8,24,64) --draw.surf(48,64,8,8,0,72) draw.surf(56,64,8,8,24,72)
|
||||
draw.surf(32,64,8,8,0,72) draw.surf(48,72,8,8,8,72) draw.surf(48,72,8,8,16,72) draw.surf(40,64,8,8,24,72)
|
||||
draw.surf(48,64,8,8,0,80) draw.surf(56,64,8,8,24,80) draw.surf(48,64,8,8,0,88) draw.surf(56,64,8,8,24,88)
|
||||
draw.text("jail",6,77,2)
|
||||
draw.text("games",8, 82,2)
|
||||
draw.text("2023",9,89,1)
|
||||
draw.rectf(06,30,2,8,03)
|
||||
draw.rectf(09,30,2,8,08)
|
||||
draw.rectf(12,30,2,8,08)
|
||||
draw.rectf(15,30,2,8,10)
|
||||
draw.rectf(18,30,2,8,10)
|
||||
draw.rectf(21,30,2,8,10)
|
||||
draw.rectf(24,30,2,8,10)
|
||||
draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,48*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,48*o2aX) draw.surf(48*o2aX,64*o2aX,8*o2aX,8*o2aX,0,56*o2aX) draw.surf(56*o2aX,64*o2aX,8*o2aX,8*o2aX,24*o2aX,56*o2aX)
|
||||
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)
|
||||
arc_text("jail", 6*o2aX, 77*o2aX, 2)
|
||||
arc_text("games",8*o2aX, 82*o2aX, 2)
|
||||
arc_text("2026", 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)
|
||||
draw.rectf(15*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
|
||||
draw.rectf(18*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
|
||||
draw.rectf(21*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
|
||||
draw.rectf(24*o2aX,30*o2aX,2*o2aX,8*o2aX,10)
|
||||
surf.target(0)
|
||||
end
|
||||
|
||||
function score.draw()
|
||||
surf.source(score.surf)
|
||||
draw.surf(0,0,32,96,96,0)
|
||||
draw.surf(0,0,32*o2aX,96*o2aX,96*o2aX,0)
|
||||
surf.source(tiles)
|
||||
if abad.objects.gorro~=nil then draw.surf(96,32,16,16,99,44) end
|
||||
if abad.objects.peu~=nil then draw.surf(112,32,16,16,109,44) end
|
||||
if abad.objects.gps~=nil then draw.surf(112,48,16,16,100,55) end
|
||||
if abad.objects.gorro~=nil then draw.surf(96*o2aX,32*o2aX,16*o2aX,16*o2aX,99*o2aX,44*o2aX) end
|
||||
if abad.objects.peu~=nil then draw.surf(112*o2aX,32*o2aX,16*o2aX,16*o2aX,109*o2aX,44*o2aX) end
|
||||
if abad.objects.gps~=nil then draw.surf(112*o2aX,48*o2aX,16*o2aX,16*o2aX,100*o2aX,55*o2aX) end
|
||||
|
||||
if abad.objects.clau_premiere~=nil then draw.surf(112,8,8,8,104,48) end
|
||||
if abad.objects.clau_elalien~=nil then draw.surf(120,8,8,8,112,48) end
|
||||
if abad.objects.clau_premiere~=nil then draw.surf(112*o2aX,8*o2aX,8*o2aX,8*o2aX,104*o2aX,48*o2aX) end
|
||||
if abad.objects.clau_elalien~=nil then draw.surf(120*o2aX,8*o2aX,8*o2aX,8*o2aX,112*o2aX,48*o2aX) end
|
||||
|
||||
if abad.objects.bol~=nil then draw.surf(112,88,16,8,104,46) end
|
||||
if abad.objects.bol~=nil then draw.surf(112*o2aX,88*o2aX,16*o2aX,8*o2aX,104*o2aX,46*o2aX) end
|
||||
end
|
||||
BIN
data/tiles.gif
BIN
data/tiles.gif
Binary file not shown.
|
Before Width: | Height: | Size: 4.7 KiB After Width: | Height: | Size: 12 KiB |
@@ -1,3 +1,10 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
|
||||
zombie={}
|
||||
|
||||
function zombie.new(_hab,_x,_y,_flip)
|
||||
@@ -5,7 +12,8 @@ function zombie.new(_hab,_x,_y,_flip)
|
||||
end
|
||||
|
||||
function zombie:draw()
|
||||
if self.frame>0 then draw.surf((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip) end
|
||||
-- if self.frame>0 then draw.surf((self.frame&7)*16,(self.frame>>3)*16,16,16,self.x,self.y,16,16,self.flip) end
|
||||
if self.frame>0 then draw.surf((self.frame&7)*cw,(self.frame>>cxr2)*ch,cw,ch,self.x*o2aX,self.y*o2aX,cw,ch,self.flip) end
|
||||
end
|
||||
|
||||
function zombie:update_normal()
|
||||
|
||||
32
readme.md
32
readme.md
@@ -1,31 +1,7 @@
|
||||
# Cacaus
|
||||
# X2 Cacaus
|
||||
|
||||
<p align="center">
|
||||
<img width="25%" height="25%" src="https://php.sustancia.synology.me/images/cacaus/cacaus0.jpg" alt="Títol" />
|
||||
</p>
|
||||
<h3 align="center">Cacaus amb resolució X2!</h3>
|
||||
|
||||
## Sinopsis
|
||||
El Abad està feliç. Nit de Netflix amb un bon bol de cacaus... però els cacaus han desaparegut! Ja està Batman donant pel cul. Serà millor ficar-se a la feina. El Abad ja no està tan feliç.
|
||||
Fet amb mini 1.4.4 (https://gitea.sustancia.synology.me/JailDoctor/mini)
|
||||
|
||||
<p align="center">
|
||||
<img width="40%" height="40%" src="https://php.sustancia.synology.me/images/cacaus/cacaus1.jpg" alt="Cacaus" /> <img width="40%" height="40%" src="https://php.sustancia.synology.me/images/cacaus/cacaus2.jpg" alt="Cacaus" />
|
||||
</p>
|
||||
|
||||
Batman ha amagat els cacaus en la seua habitació. Tindrás que anar a sa casa i trobar-la. Però per a entrar et farà falta la clau! Segur que els teus amics et poden ajudar... si tu els ajudes abans!
|
||||
|
||||
Es un joc basat en el Spirits de Topo Soft.
|
||||
|
||||
## Instruccions
|
||||
Hi ha diversos objectes i "persones" que has de trobar per a completar el joc, així que primer busca el GPS. Una vegada el tingues pulsa les tecles del 1 al 5 per a vore on està cada un dels objectes/persones.
|
||||
|
||||
Per a obrir les portes tindràs que trobar la palanca corresponent. A saber qui va ser l'inutil que va fer l'instalació elèctrica.
|
||||
|
||||
La casa s'ha omplit de monstres estrafalaris. A alguns els pots atontar momentaniament llençant-los una corfa de cacau. Altres passen de tot. Algúns es millor esquivar-los agaxant-se.
|
||||
|
||||
Ves espai i que no te toque Batman o te pegarà un carxot.
|
||||
|
||||
Quan obtingues la clau, recupera els cacaus de la seua habitació, busca a Batman i pega-li una bona cacauà.
|
||||
|
||||
<p align="center">
|
||||
<img width="40%" height="40%" src="https://php.sustancia.synology.me/images/cacaus/cacaus3.jpg" alt="Cacaus" /> <img width="40%" height="40%" src="https://php.sustancia.synology.me/images/cacaus4.jpg" alt="Cacaus" />
|
||||
</p>
|
||||
<p>Projecte original [JailDoctor/cacaus] (https://gitea.sustancia.synology.me/JailDoctor/cacaus)
|
||||
|
||||
Reference in New Issue
Block a user