guitar intro

This commit is contained in:
James Turk 2023-04-09 20:23:16 -05:00
parent a87789d122
commit 7e06fb57bc

View File

@ -114,7 +114,11 @@ tangle = 0
tbody = { tbody = {
} -- array of items in body } -- array of items in body
pieces = 1 pieces = 1
last_guitar = 0
MAX_PIECES = 200 MAX_PIECES = 200
GUITAR_DURATION = 0.5
GUITAR_COOLDOWN = 2
function toomgis_radius() function toomgis_radius()
return 8 + (pieces / MAX_PIECES) * 40 return 8 + (pieces / MAX_PIECES) * 40
@ -246,6 +250,9 @@ function level_draw()
end end
toomgis_draw(20, 96-py) toomgis_draw(20, 96-py)
if time() - last_guitar < GUITAR_DURATION then
spr(35, 20, 104-py, 2, 2)
end
-- draw item shadows -- draw item shadows
shadow_pal() shadow_pal()
@ -333,6 +340,8 @@ function level_upd()
elseif vx > 3 then elseif vx > 3 then
vx = 3 vx = 3
end end
-- jump
if btnp(❎) and py == 0 then if btnp(❎) and py == 0 then
yacc = 6 yacc = 6
elseif py > 0 then elseif py > 0 then
@ -343,6 +352,14 @@ function level_upd()
vy = 0 vy = 0
end end
-- guitar
local guitar_elapsed = time() - last_guitar
if btnp(🅾️) and guitar_elapsed > GUITAR_COOLDOWN then
last_guitar = time()
-- now with three amazing jams
sfx(rnd({14,15,16}))
end
-- check for falling off back of screen and player collision -- check for falling off back of screen and player collision
for item in all(items) do for item in all(items) do
if item.x < px then if item.x < px then
@ -623,7 +640,10 @@ __sfx__
081400002375220752217521e7521f7521c7521d7521a7521b75218752197521775217752157521375213752117521275210752107520e7520e7520b7520c752097520a752077520875207752067520575205752 081400002375220752217521e7521f7521c7521d7521a7521b75218752197521775217752157521375213752117521275210752107520e7520e7520b7520c752097520a752077520875207752067520575205752
30100000002000225202200022520220002252042520b2000225204252092520b20002252042520925209200022000e252022000e252022000e25210252092000e25210252152520b2000e252102521525200200 30100000002000225202200022520220002252042520b2000225204252092520b20002252042520925209200022000e252022000e252022000e25210252092000e25210252152520b2000e252102521525200200
081400002315220152211521e1521f1521c1521d1521a1521b15218152191521715217152151521315213152111521215210152101520e1520e1520b1520c152091520a152071520815207152061520515205152 081400002315220152211521e1521f1521c1521d1521a1521b15218152191521715217152151521315213152111521215210152101520e1520e1520b1520c152091520a152071520815207152061520515205152
091400002345120451214511e4511f4511c4511d4511a4511b45118451194511745117451154511345113451114511245110451104510e4510e4510b4510c451094510a451074510845107451064510545105451 081400002345120451214511e4511f4511c4511d4511a4511b45118451194511745117451154511345113451114511245110451104510e4510e4510b4510c451094510a451074510845107451064510545105451
660400000f1611316118161131610f1610f16116161181611b1611b1611616111161131611b1611f161221611d1611b161181611d1612216124161241611f1611b1611f161271612916127161221611d16122161
60040000071410a1410a141071410a1410c1410c1410a1410c1410f1410f1410c141071410a1410a141071410a1410c1410c1410a1410a1410c1410c1410a141071410a1410a14107141071410a1410a14107141
600400000925200252042520225207252092520025204252022520725209252002520425202252072520925200252042520225207252092520025204252022520725209252002520425202252092520025210252
__music__ __music__
01 01424344 01 01424344
00 01024344 00 01024344
@ -633,4 +653,8 @@ __music__
00 0a0c4d44 00 0a0c4d44
00 0a0c0d44 00 0a0c0d44
02 0d0c4d44 02 0d0c4d44
00 41424344
00 41424344
00 0f105044
02 4f4f5044