mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-22 01:17:39 +00:00
a flag to check whether we are recording a video
This commit is contained in:
@@ -1392,10 +1392,13 @@ EX hookset<void(int, int)> hooks_record_anim;
|
|||||||
|
|
||||||
EX int record_frame_id = -1;
|
EX int record_frame_id = -1;
|
||||||
|
|
||||||
|
EX bool recording_video;
|
||||||
|
|
||||||
EX bool record_animation_of(reaction_t content) {
|
EX bool record_animation_of(reaction_t content) {
|
||||||
lastticks = 0;
|
lastticks = 0;
|
||||||
ticks = 0;
|
ticks = 0;
|
||||||
int oldturn = -1;
|
int oldturn = -1;
|
||||||
|
dynamicval<bool> rv(recording_video, true);
|
||||||
for(int i=0; i<noframes; i++) {
|
for(int i=0; i<noframes; i++) {
|
||||||
record_frame_id = i;
|
record_frame_id = i;
|
||||||
if(i < min_frame || i > max_frame) continue;
|
if(i < min_frame || i > max_frame) continue;
|
||||||
|
Reference in New Issue
Block a user