CLI setting -record-only

This commit is contained in:
Zeno Rogue 2019-06-11 10:20:21 +02:00
parent 6185ed674e
commit 47d8255b8a
1 changed files with 8 additions and 0 deletions

View File

@ -692,10 +692,13 @@ void rollback() {
#if CAP_FILES && CAP_SHOT
string animfile = "animation-%04d.png";
int min_frame = 0, max_frame = 999999;
bool record_animation() {
lastticks = 0;
ticks = 0;
for(int i=0; i<noframes; i++) {
if(i < min_frame || i > max_frame) continue;
printf("%d/%d\n", i, noframes);
int newticks = i * period / noframes;
cmode = (env_shmup ? sm::NORMAL : 0);
@ -985,6 +988,11 @@ int readArgs() {
PHASE(3); shift(); noframes = argi();
shift(); animfile = args(); record_animation();
}
else if(argis("-record-only")) {
PHASEFROM(2);
shift(); min_frame = argi();
shift(); max_frame = argi();
}
#endif
else if(argis("-animcircle")) {
PHASE(3); start_game();