From 1aef8a5c51fa049ab44629faa247fe941a6dba69 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 18 Feb 2024 22:38:33 -0800 Subject: [PATCH] bad splashy sounds also simplify psound --- vacation.p8 | 40 ++++++++++++++++------------------------ 1 file changed, 16 insertions(+), 24 deletions(-) diff --git a/vacation.p8 b/vacation.p8 index 1f9adde..fa7b7cc 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -275,10 +275,8 @@ end -- play sound n on channel 3 iff -- 3 doesn't already have a -- greater index sound going. --- rb forces reverb -function psound(n, off, len, rb) +function psound(n, off, len) if (stat(49) > n) return - poke(0x5f41, rb and 0x8 or 0x0) sfx(n, 3, off, len) end @@ -844,11 +842,11 @@ function zonk_mode:u() if not item then if (not self.file or #self.file == 0) self:nf() self.px=false - if (not self.cf) psound(8,8,2) + if (not self.cf) psound(9,8,2) else self.txt_frame:push(item) self.twt = wt*self.cmul - psound(8,0,4,self.txf>1) + psound(self.txf > 1 and 8 or 9,0,4) end end else @@ -861,9 +859,9 @@ function zonk_mode:u() self.txt_frame.go = true self.fpfrm = self.exf 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 - if (justc and not self.nxp) psound(8,16,2, true) + if (justc and not self.nxp) psound(8,16,2) else self.twt -= 1 end @@ -1100,13 +1098,13 @@ function consent_splash:u() if (f < 0) f = 0x7fff if btnp(1) and f > 150 and self.d.di~=1 then self.d.di = 1 - psound(8,16,8,true) + psound(9,16,8) end if self.d:u() and self.d.di > 0 then mainview=newtitle() mainview:u() 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 end @@ -1305,10 +1303,10 @@ function toyphin:u() if self.entered and not self.exiting then if y >= 61 and y <= 67 then if (btn(2)) and dy < 1 then - splash:jump_splash(x) + splash:surfacing_splash(x, 3.8, true) dy=-3.8 elseif (btn(3)) and dy > -1 then - splash:dive_splash(x) + splash:landing_splash(x, 3.8, true) dy=3.8 end else @@ -1641,26 +1639,17 @@ function arcade_level:draw_splash(x, force) 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) -- 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) end function arcade_level:landing_splash(x, force, harder) -- TODO: sfx, vfx for landing from a jump + if (force > 1) psound(harder and 13 or 12, 0, 16) self:draw_splash(x, force) end - splashcols = {0x1003, 0x103d.a5a5} droplet = {} mknew(droplet, function(d) @@ -2440,7 +2429,10 @@ __sfx__ 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -010800002b5452b5002b5002b500005000050000500275001c535245351a50001500005000050000500005003055024555187301f730137301373013720137100750007500075000750000500005000050000500 -011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +310800002b5452b5002b5002b500005000050000500275001c535245351a50001500005000050000500005003055024555187301f730137301373013720137100750007500075000750000500005000050000500 +010800002b545000000000000000000000000000000000001c535245350000000000000000000000000000003055024555187301f730137301373013720137100000000000000000000000000000000000000000 480c00002b53518045305503054030530305203051000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500 290800000c5751f575245750c5551f555245550c5351f535245350c5151f515245150050500505005050050500505005050050500505005050050500505005050050500505005050050500505005050050500505 +01030000016100d6111c61131611146110c6110861105611026150160100004000040000400004000040000400004000040000400004000040000400004000040000400004000040000400004000040000400000 +010300002762022621206211b6211661115611116110d6110b611076110561103611026110261102610026103162029621236111e6111961114611106110d6110b61109611076110661005610046130361303613 +010300003163029620236101e6101961014610106100d6100b6100961007610066100561004613036130361300605006050060500605006050060500605006050060500605006050060500000000000000000000