blob: 6da765ee0eabead649088544ad8181770faebe2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include <stdlib.h>
#include <stdio.h>
#include "vdp.h"
#include "render.h"
int main(int argc, char ** argv)
{
if (argc < 2) {
fprintf(stderr, "Usage: stateview FILENAME\n");
exit(1);
}
FILE * state_file = fopen(argv[1], "rb");
if (!state_file) {
fprintf(stderr, "Failed to open %s\n", argv[1]);
exit(1);
}
vdp_context context;
init_vdp_context(&context);
vdp_load_savestate(&context, state_file);
vdp_run_to_vblank(&context);
render_init();
render_context(&context);
render_wait_quit();
return 0;
}
|