Browse Source

Fix ordering of gbuffer reads in `C` operator

master
cancel 6 years ago
parent
commit
8982892c90
  1. 6
      sim.c

6
sim.c

@ -448,12 +448,12 @@ BEGIN_OPERATOR(clock)
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 mod_num = index_of(PEEK(0, 1));
Usz rate = index_of(PEEK(0, -1)); Usz rate = index_of(PEEK(0, -1));
if (mod_num == 0) Usz mod_num = index_of(PEEK(0, 1));
mod_num = 10;
if (rate == 0) if (rate == 0)
rate = 1; rate = 1;
if (mod_num == 0)
mod_num = 10;
Glyph g = glyph_of(Tick_number / rate % mod_num); Glyph g = glyph_of(Tick_number / rate % mod_num);
POKE(1, 0, g); POKE(1, 0, g);
END_OPERATOR END_OPERATOR

Loading…
Cancel
Save