fix dist/wait confusion; slow end of sentence

This commit is contained in:
Kistaro Windrider 2024-02-16 18:01:29 -08:00
parent a9f93cb8f5
commit f4e102009c
Signed by: kistaro
SSH Key Fingerprint: SHA256:TBE2ynfmJqsAf0CP6gsflA0q5X5wD5fVKWPsZ7eVUg8

View File

@ -802,13 +802,20 @@ function zonk_mode:next_item()
self.cx += self.spc_full self.cx += self.spc_full
token = tostr(deli(self.line, 1)) token = tostr(deli(self.line, 1))
end 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,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),sfd_txt_pal
if (token[1]=="#") token,pp=sub(token,2),hlt_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 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 end
function zonk_mode:empty() function zonk_mode:empty()