charles/src/charles.c

37 lines
524 B
C
Raw Normal View History

/* charles.c
*
* Entry point for Charles, including main().
*
* Eryn Wells <eryn@erynwells.me>
*/
2013-09-07 16:10:42 -07:00
#include <stdio.h>
#include <png.h>
#include "scene.h"
#include "writer_png.h"
char *OUT_FILE = "charles_out.png";
int
main(int argc,
const char *argv[])
{
2013-09-07 16:10:42 -07:00
FILE *out_file = fopen(OUT_FILE, "wb");
if (!out_file) {
return -1;
}
Scene *scene = scene_init();
scene_render(scene);
write_scene_png(scene, out_file);
scene_destroy(scene);
fclose(out_file);
return 0;
}