1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-24 05:17:17 +00:00

anim:: CLI animation record functions now accept 0 which means use the current value

This commit is contained in:
Zeno Rogue 2022-10-11 20:02:20 +02:00
parent 6ac17b31f1
commit 7f0bf3b269

View File

@ -1759,11 +1759,11 @@ int readArgs() {
} }
#if CAP_SHOT #if CAP_SHOT
else if(argis("-animrecordf")) { else if(argis("-animrecordf")) {
PHASEFROM(2); shift(); noframes = argi(); PHASEFROM(2); shift(); noframes = argi() ? argi() : noframes;
shift(); animfile = args(); shift(); animfile = args();
} }
else if(argis("-animrecord") || argis("-animrec")) { else if(argis("-animrecord") || argis("-animrec")) {
PHASE(3); shift(); noframes = argi(); PHASE(3); shift(); noframes = argi() ? argi() : noframes;
shift(); animfile = args(); record_animation(); shift(); animfile = args(); record_animation();
} }
else if(argis("-record-only")) { else if(argis("-record-only")) {
@ -1775,7 +1775,7 @@ int readArgs() {
#if CAP_VIDEO #if CAP_VIDEO
else if(argis("-animvideo")) { else if(argis("-animvideo")) {
start_game(); start_game();
PHASE(3); shift(); noframes = argi(); PHASE(3); shift(); noframes = argi() ? argi() : noframes;
shift(); videofile = args(); record_video(); shift(); videofile = args(); record_video();
} }
#endif #endif