|
@ -137,14 +137,15 @@ int main() |
|
|
|
|
|
|
|
|
struct rect frame; |
|
|
struct rect frame; |
|
|
|
|
|
|
|
|
|
|
|
unsigned frame_id = 0; |
|
|
while (1) { |
|
|
while (1) { |
|
|
frame = get_frame(lights, lights_len); |
|
|
frame = get_frame(lights, lights_len); |
|
|
if (frame.h <= REASONABLE_HEIGHT) break; |
|
|
if (frame.h <= REASONABLE_HEIGHT) break; |
|
|
advance_frame(lights, lights_len); |
|
|
advance_frame(lights, lights_len); |
|
|
|
|
|
frame_id++; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
GString *fname = g_string_new(NULL); |
|
|
GString *fname = g_string_new(NULL); |
|
|
unsigned frame_id = 0; |
|
|
|
|
|
while (check_limit(frame, lights, lights_len) == 0) { |
|
|
while (check_limit(frame, lights, lights_len) == 0) { |
|
|
g_string_printf(fname, "out/frame%03d.pbm", frame_id++); |
|
|
g_string_printf(fname, "out/frame%03d.pbm", frame_id++); |
|
|
if (make_bitmap(fname->str, frame, lights, lights_len)) break; |
|
|
if (make_bitmap(fname->str, frame, lights, lights_len)) break; |
|
|