DEADSOFTWARE

Minor doom2d_deb_maker fixes
[flatwaifu.git] / src / view.h
1 /*
2 Copyright (C) Prikol Software 1996-1997
3 Copyright (C) Aleksey Volynskov 1996-1997
4 Copyright (C) <ARembo@gmail.com> 2011
6 This file is part of the Doom2D:Rembo project.
8 Doom2D:Rembo is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License version 2 as
10 published by the Free Software Foundation.
12 Doom2D:Rembo is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, see <http://www.gnu.org/licenses/> or
19 write to the Free Software Foundation, Inc.,
20 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 */
23 // View functions
25 #include <stdio.h>
28 // object data structure
29 #pragma pack(1)
30 typedef struct{
31 int x,y; // coordinates
32 int xv,yv; // velocity
33 int vx,vy;
34 int r,h; // radius, height
35 }obj_t;
38 typedef struct{
39 int x,y;
40 byte d;
41 }pos_t;
42 #pragma pack()
44 enum{HIT_SOME,HIT_ROCKET,HIT_BFG,HIT_TRAP,HIT_WATER,HIT_ELECTRO,HIT_FLAME};
46 enum{
47 GS_TITLE,GS_GAME,GS_INTER,GS_DARKEN,GS_ENDANIM,GS_END2ANIM,GS_ENDSCR,
48 GS_BVIDEO,GS_EVIDEO,GS_END3ANIM
49 };
51 #define FLDW 100
52 #define FLDH 100
53 #define CELW 8
54 #define CELH 8
55 #define MAXTXW 16
56 #define MAXTXH 8
58 #pragma pack(1)
60 typedef struct{
61 char n[8];
62 char t;
63 }wall_t;
65 #pragma pack()
67 void W_draw(void);
68 void W_act(void);
70 void W_init(void);
72 int W_load(FILE*);
73 int G_load(FILE*);
75 void G_init(void);
76 void G_start(void);
77 void G_act(void);
78 void G_draw(void);
80 extern byte walswp[256];
81 extern byte _2pl,g_dm,g_st,g_exit,w_horiz,g_map;
82 extern int g_sttm;
83 extern dword g_time;
84 extern int w_o,w_x,w_y;
85 extern byte fldb[FLDH][FLDW];
86 extern byte fldf[FLDH][FLDW];
87 extern byte fld[FLDH][FLDW];
88 extern pos_t dm_pos[];
89 extern int dm_pnum,dm_pl1p,dm_pl2p;
91 extern int WD; //
92 extern int HT; //