-
Notifications
You must be signed in to change notification settings - Fork 1
/
ALL.H
287 lines (246 loc) · 7.43 KB
/
ALL.H
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
#ifndef H_ALL
#define H_ALL
//#define EDITOR 1
#ifndef EDITOR
//!!! #define DEMO 1
#endif
#define wclock 1
#define wmyrg 18*1 //ª®« ¢® ¬ë࣠¨© ¬ã¦¨ª
#define f_def files[0]
#define f_level files[1]
#define f_blevel files[2]
#define f_bmonstr files[3]
#define f_dmonstr files[4]
#define f_models files[5]
#define f_demo files[6]
#define f_fon files[7]
#define f_bckg files[8]
#define f_dstrip files[9]
//¯®«®¦¥¨¥ ¬¥î
#define xsp 296
#define ysp 3
#define maxsiz_level (unsigned long)60*500
#define maxdemo (unsigned long)1000
//०¨¬ë
enum {s_go,s_down,s_jump,s_fly,s_lift,s_ouch,s_crash,s_over,s_end};
//¬®¤¥«¨
enum {m_lift0,m_lift,m_door,m_button,m_switch,m_keyhole,m_hole,m_brick,
m_warp,m_shop,m_touch,m_flag,m_copy,m_item};
//⨯ë ã஢¥© (à §£® ¨ ¨¥àæ¨ï ¨ â.¯.)
enum {t_normal,t_ice,t_water,t_air,t_cave};
//--®¯¨á ¯à®£à
void splitcopy0(screen dest, int sx, int sy, screen src);
void putup(void);
int yesno(char *);
void put_curr(void); //¢ë¢®¤ â쥪ãé¨å ®¡ê¥ªâ®¢ । ªâ¨à®¢ ¨ï
void f_quit(void); //¢ë室 ¢ ¤®á
void f_disk(void); //à ¡®â á ¤¨áª®¬
void f_size(void); //¨§¬¥¨âì à §¬¥àë ã஢ï
void f_clear(void); //®ç¨á⪠ã஢ï
void f_game(void); //¯à®¡ ¨£àë
void f_gamedemo(void);
void f_poohxy(void);
void paramlev(void);
void readlev();
void savelev();
void makepass(int);
int testpass(void);
void far mm(unsigned char); //®¡à ¡®â稪 ¯à¥àë¢ ¨© ®â ª« ¢¨ âãàë
void far mz(unsigned char); //®¡à ¡®â稪 ¤«ï § áâ ¢ª¨
void far md(unsigned char); //®¡à ¡®â稪 ¤«ï ¤¥¬®áâà
void far get_joy(void); //®¡à ¡®â稪 ¤¦®©á⨪
void f_map(void); //¢ë¢®¤ ª àâë ã஢ï
void but_up(void); //ᤢ¨£ ¯à¨ । ªâ¨à®¢ ¨¨ 1 ª«¥âªã íªà
void but_down(void);
void but_left(void);
void but_right(void);
void choose_fon(void); //¢ë¡®à ä®
void choose_trase(void);
void choose_items(void);
void choose_monstr(void);
void choose_model(void); //ãáâ ®¢ª «¨ä⮢ ¨ ¤à. ¬¥å ¨§¬®¢
void switch_fon(void);
void switch_trase(void);
void switch_items(void);
void switch_monstr(void);
void switch_model(void);
void show_model(int n);
void edmodel(int n);
void domodel(void);
void actmodel(void);
char check(register int x_,register int y_); //¯à®¢¥àª ¯ãáâ®âã
char checkdw(register int x_,register int y_); //¯à®¢¥àª ¯ãáâ®âã
void ris_lab(int,int); //¢ë¢®¤ íªà ¤«ï । ªâ
void rislab(unsigned int,unsigned int); //¢ë¢®¤ íªà ¢ ¨£à
//!!!char check(unsigned int,unsigned int); //¯à®¢¥àª ¯ãáâ®âã
//!!!char checkdw(unsigned int,unsigned int); //¯à®¢¥àª ¯ãáâ®âã
void getitem(int, int); //¢§ï⨥ ¢¥é¨ ¯® ª®®à¤¨ â ¬
void addboom(int x, int y, int lx, int ly, char sx, char sy, char typ, block buf);
#define b_boom 0 //¢§àë¢ ¬¥áâ¥
#define b_buh 1 //¥â ᬥë ä §
#define b_crash 2 //à §«¥â ªã᪮¢
#define b_fall 3 //®¯ ¤¥¨¥ ªã᪮¢
void addmess(char *m,unsigned char w); //!!! w=32
void doboom(); //®¡à ¡®âª ¢§àë¢à¢
int addbullet(int x, int y, int sx, int sy, char typ, block buf);
void doshop(int);
void dobullet(void);
void put_score(void);
void put_additems(void);
void open_exit(void);
void doman(void); //®¡à ¡®âª £¥à®ï
void readmonstr(void); //áç¨â âì ®¯¨á ¨¥ ¬®áâ஢
void makemonstr(int i, int n, unsigned int x,unsigned int y);
int addmonstr(int n, unsigned int x,unsigned int y);
void doobj(void); //®¡à ¡®âª ®¡ê¥ªâ®¢
void mult(char *); //¯®ª § ¬ã«ìâ
void readstrip(void);
//------- áâàãªâãàë
//!!!
#pragma pack(push, 1)
typedef struct {
char name[16];
unsigned short lx,ly; //à §¬¥à ã஢ï
unsigned short nx,ny; // ç «ì ª®®à¤ £¥à®ï
//!!! unsigned int lx,ly; //à §¬¥à ã஢ï
//!!! unsigned nx,ny; // ç «ì ª®®à¤ £¥à®ï
unsigned char fonR,fonG,fonB; //®ªà ᪠§ ¤¥£® ä®
char end; //¯®á«¥¤¨© «¨ ã஢¥ì?
char bckgname[13],fonname[13]; // §¢ § ¤ ¯« , ä®
char mname0[13],mname1[13]; // §¢ ¬-ä ¢ ç ¨ ª®æ¥ ã஢ï
char typ; //⨯ ã஢ï
char musicname[13]; // §¢ ¬ã§ëª¨ ã஢¥ì
} levdef;
//¢à £¨
#define maxobj 64
typedef struct { //®¯¨á ¨¥ ®¡ê¥ªâ
//char name[8];
short x,y; //ª®®à¤¨ âë ⥪ ª¢-â
//!!! int x,y; //ª®®à¤¨ âë ⥪ ª¢-â
char sx,sy; //ã᪮२¥
char dsx,dsy; //â®à¬®¦¥¨¥ ¯® ®áï¬
unsigned char lx,ly; //¢ëá®â è¨à¨
char lfx,lfy; //ª®®à¤ â®ç¥ª ®¯®àë
char rtx,rty; //ª®®à¤ â®ç¥ª ®¯®àë
char upx,upy; //ª®®à¤ â®ç¥ª ®¯®àë
char dwx,dwy; //ª®®à¤ â®ç¥ª ®¯®àë ¨ æ¥âà
char typ; //⨯ ®¡ê¥ªâ
char n; //®¬¥à ¢ ¬ áᨢ¥ ®¬¥à®¢ ¬®áâ஢
char s; //á®áâ®ï¨¥
block buf; //áá뫪 ⥪ãéãî ä §ã
char f,f0,napr,myrg; //ä § ᪮à®áâì ᬥë ä §ë ¨ ¯à ¢«¥¨¥
char on; //¢ª«/¢ëª« 1..x, 0 ¦¨§¥ ᨫ
} object;
typedef struct {
short x,y; //ª®®à¤¨ âë ⥪
//!!! int x,y; //ª®®à¤¨ âë ⥪
char n; //®¬¥à ⨯ ¬®áâà -®¡ê¥ªâ
} strkobj;
typedef struct { //®¯¨á ¨¥ £¥à®ï (£«®¡ «ì®¥)
char name[8];
short x,y; //ª®®à¤¨ âë ⥪ ª¢-â
//!!! int x,y; //ª®®à¤¨ âë ⥪ ª¢-â
char sx,sy; //ã᪮२¥
char dsx1,dsx2,dsy; //â®à¬®¦¥¨¥ ¯® ®áï¬
unsigned char lx,ly; //¢ëá®â è¨à¨
char lfx,lfy1,lfy2; //ª®®à¤ â®ç¥ª ®¯®àë
char rtx,rty1,rty2; //ª®®à¤ â®ç¥ª ®¯®àë
char upx1,upx2,upy; //ª®®à¤ â®ç¥ª ®¯®àë
char dwx1,dwx2,dwy; //ª®®à¤ â®ç¥ª ®¯®àë ¨ æ¥âà
char typ; //⨯ ®¡ê¥ªâ
char namespr[12]; // §¢ ¨¥ á¯à ©â
block gospr; //áá뫪 ç «® ¬ áᨢ á ä § ¬¨
block jmspr;
block stspr;
block specspr;
char maxgo; //¬ å ª®«-¢® ä § ¤¢¨¦¥¨ï ä §
char maxjm;
char maxst;
char maxspec;
char s; //á®áâ®ï¨¥
block buf; //áá뫪 ⥪ãéãî ä §ã
char f,f0,fw,napr,myrg; //ä § ᪮à®áâì ᬥë ä §ë ¨ ¯à ¢«¥¨¥
char on; //¢ª«/¢ëª« 1..x, 0 ¦¨§¥ ᨫ
} hero;
//â¨¯ë ¬®áâ஢
#define maxmonstr 16
typedef struct { //®¯¨á ¨¥ ¬®áâ஢
char name[9];
unsigned char lx,ly; //¢ëá®â , è¨à¨
char lfx,lfy; //ª®®à¤ â®ç¥ª ®¯®àë
char rtx,rty; //ª®®à¤ â®ç¥ª ®¯®àë
char upx,upy; //ª®®à¤ â®ç¥ª ®¯®àë
char dwx,dwy; //ª®®à¤ â®ç¥ª ®¯®àë ¨ æ¥âà
char typ; //⨯ ¯®¢¥¤¥¨ï ®¡ê¥ªâ
char speed;
char lives;
char namespr[13]; // §¢ ¨¥ ä ©« á¯à ©â
block gospr; //áá뫪 ç «® ¬ áᨢ á ä § ¬¨
block jmspr;
block stspr;
block specspr;
char maxgo; //¬ å ª®«-¢® ä § ¤¢¨¦¥¨ï ä §
char maxjm;
char maxst;
char maxspec;
//⮫쪮 ¤«ï ¬®áâà
char _t_;
} monstr;
//¬ ªá ª®«-¢® «¨ä⮢ ¨ ¯à®ç¨å ¬®¤¥«¥©
#define maxmodel 48
typedef struct {
char name[8]; //᢮¥ ¨¬ï
char name0[8]; //çâ® ¢ª«îç¨âì
short x,y; //ª®®à¤¨ âë ⥪ ª¢-â
//!!! int x,y; //ª®®à¤¨ âë ⥪ ª¢-â
char sx,sy; //ã᪮२¥
unsigned char lx,ly; //¢ëá®â è¨à¨
short x1,y1; //ª®®à¤ ç «ì®£® ¯®«®¦¥¨ï
short x2,y2; //ª®®à¤ ª®¥ç®£® ¯®«®¦¥¨ï
//!!! int x1,y1; //ª®®à¤ ç «ì®£® ¯®«®¦¥¨ï
//!!! int x2,y2; //ª®®à¤ ª®¥ç®£® ¯®«®¦¥¨ï
char typ; //⨯ ¬®¤¥«¨
block buf; //áá뫪 ⥪ãéãî ä §ã
char on,on0; //¢ª«/¢ëª« 1..x, 0 ¦¨§¥ ᨫ
} strmodels;
//¬ £ §¨
typedef struct { //®¯¨á ¨¥ ¯à¥¤¬¥â ¨§ ¬ £ §¨
short price; //æ¥
//!!! int price; //æ¥
char name[16];
unsigned char lx,ly; //¢ëá®â è¨à¨
block *buf; //áá뫪 ä §ã
short sm;
//!!! int sm;
char mf; //ª®«-¢® ä §
} sshop;
//¬ ªá ª®«-¢® ¢§à뢮¢
#define maxboom 32
typedef struct { //ª®®à¤¨ âë ¢§à뢮¢
short x,y; //ª®®à¤¨ âë ⥪ ª¢-â
//!!! int x,y; //ª®®à¤¨ âë ⥪ ª¢-â
unsigned char lx,ly; //¢ëá®â è¨à¨
char sx,sy; //¢ëá®â è¨à¨
char typ; //⨯ ®¡ê¥ªâ
block buf; //áá뫪 ä §ã
char f; //ä §
} boom;
//¯ã«¨ - è¨èª¨
#define maxbullet 20
typedef struct {
short x,y; //ª®®à¤¨ âë ⥪ ª¢-â
//!!! int x,y; //ª®®à¤¨ âë ⥪ ª¢-â
char sx,sy; //ã᪮२¥
char typ; //⨯ ®¡ê¥ªâ
char f; //ä §
block buf; //áá뫪 ⥪ãéãî ä §ã
} strbullets;
//¤«ï ¢ë¢®¤ í«¥¬¥â®¢ ¢ « ¡¨à¨â¥ ᢥàåã
#define maxnup (8*10)
typedef struct {
block adr; //áá뫪 ¤à¥á íªà
block buf; //áá뫪 ⥪ãéãî ä §ã
} strup;
//!!!
#pragma pack(pop)
#endif