OSDN Git Service

upgrade to 3.6.1
[jnethack/source.git] / sys / msdos / pctiles.h
1 /* NetHack 3.6  pctiles.h       $NHDT-Date: 1457207040 2016/03/05 19:44:00 $  $NHDT-Branch: chasonr $:$NHDT-Revision: 1.9 $ */
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 #ifndef TILE_X
15 #define TILE_X 16
16 #endif
17
18 #define NETHACK_PLANAR_TILEFILE "NetHack1.tib"   /* Planar style tiles */
19 #define NETHACK_PACKED_TILEFILE "NetHack2.tib"   /* Packed style tiles */
20 #define NETHACK_OVERVIEW_TILEFILE "NetHacko.tib" /* thin overview tiles */
21
22 #define ROWS_PER_TILE TILE_Y
23 #define COLS_PER_TILE TILE_X
24 #define EMPTY_TILE -1
25 #define TIBHEADER_SIZE 1024 /* Use this for size, allows expansion */
26 #define PLANAR_STYLE 0
27 #define PACKED_STYLE 1
28 #define DJGPP_COMP 0
29 #define MSC_COMP 1
30 #define BC_COMP 2
31 #define OTHER_COMP 10
32
33 struct tibhdr_struct {
34     char ident[80];        /* Identifying string           */
35     char timestamp[26];    /* Ascii timestamp              */
36     char tilestyle;        /* 0 = planar, 1 = pixel        */
37     char compiler;         /* 0 = DJGPP, 1 = MSC, 2= BC etc. see above */
38     short tilecount;       /* number of tiles in file      */
39     short numcolors;       /* number of colors in palette  */
40     char palette[256 * 3]; /* palette                      */
41 };
42
43 /* Note on packed style tile file:
44  * Each record consists of one of the following arrays:
45  *      char packtile[TILE_Y][TILE_X];
46  */
47
48 extern void FDECL(CloseTileFile, (BOOLEAN_P));
49 extern int FDECL(OpenTileFile, (char *, BOOLEAN_P));
50 extern int FDECL(ReadTileFileHeader, (struct tibhdr_struct *, BOOLEAN_P));
51
52 #ifdef PLANAR_FILE
53 #ifdef SCREEN_VGA
54 extern int FDECL(ReadPlanarTileFile, (int, struct planar_cell_struct **));
55 extern int FDECL(ReadPlanarTileFile_O,
56                  (int, struct overview_planar_cell_struct **));
57 #endif
58 #endif
59
60 #ifdef PACKED_FILE
61 extern int FDECL(ReadPackedTileFile, (int, char (*)[TILE_X]));
62 #endif
63
64 extern short glyph2tile[MAX_GLYPH]; /* in tile.c (made from tilemap.c) */
65
66 #endif /* USE_TILES */
67
68 /* pctiles.h */