OSDN Git Service

attempted font system added
[proj16/16.git] / 16 / v2 / source / ENGINE / ENGINE.H
1 /*\r
2 Copyright (C) 1998 BJ Eirich (aka vecna)\r
3 This program is free software; you can redistribute it and/or\r
4 modify it under the terms of the GNU General Public License\r
5 as published by the Free Software Foundation; either version 2\r
6 of the License, or (at your option) any later version.\r
7 This program is distributed in the hope that it will be useful,\r
8 but WITHOUT ANY WARRANTY; without even the implied warranty of\r
9 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\r
10 See the GNU General Public Lic\r
11 See the GNU General Public License for more details.\r
12 You should have received a copy of the GNU General Public License\r
13 along with this program; if not, write to the Free Software\r
14 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.\r
15 */\r
16 \r
17 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r
18 // CHANGELOG:\r
19 // <zero 5.7.99>\r
20 // + added ScreenShot() headers\r
21 // -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-\r
22 \r
23 \r
24 #ifndef ENGINE_H\r
25 #define ENGINE_H\r
26 \r
27 typedef struct\r
28 {\r
29   word start;                        // strand start\r
30   word finish;                       // strand end\r
31   word delay;                        // tile-switch delay\r
32   word mode;                         // tile-animation mode\r
33 } vspanim_r;\r
34 \r
35 typedef struct\r
36 {\r
37   char pmultx,pdivx;                 // parallax multiplier/divisor for X\r
38   char pmulty,pdivy;                 // parallax multiplier/divisor for Y\r
39   unsigned short sizex, sizey;       // layer dimensions.\r
40   unsigned char trans, hline;        // transparency flag | hline (raster fx)\r
41 } layer_r;\r
42 \r
43 typedef struct\r
44 {\r
45   char name[40];                     // zone name/desc\r
46   unsigned short script;             // script to call thingy\r
47   unsigned short percent;            // chance of executing\r
48   unsigned short delay;              // step-delay\r
49   unsigned short aaa;                // Accept Adjacent Activation\r
50   unsigned short entityscript;       // script to call for entities\r
51 } zoneinfo;\r
52 \r
53 extern layer_r layer[4];                    // Array of layer data\r
54 extern vspanim_r vspanim[100];              // tile animation data\r
55 extern unsigned short vadelay[100];         // Tile animation delay ctr\r
56 \r
57 extern char mapname[60];                    // MAP filename\r
58 extern char vspname[60];                    // VSP filemap\r
59 extern char rstring[20];                    // render-order string\r
60 extern char numlayers;                      // number of layers in map\r
61 extern byte *obstruct, *zone;               // obstruction and zone buffers\r
62 extern int bufsize;                         // how many bytes need to be written\r
63 extern char layertoggle[4];                 // layer visible toggles\r
64 \r
65 extern word *layers[4];                     // Raw layer data\r
66 extern int xwin, ywin;\r
67 \r
68 // -- entity things --\r
69 \r
70 extern char *msbuf[100];                    // ptr-table to script offset\r
71 extern char *ms;                            // script text buffer\r
72 extern byte nms;                            // number of movescripts\r
73 \r
74 extern char numfollowers;                   // number of party followers\r
75 extern byte follower[10];                   // maximum of 10 followers.\r
76 extern char laststeps[10];                  // record of last movements\r
77 extern int lastent;\r
78 \r
79 // -- vsp data --\r
80 \r
81 extern byte *vsp,*vspmask;                  // VSP data buffer.\r
82 extern unsigned short numtiles;             // number of tiles in VSP.\r
83 extern unsigned short *tileidx;             // tile index thingamajig\r
84 extern char *flipped;                       // bi-direction looping flag\r
85 extern byte movegranularity, phantom, speeddemon, movectr;\r
86 extern int bindarray[128];\r
87 \r
88 // -- prototypes --\r
89 \r
90 extern void LoadVSP(char *fname);\r
91 extern void FreeVSP(void);\r
92 extern void LoadMAP(char *fname);\r
93 extern void FreeMAP(void);\r
94 extern void MAPswitch(void);\r
95 extern void MAPstats(void);\r
96 extern void ProcessControls(void);\r
97 extern void GameTick(void);\r
98 \r
99 extern void ReadCompressedLayer1(byte*, int, char*);\r
100 \r
101 //--- zero 5.7.99\r
102 void WritePalette(FILE *f);\r
103 void WritePCXLine(unsigned char *p,int len,FILE *pcxf);\r
104 void ScreenShot();\r
105 //\r
106 #endif // ENGINE_H\r