]> git.gir.st - ttxd.git/blob - src/vtx2ascii-src/fileio.h
initial code import
[ttxd.git] / src / vtx2ascii-src / fileio.h
1 #ifndef VTXBITMAP_H_INCLUDED
2 #define VTXBITMAP_H_INCLUDED
3
4 /* $Id: fileio.h,v 1.3 1997/08/14 23:00:12 mb Exp mb $
5 *
6 * Copyright (c) 1995-96 Martin Buck <martin-2.buck@student.uni-ulm.de>
7 * Read COPYING for more information
8 */
9
10
11 #include <stdio.h>
12 #include "vtxdecode.h"
13
14
15 #define BITS_PER_BYTE 8
16
17 #define LOADOK 0
18 #define LOADERR -1
19 #define LOADEMAGIC -2
20 #define LOADEVERSION -3
21 #define LOADECORRUPT -4
22
23
24 typedef struct {
25 int xsize, ysize, bpr, bpc;
26 unsigned char *bitmap;
27 } vtxbmfont_t;
28
29
30 extern char *vtx_fontpath;
31
32
33 vtxbmfont_t * read_font(unsigned int xsize, unsigned int ysize);
34 #ifdef GIF_SUPPORT
35 void export_gif(FILE *file, const vtxpage_t *page, const vtxbmfont_t *font, int interlace,
36 int show_hidden);
37 #endif
38 void export_ppm(FILE *file, const vtxpage_t *page, const vtxbmfont_t *font, int show_hidden);
39 #ifdef PNG_SUPPORT
40 int export_png(FILE *file, const vtxpage_t *page, const vtxbmfont_t *font, int interlace,
41 int show_hidden, char ***msg_list);
42 #endif
43 void export_ascii(FILE *file, const vtxpage_t *page, int show_hidden);
44 void save_vtx(FILE *file, const byte_t *buffer, const vtx_pageinfo_t *info, int virtual);
45 int load_vtx(FILE *file, byte_t *buffer, vtx_pageinfo_t *info, int *virtual);
46
47 #endif /* VTXBITMAP_H_INCLUDED */
Imprint / Impressum