DEADSOFTWARE

fully separate render
[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 #ifndef VIEW_H_INCLUDED
26 #define VIEW_H_INCLUDED
28 #include <stdio.h>
31 // object data structure
32 #pragma pack(1)
33 typedef struct{
34 int x,y; // coordinates
35 int xv,yv; // velocity
36 int vx,vy;
37 int r,h; // radius, height
38 }obj_t;
41 typedef struct{
42 int x,y;
43 byte d;
44 }pos_t;
45 #pragma pack()
47 enum{HIT_SOME,HIT_ROCKET,HIT_BFG,HIT_TRAP,HIT_WATER,HIT_ELECTRO,HIT_FLAME};
49 enum{
50 GS_TITLE,GS_GAME,GS_INTER,GS_DARKEN,GS_ENDANIM,GS_END2ANIM,GS_ENDSCR,
51 GS_BVIDEO,GS_EVIDEO,GS_END3ANIM
52 };
54 #define FLDW 100
55 #define FLDH 100
56 #define CELW 8
57 #define CELH 8
58 #define MAXTXW 16
59 #define MAXTXH 8
61 #pragma pack(1)
63 typedef struct{
64 char n[8];
65 char t;
66 }wall_t;
68 #pragma pack()
70 extern dword walf[256];
71 extern byte walswp[256];
73 void W_init(void);
75 int W_load(FILE*);
76 int G_load(FILE*);
78 void G_init(void);
79 void G_start(void);
80 void G_act(void);
81 void G_draw(void);
83 extern byte walswp[256];
84 extern byte _2pl,g_dm,g_st,g_exit,w_horiz,g_map;
85 extern int g_sttm;
86 extern dword g_time;
87 extern int w_o,w_x,w_y;
88 extern byte fldb[FLDH][FLDW];
89 extern byte fldf[FLDH][FLDW];
90 extern byte fld[FLDH][FLDW];
91 extern pos_t dm_pos[];
92 extern int dm_pnum,dm_pl1p,dm_pl2p;
94 extern int WD; //
95 extern int HT; //
97 #endif /* VIEW_H_INCLUDED */