mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-17 18:54:48 +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
|
#if CAP_FILES && CAP_SHOT
|
||||||
string animfile = "animation-%04d.png";
|
string animfile = "animation-%04d.png";
|
||||||
|
|
||||||
|
int min_frame = 0, max_frame = 999999;
|
||||||
|
|
||||||
bool record_animation() {
|
bool record_animation() {
|
||||||
lastticks = 0;
|
lastticks = 0;
|
||||||
ticks = 0;
|
ticks = 0;
|
||||||
for(int i=0; i<noframes; i++) {
|
for(int i=0; i<noframes; i++) {
|
||||||
|
if(i < min_frame || i > max_frame) continue;
|
||||||
printf("%d/%d\n", i, noframes);
|
printf("%d/%d\n", i, noframes);
|
||||||
int newticks = i * period / noframes;
|
int newticks = i * period / noframes;
|
||||||
cmode = (env_shmup ? sm::NORMAL : 0);
|
cmode = (env_shmup ? sm::NORMAL : 0);
|
||||||
@ -985,6 +988,11 @@ int readArgs() {
|
|||||||
PHASE(3); shift(); noframes = argi();
|
PHASE(3); shift(); noframes = argi();
|
||||||
shift(); animfile = args(); record_animation();
|
shift(); animfile = args(); record_animation();
|
||||||
}
|
}
|
||||||
|
else if(argis("-record-only")) {
|
||||||
|
PHASEFROM(2);
|
||||||
|
shift(); min_frame = argi();
|
||||||
|
shift(); max_frame = argi();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
else if(argis("-animcircle")) {
|
else if(argis("-animcircle")) {
|
||||||
PHASE(3); start_game();
|
PHASE(3); start_game();
|
||||||
|
Loading…
Reference in New Issue
Block a user