diff --git a/vacation.p8 b/vacation.p8 index c6e424e..66e273a 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -418,7 +418,7 @@ function zonk_txt(s, x, y, p, md, amt, frms) md = md or 0x80 frms = frms or 0 amt = amt or 0 - local itv = (frms>>2)&0x7ff + local itv = (frms>>2)&0x7fff local t1 = txtbox.new{ x=x+1, y=y+1, @@ -1386,7 +1386,7 @@ end function toyphin:draw() local st, y = self.state, self.y if (st.idle) y += wave() - spr(st.s[1+(((t()<<1)&0x0.FFFF*#st.s)&0x7FFF)], self.x + st.xo, y + st.yo, self.state.ws, self.state.hs) + spr(st.s[1+(((t()<<1)&0x0.ffff*#st.s)&0x7fff)], self.x + st.xo, y + st.yo, self.state.ws, self.state.hs) end -->8 @@ -1596,14 +1596,14 @@ function arcade_level:spawn_word() if not self.pattern then self.pattern=gen_pattern() self.pattern_idx = 0 - self.next_break = 9 + flr(rnd(9)) + self.next_break = 9 + irnd(9) end local i, pbk = (self.pattern_idx&3)+1,0 if self.next_break == 0 then -- do pattern break local np = gen_pattern() i = np[1]==self.pattern[i] and 2 or 1 - self.next_break = 9 + flr(rnd(9)) + self.next_break = 9 + irnd(9) pbk=3 end self.pattern_idx = i @@ -1611,7 +1611,7 @@ function arcade_level:spawn_word() local row = self.pattern[i] self.words:push_back(wordtarget.new{ - y=32*row+flr(rnd(13))-6, + y=32*row+irnd(13)-6, phin=self.phin, on_hit = function(word) self:word_hit(word) @@ -1642,14 +1642,14 @@ function arcade_level:next_row() if not self.pattern then self.pattern=gen_pattern() self.pattern_idx = 0 - self.next_break = 9 + flr(rnd(9)) + self.next_break = 9 + irnd(9) end local i, pbk = (self.pattern_idx&3)+1,0 if self.next_break == 0 then -- do pattern break local np = gen_pattern() i = np[1]==self.pattern[i] and 2 or 1 - self.next_break = 9 + flr(rnd(9)) + self.next_break = 9 + irnd(9) pbk=3 end self.pattern_idx = i