Compare commits
33 Commits
edd07509d0
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 29b18f031c | |||
| 0f7a8359ea | |||
| 47675d70b4 | |||
| 244a09c7ed | |||
| 3ca9f28021 | |||
| 59fb6faa95 | |||
| e040a3896d | |||
| f3417d6faa | |||
| 1844901d6f | |||
| 44398f3080 | |||
| 90f66a4cdc | |||
| 8a80bffe42 | |||
| 1a4041a231 | |||
| 300d2b28df | |||
| 7b080c2921 | |||
| 5a50a29bdb | |||
| 01fff47b57 | |||
| 64cbda695c | |||
| 51f267284e | |||
| 49396331a7 | |||
| 5f465b2a74 | |||
| 797d407539 | |||
| 5b4e4be005 | |||
| 8b33e35114 | |||
| 9c9092d19b | |||
| 4e7a50879e | |||
| c1f5f92dae | |||
| cee6ade851 | |||
| 50f2710986 | |||
| 8853bca713 | |||
| af269366c2 | |||
| a98a46a3d2 | |||
| 130c5d62e1 |
13
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
|
||||
{
|
||||
"name": "Debug Mini Game",
|
||||
"type": "mini-debugger",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/mini_debug",
|
||||
"cwd": "${workspaceFolder}",
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
data/gfx/abad.gif
Normal file
|
After Width: | Height: | Size: 347 B |
BIN
data/gfx/berserk.gif
Normal file
|
After Width: | Height: | Size: 343 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 228 B |
BIN
data/gfx/dimoni.gif
Normal file
|
After Width: | Height: | Size: 371 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 228 B |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.0 KiB |
|
Before Width: | Height: | Size: 826 B After Width: | Height: | Size: 826 B |
BIN
data/gfx/paku.gif
Normal file
|
After Width: | Height: | Size: 238 B |
BIN
data/gfx/ratpenat.gif
Normal file
|
After Width: | Height: | Size: 176 B |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 228 B |
|
Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.3 KiB |
BIN
data/gfx/titles/jailgames.gif
Normal file
|
After Width: | Height: | Size: 302 B |
BIN
data/gfx/titles/jgmummy.gif
Normal file
|
After Width: | Height: | Size: 930 B |
BIN
data/gfx/titles/logo.gif
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
data/gfx/titles/pharao.gif
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 228 B |
@@ -1,6 +1,7 @@
|
||||
require "utils.app"
|
||||
require "modules.score"
|
||||
require "modules.rooms"
|
||||
require "stages.titles"
|
||||
require "stages.editor"
|
||||
require "stages.game"
|
||||
require "utils.palfade"
|
||||
@@ -21,11 +22,13 @@ function mini.init()
|
||||
|
||||
rooms.init()
|
||||
shader.init("lynx.glsl")
|
||||
if sys.debug() then
|
||||
editor.enable()
|
||||
else
|
||||
--titles.enable()
|
||||
game.enable()
|
||||
end
|
||||
--if sys.debug() then
|
||||
-- editor.enable()
|
||||
--else
|
||||
-- game.enable()
|
||||
--end
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
end
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 4.3 KiB |
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.4 KiB |
@@ -54,6 +54,13 @@ animations = {
|
||||
{ frame={x=156,y=0,w=4,h=3}, wait=4 }
|
||||
}
|
||||
},
|
||||
["particle"] = {
|
||||
cycle = {1},
|
||||
loop = false,
|
||||
frames = {
|
||||
{ frame={x=112,y=0,w=8,h=8}, wait=100 }
|
||||
}
|
||||
},
|
||||
["mummy_walk"] = {
|
||||
cycle = {1,2,1,3},
|
||||
loop = true,
|
||||
@@ -232,4 +239,30 @@ animations = {
|
||||
{ frame={x=56,y=0,w=8,h=8}, wait=100 }
|
||||
}
|
||||
},
|
||||
["abad"] = {
|
||||
cycle = {1,2},
|
||||
loop = true,
|
||||
frames = {
|
||||
{ frame={x=16,y=0,w=16,h=18}, offset={flipped={x=0,y=-2}}, wait=2 },
|
||||
{ frame={x=32,y=0,w=16,h=18}, offset={flipped={x=0,y=-2}}, wait=2 }
|
||||
}
|
||||
},
|
||||
["dimoni_walk"] = {
|
||||
cycle = {1,2,1,3},
|
||||
loop = true,
|
||||
frames = {
|
||||
{ frame={x=0,y=0,w=16,h=17}, offset={normal={x=0,y=-2}, flipped={x=0,y=-2}}, wait=4 },
|
||||
{ frame={x=16,y=0,w=16,h=17}, offset={normal={x=0,y=-2}, flipped={x=0,y=-2}}, wait=4 },
|
||||
{ frame={x=32,y=0,w=16,h=17}, offset={normal={x=0,y=-2}, flipped={x=0,y=-2}}, wait=4 }
|
||||
}
|
||||
},
|
||||
["ratpenat"] = {
|
||||
cycle = {1,2,3,2},
|
||||
loop = true,
|
||||
frames = {
|
||||
{ frame={x=0,y=0,w=8,h=8}, wait=4 },
|
||||
{ frame={x=8,y=0,w=8,h=8}, wait=4 },
|
||||
{ frame={x=16,y=0,w=8,h=8}, wait=4 }
|
||||
}
|
||||
},
|
||||
}
|
||||
58
data/modules/ia/berserk.lua
Normal file
@@ -0,0 +1,58 @@
|
||||
|
||||
function ia.update_berserk(spr)
|
||||
map.surf(rooms.surf_foreground)
|
||||
if spr.state == templates.ALIVE then
|
||||
if sprites.hero.state == templates.ALIVE then
|
||||
local x1,y1,w1,h1 = util.aabb(spr) -- El meu aabb
|
||||
local x2,y2,w2,h2 = util.aabb(sprites.hero) -- el aabb del heroi
|
||||
-- Si toca al heroi...
|
||||
if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then
|
||||
sprites.hero.hit()
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
end
|
||||
|
||||
local advance = 1
|
||||
if sprites.hero.pos.y == spr.pos.y-1 then advance = 2 end
|
||||
if spr.flipped then
|
||||
local tx, ty = (spr.pos.x+3)>>3, (spr.pos.y+15)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x - advance
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
else
|
||||
local tx, ty = (spr.pos.x+12)>>3, (spr.pos.y+15)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x + advance
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
elseif spr.state == templates.DYING then
|
||||
if spr.animation ~= "mummy_dying" then
|
||||
sprites.set_animation(spr, "mummy_dying")
|
||||
spr.surf = surf.load("gfx/mummy.gif")
|
||||
else
|
||||
if spr.current_frame == 8 then
|
||||
sprites.set_animation(spr, "mummy_dead")
|
||||
spr.state = templates.DEAD
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
elseif spr.state == templates.DEAD then
|
||||
if spr.current_wait == 1 then
|
||||
sprites.set_animation(spr, "mummy_undying")
|
||||
spr.state = templates.RESURRECTING
|
||||
end
|
||||
elseif spr.state == templates.RESURRECTING then
|
||||
if spr.current_frame == 13 then
|
||||
sprites.set_animation(spr, "mummy_walk")
|
||||
spr.surf = surf.load("gfx/berserk.gif")
|
||||
spr.state = templates.ALIVE
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -9,7 +9,13 @@ function ia.update_bullet(spr)
|
||||
if v.enemy and v.state ~= templates.DEAD then
|
||||
local x2,y2,w2,h2 = util.aabb(v)
|
||||
if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then
|
||||
if v.state == templates.ALIVE then v.state = templates.DYING end
|
||||
if v.state == templates.ALIVE then
|
||||
if v.bulletproof then
|
||||
bullet_ricochet(spr)
|
||||
else
|
||||
v.state = templates.DYING
|
||||
end
|
||||
end
|
||||
sprites.remove(spr)
|
||||
return
|
||||
end
|
||||
@@ -23,7 +29,15 @@ function ia.update_bullet(spr)
|
||||
spr.pos.x = spr.pos.x + 8
|
||||
end
|
||||
else
|
||||
sprites.remove(spr)
|
||||
bullet_ricochet(spr)
|
||||
--sprites.remove(spr)
|
||||
end
|
||||
end
|
||||
|
||||
function bullet_ricochet(spr)
|
||||
sprites.remove(spr)
|
||||
table.insert(sprites.list, templates.create("bullet_particle", {pos={x=spr.pos.x, y=spr.pos.y}, dir={x= 1,y= math.random(3,5)}, flipped=spr.flipped}))
|
||||
table.insert(sprites.list, templates.create("bullet_particle", {pos={x=spr.pos.x, y=spr.pos.y}, dir={x=-1,y= math.random(3,5)}, flipped=spr.flipped}))
|
||||
table.insert(sprites.list, templates.create("bullet_particle", {pos={x=spr.pos.x, y=spr.pos.y}, dir={x=-1,y=-math.random(3,5)}, flipped=spr.flipped}))
|
||||
table.insert(sprites.list, templates.create("bullet_particle", {pos={x=spr.pos.x, y=spr.pos.y}, dir={x= 1,y=-math.random(3,5)}, flipped=spr.flipped}))
|
||||
end
|
||||
|
||||
31
data/modules/ia/dimoni.lua
Normal file
@@ -0,0 +1,31 @@
|
||||
|
||||
function ia.update_dimoni(spr)
|
||||
map.surf(rooms.surf_foreground)
|
||||
if spr.state == templates.ALIVE then
|
||||
if sprites.hero.state == templates.ALIVE then
|
||||
local x1,y1,w1,h1 = util.aabb(spr) -- El meu aabb
|
||||
local x2,y2,w2,h2 = util.aabb(sprites.hero) -- el aabb del heroi
|
||||
-- Si toca al heroi...
|
||||
if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then
|
||||
sprites.hero.hit()
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
end
|
||||
|
||||
if spr.flipped then
|
||||
local tx, ty = (spr.pos.x+3)>>3, (spr.pos.y+15)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x - 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
else
|
||||
local tx, ty = (spr.pos.x+12)>>3, (spr.pos.y+15)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x + 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -2,6 +2,9 @@
|
||||
function ia.update_gota(spr)
|
||||
if spr.timer > 0 then
|
||||
spr.timer = spr.timer-1
|
||||
if spr.timer == 0 then
|
||||
sprites.set_animation(spr, "gota_generador")
|
||||
end
|
||||
return
|
||||
else
|
||||
spr.invisible = nil;
|
||||
|
||||
@@ -28,6 +28,11 @@ function ia.update_hero()
|
||||
local move_anim = "hero_walk"
|
||||
|
||||
-- Si estem en cooldown desde l'ultim dispar, decrementem el contador
|
||||
-- Si estem en cooldown desde l'ultim dispar, decrementem el contador
|
||||
if sprites.hero.gun_cooldown > 0 then
|
||||
sprites.hero.gun_cooldown = sprites.hero.gun_cooldown - 1
|
||||
end
|
||||
|
||||
if sprites.hero.cooldown > 0 then
|
||||
sprites.hero.cooldown = sprites.hero.cooldown - 1
|
||||
end
|
||||
@@ -52,19 +57,19 @@ function ia.update_hero()
|
||||
-- Si li han pegat...
|
||||
if sprites.hero.has_been_hit then
|
||||
if sprites.hero.flipped then
|
||||
local tx, ty = (sprites.hero.pos.x+3)>>3, (sprites.hero.pos.y+16)>>3
|
||||
local tx, ty = (sprites.hero.pos.x+12)>>3, (sprites.hero.pos.y+16)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 then
|
||||
if tx<rooms.pos.x then
|
||||
game.change_room(-1,0)
|
||||
if tx>rooms.pos.x+19 then
|
||||
game.change_room(1,0)
|
||||
else
|
||||
sprites.hero.pos.x = sprites.hero.pos.x + 1
|
||||
end
|
||||
end
|
||||
else
|
||||
local tx, ty = (sprites.hero.pos.x+12)>>3, (sprites.hero.pos.y+16)>>3
|
||||
local tx, ty = (sprites.hero.pos.x+3)>>3, (sprites.hero.pos.y+16)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 then
|
||||
if tx>rooms.pos.x+19 then
|
||||
game.change_room(1,0)
|
||||
if tx<rooms.pos.x then
|
||||
game.change_room(-1,0)
|
||||
else
|
||||
sprites.hero.pos.x = sprites.hero.pos.x - 1
|
||||
end
|
||||
@@ -94,12 +99,12 @@ function ia.update_hero()
|
||||
local tx1, tx2, ty = (sprites.hero.pos.x+4)>>3, (sprites.hero.pos.x+11)>>3, (sprites.hero.pos.y)>>3
|
||||
--draw.rect(tx1<<3,ty<<3,8,8,8)
|
||||
--draw.rect(tx2<<3,ty<<3,8,8,28)
|
||||
if map.tile(tx1,ty) == 0 and map.tile(tx2,ty) == 0 then
|
||||
if ty+1<rooms.pos.y then
|
||||
game.change_room(0,-1)
|
||||
else
|
||||
if map.tile(tx1,ty) < 16 and map.tile(tx2,ty) < 16 then
|
||||
--if ty+1<rooms.pos.y then
|
||||
-- game.change_room(0,-1)
|
||||
--else
|
||||
if sprites.hero.jumping > 1 then sprites.hero.pos.y = sprites.hero.pos.y - 1 end
|
||||
end
|
||||
--end
|
||||
else
|
||||
sprites.hero.jumping = 0
|
||||
sprites.hero.jump_throttle = 10
|
||||
@@ -115,8 +120,8 @@ function ia.update_hero()
|
||||
-- SI PULSA AMUNT...
|
||||
if key.down(key.UP) or pad.down(pad.UP) then
|
||||
anim = move_anim
|
||||
local tx1, tx2, ty = (sprites.hero.pos.x+4)>>3, (sprites.hero.pos.x+11)>>3, (sprites.hero.pos.y)>>3
|
||||
if map.tile(tx1,ty) < 16 or map.tile(tx2,ty) < 16 then
|
||||
local tx1, tx2, ty = (sprites.hero.pos.x+8)>>3, (sprites.hero.pos.x+11)>>3, (sprites.hero.pos.y)>>3
|
||||
if map.tile(tx1,ty) < 16 then --or map.tile(tx2,ty) < 16 then
|
||||
if ty+1<rooms.pos.y then
|
||||
game.change_room(0,-1)
|
||||
else
|
||||
@@ -163,8 +168,11 @@ function ia.update_hero()
|
||||
local broken_tile = templates.create("brick", {pos={x=tx2<<3, y=(ty+2)<<3}, flipped=sprites.hero.flipped})
|
||||
table.insert(sprites.list, broken_tile)
|
||||
end
|
||||
if tile_under_me1>=16 or tile_under_me1>=16 then
|
||||
sprites.hero.pos.y = (ty<<3)-1
|
||||
end
|
||||
anim = "hero_stand"
|
||||
if sprites.hero.state == templates.ALIVE then sprites.save_safe_pos() end
|
||||
-- SI ESTÀ SOBRE UNES ESCALERES I POLSA AVALL...
|
||||
if (map.tile(txm,ty+2) < 16 and map.tile(txm,ty+2) > 0) then
|
||||
if key.down(key.DOWN) or pad.down(pad.DOWN) then
|
||||
@@ -181,9 +189,9 @@ function ia.update_hero()
|
||||
sprites.hero.jumping = 17
|
||||
|
||||
-- SI POLSA DISPAR...
|
||||
elseif (sprites.hero.cooldown==0) and (key.down(key.Z) or pad.down(pad.B)) then
|
||||
elseif (sprites.hero.gun_cooldown==0) and (key.down(key.Z) or pad.down(pad.B)) then
|
||||
sprites.hero.shooting = true
|
||||
sprites.hero.cooldown = 20
|
||||
sprites.hero.gun_cooldown = 20
|
||||
local bullet = templates.create("bullet", {pos={x=sprites.hero.pos.x, y=sprites.hero.pos.y+7}, flipped=sprites.hero.flipped})
|
||||
table.insert(sprites.list, bullet)
|
||||
anim = "hero_shoot"
|
||||
@@ -241,6 +249,7 @@ function ia.hero_hit(live)
|
||||
|
||||
if sprites.hero.lives == 0 then
|
||||
sprites.hero.state = templates.DEAD
|
||||
sprites.hero.invisible = nil
|
||||
sprites.hero.surf = surf.load("gfx/mummy.gif")
|
||||
sprites.set_animation(sprites.hero, "mummy_dying")
|
||||
sprites.hero.jumping = 0
|
||||
@@ -261,3 +270,20 @@ function ia.hero_give_key(color)
|
||||
tweening.add(1,0,0.25,easing.linear,function(value,n,finished)palfade.fade_white(value)end)
|
||||
return true
|
||||
end
|
||||
|
||||
function ia.hero_reset()
|
||||
sprites.hero.state = templates.ALIVE
|
||||
sprites.hero.invisible = nil
|
||||
sprites.hero.lives = 4
|
||||
sprites.hero.surf = surf.load("gfx/morcus.gif")
|
||||
sprites.hero.animation = "hero_stand"
|
||||
sprites.hero.current_frame = 1
|
||||
sprites.hero.current_wait = 1
|
||||
sprites.hero.flipped = false
|
||||
sprites.hero.light = 100
|
||||
sprites.hero.pos = {x=sprites.last_safe_pos.x,y=sprites.last_safe_pos.y}
|
||||
sprites.hero.shooting = false
|
||||
|
||||
rooms.go_to_room(sprites.last_safe_room)
|
||||
palfade.init()
|
||||
end
|
||||
@@ -15,7 +15,7 @@ function ia.update_nemesio(spr)
|
||||
|
||||
if spr.substate == nemesio.STATIC then
|
||||
spr.mode = draw.NORMAL
|
||||
if spr.timer==100 then
|
||||
if spr.timer==50 then
|
||||
spr.timer=0
|
||||
spr.substate = nemesio.FLOATING
|
||||
spr.advance = {x=0,y=0}
|
||||
|
||||
@@ -13,14 +13,14 @@ function ia.update_rata(spr)
|
||||
|
||||
if spr.flipped then
|
||||
local tx, ty = (spr.pos.x-1)>>3, (spr.pos.y+7)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x - 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
else
|
||||
local tx, ty = (spr.pos.x+9)>>3, (spr.pos.y+7)>>3
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty-1) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
if map.tile(tx,ty) < 16 and map.tile(tx,ty+1) > 0 then
|
||||
spr.pos.x = spr.pos.x + 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
|
||||
29
data/modules/ia/ratpenat.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
|
||||
function ia.update_ratpenat(spr)
|
||||
map.surf(rooms.surf_foreground)
|
||||
if sprites.hero.state == templates.ALIVE then
|
||||
local x1,y1,w1,h1 = util.aabb(spr) -- El meu aabb
|
||||
local x2,y2,w2,h2 = util.aabb(sprites.hero) -- el aabb del heroi
|
||||
-- Si toca al heroi...
|
||||
if util.check_aabb_collision(x1,y1,w1,h1, x2,y2,w2,h2) then
|
||||
sprites.hero.hit()
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
end
|
||||
|
||||
if spr.flipped then
|
||||
local tx, ty = (spr.pos.x-1)>>3, (spr.pos.y)>>3
|
||||
if map.tile(tx,ty) < 16 then
|
||||
spr.pos.x = spr.pos.x - 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
else
|
||||
local tx, ty = (spr.pos.x+9)>>3, (spr.pos.y)>>3
|
||||
if map.tile(tx,ty) < 16 then
|
||||
spr.pos.x = spr.pos.x + 1
|
||||
else
|
||||
spr.flipped = not spr.flipped
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -17,4 +17,8 @@ items = {
|
||||
{ name="nemesio", label="nemesio", visual={x=16, y=80, w=16, h=16} },
|
||||
{ name="rata", label="rata", visual={x=80, y=48, w=9, h=8} },
|
||||
{ name="gota", label="gota", visual={x=80, y=56, w=8, h=8} },
|
||||
{ name="berserk", label="berserk", visual={x=16, y=24, w=16, h=16} },
|
||||
{ name="abad", label="abad", visual={x=16, y=0, w=16, h=16} },
|
||||
{ name="dimoni", label="dimoni", visual={x=32, y=0, w=16, h=17} },
|
||||
{ name="ratpenat", label="ratpenat", visual={x=16, y=64, w=8, h=8} },
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ function me.draw()
|
||||
|
||||
local sel = me.selected
|
||||
view.origin(0,me.pos_y)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
local y = me.pos_y
|
||||
draw.rrectf(1,0,8,8,1,21)
|
||||
draw.rrectf(1,-1,8,8,1,6)
|
||||
|
||||
@@ -30,7 +30,7 @@ function rooms.convert(src)
|
||||
for rx=0,7 do
|
||||
for ty=0,11 do
|
||||
for tx=0,19 do
|
||||
surf.pixel(rx*20+tx, ry*13+ty, surf.pixel(rx*20+tx, ry*12+ty))
|
||||
draw.pixel(rx*20+tx, ry*13+ty, draw.pixel(rx*20+tx, ry*12+ty))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -95,7 +95,7 @@ function rooms.draw()
|
||||
|
||||
-- Pintem el foreground de negre
|
||||
map.surf(rooms.surf_foreground)
|
||||
pal.subpal(0,32,1)
|
||||
pal.subpal(1,32,1)
|
||||
if rooms.is_visible(LAYER_FOREGROUND | LAYER_SHADOWS) then map.draw() end
|
||||
|
||||
-- Pintem els sprites de negre
|
||||
@@ -143,3 +143,8 @@ function rooms.toggle_visibility(layer)
|
||||
rooms.visibility = rooms.visibility | layer
|
||||
end
|
||||
end
|
||||
|
||||
function rooms.go_to_room(room)
|
||||
rooms.pos.x = (room % 8) * 20
|
||||
rooms.pos.y = (room // 8) * 13
|
||||
end
|
||||
|
||||
@@ -6,8 +6,9 @@ score = {
|
||||
font = nil
|
||||
} local me = score
|
||||
|
||||
function me.init()
|
||||
me.points = 0
|
||||
function me.init(reinit)
|
||||
if not reinit then me.points = 0 end
|
||||
me.ypos = 3
|
||||
me.surf = surf.load("gfx/sprites.gif")
|
||||
me.font = font.load("gfx/score_font.fnt")
|
||||
end
|
||||
@@ -45,13 +46,16 @@ local function draw_key(sx,sy,dx,dy)
|
||||
end
|
||||
|
||||
function me.draw()
|
||||
if sprites.hero.state == templates.DEAD then
|
||||
if me.ypos > -100 then me.ypos=me.ypos-1 end
|
||||
end
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
draw_text()
|
||||
|
||||
local y = 3
|
||||
local y = score.ypos
|
||||
if sprites.hero.keys["verda"] then draw_key(16,48,140,y) y=y+8 end
|
||||
if sprites.hero.keys["groga"] then draw_key(16,56,140,y) y=y+8 end
|
||||
if sprites.hero.keys["roja"] then draw_key(32,48,140,y) y=y+8 end
|
||||
|
||||
@@ -5,6 +5,9 @@ sprites = {
|
||||
hero = nil,
|
||||
list = {},
|
||||
pause_ia = false,
|
||||
--initial_pos = { x=28, y=4*13*8+79 }
|
||||
last_safe_room = 0 + 4 * 8,
|
||||
last_safe_pos = { x=28, y=4*13*8+79 }
|
||||
}
|
||||
|
||||
function sprites.remove(sprite)
|
||||
@@ -17,15 +20,15 @@ function sprites.remove(sprite)
|
||||
end
|
||||
end
|
||||
|
||||
function sprites.remove_out_of_room()
|
||||
--print("Current room: "..rooms.current())
|
||||
--for i,v in ipairs(sprites.list) do
|
||||
-- if v.room ~= rooms.current() then
|
||||
-- table.remove(sprites.list, i)
|
||||
-- local room = v.room or 0
|
||||
-- print("Sprite at room "..room.." removed: "..v.type)
|
||||
-- end
|
||||
--end
|
||||
function sprites.save_safe_pos()
|
||||
local room = rooms.current()
|
||||
--local hero_room = (sprites.hero.pos.x//160)*20 + ((sprites.hero.pos.y//104)*12) * 8
|
||||
--if room ~= hero_room then return end
|
||||
if room == sprites.last_safe_room then return end
|
||||
|
||||
sprites.last_safe_room = room
|
||||
sprites.last_safe_pos = {x=sprites.hero.pos.x, y=sprites.hero.pos.y}
|
||||
--print("safepos: " .. sprites.last_safe_pos.x .. ", " .. sprites.last_safe_pos.y)
|
||||
end
|
||||
|
||||
function sprites.add_from_room(rx,ry)
|
||||
@@ -63,6 +66,7 @@ function sprites.init()
|
||||
light_ox = 8,
|
||||
light_oy = 8,
|
||||
cooldown = 0,
|
||||
gun_cooldown = 0,
|
||||
jump_throttle = 0,
|
||||
lives = 4,
|
||||
keys = {},
|
||||
@@ -83,7 +87,9 @@ function sprites.set_animation(sprite, animation)
|
||||
end
|
||||
|
||||
function sprites.update()
|
||||
if not sys.beat() then return end
|
||||
--if not sys.beat() then return end
|
||||
if sys.chrono() < 0.02 then return end
|
||||
sys.chrono(0)
|
||||
|
||||
sprites.update_sprite(sprites.hero)
|
||||
for i,v in ipairs(sprites.list) do
|
||||
@@ -124,6 +130,9 @@ function sprites.lights_out()
|
||||
spr.light = value
|
||||
if finished then
|
||||
spr.light = nil
|
||||
--if sprites.hero.state == templates.DEAD then
|
||||
-- game.restart()
|
||||
--end
|
||||
end
|
||||
end
|
||||
)
|
||||
@@ -134,11 +143,32 @@ function sprites.lights_out()
|
||||
sprites.hero.light = value
|
||||
if finished then
|
||||
sprites.hero.light = nil
|
||||
game.restart()
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function sprites.lights_in()
|
||||
for i,spr in ipairs(sprites.list) do
|
||||
if spr.light then
|
||||
tweening.add(0,spr.light,0.5,easing.linear,
|
||||
function(value,n,finished)
|
||||
spr.light = value
|
||||
end
|
||||
)
|
||||
end
|
||||
end
|
||||
-- tweening.add(sprites.hero.light,0,0.5,easing.linear,
|
||||
-- function(value,n,finished)
|
||||
-- sprites.hero.light = value
|
||||
-- if finished then
|
||||
-- sprites.hero.light = nil
|
||||
-- end
|
||||
-- end
|
||||
-- )
|
||||
end
|
||||
|
||||
function sprites.draw(ignore_selected)
|
||||
if app.update ~= editor.update then
|
||||
surf.target(game.circ_buf)
|
||||
@@ -201,7 +231,7 @@ function sprites.draw_sprite(sprite)
|
||||
end
|
||||
|
||||
function sprites.draw_sprite_selected(sprite)
|
||||
pal.subpal(0,32,28)
|
||||
pal.subpal(1,32,28)
|
||||
|
||||
local cycle = animations[sprite.animation].cycle[sprite.current_frame]
|
||||
local frame = animations[sprite.animation].frames[cycle]
|
||||
|
||||
@@ -2,6 +2,8 @@ ia = {}
|
||||
|
||||
require "ia.*"
|
||||
|
||||
local gota_wait = 1
|
||||
|
||||
templates = {
|
||||
ALIVE = 0,
|
||||
DYING = 1,
|
||||
@@ -42,6 +44,23 @@ function me.create(type, options)
|
||||
animation = "bullet",
|
||||
ia = ia.update_bullet
|
||||
}
|
||||
elseif key == "bullet_particle" then
|
||||
sprite = {
|
||||
type = key,
|
||||
pos = options.pos,--{ x=100, y=4*12*8+71 },
|
||||
dir = options.dir,
|
||||
size = { w=8,h=8 },
|
||||
bbo = { left=2, top=3, right=3, bottom=1 },
|
||||
current_frame = 1,
|
||||
current_wait = 1,
|
||||
flipped = options.flipped,
|
||||
surf = surf.load("gfx/morcus.gif"),
|
||||
animation = "particle",
|
||||
state = me.ALIVE,
|
||||
enemy = true,
|
||||
room = options.room,
|
||||
ia = ia.update_gota_esguit
|
||||
}
|
||||
elseif key == "coin" then
|
||||
sprite = {
|
||||
type = key,
|
||||
@@ -202,13 +221,15 @@ function me.create(type, options)
|
||||
current_wait = 1,
|
||||
flipped = options.flipped,
|
||||
surf = surf.load("gfx/gota.gif"),
|
||||
animation = "gota_generador",
|
||||
animation = "gota",
|
||||
state = me.ALIVE,
|
||||
enemy = true,
|
||||
timer = math.random(0,100),
|
||||
timer = gota_wait,
|
||||
room = options.room,
|
||||
ia = ia.update_gota
|
||||
}
|
||||
gota_wait = gota_wait + 10
|
||||
if gota_wait > 40 then gota_wait = 1 end
|
||||
elseif key == "gota_caiguent" then
|
||||
sprite = {
|
||||
type = key,
|
||||
@@ -242,6 +263,71 @@ function me.create(type, options)
|
||||
room = options.room,
|
||||
ia = ia.update_gota_esguit
|
||||
}
|
||||
elseif key == "berserk" then
|
||||
sprite = {
|
||||
type = key,
|
||||
pos = options.pos,--{ x=100, y=4*12*8+71 },
|
||||
size = { w=16,h=16 },
|
||||
bbo = { left=3, top=2, right=3, bottom=0 },
|
||||
current_frame = 1,
|
||||
current_wait = 1,
|
||||
flipped = options.flipped,
|
||||
surf = surf.load("gfx/berserk.gif"),
|
||||
animation = "mummy_walk",
|
||||
state = me.ALIVE,
|
||||
enemy = true,
|
||||
room = options.room,
|
||||
ia = ia.update_berserk
|
||||
}
|
||||
elseif key == "abad" then
|
||||
sprite = {
|
||||
type = key,
|
||||
pos = options.pos,--{ x=100, y=4*12*8+71 },
|
||||
size = { w=16,h=18 },
|
||||
bbo = { left=3, top=2, right=3, bottom=0 },
|
||||
current_frame = 1,
|
||||
current_wait = 1,
|
||||
flipped = options.flipped,
|
||||
surf = surf.load("gfx/abad.gif"),
|
||||
animation = "abad",
|
||||
state = me.ALIVE,
|
||||
enemy = true,
|
||||
room = options.room,
|
||||
ia = ia.update_coin
|
||||
}
|
||||
elseif key == "dimoni" then
|
||||
sprite = {
|
||||
type = key,
|
||||
pos = options.pos,--{ x=100, y=4*12*8+71 },
|
||||
size = { w=16,h=17 },
|
||||
bbo = { left=3, top=2, right=3, bottom=0 },
|
||||
current_frame = 1,
|
||||
current_wait = 1,
|
||||
flipped = options.flipped,
|
||||
surf = surf.load("gfx/dimoni.gif"),
|
||||
animation = "dimoni_walk",
|
||||
state = me.ALIVE,
|
||||
enemy = true,
|
||||
bulletproof = true,
|
||||
room = options.room,
|
||||
ia = ia.update_dimoni
|
||||
}
|
||||
elseif key == "ratpenat" then
|
||||
sprite = {
|
||||
type = key,
|
||||
pos = options.pos,--{ x=100, y=4*12*8+71 },
|
||||
size = { w=8,h=8 },
|
||||
bbo = { left=1, top=1, right=1, bottom=1 },
|
||||
current_frame = 1,
|
||||
current_wait = 1,
|
||||
flipped = options.flipped,
|
||||
surf = surf.load("gfx/ratpenat.gif"),
|
||||
animation = "ratpenat",
|
||||
state = me.ALIVE,
|
||||
enemy = true,
|
||||
room = options.room,
|
||||
ia = ia.update_ratpenat
|
||||
}
|
||||
else
|
||||
error("Template not recognized")
|
||||
end
|
||||
|
||||
BIN
data/mus/paku_title.ogg
Normal file
BIN
data/snd/laugh.wav
Normal file
BIN
data/snd/thunder.wav
Normal file
@@ -14,6 +14,8 @@ editor = {
|
||||
item_dragged=nil,
|
||||
dragged_start_pos=nil,
|
||||
flip=false,
|
||||
msg=nil,
|
||||
msg_timeout=0,
|
||||
|
||||
enable = function()
|
||||
app.update = editor.update
|
||||
@@ -41,7 +43,7 @@ editor = {
|
||||
-- Pintar el mapa i sprites
|
||||
rooms.draw()
|
||||
|
||||
--view.origin(0,0)
|
||||
|
||||
local mx, my = mouse.pos()
|
||||
local tx, ty = (mx>>3), (my>>3)
|
||||
mx, my = tx<<3, ty<<3
|
||||
@@ -130,19 +132,15 @@ editor = {
|
||||
menu.toggle()
|
||||
elseif key.press(key.RIGHT) and rooms.pos.x < 20*7 then
|
||||
rooms.pos.x = rooms.pos.x + 20
|
||||
sprites.remove_out_of_room()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
elseif key.press(key.LEFT) and rooms.pos.x > 0 then
|
||||
rooms.pos.x = rooms.pos.x - 20
|
||||
sprites.remove_out_of_room()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
elseif key.press(key.DOWN) and rooms.pos.y < 13*7 then
|
||||
rooms.pos.y = rooms.pos.y + 13
|
||||
sprites.remove_out_of_room()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
elseif key.press(key.UP) and rooms.pos.y > 0 then
|
||||
rooms.pos.y = rooms.pos.y - 13
|
||||
sprites.remove_out_of_room()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
elseif key.press(key.TAB) or key.press(key.ESCAPE) then
|
||||
if editor.layer==LAYER_BACKGROUND or editor.layer==LAYER_FOREGROUND then
|
||||
@@ -157,6 +155,18 @@ editor = {
|
||||
editor.play()
|
||||
elseif key.press(key.F11) then
|
||||
reload_textures()
|
||||
elseif key.press(key.N1) then
|
||||
editor.layer=LAYER_FOREGROUND
|
||||
editor.msg="FOREGROUND"
|
||||
editor.msg_timeout = 20
|
||||
elseif key.press(key.N2) then
|
||||
editor.layer=LAYER_BACKGROUND
|
||||
editor.msg="BACKGROUND"
|
||||
editor.msg_timeout = 20
|
||||
elseif key.press(key.N3) then
|
||||
editor.layer=LAYER_ITEMS
|
||||
editor.msg="ITEMS"
|
||||
editor.msg_timeout = 20
|
||||
end
|
||||
|
||||
if editor.layer==LAYER_ITEMS then
|
||||
@@ -185,8 +195,11 @@ editor = {
|
||||
draw.text(rooms.pos.x//20,1,96,28)
|
||||
draw.text(rooms.pos.y//13,5,96,28)
|
||||
|
||||
-- Pintar el menú (el marcador serà en el modul game.lua)
|
||||
--score.draw()
|
||||
if editor.msg_timeout > 0 then
|
||||
editor.msg_timeout = editor.msg_timeout - 1
|
||||
draw.text(editor.msg, 10, 96, 8)
|
||||
end
|
||||
|
||||
menu.draw()
|
||||
|
||||
end,
|
||||
@@ -270,7 +283,7 @@ editor = {
|
||||
surf.source(0)
|
||||
surf.target(editor.tilepicker.surf_back)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
app.push(editor.tilepicker.update_tiles)
|
||||
tweening.add(104,24,0.25,easing.easeOutCubic,function(value,n,finished)editor.tilepicker.pos_y=value end)
|
||||
@@ -284,7 +297,7 @@ editor = {
|
||||
surf.source(editor.tilepicker.surf_back)
|
||||
surf.target(0)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
|
||||
view.origin(8,editor.tilepicker.pos_y)
|
||||
@@ -340,7 +353,7 @@ editor = {
|
||||
surf.source(0)
|
||||
surf.target(editor.itempicker.surf_back)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
app.push(editor.itempicker.update_items)
|
||||
tweening.add(104,24,0.25,easing.easeOutCubic,function(value,n,finished)editor.itempicker.pos_y=value end)
|
||||
@@ -354,7 +367,7 @@ editor = {
|
||||
surf.source(editor.itempicker.surf_back)
|
||||
surf.target(0)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
|
||||
view.origin(8,editor.itempicker.pos_y)
|
||||
@@ -363,7 +376,7 @@ editor = {
|
||||
draw.text("CHOOSE ITEM:",8,2,17)
|
||||
|
||||
view.origin(16,editor.itempicker.pos_y+8-editor.itempicker.scroll)
|
||||
view.clip(16,editor.itempicker.pos_y+8,128,64)
|
||||
surf.clip(16,editor.itempicker.pos_y+8,128,64)
|
||||
|
||||
surf.source(surf_sprites)
|
||||
local mx, my = mouse.pos()
|
||||
@@ -391,7 +404,7 @@ editor = {
|
||||
local lift_y = math.floor(((64-lift_h)*editor.itempicker.scroll)/(y-64))
|
||||
|
||||
view.origin(16,editor.itempicker.pos_y+8)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
draw.rrectf(124,0,5,64,1,17)
|
||||
draw.rrectf(124,lift_y,5,lift_h,1,2)
|
||||
|
||||
@@ -36,6 +36,17 @@ game = {
|
||||
--shader.enable();
|
||||
end,
|
||||
|
||||
restart = function()
|
||||
--rooms.reload()
|
||||
ia.hero_reset()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
pal.set(palfade.original)
|
||||
sprites.hero.light = 0
|
||||
tweening.add(0,100,1,easing.linear,function(value,n,finished)sprites.hero.light = value end)
|
||||
sprites.lights_in()
|
||||
score.init(true)
|
||||
end,
|
||||
|
||||
update = function()
|
||||
game.water_counter = game.water_counter + 0.05
|
||||
|
||||
@@ -49,7 +60,7 @@ game = {
|
||||
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
surf.target(game.back_buf)
|
||||
|
||||
@@ -62,13 +73,20 @@ game = {
|
||||
|
||||
score.draw()
|
||||
|
||||
view.origin(0,0)
|
||||
draw.text("safe: "..sprites.last_safe_room,1,96,28)
|
||||
--draw.text(sprites.hero.pos.x ..","..sprites.hero.pos.y,14,89,28)
|
||||
|
||||
if key.press(key.ESCAPE) or key.press(key.F9) then
|
||||
rooms.reload()
|
||||
sprites.add_from_room(rooms.pos.x, rooms.pos.y)
|
||||
ia.hero_reset()
|
||||
editor.enable()
|
||||
elseif key.press(key.GRAVE) then
|
||||
console.enable()
|
||||
end
|
||||
|
||||
draw.text(sys.fps(),2,20,8)
|
||||
end,
|
||||
|
||||
change_room = function(x,y)
|
||||
@@ -86,7 +104,7 @@ game = {
|
||||
--if not sys.beat() then return end
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
surf.target(game.back_buf)
|
||||
--view.clip()
|
||||
@@ -106,7 +124,6 @@ game = {
|
||||
|
||||
game.chg_step = game.chg_step - 1
|
||||
if game.chg_step == 0 then
|
||||
sprites.remove_out_of_room()
|
||||
sprites.pause_ia = false
|
||||
app.pop()
|
||||
--sys.beat(2)
|
||||
@@ -130,9 +147,9 @@ game = {
|
||||
surf.source(game.back_buf)
|
||||
for x=0,159 do
|
||||
local water_level = math.sin(game.water_counter)*2
|
||||
for y=88+water_level,103 do
|
||||
local pixel = surf.pixel(x,y)
|
||||
surf.pixel(x,y,game.water_pal[pixel+1])
|
||||
for y=88+water_level,104 do
|
||||
local pixel = draw.pixel(x,y)
|
||||
draw.pixel(x,y,game.water_pal[pixel+1])
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -148,15 +165,15 @@ game = {
|
||||
for y=0,103 do
|
||||
for x=0,159 do
|
||||
surf.source(game.back_buf)
|
||||
local pixel = surf.pixel(x,y)
|
||||
local pixel = draw.pixel(x,y)
|
||||
surf.source(game.circ_buf)
|
||||
local light = surf.pixel(x,y)
|
||||
local light = draw.pixel(x,y)
|
||||
if light==0 then
|
||||
surf.pixel(x,y,1)
|
||||
draw.pixel(x,y,1)
|
||||
elseif (light&2)==2 then
|
||||
surf.pixel(x,y,pixel)
|
||||
draw.pixel(x,y,pixel)
|
||||
else
|
||||
surf.pixel(x,y,game.fade_pal[pixel+1])
|
||||
draw.pixel(x,y,game.fade_pal[pixel+1])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
107
data/stages/titles.lua
Normal file
@@ -0,0 +1,107 @@
|
||||
titles = {
|
||||
pharao = nil,
|
||||
jailgames = nil,
|
||||
jgmummy = nil,
|
||||
}
|
||||
|
||||
local sndLaugh, sndThunder
|
||||
local musTitles
|
||||
|
||||
function titles.lightning_step1()
|
||||
pal.subpal(29,1)
|
||||
pal.subpal(4,1)
|
||||
pal.subpal(6,1)
|
||||
pal.subpal(4,1)
|
||||
pal.subpal(21,28)
|
||||
pal.subpal(22,28)
|
||||
pal.subpal(26,28)
|
||||
surf.source(titles.pharao)
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
pal.subpal()
|
||||
|
||||
surf.source(titles.jailgames)
|
||||
draw.surf(0,0,98,14,31,49)
|
||||
end
|
||||
|
||||
function titles.lightning_step2()
|
||||
pal.subpal(29,28)
|
||||
pal.subpal(4,28)
|
||||
pal.subpal(6,28)
|
||||
pal.subpal(4,28)
|
||||
pal.subpal(1,28)
|
||||
pal.subpal(21,1)
|
||||
pal.subpal(22,1)
|
||||
pal.subpal(26,1)
|
||||
pal.subpal(28,1)
|
||||
surf.source(titles.pharao)
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
surf.source(titles.jailgames)
|
||||
draw.surf(0,0,98,14,31,49)
|
||||
pal.subpal()
|
||||
end
|
||||
|
||||
|
||||
local dt = 0
|
||||
function titles.enable()
|
||||
app.update = titles.update
|
||||
titles.pharao = surf.load("gfx/titles/pharao.gif")
|
||||
titles.jailgames = surf.load("gfx/titles/jailgames.gif")
|
||||
titles.jgmummy = surf.load("gfx/titles/jgmummy.gif")
|
||||
surf.target(surf.SCREEN)
|
||||
sndLaugh = sound.load("snd/laugh.wav")
|
||||
sndThunder = sound.load("snd/thunder.wav")
|
||||
music.play("mus/paku_title.ogg", 0)
|
||||
dt = sys.time()
|
||||
end
|
||||
|
||||
function titles.update()
|
||||
surf.source(titles.jailgames)
|
||||
draw.surf(0,0,98,14,31,49)
|
||||
if sys.time()-dt > 4 then
|
||||
app.update = titles.step2
|
||||
dt = sys.time()
|
||||
sound.play(sndThunder)
|
||||
sound.play(sndLaugh)
|
||||
end
|
||||
end
|
||||
|
||||
function titles.step2()
|
||||
titles.lightning_step1()
|
||||
if sys.time()-dt > 0.1 then
|
||||
app.update = titles.step3
|
||||
dt = sys.time()
|
||||
end
|
||||
end
|
||||
|
||||
function titles.step3()
|
||||
surf.cls(28)
|
||||
if sys.time()-dt > 0.1 then
|
||||
app.update = titles.step4
|
||||
dt = sys.time()
|
||||
end
|
||||
end
|
||||
|
||||
function titles.step4()
|
||||
titles.lightning_step2()
|
||||
if sys.time()-dt > 0.1 then
|
||||
app.update = titles.step5
|
||||
dt = sys.time()
|
||||
end
|
||||
end
|
||||
|
||||
function titles.step5()
|
||||
surf.cls(28)
|
||||
if sys.time()-dt > 0.1 then
|
||||
app.update = titles.step6
|
||||
dt = sys.time()
|
||||
end
|
||||
end
|
||||
|
||||
function titles.step6()
|
||||
surf.source(titles.pharao)
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
surf.source(titles.jgmummy)
|
||||
draw.surf(0,0,112,22,24,45)
|
||||
--titles.lightning_step1()
|
||||
--app.update = titles.step7
|
||||
end
|
||||
@@ -30,7 +30,7 @@ end
|
||||
function me.update()
|
||||
local top = (160-me.w)//2
|
||||
local left = (104-me.h)//2
|
||||
view.clip(top, left, me.w, me.h)
|
||||
surf.clip(top, left, me.w, me.h)
|
||||
view.origin(top, left)
|
||||
draw.rrectf(0,0,me.w, me.h,4,27)
|
||||
|
||||
|
||||
BIN
drafts/cover.png
Normal file
|
After Width: | Height: | Size: 554 KiB |
BIN
drafts/full_logo.png
Normal file
|
After Width: | Height: | Size: 1.5 MiB |
BIN
drafts/jailgames_composition.aseprite
Normal file
35
paku.pal
Normal file
@@ -0,0 +1,35 @@
|
||||
JASC-PAL
|
||||
0100
|
||||
32
|
||||
0 0 0
|
||||
0 0 0
|
||||
96 57 19
|
||||
79 43 36
|
||||
42 35 73
|
||||
125 56 64
|
||||
50 83 95
|
||||
115 99 87
|
||||
255 0 0
|
||||
130 91 49
|
||||
138 101 59
|
||||
162 125 81
|
||||
193 108 91
|
||||
123 178 78
|
||||
251 205 26
|
||||
153 134 117
|
||||
152 135 119
|
||||
197 145 84
|
||||
205 158 112
|
||||
232 153 115
|
||||
240 189 119
|
||||
65 128 160
|
||||
116 173 187
|
||||
190 187 178
|
||||
199 176 158
|
||||
251 223 155
|
||||
198 194 195
|
||||
255 249 228
|
||||
254 255 255
|
||||
28 23 48
|
||||
33 10 13
|
||||
26 26 17
|
||||