File: tile.h

package info (click to toggle)
gnomehack 1.0.5-1.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 10,256 kB
  • ctags: 12,966
  • sloc: ansic: 119,783; yacc: 2,002; sh: 610; lex: 417; makefile: 397
file content (55 lines) | stat: -rw-r--r-- 1,063 bytes parent folder | download
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifdef __cplusplus
extern "C" {
#pragma }

#endif  /* __cplusplus */

typedef unsigned char pixval;

typedef struct {
    pixval r, g, b;
} pixel;

#define MAXCOLORMAPSIZE 	256

#define CM_RED		0
#define CM_GREEN	1
#define CM_BLUE 	2

/* shared between reader and writer */
extern pixval ColorMap[3][MAXCOLORMAPSIZE];
extern int colorsinmap;
/* writer's accumulated colormap */
extern pixval MainColorMap[3][MAXCOLORMAPSIZE];
extern int colorsinmainmap;

#include "dlb.h"	/* for MODEs */

/* size of tiles */
#ifndef TILE_X
#define TILE_X 16
#endif
#define TILE_Y 16

#define Fprintf (void) fprintf


extern boolean FDECL(fopen_text_file, (const char *, const char *));
extern boolean FDECL(read_text_tile, (pixel (*)[TILE_X]));
extern boolean FDECL(write_text_tile, (pixel (*)[TILE_X]));
extern int NDECL(fclose_text_file);

extern void NDECL(init_colormap);
extern void NDECL(merge_colormap);

#if defined(MICRO)
#undef exit
# if !defined(MSDOS) && !defined(WIN32)
extern void FDECL(exit, (int));
# endif
#endif


#ifdef __cplusplus
}
#endif  /* __cplusplus */