mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-18 15:00:26 +00:00
CLI setting -record-only
This commit is contained in:
parent
6185ed674e
commit
47d8255b8a
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user