Browse Source

change B to match orcaJS 158

master
Nicola Pisanti 5 years ago
parent
commit
50d1c1cc74
  1. 18
      sim.c

18
sim.c

@ -431,18 +431,12 @@ BEGIN_OPERATOR(bounce)
PORT(0, -1, IN | PARAM); PORT(0, -1, IN | PARAM);
PORT(0, 1, IN); PORT(0, 1, IN);
PORT(1, 0, OUT); PORT(1, 0, OUT);
Usz rate = index_of(PEEK(0, -1)); Isz a = (Isz)index_of(PEEK(0, -1));
Usz to = index_of(PEEK(0, 1)); Isz b = (Isz)index_of(PEEK(0, 1));
if (rate == 0) Isz val = b - a;
rate = 1; if (val < 0)
if (to == 0) val = -val;
to = 8; POKE(1, 0, glyph_of((Usz)val));
to = to - 1;
Usz key = (Tick_number / rate) % (to * 2);
if (key > to)
key = to - (key - to);
Glyph g = glyph_of(key);
POKE(1, 0, g);
END_OPERATOR END_OPERATOR
BEGIN_OPERATOR(clock) BEGIN_OPERATOR(clock)

Loading…
Cancel
Save