bad splashy sounds

also simplify psound
This commit is contained in:
Kistaro Windrider 2024-02-18 22:38:33 -08:00
parent 979e093e6d
commit 1aef8a5c51
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -275,10 +275,8 @@ end
-- play sound n on channel 3 iff -- play sound n on channel 3 iff
-- 3 doesn't already have a -- 3 doesn't already have a
-- greater index sound going. -- greater index sound going.
-- rb forces reverb function psound(n, off, len)
function psound(n, off, len, rb)
if (stat(49) > n) return if (stat(49) > n) return
poke(0x5f41, rb and 0x8 or 0x0)
sfx(n, 3, off, len) sfx(n, 3, off, len)
end end
@ -844,11 +842,11 @@ function zonk_mode:u()
if not item then if not item then
if (not self.file or #self.file == 0) self:nf() if (not self.file or #self.file == 0) self:nf()
self.px=false self.px=false
if (not self.cf) psound(8,8,2) if (not self.cf) psound(9,8,2)
else else
self.txt_frame:push(item) self.txt_frame:push(item)
self.twt = wt*self.cmul self.twt = wt*self.cmul
psound(8,0,4,self.txf>1) psound(self.txf > 1 and 8 or 9,0,4)
end end
end end
else else
@ -861,9 +859,9 @@ function zonk_mode:u()
self.txt_frame.go = true self.txt_frame.go = true
self.fpfrm = self.exf self.fpfrm = self.exf
self.awm=true self.awm=true
if (not self.ac) psound(8, justc and 16 or 18, 8, true) if (not self.ac) psound(8, justc and 16 or 18, 8)
end end
if (justc and not self.nxp) psound(8,16,2, true) if (justc and not self.nxp) psound(8,16,2)
else else
self.twt -= 1 self.twt -= 1
end end
@ -1100,13 +1098,13 @@ function consent_splash:u()
if (f < 0) f = 0x7fff if (f < 0) f = 0x7fff
if btnp(1) and f > 150 and self.d.di~=1 then if btnp(1) and f > 150 and self.d.di~=1 then
self.d.di = 1 self.d.di = 1
psound(8,16,8,true) psound(9,16,8)
end end
if self.d:u() and self.d.di > 0 then if self.d:u() and self.d.di > 0 then
mainview=newtitle() mainview=newtitle()
mainview:u() mainview:u()
end end
if (f == 1 or f==45 or f==90) psound(8,0,4) if (f == 1 or f==45 or f==90) psound(9,0,4)
self.f=f self.f=f
end end
@ -1305,10 +1303,10 @@ function toyphin:u()
if self.entered and not self.exiting then if self.entered and not self.exiting then
if y >= 61 and y <= 67 then if y >= 61 and y <= 67 then
if (btn(2)) and dy < 1 then if (btn(2)) and dy < 1 then
splash:jump_splash(x) splash:surfacing_splash(x, 3.8, true)
dy=-3.8 dy=-3.8
elseif (btn(3)) and dy > -1 then elseif (btn(3)) and dy > -1 then
splash:dive_splash(x) splash:landing_splash(x, 3.8, true)
dy=3.8 dy=3.8
end end
else else
@ -1641,26 +1639,17 @@ function arcade_level:draw_splash(x, force)
end end
end end
function arcade_level:dive_splash(x)
-- TODO: sfx, vfx for dive input
self:draw_splash(x, 3.8)
end
function arcade_level:jump_splash(x)
-- TODO: sfx, vfx for jump input
self:draw_splash(x, 3.8)
end
function arcade_level:surfacing_splash(x, force, harder) function arcade_level:surfacing_splash(x, force, harder)
-- TODO: sfx, vfx for surfacing from a dive -- TODO: sfx, vfx for surfacing from a dive
if (force > 1) psound(harder and 13 or 12, harder and 16 or 0, 16)
self:draw_splash(x, force) self:draw_splash(x, force)
end end
function arcade_level:landing_splash(x, force, harder) function arcade_level:landing_splash(x, force, harder)
-- TODO: sfx, vfx for landing from a jump -- TODO: sfx, vfx for landing from a jump
if (force > 1) psound(harder and 13 or 12, 0, 16)
self:draw_splash(x, force) self:draw_splash(x, force)
end end
splashcols = {0x1003, 0x103d.a5a5} splashcols = {0x1003, 0x103d.a5a5}
droplet = {} droplet = {}
mknew(droplet, function(d) mknew(droplet, function(d)
@ -2440,7 +2429,10 @@ __sfx__
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
010800002b5452b5002b5002b500005000050000500275001c535245351a50001500005000050000500005003055024555187301f730137301373013720137100750007500075000750000500005000050000500 310800002b5452b5002b5002b500005000050000500275001c535245351a50001500005000050000500005003055024555187301f730137301373013720137100750007500075000750000500005000050000500
011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 010800002b545000000000000000000000000000000000001c535245350000000000000000000000000000003055024555187301f730137301373013720137100000000000000000000000000000000000000000
480c00002b53518045305503054030530305203051000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500 480c00002b53518045305503054030530305203051000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500
290800000c5751f575245750c5551f555245550c5351f535245350c5151f515245150050500505005050050500505005050050500505005050050500505005050050500505005050050500505005050050500505 290800000c5751f575245750c5551f555245550c5351f535245350c5151f515245150050500505005050050500505005050050500505005050050500505005050050500505005050050500505005050050500505
01030000016100d6111c61131611146110c6110861105611026150160100004000040000400004000040000400004000040000400004000040000400004000040000400004000040000400004000040000400000
010300002762022621206211b6211661115611116110d6110b611076110561103611026110261102610026103162029621236111e6111961114611106110d6110b61109611076110661005610046130361303613
010300003163029620236101e6101961014610106100d6100b6100961007610066100561004613036130361300605006050060500605006050060500605006050060500605006050060500000000000000000000