Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
alexbevi
GitHub Repository: alexbevi/BizHawk
Path: blob/master/libmupen64plus/mupen64plus-video-glide64/src/compiletex.c
2 views
1
/*
2
* Glide64 - Glide video plugin for Nintendo 64 emulators.
3
* Copyright (c) 2002 Dave2001
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public
16
* Licence along with this program; if not, write to the Free
17
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
* Boston, MA 02110-1301, USA
19
*/
20
21
#include <stdio.h>
22
23
int main(int argc, char **argv)
24
{
25
FILE *src, *dest;
26
unsigned char a;
27
28
src = fopen(argv[1], "rb");
29
dest = fopen(argv[2], "wb");
30
31
fprintf(dest, "unsigned char %s[] = {", argv[3]);
32
33
while(fread(&a, 1, 1, src))
34
{
35
fprintf(dest, "%d,\n", a);
36
}
37
fprintf(dest, "0};\n");
38
fclose(src);
39
fclose(dest);
40
41
return 0;
42
}
43
44
45