(framecount を 10 で割って) それの 4で割った余り 0〜3 の値になる

framecount
0〜 9 → 0
10〜19 → 1
20〜29 → 2
30〜39 → 3
40〜49 → 0
50〜59 → 1
: