From f4e102009c0857feeed093a62cef96d91fecdc33 Mon Sep 17 00:00:00 2001 From: Kistaro Windrider Date: Fri, 16 Feb 2024 18:01:29 -0800 Subject: [PATCH] fix dist/wait confusion; slow end of sentence --- vacation.p8 | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/vacation.p8 b/vacation.p8 index 0b8b498..84ee446 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -802,13 +802,20 @@ function zonk_mode:next_item() self.cx += self.spc_full token = tostr(deli(self.line, 1)) end - local pp,cmult=nrm_txt_pal,1 + local pp=nrm_txt_pal,1 if (token[1]==">") token,self.cx=sub(token,2),self.cx+self.spc_full\2 if (token[1]=="!") token,pp=sub(token,2),sfd_txt_pal if (token[1]=="#") token,pp=sub(token,2),hlt_txt_pal - local ret = zonk_txt(token,self.cx,self.cy,pp,self.txmd,self.txf,self.txd*cmult) + local ret = zonk_txt(token,self.cx,self.cy,pp,self.txmd,self.txd,self.txf) self.cx = ret.eff_w+self.spc_full - return ret + return ret, fbw * twmul(token) +end + +punct = {["."]=2, ["?"]=2, ["!"]=2} +-- token wait multiplier +function twmul(s) + if (punct[s[#s]]) return 2 + return 1 end function zonk_mode:empty()