feat: add support for stepping PSO iterations

Pressing ',' will now step entire PSO iterations, while '.' will step only
individual frames.
This commit is contained in:
dvdrw 2024-11-25 15:00:18 +01:00
parent 264f381306
commit c4ef11f38e
Signed by: dvdrw
GPG Key ID: 3ED4E5A371C20DD7

View File

@ -111,6 +111,14 @@ main(int argc, char **argv) {
case ' ':
pause = !pause;
break;
case ',':
for(int j = 0; j < kFPS/4; ++j) {
swarm.move(kDT * 4);
if(i % (kFPS/4) == (kFPS/4)-1)
swarm.step();
++i;
}
case '.':
pause = false;
frame_step = true;
@ -168,8 +176,8 @@ main(int argc, char **argv) {
case 'h':
printf(" movement zoom coloring pause step \n"
" W i I K SPC . \n"
" ASD o O L \n"
" W io IK LO SPC ., \n"
" ASD \n"
" quit: q \n");
break;
}