OSDN Git Service

Initial Import
[nethackexpress/trunk.git] / sys / msdos / pctiles.h
1 /*   SCCS Id: @(#)pctiles.h   3.4     1994/04/04                        */
2 /*   Copyright (c) NetHack PC Development Team 1993, 1994             */
3 /*   NetHack may be freely redistributed.  See license for details.   */
4 /*                                                                    */
5 /*
6  * pctiles.h - Definitions for PC graphical tile support
7  *                                                  
8  *Edit History:
9  *     Initial Creation              M. Allison      93/10/30
10  *
11  */
12
13 #ifdef USE_TILES
14 #define NETHACK_PLANAR_TILEFILE "NetHack1.tib"  /* Planar style tiles */
15 #define NETHACK_PACKED_TILEFILE "NetHack2.tib"  /* Packed style tiles */
16 #define NETHACK_OVERVIEW_TILEFILE "NetHacko.tib" /* thin overview tiles */
17
18 #define ROWS_PER_TILE   TILE_Y
19 #define COLS_PER_TILE   TILE_X
20 #define EMPTY_TILE      -1
21 #define TIBHEADER_SIZE 1024     /* Use this for size, allows expansion */
22 #define PLANAR_STYLE    0
23 #define PACKED_STYLE    1
24 #define DJGPP_COMP      0
25 #define MSC_COMP        1
26 #define BC_COMP         2
27 #define OTHER_COMP      10
28
29 struct tibhdr_struct {
30         char  ident[80];        /* Identifying string           */
31         char  timestamp[26];    /* Ascii timestamp              */
32         char  tilestyle;        /* 0 = planar, 1 = pixel        */
33         char  compiler;         /* 0 = DJGPP, 1 = MSC, 2= BC etc. see above */
34         short tilecount;        /* number of tiles in file      */
35         short numcolors;        /* number of colors in palette  */
36         char  palette[256 * 3]; /* palette                      */
37 };
38
39
40 /* Note on packed style tile file:
41  * Each record consists of one of the following arrays:
42  *      char packtile[TILE_Y][TILE_X];
43  */
44  
45 extern void FDECL(CloseTileFile, (BOOLEAN_P));
46 extern int  FDECL(OpenTileFile, (char *, BOOLEAN_P));
47 extern int  FDECL(ReadTileFileHeader, (struct tibhdr_struct *, BOOLEAN_P));
48
49 # ifdef PLANAR_FILE
50 #  ifdef SCREEN_VGA
51 extern int  FDECL(ReadPlanarTileFile,(int, struct planar_cell_struct **));
52 extern int  FDECL(ReadPlanarTileFile_O,
53                         (int, struct overview_planar_cell_struct **));
54 #  endif
55 # endif
56
57 # ifdef PACKED_FILE
58 extern int  FDECL(ReadPackedTileFile, (int, char (*)[TILE_X]));
59 # endif
60
61 extern short glyph2tile[MAX_GLYPH];      /* in tile.c (made from tilemap.c) */
62
63 #endif /* USE_TILES */
64
65 /* pctiles.h */