From 979e093e6d2a0c646b2be7f8422cfe599bf0873e Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Sun, 18 Feb 2024 21:15:17 -0800 Subject: [PATCH] consent and start game beeps --- vacation.p8 | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/vacation.p8 b/vacation.p8 index 16cbcf3..1f9adde 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -1096,15 +1096,26 @@ mknew(consent_splash, function(self) end) function consent_splash:u() - if (self.f < 0x7fff) self.f += 1 - if (btnp(1) and self.f > 150) self.d.di = 1 + local f = self.f + 1 + 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) + 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) + self.f=f end function consent_splash:draw() + self:dtx() + self.d:draw() +end + +function consent_splash:dtx() cls() font_special() print("\^w\^twarning", 20, 2, 10) @@ -1130,7 +1141,6 @@ function consent_splash:draw() print("") print("") print(" consent and begin: \f7➡️") - self.d:draw() end -->8 @@ -1185,13 +1195,16 @@ end function title_screen:u() self.a.wordwait=999 - if btnp(1) and self.a.wordremain ~= 0 then + if btnp(1) and self.a.wordremain ~= 0 and not self.pp then self.a.wordremain=0 + self.pp=true create_game() + psound(11,0,16) end self.a:u() end -->8 +-->8 -- dolphin sprite renderer phinstate_nrm = { @@ -2429,4 +2442,5 @@ __sfx__ 001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 010800002b5452b5002b5002b500005000050000500275001c535245351a50001500005000050000500005003055024555187301f730137301373013720137100750007500075000750000500005000050000500 011000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -480c00002b53518545305503054030530305203051000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500 +480c00002b53518045305503054030530305203051000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500 +290800000c5751f575245750c5551f555245550c5351f535245350c5151f515245150050500505005050050500505005050050500505005050050500505005050050500505005050050500505005050050500505